1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry

Support of reading and writing tessellated geometry is added for the following STEP entities:
- triangulated face
- complex triangulated face
- tessellated shell
- tessellated solid
- tessellated shape representation

Models without BRep geometry (mesh formats like STL, OBJ and so on) are supported for writing to STEP.

New parameters are added to enable/disable tessellated geometry reading and writing:
- read.step.tessellated (On/Off/OnNoBRep) (On by default)
- write.step.tessellated (On/Off/OnNoBRep) (OnNoBRep by default)

OnNoBRep - tessellation is read/written only for entities for which there is no BRep representation.

Faces with poly triangulation are written in STEP as triangulated face entities with one coordinates list per face.
Only one poly triangulation per face (returned by BRep_Tool::Triangulation) is written to STEP.
This commit is contained in:
snn
2022-04-04 18:08:34 +03:00
committed by afokin
parent e9c43fee29
commit cec41bb93d
128 changed files with 9920 additions and 403 deletions

View File

@@ -160,5 +160,33 @@ RWStepVisual_RWCoordinatesList.hxx
RWStepVisual_RWCoordinatesList.cxx
RWStepVisual_RWTessellatedCurveSet.hxx
RWStepVisual_RWTessellatedCurveSet.cxx
RWStepVisual_RWComplexTriangulatedFace.cxx
RWStepVisual_RWComplexTriangulatedFace.hxx
RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx
RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx
RWStepVisual_RWCubicBezierTessellatedEdge.cxx
RWStepVisual_RWCubicBezierTessellatedEdge.hxx
RWStepVisual_RWCubicBezierTriangulatedFace.cxx
RWStepVisual_RWCubicBezierTriangulatedFace.hxx
RWStepVisual_RWTessellatedConnectingEdge.cxx
RWStepVisual_RWTessellatedConnectingEdge.hxx
RWStepVisual_RWTessellatedEdge.cxx
RWStepVisual_RWTessellatedEdge.hxx
RWStepVisual_RWTessellatedPointSet.cxx
RWStepVisual_RWTessellatedPointSet.hxx
RWStepVisual_RWTessellatedShapeRepresentation.cxx
RWStepVisual_RWTessellatedShapeRepresentation.hxx
RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx
RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx
RWStepVisual_RWTessellatedShell.cxx
RWStepVisual_RWTessellatedShell.hxx
RWStepVisual_RWTessellatedSolid.cxx
RWStepVisual_RWTessellatedSolid.hxx
RWStepVisual_RWTessellatedStructuredItem.cxx
RWStepVisual_RWTessellatedStructuredItem.hxx
RWStepVisual_RWTessellatedVertex.cxx
RWStepVisual_RWTessellatedVertex.hxx
RWStepVisual_RWTessellatedWire.cxx
RWStepVisual_RWTessellatedWire.hxx
RWStepVisual_RWTriangulatedFace.cxx
RWStepVisual_RWTriangulatedFace.hxx

View File

@@ -0,0 +1,271 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWComplexTriangulatedFace.hxx>
#include <StepVisual_ComplexTriangulatedFace.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Real.hxx>
#include <StepVisual_FaceOrSurface.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray2OfInteger.hxx>
//=======================================================================
//function : RWStepVisual_RWComplexTriangulatedFace
//purpose :
//=======================================================================
RWStepVisual_RWComplexTriangulatedFace::RWStepVisual_RWComplexTriangulatedFace() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 8, theCheck, "complex_triangulated_face"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedFace
Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
Standard_Integer aTessellatedFace_Pnmax;
theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1));
aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj4 = 0;
if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) {
Standard_Integer num4 = subj4;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Real anIt0;
theData->ReadReal(num4, j0, "real", theCheck, anIt0);
aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
}
}
}
}
StepVisual_FaceOrSurface aTessellatedFace_GeometricLink;
Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 5))
{
theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink);
}
else
{
hasTessellatedFace_GeometricLink = Standard_False;
aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface();
}
// Own fields of ComplexTriangulatedFace
Handle(TColStd_HArray1OfInteger) aPnindex;
Standard_Integer sub6 = 0;
if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6))
{
Standard_Integer nb0 = theData->NbParams(sub6);
aPnindex = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub6;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aPnindex->SetValue(i0, anIt0);
}
}
Handle(TColStd_HArray2OfInteger) aTriangleStrips;
Standard_Integer sub7 = 0;
if (theData->ReadSubList(theNum, 7, "triangle_strips", theCheck, sub7))
{
Standard_Integer nb0 = theData->NbParams(sub7);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1));
aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj7 = 0;
if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_strips)", theCheck, subj7) ) {
Standard_Integer num4 = subj7;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aTriangleStrips->SetValue(i0,j0, anIt0);
}
}
}
}
Handle(TColStd_HArray2OfInteger) aTriangleFans;
Standard_Integer sub8 = 0;
if (theData->ReadSubList(theNum, 8, "triangle_fans", theCheck, sub8))
{
Standard_Integer nb0 = theData->NbParams(sub8);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8,1));
aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj8 = 0;
if ( theData->ReadSubList (sub8, i0, "sub-part(triangle_fans)", theCheck, subj8) ) {
Standard_Integer num4 = subj8;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aTriangleFans->SetValue(i0,j0, anIt0);
}
}
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangleStrips, aTriangleFans);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedFace
theSW.Send(theEnt->Coordinates());
theSW.Send(theEnt->Pnmax());
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++)
{
Standard_Real Var0 = theEnt->Normals()->Value(i3,j3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
// Own fields of ComplexTriangulatedFace
theSW.OpenSub();
for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++)
{
Standard_Integer Var0 = theEnt->Pnindex()->Value(i5);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleStrips()->RowLength(); i6++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleStrips()->ColLength(); j6++)
{
Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i6,j6);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i7 = 1; i7 <= theEnt->TriangleFans()->RowLength(); i7++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j7 = 1; j7 <= theEnt->TriangleFans()->ColLength(); j7++)
{
Standard_Integer Var0 = theEnt->TriangleFans()->Value(i7,j7);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedFace::Share (const Handle(StepVisual_ComplexTriangulatedFace)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedFace
theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates());
if (theEnt->StepVisual_TessellatedFace::HasGeometricLink())
{
theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value());
}
// Own fields of ComplexTriangulatedFace
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_
#define _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_ComplexTriangulatedFace;
//! Read & Write tool for ComplexTriangulatedFace
class RWStepVisual_RWComplexTriangulatedFace
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWComplexTriangulatedFace();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedFace)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_

