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 | |
24 | class gp_Pnt2d; |
25 | class gp_Pln; |
26 | class gp_Pnt; |
27 | class gp_Lin2d; |
28 | class gp_Lin; |
29 | class gp_Circ2d; |
30 | class gp_Circ; |
31 | class gp_Elips2d; |
32 | class gp_Elips; |
33 | class gp_Parab2d; |
34 | class gp_Parab; |
35 | class gp_Hypr2d; |
36 | class gp_Hypr; |
37 | class gp_Cylinder; |
38 | class gp_Cone; |
39 | class gp_Sphere; |
40 | class gp_Torus; |
41 | class ProjLib_ProjectOnPlane; |
42 | class ProjLib_ProjectOnSurface; |
43 | class ProjLib_ComputeApprox; |
44 | class ProjLib_ComputeApproxOnPolarSurface; |
45 | class ProjLib_ProjectedCurve; |
46 | class ProjLib_HProjectedCurve; |
47 | class ProjLib_CompProjectedCurve; |
48 | class ProjLib_HCompProjectedCurve; |
49 | class ProjLib_PrjResolve; |
50 | class ProjLib_PrjFunc; |
51 | class ProjLib_Projector; |
52 | class ProjLib_Plane; |
53 | class ProjLib_Cylinder; |
54 | class ProjLib_Cone; |
55 | class ProjLib_Sphere; |
56 | class 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. |
92 | class ProjLib |
93 | { |
94 | public: |
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 | |
134 | protected: |
135 | |
136 | |
137 | |
138 | |
139 | |
140 | private: |
141 | |
142 | |
143 | |
144 | |
145 | friend class ProjLib_ProjectOnPlane; |
146 | friend class ProjLib_ProjectOnSurface; |
147 | friend class ProjLib_ComputeApprox; |
148 | friend class ProjLib_ComputeApproxOnPolarSurface; |
149 | friend class ProjLib_ProjectedCurve; |
150 | friend class ProjLib_HProjectedCurve; |
151 | friend class ProjLib_CompProjectedCurve; |
152 | friend class ProjLib_HCompProjectedCurve; |
153 | friend class ProjLib_PrjResolve; |
154 | friend class ProjLib_PrjFunc; |
155 | friend class ProjLib_Projector; |
156 | friend class ProjLib_Plane; |
157 | friend class ProjLib_Cylinder; |
158 | friend class ProjLib_Cone; |
159 | friend class ProjLib_Sphere; |
160 | friend class ProjLib_Torus; |
161 | |
162 | }; |
163 | |
164 | |
165 | |
166 | |
167 | |
168 | |
169 | |
170 | #endif // _ProjLib_HeaderFile |