1 // Created on: 1993-04-13
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _gp_HeaderFile
18 #define _gp_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23 #include <Standard_Real.hxx>
33 //! The geometric processor package, called gp, provides an
34 //! implementation of entities used :
35 //! . for algebraic calculation such as "XYZ" coordinates, "Mat"
37 //! . for basis analytic geometry such as Transformations, point,
38 //! vector, line, plane, axis placement, conics, and elementary
40 //! These entities are defined in 2d and 3d space.
41 //! All the classes of this package are non-persistent.
48 //! Method of package gp
50 //! In geometric computations, defines the tolerance criterion
51 //! used to determine when two numbers can be considered equal.
52 //! Many class functions use this tolerance criterion, for
53 //! example, to avoid division by zero in geometric
54 //! computations. In the documentation, tolerance criterion is
55 //! always referred to as gp::Resolution().
56 static Standard_Real Resolution() { return RealSmall(); }
58 //! Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
59 Standard_EXPORT static const gp_Pnt& Origin();
61 //! Returns a unit vector with the combination (1,0,0)
62 Standard_EXPORT static const gp_Dir& DX();
64 //! Returns a unit vector with the combination (0,1,0)
65 Standard_EXPORT static const gp_Dir& DY();
67 //! Returns a unit vector with the combination (0,0,1)
68 Standard_EXPORT static const gp_Dir& DZ();
70 //! Identifies an axis where its origin is Origin
71 //! and its unit vector coordinates X = 1.0, Y = Z = 0.0
72 Standard_EXPORT static const gp_Ax1& OX();
74 //! Identifies an axis where its origin is Origin
75 //! and its unit vector coordinates Y = 1.0, X = Z = 0.0
76 Standard_EXPORT static const gp_Ax1& OY();
78 //! Identifies an axis where its origin is Origin
79 //! and its unit vector coordinates Z = 1.0, Y = X = 0.0
80 Standard_EXPORT static const gp_Ax1& OZ();
82 //! Identifies a coordinate system where its origin is Origin,
83 //! and its "main Direction" and "X Direction" coordinates
84 //! Z = 1.0, X = Y =0.0 and X direction coordinates X = 1.0, Y = Z = 0.0
85 Standard_EXPORT static const gp_Ax2& XOY();
87 //! Identifies a coordinate system where its origin is Origin,
88 //! and its "main Direction" and "X Direction" coordinates
89 //! Y = 1.0, X = Z =0.0 and X direction coordinates Z = 1.0, X = Y = 0.0
90 Standard_EXPORT static const gp_Ax2& ZOX();
92 //! Identifies a coordinate system where its origin is Origin,
93 //! and its "main Direction" and "X Direction" coordinates
94 //! X = 1.0, Z = Y =0.0 and X direction coordinates Y = 1.0, X = Z = 0.0
96 Standard_EXPORT static const gp_Ax2& YOZ();
98 //! Identifies a Cartesian point with coordinates X = Y = 0.0
99 Standard_EXPORT static const gp_Pnt2d& Origin2d();
101 //! Returns a unit vector with the combinations (1,0)
102 Standard_EXPORT static const gp_Dir2d& DX2d();
104 //! Returns a unit vector with the combinations (0,1)
105 Standard_EXPORT static const gp_Dir2d& DY2d();
107 //! Identifies an axis where its origin is Origin2d
108 //! and its unit vector coordinates are: X = 1.0, Y = 0.0
109 Standard_EXPORT static const gp_Ax2d& OX2d();
111 //! Identifies an axis where its origin is Origin2d
112 //! and its unit vector coordinates are Y = 1.0, X = 0.0
113 Standard_EXPORT static const gp_Ax2d& OY2d();
117 #endif // _gp_HeaderFile