CN107564103A - A kind of boolean union method of three-dimensional planar entity - Google Patents

A kind of boolean union method of three-dimensional planar entity Download PDF

Info

Publication number
CN107564103A
CN107564103A CN201710711666.1A CN201710711666A CN107564103A CN 107564103 A CN107564103 A CN 107564103A CN 201710711666 A CN201710711666 A CN 201710711666A CN 107564103 A CN107564103 A CN 107564103A
Authority
CN
China
Prior art keywords
face
list
entity
inner ring
point
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.)
Granted
Application number
CN201710711666.1A
Other languages
Chinese (zh)
Other versions
CN107564103B (en
Inventor
许社教
杜美玲
吉王博
邱扬
田锦
朱言午
张建国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN201710711666.1A priority Critical patent/CN107564103B/en
Publication of CN107564103A publication Critical patent/CN107564103A/en
Application granted granted Critical
Publication of CN107564103B publication Critical patent/CN107564103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of boolean's union method of three-dimensional planar entity, its basic thought is:For each face in entity A, if the face is completely outside entity B, the face is then preserved, if the face and the face of entity B are coplanar in the same direction and are not inner ring surfaces, the two faces carry out two-dimentional boolean's union, preserve operation result, if the face is not belonging to above-mentioned two situations, entity B is cut off with the face, obtains section polygon, two-dimentional boolean's difference operation is carried out with the face and section polygon, preserves operation result;Switching entity A and entity B, do same processing;Delete the post processing in the face of repetition, deletion suspension face and face merging to the result of preservation, finally give entity A and the result of entity B boolean's union.The present invention has the advantages that simple and easy, algorithm logic tightly and geometry completeness is good, algorithm operation quantity is small, the d solid modeling available for fields such as CAD, CAM, CAE, computer animation, virtual reality, 3D printings.

Description

A kind of boolean union method of three-dimensional planar entity
Technical field
The invention belongs to computer graphics techniques field, it is related to a kind of boolean's union method of three-dimensional planar entity, Specifically two three-dimensional planar entities are by boolean's union to obtain the method for new 3D solid.
Background technology
Boolean's union is one of core algorithm of three-dimensional planar solid Boolean, available for CAD, CAM, CAE, calculating The d solid modeling in the fields such as motor-driven picture, virtual reality, 3D printing.
With the continuous development of computer graphics, particularly three-dimensional visualization, virtual reality technology, 3D printing technique etc. Fast development, the dimensional Modeling Technology with independent intellectual property right turned into the active demand of numerous areas, and has been based on boolean The d solid modeling technology of computing is the most important thing.The Boolean calculation of 3D solid includes union, difference operation and ships calculation. In modeling practice, calculation is shipped using seldom, and union and difference operation use more.Entity boolean union constructs as a kind of The Main Means of physical model, have in the formation of die body shape, model seamless connection and splicing of model etc. wide General application.It is additionally, since the basis that two-dimentional Boolean calculation is three-dimensional Boolean calculation, it is contemplated that two X-Y schemes A and B difference Computing (-) can be converted to union (+), i.e. A-B=A+ (- B), and therefore, union is the basis of difference operation again.From theoretical and From the aspect of practice, the research for 3D solid boolean's union, there is important academic significance and application value.
3D solid Boolean calculation is very ripe in business software, but its implementation is rarely found on open source literature Arrive.From practical standpoint, BRep (boundary representation) method is the main implementation of three-dimensional Boolean calculation.BRep methods are to use It is all aobvious that points, edges, faces, ring and syntople mutual between them define 3D solid, solid object surface, boundary line, intersection etc. Formula provides, and participates in the entity that geometric element processing and computing obtain in the entity of Boolean calculation, computing and all uses BRep forms. Because curved surface can be by Plane surface approximation, therefore the Boolean calculation between Plane Entity is to realize the complicated entity including curved surface The basis of modeling.
The open source literature of 3D solid Boolean calculation of the research based on BRep forms is less at present.Document " computer graphical Learn " (publishing house of Tsing-Hua University, nineteen ninety-five August, author:Sun Jiaguang) describe Muuss and Butler " asking in proposition in 1991 Hand over shared, classification, merger " non-canonical three-dimensional body boolean operation method, i.e., first face face asks friendship, Euler is utilized by boundary of intersection Operator carries out topology reconstruction to two face rings, and then each point, side, ring geometric element and another body physically is carried out Match stop, with determine these geometric elements within another body, outside or border on, it is last according to simultaneously, hand over, difference operation Type is accepted or rejected to geometric element classification results, and to determine which element retains as a result, which element is dropped;Paper " the Boolean calculation algorithm based on physical model is with realizing " (University Of Science and Technology Of Shandong's master thesis, in May, 2007, author:It is old Brightness) two simple three-dimensional bodies are directed to, transported using the boolean of " ask and hand over shared, classification, merger " similar to Muuss and Butler Calculation thought, which realizes, ships calculation, and difference operation, then base are realized based on operation result and difference operation is handed over shipping the transformational relation of calculation Merge to obtain the union of two bodies in the mutual difference operation result of two bodies, i.e., interdepended between computing, difference operation according to Rely and ship calculation, union, which relies on, ships calculation and two difference operations;Paper " the three-dimensional Boolean calculation algorithm based on dimensionality reduction is with realizing " (Shanghai Communications University's master thesis, 2 months 2008, author:Zhou Zhichao) propose the result of three-dimensional Boolean calculation by retaining Face and modification face composition, its modification face obtained by cutting off plane with section by traditional two-dimentional Boolean calculation, and retain face with The acquisition methods in modification face are different according to type (simultaneously, the hand over, poor) difference of three-dimensional Boolean calculation, the three-dimensional Boolean calculation of this article, Two-dimentional Boolean calculation is all that a kind of arithmetic type corresponds to a kind of algorithm;Patent " a kind of boolean operation method of three-dimensional planar entity " (ZL 201410369841.X, in January, 2017, inventor:Perhaps Socialist Education Movement etc.) propose based on the judgement of body internal and external relation and two dimension Interior clipping and the 3D solid boolean operation method of exterior clipping computing.Its basic thought is to think two three-dimensional planar entity As and B The result of Boolean calculation is made up of reservation face and modification face, is first passed through body internal and external relation and is judged and interior clipping, exterior clipping Computing produces four shared information chained list A_out_B, A_in_B, B_out_A, B_in_A used in two solid Booleans, Then Boolean calculation result is formed by shared information chained list according to Boolean calculation type.Problems be present in the patent:First, not Consider two Plane Entity surfaces coplanar situation in the same direction, this can cause two entities ask and when malfunction, cause often to make in engineering Patch and modeling can not be carried out;Second, algorithm has redundant computation, as cup takes less than A_in_B, B_in_A, ask and ship Calculation takes less than A_out_B, B_out_A, asks difference operation A-B to take less than A_in_B, B_out_A, asks difference operation B-A to take less than A_ out_B、B_in_A.As can be seen that there is problems with existing achievement in research:(1) algorithm completeness lacks strong theory Support;(2) algorithm is complicated, realizes that difficulty is larger;(3) efficiency of algorithm is not high, and operand is larger.
The content of the invention
It is an object of the invention to overcome the shortcomings of above-mentioned prior art, in three-dimensional planar solid Boolean and A kind of computing, there is provided the boolean's union method for the three-dimensional planar entity that algorithm is simple, algorithm is complete and algorithm operation quantity is small.
The object of the present invention is achieved like this:A kind of boolean union method of three-dimensional planar entity, it is characterized in that:Extremely Comprise the following steps less:
Step 101:Read in successively and participate in two entity As of computing and B face data, the wherein face of entity A, ring, Bian He The information of point is stored in A_Face_list, A_Loop_list, A_Line_list, A_Point_list chained list respectively, entity B face, ring, the information of side and point are stored in B_Face_list, B_Loop_list, B_Line_list, B_Point_ respectively In list chained lists;The face of entity is plane polygon, and it can only have an outer shroud, it is possibility to have an outer shroud and one are more Individual inner ring;
Step 102:The exchange mark swap and boolean difference operation mark sub_flag of entity A and entity B are set, and definition is simultaneously Operation result stores chained list Body_list, juxtaposition swap=false, sub_flag=false;
Step 103:Face to entity A and entity B makes marks, if inner ring surface is then labeled as non-zero, if being non-inner ring Face is then labeled as 0;Inner ring surface refers to that a line on outer shroud is the face of a line in the inner ring in other faces;
Step 104:Chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_list are traveled through, is asked for Bounding box value A.min.X., A.min.Y, A.min.Z, A.max.X, A.max.Y, A.max.Z of entity A;Travel through chained list B_ Point_list, B_Line_list, B_Loop_list, B_Face_list, ask for entity B bounding box value B.min.X., B.min.Y、B.min.Z、B.max.X、B.max.Y、B.max.Z;
Step 105:Judge the bounding box of the bounding box of entity A and entity B whether mutually from if not going to step from if mutually 106, step 117 is gone to from if if phase;
Step 106:Travel through chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_ of entity A List, take a face F of entity AA
Step 107:Judgement face FAWhether in the outside of entity B, if face FAStep 118 is then gone in the outside of entity B, Otherwise step 108 is gone to;
Step 108:Travel through chained list B_Point_list, B_Line_list, B_Loop_list, B_Face_ of entity B List, take a face F of entity BB
Step 109:Judgement face FAWith face FBIt is whether coplanar and be not inner ring surface in the same direction, if condition is set up, go to step 115, if condition is invalid, go to step 110;It is coplanar in the same direction to refer to geometrically locate in one plane and exterior normal vector side To the two or more faces of identical;
Step 110:With face FAExpansion face and face FBFriendship is asked, intersection section is stored in chained list A_inter_B;Face FAExpansion Big face refers to and FAIn one plane and the length of side is sufficiently large (takes 106) facing;
Step 111:Judge whether the face of entity B has been handled, if do not handled, go to step 108, if processing It is complete, go to step 112;
Step 112:Line segment in chained list A_inter_B is subjected to the construction ring that joins end to end, the ring of construction is stored in chained list In Loop_list;With the normal vector of each ring in Loop_list and face FANormal vector direction be compared, if identical if direction The summit order of ring is constant, otherwise by the summit order reversed arrangement of ring;Inner ring is found out in Loop_list, by inner ring summit Order reversed arrangement;The loop chain table Loop_list finally obtained is with face FATo cut the section that entity B obtains polygon in expansion face Shape F data;Empty chained list A_inter_B;
Step 113:Put boolean's difference operation mark sub_flag=true;
Step 114:Section polygon F is assigned to face FB
Step 115:Opposite FAWith face FBThe union of planar polygons is carried out, operation result is stored in chained list _ out_ In;What chained list _ out_ was preserved is the partial results of entity A and entity B three-dimensional union;
Step 116:Judge whether the face of entity A has been handled, if processing is complete, go to step 119, if do not handled It is complete, go to step 106;
Step 117:Chained list A_out_B=A_Face_list, chained list B_out_A=B_Face_list are made, merges two Chained list A_out_B, B_out_A export union result chained list Body_list into chained list Body_list;
Step 118:Preserve the face F of entity AAInto chained list _ out_, step 116 is gone to;
Step 119:Judge to exchange whether mark swap is true, if it is, step 122 is gone to, if it is not, then going to Step 120;
Step 120:By the data copy in chained list _ out_ into chained list A_out_B, and empty chained list _ out_;
Step 121:Switching entity A and entity B data, i.e., by the information copy of the face of entity B, ring, side and point to real Body A, by the information copy of the face of entity A, ring, side and point to entity B, juxtaposition swap=true, go to step 103;
Step 122:By the data copy in chained list _ out_ into chained list B_out_A, and empty chained list _ out_;
Step 123:Merged list Table A _ out_B and chained list B_out_A data are post-processed, deleted into Body_list Except the face of repetition and suspension face;
Step 124:It is a face to merge two or more faces that are coplanar in the same direction and having coincidence line segment;
Step 125:Export union result chained list Body_list.
Face in shown step 103 to entity A and entity B makes marks, if inner ring surface is then labeled as non-zero, if It is that non-inner ring surface is then labeled as zero, comprises the following steps:
Step 201:The face information of reading entity A from chained list A_Plane_list, the variable count in defined label face, Count initial value is 0, and is count by all face initial markers;
Step 202:Make variable count=count+1;
Step 203:By the storage order in face in entity A, a face is read;
Step 204:Judge that the face whether there is inner ring, if the face has inner ring, go to step 205, if the face is not Inner ring be present, go to step 213;
Step 205:An inner ring is taken out by storage order, the vertex data of inner ring is pressed into chained list pt_list;
Step 206:By the storage order in face in entity A, a face is read;
Step 207:Whether judge the face mark value not for 0, if condition set up, go to step 210, if condition not into It is vertical, go to step 208;
Step 208:The outer shroud summit in the face is judged whether in chained list pt_list, if not, step 210 is gone to, it is no Then go to step 209;
Step 209:It is count to make the face mark value;
Step 210:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 211, if do not traveled through, Go to step 206;
Step 211:Chained list pt_list is emptied, mark value count is carried out plus 1 operates;
Step 212:Judge whether the inner ring in the face has traveled through, if traversal is complete, go to step 213, if do not traveled through It is complete, go to step 205;
Step 213:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 214, if do not traveled through, Go to step 203;
Step 214:Step 201~step 213 is performed to entity B, changes the data of the entity A in step into entity B Data, the face of entity B is marked.
In shown step 107, face F is judgedAWhether in the outside of entity B, comprise the following steps:
Step 301:Ask for axial bounding box B.max.X, B.max.Y of entity B, B.max.Z, B.min.X, B.min.Y, B.min.Z;Ask for face FAAxial bounding box FA.max.X、FA.max.Y、FA.max.Z、FA.min.X、FA.min.Y、 FA.min.Z;
Step 302:Judge FA.max.X whether it is less than B.min.X, if invalid, goes to step 303, if set up, Go to step 309;
Step 303:Judge FA.min.X whether it is more than B.max.X, if invalid, goes to step 304, if set up, Go to step 309;
Step 304:Judge FA.max.Y whether it is less than B.min.Y, if invalid, goes to step 305, if set up, Go to step 309;
Step 305:Judge FA.min.Y whether it is more than B.max.Y, if invalid, goes to step 306, if set up, Go to step 309;
Step 306:Judge FA.max.Z whether it is less than B.min.Z, if invalid, goes to step 307, if set up, Go to step 309;
Step 307:Judge FA.min.Z whether it is more than B.max.Z, if invalid, goes to step 308, if set up, Go to step 309;
Step 308:Face FANot necessarily in the outside of entity B;
Step 309:Face FAIn the outside of entity B.
In shown step 109, face F is judgedAWith face FBIt is whether coplanar and be not inner ring surface in the same direction, comprise the following steps:
Step 401:Read the face F to have made marksAWith face FBData;
Step 402:Judgement face FAWith face FBMark value whether be all zero, if condition set up, go to step 403, it is no Then go to step 409;
Step 403:Face F is asked for respectivelyAWith face FBUnit normal vector and;
Step 404:Judge and whether equal, if equal, go to step 405, if unequal, go to step 409;
Step 405:From face FAWith face FBThe middle summit taken respectively on its outer shroud, and ensure that the two points are not same Individual, taken point is denoted as point PotA and point PotB respectively;
Step 406:Make straight line with point PotA and point PotB, obtain its direction vector;
Step 407:Judgement face FAUnit normal vector and direction vector it is whether vertical, if vertically, going to step 408, Otherwise step 409 is gone to;
Step 408:Face FAWith face FBIt is coplanar and be not inner ring surface in the same direction;
Step 409:Face FAWith face FBIt is unsatisfactory for coplanar and be not inner ring surface in the same direction.
In shown step 115, opposite FAWith face FBThe union of planar polygons is carried out, operation result is stored in chain In table _ out_, comprise the following steps:
Step 501:Reading face FAWith face FBData;
Step 502:Judgement face FAWith face FBThe position relationship of outer shroud whether intersect, if intersecting, go to step 503, such as Fruit is non-intersect, goes to step 517;
Step 503:Defined label face FAWith face FBInner ring on whether have two array Minner_label [] of intersection point With Cinner_label [], array size is respectively face FAWith face FBInner ring number, initialization array Minner_label [] All mark values with Cinner_label [] are 0;Judge through overlapping relation, if there is intersection point in inner ring, make two faces corresponding Inner ring mark value be 1;
Step 504:Preservation face F is defined respectivelyAWith face FBSummit, intersection point information and intersection point come in and go out the array of attribute DataP [] and dataQ [], define face FAGo out an array out_point [];First by face FAWith face FBSummit be stored in respectively In array dataP [] and dataQ [], and it is 0 to make its property value, then obtains the intersection point of two face rings, and judge going out for intersection point Enter attribute, if intersection point is access point, its property value is 1, if intersection point is a little, its property value is -1, by intersection point and its attribute Value is inserted respectively into array dataP [] and dataQ [] according to position of the intersection point on ring;Simultaneously by face FAGo out deposit Into array out_point [];Intersection point is that " access point " refers to face F at this pointASide enter face FB, intersection point is that " going out a little " is Refer to face F at this pointASide have left face FB
Step 505:Judge whether boolean's difference operation mark sub_flag is true, if true, goes to step 516, if It is not true, then goes to step 506;
Step 506:Judgement face FAWith face FBWhether there is inner ring, if inner ring, go to step 515, if without inner ring, Go to step 507;
Step 507:Go out a little from taking-up one in an array out_point [] is gone out, and be assigned to point variable PotTmp;
Step 508:In face FAArray data_P [] in find in order corresponding to go out a little;
Step 509:The point is stored in interim findings loop chain table loopTmp.Point_list, in dataP [] from The point continues to travel through backward, runs into summit and is then stored in chained list loopTmp.Point_list, runs into access point then entering surface FB Array dataQ [] in find corresponding point, and be stored in chained list loopTmp.Point_list, then in dataQ [] Continue to travel through backward from the point, run into summit and be stored in chained list loopTmp.Point_list, run into for face FBAccess point Then entering surface FAArray dataP [] in find corresponding point;
Step 510:Judge the point whether with point PotTmp for same point, if same point, go to step 511, if It is not same point, goes to step 509;
Step 511:Point in chained list loopTmp.Point_list is stored in loop chain table tmpFace_list, and clearly Empty chain table loopTmp.Point_list;
Step 512:Judgement face FAGo out whether an array out_point [] has traveled through, if traversal is complete, go to step 513, if do not traveled through, go to step 507;
Step 513:The normal vector of each ring in loop chain table tmpFace_list is asked for, judges itself and face FAOuter normal vector Whether direction is identical, and the identical person in direction is then outer shroud, and direction difference person is then inner ring;
Step 514:According to the storage order construction face chained list of inner ring after first outer shroud, result is saved in union result chain In table _ out_;
Step 515:Mark value in array Minner_label [] and Cinner_label [] judges face FAIt is corresponding Without intersection point inner ring and face FBThe going or staying problem of corresponding no intersection point inner ring, is divided into following two situations:The first situation, if Face FAInner ring in face FBOuter shroud outside, then the inner ring retain, if face FAInner ring in face FBOuter shroud inside and in face FBInner ring outside, then the inner ring does not retain, if face FAInner ring in face FBInner ring inside, then the inner ring retain;Second Situation, if face FBInner ring in face FAOuter shroud outside, then the inner ring retain, if face FBInner ring is in face FAOuter shroud The inside and in face FAInner ring outside, then the inner ring does not retain, if face FBInner ring in face FAInner ring inside, then the inner ring Retain;The environmental protection of reservation is present in loop chain table tmpFace_list;
Step 516:By face FBDataQ [] in summit and intersection point reversed arrangement, put sub_flag=false, go to Step 506;
Step 517:Judgement face FAWith face FBOuter relationship ofloops whether mutually from, if mutually from, go to step 518, if Not mutually from going to step 519;
Step 518:By face FAInner and outer rings and face FBInner and outer rings be all stored in union result chained list _ out_;
Step 519:If face FAOuter shroud in face FBThe inside of outer shroud, then preserve face FBOuter shroud to union result chained list _ In out_, if face FAOuter shroud in face FBThe outside of outer shroud, then preserve face FAOuter shroud into union result chained list _ out_, turn To step 503.
In shown step 123, post-processed, delete the face of repetition and suspension face, comprise the following steps:
Step 601:A face F is taken out from chained list body_list;
Step 602:Remaining face in addition to the F of face in chained list body_list is traveled through, if there is the face F repeated with face F1, then Deletion face F1
Step 603:Judge whether the face in body_list has traveled through, if traversal is complete, go to step 604, if do not had It has been traveled through that, go to step 601;
Step 604:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list In;
Step 605:A face FF in body_list is taken in order, and Boolean denotation label, juxtaposition label=are set false;
Step 606:Defined variable count is the number that each summit of face FF outer shrouds occurs in chained list pt_list;
Step 607:A summit on the FF outer shrouds of face is taken, its number count occurred in pt_list is counted, works as count When=1, label=true is made;
Step 608:Judge whether to take summit all on the FF outer shrouds of face;If taken, step 609 is gone to, if do not had Take, go to step 607;
Step 609:Judge whether label is equal to true, if condition set up, go to step 612, if condition not into It is vertical, go to step 610;
Step 610:Judge whether to take the face in body_list, if taken, algorithm terminates, if do not taken, Go to step 611;
Step 611:Label=false is made, a face is taken out in turn from body_list, is assigned to face FF, goes to step 607;
Step 612:Face FF is suspension face, and face FF is deleted from body_list, with seasonal label=false, empties chain Table pt_list;Suspension face is that the up to rare a line of finger ring does not have the face of adjacent surface;
Step 613:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list In;
Step 614:Again body_list is traveled through, takes one of face to be assigned to face FF in order, goes to step 607.
In shown step 124, it is a face to merge two or more faces that are coplanar in the same direction and having coincidence line segment, including with Lower step:
Step 701:Definition storage meets the chained list Plane_list in all faces of coplanar condition in the same direction, defines storage face and closes Result chained list tmpPlane_list after and, define side chain table Line_list;
Step 702:A face F in body_list is taken, asks for face F unit normal vector;
Step 703:The next face for taking F faces by storage order is denoted as F1, ask for face F1Unit normal vector;
Step 704:Judgement face F and face F1It is whether coplanar in the same direction, if coplanar in the same direction, step 705 is gone to, otherwise goes to step Rapid 706;
Step 705:By face F1It is stored in chained list Plane_list, while face F is deleted in body_list1
Step 706:Judge whether the face in body_list takes, if taken, go to step 708, if do not taken It is complete, go to step 707;
Step 707:From face F1A face is taken backward, is assigned to face F1, ask for face F1Unit normal vector, go to step 704;
Step 708:Whether the number in the face for judging to store in Plane_list is more than or equal to 1, if condition is set up, turns To step 709, if condition is invalid, step 714 is gone to;
Step 709:Face F is stored in chained list Plane_list, and deletes the face F in body_list;
Step 710:The side in all faces in Plane_list is all stored in side chain table Line_list, in chained list Line_ All coincidence line segments are deleted in list, while empty chained list Plane_list;
Step 711:Line segment in Line_list is joined end to end and constructs face ring;
Step 712:Short-term section that is conllinear in the face ring constructed in Line_list and having repetition point is merged into growth line segment;
Step 713:Construction face ring in Line_list is stored into chained list tmpPlane_list;
Step 714:Next face after the F of face is taken in body_list, is assigned to face F, asks for face F unit normal vector;
Step 715:Judge whether the face in body_list takes, if taken, go to step 716, if do not taken It is complete, go to step 717;
Step 716:Face in the chained list tmpPlane_list of face is added in body_list;
Step 717:Take ought above F next face be assigned to face F1, ask for face F1Unit normal vector, go to step 704.
The present invention has the following advantages:
(1) 3D solid boolean's union operation algorithm clear thinking, the simplicity proposed, algoritic module degree is high, is easy to Realize;
(2) boolean's union operation algorithm strict logic, the algorithm robustness proposed is high;
(3) boolean's union operation algorithm efficiency high for being proposed, operand are smaller.
Brief description of the drawings
Fig. 1 is the general flow chart of the present invention;
Fig. 2 is the flow chart being marked to the face of entity A and entity B;
Fig. 3 be judge entity A a face whether the outside of entity B flow chart;
Fig. 4 is that the face for judging entity A and entity B is coplanar in the same direction and is not the flow chart of inner ring surface;
Fig. 5 is the flow chart that two faces carry out planar polygons union;
Fig. 6 be two entities are asked and result present in repeat the flow chart deleted of face and suspension face;
Fig. 7 be two entities are asked and result present in it is coplanar and have the flow chart that merges of face for overlapping line segment;
Fig. 8 (a) is the exemplary plot that entity A and entity B carry out boolean's union;
Fig. 8 (b) is the exemplary plot that section polygon is asked for when entity B is cut off in a face of entity A;
Fig. 9 (a) be entity A inner ring surface and entity B non-inner ring surface it is incorgruous it is coplanar in the case of ask and exemplary plot;
Fig. 9 (b) is that the inner ring surface of entity A goes to cut off the sectional illustrations figure that entity B is asked for;
Fig. 9 (c) is that the inner ring surface of Fig. 9 (b) entity As goes to cut off section and the inner ring surface figure that entity B is tried to achieve;
Fig. 9 (d) is that the non-inner ring surface of entity B goes to cut off the sectional illustrations figure of entity A;
Fig. 9 (e) is that the non-inner ring surface of Fig. 9 (d) entity Bs goes to cut off section and the non-inner ring surface figure that entity A is tried to achieve;
Figure 10 (a) be entity A inner ring surface and entity B non-inner ring surface in the same direction it is coplanar in the case of ask and exemplary plot;
Figure 10 (b) is that the inner ring surface of entity A goes to cut off the sectional illustrations figure that entity B is asked for;
Figure 10 (c) is that the inner ring surface of Figure 10 (b) entity As goes to cut off section and the inner ring surface figure that entity B is asked for;
The non-inner ring surface of Figure 10 (d) entity Bs goes to cut off the sectional illustrations figure that entity A is asked for;
Figure 10 (e) is that the non-inner ring surface of Figure 10 (d) entity Bs goes to cut off section and the non-inner ring surface figure that entity A is asked for.
Embodiment
The three-dimensional planar entity of the present invention use BRep representations, i.e., with points, edges, faces, ring and they between it is mutual Syntople define three-dimensional planar entity, the outer shroud summit order in wherein face be defined as counterclockwise, inner ring summit order It is defined as clockwise.The face of entity is plane polygon, and it can only have an outer shroud, it is possibility to have an outer shroud and one Individual or multiple inner ring.The face of entity is divided into two kinds of inner ring surface and non-inner ring surface, and inner ring surface refers to that a line on outer shroud is other The face of a line in the inner ring in face.
In the same direction in the present invention coplanar refers to geometrically locate in one plane and exterior normal direction vector identical two Or multiple faces, it is incorgruous coplanar to refer to geometrically locate in one plane and the opposite two or more faces of exterior normal direction vector; The face of repetition refers to two faces for meeting following three conditions:First, the unit normal vector in two faces is identical, second, two faces are several What upper place in one plane, third, two faces it is all summit difference it is identical;Suspension face is that the up to rare a line of finger ring does not have There is the face of adjacent surface.
Reference picture 1, boolean's union of of the invention two three-dimensional planar entities comprise the following steps:
Step 101:Read in successively and participate in two entity As of computing and B face data, the wherein face of entity A, ring, Bian He The information of point is stored in A_Face_list, A_Loop_list, A_Line_list, A_Point_list chained list respectively, entity B face, ring, the information of side and point are stored in B_Face_list, B_Loop_list, B_Line_list, B_Point_ respectively In list chained lists, reference picture 8 (a), entity A has 10 faces, wherein non-inner ring surface 6, inner ring surface 4,6 non-inner ring surface difference For { 1-2-6-5-1,9-10-11-12-9 }, { 3-4-8-7-3,13-16-15-14-13 }, { 2-3-7-6-2 }, { 1-5-8-4- 1 }, { 1-4-3-2-1 }, { 5-6-7-8-5 }, 4 inner ring surfaces are respectively { 12-11-15-16-12 }, { 9-13-14-10-9 }, { 9- 12-16-13-9 }, { 10-14-15-11-10 }, entity B has 6 non-inner ring surfaces, is respectively { 1'-2'-6'-5'-1'}, { 3'- 4'-8'-7'-3'}、{2'-3'-7'-6'-2'}、{1'-5'-8'-4'-1'}、{1'-4'-3'-2'-1'}、{5'-6'-7'-8'- 5'};
Step 102:The exchange mark swap and boolean difference operation mark sub_flag of entity A and entity B are set, and definition is simultaneously Operation result stores chained list Body_list, juxtaposition swap=false, sub_flag=false;
Step 103:Face to entity A and entity B makes marks, if inner ring surface is then labeled as non-zero, if being non-inner ring Face is then labeled as 0;
In step 103, method that the face to entity A and entity B makes marks, comprises the following steps reference picture 2:
Step 201:The face information of reading entity A from chained list A_Plane_list, the variable count in defined label face, Count initial value is 0, and is count by all face initial markers;
Step 202:Make variable count=count+1;
Step 203:By the storage order in face in entity A, a face is read;
Step 204:Judge that the face whether there is inner ring, if the face has inner ring, go to step 205, if the face is not Inner ring be present, go to step 213;
Step 205:An inner ring is taken out by storage order, the vertex data of inner ring is pressed into chained list pt_list, reference Fig. 8 (a), the upper bottom surface inner ring of entity A is { 9-10-11-12-9 }, is pressed into chained list pt_list;
Step 206:By the storage order in face in entity A, a face is read;
Step 207:Whether judge the face mark value not for 0, if condition set up, go to step 210, if condition not into It is vertical, go to step 208;
Step 208:The outer shroud summit in the face is judged whether in chained list pt_list, if not, step 210 is gone to, it is no Then go to step 209;
Step 209:It is count to make the face mark value;
Step 210:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 211, if do not traveled through, Go to step 206;
Step 211:Chained list pt_list is emptied, mark value count is carried out plus 1 operates;
Step 212:Judge whether the inner ring in the face has traveled through, if traversal is complete, go to step 213, if do not traveled through It is complete, go to step 205;
Step 213:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 214, if do not traveled through, Go to step 203;By above-mentioned steps, reference picture 8 (a), four inner ring surfaces { 12-11-15-16-12 }, { 9-13- of entity A 14-10-9 }, { 9-12-16-13-9 }, { 10-14-15-11-10 } be marked as 1;If the result of judgement, which is entity, to be had in n Ring, then corresponding mark value count be incrementally tagged to n, the mark value for belonging to all inner ring surfaces of same inner ring is identical 's;
Step 214:Step 201~step 213 is performed to entity B, changes the data of the entity A in step into entity B Data, the face of entity B is marked.Reference picture 8 (a), the face of entity B is all non-inner ring surface, and the mark value in its all face is all For 0.
Step 104:Traversal chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_list are asked for Bounding box value A.min.X., A.min.Y, A.min.Z, A.max.X, A.max.Y, A.max.Z of entity A;Travel through chained list B_ Point_list, B_Line_list, B_Loop_list, B_Face_list ask for entity B bounding box value B.min.X., B.min.Y、B.min.Z、B.max.X、B.max.Y、B.max.Z;Reference picture 8 (a), the bounding box value A.min.X. of entity A, A.min.Y, A.min.Z are respectively the x, y, z coordinate value on summit 4, and A.max.X, A.max.Y, A.max.Z are respectively summit 6 X, y, z coordinate value;Bounding box value B.min.X., B.min.Y, B.min.Z of entity B are respectively the x, y, z coordinate value on summit 4 ', B.max.X, B.max.Y, B.max.Z are respectively the x, y, z coordinate value on summit 6 ';
Step 105:Judge the bounding box of the bounding box of entity A and entity B whether mutually from if not going to step from if mutually 106, step 117 is gone to from if if phase;
Step 106:Travel through chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_ of entity A List, take a face F of entity AA
Step 107:Judgement face FAWhether in the outside of entity B, if face FAStep 118 is then gone in the outside of entity B, Otherwise step 108 is gone to;
In step 107, face F is judgedAWhether the outside of entity B method, reference picture 3, comprise the following steps:
Step 301:Ask for axial bounding box B.max.X, B.max.Y of entity B, B.max.Z, B.min.X, B.min.Y, B.min.Z;Ask for face FAAxial bounding box FA.max.X、FA.max.Y、FA.max.Z、FA.min.X、FA.min.Y、 FA.min.Z;
Step 302:Judge FA.max.X whether it is less than B.min.X, if invalid, goes to step 303, if set up, Go to step 309;
Step 303:Judge FA.min.X whether it is more than B.max.X, if invalid, goes to step 304, if set up, Go to step 309;
Step 304:Judge FA.max.Y whether it is less than B.min.Y, if invalid, goes to step 305, if set up, Go to step 309;
Step 305:Judge FA.min.Y whether it is more than B.max.Y, if invalid, goes to step 306, if set up, Go to step 309;
Step 306:Judge FA.max.Z whether it is less than B.min.Z, if invalid, goes to step 307, if set up, Go to step 309;
Step 307:Judge FA.min.Z whether it is more than B.max.Z, if invalid, goes to step 308, if set up, Go to step 309;
Step 308:Face FANot necessarily in the outside of entity B;
Step 309:Face FAIn the outside of entity B.In reference picture 8 (a), through judging, face { 1-4-3-2-1 }, { 1-5-8-4- 1 } in the outside of entity B.
Step 108:Travel through chained list B_Point_list, B_Line_list, B_Loop_list, B_Face_ of entity B List, take a face F of entity BB
Step 109:Judgement face FAWith face FBIt is whether coplanar and be not inner ring surface in the same direction, if condition is set up, go to step 115, if condition is invalid, go to step 110;
In step 109, face F is judgedAWith face FBIt is whether coplanar in the same direction and be not the method for inner ring surface, reference picture 4, including Following steps:
Step 401:Read the face F to have made marksAWith face FBData;
Step 402:Judgement face FAWith face FBMark value whether be all zero, if condition set up, go to step 403, it is no Then go to step 409;
Step 403:Face F is asked for respectivelyAWith face FBUnit normal vector and;
Step 404:Judge and whether equal, if equal, go to step 405, if unequal, go to step 409;
Step 405:From face FAWith face FBThe middle summit taken respectively on its outer shroud, and ensure that the two points are not same Individual, taken point is denoted as point PotA and point PotB respectively;
Step 406:Make straight line with point PotA and point PotB, obtain its direction vector;
Step 407:Judgement face FAUnit normal vector and direction vector it is whether vertical, that is, judge whether be equal to 0, if Vertically, step 408 is gone to, otherwise goes to step 409;
Step 408:Face FAWith face FBIt is coplanar and be not inner ring surface in the same direction;Reference picture 8 (a), through judging, the top surface of entity A { 1'-2'-6'-5'-1'} belongs to coplanar in the same direction and is not inner ring for { 1-2-6-5-1,9-10-11-12-9 } and the top surface of entity B Face;
Step 409:Face FAWith face FBIt is unsatisfactory for coplanar and be not inner ring surface in the same direction.
Step 110:With face FAExpansion face and face FBFriendship is asked, intersection section is stored in chained list A_inter_B, face FAExpansion Big face refers to and FAIn one plane and the length of side is sufficiently large (takes 106) facing;Reference picture 8 (b), with the face of entity A The intersection section that { 2-3-7-6-2 } goes to cut off entity B is { 9-10 }, { 10-11'}, { 11'-10'} and { 10'-9 };
Step 111:Judge whether the face of entity B has been handled, if do not handled, go to step 108, if processing It is complete, go to step 112;
Step 112:Line segment in chained list A_inter_B is subjected to the construction ring that joins end to end, the ring of construction is stored in chained list In Loop_list;With the normal vector of each ring in Loop_list and face FANormal vector direction be compared, if identical if direction The summit order of ring is constant, otherwise by the summit order reversed arrangement of ring;Inner ring is found out in Loop_list, by inner ring summit Order reversed arrangement;The loop chain table Loop_list finally obtained is with face FATo cut the section that entity B obtains polygon in expansion face Shape F data;Empty chained list A_inter_B;Reference picture 8 (b), the join end to end ring of composition of the line segment in A_inter_B is { 9- 10-11'-10'-9};The section polygon F preserved in Loop_list is { 9-10-11'-10'-9 };
Step 113:Put boolean's difference operation mark sub_flag=true;
Step 114:Section polygon F is assigned to face FB
Step 115:Opposite FAWith face FBThe union of planar polygons is carried out, operation result is stored in chained list _ out_ In;What chained list _ out_ was preserved is the partial results of entity A and entity B three-dimensional union;
In step 115, opposite FAWith face FBThe method for carrying out the union of planar polygons, reference picture 5, including following step Suddenly:
Step 501:Reading face FAWith face FBData;
Step 502:Judgement face FAWith face FBThe position relationship of outer shroud whether intersect, if intersecting, go to step 503, such as Fruit is non-intersect, goes to step 517;
Step 503:Defined label face FAWith face FBInner ring on whether have two array Minner_label [] of intersection point With Cinner_label [], array size is respectively face FAWith face FBInner ring number, initialization array Minner_label [] All mark values with Cinner_label [] are 0;Judge through overlapping relation, if there is intersection point in inner ring, make two faces corresponding Inner ring mark value be 1;Reference picture 8 (a), inner ring { 9-10-11-12-9 } mark of face { 1-2-6-5-1,9-10-11-12-9 } 0 is designated as, reference picture 9 (a), the inner ring { 9-10-11-12-9 } of face { 1-2-6-5-1,9-10-11-12-9 } is labeled as 1;
Step 504:Preservation face F is defined respectivelyAWith face FBSummit, intersection point information and intersection point come in and go out the array of attribute DataP [] and dataQ [], define face FAGo out an array out_point [];First by face FAWith face FBSummit be stored in respectively In array dataP [] and dataQ [], and it is 0 to make its property value, then obtains the intersection point of two face rings, and judge going out for intersection point Enter attribute, if intersection point is access point, its property value is 1, if intersection point is a little, its property value is -1, by intersection point and its attribute Value is inserted respectively into array dataP [] and dataQ [] according to position of the intersection point on ring;Simultaneously by face FAGo out deposit Into array out_point [];Intersection point is that " access point " refers to face F at this pointASide enter face FB, intersection point is that " going out a little " is Refer to face F at this pointASide have left face FB;Reference picture 8 (a), the top surface F of entity AA{1-2-6-5-1、9-10-11-12-9} With the top surface F of entity BB{ when 1'-2'-6'-5'-1'} carries out two-dimentional boolean's union, face ring intersection point is 9,11, for face FA, hand over Point 9 is access point, and its property value is 1, and intersection point 11 is a little, and its property value is -1, the face F inserted after access pointAArray DataP [] is { 1-2-9-6-11-5,9-10-11-12 }, face FBArray dataQ [] be { 1'-9-2'-6'-5'-11 }, face FA An array out_point [] that goes out be { 11 };
Step 505:Judge whether boolean's difference operation mark sub_flag is true, if true, goes to step 516, if It is not true, then goes to step 506;
Step 506:Judgement face FAWith face FBWhether there is inner ring, if inner ring, go to step 515, if without inner ring, Go to step 507;
Step 507:Go out a little from taking-up one in an array out_point [] is gone out, and be assigned to point variable PotTmp;
Step 508:In face FAArray data_P [] in find in order corresponding to go out a little;
Step 509:The point is stored in interim findings loop chain table loopTmp.Point_list, in dataP [] from The point continues to travel through backward, runs into summit and is then stored in chained list loopTmp.Point_list, runs into access point then entering surface FB Array dataQ [] in find corresponding point, and be stored in chained list loopTmp.Point_list, then in dataQ [] Continue to travel through backward from the point, run into summit and be stored in chained list loopTmp.Point_list, run into for face FBAccess point Then entering surface FAArray dataP [] in find corresponding point;
Step 510:Judge the point whether with point PotTmp for same point, if same point, go to step 511, if It is not same point, goes to step 509;
Step 511:Point in chained list loopTmp.Point_list is stored in loop chain table tmpFace_list, and clearly Empty chain table loopTmp.Point_list;
Step 512:Judgement face FAGo out whether an array out_point [] has traveled through, if traversal is complete, go to step 513, if do not traveled through, go to step 507;Reference picture 8 (a), face FA{ 1-2-6-5-1,9-10-11-12-9 } and face FB { results { 11-5-1-2-9-2'-6'-5'-11 } of the 1'-2'-6'-5'-1'} Jing Guo step 507 to step 512 is stored in loop chain In table tmpFace_list;
Step 513:The normal vector of each ring in loop chain table tmpFace_list is asked for, judges itself and face FAOuter normal vector Whether direction is identical, and the identical person in direction is then outer shroud, and direction difference person is then inner ring;Reference picture 8 (a), face FA{1-2-6-5-1、 9-10-11-12-9 } and face FBWhen 1'-2'-6'-5'-1'} carries out union, and after step 512 and step 515, loop chain The ring stored in table tmpFace_list is { 9-10-11-12-9 }, { 11-5-1-2-9-2'-6'-5'-11 }, by this step The normal vector calculated of ring, outer shroud are { 11-5-1-2-9-2'-6'-5'-11 }, and inner ring is { 9-10-11-12-9 };
Step 514:According to the storage order construction face chained list of inner ring after first outer shroud, result is saved in union result chain In table _ out_;Reference picture 8 (a), face FA{ 1-2-6-5-1,9-10-11-12-9 } and face FB{ 1'-2'-6'-5'-1'} is carried out simultaneously The result { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12-9 } of computing is stored in union result chained list _ out_;
Step 515:Mark value in array Minner_label [] and Cinner_label [] judges face FAIt is corresponding Without intersection point inner ring and face FBThe going or staying problem of corresponding no intersection point inner ring, is divided into following two situations:The first situation, if Face FAInner ring in face FBOuter shroud outside, then the inner ring retain, if face FAInner ring in face FBOuter shroud inside and in face FBInner ring outside, then the inner ring does not retain, if face FAInner ring in face FBInner ring inside, then the inner ring retain;Second Situation, if face FBInner ring in face FAOuter shroud outside, then the inner ring retain, if face FBInner ring is in face FAOuter shroud The inside and in face FAInner ring outside, then the inner ring does not retain, if face FBInner ring in face FAInner ring inside, then the inner ring Retain;The environmental protection of reservation is present in loop chain table tmpFace_list;In reference picture 8 (a), the face F of entity AA{1-2-6-5-1、 9-10-11-12-9 } in inner ring { 9-10-11-12-9 } entity B face FBThe outside of 1'-2'-6'-5'-1'} outer shroud, Ring { 9-10-11-12-9 } is then preserved in loop chain table tmpFace_list;
Step 516:By face FBDataQ [] in summit and intersection point reversed arrangement, put sub_flag=false, go to Step 506;Reference picture 8 (b), the face F of entity AA{ 2-3-7-6-2 } cuts off entity B, is obtained by step 110, step 112 Section polygon F is { 9-10-11'-10'-9 }, then by step 113, step 114, face FBFor { 9-10-11'-10'-9 }, enter After entering step 115, face FA{ 2-3-7-6-2 } and face FBWhen { 9-10-11'-10'-9 } carries out two-dimentional boolean's union, face ring intersection point For 9,10 (point 6,7 is not counted in intersection point), for face FA, intersection point 10 is access point, and its property value is 1, and intersection point 9 is a little, its attribute It is worth for -1, the face F inserted after access pointAArray dataP [] be { 2-3-10-7-6-9 }, face FBArray dataQ [] be { 9-9 (intersection point) -10 (intersection point) -10-11'-10'}, face FAAn array out_point [] that goes out be { 9 }, perform step 516 after, Face FBArray dataQ [] be { (intersection points) -9 of 10'-11'-10-10 (intersection point) -9 };After step 506 arrives step 511, ring The ring stored in chained list tmpFace_list is { 9-2-3-10-9 };After step 512, step 513 and step 514, this Secondary union result { 9-2-3-10-9 } is stored in chained list _ out_;
Step 517:Judgement face FAWith face FBOuter relationship ofloops whether mutually from, if mutually from, go to step 518, if Not mutually from going to step 519;
Step 518:By face FAInner and outer rings and face FBInner and outer rings be all stored in union result chained list _ out_;
Step 519:If face FAOuter shroud in face FBThe inside of outer shroud, then preserve face FBOuter shroud to union result chained list _ In out_, if face FAOuter shroud in face FBThe outside of outer shroud, then preserve face FAOuter shroud into union result chained list _ out_, turn To step 503.
Step 116:Judge whether the face of entity A has been handled, if processing is complete, go to step 119, if do not handled It is complete, go to step 106;
Step 117:Chained list A_out_B=A_Face_list, chained list B_out_A=B_Face_list are made, merges two Chained list A_out_B, B_out_A export union result chained list Body_list into chained list Body_list;
Step 118:Preserve the face F of entity AAInto chained list _ out_, step 116 is gone to;
Step 119:Judge to exchange whether mark swap is true, if it is, step 122 is gone to, if it is not, then going to Step 120;
Step 120:By the data copy in chained list _ out_ into chained list A_out_B, and empty chained list _ out_;Reference picture 8 (a) and table 1, two chained list A_out_B that table 1 generates when being the entity A and entity B progress boolean's union shown in Fig. 8 (a) With B_out_A result.The face stored in chained list A_out_B be { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12-9 }, {10-3-4-8-12-8'-7'-3'-10、13-16-15-14-13}、{9-2-3-10-9}、{1-5-8-4-1}、{1-4-3-2- 1}、{12-8-5-11-12}、{12-11-15-16-12}、{9-13-14-10-9}、{9-12-16-13-9}、{10-14-15- 11-10};
Table 1 is as follows:
Step 121:Switching entity A and entity B data, i.e., by the information copy of the face of entity B, ring, side and point to real Body A, by the information copy of the face of entity A, ring, side and point to entity B, juxtaposition swap=true, go to step 103;
Step 122:By the data copy in chained list _ out_ into chained list B_out_A, and empty chained list _ out_;Reference picture 8 (a) and table 1, the face stored in chained list B_out_A is { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12-9 }, { 10-3- 4-8-12-8'-7'-3'-10、13-16-15-14-13}、{2'-3'-7'-6'-2'}、{11-5'-8'-12-11}、{10-3'- 2'-9-10}、{5'-6'-7'-8'-5'};
Step 123:Merged list Table A _ out_B and chained list B_out_A data are post-processed, deleted into Body_list Except the face of repetition and suspension face;Reference picture 8 (a) and table 1, the Body_list that merged list Table A _ out_B and chained list B_out_A are obtained The face of storage is { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12-9 }, { 10-3-4-8-12-8'-7'-3'-10,13- 16-15-14-13}、{9-2-3-10-9}、{1-5-8-4-1}、{1-4-3-2-1}、{12-8-5-11-12}、{12-11-15- 16-12}、{9-13-14-10-9}、{9-12-16-13-9}、{10-14-15-11-10}、{11-5-1-2-9-2'-6'-5'- 11、9-10-11-12-9}、{10-3-4-8-12-8'-7'-3'-10、13-16-15-14-13}、{2'-3'-7'-6'-2'}、 {11-5'-8'-12-11}、{10-3'-2'-9-10}、{5'-6'-7'-8'-5'};
In step 123, post-processed, delete the face of repetition and the method for hanging face, reference picture 6, comprise the following steps:
Step 601:A face F is taken out from chained list body_list;
Step 602:Remaining face in addition to the F of face in chained list body_list is traveled through, if there is the repetition face F with face F1, then Deletion face F1;Reference picture 8 (a) and table 1, face { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12- of Body_list storages 9 }, { 10-3-4-8-12-8'-7'-3'-10,13-16-15-14-13 } is respectively repeated once, is deleted, delete repeat face it The face of Body_list storages afterwards is { 11-5-1-2-9-2'-6'-5'-11,9-10-11-12-9 }, { 10-3-4-8-12-8'- 7'-3'-10、13-16-15-14-13}、{9-2-3-10-9}、{1-5-8-4-1}、{1-4-3-2-1}、{12-8-5-11-12}、 {12-11-15-16-12}、{9-13-14-10-9}、{9-12-16-13-9}、{10-14-15-11-10}、{2'-3'-7'-6'- 2'}、{11-5'-8'-12-11}、{10-3'-2'-9-10}、{5'-6'-7'-8'-5'};
Step 603:Judge whether the face in body_list has traveled through, if traversal is complete, go to step 604, if do not had It has been traveled through that, go to step 601;
Step 604:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list In;
Step 605:A face FF in body_list is taken in order, and Boolean denotation label, juxtaposition label=are set false;
Step 606:Defined variable count is the number that each summit of face FF outer shrouds occurs in chained list pt_list;
Step 607:A summit on the FF outer shrouds of face is taken, its number count occurred in pt_list is counted, works as count When=1, label=true is made;Reference picture 9 (a), Fig. 9 (b), the inner ring surface { 9-9'-10'-10-9 } of entity A and the face of entity B { 1'-5'-8'-4'-1'} is incorgruous coplanar, with inner ring surface FA{ 9-9'-10'-10-9 } goes to cut off entity B, and obtained section F is { 1'-4'-8'-5'-1'}, section F is assigned to face FB, with face FA{ 9-9'-10'-10-9 } and face FB{ 1'-4'-8'-5'-1'} is done Two-dimentional boolean's difference operation, reference picture 9 (c), the face that computing obtains are { 1'-9-9'-4'-1'};After switching entity A and entity B, With the face F of entity B (entity A after as exchanging)A{ 1'-5'-8'-4'-1'} goes to cut off the entity A (entity after as exchanging B the section F) obtained, reference picture 9 (d) and Fig. 9 (e), section F are { 10-13-14-10'-10 }, { 17-9-9'-18-17 }, Section F is assigned to face FB, with face FA{ 1'-5'-8'-4'-1'} and face FB{ 10-13-14-10'-10 }, { 17-9-9'-18-17 } are done Two-dimentional boolean's difference operation, the face that computing obtains are { 1'-10-10'-4'-1'}, { 13-5'-8'-14-13 };Reference picture 9 (c) and Fig. 9 (e), twice in difference operation result, { 1'-10-10'-4'-1'} is suspension face, because the face { 9-9'- of entity A in face 10'-10-9 } and entity B face 1'-5'-8'-4'-1'} is incorgruous coplanar, so suspension face can be produced, the suspension vertex of surface 1', 10,10', 4' count values are 3,1,1,3 respectively, must have count=1 in each summit count values in suspension face;For End to end continuous suspension face is, it is necessary to first determine whether and delete the suspension face for having count values to be 1 in body_list, Ran Houqing Empty chain table pt_list, all summits in remaining face in body_list are pressed into chained list pt_list again, then counted again The count values of each vertex of surface, then judge and delete have in body_list count values as 1 suspension face, until body_list in Not untill suspension face;
Step 608:Judge whether to take summit all on the FF outer shrouds of face;If taken, step 609 is gone to, if do not had Take, go to step 607;
Step 609:Judge whether label is equal to true, if condition set up, go to step 612, if condition not into It is vertical, go to step 610;
Step 610:Judge whether to take the face in body_list, if taken, algorithm terminates, if do not taken, Go to step 611;
Step 611:Label=false is made, a face is taken out in turn from body_list, is assigned to face FF, goes to step 607;
Step 612:Face FF is suspension face, and face FF is deleted from body_list, with seasonal label=false, empties chain Table pt_list;
Step 613:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list In;
Step 614:Again body_list is traveled through, takes one of face to be assigned to face FF in order, goes to step 607.
Step 124:It is a face to merge two or more faces that are coplanar in the same direction and having coincidence line segment;
In step 124, merging is coplanar in the same direction and has the method for overlapping two or more faces of line segment as a face, including with Lower step:
As shown in fig. 7, step 701:Definition storage meets the chained list Plane_list in all faces of coplanar condition in the same direction, fixed Result chained list tmpPlane_list after adopted storage face merging, defines side chain table Line_list;Reference picture 10 (a) and Figure 10 (b), { 2'-3'-7'-6'-2'} belongs to coplanar in the same direction, asks simultaneously in the face of the inner ring surface { 9-9'-10'-10-9 } of entity A and entity B As a result the face for overlapping line segment can be produced, it is necessary to be merged into big face;With the face F of entity AA{ 9-9'-10'-10-9 } goes to cut off entity B Obtaining section F, { 2'-3'-7'-6'-2'}, by section F, { 2'-3'-7'-6'-2'} is assigned to face FB, with face FA{9-9'-10'-10- 9 } and face FB{ 2'-3'-7'-6'-2'} carries out two-dimentional boolean's difference operation, reference picture 10 (c), and computing obtains face { 9-9'-3'-2'- 9};After switching entity A and entity B, with the face F of entity B (entity A after as exchanging)A{ 2'-3'-7'-6'-2'} goes to cut Cut entity A (entity B after as exchanging) and obtain section F, reference picture 10 (d) and Figure 10 (e), section F is { 15-16-9'-9- 15 }, { 10-10'-14-13-10 }, section F is assigned to face FB, with face FA{ 2'-3'-7'-6'-2'} and face FB{15-16-9'-9- 15 }, { 10-10'-14-13-10 } does two-dimentional boolean's difference operation, and the face that computing obtains is { 2'-3'-10'-10-2'}, { 13-14- 7'-6'-13};Reference picture 10 (c) and Figure 10 (e), twice the three of difference operation result face { 9-9'-3'-2'-9 }, { 2'-3'- 10'-10-2'}, { 13-14-7'-6'-13 } are stored in body_list, wherein face { 9-9'-3'-2'-9 } and face { 2'-3'- 10'-10-2'} has coincidence line segment { 2'-3'};
Step 702:A face F in body_list is taken, asks for face F unit normal vector;
Step 703:The next face for taking F faces by storage order is denoted as F1, ask for face F1Unit normal vector;
Step 704:Judgement face F and face F1It is whether coplanar in the same direction, if coplanar in the same direction, step 705 is gone to, otherwise goes to step Rapid 706;
Step 705:By face F1It is stored in chained list Plane_list, while face F is deleted in body_list1;Reference picture Face { 9-9'-3'-2'-9 }, { 2'-3'-10'-10-2'} and { 13-14-7'-6'- in 10 (c) and Figure 10 (e), body_list 13 } coplanar face in the same direction is belonged to, it is necessary to be stored in chained list Plane_list;
Step 706:Judge whether the face in body_list takes, if taken, go to step 708, if do not taken It is complete, go to step 707;
Step 707:From face F1A face is taken backward, is assigned to face F1, ask for face F1Unit normal vector, go to step 704;
Step 708:Whether the number in the face for judging to store in Plane_list is more than or equal to 1, if condition is set up, turns To step 709, if condition is invalid, step 714 is gone to;
Step 709:Face F is stored in chained list Plane_list, and deletes the face F in body_list;
Step 710:The side in all faces in Plane_list is all stored in side chain table Line_list, in chained list Line_ All coincidence line segments are deleted in list, while empty chained list Plane_list;
Step 711:Line segment in Line_list is joined end to end and constructs face ring;
Step 712:Short-term section that is conllinear in the face ring constructed in Line_list and having repetition point is merged into growth line segment;
Step 713:Construction face ring in Line_list is stored into chained list tmpPlane_list;Reference picture 10 (c) , arrive step 712 by step 710 (e), delete overlap line segment 2'-3'}, the face obtained after merging { 9-9'-10'-10-9 }, { 13-14-7'-6'-13 } is stored into chained list tmpPlane_list;
Step 714:Next face after the F of face is taken in body_list, is assigned to face F, asks for face F unit normal vector;
Step 715:Judge whether the face in body_list takes, if taken, go to step 716, if do not taken It is complete, go to step 717;
Step 716:Face in the chained list tmpPlane_list of face is added in body_list;
Step 717:Take ought above F next face be assigned to face F1, ask for face F1Unit normal vector, go to step 704.
Step 125:Export union result chained list Body_list.
The part and the common knowledge of the english abbreviation category industry that the present embodiment does not describe in detail, may search on the net Arrive, do not describe one by one here.

Claims (7)

1. a kind of boolean's union method of three-dimensional planar entity, it is characterized in that:Comprise the following steps:
Step 101:Two entity As of reading participation computing and B face data successively, the wherein face of entity A, ring, side and point Information is stored in A_Face_list, A_Loop_list, A_Line_list, A_Point_list chained list respectively, entity B Face, ring, the information of side and point are stored in B_Face_list, B_Loop_list, B_Line_list, B_Point_list respectively In chained list;The face of entity is plane polygon, and it can only have an outer shroud, it is possibility to have in an outer shroud and one or more Ring;
Step 102:The exchange mark swap and boolean difference operation mark sub_flag of entity A and entity B are set, define union As a result chained list Body_list, juxtaposition swap=false, sub_flag=false are stored;
Step 103:Face to entity A and entity B makes marks, if inner ring surface is then labeled as non-zero, if being non-inner ring surface Labeled as 0;Inner ring surface refers to that a line on outer shroud is the face of a line in the inner ring in other faces;
Step 104:Chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_list are traveled through, asks for entity A bounding box value A.min.X., A.min.Y, A.min.Z, A.max.X, A.max.Y, A.max.Z;Travel through chained list B_Point_ List, B_Line_list, B_Loop_list, B_Face_list, ask for entity B bounding box value B.min.X., B.min.Y, B.min.Z、B.max.X、B.max.Y、B.max.Z;
Step 105:Judge the bounding box of entity A and entity B bounding box whether mutually from, if step 106 is not gone to from if mutually, if Mutually from then going to step 117;
Step 106:Chained list A_Point_list, A_Line_list, A_Loop_list, A_Face_list of entity A are traveled through, Take a face F of entity AA
Step 107:Judgement face FAWhether in the outside of entity B, if face FAStep 118 is then gone in the outside of entity B, otherwise Go to step 108;
Step 108:Chained list B_Point_list, B_Line_list, B_Loop_list, B_Face_list of entity B are traveled through, Take a face F of entity BB
Step 109:Judgement face FAWith face FBIt is whether coplanar and be not inner ring surface in the same direction, if condition is set up, step 115 is gone to, If condition is invalid, step 110 is gone to;It is coplanar in the same direction to refer to geometrically locate in one plane and exterior normal direction vector phase Same two or more faces;
Step 110:With face FAExpansion face and face FBFriendship is asked, intersection section is stored in chained list A_inter_B;Face FAExpansion face Refer to and FAIn one plane and the length of side is sufficiently large (takes 106) facing;
Step 111:Judge whether the face of entity B has been handled, if do not handled, go to step 108, if processing is complete, turn To step 112;
Step 112:Line segment in chained list A_inter_B is subjected to the construction ring that joins end to end, the ring of construction is stored in chained list Loop_ In list;With the normal vector of each ring in Loop_list and face FANormal vector direction be compared, the top of ring if direction is identical Dot sequency is constant, otherwise by the summit order reversed arrangement of ring;Inner ring is found out in Loop_list, inner ring summit order is anti- To arrangement;The loop chain table Loop_list finally obtained is with face FAExpansion face cut the section polygon F's that entity B obtains Data;Empty chained list A_inter_B;
Step 113:Put boolean's difference operation mark sub_flag=true;
Step 114:Section polygon F is assigned to face FB
Step 115:Opposite FAWith face FBThe union of planar polygons is carried out, operation result is stored in chained list _ out_;Chain What table _ out_ was preserved is the partial results of entity A and entity B three-dimensional union;
Step 116:Judge whether the face of entity A has been handled, if processing is complete, go to step 119, if do not handled, turn To step 106;
Step 117:Chained list A_out_B=A_Face_list, chained list B_out_A=B_Face_list are made, merges two chained lists A_out_B, B_out_A export union result chained list Body_list into chained list Body_list;
Step 118:Preserve the face F of entity AAInto chained list _ out_, step 116 is gone to;
Step 119:Judge to exchange whether mark swap is true, if it is, step 122 is gone to, if it is not, then going to step 120;
Step 120:By the data copy in chained list _ out_ into chained list A_out_B, and empty chained list _ out_;
Step 121:Switching entity A and entity B data, i.e., by the information copy of the face of entity B, ring, side and point to entity A, By the information copy of the face of entity A, ring, side and point to entity B, juxtaposition swap=true, step 103 is gone to;
Step 122:By the data copy in chained list _ out_ into chained list B_out_A, and empty chained list _ out_;
Step 123:Merged list Table A _ out_B and chained list B_out_A data are post-processed into Body_list, delete weight Coverlay and suspension face;
Step 124:It is a face to merge two or more faces that are coplanar in the same direction and having coincidence line segment;
Step 125:Export union result chained list Body_list.
2. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step Face in 103 to entity A and entity B makes marks, if inner ring surface is then labeled as non-zero, is labeled as if being non-inner ring surface Zero, comprise the following steps:
Step 201:The face information of entity A, the variable count, count in defined label face are read from chained list A_Plane_list Initial value be 0, and be count by all face initial markers;
Step 202:Make variable count=count+1;
Step 203:By the storage order in face in entity A, a face is read;
Step 204:Judge that the face whether there is inner ring, if the face has inner ring, go to step 205, if the face is not present Inner ring, go to step 213;
Step 205:An inner ring is taken out by storage order, the vertex data of inner ring is pressed into chained list pt_list;
Step 206:By the storage order in face in entity A, a face is read;
Step 207:Whether the face mark value is judged not for 0, if condition is set up, goes to step 210, if condition is invalid, Go to step 208;
Step 208:Judge that the outer shroud summit in the face whether in chained list pt_list, if not, going to step 210, otherwise turns To step 209;
Step 209:It is count to make the face mark value;
Step 210:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 211, if do not traveled through, go to Step 206;
Step 211:Chained list pt_list is emptied, mark value count is carried out plus 1 operates;
Step 212:Judge whether the inner ring in the face has traveled through, if traversal is complete, go to step 213, if do not traveled through, turn To step 205;
Step 213:Judge whether the face of entity A has traveled through, if traversal is complete, go to step 214, if do not traveled through, go to Step 203;
Step 214:Step 201~step 213 is performed to entity B, the data of the entity A in step are changed into the data of entity B, The face of entity B is marked.
3. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step In 107, face F is judgedAWhether in the outside of entity B, comprise the following steps:
Step 301:Ask for axial bounding box B.max.X, B.max.Y of entity B, B.max.Z, B.min.X, B.min.Y, B.min.Z;Ask for face FAAxial bounding box FA.max.X、FA.max.Y、FA.max.Z、FA.min.X、FA.min.Y、 FA.min.Z;
Step 302:Judge FA.max.X whether it is less than B.min.X, if invalid, goes to step 303, if set up, goes to step Rapid 309;
Step 303:Judge FA.min.X whether it is more than B.max.X, if invalid, goes to step 304, if set up, goes to step Rapid 309;
Step 304:Judge FA.max.Y whether it is less than B.min.Y, if invalid, goes to step 305, if set up, goes to step Rapid 309;
Step 305:Judge FA.min.Y whether it is more than B.max.Y, if invalid, goes to step 306, if set up, goes to step Rapid 309;
Step 306:Judge FA.max.Z whether it is less than B.min.Z, if invalid, goes to step 307, if set up, goes to step Rapid 309;
Step 307:Judge FA.min.Z whether it is more than B.max.Z, if invalid, goes to step 308, if set up, goes to step Rapid 309;
Step 308:Face FANot necessarily in the outside of entity B;
Step 309:Face FAIn the outside of entity B.
4. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step In 109, face F is judgedAWith face FBIt is whether coplanar and be not inner ring surface in the same direction, comprise the following steps:
Step 401:Read the face F to have made marksAWith face FBData;
Step 402:Judgement face FAWith face FBMark value whether be all zero, if condition set up, go to step 403, otherwise turn To step 409;
Step 403:Face F is asked for respectivelyAWith face FBUnit normal vector and;
Step 404:Judge and whether equal, if equal, go to step 405, if unequal, go to step 409;
Step 405:From face FAWith face FBThe middle summit taken respectively on its outer shroud, and ensure that the two points are not same points, Taken point is denoted as point PotA and point PotB respectively;
Step 406:Make straight line with point PotA and point PotB, obtain its direction vector;
Step 407:Judgement face FAUnit normal vector and direction vector it is whether vertical, if vertically, going to step 408, otherwise turning To step 409;
Step 408:Face FAWith face FBIt is coplanar and be not inner ring surface in the same direction;
Step 409:Face FAWith face FBIt is unsatisfactory for coplanar and be not inner ring surface in the same direction.
5. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step In 115, opposite FAWith face FBThe union of planar polygons is carried out, operation result is stored in chained list _ out_, including it is following Step:
Step 501:Reading face FAWith face FBData;
Step 502:Judgement face FAWith face FBThe position relationship of outer shroud whether intersect, if intersecting, step 503 is gone to, if not It is intersecting, go to step 517;
Step 503:Defined label face FAWith face FBInner ring on whether have intersection point two array Minner_label [] and Cinner_label [], array size are respectively face FAWith face FBInner ring number, initialization array Minner_label [] and Cinner_label [] all mark values are 0;Judge through overlapping relation, if there is intersection point in inner ring, make two faces corresponding The mark value of inner ring is 1;
Step 504:Preservation face F is defined respectivelyAWith face FBSummit, intersection point information and intersection point come in and go out the array dataP [] of attribute With dataQ [], face F is definedAGo out an array out_point [];First by face FAWith face FBSummit be stored in array dataP respectively In [] and dataQ [], and it is 0 to make its property value, then obtains the intersection point of two face rings, and judges the discrepancy attribute of intersection point, if Intersection point is access point, then its property value is 1, if intersection point is a little, its property value is -1, by intersection point and its property value according to intersection point Position on ring is inserted respectively into array dataP [] and dataQ [];Simultaneously by face FAGo out a little to be deposited into array out_ In point [];Intersection point is that " access point " refers to face F at this pointASide enter face FB, intersection point is that " going out a little " refers at this point Face FASide have left face FB
Step 505:Judge whether boolean's difference operation mark sub_flag is true, if true, goes to step 516, if not True, then go to step 506;
Step 506:Judgement face FAWith face FBWhether there is inner ring, if inner ring, go to step 515, if without inner ring, go to Step 507;
Step 507:Go out a little from taking-up one in an array out_point [] is gone out, and be assigned to point variable PotTmp;
Step 508:In face FAArray data_P [] in find in order corresponding to go out a little;
Step 509:The point is stored in interim findings loop chain table loopTmp.Point_list, from the point in dataP [] Continue to travel through backward, run into summit and be then stored in chained list loopTmp.Point_list, run into access point then entering surface FBNumber Corresponding point is found in group dataQ [], and is stored in chained list loopTmp.Point_list, then from this in dataQ [] Point continues to travel through backward, and running into summit is stored in chained list loopTmp.Point_list, runs into for face FBAccess point then enter Enter face FAArray dataP [] in find corresponding point;
Step 510:Judge the point whether with point PotTmp for same point, if same point, go to step 511, if not Same point, go to step 509;
Step 511:Point in chained list loopTmp.Point_list is stored in loop chain table tmpFace_list, and empties chain Table loopTmp.Point_list;
Step 512:Judgement face FAGo out whether an array out_point [] has traveled through, if traversal is complete, go to step 513, such as Fruit has not traveled through, and goes to step 507;
Step 513:The normal vector of each ring in loop chain table tmpFace_list is asked for, judges itself and face FAOuter normal vector direction Whether identical, the identical person in direction is then outer shroud, and direction difference person is then inner ring;
Step 514:According to the storage order construction face chained list of inner ring after first outer shroud, by result be saved in union result chained list _ In out_;
Step 515:Mark value in array Minner_label [] and Cinner_label [] judges face FACorresponding nothing Intersection point inner ring and face FBThe going or staying problem of corresponding no intersection point inner ring, is divided into following two situations:The first situation, if face FA Inner ring in face FBOuter shroud outside, then the inner ring retain, if face FAInner ring in face FBOuter shroud inside and in face FB's Outside inner ring, then the inner ring does not retain, if face FAInner ring in face FBInner ring inside, then the inner ring retain;Second of feelings Condition, if face FBInner ring in face FAOuter shroud outside, then the inner ring retain, if face FBInner ring is in face FAOuter shroud in Face and in face FAInner ring outside, then the inner ring does not retain, if face FBInner ring in face FAInner ring inside, then the interior environmental protection Stay;The environmental protection of reservation is present in loop chain table tmpFace_list;
Step 516:By face FBDataQ [] in summit and intersection point reversed arrangement, put sub_flag=false, go to step 506;
Step 517:Judgement face FAWith face FBOuter relationship ofloops whether mutually from if mutually from step 518 being gone to, if not phase From going to step 519;
Step 518:By face FAInner and outer rings and face FBInner and outer rings be all stored in union result chained list _ out_;
Step 519:If face FAOuter shroud in face FBThe inside of outer shroud, then preserve face FBOuter shroud to union result chained list _ out_ In, if face FAOuter shroud in face FBThe outside of outer shroud, then preserve face FAOuter shroud into union result chained list _ out_, go to step Rapid 503.
6. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step In 123, post-processed, delete the face of repetition and suspension face, comprise the following steps:
Step 601:A face F is taken out from chained list body_list;
Step 602:Remaining face in addition to the F of face in chained list body_list is traveled through, if there is the face F repeated with face F1, then delete Face F1
Step 603:Judge whether the face in body_list has traveled through, if traversal is complete, go to step 604, if do not traveled through It is complete, go to step 601;
Step 604:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list;
Step 605:A face FF in body_list is taken in order, and Boolean denotation label, juxtaposition label=false are set;
Step 606:Defined variable count is the number that each summit of face FF outer shrouds occurs in chained list pt_list;
Step 607:A summit on the FF outer shrouds of face is taken, its number count occurred in pt_list is counted, works as count=1 When, make label=true;
Step 608:Judge whether to take summit all on the FF outer shrouds of face;If taken, step 609 is gone to, if do not taken It is complete, go to step 607;
Step 609:Judge whether label is equal to true, if condition is set up, go to step 612, if condition is invalid, turn To step 610;
Step 610:Judge whether to take the face in body_list, if taken, algorithm terminates, if do not taken, goes to Step 611;
Step 611:Label=false is made, a face is taken out in turn from body_list, is assigned to face FF, goes to step 607;
Step 612:Face FF is suspension face, and face FF is deleted from body_list, with seasonal label=false, empties chained list pt_ list;Suspension face is that the up to rare a line of finger ring does not have the face of adjacent surface;
Step 613:Face in body_list is traveled through one time, the summit in all faces is saved in a chained list pt_list;
Step 614:Again body_list is traveled through, takes one of face to be assigned to face FF in order, goes to step 607.
7. a kind of boolean's union method of three-dimensional planar entity according to claim 1, it is characterized in that:Shown step In 124, it is a face to merge two or more faces that are coplanar in the same direction and having coincidence line segment, is comprised the following steps:
Step 701:Definition storage meets the chained list Plane_list in all faces of coplanar condition in the same direction, after the storage face that defines merges Result chained list tmpPlane_list, define side chain table Line_list;
Step 702:A face F in body_list is taken, asks for face F unit normal vector;
Step 703:The next face for taking F faces by storage order is denoted as F1, ask for face F1Unit normal vector;
Step 704:Judgement face F and face F1It is whether coplanar in the same direction, if coplanar in the same direction, step 705 is gone to, otherwise goes to step 706;
Step 705:By face F1It is stored in chained list Plane_list, while face F is deleted in body_list1
Step 706:Judge whether the face in body_list takes, if taken, go to step 708, if do not taken, turn To step 707;
Step 707:From face F1A face is taken backward, is assigned to face F1, ask for face F1Unit normal vector, go to step 704;
Step 708:Whether the number in the face for judging to store in Plane_list is more than or equal to 1, if condition is set up, goes to step Rapid 709, if condition is invalid, go to step 714;
Step 709:Face F is stored in chained list Plane_list, and deletes the face F in body_list;
Step 710:The side in all faces in Plane_list is all stored in side chain table Line_list, in chained list Line_list It is middle to delete all coincidence line segments, while empty chained list Plane_list;
Step 711:Line segment in Line_list is joined end to end and constructs face ring;
Step 712:Short-term section that is conllinear in the face ring constructed in Line_list and having repetition point is merged into growth line segment;
Step 713:Construction face ring in Line_list is stored into chained list tmpPlane_list;
Step 714:Next face after the F of face is taken in body_list, is assigned to face F, asks for face F unit normal vector;
Step 715:Judge whether the face in body_list takes, if taken, go to step 716, if do not taken, turn To step 717;
Step 716:Face in the chained list tmpPlane_list of face is added in body_list;
Step 717:Take ought above F next face be assigned to face F1, ask for face F1Unit normal vector, go to step 704.
CN201710711666.1A 2017-08-18 2017-08-18 Boolean parallel operation method of three-dimensional plane entity Active CN107564103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710711666.1A CN107564103B (en) 2017-08-18 2017-08-18 Boolean parallel operation method of three-dimensional plane entity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710711666.1A CN107564103B (en) 2017-08-18 2017-08-18 Boolean parallel operation method of three-dimensional plane entity

Publications (2)

Publication Number Publication Date
CN107564103A true CN107564103A (en) 2018-01-09
CN107564103B CN107564103B (en) 2023-02-28

Family

ID=60976110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710711666.1A Active CN107564103B (en) 2017-08-18 2017-08-18 Boolean parallel operation method of three-dimensional plane entity

Country Status (1)

Country Link
CN (1) CN107564103B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782272A (en) * 2018-12-30 2019-05-21 中国电子科技集团公司第十五研究所 Boolean's fusion method of three-dimensional radar body

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134236A (en) * 2014-07-30 2014-11-05 西安电子科技大学 Boolean operation method of three-dimensional planar solids
CN106447777A (en) * 2016-10-21 2017-02-22 西南大学 Three-dimensional topological relation expressing and mapping achieved under support of Boolean operation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134236A (en) * 2014-07-30 2014-11-05 西安电子科技大学 Boolean operation method of three-dimensional planar solids
CN106447777A (en) * 2016-10-21 2017-02-22 西南大学 Three-dimensional topological relation expressing and mapping achieved under support of Boolean operation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PETER HACHENBERGER等: "Boolean operations on 3D selective Nef complexes: Data structure,algorithms, optimized implementation and experiments", 《COMPUTATIONAL GEOMETRY》 *
杨矿生: "实体布尔运算关键算法及其奇异情况处理研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782272A (en) * 2018-12-30 2019-05-21 中国电子科技集团公司第十五研究所 Boolean's fusion method of three-dimensional radar body

Also Published As

Publication number Publication date
CN107564103B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN104134236B (en) Boolean operation method of three-dimensional planar solids
Malik Interpreting line drawings of curved objects
Agarwal et al. Arrangements and their applications
Rossignac et al. SGC: A dimension-independent model for pointsets with internal structures and incomplete boundaries
Panozzo et al. Weighted averages on surfaces
CN107545025B (en) Querying databases using morphological criteria
Yuan et al. Multidimensional-unified topological relations computation: A hierarchical geometric algebra-based approach
CN101320486A (en) Curved body three-dimensional boundary representation model reconstruction method and device based on line boundary
Sun et al. Interpolating polyhedral models using intrinsic shape parameters
CN107564103A (en) A kind of boolean union method of three-dimensional planar entity
Kaul Computing Minkowski sums
Jiang et al. Efficient Booleans algorithms for triangulated meshes of geometric modeling
Hahmann et al. Shape interrogation
Bokowski A geometric realization without self-intersections does exist for Dyck's regular map
Coquereaux et al. Conjugation properties of tensor product multiplicities
Cheng et al. Determining the topology of real algebraic surfaces
CN105389851B (en) A kind of Loop subdivision implementation method based on vertex and the unified adjustment of new edge point
Weiss et al. Bisection-based triangulations of nested hypercubic meshes
Gu et al. Multiresolution computation of conformal structures of surfaces
Burstedde et al. Bounds on the number of discontinuities of Morton-type space-filling curves
Lindenbergh Limits of Voronoi diagrams
Xi et al. A novel region-growing based iso-surface extraction algorithm
Ma Research on Three-Dimensional Modeling and Algorithm of Torus in Packaging Structure Design
Suresh et al. THE SLICING ALGORITHM FOR FAST PROTOTYPE PRODUCTION HAS BEEN IMPROVED AND OPTIMISED
Ban et al. Graph based topological analysis of tessellated surfaces

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