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
9 -- under the terms of the GNU Lesser General Public 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 Sweep from BRepFill
19 ---Purpose: Topological Sweep Algorithm
23 SectionLaw from BRepFill,
24 LocationLaw from BRepFill,
25 ApproxStyle from GeomFill,
26 TransitionStyle from BRepFill,
27 HCurve from Adaptor3d,
29 HArray2OfShape from TopTools,
30 ListOfShape from TopTools,
31 DataMapOfShapeShape from TopTools,
41 Create(Section : SectionLaw from BRepFill;
42 Location : LocationLaw from BRepFill;
44 returns Sweep from BRepFill;
46 SetBounds(me : in out;
47 FirstShape, LastShape : Wire from TopoDS);
49 SetTolerance(me : in out;
51 BoundTol : Real = 1.0;
52 Tol2d : Real = 1.0e-5;
53 TolAngular : Real = 1.0e-2);
54 ---Purpose: Set Approximation Tolerance
55 -- Tol3d : Tolerance to surface approximation
56 -- Tol2d : Tolerance used to perform curve approximation
57 -- Normaly the 2d curve are approximated with a
58 -- tolerance given by the resolution on support surfaces,
59 -- but if this tolerance is too large Tol2d is used.
60 -- TolAngular : Tolerance (in radian) to control the angle
61 -- beetween tangents on the section law and
62 -- tangent of iso-v on approximed surface
64 SetAngularControl(me: in out;
65 AngleMin : Real = 0.01;
66 AngleMax : Real = 6.0)
67 ---Purpose: Tolerance To controle Corner management.
69 -- If the discontinuity is lesser than <AngleMin> in radian The
70 -- Transition Performed will be alway "Modified"
73 -- If the discontinuity is greater than <AngleMax> in radian The
74 -- Transition "Round" replace the Transition "Right"
77 SetForceApproxC1(me: in out;
78 ForceApproxC1 : Boolean from Standard);
79 ---Purpose: Set the flag that indicates attempt to approximate
80 -- a C1-continuous surface if a swept surface proved
85 Transition : TransitionStyle = BRepFill_Modified;
86 Continuity : Shape from GeomAbs = GeomAbs_C2;
87 Approx : ApproxStyle = GeomFill_Location;
88 Degmax : Integer = 11;
89 Segmax : Integer = 30);
91 ---Purpose: Build the Sweeep Surface
92 -- Transition define Transition strategy
93 -- Approx define Approximation Strategy
94 -- - GeomFill_Section : The composed Function Location X Section
95 -- is directly approximed.
96 -- - GeomFill_Location : The location law is approximed, and the
97 -- SweepSurface is bulid algebric composition
98 -- of approximed location law and section law
99 -- This option is Ok, if Section.Surface() methode
101 -- Continuity : The continuity in v waiting on the surface
102 -- Degmax : The maximum degree in v requiered on the surface
103 -- Segmax : The maximum number of span in v requiered on
106 CorrectApproxParameters(me: in out)
107 returns Boolean is private;
109 BuildWire(me : in out;
110 Transition : TransitionStyle)
111 returns Boolean is private;
113 BuildShell(me : in out;
114 Transition : TransitionStyle;
116 ExtendFirst : Real = 0.0;
117 ExtendLast : Real = 0.0)
118 returns Boolean is private;
121 ---Purpose: Say if the Shape is Build.
125 ---Purpose: returns the Sweeping Shape
126 returns Shape from TopoDS;
129 ---Purpose: Get the Approximation error.
133 returns HArray2OfShape from TopTools;
136 returns HArray2OfShape from TopTools;
139 returns HArray2OfShape from TopTools;
141 PerformCorner(me : in out; Index : Integer;
142 Transition : TransitionStyle;
143 Bounds : HArray2OfShape from TopTools)
146 EvalExtrapol(me; Index : Integer;
147 Transition : TransitionStyle)
152 V1 : Shape from TopoDS;
153 V2 : in out Shape from TopoDS)
154 returns Boolean is private;
156 UpdateVertex(me; Ipath, Isec : Integer;
158 V : in out Shape from TopoDS)
170 myApproxStyle : ApproxStyle from GeomFill;
171 myContinuity : Shape from GeomAbs;
174 myForceApproxC1 : Boolean;
175 myShape : Shape from TopoDS;
176 myLoc : LocationLaw from BRepFill;
177 mySec : SectionLaw from BRepFill;
178 myUEdges : HArray2OfShape from TopTools;
179 myVEdges : HArray2OfShape from TopTools;
180 myVEdgesModified : DataMapOfShapeShape from TopTools;
181 myFaces : HArray2OfShape from TopTools;
182 myAuxShape : ListOfShape from TopTools;
186 LastShape : Wire from TopoDS;