1 -- Created on: 1997-09-22
2 -- Created by: Roman BORISOV
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 under
9 -- the terms of the GNU Lesser General Public License 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 CompProjectedCurve from ProjLib inherits Curve2d from Adaptor2d
20 HSurface from Adaptor3d,
21 HCurve from Adaptor3d,
22 HCurve2d from Adaptor2d,
26 Array1OfReal from TColStd,
27 HSequenceOfHSequenceOfPnt from ProjLib,
29 HArray1OfBoolean from TColStd,
30 HArray1OfReal from TColStd,
31 CurveType from GeomAbs
35 OutOfRange from Standard,
36 NoSuchObject from Standard,
37 DomainError from Standard,
38 NotImplemented from Standard
42 Create returns CompProjectedCurve;
45 Create(S : HSurface from Adaptor3d;
46 C : HCurve from Adaptor3d;
47 TolU, TolV: Real from Standard)
48 returns CompProjectedCurve;
49 ---Purpose: try to find all solutions
51 Create(S : HSurface from Adaptor3d;
52 C : HCurve from Adaptor3d;
53 TolU, TolV, MaxDist: Real from Standard)
54 returns CompProjectedCurve;
55 ---Purpose: this constructor tries to optimize the search using the
56 -- assamption that maximum distance between surface and curve less or
57 -- equal then MaxDist.
58 -- if MaxDist < 0 then algorithm works as above.
61 ---Purpose : computes a set of projected point and determine the
62 -- continuous parts of the projected curves. The points
63 -- corresponding to a projection on the bounds of the surface are
64 -- included in this set of points.
67 Load(me : in out;S : HSurface from Adaptor3d)
68 ---Purpose: Changes the surface.
71 Load(me : in out; C : HCurve from Adaptor3d)
72 ---Purpose: Changes the curve.
75 GetSurface(me) returns HSurface from Adaptor3d
76 ---C++: return const &
79 GetCurve(me) returns HCurve from Adaptor3d
80 ---C++: return const &
83 GetTolerance(me; TolU, TolV: in out Real)
86 -- Global methods - Apply to the whole curve.
88 NbCurves (me) returns Integer from Standard
89 ---Purpose: returns the number of continuous part of the projected curve
92 Bounds(me; Index : in Integer from Standard;
93 Udeb,Ufin : out Real from Standard)
94 --- Purpose : returns the bounds of the continuous part corresponding to Index
98 IsSinglePnt(me; Index: Integer; P : out Pnt2d from gp ) returns Boolean from Standard
99 --- Purpose : returns True if part of projection with number Index is a single point and writes its coordinats in P
103 IsUIso(me; Index: Integer; U : out Real from Standard) returns Boolean from Standard
104 --- Purpose : returns True if part of projection with number Index is an u-isoparametric curve of input surface
108 IsVIso(me; Index: Integer; V : out Real from Standard) returns Boolean from Standard
109 --- Purpose : returns True if part of projection with number Index is an v-isoparametric curve of input surface
114 Value(me; U : Real from Standard) returns Pnt2d from gp
115 --- Purpose : Computes the point of parameter U on the curve.
118 D0 (me; U : Real from Standard; P : out Pnt2d from gp)
119 --- Purpose : Computes the point of parameter U on the curve.
123 D1 (me; U : Real from Standard; P : out Pnt2d from gp ; V : out Vec2d from gp)
124 --- Purpose : Computes the point of parameter U on the curve with its
127 DomainError from Standard
128 --- Purpose : Raised if the continuity of the current interval
133 D2 (me; U : Real from Standard; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
135 -- Returns the point P of parameter U, the first and second
136 -- derivatives V1 and V2.
138 DomainError from Standard
139 --- Purpose : Raised if the continuity of the current interval
143 DN (me; U : Real; N : Integer) returns Vec2d from gp
145 -- The returned vector gives the value of the derivative for the
146 -- order of derivation N.
148 OutOfRange from Standard,
149 --- Purpose : Raised if N < 1.
150 NotImplemented from Standard
151 --- Purpose : Raised if N > 2.
155 FirstParameter(me) returns Real
156 ---Purpose: Returns the first parameter of the curve C
157 -- which has a projection on S.
160 LastParameter(me) returns Real
161 ---Purpose: Returns the last parameter of the curve C
162 -- which has a projection on S.
165 NbIntervals(me; S : Shape from GeomAbs) returns Integer
166 ---Purpose: Returns the number of intervals which define
167 -- an S continuous part of the projected curve
170 Trim(me;FirstParam,LastParam,Tol : Real) returns HCurve2d from Adaptor2d
171 ---Purpose: Returns a curve equivalent of <me> between
172 -- parameters <First> and <Last>. <Tol> is used to
173 -- test for 2d points confusion.
175 OutOfRange from Standard
176 ---Purpose: If <First> >= <Last>
180 Intervals(me; T : in out Array1OfReal from TColStd;
181 S : Shape from GeomAbs)
182 ---Purpose: Returns the parameters corresponding to
183 -- S discontinuities.
185 -- The array must provide enough room to accomodate
186 -- for the parameters. i.e. T.Length() > NbIntervals()
188 OutOfRange from Standard
191 BuildIntervals(me; S : Shape from GeomAbs)
193 OutOfRange from Standard
196 MaxDistance(me; Index: Integer)
197 ---Purpose: returns the maximum distance between
198 -- curve to project and surface
202 -- Methods for debugging
203 GetSequence(me) returns HSequenceOfHSequenceOfPnt from ProjLib
204 ---C++: return const &
207 GetType(me) returns CurveType from GeomAbs
208 ---Purpose: Returns the type of the curve in the current
209 -- interval : Line, Circle, Ellipse, Hyperbola,
210 -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
215 mySurface : HSurface from Adaptor3d;
216 myCurve : HCurve from Adaptor3d;
217 myNbCurves : Integer from Standard;
218 mySequence : HSequenceOfHSequenceOfPnt from ProjLib;
219 myTolU : Real from Standard;
220 myTolV : Real from Standard;
221 myMaxDist : Real from Standard;
222 myUIso : HArray1OfBoolean from TColStd;
223 myVIso : HArray1OfBoolean from TColStd;
224 mySnglPnts : HArray1OfBoolean from TColStd;
225 myMaxDistance : HArray1OfReal from TColStd;
226 myTabInt : HArray1OfReal from TColStd; -- this field should be mutable
228 end CompProjectedCurve;