Virtual assembly simulation method and system
Technical Field
The invention relates to a method and a system for visually assembling a product model.
Background
The processing and manufacturing industry at the present stage depends on CAD/CAM software to realize the rapid design, automation and integrated processing of products. However, the assembly efficiency of the product is low by adopting a method of designing and processing the product and then using the product object for assembly verification. Especially, complex products (such as airplanes, automobiles and the like) are usually developed and completed by cooperation among a plurality of departments or a plurality of enterprises, the functions and the sizes of parts are generally designed firstly in the conventional design, then the physical products are assembled and verified, the early-stage design and the later-stage assembly are relatively independent, and the assembly and the design cannot share data. If the departments or development enterprises are not communicated smoothly, the deviation of the fit sizes of the parts of the product can be caused, the design requirements cannot be met, and the waste of manpower, material resources and financial resources is caused.
Therefore, the research on the virtual assembly system and the process thereof is necessary, the repeated manufacture of the physical entity model can be avoided, the product design efficiency is improved, and the development period and the development cost of the product are greatly shortened. The system is used for planning the assembly process of mechanical products, carrying out inspection on the assembly process and realizing visualization of the assembly process.
Disclosure of Invention
The invention aims to solve the problem that the existing design is firstly designed in function and size and then is subjected to assembly verification through a real product, which easily causes the deviation of the matching size of product parts, and provides a virtual assembly simulation method and a virtual assembly simulation system.
The invention discloses a virtual assembly simulation method, which comprises the following specific steps:
s1, importing an assembly body model;
s2, generating a first assembly sequence according to the complete assembly model;
the first assembly sequence is an assembly sequence which does not consider the virtual tool to participate in assembly;
s3, performing visual operation on the part model by using the reference assembly sequence by using the virtual tool, and generating a second assembly sequence;
the visualization operation comprises: selecting and controlling a corresponding virtual tool, and assembling or disassembling the corresponding part model through the corresponding virtual tool; selecting and controlling a corresponding part model to be directly assembled or disassembled;
initially employing a first assembly sequence with reference to the assembly sequence; the second assembly sequence is an assembly sequence considering the virtual tool to participate in assembly;
s4, optimizing and updating the second assembly sequence by using an assembly process optimization algorithm, replacing the original reference assembly sequence with the updated second assembly sequence, and returning to the step S3;
or finishing the assembly and finishing the virtual assembly simulation.
The specific method for generating the first assembly sequence in step S2 is as follows:
s21, disassembling each part model along a plurality of set disassembling directions according to the sequence of the assembling layers of the current assembling body model from outside to inside; acquiring an interference detection result in the disassembly process, and establishing a part interference table;
s22, comparing the disassembly directions in the part interference meter to obtain the disassembly direction with the least interference, recording the disassembly direction and the detachable part model in the disassembly direction, and adding a disassembly sequence;
the detachable part model is a part model without interference in the detaching direction;
s23, removing the detachable part model in the step S22, updating the assembly body model, and returning to the step S21;
until all the part models become detachable part models, obtaining a final detaching sequence, and entering step S24;
and S24, reversing the final disassembly sequence to obtain an assembly sequence.
The specific method of step S21 is as follows:
s211, obtaining the characteristic size of a part model, enabling the part model to move along a set disassembly direction and obtaining an interference detection result, wherein the moving distance is equal to the characteristic size;
s212, according to the interference condition of the part model, corresponding interference marks are formed in the part interference table;
if the part model interferes in the disassembly direction, filling an interference mark in a corresponding position in the part interference table; otherwise, filling the non-interference mark;
s213, replacing the disassembly direction, and returning to execute the step S211; until the interference situation of the part model in all the disassembly directions is filled into the part interference table, executing step S214;
s214, replacing the part model, and returning to execute the step S211; and filling the part interference table until the interference conditions of all the part models in all the disassembly directions are filled, and finishing the establishment of the part interference table.
Wherein, step S1 further includes:
s11, generating a virtual collision grid outline of the part model to obtain the position of the part model and the position of the virtual tool;
and S12, displaying the part model and the virtual tool.
Wherein, the interference detection result in step S211 is obtained through the following steps:
calculating according to the virtual collision grid outline of the part model and the position of the part model to obtain assembly parameters in the visual operation process;
the assembly parameters include interference detection results of the part model.
The invention discloses a virtual assembly simulation system, which comprises a model processing module, an assembly process planning module and a virtual assembly visual operation module;
the model processing module is used for leading in an assembly model;
the assembly process planning module is connected with the model processing module and used for generating a first assembly sequence according to the complete assembly body model;
the first assembly sequence is an assembly sequence which does not consider the virtual tool to participate in assembly;
the virtual assembly visual operation module is simultaneously connected with the model processing module and the assembly process planning module and is used for performing visual operation on the part model by using a virtual tool and using a reference assembly sequence and generating a second assembly sequence;
the visualization operation comprises: selecting and controlling a corresponding virtual tool, and assembling or disassembling the corresponding part model through the corresponding virtual tool; selecting and controlling a corresponding part model to be directly assembled or disassembled;
initially employing a first assembly sequence with reference to the assembly sequence; the second assembly sequence is an assembly sequence considering the virtual tool to participate in assembly;
and the assembly process planning module is also used for optimizing and updating the second assembly sequence by using an assembly process optimization algorithm, replacing the original reference assembly sequence with the updated second assembly sequence and sending the new reference assembly sequence to the virtual assembly visual operation module.
The assembly process planning module comprises an interference table generation module, a disassembly sequence generation module, a process planning circulation module and an assembly sequence generation module;
the interference table generation module is used for disassembling each part model along a plurality of set disassembling directions according to the sequence of the assembling layers of the current assembling body model from outside to inside; acquiring an interference detection result in the disassembly process, and establishing a part interference table;
the disassembly sequence generation module is connected with the interference meter generation module and used for comparing in each disassembly direction in the part interference meter to obtain a disassembly direction with minimum interference, recording the disassembly direction and a detachable part model in the disassembly direction, and adding a disassembly sequence;
the detachable part model is a part model without interference in the detaching direction;
the process planning cycle module is simultaneously connected with the interference table generation module and the disassembly sequence generation module and used for receiving the disassembly sequence, removing the detachable part models in the disassembly sequence, updating the assembly body model and sending the assembly body model to the interference table generation module;
until all the part models become detachable part models, obtaining a final detaching sequence;
and the assembly sequence generation module is connected with the process planning circulation module and used for receiving the final disassembly sequence and carrying out reverse sequence on the final disassembly sequence to obtain the assembly sequence.
The interference table generation module comprises a part model moving module, an interference marking module, a disassembly direction switching circulation module and a part switching circulation module;
the part model moving module is used for obtaining the characteristic size of a part model, enabling the part model to move along a set disassembly direction and obtaining an interference detection result, and the moving distance is equal to the characteristic size;
the interference mark module is connected with the part model moving module and used for generating a disassembly direction switching signal after the interference mark in the disassembly direction is filled according to the corresponding interference mark in the part interference table according to the interference condition of the part model;
if the part model interferes in the disassembly direction, filling an interference mark in a corresponding position in the part interference table; otherwise, filling the non-interference mark;
the disassembly direction switching and circulating module is simultaneously connected with the part model moving module and the interference marking module and used for receiving a disassembly direction switching signal, replacing the disassembly direction and sending the disassembly direction switching signal to the part model moving module;
filling a part interference meter until interference conditions of the part model in all disassembly directions, generating a part switching signal and sending the part switching signal to a part switching circulation module;
the part switching circulating module is simultaneously connected with the disassembling direction switching circulating module and the part model moving module, and is used for receiving a part switching signal, replacing the part model and sending the part model to the part model moving module;
and filling the part interference table until the interference conditions of all the part models in all the disassembly directions are filled, and finishing the establishment of the part interference table.
The model processing module is also used for generating a virtual collision grid outline of the part model to obtain the position of the part model and the position of the virtual tool;
and the virtual assembly visual operation module is also used for displaying the part model and the virtual tool.
The device also comprises an assembly parameter calculation module;
the assembly body parameter calculation module is connected with the interference table generation module and used for calculating and obtaining assembly parameters in the visual operation process according to the virtual collision grid outline of the part model and the position of the part model;
the assembly parameters include interference detection results of the part models.
The invention has the beneficial effects that:
the method effectively supports the simulation of the assembly process, and has the characteristics of simple and convenient operation, good model adaptability, high simulation efficiency and the like.
The performance of the assembly system can be optimized through virtual assembly, the assembly efficiency is improved, and the requirements of enterprises and markets are met. By means of the computer simulation technology, on the basis of the principle of easy assembly, the assemblability of the product is considered and simulated in advance, so that the production flow can be effectively simplified, the production cost is reduced, the production efficiency is improved, and meanwhile, a visualization means of the assembly process is provided.
Drawings
FIG. 1 is a schematic block diagram of a virtual assembly simulation system according to the present invention;
FIG. 2 is a block diagram of an interferometric table generating module of FIG. 1;
fig. 3 is a flowchart of an assembly sequence generation method in the virtual assembly simulation method of the present invention.
Fig. 4 is a flowchart of a method for generating a part interference table in the virtual assembly simulation method of the present invention.
Detailed Description
The virtual assembly simulation system of the embodiment is mainly used for performing virtual assembly simulation on an aircraft.
As shown in fig. 1 to 2, the assembly parameter calculation module comprises a model processing module 1, a virtual assembly visualization operation module 3 (including an assembly process visualization module 3-1, an operation module 3-2 and a prompt information module 3-3), an assembly parameter calculation module 4 and an assembly process planning module 2;
the model processing module 1 is used for importing a designed aircraft part model, recording assembly information of the part model, and adjusting the scaling of the model for the imported aircraft part model; a mesh contour fitting the model boundary can also be generated for the model as a collision volume for interference detection and installation space calculation.
The model processing module 1 is also used for recording the assembly information of the part model; the assembly information comprises the quality characteristics and the assembly hierarchical relationship of the part model.
The assembly process planning module 2 comprises an interference table generating module 2-1, a disassembly sequence generating module 2-2, a process planning circulating module 2-3 and an assembly sequence generating module 2-4, wherein the interference table generating module 2-1 comprises a part model moving module 2-1-1, an interference marking module 2-1-2, a disassembly direction switching circulating module 2-1-3 and a part switching circulating module 2-1-4.
The assembly process planning module 2 is used for user-defining or system-generating assembly sequences, recording assembly sequences executed in a virtual environment, realizing the optimization of the assembly process and verifying the optimized assembly sequences, and giving suggestions to the simulation process and results of a user after the assembly simulation is finished.
The assembly process planning module 2 can also record the parts which are assembled and disassembled by the user each time in the assembly process, and can check the parts after the assembly is finished (triggered by an assembly finishing button); the recorded assembly process can be automatically analyzed and optimized; and after the assembly process is optimized, relevant suggestions are given in an assembly suggestion column to explain the optimization content.
The virtual assembly visual operation module 3 comprises an assembly process visual module 3-1 (shown as an assembly process visual window), an operation module 3-2 and a prompt information module 3-3 (together shown as an operation and prompt information window), assembles or disassembles a part model of an assembly product in an assembly scene of the virtual assembly simulation system, controls virtual tools such as a mechanical arm and the like, and displays relevant information of the whole operation process and the part model in real time through the assembly process visual window.
The information of the part model comprises the name, quality characteristics and assembly priority of the part model;
the visual window in the assembly process can realize the visualization of the assembly environment, each part model and the virtual tool, and can adjust the assembly scene, such as the setting of light and field, the adjustment of window visual field and visual angle, and the like; the virtual tool can be replaced by a universal virtual human hand.
The operation and information prompt window comprises operation buttons and prompt information, wherein the operation buttons comprise a selection button of parts and tools (used for selecting parts models and virtual tools), a control button of the parts and tools (used for controlling the parts models and the virtual tools), an assembly button (used for assembling corresponding parts models through the virtual tools or virtual hands or directly controlling the parts models to be assembled), a disassembly button (used for disassembling corresponding parts models through the virtual tools or virtual hands or directly controlling the parts models to be disassembled), an assembly completion button (used for clicking after assembly and jumping to a preset module), a module jump button (used for jumping to the selected module in the assembly process or after assembly) and the like.
The prompt information comprises the current part model, the interference condition of the part model, the distance between the part model and the installation position and the state of the part model.
The prompt information module 2-3 is connected with the assembly parameter calculation module 3, and is used for acquiring the size of the installation space of the corresponding part model, prompt information of the installation space, the interference condition and the distance between the part model and the installation position, and prompting;
the installation space prompt information comprises information that the part model cannot be installed through the corresponding virtual tool and information that the part model can be installed through the corresponding virtual tool.
The assembly body parameter calculation module 4 mainly completes calculation of some key parameter indexes in the assembly process, such as the size of an installation space, the assembly body quality characteristics, interference detection of a part model and the like, and stores data variables defined in the virtual simulation assembly system.
The assembly parameter calculation module 4 calculates the collision condition and distance between the assembled part model and the assembly (the assembled assembly of a plurality of part models, which is not completely assembled) in real time, and when the distance is close, prompt information is generated in a prompt information window (the prompt information module 3-3).
The assembly parameters calculated by the assembly parameter calculation module 4 further comprise assembly quality characteristics; and the quality characteristic of the assembly body is obtained through the quality characteristic of the part model included in the corresponding assembly body.
And the quality characteristics of the part model are input by a designer or generated by related software when the part model is built or before virtual assembly.
Moreover, the assembly parameter calculation module 3 further comprises a space comparison module 3-1;
the space comparison module 3-1 is used for comparing the size of the installation space of the part model with the minimum tool installation space threshold value of the corresponding virtual tool; if the size of the installation space is smaller than the minimum tool installation space threshold value, the part model cannot be installed through the corresponding virtual tool; otherwise, the part model can be installed through the corresponding virtual tool. Wherein, the size of installation space is obtained through the following steps:
calculating the depth of the installation space in the depth direction and the section area of the installation space according to the virtual collision grid outline of the part model; the section is parallel to a plane perpendicular to the deep direction of the installation space;
and calculating the size of the installation space through the depth and the cross section area.
The system also comprises an assembly training module which is used for introducing the interface structure and the functions of each other module of the virtual assembly simulation system and training new users about the relevant operations in the assembly process.
The assembly parameter calculation module 4 can also compare the size of the installation space with a virtual tool or a virtual human hand after calculation, and judge whether the installation is possible.
In a second specific embodiment, a virtual assembly simulation method in this embodiment includes the following specific working steps:
step 1, entering an assembly training module 5 at a main interface, understanding each component module of a virtual assembly simulation system through a structure diagram and an explanation situation, and understanding an interface logic relationship of the virtual assembly simulation system through a flow diagram;
step 2, entering a model processing module 1, importing a model of a designed product, setting the scaling of the model, recording model information of each part, inputting relevant parameters such as quality characteristics and the like, generating a collision boundary for the part, and initializing positions of the part model and a tool;
step 3, entering an assembly process planning module 2, opening a complete assembly body model, and generating an assembly sequence by a system;
and 4, entering a virtual assembly visual operation module 3, assembling according to the assembly sequence, enabling a user to assemble a visual window and perform operations such as assembly, scene adjustment and the like while observing corresponding effects, enabling main operation equipment to be specific keys on a mouse and a keyboard, finally clicking assembly or disassembly to complete corresponding actions, and enabling retry if interference exists or the installation space is insufficient in the operation process. Checking various interference collision conditions, installation space and other information in the assembly process in an operation and information prompt window;
step 5, entering an assembly body parameter calculation module 4, and checking various parameters of the assembly body, such as quality characteristics and the like;
step 6, entering the assembly process planning module again, checking the previous assembly and disassembly records, and automatically analyzing and optimizing the assembly process by the module to give an optimization suggestion;
and 7, completing assembly and returning to the main interface of the system.
The assembly process planning module 2 generates an assembly sequence by a method of automatically disassembling the assembly body.
As shown in FIG. 3, for the process of generating the assembly sequence, the method generates the assembly sequence based on the idea of disassembling and assembling, records the disassembly sequence of the complete assembly body after the assembly body is disassembled without interference, and then obtains the assembly sequence in the reverse direction. The steps for generating the assembly sequence are as follows:
1) firstly, extracting feature information and pose information of a part which is not disassembled at present (the feature information and the pose information are carried by the part model when the part model is built and acquired through a part model introduced by a model processing module 1), respectively and automatically disassembling the part along a plurality of geometric directions from outside to inside according to an assembly hierarchical relationship, carrying out interference check in the disassembling process, and establishing a part interference table, wherein the feature information comprises the name, the type and the ID number of the part model, and the pose information comprises the position and the pose information of the part model;
2) respectively comparing the parts in all disassembly directions according to the part interference table to obtain the direction with the least interference, eliminating the detachable parts in the direction, renaming the parts, and recording the disassembly direction and the ID of the corresponding parts;
3) repeating the steps 1 and 2, and performing multi-wheel disassembly until all parts are disassembled;
4) the disassembly sequence is reversely sequenced to obtain an assembly sequence generated by the system;
table 1 is a part interference table obtained in one round of disassembly, and the part interference table records interference conditions of all parts to be disassembled in one round of disassembly along different disassembly directions, and if the part a interferes in the disassembly direction 1, it is recorded as 1, otherwise it is recorded as 0.
TABLE 1
| |
Disassembly direction 1
|
Disassembly direction 2
|
Disassembly direction 3
|
Disassembly direction 4
|
Disassembly direction 5
|
Disassembly direction 6
|
| Component 1
|
1
|
1
|
1
|
1
|
1
|
1
|
| Component 2
|
1
|
0
|
1
|
1
|
1
|
1
|
| Component 3
|
1
|
1
|
0
|
0
|
1
|
1
|
| Details 4
|
1
|
1
|
1
|
0
|
1
|
1
|
| Details 5
|
1
|
0
|
1
|
1
|
0
|
1
|
| Details 6
|
1
|
1
|
1
|
1
|
1
|
0 |
As shown in fig. 4, a flowchart is generated for the part interference table, and the process of obtaining the part interference table is as follows:
1) firstly, determining the characteristic size (such as length) of an undetached part, then gradually moving the part along a disassembly direction for a distance equal to the characteristic size, carrying out interference detection, if interference occurs, the corresponding position of an interference meter is 1, otherwise, the position is 0, and then carrying out the same operation on the part along other disassembly directions until all disassembly directions are finished until the detection of the single part is finished;
2) and repeating the process 1 for the next part until all the undetached parts are detected, and finally obtaining the part interference table.