-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathSketcher_Object.cxx
235 lines (210 loc) · 5.68 KB
/
Sketcher_Object.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
/**
* \file Sketcher_Object.cxx
* \brief Implementation file for the class Sketcher_Object
* \author <a href="mailto:[email protected]?subject=Sketcher_Object.cxx">Sergei Maslov</a>
*/
#include "Sketcher_Object.hxx"
IMPLEMENT_STANDARD_RTTIEXT(Sketcher_Object, Standard_Transient)
/**
* \fn Sketcher_Object(const Handle(Geom2d_Geometry)& theGeom2d_Geometry,const Handle(AIS_InteractiveObject)& theAIS_InteractiveObject, const TCollection_ExtendedString& theName, const Sketcher_ObjectGeometryType theGeometryType, const Sketcher_ObjectTypeOfMethod theTypeOfMethod)
* \brief Constructs a Sketcher_Object
* \param theGeom2d_Geometry const Handle(Geom2d_Geometry)&
* \param theAIS_InteractiveObject const TCollection_ExtendedString&
* \param theName const TCollection_ExtendedString&
* \param theGeometryType const Sketcher_ObjectGeometryType
* \param theTypeOfMethod const Sketcher_ObjectTypeOfMethod
*/
Sketcher_Object::Sketcher_Object(const Handle(Geom2d_Geometry)& theGeom2d_Geometry,
const Handle(AIS_InteractiveObject)& theAIS_InteractiveObject,
const TCollection_ExtendedString& theName,
const Sketcher_ObjectGeometryType theGeometryType,
const Sketcher_ObjectTypeOfMethod theTypeOfMethod)
{
myGeometry = theGeom2d_Geometry;
myAIS_InteractiveObject = theAIS_InteractiveObject;
myName = theName;
myGeometryType = theGeometryType;
myTypeOfMethod = theTypeOfMethod;
myNameOfColor = Quantity_NOC_YELLOW;
myObjectType = MainSketcherType;
myLineStyle = Aspect_TOL_SOLID;
myWidth = 1.0;
}
/**
* \fn ~Sketcher_Object()
* \brief destructor
*/
Sketcher_Object::~Sketcher_Object()
{
}
/**
* \fn SetGeometry(const Handle(Geom2d_Geometry)& theGeom2d_Geometry)
* \brief set Geom2d_Geometry
* \return void
* \param theGeom2d_Geometry const Handle(Geom2d_Geometry)&
*/
void Sketcher_Object::SetGeometry(const Handle(Geom2d_Geometry)& theGeom2d_Geometry)
{
myGeometry = theGeom2d_Geometry;
}
/**
* \fn GetGeometry()
* \brief get Geom2d_Geometry
* \return Handle(Geom2d_Geometry)
*/
Handle(Geom2d_Geometry) Sketcher_Object::GetGeometry()
{
return myGeometry;
}
/**
* \fn SetAIS_Object(const Handle(AIS_InteractiveObject)& theAIS_InteractiveObject)
* \brief set object representation
* \return void
* \param theAIS_InteractiveObject const Handle(AIS_InteractiveObject)&
*/
void Sketcher_Object::SetAIS_Object(const Handle(AIS_InteractiveObject)& theAIS_InteractiveObject)
{
myAIS_InteractiveObject = theAIS_InteractiveObject;
}
/**
* \fn GetAIS_Object()
* \brief get object represent
* \return Handle(AIS_InteractiveObject)
*/
Handle(AIS_InteractiveObject) Sketcher_Object::GetAIS_Object()
{
return myAIS_InteractiveObject;
}
/**
* \fn SetObjectName(const Handle(TCollection_ExtendedString)& theName)
* \brief set object name
* \return void
* \param theName const Handle(TCollection_ExtendedString)&
*/
void Sketcher_Object::SetObjectName(const TCollection_ExtendedString& theName)
{
myName = theName;
}
/**
* \fn GetObjectName()
* \brief get object name
* \return TCollection_ExtendedString
*/
TCollection_ExtendedString Sketcher_Object::GetObjectName()
{
return myName;
}
/**
* \fn SetGeometryType(const Sketcher_ObjectGeometryTypeHandle(TCollection_ExtendedString)& theGeometryType)
* \brief set type of geometry
* \return void
* \param theGeometryType const Sketcher_ObjectGeometryType
*/
void Sketcher_Object::SetGeometryType(const Sketcher_ObjectGeometryType theGeometryType)
{
myGeometryType = theGeometryType;
}
/**
* \fn GetGeometryType()
* \brief get type of geometry
* \return Sketcher_ObjectGeometryType
*/
Sketcher_ObjectGeometryType Sketcher_Object::GetGeometryType()
{
return myGeometryType;
}
/**
* \fn SetTypeOfMethod(const Sketcher_ObjectTypeOfMethod theTypeOfMethod)
* \brief set object entering method
* \return void
* \param theGeometryType const Sketcher_ObjectTypeOfMethod
*/
void Sketcher_Object::SetTypeOfMethod(const Sketcher_ObjectTypeOfMethod theTypeOfMethod)
{
myTypeOfMethod = theTypeOfMethod;
}
/**
* \fn GetTypeOfMethod()
* \brief get object entering method
* \return Sketcher_ObjectTypeOfMethod
*/
Sketcher_ObjectTypeOfMethod Sketcher_Object::GetTypeOfMethod()
{
return myTypeOfMethod;
}
/**
* \fn SetColor(const Quantity_NameOfColor theColor)
* \brief set color
* \return void
* \param theColor const Quantity_NameOfColor
*/
void Sketcher_Object::SetColor(const Quantity_NameOfColor theColor)
{
myNameOfColor = theColor;
}
/**
* \fn GetColor()
* \brief get color
* \return Quantity_NameOfColor
*/
Quantity_NameOfColor Sketcher_Object::GetColor()
{
return myNameOfColor;
}
/**
* \fn SetType(const Sketcher_ObjectType theType)
* \brief set type of object
* \return void
* \param theType const Sketcher_ObjectType
*/
void Sketcher_Object::SetType(const Sketcher_ObjectType theType)
{
myObjectType = theType;
}
/**
* \fn GetType()
* \brief get object type
* \return Sketcher_ObjectType
*/
Sketcher_ObjectType Sketcher_Object::GetType()
{
return myObjectType;
}
/**
* \fn SetStyle(const Aspect_TypeOfLine theLineStyle)
* \brief set line style
* \return void
* \param theLineStyle const Aspect_TypeOfLine
*/
void Sketcher_Object::SetStyle(const Aspect_TypeOfLine theLineStyle)
{
myLineStyle = theLineStyle;
}
/**
* \fn GetStyle()
* \brief get line style
* \return Aspect_TypeOfLine
*/
Aspect_TypeOfLine Sketcher_Object::GetStyle()
{
return myLineStyle;
}
/**
* \fn SetWidth(const Standard_Real theWidth)
* \brief set line width
* \return void
* \param theWidth const Standard_Real
*/
void Sketcher_Object::SetWidth(const Standard_Real theWidth)
{
myWidth = theWidth;
}
/**
* \fn GetWidth()
* \brief get width
* \return Standard_Real
*/
Standard_Real Sketcher_Object::GetWidth()
{
return myWidth;
}