42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen ( Kiran ) |
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 _IGESGeom_Plane_HeaderFile |
18 | #define _IGESGeom_Plane_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
42cf5bc1 |
23 | #include <gp_XYZ.hxx> |
24 | #include <IGESData_IGESEntity.hxx> |
25 | #include <Standard_Integer.hxx> |
42cf5bc1 |
26 | class gp_Pnt; |
27 | |
28 | |
29 | class IGESGeom_Plane; |
30 | DEFINE_STANDARD_HANDLE(IGESGeom_Plane, IGESData_IGESEntity) |
31 | |
32 | //! defines IGESPlane, Type <108> Form <-1,0,1> |
33 | //! in package IGESGeom |
34 | //! A plane entity can be used to represent unbounded plane, |
35 | //! as well as bounded portion of a plane. In either of the |
36 | //! above cases the plane is defined within definition space |
37 | //! by means of coefficients A, B, C, D where at least one of |
38 | //! A, B, C is non-zero and A * XT + B * YT + C * ZT = D |
39 | class IGESGeom_Plane : public IGESData_IGESEntity |
40 | { |
41 | |
42 | public: |
43 | |
44 | |
45 | Standard_EXPORT IGESGeom_Plane(); |
46 | |
47 | Standard_EXPORT void Init (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D, const Handle(IGESData_IGESEntity)& aCurve, const gp_XYZ& attach, const Standard_Real aSize); |
48 | |
49 | //! Changes FormNumber (indicates the Type of Bound : |
50 | //! 0 no Bound, 1 (External) Bound, -1 Hole) |
51 | //! Remark that Init keeps this Value and must be consistent : |
52 | //! aCurve Null if FormNumber = 0, Non-Null else |
53 | //! Error if not in ranges [0-1] or [10-12] |
54 | Standard_EXPORT void SetFormNumber (const Standard_Integer form); |
55 | |
56 | Standard_EXPORT void Equation (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const; |
57 | |
58 | Standard_EXPORT void TransformedEquation (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const; |
59 | |
60 | //! returns True if there exists a bounding curve |
61 | Standard_EXPORT Standard_Boolean HasBoundingCurve() const; |
62 | |
63 | //! returns True if bounding curve exists and bounded portion is negative |
64 | Standard_EXPORT Standard_Boolean HasBoundingCurveHole() const; |
65 | |
66 | //! returns Optional Bounding Curve, can be positive (normal clipping) |
67 | //! or negative (hole) according to Form Number |
68 | Standard_EXPORT Handle(IGESData_IGESEntity) BoundingCurve() const; |
69 | |
70 | //! returns True if SymbolSize() > 0, False if SymbolSize() = 0 |
71 | Standard_EXPORT Standard_Boolean HasSymbolAttach() const; |
72 | |
73 | //! returns (X, Y, Z) if symbol exists else returns (0, 0, 0) |
74 | Standard_EXPORT gp_Pnt SymbolAttach() const; |
75 | |
76 | //! returns (X, Y, Z) if symbol exists after applying Transf. Matrix |
77 | //! else returns (0, 0, 0) |
78 | Standard_EXPORT gp_Pnt TransformedSymbolAttach() const; |
79 | |
80 | //! Size of optional display symbol |
81 | Standard_EXPORT Standard_Real SymbolSize() const; |
82 | |
83 | |
84 | |
85 | |
92efcf78 |
86 | DEFINE_STANDARD_RTTIEXT(IGESGeom_Plane,IGESData_IGESEntity) |
42cf5bc1 |
87 | |
88 | protected: |
89 | |
90 | |
91 | |
92 | |
93 | private: |
94 | |
95 | |
96 | Standard_Real theA; |
97 | Standard_Real theB; |
98 | Standard_Real theC; |
99 | Standard_Real theD; |
100 | Handle(IGESData_IGESEntity) theCurve; |
101 | gp_XYZ theAttach; |
102 | Standard_Real theSize; |
103 | |
104 | |
105 | }; |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | |
112 | |
113 | #endif // _IGESGeom_Plane_HeaderFile |