1 -- GEOM PARTITION : partition algorithm
3 -- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 -- This library is free software; you can redistribute it and/or
7 -- modify it under the terms of the GNU Lesser General Public
8 -- License as published by the Free Software Foundation; either
9 -- version 2.1 of the License.
11 -- This library is distributed in the hope that it will be useful,
12 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
13 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 -- Lesser General Public License for more details.
16 -- You should have received a copy of the GNU Lesser General Public
17 -- License along with this library; if not, write to the Free Software
18 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 -- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 -- File : Partition_Inter3d.cdl
25 -- Author : Benedicte MARTIN
28 class Inter3d from Partition
30 ---Purpose: Computes the intersection face face in a set of faces
31 -- Store the result in a SD as AsDes.
36 DataMapOfShapeShape from TopTools,
37 MapOfShape from TopTools,
38 Boolean from Standard,
43 ListOfShape from TopTools,
46 DataMapOfShapeListOfShape from TopTools
49 Create returns Inter3d from Partition;
51 Create(AsDes : mutable AsDes from BRepAlgo);
53 CompletPart3d (me : in out; SetOfFaces1 : ListOfShape from TopTools;
54 FaceShapeMap: DataMapOfShapeShape from TopTools)
57 FacesPartition (me : in out; F1, F2 : Face from TopoDS)
60 ----------------------------
61 ---Category: Result Querying
62 ----------------------------
64 IsDone(me ; F1,F2 : Face from TopoDS)
65 returns Boolean from Standard is static;
66 ---Purpose: return True if F1-F2 pair has been processed
68 TouchedFaces(me : in out) returns MapOfShape from TopTools
71 ---Purpose: return map of faces cut by new or section edges
73 NewEdges(me : in out) returns MapOfShape from TopTools
76 ---Purpose: return new and section edges
78 AsDes(me) returns AsDes from BRepAlgo
80 ---Purpose: return an object containing info about
81 -- Ascendants | Descendants
82 -- ------------------+---------------------
83 -- 1. faces | edges cutting them
84 -- 2. sectoin edges | new vertices on them
87 -------------------------------
88 ---Category: Same domain shapes
89 -------------------------------
91 HasSameDomainF(me; F : Shape from TopoDS)
92 returns Boolean from Standard;
93 ---Purpose: Return true if F has same domain faces
95 IsSameDomainF(me; F1, F2 : Shape from TopoDS)
96 returns Boolean from Standard;
97 ---Purpose: Return true if F1 and F2 are same domain faces
99 SameDomain(me; F : Face from TopoDS)
100 returns ListOfShape from TopTools;
101 ---C++: return const &
102 ---Purpose: Return same domain faces of F
104 ReplaceSameDomainV (me; V : Vertex from TopoDS;
105 E : Edge from TopoDS)
106 returns Vertex from TopoDS;
107 ---Purpose: return same domain vertex of V if it was replaced
108 -- and make this vertex to be on E too, else return V
110 --------------------------
111 ---Category: Section edges
112 --------------------------
114 SectionEdgesAD (me) returns AsDes from BRepAlgo
117 IsSectionEdge (me; E : Edge from TopoDS)
118 returns Boolean from Standard;
119 ---Purpose: return True if E is an edge of an initial face and
120 -- E intersects aother face
122 HasSectionEdge (me; F : Face from TopoDS)
123 returns Boolean from Standard;
124 ---Purpose: return True if F is intersected by an edge of
127 IsSplitOn (me; NewE, OldE : Edge from TopoDS;
128 F : Face from TopoDS)
129 returns Boolean from Standard;
130 ---Purpose: return True if NewE is split of OldE on F;
131 -- no check if NewE is split of OldE :)
133 SectionEdgeFaces (me; SecE : Edge from TopoDS)
134 returns ListOfShape from TopTools;
135 ---C++: return const&
136 ---Purpose: return faces cut by section edge
142 Inter3D (me: in out; F1, F2 : Face from TopoDS;
143 LInt : in out ListOfShape from TopTools)
146 StorePart3d(me : in out; F1,F2 : Face from TopoDS;
147 LInt1 : ListOfShape from TopTools)
150 SetDone(me : in out; F1,F2 : Face from TopoDS)
153 Affiche (me; SetOfFaces : ListOfShape from TopTools)
158 myAsDes : AsDes from BRepAlgo;
159 myDone : DataMapOfShapeListOfShape from TopTools;
160 myTouched : MapOfShape from TopTools;
161 myNewEdges : MapOfShape from TopTools;
163 -- section edges: existing edges that are intersection lines,
166 -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
167 mySectionEdgesAD : AsDes from BRepAlgo;
169 -- same domain shapes
171 mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
172 -- vertex -> vertex replacement
173 mySameDomainVM : DataMapOfShapeShape from TopTools;