1 -- File: GeomFill_LocationLaw.cdl
2 -- Created: Thu Nov 20 17:53:46 1997
3 -- Author: Philippe MANGIN
5 ---Copyright: Matra Datavision 1997
8 deferred class LocationLaw from GeomFill inherits TShared from MMgt
10 ---Purpose: To define location law in Sweeping location is --
11 -- defined by an Matrix M and an Vector V, and
12 -- transform an point P in MP+V.
16 HCurve from Adaptor3d,
21 Array1OfReal from TColStd,
22 Array1OfPnt2d from TColgp,
23 Array1OfVec2d from TColgp,
24 PipeError from GeomFill,
28 NotImplemented, OutOfRange
31 SetCurve(me : mutable; C : HCurve from Adaptor3d)
35 returns HCurve from Adaptor3d
36 ---C++: return const &
39 SetTrsf(me : mutable; Transfo : Mat from gp)
40 ---Purpose: Set a transformation Matrix like the law M(t) become
45 returns LocationLaw from GeomFill
49 --========== To compute Location and derivatives Location
56 ---Purpose: compute Location
57 returns Boolean is deferred;
63 Poles2d : out Array1OfPnt2d from TColgp)
64 ---Purpose: compute Location and 2d points
65 returns Boolean is deferred;
73 Poles2d : out Array1OfPnt2d from TColgp;
74 DPoles2d : out Array1OfVec2d from TColgp)
75 ---Purpose: compute location 2d points and associated
77 -- Warning : It used only for C1 or C2 aproximation
88 D2M : out Mat from gp;
89 D2V : out Vec from gp;
90 Poles2d : out Array1OfPnt2d from TColgp;
91 DPoles2d : out Array1OfVec2d from TColgp;
92 D2Poles2d : out Array1OfVec2d from TColgp)
93 ---Purpose: compute location 2d points and associated
94 -- first and seconde derivatives.
95 -- Warning : It used only for C2 aproximation
101 -- ================== General Information On The Function ==================
104 ---Purpose: get the number of 2d curves (Restrictions + Traces)
106 returns Integer is static;
108 HasFirstRestriction(me)
109 ---Purpose: Say if the first restriction is defined in this class.
110 -- If it is true the first element of poles array in
111 -- D0,D1,D2... Correspond to this restriction.
112 -- Returns Standard_False (default implementation)
116 HasLastRestriction(me)
117 ---Purpose: Say if the last restriction is defined in this class.
118 -- If it is true the last element of poles array in
119 -- D0,D1,D2... Correspond to this restriction.
120 -- Returns Standard_False (default implementation)
125 ---Purpose: Give the number of trace (Curves 2d wich are not restriction)
126 -- Returns 0 (default implementation)
131 ---Purpose:Give a status to the Law
132 -- Returns PipeOk (default implementation)
133 returns PipeError from GeomFill
137 -- =================== Management of continuity ===================
139 NbIntervals(me; S : Shape from GeomAbs)
140 ---Purpose: Returns the number of intervals for continuity
142 -- May be one if Continuity(me) >= <S>
143 returns Integer is deferred;
145 Intervals(me; T : in out Array1OfReal from TColStd;
146 S : Shape from GeomAbs)
147 ---Purpose: Stores in <T> the parameters bounding the intervals
148 -- of continuity <S>.
150 -- The array must provide enough room to accomodate
151 -- for the parameters. i.e. T.Length() > NbIntervals()
153 OutOfRange from Standard
157 SetInterval(me: mutable; First, Last: Real from Standard)
158 ---Purpose: Sets the bounds of the parametric interval on
160 -- This determines the derivatives in these values if the
161 -- function is not Cn.
164 GetInterval(me; First, Last: out Real from Standard)
165 ---Purpose: Gets the bounds of the parametric interval on
169 GetDomain(me; First, Last: out Real from Standard)
170 ---Purpose: Gets the bounds of the function parametric domain.
171 -- Warning: This domain it is not modified by the
175 -- =================== To help computation of Tolerance ===============
177 -- Evaluation of error, in 2d space, or on composed function, is
178 -- difficult. The following methods can help the approximation to
179 -- make good evaluation and use good tolerances.
181 -- It is not necessary for the following informations to be very
182 -- precise. A fast evaluation is sufficient.
185 Index : Integer from Standard;
186 Tol : Real from Standard;
187 TolU, TolV : out Real from Standard)
188 ---Purpose: Returns the resolutions in the sub-space 2d <Index>
189 -- This information is usfull to find an good tolerance in
191 ---Warning: Used only if Nb2dCurve > 0
192 raises NotImplemented
195 SetTolerance(me : mutable; Tol3d, Tol2d : Real)
196 ---Purpose: Is usefull, if (me) have to run numerical
197 -- algorithm to perform D0, D1 or D2
198 -- The default implementation make nothing.
201 GetMaximalNorm(me : mutable)
202 ---Purpose: Get the maximum Norm of the matrix-location part. It
203 -- is usful to find an good Tolerance to approx M(t).
207 GetAverageLaw(me : mutable;
210 ---Purpose: Get average value of M(t) and V(t) it is usfull to
211 -- make fast approximation of rational surfaces.
215 -- To find elementary sweep
218 IsTranslation(me; Error : out Real)
219 ---Purpose: Say if the Location Law, is an translation of Location
220 -- The default implementation is " returns False ".
224 IsRotation(me; Error : out Real)
225 ---Purpose: Say if the Location Law, is a rotation of Location
226 -- The default implementation is " returns False ".
231 Rotation(me; Center : out Pnt from gp)
232 raises NotImplemented