1 -- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 -- Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 -- File : Partition_Inter3d.cdl
23 -- Author : Benedicte MARTIN
26 class Inter3d from Partition
28 ---Purpose: Computes the intersection face face in a set of faces
29 -- Store the result in a SD as AsDes.
34 DataMapOfShapeShape from TopTools,
35 MapOfShape from TopTools,
36 Boolean from Standard,
41 ListOfShape from TopTools,
44 DataMapOfShapeListOfShape from TopTools
47 Create returns Inter3d from Partition;
49 Create(AsDes : mutable AsDes from BRepAlgo);
51 CompletPart3d (me : in out; SetOfFaces1 : ListOfShape from TopTools;
52 FaceShapeMap: DataMapOfShapeShape from TopTools)
55 FacesPartition (me : in out; F1, F2 : Face from TopoDS)
58 ----------------------------
59 ---Category: Result Querying
60 ----------------------------
62 IsDone(me ; F1,F2 : Face from TopoDS)
63 returns Boolean from Standard is static;
64 ---Purpose: return True if F1-F2 pair has been processed
66 TouchedFaces(me : in out) returns MapOfShape from TopTools
69 ---Purpose: return map of faces cut by new or section edges
71 NewEdges(me : in out) returns MapOfShape from TopTools
74 ---Purpose: return new and section edges
76 AsDes(me) returns AsDes from BRepAlgo
78 ---Purpose: return an object containing info about
79 -- Ascendants | Descendants
80 -- ------------------+---------------------
81 -- 1. faces | edges cutting them
82 -- 2. sectoin edges | new vertices on them
85 -------------------------------
86 ---Category: Same domain shapes
87 -------------------------------
89 HasSameDomainF(me; F : Shape from TopoDS)
90 returns Boolean from Standard;
91 ---Purpose: Return true if F has same domain faces
93 IsSameDomainF(me; F1, F2 : Shape from TopoDS)
94 returns Boolean from Standard;
95 ---Purpose: Return true if F1 and F2 are same domain faces
97 SameDomain(me; F : Face from TopoDS)
98 returns ListOfShape from TopTools;
99 ---C++: return const &
100 ---Purpose: Return same domain faces of F
102 ReplaceSameDomainV (me; V : Vertex from TopoDS;
103 E : Edge from TopoDS)
104 returns Vertex from TopoDS;
105 ---Purpose: return same domain vertex of V if it was replaced
106 -- and make this vertex to be on E too, else return V
108 --------------------------
109 ---Category: Section edges
110 --------------------------
112 SectionEdgesAD (me) returns AsDes from BRepAlgo
115 IsSectionEdge (me; E : Edge from TopoDS)
116 returns Boolean from Standard;
117 ---Purpose: return True if E is an edge of an initial face and
118 -- E intersects aother face
120 HasSectionEdge (me; F : Face from TopoDS)
121 returns Boolean from Standard;
122 ---Purpose: return True if F is intersected by an edge of
125 IsSplitOn (me; NewE, OldE : Edge from TopoDS;
126 F : Face from TopoDS)
127 returns Boolean from Standard;
128 ---Purpose: return True if NewE is split of OldE on F;
129 -- no check if NewE is split of OldE :)
131 SectionEdgeFaces (me; SecE : Edge from TopoDS)
132 returns ListOfShape from TopTools;
133 ---C++: return const&
134 ---Purpose: return faces cut by section edge
140 Inter3D (me: in out; F1, F2 : Face from TopoDS;
141 LInt : in out ListOfShape from TopTools)
144 StorePart3d(me : in out; F1,F2 : Face from TopoDS;
145 LInt1 : ListOfShape from TopTools)
148 SetDone(me : in out; F1,F2 : Face from TopoDS)
151 Affiche (me; SetOfFaces : ListOfShape from TopTools)
156 myAsDes : AsDes from BRepAlgo;
157 myDone : DataMapOfShapeListOfShape from TopTools;
158 myTouched : MapOfShape from TopTools;
159 myNewEdges : MapOfShape from TopTools;
161 -- section edges: existing edges that are intersection lines,
164 -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
165 mySectionEdgesAD : AsDes from BRepAlgo;
167 -- same domain shapes
169 mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
170 -- vertex -> vertex replacement
171 mySameDomainVM : DataMapOfShapeShape from TopTools;