1 -- File: ProjLib_CompProjectedCurve.cdl
2 -- Created: Mon Sep 22 12:46:50 1997
3 -- Author: Roman BORISOV
4 -- <rbv@pronox.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
7 class CompProjectedCurve from ProjLib inherits Curve2d from Adaptor2d
10 HSurface from Adaptor3d,
11 HCurve from Adaptor3d,
12 HCurve2d from Adaptor2d,
16 Array1OfReal from TColStd,
17 HSequenceOfHSequenceOfPnt from ProjLib,
19 HArray1OfBoolean from TColStd,
20 HArray1OfReal from TColStd,
21 CurveType from GeomAbs
25 OutOfRange from Standard,
26 NoSuchObject from Standard,
27 DomainError from Standard,
28 NotImplemented from Standard
32 Create returns CompProjectedCurve;
35 Create(S : HSurface from Adaptor3d;
36 C : HCurve from Adaptor3d;
37 TolU, TolV: Real from Standard)
38 returns CompProjectedCurve;
39 ---Purpose: try to find all solutions
41 Create(S : HSurface from Adaptor3d;
42 C : HCurve from Adaptor3d;
43 TolU, TolV, MaxDist: Real from Standard)
44 returns CompProjectedCurve;
45 ---Purpose: this constructor tries to optimize the search using the
46 -- assamption that maximum distance between surface and curve less or
47 -- equal then MaxDist.
48 -- if MaxDist < 0 then algorithm works as above.
51 ---Purpose : computes a set of projected point and determine the
52 -- continuous parts of the projected curves. The points
53 -- corresponding to a projection on the bounds of the surface are
54 -- included in this set of points.
57 Load(me : in out;S : HSurface from Adaptor3d)
58 ---Purpose: Changes the surface.
61 Load(me : in out; C : HCurve from Adaptor3d)
62 ---Purpose: Changes the curve.
65 GetSurface(me) returns HSurface from Adaptor3d
66 ---C++: return const &
69 GetCurve(me) returns HCurve from Adaptor3d
70 ---C++: return const &
73 GetTolerance(me; TolU, TolV: in out Real)
76 -- Global methods - Apply to the whole curve.
78 NbCurves (me) returns Integer from Standard
79 ---Purpose: returns the number of continuous part of the projected curve
82 Bounds(me; Index : in Integer from Standard;
83 Udeb,Ufin : out Real from Standard)
84 --- Purpose : returns the bounds of the continuous part corresponding to Index
88 IsSinglePnt(me; Index: Integer; P : out Pnt2d from gp ) returns Boolean from Standard
89 --- Purpose : returns True if part of projection with number Index is a single point and writes its coordinats in P
93 IsUIso(me; Index: Integer; U : out Real from Standard) returns Boolean from Standard
94 --- Purpose : returns True if part of projection with number Index is an u-isoparametric curve of input surface
98 IsVIso(me; Index: Integer; V : out Real from Standard) returns Boolean from Standard
99 --- Purpose : returns True if part of projection with number Index is an v-isoparametric curve of input surface
104 Value(me; U : Real from Standard) returns Pnt2d from gp
105 --- Purpose : Computes the point of parameter U on the curve.
108 D0 (me; U : Real from Standard; P : out Pnt2d from gp)
109 --- Purpose : Computes the point of parameter U on the curve.
113 D1 (me; U : Real from Standard; P : out Pnt2d from gp ; V : out Vec2d from gp)
114 --- Purpose : Computes the point of parameter U on the curve with its
117 DomainError from Standard
118 --- Purpose : Raised if the continuity of the current interval
123 D2 (me; U : Real from Standard; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
125 -- Returns the point P of parameter U, the first and second
126 -- derivatives V1 and V2.
128 DomainError from Standard
129 --- Purpose : Raised if the continuity of the current interval
133 DN (me; U : Real; N : Integer) returns Vec2d from gp
135 -- The returned vector gives the value of the derivative for the
136 -- order of derivation N.
138 OutOfRange from Standard,
139 --- Purpose : Raised if N < 1.
140 NotImplemented from Standard
141 --- Purpose : Raised if N > 2.
145 FirstParameter(me) returns Real
146 ---Purpose: Returns the first parameter of the curve C
147 -- which has a projection on S.
150 LastParameter(me) returns Real
151 ---Purpose: Returns the last parameter of the curve C
152 -- which has a projection on S.
155 NbIntervals(me; S : Shape from GeomAbs) returns Integer
156 ---Purpose: Returns the number of intervals which define
157 -- an S continuous part of the projected curve
160 Trim(me;FirstParam,LastParam,Tol : Real) returns HCurve2d from Adaptor2d
161 ---Purpose: Returns a curve equivalent of <me> between
162 -- parameters <First> and <Last>. <Tol> is used to
163 -- test for 2d points confusion.
165 OutOfRange from Standard
166 ---Purpose: If <First> >= <Last>
170 Intervals(me; T : in out Array1OfReal from TColStd;
171 S : Shape from GeomAbs)
172 ---Purpose: Returns the parameters corresponding to
173 -- S discontinuities.
175 -- The array must provide enough room to accomodate
176 -- for the parameters. i.e. T.Length() > NbIntervals()
178 OutOfRange from Standard
181 BuildIntervals(me; S : Shape from GeomAbs)
183 OutOfRange from Standard
186 MaxDistance(me; Index: Integer)
187 ---Purpose: returns the maximum distance between
188 -- curve to project and surface
192 -- Methods for debugging
193 GetSequence(me) returns HSequenceOfHSequenceOfPnt from ProjLib
194 ---C++: return const &
197 GetType(me) returns CurveType from GeomAbs
198 ---Purpose: Returns the type of the curve in the current
199 -- interval : Line, Circle, Ellipse, Hyperbola,
200 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
205 mySurface : HSurface from Adaptor3d;
206 myCurve : HCurve from Adaptor3d;
207 myNbCurves : Integer from Standard;
208 mySequence : HSequenceOfHSequenceOfPnt from ProjLib;
209 myTolU : Real from Standard;
210 myTolV : Real from Standard;
211 myMaxDist : Real from Standard;
212 myUIso : HArray1OfBoolean from TColStd;
213 myVIso : HArray1OfBoolean from TColStd;
214 mySnglPnts : HArray1OfBoolean from TColStd;
215 myMaxDistance : HArray1OfReal from TColStd;
217 end CompProjectedCurve;