1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
-- File: BRepFill_Sweep.cdl
-- Created: Fri Nov 21 14:07:48 1997
-- Author: Philippe MANGIN
-- <pmn@sgi29>
---Copyright: Matra Datavision 1997
class Sweep from BRepFill
---Purpose: Topological Sweep Algorithm
---Level: Advanced
uses
SectionLaw from BRepFill,
LocationLaw from BRepFill,
ApproxStyle from GeomFill,
TransitionStyle from BRepFill,
HCurve from Adaptor3d,
Shape from GeomAbs,
HArray2OfShape from TopTools,
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
Wire from TopoDS,
Shape from TopoDS,
Trsf from gp
raises
NotDone,
OutOfRange,
ConstructionError
is
Create(Section : SectionLaw from BRepFill;
Location : LocationLaw from BRepFill;
WithKPart: Boolean)
returns Sweep from BRepFill;
SetBounds(me : in out;
FirstShape, LastShape : Wire from TopoDS);
SetTolerance(me : in out;
Tol3d : Real;
BoundTol : Real = 1.0;
Tol2d : Real = 1.0e-5;
TolAngular : Real = 1.0e-2);
---Purpose: Set Approximation Tolerance
-- Tol3d : Tolerance to surface approximation
-- Tol2d : Tolerance used to perform curve approximation
-- Normaly the 2d curve are approximated with a
-- tolerance given by the resolution on support surfaces,
-- but if this tolerance is too large Tol2d is used.
-- TolAngular : Tolerance (in radian) to control the angle
-- beetween tangents on the section law and
-- tangent of iso-v on approximed surface
SetAngularControl(me: in out;
AngleMin : Real = 0.01;
AngleMax : Real = 6.0)
---Purpose: Tolerance To controle Corner management.
--
-- If the discontinuity is lesser than <AngleMin> in radian The
-- Transition Performed will be alway "Modified"
--
-- If the discontinuity is greater than <AngleMax> in radian The
-- Transition "Round" replace the Transition "Right"
is static;
Build(me : in out;
Transition : TransitionStyle = BRepFill_Modified;
Approx : ApproxStyle = GeomFill_Location;
Continuity : Shape from GeomAbs = GeomAbs_C2;
Degmax : Integer = 11;
Segmax : Integer = 30);
---Purpose: Build the Sweeep Surface
-- Transition define Transition strategy
-- Approx define Approximation Strategy
-- - GeomFill_Section : The composed Function Location X Section
-- is directly approximed.
-- - GeomFill_Location : The location law is approximed, and the
-- SweepSurface is bulid algebric composition
-- of approximed location law and section law
-- This option is Ok, if Section.Surface() methode
-- is effective.
-- Continuity : The continuity in v waiting on the surface
-- Degmax : The maximum degree in v requiered on the surface
-- Segmax : The maximum number of span in v requiered on
-- the surface.
CorrectApproxParameters(me: in out)
returns Boolean is private;
BuildWire(me : in out;
Transition : TransitionStyle)
returns Boolean is private;
BuildShell(me : in out;
Transition : TransitionStyle;
Vf, Vl : Integer;
ExtendFirst : Real = 0.0;
ExtendLast : Real = 0.0)
returns Boolean is private;
IsDone(me)
---Purpose: Say if the Shape is Build.
returns Boolean;
Shape(me)
---Purpose: returns the Sweeping Shape
returns Shape from TopoDS;
ErrorOnSurface(me)
---Purpose: Get the Approximation error.
returns Real;
SubShape(me)
returns HArray2OfShape from TopTools;
InterFaces(me)
returns HArray2OfShape from TopTools;
Sections(me)
returns HArray2OfShape from TopTools;
PerformCorner(me : in out; Index : Integer;
Transition : TransitionStyle;
Bounds : HArray2OfShape from TopTools)
is private;
EvalExtrapol(me; Index : Integer;
Transition : TransitionStyle)
returns Real
is private;
MergeVertex(me;
V1 : Shape from TopoDS;
V2 : in out Shape from TopoDS)
returns Boolean is private;
UpdateVertex(me; Ipath, Isec : Integer;
Error, Param : Real;
V : in out Shape from TopoDS)
is private;
fields
isDone : Boolean;
KPart : Boolean;
myTol3d : Real;
myBoundTol : Real;
myTol2d : Real;
myTolAngular : Real;
myAngMin : Real;
myAngMax : Real;
myApproxStyle : ApproxStyle from GeomFill;
myContinuity : Shape from GeomAbs;
myDegmax : Integer;
mySegmax : Integer;
myShape : Shape from TopoDS;
myLoc : LocationLaw from BRepFill;
mySec : SectionLaw from BRepFill;
myUEdges : HArray2OfShape from TopTools;
myVEdges : HArray2OfShape from TopTools;
myVEdgesModified : DataMapOfShapeShape from TopTools;
myFaces : HArray2OfShape from TopTools;
myAuxShape : ListOfShape from TopTools;
Error : Real;
FirstShape,
LastShape : Wire from TopoDS;
end Sweep;
|