42cf5bc1 |
1 | // Created on: 1994-03-17 |
2 | // Created by: Bruno DUMORTIER |
3 | // Copyright (c) 1994-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 _GeomAPI_HeaderFile |
18 | #define _GeomAPI_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
5b111128 |
24 | #include <Geom2d_Curve.hxx> |
25 | #include <Geom_Curve.hxx> |
26 | |
42cf5bc1 |
27 | class gp_Pln; |
28 | class GeomAPI_ProjectPointOnCurve; |
29 | class GeomAPI_ProjectPointOnSurf; |
30 | class GeomAPI_ExtremaCurveCurve; |
31 | class GeomAPI_ExtremaCurveSurface; |
32 | class GeomAPI_ExtremaSurfaceSurface; |
33 | class GeomAPI_PointsToBSpline; |
34 | class GeomAPI_PointsToBSplineSurface; |
35 | class GeomAPI_Interpolate; |
36 | class GeomAPI_IntSS; |
37 | class GeomAPI_IntCS; |
38 | |
39 | |
40 | //! The GeomAPI package provides an Application |
41 | //! Programming Interface for the Geometry. |
42 | //! |
43 | //! The API is a set of classes and methods aiming to |
44 | //! provide : |
45 | //! |
46 | //! * High level and simple calls for the most common |
47 | //! operations. |
48 | //! |
49 | //! * Keeping an access on the low-level |
50 | //! implementation of high-level calls. |
51 | //! |
52 | //! The API provides classes to call the algorithmes |
53 | //! of the Geometry |
54 | //! |
55 | //! * The constructors of the classes provides the |
56 | //! different constructions methods. |
57 | //! |
58 | //! * The class keeps as fields the different tools |
59 | //! used by the algorithmes |
60 | //! |
61 | //! * The class provides a casting method to get |
62 | //! automatically the result with a function-like |
63 | //! call. |
64 | //! |
65 | //! For example to evaluate the distance <D> between a |
66 | //! point <P> and a curve <C>, one can writes : |
67 | //! |
68 | //! D = GeomAPI_ProjectPointOnCurve(P,C); |
69 | //! |
70 | //! or |
71 | //! |
72 | //! GeomAPI_ProjectPointOnCurve PonC(P,C); |
73 | //! D = PonC.LowerDistance(); |
74 | class GeomAPI |
75 | { |
76 | public: |
77 | |
78 | DEFINE_STANDARD_ALLOC |
79 | |
80 | |
81 | //! This function builds (in the |
82 | //! parametric space of the plane P) a 2D curve equivalent to the 3D curve |
83 | //! C. The 3D curve C is considered to be located in the plane P. |
84 | //! Warning |
85 | //! The 3D curve C must be of one of the following types: |
86 | //! - a line |
87 | //! - a circle |
88 | //! - an ellipse |
89 | //! - a hyperbola |
90 | //! - a parabola |
91 | //! - a Bezier curve |
92 | //! - a BSpline curve |
93 | //! Exceptions Standard_NoSuchObject if C is not a defined type curve. |
94 | Standard_EXPORT static Handle(Geom2d_Curve) To2d (const Handle(Geom_Curve)& C, const gp_Pln& P); |
95 | |
96 | //! Builds a 3D curve equivalent to the 2D curve C |
97 | //! described in the parametric space defined by the local |
98 | //! coordinate system of plane P. |
99 | //! The resulting 3D curve is of the same nature as that of the curve C. |
100 | Standard_EXPORT static Handle(Geom_Curve) To3d (const Handle(Geom2d_Curve)& C, const gp_Pln& P); |
101 | |
102 | |
103 | |
104 | |
105 | protected: |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | private: |
112 | |
113 | |
114 | |
115 | |
116 | friend class GeomAPI_ProjectPointOnCurve; |
117 | friend class GeomAPI_ProjectPointOnSurf; |
118 | friend class GeomAPI_ExtremaCurveCurve; |
119 | friend class GeomAPI_ExtremaCurveSurface; |
120 | friend class GeomAPI_ExtremaSurfaceSurface; |
121 | friend class GeomAPI_PointsToBSpline; |
122 | friend class GeomAPI_PointsToBSplineSurface; |
123 | friend class GeomAPI_Interpolate; |
124 | friend class GeomAPI_IntSS; |
125 | friend class GeomAPI_IntCS; |
126 | |
127 | }; |
128 | |
129 | |
130 | |
131 | |
132 | |
133 | |
134 | |
135 | #endif // _GeomAPI_HeaderFile |