View File

@@ -0,0 +1,247 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx>
#include <StepVisual_ComplexTriangulatedSurfaceSet.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Real.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray2OfInteger.hxx>
//=======================================================================
//function : RWStepVisual_RWComplexTriangulatedSurfaceSet
//purpose :
//=======================================================================
RWStepVisual_RWComplexTriangulatedSurfaceSet::RWStepVisual_RWComplexTriangulatedSurfaceSet() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 7, theCheck, "complex_triangulated_surface_set"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedSurfaceSet
Handle(StepVisual_CoordinatesList) aTessellatedSurfaceSet_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_surface_set.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedSurfaceSet_Coordinates);
Standard_Integer aTessellatedSurfaceSet_Pnmax;
theData->ReadInteger(theNum, 3, "tessellated_surface_set.pnmax", theCheck, aTessellatedSurfaceSet_Pnmax);
Handle(TColStd_HArray2OfReal) aTessellatedSurfaceSet_Normals;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_surface_set.normals", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1));
aTessellatedSurfaceSet_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj4 = 0;
if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_surface_set.normals)", theCheck, subj4) ) {
Standard_Integer num4 = subj4;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Real anIt0;
theData->ReadReal(num4, j0, "real", theCheck, anIt0);
aTessellatedSurfaceSet_Normals->SetValue(i0,j0, anIt0);
}
}
}
}
// Own fields of ComplexTriangulatedSurfaceSet
Handle(TColStd_HArray1OfInteger) aPnindex;
Standard_Integer sub5 = 0;
if (theData->ReadSubList(theNum, 5, "pnindex", theCheck, sub5))
{
Standard_Integer nb0 = theData->NbParams(sub5);
aPnindex = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub5;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aPnindex->SetValue(i0, anIt0);
}
}
Handle(TColStd_HArray2OfInteger) aTriangleStrips;
Standard_Integer sub6 = 0;
if (theData->ReadSubList(theNum, 6, "triangle_strips", theCheck, sub6))
{
Standard_Integer nb0 = theData->NbParams(sub6);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1));
aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj6 = 0;
if ( theData->ReadSubList (sub6, i0, "sub-part(triangle_strips)", theCheck, subj6) ) {
Standard_Integer num4 = subj6;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aTriangleStrips->SetValue(i0,j0, anIt0);
}
}
}
}
Handle(TColStd_HArray2OfInteger) aTriangleFans;
Standard_Integer sub7 = 0;
if (theData->ReadSubList(theNum, 7, "triangle_fans", theCheck, sub7))
{
Standard_Integer nb0 = theData->NbParams(sub7);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1));
aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj7 = 0;
if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_fans)", theCheck, subj7) ) {
Standard_Integer num4 = subj7;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aTriangleFans->SetValue(i0,j0, anIt0);
}
}
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedSurfaceSet_Coordinates, aTessellatedSurfaceSet_Pnmax, aTessellatedSurfaceSet_Normals, aPnindex, aTriangleStrips, aTriangleFans);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedSurfaceSet
theSW.Send(theEnt->Coordinates());
theSW.Send(theEnt->Pnmax());
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++)
{
Standard_Real Var0 = theEnt->Normals()->Value(i3,j3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
// Own fields of ComplexTriangulatedSurfaceSet
theSW.OpenSub();
for (Standard_Integer i4 = 1; i4 <= theEnt->Pnindex()->Length(); i4++)
{
Standard_Integer Var0 = theEnt->Pnindex()->Value(i4);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i5 = 1; i5 <= theEnt->TriangleStrips()->RowLength(); i5++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j5 = 1; j5 <= theEnt->TriangleStrips()->ColLength(); j5++)
{
Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i5,j5);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleFans()->RowLength(); i6++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleFans()->ColLength(); j6++)
{
Standard_Integer Var0 = theEnt->TriangleFans()->Value(i6,j6);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWComplexTriangulatedSurfaceSet::Share(
const Handle(StepVisual_ComplexTriangulatedSurfaceSet)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedSurfaceSet
theIter.AddItem(theEnt->StepVisual_TessellatedSurfaceSet::Coordinates());
// Own fields of ComplexTriangulatedSurfaceSet
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_
#define _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_ComplexTriangulatedSurfaceSet;
//! Read & Write tool for ComplexTriangulatedSurfaceSet
class RWStepVisual_RWComplexTriangulatedSurfaceSet
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWComplexTriangulatedSurfaceSet();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_

View File

@@ -0,0 +1,151 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWCubicBezierTessellatedEdge.hxx>
#include <StepVisual_CubicBezierTessellatedEdge.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <StepVisual_EdgeOrCurve.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
//=======================================================================
//function : RWStepVisual_RWCubicBezierTessellatedEdge
//purpose :
//=======================================================================
RWStepVisual_RWCubicBezierTessellatedEdge::RWStepVisual_RWCubicBezierTessellatedEdge() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTessellatedEdge::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theCheck, "cubic_bezier_tessellated_edge"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedEdge
Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates);
StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink;
Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink);
}
else
{
hasTessellatedEdge_GeometricLink = Standard_False;
aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve();
}
Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub4;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aTessellatedEdge_LineStrip->SetValue(i0, anIt0);
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTessellatedEdge::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedEdge
theSW.Send(theEnt->Coordinates());
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++)
{
Standard_Integer Var0 = theEnt->LineStrip()->Value(i3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTessellatedEdge::Share(
const Handle(StepVisual_CubicBezierTessellatedEdge)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedEdge
theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates());
if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink())
{
theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_
#define _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_CubicBezierTessellatedEdge;
//! Read & Write tool for CubicBezierTessellatedEdge
class RWStepVisual_RWCubicBezierTessellatedEdge
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWCubicBezierTessellatedEdge();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_

View File

@@ -0,0 +1,215 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWCubicBezierTriangulatedFace.hxx>
#include <StepVisual_CubicBezierTriangulatedFace.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Real.hxx>
#include <StepVisual_FaceOrSurface.hxx>
#include <TColStd_HArray2OfInteger.hxx>
#include <TColStd_HArray1OfInteger.hxx>
//=======================================================================
//function : RWStepVisual_RWCubicBezierTriangulatedFace
//purpose :
//=======================================================================
RWStepVisual_RWCubicBezierTriangulatedFace::RWStepVisual_RWCubicBezierTriangulatedFace() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 6, theCheck, "cubic_bezier_triangulated_face"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedFace
Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
Standard_Integer aTessellatedFace_Pnmax;
theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1));
aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj4 = 0;
if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) {
Standard_Integer num4 = subj4;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Real anIt0;
theData->ReadReal(num4, j0, "real", theCheck, anIt0);
aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
}
}
}
}
StepVisual_FaceOrSurface aTessellatedFace_GeometricLink;
Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 5))
{
theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink);
}
else
{
hasTessellatedFace_GeometricLink = Standard_False;
aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface();
}
// Own fields of CubicBezierTriangulatedFace
Handle(TColStd_HArray2OfInteger) aCtriangles;
Standard_Integer sub6 = 0;
if (theData->ReadSubList(theNum, 6, "ctriangles", theCheck, sub6))
{
Standard_Integer nb0 = theData->NbParams(sub6);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1));
aCtriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj6 = 0;
if ( theData->ReadSubList (sub6, i0, "sub-part(ctriangles)", theCheck, subj6) ) {
Standard_Integer num4 = subj6;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aCtriangles->SetValue(i0,j0, anIt0);
}
}
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aCtriangles);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTriangulatedFace::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedFace
theSW.Send(theEnt->Coordinates());
theSW.Send(theEnt->Pnmax());
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++)
{
Standard_Real Var0 = theEnt->Normals()->Value(i3,j3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
// Own fields of CubicBezierTriangulatedFace
theSW.OpenSub();
for (Standard_Integer i5 = 1; i5 <= theEnt->Ctriangles()->RowLength(); i5++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j5 = 1; j5 <= theEnt->Ctriangles()->ColLength(); j5++)
{
Standard_Integer Var0 = theEnt->Ctriangles()->Value(i5,j5);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWCubicBezierTriangulatedFace::Share(
const Handle(StepVisual_CubicBezierTriangulatedFace)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedFace
theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates());
if (theEnt->StepVisual_TessellatedFace::HasGeometricLink())
{
theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value());
}
// Own fields of CubicBezierTriangulatedFace
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:11 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_
#define _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_CubicBezierTriangulatedFace;
//! Read & Write tool for CubicBezierTriangulatedFace
class RWStepVisual_RWCubicBezierTriangulatedFace
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWCubicBezierTriangulatedFace();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_

View File

@@ -0,0 +1,226 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedConnectingEdge.hxx>
#include <StepVisual_TessellatedConnectingEdge.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <StepVisual_EdgeOrCurve.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
#include <StepData_Logical.hxx>
#include <StepVisual_TessellatedFace.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedConnectingEdge
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedConnectingEdge::RWStepVisual_RWTessellatedConnectingEdge() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedConnectingEdge::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 9, theCheck, "tessellated_connecting_edge"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedEdge
Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates);
StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink;
Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink);
}
else
{
hasTessellatedEdge_GeometricLink = Standard_False;
aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve();
}
Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub4;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aTessellatedEdge_LineStrip->SetValue(i0, anIt0);
}
}
// Own fields of TessellatedConnectingEdge
StepData_Logical aSmooth;
theData->ReadLogical(theNum, 5, "smooth", theCheck, aSmooth);
Handle(StepVisual_TessellatedFace) aFace1;
theData->ReadEntity(theNum, 6, "face1", theCheck,
STANDARD_TYPE(StepVisual_TessellatedFace), aFace1);
Handle(StepVisual_TessellatedFace) aFace2;
theData->ReadEntity(theNum, 7, "face2", theCheck,
STANDARD_TYPE(StepVisual_TessellatedFace), aFace2);
Handle(TColStd_HArray1OfInteger) aLineStripFace1;
Standard_Integer sub8 = 0;
if (theData->ReadSubList(theNum, 8, "line_strip_face1", theCheck, sub8))
{
Standard_Integer nb0 = theData->NbParams(sub8);
aLineStripFace1 = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub8;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aLineStripFace1->SetValue(i0, anIt0);
}
}
Handle(TColStd_HArray1OfInteger) aLineStripFace2;
Standard_Integer sub9 = 0;
if (theData->ReadSubList(theNum, 9, "line_strip_face2", theCheck, sub9))
{
Standard_Integer nb0 = theData->NbParams(sub9);
aLineStripFace2 = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub9;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aLineStripFace2->SetValue(i0, anIt0);
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip, aSmooth, aFace1, aFace2, aLineStripFace1, aLineStripFace2);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedConnectingEdge::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedEdge
theSW.Send(theEnt->Coordinates());
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++)
{
Standard_Integer Var0 = theEnt->LineStrip()->Value(i3);
theSW.Send(Var0);
}
theSW.CloseSub();
// Own fields of TessellatedConnectingEdge
theSW.SendLogical(theEnt->Smooth());
theSW.Send(theEnt->Face1());
theSW.Send(theEnt->Face2());
theSW.OpenSub();
for (Standard_Integer i7 = 1; i7 <= theEnt->LineStripFace1()->Length(); i7++)
{
Standard_Integer Var0 = theEnt->LineStripFace1()->Value(i7);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i8 = 1; i8 <= theEnt->LineStripFace2()->Length(); i8++)
{
Standard_Integer Var0 = theEnt->LineStripFace2()->Value(i8);
theSW.Send(Var0);
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedConnectingEdge::Share(
const Handle(StepVisual_TessellatedConnectingEdge)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedEdge
theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates());
if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink())
{
theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value());
}
// Own fields of TessellatedConnectingEdge
theIter.AddItem(theEnt->Face1());
theIter.AddItem(theEnt->Face2());
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_
#define _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedConnectingEdge;
//! Read & Write tool for TessellatedConnectingEdge
class RWStepVisual_RWTessellatedConnectingEdge
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedConnectingEdge();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedConnectingEdge)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_

