0025095: Wrong result obtained by projection algorithm
[occt.git] / src / ProjLib / ProjLib.cdl
1 -- Created on: 1993-08-11
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-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 package ProjLib 
18
19
20         ---Purpose: The  projLib package  first provides projection of
21         --          curves on a   plane along a  given Direction.  The
22         --          result will be a 3D curve.
23
24
25         ---Purpose: The ProjLib package  provides projection of curves
26         --          on surfaces to compute the curve in the parametric
27         --          space. 
28         --          
29         --          It is assumed that the curve is on the surface.
30         --          
31         --          It provides :
32         --          
33         --          * Package methods to handle the easiest cases :
34         --          
35         --            - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
36         --            
37         --            - Line, Circle on cylinder.
38         --            
39         --            - Line, Circle on cone.
40         --            
41         --          * Classes to handle the general cases :
42         --          
43         --            - Plane.
44         --          
45         --            - Cylinder.
46         --            
47         --            - Cone.
48         --            
49         --            - Sphere.
50         --            
51         --            - Torus.
52         --            
53         --            
54         --          * A generic  class to handle  a Curve from Adaptor3d
55         --          on a Surface from Adaptor3d.
56         --          
57
58 uses
59     GeomAbs,       -- Geometry enumeration
60     gp,            -- Elementary geometry
61     Geom,
62     Geom2d,
63     Adaptor2d,       -- Curve and Surface interface.
64     Adaptor3d,       -- Curve and Surface interface.
65     Extrema,       -- for projection of points on surface.
66     GeomAdaptor,
67     TColgp,
68     TColStd,
69     TCollection, 
70     math 
71     
72 is
73
74     -- ---------------------------------------------------------------
75     --  Classes computing the projection of a 3d curve on a surface.
76     --  The result will be a 3d curve.
77     --  
78     --  Make an approximation if necessary
79     -- ---------------------------------------------------------------
80
81
82     class ProjectOnPlane ;
83
84     class ProjectOnSurface ;
85
86     -- ---------------------------------------------------------------
87     --  Classes computing the PCurves of  curves lying on a surface
88     --  
89     --  Make an approximation if necessary
90     -- ---------------------------------------------------------------
91
92
93     class ComputeApprox;
94
95     class ComputeApproxOnPolarSurface ;
96
97     class ProjectedCurve ;
98
99     class HProjectedCurve instantiates 
100         GenHCurve2d from Adaptor2d (ProjectedCurve);
101
102          ---------------------------------------------
103          -- Normal projection of a curve on a surface
104          -- Computes the different parts
105          -----------------------------------------------            
106     class SequenceOfHSequenceOfPnt 
107         instantiates  Sequence  from TCollection  (HSequenceOfPnt  from  TColgp); 
108  
109     class HSequenceOfHSequenceOfPnt 
110         instantiates  HSequence  from TCollection  (HSequenceOfPnt  from  TColgp,SequenceOfHSequenceOfPnt  from  ProjLib);  
111     class CompProjectedCurve; 
112     class HCompProjectedCurve 
113         instantiates  GenHCurve2d  from  Adaptor2d  (CompProjectedCurve); 
114
115     private  class PrjResolve;
116     private  class PrjFunc; 
117
118
119     -- ------------------------------------------------------------
120     --  Projection of Curves on Surfaces.
121     --  
122     --  This classes evaluate   the 2d curve of  a  curve lying  on  a
123     --  surface in  some particular case.  See the description of this
124     --  classes to have more informations.
125     --  
126     --  ------------------------------------------------------------
127
128     class Projector;
129
130     class Plane;
131
132     class Cylinder;
133
134     class Cone;
135
136     class Sphere;
137
138     class Torus;
139
140
141     -- methods
142
143     Project(Pl : Pln      from gp; 
144             P  : Pnt      from gp )  returns Pnt2d   from gp;
145
146     Project(Pl : Pln      from gp; 
147             L  : Lin      from gp )  returns Lin2d   from gp;
148
149     Project(Pl : Pln      from gp;
150             C  : Circ     from gp )  returns Circ2d  from gp;
151
152     Project(Pl : Pln      from gp; 
153             E  : Elips    from gp )  returns Elips2d from gp;
154
155     Project(Pl : Pln      from gp; 
156             P  : Parab    from gp )  returns Parab2d from gp;
157
158     Project(Pl : Pln      from gp; 
159             H  : Hypr     from gp )  returns Hypr2d  from gp;
160
161     Project(Cy : Cylinder from gp; 
162             P  : Pnt      from gp )  returns Pnt2d   from gp;
163
164     Project(Cy : Cylinder from gp; 
165             L  : Lin      from gp )  returns Lin2d   from gp;
166
167     Project(Cy : Cylinder from gp; 
168             Ci : Circ     from gp )  returns Lin2d   from gp;
169
170     Project(Co : Cone     from gp; 
171             P  : Pnt      from gp )  returns Pnt2d   from gp;
172
173     Project(Co : Cone     from gp; 
174             L  : Lin      from gp )  returns Lin2d   from gp;
175
176     Project(Co : Cone     from gp; 
177             Ci : Circ     from gp )  returns Lin2d   from gp;
178
179     Project(Sp : Sphere   from gp; 
180             P  : Pnt      from gp )  returns Pnt2d   from gp;
181
182     Project(Sp : Sphere   from gp; 
183             Ci : Circ     from gp )  returns Lin2d   from gp;
184
185     Project(To : Torus    from gp; 
186             P  : Pnt      from gp )  returns Pnt2d   from gp;
187
188     Project(To : Torus    from gp; 
189             Ci : Circ     from gp )  returns Lin2d   from gp;
190
191 end ProjLib;
192
193
194
195
196