The air-tightness detection method and system of mathematical model
Technical field
The present invention relates to a kind of technology of field of computer aided design, specifically a kind of three-dimensional or two-dimemsional number type matrix
The air-tightness detection method and system of type.
Background technology
By taking automobile as an example, the air-tightness of complex device is mainly caused by reasons such as design defect and manufacturing tolerances.In reality
Research and development and production practices in, since the complexity of equipment, such as body of a motor car are made of thousands of a parts.Developer designs
Mathematical model in, between component cooperation often there are the design defect such as hole gap, these design defect are to a considerable extent
It can lead to the air-tightness defect of actual products in following produce.
And air-tightness defect does not only result in the leak gas leakage of product, but will cause noise, air-conditioning leakage, equipment corrosion and
The defects of durability.(such as smoke test) is detected by physical method again after physical prototyping manufacture is completed, then the later stage
It is big by rectification expense.And in most cases, because the relevance between complex device product parts is extremely strong, most design results exist
The research and development later stage can not be changed.Passive mode of remedying is exactly gluing.However gluing is not only not environmentally, quality durability is poor, and
It is with high costs.Such as it in the practice of automobile development & production, needs to be blocked by gluing when there is 30 product gaps.Every gap
Material Cost be more than 5 yuan, cost of labor also be more than 5 yuan, then 30 gap gluing costs are more than 300 yuan.Single vehicle it is total
Yield commonly reaches 30-100 ten thousand.Therefore, even if ignoring related automatic double surface gluer and management cost, material and cost of labor will be
90000000-3 hundred million or more.So the inspection in product design initial stage hole gap seems extremely important.
Currently, for product design hole clearance inspection based on hand inspection.And not only efficiency is low for hand inspection.Together
When due to equipment structural complexity, leakage be often the designs such as hole gap at multilayer parts " shuttle ", hand inspection
The recall rate of defect is extremely low.By taking automobile product as an example, artificial recall rate only 30% or so.In order to improve the designing quality of product,
The inspection that hole gap is efficiently comprehensively carried out to three dimensional design mathematical model, is badly in need of a kind of mathematical model hole gap at this stage
Detection method.
Invention content
The present invention is directed to deficiencies of the prior art, proposes a kind of air-tightness detection method of mathematical model and is
System rapidly and efficiently comprehensively identifies the hole gap of mathematical model by the calculating parsing to Digital product model.The present invention
Support the three-dimensional digital model of the STL or FBX formats of continuous triangle dough sheet.
The present invention is achieved by the following technical solutions:
The present invention relates to a kind of air-tightness detection methods of mathematical model, include the following steps:
1st step generates the bounding box of complete cladding mathematical model:Calculate the length and width or 3-dimensional digital of two-dimensional digital model
The length and width and height of model take wherein maximum value to generate a two dimension or three-dimensional grid, i.e. bounding box, which can incite somebody to action
Entire mathematical model is wrapped in wherein, and the geometric center point that the central point that bounding box is arranged is mathematical model, manual specific bit
In in mathematical model a little be starting point.
The cutting that is averaged of two-dimensional bounding box is four two-dimensional sub-grids or averagely cuts three-dimensional bounding box by the 2nd step
It is divided into eight three-dimensional sub-grids.
All grids being newly syncopated as are divided into two classes by the 3rd step, i.e., when the grid not figure with two-dimensional mathematical model
Boundary is intersected or is not intersected with any one triangular facet in three-dimensional mathematical model, then be labeled as abortive haul lattice (cannot sentence at this time
It is not in figure or outside figure), and no longer cutting;Otherwise fence net lattice are labeled as and cutting next time can be carried out.
4th step, it is mathematical model to be searched for since starting point and mark the grid adjacent with the sub-grid containing starting point
Interior abortive haul lattice.
Described is adjacent, including vertex is adjacent, side is adjacent or face is adjacent, wherein:
The vertex is adjacent to refer to:There are a vertex is adjacent between two grids, two vertex xyz are sat in tri- directions
Scale value difference is equal.
The side is adjacent to refer to:It is adjacent that there are a lines between two grids, i.e., there are two be fixed in tri- coordinates of xyz
Value, another has initial value and final value.
The face is adjacent to refer to:There are a face is adjacent between two grids, i.e., all grids are along change in coordinate axis direction
Cutting, therefore the face of any grid is constant value there are one coordinate direction value.
5th step, since the sub-grid containing starting point, six faces, eight vertex of the abortive haul lattice in mathematical model
And 12 seamed edges carry out traversal pathfinding:The boundary or outer surface of some interior abortive haul lattice and bounding box or outer during pathfinding
Abortive haul lattice are adjacent, then it is hole interstitial site to mark the interior abortive haul lattice, while it is fence net lattice to mark the interior abortive haul lattice, and are traversing
No longer pass through the fence net lattice in the process.
6th step repeats the 5th step, until having traversed all grids, calculates and preserve the shortest path of interior abortive haul lattice.
7th step is inwardly traversed using the boundary of bounding box or outer surface as starting point, the search net adjacent with boundary or outer surface
Lattice, and continued search for after being marked as outer space grid, until search step number terminates when reaching default step number, otherwise return to the 2nd
Step carries out cutting to sub-grid, and continues the 3rd~7 step.
The present invention relates to a kind of systems for realizing the above method, including:Bounding box setup module, mesh generation module, hole
Hole identification module and Path Recognition module, wherein:Bounding box setup module and mesh generation module and Path Recognition module phase
Even and transmits outer boundary respectively to it and calculate domain information, mesh generation module and hole gap identification module and Path Recognition
Module is connected and distinguishes transmission grid division result information, and hole identification module is connected with Path Recognition module and to its transmission hole
Hole recognition result.
Technique effect
Compared with prior art, the present invention divides space with octave device so that closer to mathematical model (car body)
Grid it is smaller, and far from car body grid it is bigger.Because hole gap is in mathematical model (on car body) without in car body sky
Between.Why project analysis software is difficult to hole gap at present, if most important the reason is that because grid divides too
It is small, grid number can be made to increase at geometry quantity.And then keep calculation amount infinitely great, make computer that can not calculate.A such as automobile
Length, width and height respectively in 4m2m1.5m=12m3Left and right.When the grid for being divided into length of side 1mm, then quantity is 120
Hundred million.The grid of such quantity, can calculate almost without computer.However when method compiled program under this invention carries out in fact
When border is detected, when same cutting minimum grid 1mm, number of grid only 60,000,000 or so.Compared to same kind of products at abroad, the present invention
Calculating speed want fast 200 times, i.e., our vehicles, which calculate, only needs 10 points of kinds or so, and external similar software can only be by car body point
It is calculated separately at 4 parts and needs one week or so time.
Description of the drawings
Fig. 1 is present system schematic diagram;
Fig. 2 is the modules schematic diagram in system;
In figure, a is bounding box setup module cell schematics;B is mesh generation modular unit schematic diagram;C knows for hole
Other modular unit schematic diagram;D is Path Recognition modular unit schematic diagram;
Fig. 3 is the method for the present invention flow chart;
Fig. 4 is mesh generation schematic diagram of the present invention;
In figure:A is octave device schematic diagram;B is hole identification process schematic;C is model ergod process schematic;
Fig. 5 is Fig. 4 c close-up schematic views;
Fig. 6 is that leakage paths of the present invention identify schematic diagram;
Fig. 7 is that three-dimensional grid of the present invention divides schematic diagram;
A is three-dimensional digital model to be detected in figure, and b is three-dimensional grid cutting schematic diagram, and c is leakage paths identification signal
Figure, d are leakage paths enlarged drawing;
Fig. 8 is that embodiment Digital Automobile model leaks schematic diagram.
Specific implementation mode
Embodiment 1
As shown in Figure 1, the present embodiment is related to a kind of mathematical model hole clearance detecting system, including:Mould is arranged in bounding box
Block, mesh generation module, hole identification module and Path Recognition module, wherein:Bounding box setup module and mesh generation mould
Block, hole identification module and Path Recognition module are connected and transmit start point information and outer boundary information to it respectively.Grid
Division module is connected with hole gap identification module and Path Recognition module and distinguishes transmission grid division result information.Hole is known
Other module is connected with Path Recognition module and transmits hole recognition result information to it.
As shown in Figure 2 a, the bounding box setup module includes:Mathematical model measuring unit, bounding box automatically generate list
Member and starting point manual setting unit.Wherein:Mathematical model measuring unit and bounding box automatically generate unit and are connected and are passed to it
The coordinate extreme value information in defeated mathematical model x, y, z direction.Bounding box automatically generates unit and above-mentioned mesh generation module and path
Identification module is connected, and transmits computational domain (calculating boundary) information and outer boundary information (6 faces of bounding box) to it respectively.Starting
Point manual setting unit is connected with hole identification module and Path Recognition unit and provides it starting point coordinate information respectively.
Mesh generation module as described in Fig. 2 b includes:Grid and triangle overlapping relation judging unit, grid cutting unit.
Grid is connected with triangle overlapping relation judging unit with grid cutting unit, and latter transmit the grid whether with mathematical model
Some triangle intersect information.Grid cutting unit is connected with hole identification module and Path Recognition module, and is passed respectively to it
Defeated grid cutting result.Grid cutting unit is connected with bounding box setup module again simultaneously, and the latter provides initial mesh for the former
(i.e. bounding box itself) information and boundary information.
As shown in Figure 2 c, the hole identification module includes:Adjacent mesh recognition unit, the identification of inner/outer grid
Unit, hole location recognition unit.Wherein:Adjacent mesh recognition unit and inner/outer grid recognition unit and hole location
Recognition unit is connected and transmits adjacent mesh information respectively to it.Inner/outer grid recognition unit and hole location identification are single
Member connects and transmits inner/outer gridding information to it.Hole location recognition unit is connected with Path Recognition module and is carried to it
For hole location information.This module each unit is connected with mesh generation module simultaneously, and gridding information is derived from grid
The grid cutting result of division module.Inner/outer grid recognition unit is connected with bounding box setup module, and the latter passes to the former
Defeated starting point, outer boundary information.
As shown in Figure 2 d, the Path Recognition module includes:Route searching unit.Receive the letter of above three module
Breath is searched for the shortest path from starting point by each hole location to outer boundary (six faces of bounding box) and is protected
It deposits.This module path search unit is connected with bounding box setup module, mesh generation module and hole identification module respectively.The latter
Respectively starting point/outer boundary information, grid cutting result information, hole location information are inputted to it.
As shown in figure 4, for the signal of the specific implementation process of two-dimensional digital model leak position and leakage paths automatic identification
Figure, is expressed in two dimensions here for convenience of explanation.
Embodiment 2
Three-dimensional situation is similar to two dimension, is three-dimensional digital model to be detected, there are one holes in left side as shown in Figure 7a.This
Embodiment briefly explains realization process with three-dimensional digital-to-analogue.
As shown in figure 3, the present embodiment is as follows:
1st step wraps up mathematical model with a square bounding box first:The length of side that the bounding box is arranged is mathematical model
Length maximum value, and bounding box center is overlapped with the geometric center of mathematical model.
2nd step, it is starting point to be specified manually a little in mathematical model.
The three-dimensional digital model geometry of 3rd step, STL formats is made of triangular facet.Using octave device to all and triangle
The grid of intersection carries out primary.As shown in Figure 7b, it is the grid after cutting for several times.
All grids being newly syncopated as are divided into two classes by the 4th step, i.e., when the grid not with it is arbitrary in three-dimensional digital model
One triangular facet intersection is then labeled as abortive haul lattice (cannot differentiate at this time in digital-to-analogue or outside digital-to-analogue), and no longer cutting;Otherwise
Continue cutting labeled as fence net lattice and in next round.
5th step is searched for since starting point and is marked and the direct or indirect adjacent grid of the sub-grid comprising starting point
For abortive haul lattice in model.
The side is adjacent to be defined as, and in D coordinates value, two definite value coordinate values are equal, another coordinate should be:One
The start-stop range on side includes another start-stop range.When the start-stop value on one side is a1-a2, the coordinate value of another side is b1-b2,
It includes that (b1, b2) or (b1, b2) includes (a1, a2) that must so have (a1, a2).
The face is adjacent to refer to:Constant value coordinate is equal, other two coordinate value range includes mutually.If constant value coordinate value is
C, then it is respectively (d1, d2) and (e1, e2) that the two sides constant value coordinate, which is equal to second coordinate value of c., then must have (d1, d2)
Including (e1, e2) or (e1, e2) includes (d1, d2).The range of third coordinate is respectively (f1, f2) and (g1, g2), then must
It includes (g1, g2) to have (f1, f2), or (g1, g2) includes (f1, f2).
6th step carries out pathfinding since starting point along six faces of the interior abortive haul lattice of mathematical model to bounding box:When some
Interior abortive haul lattice are adjacent with any one or the outer space grid of mathematical model in six faces of bounding box, then mark the interior abortive haul lattice
For hole interstitial site, and it is fence net lattice to mark it, and no longer passes through the grid in pathfinding.
7th step repeats the 6th step, until having traversed all grids, calculates and preserve the shortest path of interior abortive haul lattice;
8th step, the grid that inwardly search is directly or indirectly connected therewith since six faces of bounding box are external abortive haul
Lattice are simultaneously marked.It checks whether that step number is given directions in arrival, then terminates when reaching.The 3rd step is returned to fence net lattice cutting one when not reaching
It is secondary, divided equally and continues the 4th~8 step.
As shown in Figure 7 c, it is leakage paths identification process schematic diagram.As shown in figure 7d, inner mesh is met with outer grid,
It can find in a model to the leakage paths outside model.Label and the adjacent interior grid of outer grid are hole location simultaneously.
As shown in figure 8, for the exemplary plot of certain Digital Automobile models holes gap identification.It can be seen from the figure that passing through this
Method can have found many lines, i.e. leakage paths in mathematical model.What the position that line intersects with mathematical model was marked
Exactly leak the position in hole gap.
Above-mentioned specific implementation can by those skilled in the art under the premise of without departing substantially from the principle of the invention and objective with difference
Mode carry out local directed complete set to it, protection scope of the present invention is subject to claims and not by above-mentioned specific implementation institute
Limit, each implementation within its scope is by the constraint of the present invention.