View File

@@ -0,0 +1,148 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedEdge.hxx>
#include <StepVisual_TessellatedEdge.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <StepVisual_EdgeOrCurve.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedEdge
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedEdge::RWStepVisual_RWTessellatedEdge() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedEdge::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedEdge)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_edge"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedEdge
Handle(StepVisual_CoordinatesList) aCoordinates;
theData->ReadEntity(theNum, 2, "coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates);
StepVisual_EdgeOrCurve aGeometricLink;
Standard_Boolean hasGeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "geometric_link", theCheck, aGeometricLink);
}
else
{
hasGeometricLink = Standard_False;
aGeometricLink = StepVisual_EdgeOrCurve();
}
Handle(TColStd_HArray1OfInteger) aLineStrip;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "line_strip", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
aLineStrip = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub4;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aLineStrip->SetValue(i0, anIt0);
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aCoordinates, hasGeometricLink, aGeometricLink, aLineStrip);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedEdge::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedEdge)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedEdge
theSW.Send(theEnt->Coordinates());
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++)
{
Standard_Integer Var0 = theEnt->LineStrip()->Value(i3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedEdge::Share (const Handle(StepVisual_TessellatedEdge)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedEdge
theIter.AddItem(theEnt->Coordinates());
if (theEnt->HasGeometricLink())
{
theIter.AddItem(theEnt->GeometricLink().Value());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedEdge_HeaderFile_
#define _RWStepVisual_RWTessellatedEdge_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedEdge;
//! Read & Write tool for TessellatedEdge
class RWStepVisual_RWTessellatedEdge
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedEdge();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedEdge)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedEdge)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedEdge)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedEdge_HeaderFile_

View File

@@ -0,0 +1,121 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedPointSet.hxx>
#include <StepVisual_TessellatedPointSet.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedPointSet
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedPointSet::RWStepVisual_RWTessellatedPointSet() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedPointSet::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedPointSet)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_point_set"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedPointSet
Handle(StepVisual_CoordinatesList) aCoordinates;
theData->ReadEntity(theNum, 2, "coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates);
Handle(TColStd_HArray1OfInteger) aPointList;
Standard_Integer sub3 = 0;
if (theData->ReadSubList(theNum, 3, "point_list", theCheck, sub3))
{
Standard_Integer nb0 = theData->NbParams(sub3);
aPointList = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub3;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aPointList->SetValue(i0, anIt0);
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aCoordinates, aPointList);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedPointSet::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedPointSet)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedPointSet
theSW.Send(theEnt->Coordinates());
theSW.OpenSub();
for (Standard_Integer i2 = 1; i2 <= theEnt->PointList()->Length(); i2++)
{
Standard_Integer Var0 = theEnt->PointList()->Value(i2);
theSW.Send(Var0);
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedPointSet::Share (const Handle(StepVisual_TessellatedPointSet)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedPointSet
theIter.AddItem(theEnt->Coordinates());
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedPointSet_HeaderFile_
#define _RWStepVisual_RWTessellatedPointSet_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedPointSet;
//! Read & Write tool for TessellatedPointSet
class RWStepVisual_RWTessellatedPointSet
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedPointSet();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedPointSet)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedPointSet)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedPointSet)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedPointSet_HeaderFile_

