1 -- Created on: 1994-10-03
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1994-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class Evolved from BRepFill
25 ---Purpose: Constructs an evolved volume from a spine (wire or face)
26 -- and a profile ( wire).
36 JoinType from GeomAbs,
37 ListOfShape from TopTools,
38 DataMapOfShapeShape from TopTools,
39 DataMapOfShapeDataMapOfShapeListOfShape from BRepFill,
40 BisectingLocus from BRepMAT2d,
41 LinkTopoBilo from BRepMAT2d,
46 ConstructionError from Standard,
47 NoSuchObject from Standard
53 Create returns Evolved from BRepFill;
55 Create ( Spine : Wire from TopoDS;
56 Profile : Wire from TopoDS;
57 AxeProf : Ax3 from gp;
58 Join : JoinType from GeomAbs = GeomAbs_Arc;
59 Solid : Boolean from Standard = Standard_False)
60 returns Evolved from BRepFill
61 ---Purpose: Creates an evolved shape by sweeping the <Profile>
62 -- along the <Spine>. <AxeProf> is used to set the
63 -- position of <Profile> along <Spine> as follows:
64 -- <AxeProf> slides on the profile with direction
65 -- colinear to the normal to <Spine>, and its
66 -- <XDirection> mixed with the tangent to <Spine>.
69 ConstructionError from Standard;
71 Create ( Spine : Face from TopoDS;
72 Profile : Wire from TopoDS;
73 AxeProf : Ax3 from gp;
74 Join : JoinType from GeomAbs = GeomAbs_Arc;
75 Solid : Boolean from Standard = Standard_False)
76 returns Evolved from BRepFill
77 ---Purpose: Creates an evolved shape by sweeping the <Profile>
80 ConstructionError from Standard;
83 Spine : Wire from TopoDS;
84 Profile : Wire from TopoDS;
85 AxeProf : Ax3 from gp;
86 Join : JoinType from GeomAbs = GeomAbs_Arc;
87 Solid : Boolean from Standard = Standard_False)
88 ---Purpose: Performs an evolved shape by sweeping the <Profile>
91 ConstructionError from Standard
95 Spine : Face from TopoDS;
96 Profile : Wire from TopoDS;
97 AxeProf : Ax3 from gp;
98 Join : JoinType from GeomAbs = GeomAbs_Arc;
99 Solid : Boolean from Standard = Standard_False)
100 ---Purpose: Performs an evolved shape by sweeping the <Profile>
103 ConstructionError from Standard
108 returns Boolean from Standard
111 Shape(me) returns Shape from TopoDS
112 ---Purpose: returns the generated shape.
113 ---C++ : return const &
116 GeneratedShapes (me ;
117 SpineShape : Shape from TopoDS;
118 ProfShape : Shape from TopoDS)
119 ---Purpose: Returns the shapes created from a subshape
120 -- <SpineShape> of the spine and a subshape
121 -- <ProfShape> on the profile.
123 ---C++ : return const &
124 returns ListOfShape from TopTools
127 JoinType (me) returns JoinType from GeomAbs
131 Top (me) returns Shape from TopoDS
132 ---Purpose: Return the face Top if <Solid> is True in the constructor.
133 ---C++ : return const &
136 Bottom (me) returns Shape from TopoDS
137 ---Purpose: Return the face Bottom if <Solid> is True in the constructor.
138 ---C++ : return const &
144 PrivatePerform (me : in out;
145 Spine : Face from TopoDS;
146 Profile : Wire from TopoDS;
147 AxeProf : Ax3 from gp;
148 Join : JoinType from GeomAbs = GeomAbs_Arc;
149 Solid : Boolean from Standard = Standard_False)
151 ConstructionError from Standard
154 SetWork (me : in out;
155 Spine : Face from TopoDS;
156 Profile : Wire from TopoDS)
159 ElementaryPerform ( me : in out;
160 Spine : Face from TopoDS;
161 Profile : Wire from TopoDS;
162 Locus : BisectingLocus from BRepMAT2d;
163 Link : in out LinkTopoBilo from BRepMAT2d;
164 Join : JoinType from GeomAbs = GeomAbs_Arc)
166 ConstructionError from Standard
169 PlanarPerform ( me : in out;
170 Spine : Face from TopoDS;
171 Profile : Wire from TopoDS;
172 Locus : BisectingLocus from BRepMAT2d;
173 Link : in out LinkTopoBilo from BRepMAT2d;
174 Join : JoinType from GeomAbs = GeomAbs_Arc)
176 ConstructionError from Standard
179 VerticalPerform ( me : in out;
180 Spine : Face from TopoDS;
181 Profile : Wire from TopoDS;
182 Locus : BisectingLocus from BRepMAT2d;
183 Link : in out LinkTopoBilo from BRepMAT2d;
184 Join : JoinType from GeomAbs = GeomAbs_Arc)
186 ConstructionError from Standard
189 Generated (me : in out )
191 returns DataMapOfShapeDataMapOfShapeListOfShape from BRepFill
194 Add ( me : in out; Vevo : in out Evolved from BRepFill;
195 Prof : Wire from TopoDS;
196 Glue : in out Quilt from BRepTools)
199 ChangeShape(me : in out) returns Shape from TopoDS
203 Transfert( me : in out;
204 Vevo : in out Evolved from BRepFill;
205 MapProf : DataMapOfShapeShape from TopTools;
206 MapSpine : DataMapOfShapeShape from TopTools;
207 LS, InitLS, InitLP : Location from TopLoc)
210 PrepareProfile ( me ; WorkProf : in out ListOfShape from TopTools;
211 MapProf : in out DataMapOfShapeShape from TopTools)
212 ---Purpose: Prepare the profil as follow
213 -- - Project the profile in the yOz Plane
214 -- - Cut the profile at the extrema of distance from the
215 -- Profile to the Oz Axis.
216 -- - building the new wires with the cutting edges.
219 PrepareSpine ( me ; WorkSpine : in out Face from TopoDS ;
220 SpineProf : in out DataMapOfShapeShape from TopTools)
221 ---Purpose: Prepare the spine as follow
222 -- - Cut the spine-Edges at the extrema of curvature and
223 -- at the inflexion points.
226 MakePipe (me : in out; SpineEdge : Edge from TopoDS ;
227 ProfRef : Ax3 from gp)
230 MakeRevol(me : in out; SpineEdge : Edge from TopoDS;
231 SpineVertex : Vertex from TopoDS;
232 ProfRef : Ax3 from gp)
235 FindLocation(me; Face : Face from TopoDS)
236 returns Location from TopLoc
237 ---Purpose: Find the location transforming the planar shape <Shape>
239 raises NoSuchObject from Standard
240 ---Purpose: if the Shape is not planar.
243 TransformInitWork(me : in out; LS , LP : Location from TopLoc)
244 ---Purpose: Apply the Location <LS> to <mySpine> and <LP> to
246 -- in order to set the Shapes in the work space.
249 ContinuityOnOffsetEdge (me : in out; WorkProf : ListOfShape from TopTools)
252 AddTopAndBottom (me : in out;Glue : in out Quilt from BRepTools)
255 MakeSolid(me : in out)
261 mySpine : Face from TopoDS;
262 myProfile : Wire from TopoDS;
263 myShape : Shape from TopoDS;
264 myIsDone : Boolean from Standard;
265 mySpineType : Boolean from Standard; -- True : Face ; False : Wire
266 myJoinType : JoinType from GeomAbs;
267 myMap : DataMapOfShapeDataMapOfShapeListOfShape from BRepFill;
268 myTop : Shape from TopoDS;
269 myBottom : Shape from TopoDS;