1 -- Created on: 1997-12-19
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class Frenet from GeomFill
24 inherits TrihedronLaw from GeomFill
26 ---Purpose: Defined Frenet Trihedron Law
29 HCurve from Adaptor3d,
31 Array1OfReal from TColStd,
34 HArray1OfReal from TColStd,
35 HArray1OfBoolean from TColStd
37 OutOfRange, ConstructionError
41 returns Frenet from GeomFill
42 raises ConstructionError;
45 returns TrihedronLaw from GeomFill
51 SetCurve(me : mutable; C : HCurve from Adaptor3d)
56 --========== To compute Location and derivatives Location
60 Tangent : out Vec from gp;
61 Normal : out Vec from gp;
62 BiNormal : out Vec from gp)
63 ---Purpose: compute Triedrhon on curve at parameter <Param>
64 returns Boolean is redefined;
68 Tangent : out Vec from gp;
69 DTangent : out Vec from gp;
70 Normal : out Vec from gp;
71 DNormal : out Vec from gp;
72 BiNormal : out Vec from gp;
73 DBiNormal : out Vec from gp)
74 ---Purpose: compute Triedrhon and derivative Trihedron on curve
75 -- at parameter <Param>
76 -- Warning : It used only for C1 or C2 aproximation
82 Tangent : out Vec from gp;
83 DTangent : out Vec from gp;
84 D2Tangent : out Vec from gp;
85 Normal : out Vec from gp;
86 DNormal : out Vec from gp;
87 D2Normal : out Vec from gp;
88 BiNormal : out Vec from gp;
89 DBiNormal : out Vec from gp;
90 D2BiNormal : out Vec from gp)
91 ---Purpose: compute Trihedron on curve
92 -- first and seconde derivatives.
93 -- Warning : It used only for C2 aproximation
97 -- =================== Management of continuity ===================
99 NbIntervals(me; S : Shape from GeomAbs)
100 ---Purpose: Returns the number of intervals for continuity
102 -- May be one if Continuity(me) >= <S>
103 returns Integer is redefined;
105 Intervals(me; T : in out Array1OfReal from TColStd;
106 S : Shape from GeomAbs)
107 ---Purpose: Stores in <T> the parameters bounding the intervals
108 -- of continuity <S>.
110 -- The array must provide enough room to accomodate
111 -- for the parameters. i.e. T.Length() > NbIntervals()
113 OutOfRange from Standard
117 -- =================== To help computation of Tolerance ===============
118 GetAverageLaw(me : mutable;
119 ATangent : out Vec from gp;
120 ANormal : out Vec from gp;
121 ABiNormal : out Vec from gp)
122 ---Purpose: Get average value of Tangent(t) and Normal(t) it is usfull to
123 -- make fast approximation of rational surfaces.
126 -- =================== To help Particular case ===============
129 ---Purpose: Say if the law is Constant.
134 ---Purpose: Return True.
138 IsSingular(me; U: Real; Index: out Integer)
142 DoSingular(me: mutable; U: Real; Index: Integer;
143 Tangent, BiNormal: out Vec from gp;
144 n, k, TFlag, BNFlag: out Integer;
149 SingularD0(me : mutable;
150 Param: Real; Index: Integer;
151 Tangent : out Vec from gp;
152 Normal : out Vec from gp;
153 BiNormal : out Vec from gp;
155 ---Purpose: computes Triedrhon on curve at parameter <Param>
159 SingularD1(me : mutable;
160 Param: Real; Index: Integer;
161 Tangent : out Vec from gp;
162 DTangent : out Vec from gp;
163 Normal : out Vec from gp;
164 DNormal : out Vec from gp;
165 BiNormal : out Vec from gp;
166 DBiNormal : out Vec from gp;
168 ---Purpose: computes Triedrhon and derivative Trihedron on curve
169 -- at parameter <Param>
170 -- Warning : It used only for C1 or C2 aproximation
174 SingularD2(me : mutable;
175 Param: Real; Index: Integer;
176 Tangent : out Vec from gp;
177 DTangent : out Vec from gp;
178 D2Tangent : out Vec from gp;
179 Normal : out Vec from gp;
180 DNormal : out Vec from gp;
181 D2Normal : out Vec from gp;
182 BiNormal : out Vec from gp;
183 DBiNormal : out Vec from gp;
184 D2BiNormal : out Vec from gp;
186 ---Purpose: computes Trihedron on curve
187 -- first and seconde derivatives.
188 -- Warning : It used only for C2 aproximation
194 mySngl : HArray1OfReal from TColStd;
195 mySnglLen : HArray1OfReal from TColStd;
196 isSngl : Boolean from Standard; -- True if there is some