1 -- Created on: 1997-11-21
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-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.
18 class Sweep from BRepFill
20 ---Purpose: Topological Sweep Algorithm
24 SectionLaw from BRepFill,
25 LocationLaw from BRepFill,
26 ApproxStyle from GeomFill,
27 TransitionStyle from BRepFill,
28 HCurve from Adaptor3d,
30 HArray2OfShape from TopTools,
31 ListOfShape from TopTools,
32 DataMapOfShapeShape from TopTools,
33 MapOfShape from TopTools,
34 DataMapOfShapeHArray2OfShape from BRepFill,
45 Create(Section : SectionLaw from BRepFill;
46 Location : LocationLaw from BRepFill;
48 returns Sweep from BRepFill;
50 SetBounds(me : in out;
51 FirstShape, LastShape : Wire from TopoDS);
53 SetTolerance(me : in out;
55 BoundTol : Real = 1.0;
56 Tol2d : Real = 1.0e-5;
57 TolAngular : Real = 1.0e-2);
58 ---Purpose: Set Approximation Tolerance
59 -- Tol3d : Tolerance to surface approximation
60 -- Tol2d : Tolerance used to perform curve approximation
61 -- Normaly the 2d curve are approximated with a
62 -- tolerance given by the resolution on support surfaces,
63 -- but if this tolerance is too large Tol2d is used.
64 -- TolAngular : Tolerance (in radian) to control the angle
65 -- beetween tangents on the section law and
66 -- tangent of iso-v on approximed surface
68 SetAngularControl(me: in out;
69 AngleMin : Real = 0.01;
70 AngleMax : Real = 6.0)
71 ---Purpose: Tolerance To controle Corner management.
73 -- If the discontinuity is lesser than <AngleMin> in radian The
74 -- Transition Performed will be alway "Modified"
77 -- If the discontinuity is greater than <AngleMax> in radian The
78 -- Transition "Round" replace the Transition "Right"
81 SetForceApproxC1(me: in out;
82 ForceApproxC1 : Boolean from Standard);
83 ---Purpose: Set the flag that indicates attempt to approximate
84 -- a C1-continuous surface if a swept surface proved
89 ReversedEdges : in out MapOfShape from TopTools;
90 Tapes : in out DataMapOfShapeHArray2OfShape from BRepFill;
91 Transition : TransitionStyle = BRepFill_Modified;
92 Continuity : Shape from GeomAbs = GeomAbs_C2;
93 Approx : ApproxStyle = GeomFill_Location;
94 Degmax : Integer = 11;
95 Segmax : Integer = 30);
97 ---Purpose: Build the Sweeep Surface
98 -- Transition define Transition strategy
99 -- Approx define Approximation Strategy
100 -- - GeomFill_Section : The composed Function Location X Section
101 -- is directly approximed.
102 -- - GeomFill_Location : The location law is approximed, and the
103 -- SweepSurface is bulid algebric composition
104 -- of approximed location law and section law
105 -- This option is Ok, if Section.Surface() methode
107 -- Continuity : The continuity in v waiting on the surface
108 -- Degmax : The maximum degree in v requiered on the surface
109 -- Segmax : The maximum number of span in v requiered on
112 CorrectApproxParameters(me: in out)
113 returns Boolean is private;
115 BuildWire(me : in out;
116 Transition : TransitionStyle)
117 returns Boolean is private;
119 BuildShell(me : in out;
120 Transition : TransitionStyle;
122 ReversedEdges : in out MapOfShape from TopTools;
123 Tapes : in out DataMapOfShapeHArray2OfShape from BRepFill;
124 ExtendFirst : Real = 0.0;
125 ExtendLast : Real = 0.0)
126 returns Boolean is private;
129 ---Purpose: Say if the Shape is Build.
133 ---Purpose: returns the Sweeping Shape
134 returns Shape from TopoDS;
137 ---Purpose: Get the Approximation error.
141 returns HArray2OfShape from TopTools;
144 returns HArray2OfShape from TopTools;
147 returns HArray2OfShape from TopTools;
149 PerformCorner(me : in out; Index : Integer;
150 Transition : TransitionStyle;
151 Bounds : HArray2OfShape from TopTools)
154 EvalExtrapol(me; Index : Integer;
155 Transition : TransitionStyle)
160 V1 : Shape from TopoDS;
161 V2 : in out Shape from TopoDS)
162 returns Boolean is private;
164 UpdateVertex(me; Ipath, Isec : Integer;
166 V : in out Shape from TopoDS)
169 RebuildTopOrBottomEdge(me; aNewEdge: Edge from TopoDS;
170 anEdge: in out Edge from TopoDS;
171 ReversedEdges: in out MapOfShape from TopTools)
183 myApproxStyle : ApproxStyle from GeomFill;
184 myContinuity : Shape from GeomAbs;
187 myForceApproxC1 : Boolean;
188 myShape : Shape from TopoDS;
189 myLoc : LocationLaw from BRepFill;
190 mySec : SectionLaw from BRepFill;
191 myUEdges : HArray2OfShape from TopTools;
192 myVEdges : HArray2OfShape from TopTools;
193 myVEdgesModified : DataMapOfShapeShape from TopTools;
194 myFaces : HArray2OfShape from TopTools;
195 myAuxShape : ListOfShape from TopTools;
199 LastShape : Wire from TopoDS;