1 -- Created on: 1994-10-03
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1994-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 Evolved from BRepFill
19 ---Purpose: Constructs an evolved volume from a spine (wire or face)
20 -- and a profile ( wire).
30 JoinType from GeomAbs,
31 ListOfShape from TopTools,
32 DataMapOfShapeShape from TopTools,
33 DataMapOfShapeDataMapOfShapeListOfShape from BRepFill,
34 BisectingLocus from BRepMAT2d,
35 LinkTopoBilo from BRepMAT2d,
40 ConstructionError from Standard,
41 NoSuchObject from Standard
47 Create returns Evolved from BRepFill;
49 Create ( Spine : Wire from TopoDS;
50 Profile : Wire from TopoDS;
51 AxeProf : Ax3 from gp;
52 Join : JoinType from GeomAbs = GeomAbs_Arc;
53 Solid : Boolean from Standard = Standard_False)
54 returns Evolved from BRepFill
55 ---Purpose: Creates an evolved shape by sweeping the <Profile>
56 -- along the <Spine>. <AxeProf> is used to set the
57 -- position of <Profile> along <Spine> as follows:
58 -- <AxeProf> slides on the profile with direction
59 -- colinear to the normal to <Spine>, and its
60 -- <XDirection> mixed with the tangent to <Spine>.
63 ConstructionError from Standard;
65 Create ( Spine : Face from TopoDS;
66 Profile : Wire from TopoDS;
67 AxeProf : Ax3 from gp;
68 Join : JoinType from GeomAbs = GeomAbs_Arc;
69 Solid : Boolean from Standard = Standard_False)
70 returns Evolved from BRepFill
71 ---Purpose: Creates an evolved shape by sweeping the <Profile>
74 ConstructionError from Standard;
77 Spine : Wire from TopoDS;
78 Profile : Wire from TopoDS;
79 AxeProf : Ax3 from gp;
80 Join : JoinType from GeomAbs = GeomAbs_Arc;
81 Solid : Boolean from Standard = Standard_False)
82 ---Purpose: Performs an evolved shape by sweeping the <Profile>
85 ConstructionError from Standard
89 Spine : Face from TopoDS;
90 Profile : Wire from TopoDS;
91 AxeProf : Ax3 from gp;
92 Join : JoinType from GeomAbs = GeomAbs_Arc;
93 Solid : Boolean from Standard = Standard_False)
94 ---Purpose: Performs an evolved shape by sweeping the <Profile>
97 ConstructionError from Standard
102 returns Boolean from Standard
105 Shape(me) returns Shape from TopoDS
106 ---Purpose: returns the generated shape.
107 ---C++ : return const &
110 GeneratedShapes (me ;
111 SpineShape : Shape from TopoDS;
112 ProfShape : Shape from TopoDS)
113 ---Purpose: Returns the shapes created from a subshape
114 -- <SpineShape> of the spine and a subshape
115 -- <ProfShape> on the profile.
117 ---C++ : return const &
118 returns ListOfShape from TopTools
121 JoinType (me) returns JoinType from GeomAbs
125 Top (me) returns Shape from TopoDS
126 ---Purpose: Return the face Top if <Solid> is True in the constructor.
127 ---C++ : return const &
130 Bottom (me) returns Shape from TopoDS
131 ---Purpose: Return the face Bottom if <Solid> is True in the constructor.
132 ---C++ : return const &
138 PrivatePerform (me : in out;
139 Spine : Face from TopoDS;
140 Profile : Wire from TopoDS;
141 AxeProf : Ax3 from gp;
142 Join : JoinType from GeomAbs = GeomAbs_Arc;
143 Solid : Boolean from Standard = Standard_False)
145 ConstructionError from Standard
148 SetWork (me : in out;
149 Spine : Face from TopoDS;
150 Profile : Wire from TopoDS)
153 ElementaryPerform ( me : in out;
154 Spine : Face from TopoDS;
155 Profile : Wire from TopoDS;
156 Locus : BisectingLocus from BRepMAT2d;
157 Link : in out LinkTopoBilo from BRepMAT2d;
158 Join : JoinType from GeomAbs = GeomAbs_Arc)
160 ConstructionError from Standard
163 PlanarPerform ( me : in out;
164 Spine : Face from TopoDS;
165 Profile : Wire from TopoDS;
166 Locus : BisectingLocus from BRepMAT2d;
167 Link : in out LinkTopoBilo from BRepMAT2d;
168 Join : JoinType from GeomAbs = GeomAbs_Arc)
170 ConstructionError from Standard
173 VerticalPerform ( me : in out;
174 Spine : Face from TopoDS;
175 Profile : Wire from TopoDS;
176 Locus : BisectingLocus from BRepMAT2d;
177 Link : in out LinkTopoBilo from BRepMAT2d;
178 Join : JoinType from GeomAbs = GeomAbs_Arc)
180 ConstructionError from Standard
183 Generated (me : in out )
185 returns DataMapOfShapeDataMapOfShapeListOfShape from BRepFill
188 Add ( me : in out; Vevo : in out Evolved from BRepFill;
189 Prof : Wire from TopoDS;
190 Glue : in out Quilt from BRepTools)
193 ChangeShape(me : in out) returns Shape from TopoDS
197 Transfert( me : in out;
198 Vevo : in out Evolved from BRepFill;
199 MapProf : DataMapOfShapeShape from TopTools;
200 MapSpine : DataMapOfShapeShape from TopTools;
201 LS, InitLS, InitLP : Location from TopLoc)
204 PrepareProfile ( me ; WorkProf : in out ListOfShape from TopTools;
205 MapProf : in out DataMapOfShapeShape from TopTools)
206 ---Purpose: Prepare the profil as follow
207 -- - Project the profile in the yOz Plane
208 -- - Cut the profile at the extrema of distance from the
209 -- Profile to the Oz Axis.
210 -- - building the new wires with the cutting edges.
213 PrepareSpine ( me ; WorkSpine : in out Face from TopoDS ;
214 SpineProf : in out DataMapOfShapeShape from TopTools)
215 ---Purpose: Prepare the spine as follow
216 -- - Cut the spine-Edges at the extrema of curvature and
217 -- at the inflexion points.
220 MakePipe (me : in out; SpineEdge : Edge from TopoDS ;
221 ProfRef : Ax3 from gp)
224 MakeRevol(me : in out; SpineEdge : Edge from TopoDS;
225 SpineVertex : Vertex from TopoDS;
226 ProfRef : Ax3 from gp)
229 FindLocation(me; Face : Face from TopoDS)
230 returns Location from TopLoc
231 ---Purpose: Find the location transforming the planar shape <Shape>
233 raises NoSuchObject from Standard
234 ---Purpose: if the Shape is not planar.
237 TransformInitWork(me : in out; LS , LP : Location from TopLoc)
238 ---Purpose: Apply the Location <LS> to <mySpine> and <LP> to
240 -- in order to set the Shapes in the work space.
243 ContinuityOnOffsetEdge (me : in out; WorkProf : ListOfShape from TopTools)
246 AddTopAndBottom (me : in out;Glue : in out Quilt from BRepTools)
249 MakeSolid(me : in out)
255 mySpine : Face from TopoDS;
256 myProfile : Wire from TopoDS;
257 myShape : Shape from TopoDS;
258 myIsDone : Boolean from Standard;
259 mySpineType : Boolean from Standard; -- True : Face ; False : Wire
260 myJoinType : JoinType from GeomAbs;
261 myMap : DataMapOfShapeDataMapOfShapeListOfShape from BRepFill;
262 myTop : Shape from TopoDS;
263 myBottom : Shape from TopoDS;