0027135: Incorrect result of the normal projection algorithm
[occt.git] / src / ProjLib / ProjLib.hxx
CommitLineData
42cf5bc1 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#ifndef _ProjLib_HeaderFile
18#define _ProjLib_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24class gp_Pnt2d;
25class gp_Pln;
26class gp_Pnt;
27class gp_Lin2d;
28class gp_Lin;
29class gp_Circ2d;
30class gp_Circ;
31class gp_Elips2d;
32class gp_Elips;
33class gp_Parab2d;
34class gp_Parab;
35class gp_Hypr2d;
36class gp_Hypr;
37class gp_Cylinder;
38class gp_Cone;
39class gp_Sphere;
40class gp_Torus;
41class ProjLib_ProjectOnPlane;
42class ProjLib_ProjectOnSurface;
43class ProjLib_ComputeApprox;
44class ProjLib_ComputeApproxOnPolarSurface;
45class ProjLib_ProjectedCurve;
46class ProjLib_HProjectedCurve;
47class ProjLib_CompProjectedCurve;
48class ProjLib_HCompProjectedCurve;
49class ProjLib_PrjResolve;
50class ProjLib_PrjFunc;
51class ProjLib_Projector;
52class ProjLib_Plane;
53class ProjLib_Cylinder;
54class ProjLib_Cone;
55class ProjLib_Sphere;
56class ProjLib_Torus;
57
58
59//! The projLib package first provides projection of
60//! curves on a plane along a given Direction. The
61//! result will be a 3D curve.
62//! The ProjLib package provides projection of curves
63//! on surfaces to compute the curve in the parametric
64//! space.
65//!
66//! It is assumed that the curve is on the surface.
67//!
68//! It provides :
69//!
70//! * Package methods to handle the easiest cases :
71//!
72//! - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
73//!
74//! - Line, Circle on cylinder.
75//!
76//! - Line, Circle on cone.
77//!
78//! * Classes to handle the general cases :
79//!
80//! - Plane.
81//!
82//! - Cylinder.
83//!
84//! - Cone.
85//!
86//! - Sphere.
87//!
88//! - Torus.
89//!
90//! * A generic class to handle a Curve from Adaptor3d
91//! on a Surface from Adaptor3d.
92class ProjLib
93{
94public:
95
96 DEFINE_STANDARD_ALLOC
97
98
99 Standard_EXPORT static gp_Pnt2d Project (const gp_Pln& Pl, const gp_Pnt& P);
100
101 Standard_EXPORT static gp_Lin2d Project (const gp_Pln& Pl, const gp_Lin& L);
102
103 Standard_EXPORT static gp_Circ2d Project (const gp_Pln& Pl, const gp_Circ& C);
104
105 Standard_EXPORT static gp_Elips2d Project (const gp_Pln& Pl, const gp_Elips& E);
106
107 Standard_EXPORT static gp_Parab2d Project (const gp_Pln& Pl, const gp_Parab& P);
108
109 Standard_EXPORT static gp_Hypr2d Project (const gp_Pln& Pl, const gp_Hypr& H);
110
111 Standard_EXPORT static gp_Pnt2d Project (const gp_Cylinder& Cy, const gp_Pnt& P);
112
113 Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Lin& L);
114
115 Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Circ& Ci);
116
117 Standard_EXPORT static gp_Pnt2d Project (const gp_Cone& Co, const gp_Pnt& P);
118
119 Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Lin& L);
120
121 Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Circ& Ci);
122
123 Standard_EXPORT static gp_Pnt2d Project (const gp_Sphere& Sp, const gp_Pnt& P);
124
125 Standard_EXPORT static gp_Lin2d Project (const gp_Sphere& Sp, const gp_Circ& Ci);
126
127 Standard_EXPORT static gp_Pnt2d Project (const gp_Torus& To, const gp_Pnt& P);
128
129 Standard_EXPORT static gp_Lin2d Project (const gp_Torus& To, const gp_Circ& Ci);
130
131
132
133
134protected:
135
136
137
138
139
140private:
141
142
143
144
145friend class ProjLib_ProjectOnPlane;
146friend class ProjLib_ProjectOnSurface;
147friend class ProjLib_ComputeApprox;
148friend class ProjLib_ComputeApproxOnPolarSurface;
149friend class ProjLib_ProjectedCurve;
150friend class ProjLib_HProjectedCurve;
151friend class ProjLib_CompProjectedCurve;
152friend class ProjLib_HCompProjectedCurve;
153friend class ProjLib_PrjResolve;
154friend class ProjLib_PrjFunc;
155friend class ProjLib_Projector;
156friend class ProjLib_Plane;
157friend class ProjLib_Cylinder;
158friend class ProjLib_Cone;
159friend class ProjLib_Sphere;
160friend class ProjLib_Torus;
161
162};
163
164
165
166
167
168
169
170#endif // _ProjLib_HeaderFile