1 // File: RWStepShape_RWFaceBasedSurfaceModel.cxx
2 // Created: Fri Dec 28 16:02:01 2001
3 // Author: Andrey BETENEV
4 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
5 // Copyright: Matra Datavision 2000
7 #include <RWStepShape_RWFaceBasedSurfaceModel.ixx>
8 #include <StepShape_HArray1OfConnectedFaceSet.hxx>
9 #include <StepShape_ConnectedFaceSet.hxx>
11 //=======================================================================
12 //function : RWStepShape_RWFaceBasedSurfaceModel
14 //=======================================================================
16 RWStepShape_RWFaceBasedSurfaceModel::RWStepShape_RWFaceBasedSurfaceModel ()
20 //=======================================================================
23 //=======================================================================
25 void RWStepShape_RWFaceBasedSurfaceModel::ReadStep (const Handle(StepData_StepReaderData)& data,
26 const Standard_Integer num,
27 Handle(Interface_Check)& ach,
28 const Handle(StepShape_FaceBasedSurfaceModel) &ent) const
30 // Check number of parameters
31 if ( ! data->CheckNbParams(num,2,ach,"face_based_surface_model") ) return;
33 // Inherited fields of RepresentationItem
35 Handle(TCollection_HAsciiString) aRepresentationItem_Name;
36 data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
38 // Own fields of FaceBasedSurfaceModel
40 Handle(StepShape_HArray1OfConnectedFaceSet) aFbsmFaces;
41 Standard_Integer sub2 = 0;
42 if ( data->ReadSubList (num, 2, "fbsm_faces", ach, sub2) ) {
43 Standard_Integer num2 = sub2;
44 Standard_Integer nb0 = data->NbParams(num2);
45 aFbsmFaces = new StepShape_HArray1OfConnectedFaceSet (1, nb0);
46 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
47 Handle(StepShape_ConnectedFaceSet) anIt0;
48 data->ReadEntity (num2, i0, "fbsm_faces", ach, STANDARD_TYPE(StepShape_ConnectedFaceSet), anIt0);
49 aFbsmFaces->SetValue(i0, anIt0);
54 ent->Init(aRepresentationItem_Name,
58 //=======================================================================
59 //function : WriteStep
61 //=======================================================================
63 void RWStepShape_RWFaceBasedSurfaceModel::WriteStep (StepData_StepWriter& SW,
64 const Handle(StepShape_FaceBasedSurfaceModel) &ent) const
67 // Inherited fields of RepresentationItem
69 SW.Send (ent->StepRepr_RepresentationItem::Name());
71 // Own fields of FaceBasedSurfaceModel
74 for (Standard_Integer i1=1; i1 <= ent->FbsmFaces()->Length(); i1++ ) {
75 Handle(StepShape_ConnectedFaceSet) Var0 = ent->FbsmFaces()->Value(i1);
81 //=======================================================================
84 //=======================================================================
86 void RWStepShape_RWFaceBasedSurfaceModel::Share (const Handle(StepShape_FaceBasedSurfaceModel) &ent,
87 Interface_EntityIterator& iter) const
90 // Inherited fields of RepresentationItem
92 // Own fields of FaceBasedSurfaceModel
94 for (Standard_Integer i1=1; i1 <= ent->FbsmFaces()->Length(); i1++ ) {
95 Handle(StepShape_ConnectedFaceSet) Var0 = ent->FbsmFaces()->Value(i1);