View File

@@ -0,0 +1,125 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedShapeRepresentation.hxx>
#include <StepVisual_TessellatedShapeRepresentation.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepRepr_HArray1OfRepresentationItem.hxx>
#include <StepRepr_RepresentationItem.hxx>
#include <StepRepr_RepresentationContext.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedShapeRepresentation
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedShapeRepresentation::RWStepVisual_RWTessellatedShapeRepresentation() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentation::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shape_representation"))
{
return;
}
// Inherited fields of Representation
Handle(TCollection_HAsciiString) aRepresentation_Name;
theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name);
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
Standard_Integer sub2 = 0;
if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2))
{
Standard_Integer nb0 = theData->NbParams(sub2);
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0);
Standard_Integer num2 = sub2;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Handle(StepRepr_RepresentationItem) anIt0;
theData->ReadEntity(num2, i0, "representation_item", theCheck,
STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
aRepresentation_Items->SetValue(i0, anIt0);
}
}
Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck,
STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
// Initialize entity
theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentation::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const
{
// Own fields of Representation
theSW.Send(theEnt->Name());
theSW.OpenSub();
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.Send(theEnt->ContextOfItems());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentation::Share(
const Handle(StepVisual_TessellatedShapeRepresentation)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of Representation
for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++)
{
Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1);
theIter.AddItem(Var0);
}
theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems());
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_
#define _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedShapeRepresentation;
//! Read & Write tool for TessellatedShapeRepresentation
class RWStepVisual_RWTessellatedShapeRepresentation
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentation();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_

