CN106875438B - A kind of method and system detecting STL format model file repeatability - Google Patents
A kind of method and system detecting STL format model file repeatability Download PDFInfo
- Publication number
- CN106875438B CN106875438B CN201710094004.4A CN201710094004A CN106875438B CN 106875438 B CN106875438 B CN 106875438B CN 201710094004 A CN201710094004 A CN 201710094004A CN 106875438 B CN106875438 B CN 106875438B
- Authority
- CN
- China
- Prior art keywords
- model
- stl format
- file
- model file
- ratio
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000001514 detection method Methods 0.000 claims abstract description 17
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000003491 array Methods 0.000 claims description 9
- 238000011156 evaluation Methods 0.000 claims description 9
- 238000003860 storage Methods 0.000 claims description 9
- 230000001186 cumulative effect Effects 0.000 claims description 6
- 230000001788 irregular Effects 0.000 claims description 5
- 238000007667 floating Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000012550 audit Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000010146 3D printing Methods 0.000 description 1
- 241000282693 Cercopithecidae Species 0.000 description 1
- 241000282376 Panthera tigris Species 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000011089 mechanical engineering Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Geometry (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The present invention relates to a kind of method and system for detecting STL format model file repeatability, belong to field of computer technology.Wherein, detection method includes: to obtain STL format model file;With the presence or absence of the equal boundaries scale model with STL format model file with equal boundary dimensions ratio in judgment models library, boundary dimensions ratio for model the ratio between the hexahedral boundary dimensions of envelope;If waiting boundaries scale model equal with the volume accounting of STL format model file, STL format model file is duplication model, and volume accounting is the ratio between volume and the hexahedral volume of its envelope of model.This method calculating process is simple and accuracy rate of testing result is high, can be widely used in threedimensional model processing technology field.
Description
Technical field
The present invention relates to field of computer technology, specifically, be related to it is a kind of detection STL format model file repeatability
Method and system.
Background technique
Universal with cloud manufacture and 3D printing concept, more and more websites start to provide user oriented free download
Model file.For example the websites such as manufacture cloud, evil spirit monkey 3D cloud platform, printing tiger both provide the free or payment m odel of all kinds of formats
File, user can be by the integrals that upload the model file of oneself to earn certain.
Due to the particularity of STL formatted file, i.e., after the operation such as simply being scaled, being rotated to same model, each three
The apex coordinate value of edged surface piece can change therewith.STL formatted file coding in this way after simple operations also just changes, part
User uploads identical model using this characteristic to earn integral.
Paper " research and realization of the components similitude based on mechanical resource pool " (" China Mechanical Engineering " 2006,
17 (12): 1257-1260.) disclosed in method be by comparing parts list information feature or attribute value it is similar to determine
Property, is not related to the shape of part, however model file for nonstandardized technique or can not then examine without the file of table information
It surveys.
It proposes in Master's thesis " three-dimensional CAD model matching and the research of search method " a kind of based on projected area
Threedimensional model matching process acquires the normal vector at grid vertex first, then to the triangulation method in all vertex neighborhoods
It is projected in plane, obtains the distribution series of a projected area, then advised by normalization and Fourier transformation
Generalized processing, finds out the feature vector of threedimensional model, carries out similarity calculation to different models using feature vector.This method needs
To pass through a large amount of calculation processing, it is inefficient, in addition, its accuracy rate is not high.
Summary of the invention
The main object of the present invention is to provide a kind of method convenient for detecting STL format model file repeatability;
Another object of the present invention is to provide a kind of system convenient for detecting STL format model file repeatability.
In order to achieve the above-mentioned main objectives, the method for detection STL formatted file repeatability provided by the invention includes: to obtain
STL format model file;There is equal boundary dimensions ratio with the presence or absence of with STL format model file in judgment models library
Equal boundaries scale model, boundary dimensions ratio are the ratio between the hexahedral boundary dimensions of envelope of model;If waiting boundaries scale model
Equal with the volume accounting of STL format model file, then STL format model file is duplication model, and volume accounting is model
The ratio between volume and the hexahedral volume of its envelope.
As can be seen from the above scheme, only need the when model of the hexahedral boundary dimensions of the envelope of computation model in its envelope six
Volume accounting in the body of face, and be compared with the model in model library, the repeatability of Most models can be detected,
Effectively improve the accuracy and reliability of the detection of STL format model file.
Specific scheme further include: if STL format model file is duplication model, show that STL format model file is
The prompt information of duplication model.
Another specific scheme further include: equal boundaries scale model or the equal boundaries there is no isometric accounting if it does not exist
Scale model then shows the prompting message of storage STL format model file;The response received for prompting message instructs;If ringing
It should instruct as store instruction, then it will be in STL format model file and its boundary dimensions ratio, volume accounting deposit model library.It is right
It in being be evaluated as non-duplicate STL format model file, can be stored according to the confirmation to prompting message, to combine artificial
Judge to be evaluated as non-duplicate model to avoid part duplication model.In addition, by boundary dimensions ratio, volume accounting and model one
It rises in deposit model library, effectively improves the speed of subsequent detection.
Another specific scheme is, if the calculating step of the ratio between boundary dimensions and volume accounting includes: that STL formatted file is
ASCII fromat file, then three data after traversing " vertex " character string are stored in X={ xi }, Y={ yi }, Z=respectively
In { zi } three arrays;If STL formatted file is binary format file, continuous three 4 of indicates coordinate value are directly read
Byte floating number is stored in tri- arrays of X, Y, Z respectively;It sorts respectively to array X, Y, Z and obtains the maximum value in each array
And minimum value, it is indicated respectively with subscript max and min;The hexahedral long l of envelope, the width w, high h of model are acquired according to the following formula
And volume V:l=xmax-xmin, w=ymax-ymin, h=zmax-zmin, V=l × w × h;It is calculated using irregular polyhedrons volume
The volume of formula computation model.It is effectively simplified calculation method, improves detection efficiency.
The step of more specific scheme is the volume using irregular polyhedrons volume calculation formula computation model includes: to build
Vertical three three-dimensional arrays P1, P2, P3 store the coordinate value on three vertex of a certain tri patch respectively;It obtains all three in model
Determinant corresponding to edged surface piece | P1 TP2 TP3 T| sum it is cumulative;The volume of model is cumulative 1/6th of the sum.Effectively
Calculation method is simplified, detection efficiency is improved.
Preferred scheme is that the ratio between boundary dimensions is the hexahedral length-width-ratio of envelope and the ratio between grows tall.Use two ratios
As the ratio between boundary dimensions, effective simplified calculation method.
To realize that above-mentioned another object, the system of detection STL formatted file repeatability provided by the invention, including acquisition are single
Member, judging unit and evaluation unit.Wherein, acquiring unit is for obtaining STL format model file;Judging unit is for judging mould
With the presence or absence of the equal boundaries scale model with STL format model file with equal boundary dimensions ratio, boundary ruler in type library
Very little ratio is the ratio between the hexahedral boundary dimensions of envelope of model;Evaluation unit is used to wait boundaries scale model and STL format
When the volume of model file accounts for equal, evaluation STL format model file is duplication model, and volume accounting is the volume of model and its
The ratio between hexahedral volume of envelope.
One specific scheme further includes prompt unit, for showing when STL format model file is duplication model
STL format model file is the prompt information of duplication model.
Another specific scheme further includes reminding unit, receiving unit and storage unit.Reminding unit is deposited for showing
Store up the prompting message of STL format model file;Receiving unit is used to receive the response instruction for prompting message;Storage unit is used
In being store instruction when response instruction, STL format model file and its boundary dimensions ratio, volume accounting are stored in model library
In.
Detailed description of the invention
Fig. 1 is the flow chart of the embodiment of the method for present invention detection STL format model file repeatability;
Fig. 2 is knob STL format detected in the embodiment of the method for present invention detection STL format model file repeatability
The distribution schematic diagram of the triangle gridding of model file;
Fig. 3 is knob STL format detected in the embodiment of the method for present invention detection STL format model file repeatability
The hexahedral schematic diagram of the envelope of model file;
Fig. 4 is the structural block diagram of the system embodiment of present invention detection STL format model file repeatability.
Specific embodiment
With reference to embodiments and its attached drawing the invention will be further described.
Embodiment
Referring to Fig. 1, the method for detecting STL format model file repeatability includes obtaining step S1, judgment step S2, evaluation
Step S3 and processing step S4.
Obtaining step S1 obtains STL format model file:
By taking knob STL format model file as shown in Figure 2 as an example, the knob model 01 is by several 02 structures of tri patch
At storing the apex coordinate value of each tri patch in its code file.
The step of obtaining the apex coordinate value of tri patch includes: the coded format that (1) determines STL formatted file, coding
Whether format, which contains " facet " character string according to document No., determines that it is ASCII fromat or binary format;(2) with C# language
For speech, BinaryReader class is used to read file if STL formatted file is binary system, if STL formatted file is ASCII
Type then uses StreamReader class to read file.
Judgment step S2 has equal boundary dimensions ratio with the presence or absence of with STL format model file in judgment models library
The equal boundaries scale model of example, boundary dimensions ratio for model the ratio between the hexahedral boundary dimensions of envelope.
As shown in figure 3, being the envelope hexahedron 03 of knob model 01, the hexahedral long l of envelope, the width of knob model are calculated
W, the process of high h are as follows:
(1) if STL formatted file is ASCII fromat file, three data after traversing " vertex " character string, difference
It is stored in X={ xi, Y={ yi, Z={ ziIn three arrays;If STL formatted file is binary format file, table is directly read
Show continuous three 4 byte floating numbers of coordinate value, is stored in tri- arrays of X, Y, Z respectively;
(2) sort respectively to array X, Y, Z and obtain the maxima and minima in each array, respectively with subscript max with
Min mark;The hexahedral long l of envelope, the width w, high h of model are acquired according to the following formula:
L=xmax-xmin;
W=ymax-ymin;
H=zmax-zmin。
For the ease of comparing, in the present embodiment, the ratio between hexahedral boundary dimensions of envelope is selected as the hexahedral length of envelope
The ratio between width l:w and l:h that the ratio between grows tall.
The process for judging whether there is equal boundaries scale model is the model compared in the knob model and model library one by one
Length-width-ratio l:w, compare the l:h that the ratio between grows tall again if length-width-ratio l:w is identical, if length-width-ratio and the ratio between growing tall homogeneous
Deng then in the presence of the boundaries scale model such as identical with rotating model in comparison database.
Evaluation procedure S3 evaluates STL if waiting boundaries scale model equal with the volume accounting of STL format model file
Format model file is duplication model, and volume accounting is the ratio between volume and the hexahedral volume of its envelope of model.
Following formula computation model packet is used using the hexahedral long l of envelope acquired in judgment step S2, width w and high h
The hexahedral volume of network:
V=l × w × h
The volume of knob model is calculated using irregular polyhedrons volume calculation formula, it is assumed that i-th of convex polyhedron
Vertex is Ai, then polyhedral volume calculation formula is as follows:
Wherein, ∑ d (A0A1…An) refer to after polyhedral surface to be divided into several triangle griddings, each tri patch
Three apex coordinate values constitute three rank determinants sum.
That is, the calculating process is that (1) establishes three that three three-dimensional arrays P1, P2, P3 store a certain tri patch respectively
The coordinate value on vertex;(2) determinant corresponding to all tri patch in model is obtained | P1 TP2 TP3 T| sum it is cumulative;(3) knob
The volume of model is cumulative 1/6th of the sum.
By identified in above-mentioned judgment step etc. boundary dimensions scale model volume accounting and this knob model body
Product accounting is compared, as fruit volume accounting is equal, then it is assumed that the knob model is duplication model, wherein volume accounting is mould
The ratio between the volume of type and the hexahedral volume of its envelope.
Processing step S4, including prompt step, prompting step, receiving step, storing step and deletion step.
Prompt step shows that STL format model file is duplication model if STL format model file is duplication model
Prompt information.
By showing the prompt information to model uploader, prompts user to upload duplicate model, do not store the mould
Type.
Step is reminded, if it does not exist equal boundaries scale model or the equal boundaries scale model there is no isometric accounting, then
The prompting message of display storage knob STL format model file.
The prompting message is shown to administrator, to wait administrator to audit.
Receiving step, the response received for prompting message instruct.
If administrator's audit passes through, the response instruction received is store instruction, passes through if not auditing, receives
Response instruction for delete instruction.
Storing step, if response instruction is store instruction, by knob STL format model file and its boundary dimensions ratio
In example, volume accounting deposit model library.
Step is deleted, if response instruction deletes the model of upload and notify uploader to delete instruction.
Referring to fig. 4, the system 10 for detecting STL formatted file repeatability includes acquiring unit 11, judging unit 12, evaluation list
Member 13, prompt unit 14, reminding unit 15, receiving unit 16 and storage unit 17.
Acquiring unit 11 is used to obtain the STL format model file of model to be detected;
Judging unit 12 is for having equal boundary dimensions with the presence or absence of with STL format model file in judgment models library
The equal boundaries scale model of ratio;Boundary dimensions ratio is the ratio between the hexahedral boundary dimensions of envelope of model;
Evaluation unit 13 is used for the evaluation when waiting boundaries scale model equal with the volume accounting of STL format model file
STL format model file is duplication model, and volume accounting is the ratio between volume and the hexahedral volume of its envelope of model;
Prompt unit 14 is used for when STL format model file is duplication model, and display STL format model file is to repeat
The prompt information of model;
Reminding unit 15 is used to show the prompting message of storage STL format model file;
Receiving unit 16 is used to receive the response instruction for prompting message;
Storage unit 17 is used to when response instruction be store instruction, by STL format model file and its boundary dimensions ratio,
Volume accounting is stored in model library.
The specific operation process of these units is identical as method, and details are not described herein.
In addition, in this application, STL format model file, stl file, model file, model be to same target not
Same appellation.
Claims (9)
1. a kind of method for detecting STL format model file repeatability characterized by comprising
Obtain the STL format model file;
With the presence or absence of the equal boundaries ratio with the STL format model file with equal boundary dimensions ratio in judgment models library
Example model, the boundary dimensions ratio are the ratio between the hexahedral boundary dimensions of envelope of model;
If the equal boundaries scale model is equal with the volume accounting of the STL format model file, the STL format model
File is duplication model, and the volume accounting is the ratio between volume and the hexahedral volume of its envelope of model.
2. the method for detection STL format model file repeatability according to claim 1, which is characterized in that further include:
If the STL format model file is duplication model, show that the STL format model file is the prompt of duplication model
Information.
3. the method for detection STL format model file repeatability according to claim 1, which is characterized in that further include:
Equal boundaries scale model or the equal boundaries scale model there is no isometric accounting if it does not exist, then show described in storage
The prompting message of STL format model file;
The response received for the prompting message instructs;
If the response instruction is store instruction, by the STL format model file and its boundary dimensions ratio, volume accounting
It is stored in the model library.
4. the method for detection STL format model file repeatability according to claim 1, which is characterized in that the boundary
The ratio between size and the calculating step of volume accounting include:
If STL formatted file is ASCII fromat file, three data after traversing " vertex " character string are stored in X=respectively
{xi, Y={ yi, Z={ ziIn three arrays;
If STL formatted file is binary format file, continuous three 4 byte floating numbers of indicates coordinate value are directly read,
It is stored in tri- arrays of X, Y, Z respectively;
It sorts respectively to array X, Y, Z and obtains the maxima and minima in each array, identified respectively with subscript max and min;
The hexahedral long l of envelope, width w, high h and the volume V of model are acquired according to the following formula:
L=xmax-xmin,
W=ymax-ymin,
H=zmax-zmin,
V=l × w × h;
Utilize the volume of irregular polyhedrons volume calculation formula computation model.
5. the method for detection STL format model file repeatability according to claim 4, which is characterized in that the utilization
The step of volume of irregular polyhedrons volume calculation formula computation model includes:
Establish the coordinate value that three three-dimensional arrays P1, P2, P3 store three vertex of a certain tri patch respectively;
Obtain determinant corresponding to all tri patch in model | P1 TP2 TP3 T| sum it is cumulative;
The volume of model is cumulative 1/6th of the sum.
6. the method for detection STL format model file repeatability according to any one of claims 1 to 5, feature exist
In:
The ratio between described boundary dimensions is the hexahedral length-width-ratio of envelope and the ratio between grows tall.
7. a kind of system for detecting STL format model file repeatability characterized by comprising
Acquiring unit, for obtaining the STL format model file;
Judging unit, for there is equal boundary dimensions with the presence or absence of with the STL format model file in judgment models library
The equal boundaries scale model of ratio, the boundary dimensions ratio are the ratio between the hexahedral boundary dimensions of envelope of model;
Evaluation unit, for commenting when the boundaries scale model such as described is equal with the volume accounting of the STL format model file
STL format model file described in valence is duplication model, and the volume accounting is the volume and the hexahedral volume of its envelope of model
The ratio between.
8. detecting the system of STL format model file repeatability according to claim 7, it is characterised in that:
It further include prompt unit, for showing the STL format model when the STL format model file is duplication model
File is the prompt information for repeating model file.
9. detecting the system of STL format model file repeatability according to claim 7, it is characterised in that:
It further include reminding unit, for showing the prompting message for storing the STL format model file;
Receiving unit, for receiving the response instruction for being directed to the prompting message;
Storage unit, for being store instruction when response instruction, by the STL format model file and its boundary dimensions ratio
Example, volume accounting are stored in the model library.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710094004.4A CN106875438B (en) | 2017-02-21 | 2017-02-21 | A kind of method and system detecting STL format model file repeatability |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710094004.4A CN106875438B (en) | 2017-02-21 | 2017-02-21 | A kind of method and system detecting STL format model file repeatability |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106875438A CN106875438A (en) | 2017-06-20 |
CN106875438B true CN106875438B (en) | 2019-05-28 |
Family
ID=59166695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710094004.4A Active CN106875438B (en) | 2017-02-21 | 2017-02-21 | A kind of method and system detecting STL format model file repeatability |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106875438B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165669B (en) * | 2018-07-09 | 2021-11-16 | 浙江大学 | Three-dimensional patch model file similarity detection method based on model identification code |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1710607A (en) * | 2005-07-08 | 2005-12-21 | 北京航空航天大学 | 3-D scene organization method facing to virtual reality 3-D picture engine |
CN101794290B (en) * | 2009-12-30 | 2011-12-28 | 清华大学 | Colour three-dimensional model search method based on vision cognitive characteristic |
CN103942748B (en) * | 2014-05-13 | 2017-07-11 | 英华达(上海)科技有限公司 | A kind of guard method of threedimensional model file and its system |
CN105741355B (en) * | 2016-02-01 | 2018-05-25 | 华侨大学 | A kind of block dividing method of triangle grid model |
-
2017
- 2017-02-21 CN CN201710094004.4A patent/CN106875438B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106875438A (en) | 2017-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Pickup et al. | Shape retrieval of non-rigid 3d human models | |
WO2019157924A1 (en) | Real-time detection method and system for three-dimensional object | |
Kazmi et al. | A survey of 2D and 3D shape descriptors | |
WO2020168767A1 (en) | Determination of geo-fence based on user position | |
CN102254015B (en) | Image retrieval method based on visual phrases | |
CN110019914B (en) | Three-dimensional model database retrieval method supporting three-dimensional scene interaction | |
CN106484692B (en) | A kind of method for searching three-dimension model | |
CN101477529B (en) | Three-dimensional object retrieval method and apparatus | |
CN106600700B (en) | Three-dimensional model data processing system | |
JP2008527473A (en) | 3D model search method, search device, and search program | |
TW202217662A (en) | Visual positioning method, training method of related models, electronic device and computer-readable storage medium | |
CN102663087A (en) | Three-dimensional model search method based on topology and visual feature | |
CN111522968A (en) | Knowledge graph fusion method and device | |
Pratikakis et al. | SHREC’16 track: Partial shape queries for 3d object retrieval | |
CN106875438B (en) | A kind of method and system detecting STL format model file repeatability | |
Ertugrul et al. | Embedding 3D models in offline physical environments | |
CN111582967A (en) | Content search method, device, equipment and storage medium | |
CN111611935B (en) | Automatic identification method for similar vector diagrams in CAD drawing | |
CN107016732A (en) | Positioned using the 3D objects of descriptor | |
CN110910463B (en) | Full-view-point cloud data fixed-length ordered encoding method and equipment and storage medium | |
CN102110159B (en) | CAD three-dimensional model retrieval method and system | |
CN116091570A (en) | Processing method and device of three-dimensional model, electronic equipment and storage medium | |
CN103631993B (en) | Threedimensional model boundary line based on VRML technology extracting method | |
CN104965928A (en) | Chinese character image retrieval method based on shape matching | |
CN109446408A (en) | Retrieve method, apparatus, equipment and the computer readable storage medium of set of metadata of similar data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |