1 -- Created on: 1995-09-04
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class SplitShape from BRepFeat inherits MakeShape from BRepBuilderAPI
19 ---Purpose: One of the most significant aspects of BRepFeat functionality is the use of local
20 -- operations as opposed to global ones. In a global operation, you would first construct a
21 -- form of the type you wanted in your final feature, and then remove matter so that it could
22 -- fit into your initial basis object. In a local operation, however, you specify the domain of
23 -- the feature construction with aspects of the shape on which the feature is being created.
24 -- These semantics are expressed in terms of a member shape of the basis shape from which -
25 -- or up to which - matter will be added or removed. As a result, local operations make
26 -- calculations simpler and faster than global operations.
27 -- In BRepFeat, the semantics of local operations define features constructed from a contour or a
28 -- part of the basis shape referred to as the tool. In a SplitShape object, wires or edges of a
29 -- face in the basis shape to be used as a part of the feature are cut out and projected to a plane
30 -- outside or inside the basis shape. By rebuilding the initial shape incorporating the edges and
31 -- the faces of the tool, protrusion or depression features can be constructed.
34 uses Spliter from LocOpe,
35 WiresOnShape from LocOpe,
42 ListOfShape from TopTools,
43 ShapeModification from BRepBuilderAPI
45 raises NotDone from StdFail,
46 ConstructionError from Standard,
47 NoSuchObject from Standard
53 ---Purpose: Empty constructor
54 returns SplitShape from BRepFeat;
58 Create(S: Shape from TopoDS)
59 ---Purpose: Creates the process with the shape <S>.
60 returns SplitShape from BRepFeat;
64 Init(me: in out; S: Shape from TopoDS)
65 ---Purpose: Initializes the process on the shape <S>.
69 SetCheckInterior(me: in out; ToCheckInterior: Boolean from Standard)
70 ---Purpose: Set the flag of check internal intersections
71 -- default value is True (to check)
75 Add(me: in out; W: Wire from TopoDS;
77 ---Purpose: Adds the wire <W> on the face <F>.
78 -- Raises NoSuchObject if <F> does not belong to the original shape.
80 raises NoSuchObject from Standard,
81 ConstructionError from Standard
87 Add(me: in out; E: Edge from TopoDS;
89 ---Purpose: Adds the edge <E> on the face <F>.
91 raises NoSuchObject from Standard,
92 -- if <F> does not belong to the original shape.
93 ConstructionError from Standard
97 Add(me: in out; Comp: Compound from TopoDS;
99 ---Purpose: Adds the compound <Comp> on the face <F>. The
100 -- compound <Comp> must consist of edges lying on the
101 -- face <F>. If edges are geometrically connected,
102 -- they must be connected topologically, i.e. they
103 -- must share common vertices.
105 -- Raises NoSuchObject if <F> does not belong to the original shape.
107 raises NoSuchObject from Standard,
108 ConstructionError from Standard
113 Add(me: in out; E : Edge from TopoDS;
114 EOn: Edge from TopoDS)
115 ---Purpose: Adds the edge <E> on the existing edge <EOn>.
117 raises NoSuchObject from Standard,
118 -- if <EOn> does not belong to the original shape.
119 ConstructionError from Standard
125 ---Purpose: Returns the faces which are the left of the
127 returns ListOfShape from TopTools
128 ---C++: return const&
129 raises NotDone from StdFail
130 --- The exception is raised when IsDone returns <Standard_False>.
135 ---Purpose: Returns the faces of the "left" part on the shape.
136 -- (It is build from DirectLeft, with the faces
137 -- connected to this set, and so on...).
138 -- Raises NotDone if IsDone returns <Standard_False>.
139 ---C++: return const&
140 returns ListOfShape from TopTools
141 raises NotDone from StdFail
145 --- Methods inherited from MakeShape, that must be redefined.
151 --- Purpose: Builds the cut and the resulting faces and edges as well.
152 IsDeleted (me: in out; S : Shape from TopoDS)
155 ---Purpose: Returns true if the shape has been deleted.
157 Modified(me: in out; F: Shape from TopoDS)
158 ---Purpose: Returns the list of generated Faces.
159 ---C++: return const &
160 returns ListOfShape from TopTools
165 mySShape : Spliter from LocOpe;
166 myWOnShape : WiresOnShape from LocOpe;