View File

@@ -0,0 +1,152 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx>
#include <StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepRepr_HArray1OfRepresentationItem.hxx>
#include <StepRepr_RepresentationItem.hxx>
#include <StepRepr_RepresentationContext.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_shape_representation_with_accuracy_parameters"))
{
return;
}
// Inherited fields of Representation
Handle(TCollection_HAsciiString) aRepresentation_Name;
theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name);
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
Standard_Integer sub2 = 0;
if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2))
{
Standard_Integer nb0 = theData->NbParams(sub2);
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0);
Standard_Integer num2 = sub2;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Handle(StepRepr_RepresentationItem) anIt0;
theData->ReadEntity(num2, i0, "representation_item", theCheck,
STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
aRepresentation_Items->SetValue(i0, anIt0);
}
}
Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck,
STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
// Own fields of TessellatedShapeRepresentationWithAccuracyParameters
Handle(TColStd_HArray1OfReal) aTessellationAccuracyParameters;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellation_accuracy_parameters", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
aTessellationAccuracyParameters = new TColStd_HArray1OfReal(1, nb0);
Standard_Integer num2 = sub4;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Real anIt0;
theData->ReadReal(num2, i0, "tessellation_accuracy_parameter_item", theCheck, anIt0);
aTessellationAccuracyParameters->SetValue(i0, anIt0);
}
}
// Initialize entity
theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems, aTessellationAccuracyParameters);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const
{
// Own fields of Representation
theSW.Send(theEnt->Name());
theSW.OpenSub();
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.Send(theEnt->ContextOfItems());
// Own fields of TessellatedShapeRepresentationWithAccuracyParameters
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->TessellationAccuracyParameters()->Length(); i3++)
{
Standard_Real Var0 = theEnt->TessellationAccuracyParameters()->Value(i3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::Share(
const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of Representation
for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++)
{
Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1);
theIter.AddItem(Var0);
}
theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems());
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_
#define _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedShapeRepresentationWithAccuracyParameters;
//! Read & Write tool for TessellatedShapeRepresentationWithAccuracyParameters
class RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_

