1 -- Created on: 1992-01-30
2 -- Created by: Didier PIFFAULT
3 -- Copyright (c) 1992-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 CurveTransition from TopTrans
19 ---Purpose: This algorithm is used to compute the transition
20 -- of a Curve intersecting a curvilinear boundary.
22 -- The geometric elements are described locally at
23 -- the intersection point by a second order
26 -- The curve is described by the intersection point,
27 -- the tangent vector and the curvature.
29 -- The boundary is described by a set of curve
30 -- elements, a curve element is either :
34 -- - A curve and an orientation called a half-curve,
35 -- the boundary of the curve is before or after the
36 -- intersection point depending on the orientation.
41 Boolean from Standard,
48 Orientation from TopAbs
52 Create returns CurveTransition from TopTrans;
53 ---Purpose: Create an empty Curve Transition.
57 Tgt : in Dir from gp; -- Tangent at this point
58 Norm : in Dir from gp; -- Normal vector at this point
59 Curv : in Real from Standard);-- Curvature at this point
60 ---Purpose: Initialize a Transition with the local description
64 Tgt : in Dir from gp); -- Tangent at this point
65 ---Purpose: Initialize a Transition with the local description
66 -- of a straigth line.
69 Tole : in Real from Standard; -- Cosine tolerance
70 Tang : in Dir from gp; -- Tangent on curve for this point
71 Norm : in Dir from gp; -- Normal vector at this point
72 Curv : in Real from Standard; -- Curvature at this point
73 S : in Orientation from TopAbs; -- transition locale
74 Or : in Orientation from TopAbs);-- orientation de la tangente
75 ---Purpose: Add a curve element to the boundary. If Or is
76 -- REVERSED the curve is before the intersection,
77 -- else if Or is FORWARD the curv is after the
78 -- intersection and if Or is INTERNAL the
79 -- intersection is in the middle of the curv.
81 StateBefore(me) returns State from TopAbs;
82 ---Purpose: returns the state of the curve before the
83 -- intersection, this is the position relative to the
84 -- boundary of a point very close to the intersection
85 -- on the negative side of the tangent.
87 StateAfter(me) returns State from TopAbs;
88 ---Purpose: returns the state of the curve after the
89 -- intersection, this is the position relative to the
90 -- boundary of a point very close to the intersection
91 -- on the positive side of the tangent.
94 ---Implementation functions :
97 Tole : in Real from Standard;
98 Angl : in Real from Standard;
99 Nor1 : in Dir from gp;
100 Cur1 : in Real from Standard;
101 Nor2 : in Dir from gp;
102 Cur2 : in Real from Standard)
103 returns Boolean from Standard is private;
104 ---Purpose: Compare two curvature and return true if N1,C1 is
105 -- before N2,C2 in the edge orientation
108 Ang1 : in Real from Standard;
109 Ang2 : in Real from Standard;
110 Tole : in Real from Standard)
111 returns Integer from Standard is private;
112 ---Purpose: Compare two angles at tolerance Tole
117 myTgt : Dir from gp; -- Tangent at this point
118 myNorm : Dir from gp; -- Normal vector at this point
119 myCurv : Real; -- Curvature at this point
123 TgtFirst : Dir from gp; -- Elements to determine the state
124 NormFirst : Dir from gp; --
125 CurvFirst : Real; -- before the intersection
126 TranFirst : Orientation from TopAbs;
128 TgtLast : Dir from gp; -- Elements to determine the state
129 NormLast : Dir from gp; --
130 CurvLast : Real; -- After the intersection
131 TranLast : Orientation from TopAbs;