1 -- File: GeomFill_LocationDraft.cdl
2 -- Created: Tue Apr 21 17:05:54 1998
3 -- Author: Stephanie HUMEAU
5 ---Copyright: Matra Datavision 1998
8 class LocationDraft from GeomFill
9 inherits LocationLaw from GeomFill
12 HCurve from Adaptor3d,
13 HSurface from Adaptor3d,
19 Array1OfReal from TColStd,
20 Array1OfVec2d from TColgp,
21 Array1OfPnt2d from TColgp,
22 HArray1OfPnt2d from TColgp,
23 DraftTrihedron from GeomFill,
26 TrimmedCurve from Geom
30 NotImplemented, OutOfRange
33 Create (Direction : Dir from gp;
34 Angle : Real from Standard)
35 returns LocationDraft from GeomFill;
37 SetStopSurf(me : mutable; Surf : HSurface from Adaptor3d);
39 SetAngle(me : mutable; Angle : Real);
41 Prepare(me:mutable) is private;
43 SetCurve(me : mutable; C : HCurve from Adaptor3d)
47 returns HCurve from Adaptor3d
48 ---C++: return const &
51 SetTrsf(me : mutable; Transfo : Mat from gp)
55 returns LocationLaw from GeomFill
63 ---Purpose: compute Location
64 returns Boolean is redefined;
71 Poles2d : out Array1OfPnt2d from TColgp)
72 ---Purpose: compute Location and 2d points
73 returns Boolean is redefined;
82 Poles2d : out Array1OfPnt2d from TColgp;
83 DPoles2d : out Array1OfVec2d from TColgp)
84 ---Purpose: compute location 2d points and associated
86 -- Warning : It used only for C1 or C2 aproximation
96 D2M : out Mat from gp;
97 D2V : out Vec from gp;
98 Poles2d : out Array1OfPnt2d from TColgp;
99 DPoles2d : out Array1OfVec2d from TColgp;
100 D2Poles2d : out Array1OfVec2d from TColgp)
101 ---Purpose: compute location 2d points and associated
102 -- first and seconde derivatives.
103 -- Warning : It used only for C2 aproximation
108 -- ================== General Information On The Function ==================
111 HasFirstRestriction(me)
112 ---Purpose: Say if the first restriction is defined in this class.
113 -- If it is true the first element of poles array in
114 -- D0,D1,D2... Correspond to this restriction.
115 -- Returns Standard_False (default implementation)
119 HasLastRestriction(me) -- A FAIRE !!
120 ---Purpose: Say if the last restriction is defined in this class.
121 -- If it is true the last element of poles array in
122 -- D0,D1,D2... Correspond to this restriction.
123 -- Returns Standard_False (default implementation)
128 ---Purpose: Give the number of trace (Curves 2d wich are not restriction)
129 -- Returns 1 (default implementation)
135 -- =================== Management of continuity ===================
137 NbIntervals(me; S : Shape from GeomAbs)
138 ---Purpose: Returns the number of intervals for continuity
140 -- May be one if Continuity(me) >= <S>
141 returns Integer is redefined;
143 Intervals(me; T : in out Array1OfReal from TColStd;
144 S : Shape from GeomAbs)
145 ---Purpose: Stores in <T> the parameters bounding the intervals
146 -- of continuity <S>.
148 -- The array must provide enough room to accomodate
149 -- for the parameters. i.e. T.Length() > NbIntervals()
151 OutOfRange from Standard
155 SetInterval(me: mutable; First, Last: Real from Standard)
156 ---Purpose: Sets the bounds of the parametric interval on
158 -- This determines the derivatives in these values if the
159 -- function is not Cn.
162 GetInterval(me; First, Last: out Real from Standard)
163 ---Purpose: Gets the bounds of the parametric interval on
167 GetDomain(me; First, Last: out Real from Standard)
168 ---Purpose: Gets the bounds of the function parametric domain.
169 -- Warning: This domain it is not modified by the
173 -- =================== To help computation of Tolerance ===============
175 -- Evaluation of error, in 2d space, or on composed function, is
176 -- difficult. The following methods can help the approximation to
177 -- make good evaluation and use good tolerances.
179 -- It is not necessary for the following informations to be very
180 -- precise. A fast evaluation is sufficient.
183 Index : Integer from Standard;
184 Tol : Real from Standard;
185 TolU, TolV : out Real from Standard)
186 ---Purpose: Returns the resolutions in the sub-space 2d <Index>
187 -- This information is usfull to find an good tolerance in
189 -- Warning: Used only if Nb2dCurve > 0
193 GetMaximalNorm(me : mutable)
194 ---Purpose: Get the maximum Norm of the matrix-location part. It
195 -- is usful to find an good Tolerance to approx M(t).
199 GetAverageLaw(me : mutable;
202 ---Purpose: Get average value of M(t) and V(t) it is usfull to
203 -- make fast approximation of rational surfaces.
207 -- To find elementary sweep
209 IsTranslation(me; Error : out Real)
210 ---Purpose: Say if the Location Law, is an translation of Location
211 -- The default implementation is " returns False ".
215 IsRotation(me; Error : out Real )
216 ---Purpose: Say if the Location Law, is a rotation of Location
217 -- The default implementation is " returns False ".
221 Rotation(me; Center : out Pnt from gp)
225 ---Purpose: Say if the generatrice interset the surface
235 myLaw : DraftTrihedron from GeomFill;
236 mySurf : HSurface from Adaptor3d;
237 myCurve : HCurve from Adaptor3d;
238 myTrimmed : HCurve from Adaptor3d;
240 myAngle : Real from Standard;
241 myNbPts : Integer from Standard;
242 myPoles2d : HArray1OfPnt2d from TColgp is protected;
243 Intersec : Boolean from Standard;
244 WithTrans : Boolean from Standard;