View File

@@ -0,0 +1,147 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedShell.hxx>
#include <StepVisual_TessellatedShell.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_HArray1OfTessellatedStructuredItem.hxx>
#include <StepVisual_TessellatedStructuredItem.hxx>
#include <StepShape_ConnectedFaceSet.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedShell
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedShell::RWStepVisual_RWTessellatedShell() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShell::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShell)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shell"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedShell
Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems;
Standard_Integer sub2 = 0;
if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2))
{
Standard_Integer nb0 = theData->NbParams(sub2);
aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0);
Standard_Integer num2 = sub2;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Handle(StepVisual_TessellatedStructuredItem) anIt0;
theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck,
STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0);
aItems->SetValue(i0, anIt0);
}
}
Handle(StepShape_ConnectedFaceSet) aTopologicalLink;
Standard_Boolean hasTopologicalLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "topological_link", theCheck,
STANDARD_TYPE(StepShape_ConnectedFaceSet), aTopologicalLink);
}
else
{
hasTopologicalLink = Standard_False;
aTopologicalLink.Nullify();
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aItems, hasTopologicalLink, aTopologicalLink);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShell::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShell)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedShell
theSW.OpenSub();
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1);
theSW.Send(Var0);
}
theSW.CloseSub();
if (theEnt->HasTopologicalLink())
{
theSW.Send(theEnt->TopologicalLink());
}
else
{
theSW.SendUndef();
}
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedShell::Share (const Handle(StepVisual_TessellatedShell)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedShell
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1);
theIter.AddItem(Var0);
}
if (theEnt->HasTopologicalLink())
{
theIter.AddItem(theEnt->TopologicalLink());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedShell_HeaderFile_
#define _RWStepVisual_RWTessellatedShell_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedShell;
//! Read & Write tool for TessellatedShell
class RWStepVisual_RWTessellatedShell
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedShell();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedShell)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedShell)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShell)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedShell_HeaderFile_

View File

@@ -0,0 +1,147 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedSolid.hxx>
#include <StepVisual_TessellatedSolid.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_HArray1OfTessellatedStructuredItem.hxx>
#include <StepVisual_TessellatedStructuredItem.hxx>
#include <StepShape_ManifoldSolidBrep.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedSolid
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedSolid::RWStepVisual_RWTessellatedSolid() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedSolid::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedSolid)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_solid"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedSolid
Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems;
Standard_Integer sub2 = 0;
if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2))
{
Standard_Integer nb0 = theData->NbParams(sub2);
aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0);
Standard_Integer num2 = sub2;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Handle(StepVisual_TessellatedStructuredItem) anIt0;
theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck,
STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0);
aItems->SetValue(i0, anIt0);
}
}
Handle(StepShape_ManifoldSolidBrep) aGeometricLink;
Standard_Boolean hasGeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "geometric_link", theCheck,
STANDARD_TYPE(StepShape_ManifoldSolidBrep), aGeometricLink);
}
else
{
hasGeometricLink = Standard_False;
aGeometricLink.Nullify();
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricLink, aGeometricLink);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedSolid::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedSolid)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedSolid
theSW.OpenSub();
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1);
theSW.Send(Var0);
}
theSW.CloseSub();
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink());
}
else
{
theSW.SendUndef();
}
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedSolid::Share (const Handle(StepVisual_TessellatedSolid)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedSolid
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1);
theIter.AddItem(Var0);
}
if (theEnt->HasGeometricLink())
{
theIter.AddItem(theEnt->GeometricLink());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedSolid_HeaderFile_
#define _RWStepVisual_RWTessellatedSolid_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedSolid;
//! Read & Write tool for TessellatedSolid
class RWStepVisual_RWTessellatedSolid
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedSolid();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedSolid)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedSolid)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedSolid)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedSolid_HeaderFile_

View File

