1 // File: StepElement_ElementAspect.cxx
2 // Created: Tue Dec 10 18:12:58 2002
3 // Author: data exchange team
4 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
5 // Copyright: Open CASCADE 2002
7 #include <StepElement_ElementAspect.ixx>
8 #include <StepElement_ElementAspectMember.hxx>
9 #include <TCollection_HAsciiString.hxx>
11 //=======================================================================
12 //function : StepElement_ElementAspect
14 //=======================================================================
16 StepElement_ElementAspect::StepElement_ElementAspect ()
20 //=======================================================================
23 //=======================================================================
25 Standard_Integer StepElement_ElementAspect::CaseNum (const Handle(Standard_Transient)& ent) const
30 //=======================================================================
33 //=======================================================================
35 Standard_Integer StepElement_ElementAspect::CaseMem (const Handle(StepData_SelectMember)& ent) const
37 if(ent.IsNull()) return 0;
38 if(ent->Matches("ELEMENT_VOLUME")) return 1;
39 else if(ent->Matches("VOLUME_3D_FACE")) return 2;
40 else if(ent->Matches("VOLUME_2D_FACE")) return 3;
41 else if(ent->Matches("VOLUME_3D_EDGE")) return 4;
42 else if(ent->Matches("VOLUME_2D_EDGE")) return 5;
43 else if(ent->Matches("SURFACE_3D_FACE")) return 6;
44 else if(ent->Matches("SURFACE_2D_FACE")) return 7;
45 else if(ent->Matches("SURFACE_3D_EDGE")) return 8;
46 else if(ent->Matches("SURFACE_2D_EDGE")) return 9;
47 else if(ent->Matches("CURVE_EDGE")) return 10;
51 //=======================================================================
52 //function : NewMember
54 //=======================================================================
56 Handle(StepData_SelectMember) StepElement_ElementAspect::NewMember() const
58 return new StepElement_ElementAspectMember;
61 //=======================================================================
62 //function : SetElementVolume
64 //=======================================================================
66 void StepElement_ElementAspect::SetElementVolume (const StepElement_ElementVolume val)
68 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
69 if(SelMem.IsNull()) return;
70 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("ELEMENT_VOLUME");
71 SelMem->SetName(name->ToCString());
72 SelMem->SetEnum((Standard_Integer)val);
75 //=======================================================================
76 //function : ElementVolume
78 //=======================================================================
80 StepElement_ElementVolume StepElement_ElementAspect::ElementVolume () const
82 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
83 if(SelMem.IsNull()) return StepElement_Volume;
84 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
85 name->AssignCat(SelMem->Name());
86 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("ELEMENT_VOLUME");
87 if(name->IsDifferent(nameitem)) return StepElement_Volume;
88 Standard_Integer numit = SelMem->Enum();
89 StepElement_ElementVolume val;
91 case 1 : val = StepElement_Volume; break;
92 default : return StepElement_Volume;break;
97 //=======================================================================
98 //function : SetVolume3dFace
100 //=======================================================================
102 void StepElement_ElementAspect::SetVolume3dFace (const Standard_Integer val)
104 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
105 if(SelMem.IsNull()) return;
106 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_3D_FACE");
107 SelMem->SetName(name->ToCString());
108 SelMem->SetInteger(val);
111 //=======================================================================
112 //function : Volume3dFace
114 //=======================================================================
116 Standard_Integer StepElement_ElementAspect::Volume3dFace () const
118 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
119 if(SelMem.IsNull()) return 0;
120 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
121 name->AssignCat(SelMem->Name());
122 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_3D_FACE");
123 if(name->IsDifferent(nameitem)) return 0;
124 Standard_Integer val = SelMem->Integer();
128 //=======================================================================
129 //function : SetVolume2dFace
131 //=======================================================================
133 void StepElement_ElementAspect::SetVolume2dFace (const Standard_Integer val)
135 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
136 if(SelMem.IsNull()) return;
137 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_2D_FACE");
138 SelMem->SetName(name->ToCString());
139 SelMem->SetInteger(val);
142 //=======================================================================
143 //function : Volume2dFace
145 //=======================================================================
147 Standard_Integer StepElement_ElementAspect::Volume2dFace () const
149 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
150 if(SelMem.IsNull()) return 0;
151 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
152 name->AssignCat(SelMem->Name());
153 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_2D_FACE");
154 if(name->IsDifferent(nameitem)) return 0;
155 Standard_Integer val = SelMem->Integer();
159 //=======================================================================
160 //function : SetVolume3dEdge
162 //=======================================================================
164 void StepElement_ElementAspect::SetVolume3dEdge (const Standard_Integer val)
166 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
167 if(SelMem.IsNull()) return;
168 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_3D_EDGE");
169 SelMem->SetName(name->ToCString());
170 SelMem->SetInteger(val);
173 //=======================================================================
174 //function : Volume3dEdge
176 //=======================================================================
178 Standard_Integer StepElement_ElementAspect::Volume3dEdge () const
180 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
181 if(SelMem.IsNull()) return 0;
182 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
183 name->AssignCat(SelMem->Name());
184 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_3D_EDGE");
185 if(name->IsDifferent(nameitem)) return 0;
186 Standard_Integer val = SelMem->Integer();
190 //=======================================================================
191 //function : SetVolume2dEdge
193 //=======================================================================
195 void StepElement_ElementAspect::SetVolume2dEdge (const Standard_Integer val)
197 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
198 if(SelMem.IsNull()) return;
199 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("VOLUME_2D_EDGE");
200 SelMem->SetName(name->ToCString());
201 SelMem->SetInteger(val);
204 //=======================================================================
205 //function : Volume2dEdge
207 //=======================================================================
209 Standard_Integer StepElement_ElementAspect::Volume2dEdge () const
211 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
212 if(SelMem.IsNull()) return 0;
213 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
214 name->AssignCat(SelMem->Name());
215 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("VOLUME_2D_EDGE");
216 if(name->IsDifferent(nameitem)) return 0;
217 Standard_Integer val = SelMem->Integer();
221 //=======================================================================
222 //function : SetSurface3dFace
224 //=======================================================================
226 void StepElement_ElementAspect::SetSurface3dFace (const Standard_Integer val)
228 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
229 if(SelMem.IsNull()) return;
230 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_3D_FACE");
231 SelMem->SetName(name->ToCString());
232 SelMem->SetInteger(val);
235 //=======================================================================
236 //function : Surface3dFace
238 //=======================================================================
240 Standard_Integer StepElement_ElementAspect::Surface3dFace () const
242 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
243 if(SelMem.IsNull()) return 0;
244 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
245 name->AssignCat(SelMem->Name());
246 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_3D_FACE");
247 if(name->IsDifferent(nameitem)) return 0;
248 Standard_Integer val = SelMem->Integer();
252 //=======================================================================
253 //function : SetSurface2dFace
255 //=======================================================================
257 void StepElement_ElementAspect::SetSurface2dFace (const Standard_Integer val)
259 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
260 if(SelMem.IsNull()) return;
261 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_2D_FACE");
262 SelMem->SetName(name->ToCString());
263 SelMem->SetInteger(val);
266 //=======================================================================
267 //function : Surface2dFace
269 //=======================================================================
271 Standard_Integer StepElement_ElementAspect::Surface2dFace () const
273 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
274 if(SelMem.IsNull()) return 0;
275 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
276 name->AssignCat(SelMem->Name());
277 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_2D_FACE");
278 if(name->IsDifferent(nameitem)) return 0;
279 Standard_Integer val = SelMem->Integer();
283 //=======================================================================
284 //function : SetSurface3dEdge
286 //=======================================================================
288 void StepElement_ElementAspect::SetSurface3dEdge (const Standard_Integer val)
290 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
291 if(SelMem.IsNull()) return;
292 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_3D_EDGE");
293 SelMem->SetName(name->ToCString());
294 SelMem->SetInteger(val);
297 //=======================================================================
298 //function : Surface3dEdge
300 //=======================================================================
302 Standard_Integer StepElement_ElementAspect::Surface3dEdge () const
304 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
305 if(SelMem.IsNull()) return 0;
306 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
307 name->AssignCat(SelMem->Name());
308 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_3D_EDGE");
309 if(name->IsDifferent(nameitem)) return 0;
310 Standard_Integer val = SelMem->Integer();
314 //=======================================================================
315 //function : SetSurface2dEdge
317 //=======================================================================
319 void StepElement_ElementAspect::SetSurface2dEdge (const Standard_Integer val)
321 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
322 if(SelMem.IsNull()) return;
323 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("SURFACE_2D_EDGE");
324 SelMem->SetName(name->ToCString());
325 SelMem->SetInteger(val);
328 //=======================================================================
329 //function : Surface2dEdge
331 //=======================================================================
333 Standard_Integer StepElement_ElementAspect::Surface2dEdge () const
335 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
336 if(SelMem.IsNull()) return 0;
337 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
338 name->AssignCat(SelMem->Name());
339 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("SURFACE_2D_EDGE");
340 if(name->IsDifferent(nameitem)) return 0;
341 Standard_Integer val = SelMem->Integer();
345 //=======================================================================
346 //function : SetCurveEdge
348 //=======================================================================
350 void StepElement_ElementAspect::SetCurveEdge (const StepElement_CurveEdge val)
352 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
353 if(SelMem.IsNull()) return;
354 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString("CURVE_EDGE");
355 SelMem->SetName(name->ToCString());
356 SelMem->SetEnum((Standard_Integer)val);
359 //=======================================================================
360 //function : CurveEdge
362 //=======================================================================
364 StepElement_CurveEdge StepElement_ElementAspect::CurveEdge () const
366 Handle(StepElement_ElementAspectMember) SelMem = Handle(StepElement_ElementAspectMember)::DownCast(Value());
367 if(SelMem.IsNull()) return StepElement_ElementEdge;
368 Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString;
369 name->AssignCat(SelMem->Name());
370 Handle(TCollection_HAsciiString) nameitem = new TCollection_HAsciiString("CURVE_EDGE");
371 if(name->IsDifferent(nameitem)) return StepElement_ElementEdge;
372 Standard_Integer numit = SelMem->Enum();
373 StepElement_CurveEdge val;
375 case 1 : val = StepElement_ElementEdge; break;
376 default : return StepElement_ElementEdge;break;