9ebaae37 |
1 | // Created on: 2015-08-06 |
2 | // Created by: Ilya Novikov |
3 | // Copyright (c) 2004-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | |
17 | #ifndef _XCAFDimTolObjects_GeomToleranceObject_HeaderFile |
18 | #define _XCAFDimTolObjects_GeomToleranceObject_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <XCAFDimTolObjects_GeomToleranceObjectSequence.hxx> |
24 | #include <XCAFDimTolObjects_GeomToleranceType.hxx> |
25 | #include <XCAFDimTolObjects_GeomToleranceTypeValue.hxx> |
26 | #include <Standard_Real.hxx> |
27 | #include <XCAFDimTolObjects_GeomToleranceMatReqModif.hxx> |
28 | #include <XCAFDimTolObjects_GeomToleranceZoneModif.hxx> |
29 | #include <XCAFDimTolObjects_GeomToleranceModifiersSequence.hxx> |
30 | #include <Standard_Transient.hxx> |
31 | #include <XCAFDimTolObjects_GeomToleranceModif.hxx> |
1c9d3225 |
32 | #include <gp_Ax2.hxx> |
5df609e7 |
33 | #include <TopoDS_Shape.hxx> |
34 | #include <TCollection_HAsciiString.hxx> |
9ebaae37 |
35 | |
36 | class XCAFDimTolObjects_GeomToleranceObject; |
37 | DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_GeomToleranceObject, Standard_Transient) |
38 | |
39 | //! attribute to store dimension and tolerance |
40 | class XCAFDimTolObjects_GeomToleranceObject : public Standard_Transient |
41 | { |
42 | |
43 | public: |
44 | |
45 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceObject(); |
46 | |
47 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj); |
48 | |
49 | Standard_EXPORT void SetType (const XCAFDimTolObjects_GeomToleranceType theType); |
50 | |
51 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceType GetType() const; |
52 | |
53 | Standard_EXPORT void SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue); |
54 | |
55 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceTypeValue GetTypeOfValue() const; |
56 | |
57 | Standard_EXPORT void SetValue (const Standard_Real theValue); |
58 | |
59 | Standard_EXPORT Standard_Real GetValue() const; |
60 | |
61 | Standard_EXPORT void SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif); |
62 | |
63 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceMatReqModif GetMaterialRequirementModifier() const; |
64 | |
65 | Standard_EXPORT void SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif); |
66 | |
67 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceZoneModif GetZoneModifier() const; |
68 | |
69 | Standard_EXPORT void SetValueOfZoneModifier (const Standard_Real theValue); |
70 | |
71 | Standard_EXPORT Standard_Real GetValueOfZoneModifier() const; |
72 | |
73 | Standard_EXPORT void SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers); |
74 | |
75 | Standard_EXPORT void AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier); |
76 | |
77 | Standard_EXPORT XCAFDimTolObjects_GeomToleranceModifiersSequence GetModifiers() const; |
78 | |
79 | Standard_EXPORT void SetMaxValueModifier (const Standard_Real theModifier); |
80 | |
81 | Standard_EXPORT Standard_Real GetMaxValueModifier() const; |
82 | |
1c9d3225 |
83 | Standard_EXPORT void SetAxis (const gp_Ax2 theAxis); |
84 | |
85 | Standard_EXPORT gp_Ax2 GetAxis() const; |
86 | |
87 | Standard_EXPORT Standard_Boolean HasAxis () const; |
88 | |
5df609e7 |
89 | void SetPlane (const gp_Ax2& thePlane) |
90 | { |
91 | myPlane = thePlane; |
92 | myHasPlane = Standard_True; |
93 | } |
94 | |
95 | const gp_Ax2& GetPlane() const { return myPlane; } |
96 | |
97 | void SetPoint (const gp_Pnt& thePnt) |
98 | { |
99 | myPnt = thePnt; |
100 | myHasPnt = Standard_True; |
101 | } |
102 | |
103 | const gp_Pnt& GetPoint() const { return myPnt; } |
104 | |
105 | void SetPointTextAttach (const gp_Pnt& thePntText) |
106 | { |
107 | myPntText = thePntText; |
108 | myHasPntText = Standard_True; |
109 | } |
110 | |
111 | const gp_Pnt& GetPointTextAttach() const |
112 | { |
113 | return myPntText; |
114 | } |
115 | Standard_Boolean HasPlane() const { return myHasPlane; } |
116 | |
117 | Standard_Boolean HasPoint() const { return myHasPnt; } |
118 | |
119 | Standard_Boolean HasPointText() const |
120 | { |
121 | return myHasPntText; |
122 | } |
123 | |
124 | |
125 | //! Set graphical presentation for object |
126 | Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation, |
127 | const Handle(TCollection_HAsciiString)& thePresentationName) |
128 | { |
129 | myPresentation = thePresentation; |
130 | myPresentationName = thePresentationName; |
131 | } |
132 | |
133 | //! Returns graphical presentation of the object |
134 | Standard_EXPORT TopoDS_Shape GetPresentation() const |
135 | { |
136 | return myPresentation; |
137 | } |
138 | |
139 | //! Returns graphical presentation of the object |
140 | Standard_EXPORT Handle(TCollection_HAsciiString) GetPresentationName() const |
141 | { |
142 | return myPresentationName; |
143 | } |
144 | |
92efcf78 |
145 | DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient) |
9ebaae37 |
146 | |
147 | private: |
148 | |
149 | XCAFDimTolObjects_GeomToleranceType myType; |
150 | XCAFDimTolObjects_GeomToleranceTypeValue myTypeOfValue; |
151 | Standard_Real myValue; |
152 | XCAFDimTolObjects_GeomToleranceMatReqModif myMatReqModif; |
153 | XCAFDimTolObjects_GeomToleranceZoneModif myZoneModif; |
154 | Standard_Real myValueOfZoneModif; |
155 | XCAFDimTolObjects_GeomToleranceModifiersSequence myModifiers; |
156 | Standard_Real myMaxValueModif; |
1c9d3225 |
157 | gp_Ax2 myAxis; |
158 | Standard_Boolean myHasAxis; |
5df609e7 |
159 | gp_Ax2 myPlane; |
160 | gp_Pnt myPnt; |
161 | gp_Pnt myPntText;; |
162 | Standard_Boolean myHasPlane; |
163 | Standard_Boolean myHasPnt; |
164 | Standard_Boolean myHasPntText; |
165 | TopoDS_Shape myPresentation; |
166 | Handle(TCollection_HAsciiString) myPresentationName; |
167 | |
9ebaae37 |
168 | }; |
169 | |
170 | |
171 | |
172 | |
173 | |
174 | |
175 | |
176 | #endif // _XCAFDimTolObjects_GeomToleranceObject_HeaderFile |