1 -- Created on: 1996-12-16
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1996-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 Blend from BiTgte
26 MapOfShape from TopTools,
27 ListOfShape from TopTools,
31 Analyse from BRepOffset,
32 Inter3d from BRepOffset,
33 Offset from BRepOffset,
36 DataMapOfShapeOffset from BRepOffset,
37 DataMapOfShapeBox from BiTgte,
38 ContactType from BiTgte,
39 DataMapOfShapeListOfShape from TopTools,
40 IndexedMapOfShape from TopTools,
41 IndexedDataMapOfShapeListOfShape from TopTools,
42 DataMapOfShapeDataMapOfShapeListOfShape from BRepFill,
43 HArray1OfInteger from TColStd
47 OutOfRange from Standard
56 returns Blend from BiTgte;
58 Create (S : Shape from TopoDS;
59 Radius : Real from Standard;
60 Tol : Real from Standard;
61 NUBS : Boolean from Standard)
62 ---Purpose: <S>: Shape to be rounded
63 -- <Radius>: radius of the fillet
64 -- <Tol>: Tol3d used in approximations
65 -- <NUBS>: if true, generate only NUBS surfaces,
66 -- if false, generate analytical surfaces if possible
68 returns Blend from BiTgte;
71 S : Shape from TopoDS;
72 Radius : Real from Standard;
73 Tol : Real from Standard;
74 NUBS : Boolean from Standard)
78 ---Purpose: Clear all the Fields.
82 F1, F2 : Face from TopoDS)
83 ---Purpose: Set two faces of <myShape> on which the Sphere
88 Edge : Edge from TopoDS)
89 ---Purpose: Set an edge of <myShape> to be rounded.
92 SetStoppingFace (me : in out;
93 Face : Face from TopoDS)
94 ---Purpose: Set a face on which the fillet must stop.
102 Perform (me : in out;
103 BuildShape : Boolean from Standard = Standard_True)
104 ---Purpose: Compute the generated surfaces.
105 -- If <BuildShape> is true, compute the resulting Shape.
106 -- If false, only the blending surfaces are computed.
115 returns Boolean from Standard
121 ---Purpose: returns the result
122 returns Shape from TopoDS
123 ---C++: return const &
128 ---Purpose: returns the Number of generated surfaces.
129 returns Integer from Standard
134 Surface(me; Index : Integer from Standard)
135 returns Surface from Geom
136 ---Purpose: returns the surface of range Index
138 NotDone from StdFail,
139 OutOfRange from Standard
142 Face(me; Index : Integer from Standard)
143 returns Face from TopoDS
144 ---Purpose: returns the surface of range Index
145 ---C++: return const &
147 NotDone from StdFail,
148 OutOfRange from Standard
152 LC : in out ListOfShape from TopTools )
153 ---Purpose: set in <LC> all the center lines
156 Surface(me; CenterLine : Shape from TopoDS)
157 returns Surface from Geom
158 ---Purpose: returns the surface generated by the centerline.
159 -- <CenterLine> may be
160 -- - an edge : generate a pipe.
161 -- - a vertex : generate a sphere.
162 -- Warning: returns a Null Handle if <CenterLine> generates
168 Face(me; CenterLine : Shape from TopoDS)
169 returns Face from TopoDS
170 ---Purpose: returns the face generated by the centerline.
171 -- <CenterLine> may be
172 -- - an edge : generate a pipe.
173 -- - a vertex : generate a sphere.
174 -- Warning: returns a Null Shape if <CenterLine> generates
176 ---C++: return const &
183 --- Information about FilletGeometry:
186 ContactType(me; Index: Integer from Standard)
187 ---Purpose: returns the type of contact
188 returns ContactType from BiTgte
192 --- SupportShape: may be a Face, an Edge or a Vertex
195 SupportShape1 (me; Index: Integer from Standard)
196 returns Shape from TopoDS
197 ---Purpose: gives the first support shape relative to
198 -- SurfaceFillet(Index);
199 ---C++: return const &
201 NotDone from StdFail,
202 OutOfRange from Standard
205 SupportShape2 (me; Index : Integer from Standard)
206 returns Shape from TopoDS
207 ---Purpose: gives the second support shape relative to
208 -- SurfaceFillet(Index);
209 ---C++:return const &
210 raises NotDone from StdFail,
211 OutOfRange from Standard
216 --- 3d Curves: the guide - lines
219 CurveOnShape1 (me; Index : Integer from Standard)
220 returns Curve from Geom
221 ---Purpose: gives the 3d curve of SurfaceFillet(Index)
222 -- on SupportShape1(Index)
223 raises NotDone from StdFail,
224 OutOfRange from Standard
227 CurveOnShape2 (me; Index : Integer from Standard)
228 returns Curve from Geom
229 ---Purpose: gives the 3d curve of SurfaceFillet(Index)
230 -- on SupportShape2(Index)
231 raises NotDone from StdFail,
232 OutOfRange from Standard
241 PCurveOnFace1 (me; Index : Integer from Standard)
242 returns Curve from Geom2d
243 ---Purpose: gives the PCurve associated to CurvOnShape1(Index)
244 -- on the support face
245 -- Warning: returns a Null Handle if SupportShape1 is not a Face
246 raises NotDone from StdFail,
247 OutOfRange from Standard
250 PCurve1OnFillet (me; Index : Integer from Standard)
251 returns Curve from Geom2d
252 ---Purpose: gives the PCurve associated to CurveOnShape1(Index)
254 raises NotDone from StdFail,
255 OutOfRange from Standard
258 PCurveOnFace2 (me; Index : Integer from Standard)
259 returns Curve from Geom2d
260 ---Purpose: gives the PCurve associated to CurveOnShape2(Index)
261 -- on the support face
262 -- Warning: returns a Null Handle if SupportShape2 is not a Face
263 raises NotDone from StdFail,
264 OutOfRange from Standard
267 PCurve2OnFillet (me; Index : Integer from Standard)
268 returns Curve from Geom2d
269 ---Purpose: gives the PCurve associated to CurveOnShape2(Index)
271 raises NotDone from StdFail,
272 OutOfRange from Standard
277 --- Branches Solutions
280 NbBranches(me : in out)
281 returns Integer from Standard
288 Index : Integer from Standard;
289 From, To : in out Integer from Standard)
290 ---Purpose: Set in <From>,<To> the indices of the faces of
291 -- the branche <Index>.
293 -- i.e: Branche<Index> = Face(From) + Face(From+1) + ..+ Face(To)
297 --- Internal methods:
301 ComputeCenters (me : in out)
302 ---Purpose: Computes the center lines
305 ComputeSurfaces( me : in out)
306 ---Purpose: Perform the generated surfaces.
309 ComputeShape(me : in out)
310 ---Purpose: Build the resulting shape
311 -- All the faces must be computed
314 Intersect(me : in out;
315 Init : Shape from TopoDS;
316 Face : Face from TopoDS;
317 MapSBox : DataMapOfShapeBox from BiTgte;
318 OF1 : Offset from BRepOffset;
319 Inter : in out Inter3d from BRepOffset)
320 returns Boolean from Standard
321 ---Purpose: Computes the intersections with <Face> and all the
322 -- OffsetFaces stored in <myMapSF>. Returns <True>
323 -- if an intersections ends on a boundary of a Face.
329 myRadius : Real from Standard;
330 myTol : Real from Standard;
331 myNubs : Boolean from Standard;
332 myShape : Shape from TopoDS; -- Shape Initial
333 myResult : Shape from TopoDS; -- Shape Resultat
334 myBuildShape : Boolean from Standard;
336 myAncestors : IndexedDataMapOfShapeListOfShape from TopTools;
337 myCreated : DataMapOfShapeDataMapOfShapeListOfShape from BRepFill;
338 myCutEdges : DataMapOfShapeListOfShape from TopTools;
340 myFaces : IndexedMapOfShape from TopTools;
341 myEdges : IndexedMapOfShape from TopTools;
343 myStopFaces : MapOfShape from TopTools;
344 myAnalyse : Analyse from BRepOffset;
346 myCenters : IndexedMapOfShape from TopTools;
347 myMapSF : DataMapOfShapeOffset from BRepOffset;
348 myInitOffsetFace : Image from BRepAlgo;
349 myImage : Image from BRepAlgo;
350 myImageOffset : Image from BRepAlgo;
351 myAsDes : AsDes from BRepAlgo;
353 myNbBranches : Integer from Standard;
354 myIndices : HArray1OfInteger from TColStd;
355 myDone : Boolean from Standard;