1 -- File : Partition_Spliter.cdl
2 -- Created: Thu Aug 02 16:07:39 2001
3 -- Author : Benedicte MARTIN
4 ---Copyright: OPEN CASCADE 2001
6 class Spliter from Partition
8 ---Purpose: Split solids, shells and faces into parts of the
9 -- same topology if reconstruction level is not
13 Inter3d from Partition,
14 Loop2d from Partition,
16 ShapeEnum from TopAbs,
21 MapOfOrientedShape from TopTools,
22 IndexedMapOfShape from TopTools,
23 DataMapOfShapeShape from TopTools,
24 ListOfShape from TopTools,
25 MapOfShape from TopTools,
30 Create returns Spliter from Partition;
31 ---Purpose: constructor
33 AddShape ( me : in out; S : Shape from TopoDS);
34 ---Purpose: add object Shape to be splitted.
35 -- If S is a COMPOUND or COMPSOLID, it will be
36 -- exploded in order to get more simple object
38 -- Object shapes that are vertices, edges or wires
39 -- won't be splitted and won't be in a result.
41 AddTool ( me : in out; S : Shape from TopoDS);
42 ---Purpose: add cutting tool
44 Compute (me : in out; Limit : ShapeEnum from TopAbs
46 ---Purpose: produce a result which is a compound of parts of
47 -- object shapes. A part can be either a vertex,
48 -- edge, wire, face, shell or solid.
49 -- By default, a part is of the same topology as an
50 -- object shape, else <Limit> restricts parts
52 -- If <Limit> == TopAbs_VERTEX, only new vertices are
53 -- returned in the result
55 KeepShapesInside (me : in out; S : Shape from TopoDS);
56 ---Purpose: remove shapes that are outside of S from result.
57 -- S should be an object shape.
58 ---Warning: call it after Compute()
60 RemoveShapesInside (me : in out; S : Shape from TopoDS);
61 ---Purpose: remove shapes that are inside S from result.
62 -- S should be an object shape.
63 ---Warning: call it after Compute()
65 Shape ( me ) returns Shape from TopoDS;
66 ---Purpose: return resulting compound
69 ---Purpose: clear fields
72 ---Category: private methods
75 MakeShells (me: in out; S : Shape from TopoDS;
76 NS: in out ListOfShape from TopTools) is private;
77 ---Purpose: split S into shells
79 MakeFaces (me: in out; S : Shape from TopoDS)
80 returns Shape from TopoDS is private;
81 ---Purpose: split faces of S, return compound of new faces
85 VOnE : ListOfShape from TopTools;
86 NE : in out ListOfShape from TopTools)
88 ---Purpose: cut E by vertices VOnE, return list of new edges
91 FindFacesInside (me: in out; S : Shape from TopoDS;
92 CheckClosed : Boolean = Standard_False;
93 All : Boolean = Standard_False)
94 returns Shape from TopoDS is private;
95 ---Purpose: return compound of faces of other shapes that are
96 -- inside <S>. <S> must have image in myImageShape.
97 -- <CheckClosed> makes avoid faces that do not form a
99 -- <All> makes return already added faces
101 CheckTool ( me: in out; S : Shape from TopoDS)
102 returns Boolean from Standard is private;
103 ---Purpose: Return True if <S> is a tool shape. Prepare tool
104 -- faces of <S> for the search of internal faces.
106 MergeEqualEdges (me: in out; LE : ListOfShape from TopTools) is private;
107 ---Purpose: among LE, find equal edges, choose ones to keep
108 -- and make them have pcurves on all faces they are
110 -- <LE> contains edge splits
114 myDoneStep : ShapeEnum from TopAbs; -- reconstructed topology
115 myShape : Compound from TopoDS; -- result
116 myBuilder : Builder from BRep;
118 myListShapes : ListOfShape from TopTools; -- object shapes
119 myMapFaces : MapOfShape from TopTools; -- object faces
120 myMapTools : MapOfShape from TopTools; -- tool faces
121 myFaceShapeMap : DataMapOfShapeShape from TopTools; -- to find a shape by face
123 myNewSection : MapOfShape from TopTools; -- new secton edges
125 myAsDes : AsDes from BRepAlgo;
126 myImagesFaces : Image from BRepAlgo;
127 myImagesEdges : Image from BRepAlgo;
128 myImageShape : Image from BRepAlgo;
130 -- contains info of same domain shapes and section edges
131 myInter3d : Inter3d from Partition;
133 -- avoid rebuilding twice commont part of solids
134 myAddedFacesMap: MapOfOrientedShape from TopTools;
137 myEqualEdges : MapOfShape from TopTools;
139 -- shape and its internal faces
140 myInternalFaces: DataMapOfShapeShape from TopTools;