0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / TopTrans / TopTrans_CurveTransition.cdl
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
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class CurveTransition from TopTrans 
18
19         ---Purpose: This algorithm  is used to  compute the transition
20         --          of a Curve intersecting a curvilinear boundary.
21         --          
22         --          The geometric  elements  are described locally  at
23         --          the   intersection   point  by    a   second order
24         --          development.
25         --          
26         --          The curve is described  by the intersection point,
27         --          the tangent vector and the curvature.
28         --          
29         --          The  boundary  is described  by   a set  of  curve
30         --          elements, a curve element is either :
31         --          
32         --          - A curve.
33         --          
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.
37         --          
38
39 uses
40
41     Boolean from Standard,
42     Real from Standard,
43     
44     Pnt from gp,
45     Dir from gp,
46     
47     State from TopAbs,
48     Orientation from TopAbs
49
50 is
51
52     Create returns CurveTransition from TopTrans;
53         ---Purpose: Create an empty  Curve Transition.
54
55
56     Reset( me   : in out;
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
61         --          of a Curve.
62     
63     Reset( me   : in out;
64            Tgt  : in Dir from gp);       -- Tangent at this point      
65         ---Purpose: Initialize a Transition with the local description
66         --          of a straigth line.
67     
68     Compare(me : in out;
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.
80
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.
86         
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.
92
93
94 ---Implementation functions :
95
96     IsBefore(   me;
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
106
107     Compare(me;
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
113             
114             
115 fields
116
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    
120     
121     Init   : Boolean;
122
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;
127
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;
132
133 end CurveTransition;