1 -- Created on: 1993-08-11
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1993-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.
27 ---Purpose: The projLib package first provides projection of
28 -- curves on a plane along a given Direction. The
29 -- result will be a 3D curve.
32 ---Purpose: The ProjLib package provides projection of curves
33 -- on surfaces to compute the curve in the parametric
36 -- It is assumed that the curve is on the surface.
40 -- * Package methods to handle the easiest cases :
42 -- - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
44 -- - Line, Circle on cylinder.
46 -- - Line, Circle on cone.
48 -- * Classes to handle the general cases :
61 -- * A generic class to handle a Curve from Adaptor3d
62 -- on a Surface from Adaptor3d.
66 GeomAbs, -- Geometry enumeration
67 gp, -- Elementary geometry
70 Adaptor2d, -- Curve and Surface interface.
71 Adaptor3d, -- Curve and Surface interface.
72 Extrema, -- for projection of points on surface.
81 -- ---------------------------------------------------------------
82 -- Classes computing the projection of a 3d curve on a surface.
83 -- The result will be a 3d curve.
85 -- Make an approximation if necessary
86 -- ---------------------------------------------------------------
89 class ProjectOnPlane ;
90 ---Purpose: Project a curve on a plane.
93 class ProjectOnSurface ;
94 ---Purpose: Project a curve on a surface. The result ( a 3D
95 -- Curve) will be an approximation
100 -- ---------------------------------------------------------------
101 -- Classes computing the PCurves of curves lying on a surface
103 -- Make an approximation if necessary
104 -- ---------------------------------------------------------------
108 ---Purpose: Approximate the projection of a 3d curve on an
109 -- analytic surface and stores the result in Approx.
110 -- The result is a 2d curve.
113 class ComputeApproxOnPolarSurface ;
114 ---Purpose: Approximate the projection of a 3d curve on an
115 -- polar surface and stores the result in Approx.
116 -- The result is a 2d curve. The evaluation of the
117 -- current point of the 2d curve is done with the
118 -- evaluation of the extrema P3d - Surface.
121 class ProjectedCurve ;
122 ---Purpose: Compute the 2d-curve. Try to solve the particular
123 -- case if possible. Otherwize, an approximation is
127 class HProjectedCurve instantiates
128 GenHCurve2d from Adaptor2d (ProjectedCurve);
130 ---------------------------------------------
131 -- Normal projection of a curve on a surface
132 -- Computes the different parts
133 -----------------------------------------------
134 class SequenceOfHSequenceOfPnt
135 instantiates Sequence from TCollection (HSequenceOfPnt from TColgp);
137 class HSequenceOfHSequenceOfPnt
138 instantiates HSequence from TCollection (HSequenceOfPnt from TColgp,SequenceOfHSequenceOfPnt from ProjLib);
139 class CompProjectedCurve;
140 class HCompProjectedCurve
141 instantiates GenHCurve2d from Adaptor2d (CompProjectedCurve);
143 private class PrjResolve;
144 private class PrjFunc;
147 -- ------------------------------------------------------------
148 -- Projection of Curves on Surfaces.
150 -- This classes evaluate the 2d curve of a curve lying on a
151 -- surface in some particular case. See the description of this
152 -- classes to have more informations.
154 -- ------------------------------------------------------------
157 ---Purpose: Root class for projections. Stores the result.
160 ---Purpose: Projection on a plane.
163 ---Purpose: Projection on a cylinder.
166 ---Purpose: Projection on a cone.
169 ---Purpose: Projection on a sphere.
172 ---Purpose: Projection on a torus.
177 Project(Pl : Pln from gp;
178 P : Pnt from gp ) returns Pnt2d from gp;
180 Project(Pl : Pln from gp;
181 L : Lin from gp ) returns Lin2d from gp;
183 Project(Pl : Pln from gp;
184 C : Circ from gp ) returns Circ2d from gp;
186 Project(Pl : Pln from gp;
187 E : Elips from gp ) returns Elips2d from gp;
189 Project(Pl : Pln from gp;
190 P : Parab from gp ) returns Parab2d from gp;
192 Project(Pl : Pln from gp;
193 H : Hypr from gp ) returns Hypr2d from gp;
195 Project(Cy : Cylinder from gp;
196 P : Pnt from gp ) returns Pnt2d from gp;
198 Project(Cy : Cylinder from gp;
199 L : Lin from gp ) returns Lin2d from gp;
201 Project(Cy : Cylinder from gp;
202 Ci : Circ from gp ) returns Lin2d from gp;
204 Project(Co : Cone from gp;
205 P : Pnt from gp ) returns Pnt2d from gp;
207 Project(Co : Cone from gp;
208 L : Lin from gp ) returns Lin2d from gp;
210 Project(Co : Cone from gp;
211 Ci : Circ from gp ) returns Lin2d from gp;
213 Project(Sp : Sphere from gp;
214 P : Pnt from gp ) returns Pnt2d from gp;
216 Project(Sp : Sphere from gp;
217 Ci : Circ from gp ) returns Lin2d from gp;
219 Project(To : Torus from gp;
220 P : Pnt from gp ) returns Pnt2d from gp;
222 Project(To : Torus from gp;
223 Ci : Circ from gp ) returns Lin2d from gp;