@@ -0,0 +1,82 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedStructuredItem.hxx>
#include <StepVisual_TessellatedStructuredItem.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedStructuredItem
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedStructuredItem::RWStepVisual_RWTessellatedStructuredItem() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedStructuredItem::ReadStep(
const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 1, theCheck, "tessellated_structured_item"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Initialize entity
theEnt->Init(aRepresentationItem_Name);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedStructuredItem::WriteStep(
StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedStructuredItem::Share(
const Handle(StepVisual_TessellatedStructuredItem)&,
Interface_EntityIterator&) const
{
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_
#define _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedStructuredItem;
//! Read & Write tool for TessellatedStructuredItem
class RWStepVisual_RWTessellatedStructuredItem
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedStructuredItem();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedStructuredItem)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_

View File

@@ -0,0 +1,130 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedVertex.hxx>
#include <StepVisual_TessellatedVertex.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <StepShape_VertexPoint.hxx>
#include <Standard_Integer.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedVertex
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedVertex::RWStepVisual_RWTessellatedVertex() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedVertex::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedVertex)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_vertex"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedVertex
Handle(StepVisual_CoordinatesList) aCoordinates;
theData->ReadEntity(theNum, 2, "coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates);
Handle(StepShape_VertexPoint) aTopologicalLink;
Standard_Boolean hasTopologicalLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "topological_link", theCheck,
STANDARD_TYPE(StepShape_VertexPoint), aTopologicalLink);
}
else
{
hasTopologicalLink = Standard_False;
aTopologicalLink.Nullify();
}
Standard_Integer aPointIndex;
theData->ReadInteger(theNum, 4, "point_index", theCheck, aPointIndex);
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aCoordinates, hasTopologicalLink, aTopologicalLink, aPointIndex);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedVertex::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedVertex)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedVertex
theSW.Send(theEnt->Coordinates());
if (theEnt->HasTopologicalLink())
{
theSW.Send(theEnt->TopologicalLink());
}
else
{
theSW.SendUndef();
}
theSW.Send(theEnt->PointIndex());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedVertex::Share (const Handle(StepVisual_TessellatedVertex)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedVertex
theIter.AddItem(theEnt->Coordinates());
if (theEnt->HasTopologicalLink())
{
theIter.AddItem(theEnt->TopologicalLink());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedVertex_HeaderFile_
#define _RWStepVisual_RWTessellatedVertex_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedVertex;
//! Read & Write tool for TessellatedVertex
class RWStepVisual_RWTessellatedVertex
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedVertex();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedVertex)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedVertex)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedVertex)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedVertex_HeaderFile_

View File

@@ -0,0 +1,145 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTessellatedWire.hxx>
#include <StepVisual_TessellatedWire.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx>
#include <StepVisual_TessellatedEdgeOrVertex.hxx>
#include <StepVisual_PathOrCompositeCurve.hxx>
//=======================================================================
//function : RWStepVisual_RWTessellatedWire
//purpose :
//=======================================================================
RWStepVisual_RWTessellatedWire::RWStepVisual_RWTessellatedWire() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedWire::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedWire)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_wire"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Own fields of TessellatedWire
Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) aItems;
Standard_Integer sub2 = 0;
if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2))
{
Standard_Integer nb0 = theData->NbParams(sub2);
aItems = new StepVisual_HArray1OfTessellatedEdgeOrVertex(1, nb0);
Standard_Integer num2 = sub2;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
StepVisual_TessellatedEdgeOrVertex anIt0;
theData->ReadEntity(num2, i0, "tessellated_edge_or_vertex", theCheck, anIt0);
aItems->SetValue(i0, anIt0);
}
}
StepVisual_PathOrCompositeCurve aGeometricModelLink;
Standard_Boolean hasGeometricModelLink = Standard_True;
if (theData->IsParamDefined(theNum, 3))
{
theData->ReadEntity(theNum, 3, "geometric_model_link", theCheck, aGeometricModelLink);
}
else
{
hasGeometricModelLink = Standard_False;
aGeometricModelLink = StepVisual_PathOrCompositeCurve();
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricModelLink, aGeometricModelLink);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedWire::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedWire)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedWire
theSW.OpenSub();
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1);
theSW.Send(Var0.Value());
}
theSW.CloseSub();
if (theEnt->HasGeometricModelLink())
{
theSW.Send(theEnt->GeometricModelLink().Value());
}
else
{
theSW.SendUndef();
}
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTessellatedWire::Share (const Handle(StepVisual_TessellatedWire)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Own fields of TessellatedWire
for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++)
{
StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1);
theIter.AddItem(Var0.Value());
}
if (theEnt->HasGeometricModelLink())
{
theIter.AddItem(theEnt->GeometricModelLink().Value());
}
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTessellatedWire_HeaderFile_
#define _RWStepVisual_RWTessellatedWire_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TessellatedWire;
//! Read & Write tool for TessellatedWire
class RWStepVisual_RWTessellatedWire
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTessellatedWire();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TessellatedWire)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TessellatedWire)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TessellatedWire)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTessellatedWire_HeaderFile_

View File

