CN103838907A - Curved surface cutting trajectory obtaining method based on STL model - Google Patents
Curved surface cutting trajectory obtaining method based on STL model Download PDFInfo
- Publication number
- CN103838907A CN103838907A CN201310416921.1A CN201310416921A CN103838907A CN 103838907 A CN103838907 A CN 103838907A CN 201310416921 A CN201310416921 A CN 201310416921A CN 103838907 A CN103838907 A CN 103838907A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- cut surface
- tri patch
- value
- curved surface
- 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.)
- Pending
Links
Images
Landscapes
- Numerical Control (AREA)
Abstract
The invention relates to a curved surface cutting trajectory obtaining method based on an STL model. The method comprises the steps that (1) all cut surface coordinate sets are determined according to the highest point and the lowest point of the model; (2) a cut surface is positioned, wherein triangular patch coordinates are used for positioning the index value of the corresponding cut surface in the coordinate set according to a hash function, and cut surface coordinates with an intersection point are obtained through the index value; (3) the intersection points of the cut surface and triangular patches are calculated to obtain section lines; (4) the section lines are ranked to obtain a cutting trajectory. According to the curved surface cutting trajectory obtaining method, in the layering process, each triangular patch is only visited once, and no complex topology structure needs to be built for the read triangular patches. After offset is conducted on the obtained curved surface cutting trajectory, the curved surface cutting trajectory can be used for generating a numerical control ring cutting machining tool path.
Description
Technical field
Patent of the present invention relates to a kind of new STL(tri patch model surface expression format) the quick curved surface cutting track obtaining method of model, it is applicable to the generation of the ring cutting Machining Path based on STL model.
Background technology
Due to the development of CAD/CAM technology and reverse Engineering Technology, stl file directly applies to digital control processing more and more.Its general process comprises the double teacher shown in Fig. 1.This algorithm is realized the process that obtains initial surface cutting track from STL model, how fast STL model to be carried out to layering, and connection obtains orderly individual-layer data.
Common STL model hierarchical algorithm is mainly that the set of traversal model intermediate cam dough sheet judges whether tri patch exists section line with cut surface.When the method runs into larger STL model, the processing time is long and exist and obtain cutting track failure while easily causing layering wrong in the situation that at STL model.
Summary of the invention
The object of invention is the defect existing for prior art; a kind of curved surface cutting track obtaining method based on STL model is provided, and the method is comparatively easy, and the running time is shorter; easily succeed, the curved surface cutting track obtaining is by can be used to generate the cutter path of numerical control ring cutting processing after setovering.For achieving the above object, design of the present invention is: former method is all the tri patch in search STL model, finds the tri patch that has focus with cut surface.This method is just contrary, and it first determines all cut surface coordinate sets, then removes to search corresponding cut surface and calculates section line with tri patch coordinate.For convenience of this search process, this algorithm is expressed as cut surface coordinate a kind of data structure of similar hash table.For convenience of discussing, we carry out layering with the plane of parallel Z axis to stl file, and the layered approach of other axle is similar.And set up naming convention as follows:
(4)
,
represent respectively j point of i tri patch (x, y, z) coordinate;
(6) [x] represents x to carry out rounding operation, max{
represent to get maximal value, min{
represent to get minimum value, mid{
represent to get intermediate value.
Performing step is as follows:
The first step: the foundation of the acquisition of cut surface and class hash table
Each layer of cut surface coordinate of hash table storage.For setting up hash table, first need to obtain cut coverage, i.e. max{Z} and min{Z}, this step can complete in STL read-in process.Because we are taking the plane of parallel z axle as cutting planes, the formula of cutting planes is:
We start A to cut from min{Z}, suppose that layering is spaced apart d, and the hash function of available formula (2) determines that hash table is every:
(2)
(2) due to each cutting planes can be corresponding one group of cutting result, therefore also need that each adds a pointer to hash table, to point to container corresponding to cutting result, aforesaid way can be with representation shown in Fig. 2.
Second step: positional dissection face
The process of positional dissection face is to get respectively tri patch by storage order from A, passes through the quick positional dissection face of hash function in T.
Due to each s in T
ithere is its corresponding sequence number i, therefore, as long as determine the value of i, just can obtain cutting coordinate s
ivalue, we know that straight line is crossing with tri patch just like 9 kinds of situations shown in a ~ i in Fig. 3.
We are taking j tri patch as example, as j tri patch and s
iexist intersection point must meet formula (3).
(4)
Because i is integer, therefore we get
, as long as now meet formula (5).In addition, have in addition the situation of large tri patch, tri patch may be cut to by multiple cutting planes, as shown in j in Fig. 3.Now remain and first try to achieve first i value, then i is carried out from add-one operation, and pass through formula
judge whether to meet the demands.Repeat said process until the condition in formula (5) does not meet.Its process flow diagram as shown in Figure 4.
The 3rd step: the intersection point that calculates cut surface and tri patch obtains section line
Obtain
value after, the intersection point that can calculate section and tri patch by formula (6) obtain section line:
Wherein Z
sfor cutting planes coordinate, (x
0, y
0, z
0), (x
1, y
1, z
1) be the two-end-point coordinate that has the limit of intersection point with cut surface.
The 4th step: the connection of ring
After having cut as stated above, what obtain is unordered a serial of line sections, and generally this unordered sequence can connect into one to multiple independently rings.The link respectively every one deck being encircled in implementation procedure, and by relatively whether thering is identical end points between each layer line section undertaken, and remove the end points of repetition.
Suppose that in every one deck, unordered sequence is S1, the ordered sequence after sequence is S2.Sequencer procedure is: in S1, get arbitrarily a line segment L1:
, be put in S2, then in S1, search with L1 and there is same summit
line segment L2:
, now due to point
already in S2, therefore only need in S1, take out L2 and by point
deposit in S2, and then with
as the new object of searching, in S1, search.Until can not find the situation with same endpoints.
If now still there is unsorted line segment in S1, there is the situation of multiple rings in explanation.Continue this process until S1 is sky.
The curved surface cutting track now obtaining, can generate the cutter path that numerical control ring cutting is processed after it is setovered.
According to foregoing invention design, the present invention adopts following technical proposals:
Based on a curved surface cutting track obtaining method for STL model, it is characterized in that operation steps is as follows:
1) determine all cut surface coordinate sets according to the highs and lows of model;
2) positional dissection face: remove to locate the rope of corresponding cut surface in coordinate set according to hash function with tri patch coordinate
Draw value, obtain existing the cut surface coordinate of intersection point by this index value;
3) intersection point of calculating cut surface and tri patch obtains section line;
4) section line is sorted and obtains cutting track; Its applicable STL model is CATIA, the CAD Software Creates such as UG
The tri patch surface model that meets STL standard format of any shape.
Described step 1) determines that according to highs and lows all cut surface coordinate sets are to adopt formula
realize; Wherein min{Z}, max{Z} represent respectively highs and lows coordinate Z value, and d represents lift height,
represent the Z value coordinate of the i layer cut surface of gained.
Described step 2) the hash function formula described in the process of positional dissection face is
,
Wherein d is lift height, and min{Z} is minimum point coordinate Z value,
represent the minimum value of three summit Z coordinates of j tri patch, i represents the index value of required cut surface; In the time that tri patch may be cut to by multiple cutting planes, i is carried out from add-one operation, and pass through formula
judge,, in the time that meeting, formula obtains new index value, repeat this process until this formula does not meet, wherein
represent the maximal value of three summit Z coordinates of j tri patch,
represent the Z value coordinate of the i layer cut surface of gained.
The intersection point that described step 3) is calculated cut surface and tri patch is to adopt formula
realize;
Wherein
for cutting planes coordinate, (x0, y0, z0), for there is the two-end-point coordinate on the limit of intersection point in tri patch with cut surface in (x1, y1, z1).
Described step 4) is the company respectively every one deck being encircled to the section line implementation that obtains cutting track that sorts
Connect, and by relatively whether thering is identical end points between each layer line section undertaken, and remove the end points of repetition; Suppose that in every one deck, unordered sequence is S1, the ordered sequence after sequence is S2, and sequencer procedure is, line taking section L1 arbitrarily in S1:
, be put in S2, then in S1, search with L1 and there is same summit
line segment L2:
, now due to point
already in S2, therefore only need in S1, take out L2 and by point
deposit in S2, and then with
as the new object of searching, in S1, search, until can not find the situation with same endpoints; If now still exist unsorted line segment that the situation that has multiple rings is described in S1, continue this process until S1 is sky.
The present invention compared with prior art, has following apparent outstanding substantive distinguishing features and significantly technical progress: the present invention first determines all cut surface coordinate sets, then removes to search corresponding cut surface and calculates section line with tri patch coordinate.For convenience of this search process, this algorithm is expressed as cut surface coordinate a kind of data structure of similar hash table.This method each tri patch in delaminating process is only once accessed, and does not need the tri patch to reading in to set up complicated topological structure.This method is comparatively easy, and the running time is shorter, easily succeeds.
Brief description of the drawings
Fig. 1 is the process that STL ring cutting processing numerical control code generates.
Fig. 2 is the hash table structural drawing that this algorithm adopts in delaminating process.
Fig. 3 is the tri patch various situations crossing with cut surface.
Fig. 4 is the program flow diagram of the calculating of section line.
Fig. 5 is the intersection point relationship example crossing with tri patch.
Fig. 6 is that the OpenGL of STL model example shows.
Fig. 7 is that the OpenGL of the surface profile after STL layering shows and processing exemplar.
Embodiment
The preferred embodiments of the present invention, are described with reference to the accompanying drawings as follows:
Referring to Fig. 6, this curved surface cutting track obtaining method based on STL model, lift height is 0.01, the performing step of this method is as follows:
1. read in this STL model file, in the read-in process of each tri patch, the each tri patch coordinate figure of this model is entered
Row is analyzed, and the z value that obtains this model peak is 21.7, and the coordinate figure of minimum point is 2.0.Bring in formula (2)
, obtain cut surface coordinate set for 2.00,2.01,2.02,
21.07}.
Obtain the value of i, and obtain the coordinate of its corresponding cut surface.Such as a dough sheet coordinate in stl file is { (0.89,0.02,16.00), (1.15,0.02,21.00), (1.61,2.96,21.00) }, its minimum z value coordinate is 16.00,
=1401, obtaining the crossing cutting plane coordinate of tri patch therewith according to this index is z=16.01.Now directly calculate the intersection point of cutting plane and tri patch.
Again i is carried out obtaining i=1402 from add-one operation, obtaining new cutting plane coordinate by this index is z=16.02, and the maximum z value of tri patch is 21.00>16.02, therefore still meet the demands, until in the time that i value is 1901, now cutting plane coordinate is z=21.01, has been greater than the maximum z value of tri patch, and now the crossing cutting plane of all tri patchs is therewith all processed in expression.
3. repeating step 2, until all tri patchs had all been traversed once in stl file.Now can obtain the set of all intersections.
4. what obtain by above-mentioned steps is the set of unordered line segment, and now, the connection encircling by method described in step 4 can obtain net result.That realizes by this algorithm the results are shown in Figure shown in 7 (a), and its OpenGL that is the surface profile after layering for stl file in Fig. 6 shows.
After the cutting track generating is setovered, can obtain numerical control ring cutting machining path, Fig. 7 (b) is processing exemplar.
The content not being described in detail in this instructions belongs to the known prior art of professional and technical personnel in the field.
Claims (5)
1. the curved surface cutting track obtaining method based on STL model, is characterized in that operation steps is as follows:
1) determine all cut surface coordinate sets according to the highs and lows of model;
2) positional dissection face: remove to locate the rope of corresponding cut surface in coordinate set according to hash function with tri patch coordinate
Draw value, obtain existing the cut surface coordinate of intersection point by this index value;
3) intersection point of calculating cut surface and tri patch obtains section line;
4) section line is sorted and obtains cutting track; Its applicable STL model is CATIA, the CAD Software Creates such as UG
The tri patch surface model that meets STL standard format of any shape.
2. the curved surface cutting track obtaining method based on STL model according to claim 1, is characterized in that: described step 1) determines that according to highs and lows all cut surface coordinate sets are to adopt formula
realize; Wherein min{Z}, max{Z} represent respectively highs and lows coordinate Z value, and d represents lift height,
represent the Z value coordinate of the i layer cut surface of gained.
3. the curved surface cutting track obtaining method based on STL model according to claim 1, is characterized in that: described step 2) the hash function formula described in the process of positional dissection face is
, wherein d is lift height, min{Z} is minimum point coordinate Z value,
represent the minimum value of three summit Z coordinates of j tri patch, i represents the index value of required cut surface; In the time that tri patch may be cut to by multiple cutting planes, i is carried out from add-one operation, and pass through formula
judge,, in the time that meeting, formula obtains new index value, repeat this process until this formula does not meet, wherein
represent the maximal value of three summit Z coordinates of j tri patch,
represent the Z value coordinate of the i layer cut surface of gained.
4. the curved surface cutting track obtaining method based on STL model according to claim 1, is characterized in that: described step
5. the curved surface cutting track obtaining method based on STL model according to claim 1, it is characterized in that: described step 4) is the connection respectively every one deck being encircled to the section line implementation that obtains cutting track that sorts, and by relatively whether thering is identical end points between each layer line section undertaken, and remove the end points of repetition; Suppose that in every one deck, unordered sequence is S1, the ordered sequence after sequence is S2, and sequencer procedure is, line taking section L1 arbitrarily in S1:
, be put in S2, then in S1, search with L1 and there is same summit
line segment L2:
, now due to point
already in S2, therefore only need in S1, take out L2 and by point
deposit in S2, and then with
as the new object of searching, in S1, search, until can not find the situation with same endpoints; If now still exist unsorted line segment that the situation that has multiple rings is described in S1, continue this process until S1 is sky.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310416921.1A CN103838907A (en) | 2013-09-13 | 2013-09-13 | Curved surface cutting trajectory obtaining method based on STL model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310416921.1A CN103838907A (en) | 2013-09-13 | 2013-09-13 | Curved surface cutting trajectory obtaining method based on STL model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103838907A true CN103838907A (en) | 2014-06-04 |
Family
ID=50802400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310416921.1A Pending CN103838907A (en) | 2013-09-13 | 2013-09-13 | Curved surface cutting trajectory obtaining method based on STL model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103838907A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392030A (en) * | 2014-11-12 | 2015-03-04 | 常州工学院 | Curved surface machining method based on STL (Standard Template Library) three-dimensional model |
CN104525668A (en) * | 2014-11-12 | 2015-04-22 | 常州工学院 | Punch height regulation method for multi-point forming processing of curve surfaces |
CN106446472A (en) * | 2016-11-16 | 2017-02-22 | 清华大学 | STL-model-based intersection loop calculation algorithm for numerical control machining geometrical simulation |
CN107037738A (en) * | 2016-11-16 | 2017-08-11 | 清华大学 | The material based on STL models removes algorithm in geometry Simulation of NC Machining |
CN109325316A (en) * | 2018-11-15 | 2019-02-12 | 南京理工大学 | STL model efficient parallel based on concurrent welding sequence cuts layer method |
CN109934923A (en) * | 2017-12-15 | 2019-06-25 | 中国科学院沈阳自动化研究所 | Model layers and track fill method suitable for biomaterial 3D printing |
CN110356008A (en) * | 2019-07-03 | 2019-10-22 | 浙江大学 | A kind of quick joining method of line segment at random based on Hash table |
CN115555914A (en) * | 2022-09-26 | 2023-01-03 | 上海铼钠克数控科技有限公司 | Planning method and device for numerical control machining tool path |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101225507A (en) * | 2008-01-25 | 2008-07-23 | 北京邮电大学 | Curved surface cutting track obtaining method based on STL file |
US20080246762A1 (en) * | 2005-12-28 | 2008-10-09 | Toyota Jidosha Kabushiki Kaisha | Method for Generating Three-Dimensional Shape Data, Apparatus for Generating Three-Dimensional Shape Data, and Three-Dimensional Shape Data Generating Program |
CN103064343A (en) * | 2012-12-19 | 2013-04-24 | 华南理工大学 | Track generating method facing toward complex curved surface processing and track generating system thereof |
-
2013
- 2013-09-13 CN CN201310416921.1A patent/CN103838907A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080246762A1 (en) * | 2005-12-28 | 2008-10-09 | Toyota Jidosha Kabushiki Kaisha | Method for Generating Three-Dimensional Shape Data, Apparatus for Generating Three-Dimensional Shape Data, and Three-Dimensional Shape Data Generating Program |
CN101225507A (en) * | 2008-01-25 | 2008-07-23 | 北京邮电大学 | Curved surface cutting track obtaining method based on STL file |
CN103064343A (en) * | 2012-12-19 | 2013-04-24 | 华南理工大学 | Track generating method facing toward complex curved surface processing and track generating system thereof |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392030B (en) * | 2014-11-12 | 2017-05-03 | 常州工学院 | Curved surface machining method based on STL (Standard Template Library) three-dimensional model |
CN104525668A (en) * | 2014-11-12 | 2015-04-22 | 常州工学院 | Punch height regulation method for multi-point forming processing of curve surfaces |
CN104392030A (en) * | 2014-11-12 | 2015-03-04 | 常州工学院 | Curved surface machining method based on STL (Standard Template Library) three-dimensional model |
CN106446472B (en) * | 2016-11-16 | 2019-05-21 | 清华大学 | Intersection ring acquiring method in geometry Simulation of NC Machining based on STL model |
CN107037738A (en) * | 2016-11-16 | 2017-08-11 | 清华大学 | The material based on STL models removes algorithm in geometry Simulation of NC Machining |
CN106446472A (en) * | 2016-11-16 | 2017-02-22 | 清华大学 | STL-model-based intersection loop calculation algorithm for numerical control machining geometrical simulation |
CN107037738B (en) * | 2016-11-16 | 2019-09-27 | 清华大学 | Material removal method based on STL model in geometry Simulation of NC Machining |
CN109934923A (en) * | 2017-12-15 | 2019-06-25 | 中国科学院沈阳自动化研究所 | Model layers and track fill method suitable for biomaterial 3D printing |
CN109934923B (en) * | 2017-12-15 | 2022-10-11 | 中国科学院沈阳自动化研究所 | Model layering and track filling method suitable for 3D printing of biological material |
CN109325316A (en) * | 2018-11-15 | 2019-02-12 | 南京理工大学 | STL model efficient parallel based on concurrent welding sequence cuts layer method |
CN109325316B (en) * | 2018-11-15 | 2020-05-26 | 南京理工大学 | STL model efficient parallel layer cutting method based on concurrent welding sequencing |
CN110356008A (en) * | 2019-07-03 | 2019-10-22 | 浙江大学 | A kind of quick joining method of line segment at random based on Hash table |
CN115555914A (en) * | 2022-09-26 | 2023-01-03 | 上海铼钠克数控科技有限公司 | Planning method and device for numerical control machining tool path |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103838907A (en) | Curved surface cutting trajectory obtaining method based on STL model | |
CN111709092B (en) | Radial tire tread pattern finite element automatic modeling method based on finite element unit nodes | |
CN105242538B (en) | Part multi-processing process MBD models and implementation method based on figure layer | |
CN105354353A (en) | MBD model based processing feature identification and modeling method | |
CN102306396A (en) | Three-dimensional entity model surface finite element mesh automatic generation method | |
CN101515168B (en) | Method for generating ring-cutting roughing NC tool path of product triangular mesh model | |
CN104091005B (en) | A kind of Overhead Line Project measures indoor and field integration system | |
CN105844067B (en) | A kind of hull curve plate welding becomes the acquisition methods of the automatic process data of groove | |
CN101403909B (en) | Triangular gridding subdivision curved surface NC tool track fast generation method | |
CN110516004A (en) | Visualization method and system giving consideration to information global characteristics and local hierarchical structure | |
CN106903889A (en) | A kind of rapid section algorithm of STL models | |
CN102013114B (en) | Microstation v8i-based city rapid-modeling method | |
CN109325316B (en) | STL model efficient parallel layer cutting method based on concurrent welding sequencing | |
CN102881039A (en) | Method for building three-dimensional vector models of trees based on three-dimensional laser scanning data | |
CN106910140B (en) | SVG format-based power system wiring diagram network topology analysis method | |
CN110955934B (en) | Cutting simulation implementation method for real-time processing monitoring | |
CN103077255B (en) | Identification method and system for 3D (three-dimensional) model of nuclear power station | |
CN110795835A (en) | Three-dimensional process model reverse generation method based on automatic synchronous modeling | |
CN104143214A (en) | Electronic map polygon triangulation method and device | |
CN114398691B (en) | Intelligent design method and equipment for two-dimensional view of tire mold | |
CN105785919B (en) | Point five axis of cloud is without global interference generating tool axis vector feasible zone computational methods | |
CN105631465A (en) | Density peak-based high-efficiency hierarchical clustering method | |
CN104090945A (en) | Geographic space entity constructing method and system | |
CN104537254A (en) | Fine drawing method based on social statistical data | |
CN104778308B (en) | The recognition methods of aircaft configuration section bar and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140604 |