1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 -- GEOM PARTITION : partition algorithm
22 -- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
23 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
25 -- This library is free software; you can redistribute it and/or
26 -- modify it under the terms of the GNU Lesser General Public
27 -- License as published by the Free Software Foundation; either
28 -- version 2.1 of the License.
30 -- This library is distributed in the hope that it will be useful,
31 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
32 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33 -- Lesser General Public License for more details.
35 -- You should have received a copy of the GNU Lesser General Public
36 -- License along with this library; if not, write to the Free Software
37 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
43 -- File : Partition_Inter3d.cdl
44 -- Author : Benedicte MARTIN
47 class Inter3d from Partition
49 ---Purpose: Computes the intersection face face in a set of faces
50 -- Store the result in a SD as AsDes.
55 DataMapOfShapeShape from TopTools,
56 MapOfShape from TopTools,
57 Boolean from Standard,
62 ListOfShape from TopTools,
65 DataMapOfShapeListOfShape from TopTools
68 Create returns Inter3d from Partition;
70 Create(AsDes : mutable AsDes from BRepAlgo);
72 CompletPart3d (me : in out; SetOfFaces1 : ListOfShape from TopTools;
73 FaceShapeMap: DataMapOfShapeShape from TopTools)
76 FacesPartition (me : in out; F1, F2 : Face from TopoDS)
79 ----------------------------
80 ---Category: Result Querying
81 ----------------------------
83 IsDone(me ; F1,F2 : Face from TopoDS)
84 returns Boolean from Standard is static;
85 ---Purpose: return True if F1-F2 pair has been processed
87 TouchedFaces(me : in out) returns MapOfShape from TopTools
90 ---Purpose: return map of faces cut by new or section edges
92 NewEdges(me : in out) returns MapOfShape from TopTools
95 ---Purpose: return new and section edges
97 AsDes(me) returns AsDes from BRepAlgo
99 ---Purpose: return an object containing info about
100 -- Ascendants | Descendants
101 -- ------------------+---------------------
102 -- 1. faces | edges cutting them
103 -- 2. sectoin edges | new vertices on them
106 -------------------------------
107 ---Category: Same domain shapes
108 -------------------------------
110 HasSameDomainF(me; F : Shape from TopoDS)
111 returns Boolean from Standard;
112 ---Purpose: Return true if F has same domain faces
114 IsSameDomainF(me; F1, F2 : Shape from TopoDS)
115 returns Boolean from Standard;
116 ---Purpose: Return true if F1 and F2 are same domain faces
118 SameDomain(me; F : Face from TopoDS)
119 returns ListOfShape from TopTools;
120 ---C++: return const &
121 ---Purpose: Return same domain faces of F
123 ReplaceSameDomainV (me; V : Vertex from TopoDS;
124 E : Edge from TopoDS)
125 returns Vertex from TopoDS;
126 ---Purpose: return same domain vertex of V if it was replaced
127 -- and make this vertex to be on E too, else return V
129 --------------------------
130 ---Category: Section edges
131 --------------------------
133 SectionEdgesAD (me) returns AsDes from BRepAlgo
136 IsSectionEdge (me; E : Edge from TopoDS)
137 returns Boolean from Standard;
138 ---Purpose: return True if E is an edge of an initial face and
139 -- E intersects aother face
141 HasSectionEdge (me; F : Face from TopoDS)
142 returns Boolean from Standard;
143 ---Purpose: return True if F is intersected by an edge of
146 IsSplitOn (me; NewE, OldE : Edge from TopoDS;
147 F : Face from TopoDS)
148 returns Boolean from Standard;
149 ---Purpose: return True if NewE is split of OldE on F;
150 -- no check if NewE is split of OldE :)
152 SectionEdgeFaces (me; SecE : Edge from TopoDS)
153 returns ListOfShape from TopTools;
154 ---C++: return const&
155 ---Purpose: return faces cut by section edge
161 Inter3D (me: in out; F1, F2 : Face from TopoDS;
162 LInt : in out ListOfShape from TopTools)
165 StorePart3d(me : in out; F1,F2 : Face from TopoDS;
166 LInt1 : ListOfShape from TopTools)
169 SetDone(me : in out; F1,F2 : Face from TopoDS)
172 Affiche (me; SetOfFaces : ListOfShape from TopTools)
177 myAsDes : AsDes from BRepAlgo;
178 myDone : DataMapOfShapeListOfShape from TopTools;
179 myTouched : MapOfShape from TopTools;
180 myNewEdges : MapOfShape from TopTools;
182 -- section edges: existing edges that are intersection lines,
185 -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
186 mySectionEdgesAD : AsDes from BRepAlgo;
188 -- same domain shapes
190 mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
191 -- vertex -> vertex replacement
192 mySameDomainVM : DataMapOfShapeShape from TopTools;