0022946: BRepFeat_SplitShape crashes on splitting a face by two edges
[occt.git] / src / LocOpe / LocOpe_SplitShape.cdl
CommitLineData
b311480e 1-- Created on: 1995-07-11
2-- Created by: Jacques GOUSSARD
3-- Copyright (c) 1995-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23class SplitShape from LocOpe
24
25 ---Purpose: Provides a tool to cut :
26 -- - edges with a vertices,
27 -- - faces with wires,
28 -- and rebuilds the shape containing the edges and
29 -- the faces.
30
31
32uses Vertex from TopoDS,
33 Edge from TopoDS,
34 Wire from TopoDS,
35 Face from TopoDS,
36 Shape from TopoDS,
37 ListOfShape from TopTools,
38 MapOfShape from TopTools,
39 DataMapOfShapeListOfShape from TopTools
40
41raises NotDone from StdFail,
42 ConstructionError from Standard,
43 NoSuchObject from Standard
44
45is
46
47 Create
48 ---Purpose: Empty constructor.
49 returns SplitShape from LocOpe;
50 ---C++: inline
51
52
53 Create(S: Shape from TopoDS)
54 ---Purpose: Creates the process with the shape <S>.
55 returns SplitShape from LocOpe;
56 ---C++: inline
57
58
59 Init(me: in out; S: Shape from TopoDS)
60 ---Purpose: Initializes the process on the shape <S>.
61 is static;
62
63
64 CanSplit(me; E: Edge from TopoDS)
65 ---Purpose: Tests if it is possible to split the edge <E>.
66 returns Boolean from Standard
67 is static;
68
69
70 Add(me: in out; V: Vertex from TopoDS;
71 P: Real from Standard;
72 E: Edge from TopoDS)
73
74 ---Purpose: Adds the vertex <V> on the edge <E>, at parameter <P>.
75 raises ConstructionError from Standard
76 -- The exception ConstructionError is raised if CanSplit
77 -- returns Standard_False, or if P is not inside the
78 -- parametric bounds <E>.
79
80 is static;
81
82
83 Add(me: in out; W: Wire from TopoDS;
84 F: Face from TopoDS)
85 ---Purpose: Adds the wire <W> on the face <F>.
86 raises NoSuchObject from Standard,
87 -- if <F> does not belong to the original shape.
88 ConstructionError from Standard
89 -- for a closed wire, if it is not included in a
90 -- sub-face of <F>
91 -- for an open wire, if it does not begin and end on
92 -- wire(s) of a sub-face of <F>
93 is static;
94
ed60a55e 95 Add(me: in out; Lwires: ListOfShape from TopTools;
96 F: Face from TopoDS)
97 ---Purpose: Adds the list of wires <Lwires> on the face <F>.
98 raises NoSuchObject from Standard,
99 -- if <F> does not belong to the original shape.
100 ConstructionError from Standard
101 is static;
102
7fd59977 103
104 Shape(me)
105 ---Purpose: Returns the "original" shape.
106 returns Shape from TopoDS
107 ---C++: return const&
108 ---C++: inline
109 is static;
110
111
112 DescendantShapes(me: in out; S: Shape from TopoDS)
113 ---Purpose: Returns the list of descendant shapes of <S>.
114 returns ListOfShape from TopTools
115 ---C++: return const&
116 raises NoSuchObject from Standard
117 is static;
118
119
120 LeftOf(me: in out; W: Wire from TopoDS; F: Face from TopoDS)
121 ---Purpose: Returns the "left" part defined by the wire <W> on
122 -- the face <F>. The returned list of shape is in
123 -- fact a list of faces. The face <F> is considered
124 -- with its topological orientation in the original
125 -- shape. <W> is considered with its orientation.
126
127 returns ListOfShape from TopTools
128 ---C++: return const&
129 raises NoSuchObject from Standard
130 -- The exception is raised if the shape is null or does not
131 -- contain the face.
132 is static;
133
134
135--
136--
137-- -- Private implementation methods
138
139 AddOpenWire(me: in out; W: Wire from TopoDS; F: Face from TopoDS)
140
141 is static private;
142
143
144 AddClosedWire(me: in out; W: Wire from TopoDS; F: Face from TopoDS)
145
146 is static private;
147
148
149 Put(me: in out; S: Shape from TopoDS)
150 is static private;
151
152
153 Rebuild(me: in out; S: Shape from TopoDS)
154 returns Boolean from Standard
155 is static private;
156
157
158
159fields
160
161 myDone : Boolean from Standard;
162 myShape : Shape from TopoDS;
163 myMap : DataMapOfShapeListOfShape from TopTools;
164 myDblE : MapOfShape from TopTools;
165 myLeft : ListOfShape from TopTools;
166
167end SplitShape;