@@ -0,0 +1,239 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <RWStepVisual_RWTriangulatedFace.hxx>
#include <StepVisual_TriangulatedFace.hxx>
#include <Interface_EntityIterator.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
#include <StepVisual_CoordinatesList.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Standard_Real.hxx>
#include <StepVisual_FaceOrSurface.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray2OfInteger.hxx>
//=======================================================================
//function : RWStepVisual_RWTriangulatedFace
//purpose :
//=======================================================================
RWStepVisual_RWTriangulatedFace::RWStepVisual_RWTriangulatedFace() {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TriangulatedFace)& theEnt) const
{
// Check number of parameters
if (!theData->CheckNbParams(theNum, 7, theCheck, "triangulated_face"))
{
return;
}
// Inherited fields of RepresentationItem
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name);
// Inherited fields of TessellatedFace
Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates;
theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck,
STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates);
Standard_Integer aTessellatedFace_Pnmax;
theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax);
Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals;
Standard_Integer sub4 = 0;
if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4))
{
Standard_Integer nb0 = theData->NbParams(sub4);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1));
aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj4 = 0;
if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) {
Standard_Integer num4 = subj4;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Real anIt0;
theData->ReadReal(num4, j0, "real", theCheck, anIt0);
aTessellatedFace_Normals->SetValue(i0,j0, anIt0);
}
}
}
}
StepVisual_FaceOrSurface aTessellatedFace_GeometricLink;
Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True;
if (theData->IsParamDefined(theNum, 5))
{
theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink);
}
else
{
hasTessellatedFace_GeometricLink = Standard_False;
aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface();
}
// Own fields of TriangulatedFace
Handle(TColStd_HArray1OfInteger) aPnindex;
Standard_Integer sub6 = 0;
if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6))
{
Standard_Integer nb0 = theData->NbParams(sub6);
aPnindex = new TColStd_HArray1OfInteger(1, nb0);
Standard_Integer num2 = sub6;
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num2, i0, "integer", theCheck, anIt0);
aPnindex->SetValue(i0, anIt0);
}
}
Handle(TColStd_HArray2OfInteger) aTriangles;
Standard_Integer sub7 = 0;
if (theData->ReadSubList(theNum, 7, "triangles", theCheck, sub7))
{
Standard_Integer nb0 = theData->NbParams(sub7);
Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1));
aTriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0);
for (Standard_Integer i0 = 1; i0 <= nb0; i0++)
{
Standard_Integer subj7 = 0;
if ( theData->ReadSubList (sub7, i0, "sub-part(triangles)", theCheck, subj7) ) {
Standard_Integer num4 = subj7;
for (Standard_Integer j0 = 1; j0 <= nbj0; j0++)
{
Standard_Integer anIt0;
theData->ReadInteger(num4, j0, "integer", theCheck, anIt0);
aTriangles->SetValue(i0,j0, anIt0);
}
}
}
}
// Initialize entity
theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangles);
#ifdef OCCT_DEBUG
std::cout << aTessellatedFace_Pnmax << " " << (aTriangles.IsNull() ? 0 : aTriangles->NbRows()) << std::endl;
#endif
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepVisual_RWTriangulatedFace::WriteStep (StepData_StepWriter& theSW,
const Handle(StepVisual_TriangulatedFace)& theEnt) const
{
// Own fields of RepresentationItem
theSW.Send(theEnt->Name());
// Own fields of TessellatedFace
theSW.Send(theEnt->Coordinates());
theSW.Send(theEnt->Pnmax());
theSW.OpenSub();
for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->NbRows(); i3++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->NbColumns(); j3++)
{
Standard_Real Var0 = theEnt->Normals()->Value(i3,j3);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
if (theEnt->HasGeometricLink())
{
theSW.Send(theEnt->GeometricLink().Value());
}
else
{
theSW.SendUndef();
}
// Own fields of TriangulatedFace
theSW.OpenSub();
for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++)
{
Standard_Integer Var0 = theEnt->Pnindex()->Value(i5);
theSW.Send(Var0);
}
theSW.CloseSub();
theSW.OpenSub();
for (Standard_Integer i6 = 1; i6 <= theEnt->Triangles()->NbRows(); i6++)
{
theSW.NewLine(Standard_False);
theSW.OpenSub();
for (Standard_Integer j6 = 1; j6 <= theEnt->Triangles()->NbColumns(); j6++)
{
Standard_Integer Var0 = theEnt->Triangles()->Value(i6,j6);
theSW.Send(Var0);
}
theSW.CloseSub();
}
theSW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepVisual_RWTriangulatedFace::Share (const Handle(StepVisual_TriangulatedFace)&theEnt,
Interface_EntityIterator& theIter) const
{
// Inherited fields of RepresentationItem
// Inherited fields of TessellatedFace
theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates());
if (theEnt->StepVisual_TessellatedFace::HasGeometricLink())
{
theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value());
}
// Own fields of TriangulatedFace
}

View File

@@ -0,0 +1,53 @@
// Created on : Thu Mar 24 18:30:12 2022
// Created by: snn
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0
// Copyright (c) Open CASCADE 2022
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepVisual_RWTriangulatedFace_HeaderFile_
#define _RWStepVisual_RWTriangulatedFace_HeaderFile_
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepData_StepWriter;
class Interface_EntityIterator;
class StepVisual_TriangulatedFace;
//! Read & Write tool for TriangulatedFace
class RWStepVisual_RWTriangulatedFace
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepVisual_RWTriangulatedFace();
Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
const Standard_Integer theNum,
Handle(Interface_Check)& theCheck,
const Handle(StepVisual_TriangulatedFace)& theEnt) const;
Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
const Handle(StepVisual_TriangulatedFace)& theEnt) const;
Standard_EXPORT void Share(const Handle(StepVisual_TriangulatedFace)& theEnt,
Interface_EntityIterator& theIter) const;
};
#endif // _RWStepVisual_RWTriangulatedFace_HeaderFile_