1 -- File: BRepFill_PipeShell.cdl
2 -- Created: Wed Jul 22 09:10:50 1998
3 -- Author: Philippe MANGIN
5 ---Copyright: Matra Datavision 1998
8 class PipeShell from BRepFill inherits TShared from MMgt
10 ---Purpose: Perform general sweeping construction
16 ListOfShape from TopTools,
17 HArray2OfShape from TopTools,
21 TransitionStyle from BRepFill,
22 Trihedron from GeomFill,
23 PipeError from GeomFill,
24 LocationLaw from BRepFill,
25 SectionLaw from BRepFill,
26 Section from BRepFill,
28 DataMapOfShapeListOfShape from TopTools,
29 SequenceOfSection from BRepFill
33 DomainError from Standard,
37 Create( Spine : Wire from TopoDS)
39 returns PipeShell from BRepFill;
41 -- =================================
43 -- =================================
44 ---Purpose: Set an sweep's mode
45 -- If no mode are setted, the mode use in MakePipe is used
46 ---See Also: GeomFill_IsCorrectedFrenet
48 Set(me : mutable; Frenet : Boolean = Standard_False);
49 ---Purpose: Set an Frenet or an CorrectedFrenet trihedron
50 -- to perform the sweeping
52 ---See Also:GeomFill_IsCorrectedFrenet
54 Set(me : mutable; Axe : Ax2 from gp);
55 ---Purpose: Set an fixed trihedron to perform the sweeping
56 -- all sections will be parallel.
58 ---See Also: GeomFill_IsFixed
60 Set(me : mutable; BiNormal : Dir from gp);
61 ---Purpose: Set an fixed BiNormal direction to perform
64 ---See Also: GeomFill_IsConstantNormal
66 Set(me : mutable; SpineSupport : Shape from TopoDS)
67 ---Purpose: Set support to the spine to define the BiNormal
68 -- at the spine, like the normal the surfaces.
69 -- Warning: To be effective, Each edge of the <spine> must
70 -- have an representaion on one face of<SpineSupport>
72 ---See Also: GeomFill_IsDarboux
76 AuxiliarySpine : Wire from TopoDS;
77 CurvilinearEquivalence : Boolean = Standard_True;
78 KeepContact : Boolean = Standard_False );
80 ---Purpose: Set an auxiliary spine to define the Normal
81 -- For each Point of the Spine P, an Point Q is evalued
82 -- on <AuxiliarySpine>
83 -- If <CurvilinearEquivalence>
84 -- Q split <AuxiliarySpine> with the same length ratio
85 -- than P split <Spline>.
86 -- Else the plan define by P and the tangent to the <Spine>
87 -- intersect <AuxiliarySpine> in Q.
88 -- If <KeepContact> the Normal is defined to assume like the sweeped
89 -- section is in contact to the <AuxiliarySpine>
90 -- Else the Normal is defined by the vector PQ.
94 -- =================================
95 -- Methodes to define section(s)
96 -- =================================
97 ---Purpose: Give section to sweep.
98 -- Possibilities are :
99 -- - Give one or sevral profile
100 -- - Give one profile and an homotetic law.
101 -- - Automatic compute of correspondance beetween profile, and section
102 -- on the sweeped shape
103 -- - correspondance beetween profile, and section on the sweeped shape
104 -- defined by a vertex of the spine
106 -- -"WithCorrection" The profile is rotated to have a Normal --
107 -- parallel to the trihedron's normal and have tangent
108 -- perpendicular to the trihedron's tangent.
112 Profile : Shape from TopoDS;
113 WithContact : Boolean = Standard_False;
114 WithCorrection : Boolean = Standard_False );
115 ---Purpose: Set an section. The corespondance with the spine, will
116 -- be automaticaly performed.
120 Profile : Shape from TopoDS;
121 Location : Vertex from TopoDS;
122 WithContact : Boolean = Standard_False;
123 WithCorrection : Boolean = Standard_False)
124 ---Purpose: Set an section. The corespondance with the spine, is
125 -- given by <Location>
128 raises DomainError; -- if the <Spine> do not contain <Location>
131 Profile : Shape from TopoDS;
132 L : Function from Law;
133 WithContact : Boolean = Standard_False;
134 WithCorrection : Boolean = Standard_False);
135 ---Purpose: Set an section and an homotetic law.
136 -- The homotetie's centers is given by point on the <Spine>.
141 Profile : Shape from TopoDS;
142 L : Function from Law;
143 Location : Vertex from TopoDS;
144 WithContact : Boolean = Standard_False;
145 WithCorrection : Boolean = Standard_False);
146 ---Purpose: Set an section and an homotetic law.
147 -- The homotetie center is given by point on the <Spine>
151 Delete(me : mutable; Profile : Shape from TopoDS);
152 ---Purpose: Delete an section.
156 -- ========================================
157 -- Methodes to perform and read shape
158 -- ========================================
160 ---Purpose: Say if <me> is ready to build the shape
161 -- return False if <me> do not have section definition
165 ---Purpose: Get a status, when Simulate or Build failed.
166 returns PipeError from GeomFill;
168 SetTolerance(me : mutable;
169 Tol3d : Real = 1.0e-4;
170 BoundTol : Real = 1.0e-4;
171 TolAngular : Real = 1.0e-2);
173 SetTransition(me : mutable;
174 Mode :TransitionStyle from BRepFill
176 Angmin : Real = 1.0e-2;
178 ---Purpose: Set the Transition Mode to manage discontinuities
183 Simulate(me : mutable;
184 NumberOfSection : Integer;
185 Sections : out ListOfShape from TopTools)
186 ---Purpose: Perform simulation of the sweep :
187 -- Somes Section are returned.
189 raises NotDone; -- If <me> it is not Ready
193 ---Purpose: Builds the resulting shape (redefined from MakeShape).
196 raises NotDone -- If <me> it is not Ready
199 MakeSolid(me : mutable)
200 ---Purpose: Transform the sweeping Shell in Solid.
201 -- If the section are not closed returns False
204 raises NotDone; -- If <me> is not Builded;
207 ---Purpose: Returns the result Shape.
208 ---C++: return const &
210 returns Shape from TopoDS
214 ---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
215 ---C++: return const &
217 returns Shape from TopoDS
221 ---Purpose: Returns the TopoDS Shape of the top of the sweep.
222 ---C++: return const &
224 returns Shape from TopoDS
227 Generated (me: mutable;
228 S : Shape from TopoDS;
229 L : out ListOfShape from TopTools)
230 ---Purpose: Returns the list of shapes generated from the
235 Prepare(me: mutable) is private;
238 Sec : Section from BRepFill;
239 W : out Wire from TopoDS;
240 Trsf : out Trsf from gp;
241 param : out Real from Standard) is private;
243 ResetLoc(me : mutable) is private;
245 BuildHistory(me: mutable; theSweep: Sweep from BRepFill)
249 mySpine : Wire from TopoDS;
250 myFirst : Shape from TopoDS;
251 myLast : Shape from TopoDS;
252 myShape : Shape from TopoDS;
253 mySeq : SequenceOfSection from BRepFill;
255 myGenMap : DataMapOfShapeListOfShape from TopTools;
260 angmin, angmax : Real;
262 myLaw : Function from Law;
263 myLocation : LocationLaw from BRepFill;
264 mySection : SectionLaw from BRepFill;
265 myFaces : HArray2OfShape from TopTools;
266 myTrihedron : Trihedron from GeomFill;
267 myTransition : TransitionStyle from BRepFill;
268 myStatus : PipeError from GeomFill;