mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
1
src/RWStepShape/FILES
Executable file
1
src/RWStepShape/FILES
Executable file
@@ -0,0 +1 @@
|
||||
RWStepShape_RWShapeDefinitionRepresentation_1.cxx
|
136
src/RWStepShape/RWStepShape.cdl
Executable file
136
src/RWStepShape/RWStepShape.cdl
Executable file
@@ -0,0 +1,136 @@
|
||||
-- File: StepShape.cdl
|
||||
-- Created: Mon Dec 4 12:02:22 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
package RWStepShape
|
||||
|
||||
uses
|
||||
|
||||
StepData, Interface, TCollection, TColStd, StepShape
|
||||
|
||||
is
|
||||
|
||||
|
||||
--class ReadWriteModule;
|
||||
|
||||
--class GeneralModule;
|
||||
|
||||
class RWAdvancedBrepShapeRepresentation;
|
||||
class RWAdvancedFace;
|
||||
class RWBlock;
|
||||
class RWBooleanResult;
|
||||
class RWBoxDomain;
|
||||
class RWBoxedHalfSpace;
|
||||
class RWBrepWithVoids;
|
||||
class RWClosedShell;
|
||||
class RWCompoundShapeRepresentation;
|
||||
class RWConnectedEdgeSet;
|
||||
class RWConnectedFaceShapeRepresentation;
|
||||
class RWConnectedFaceSet;
|
||||
-- Removed from Rev2 to Rev4 : class RWCsgRepresentation;
|
||||
class RWCsgShapeRepresentation;
|
||||
class RWCsgSolid;
|
||||
class RWDefinitionalRepresentationAndShapeRepresentation; -- abv CAX-IF TRJ4 k1_geo-ac
|
||||
class RWEdge;
|
||||
class RWEdgeBasedWireframeModel;
|
||||
class RWEdgeBasedWireframeShapeRepresentation;
|
||||
class RWEdgeCurve;
|
||||
class RWEdgeLoop;
|
||||
class RWExtrudedAreaSolid;
|
||||
class RWFace;
|
||||
class RWFaceBasedSurfaceModel;
|
||||
class RWFaceBound;
|
||||
class RWFaceOuterBound;
|
||||
class RWFaceSurface;
|
||||
class RWFacetedBrep;
|
||||
class RWFacetedBrepAndBrepWithVoids; -- Added by FMA
|
||||
class RWFacetedBrepShapeRepresentation;
|
||||
class RWGeometricCurveSet;
|
||||
class RWGeometricSet;
|
||||
class RWGeometricallyBoundedSurfaceShapeRepresentation;
|
||||
class RWGeometricallyBoundedWireframeShapeRepresentation;
|
||||
class RWHalfSpaceSolid;
|
||||
class RWLoop;
|
||||
class RWManifoldSolidBrep;
|
||||
class RWManifoldSurfaceShapeRepresentation;
|
||||
class RWNonManifoldSurfaceShapeRepresentation;
|
||||
class RWOpenShell;
|
||||
class RWOrientedClosedShell;
|
||||
class RWOrientedEdge;
|
||||
class RWOrientedFace;
|
||||
class RWOrientedOpenShell;
|
||||
class RWOrientedPath;
|
||||
class RWPath;
|
||||
class RWPolyLoop;
|
||||
class RWRevolvedAreaSolid;
|
||||
class RWRightAngularWedge;
|
||||
class RWRightCircularCone;
|
||||
class RWRightCircularCylinder;
|
||||
class RWShapeRepresentation;
|
||||
class RWShellBasedSurfaceModel;
|
||||
class RWSolidModel;
|
||||
class RWSolidReplica;
|
||||
class RWSphere;
|
||||
class RWSweptAreaSolid;
|
||||
class RWTopologicalRepresentationItem;
|
||||
class RWTorus;
|
||||
class RWTransitionalShapeRepresentation;
|
||||
class RWVertex;
|
||||
class RWVertexLoop;
|
||||
class RWVertexPoint;
|
||||
class RWLoopAndPath;
|
||||
|
||||
-- Added from AP214 CC1 to CC2
|
||||
|
||||
class RWContextDependentShapeRepresentation;
|
||||
class RWShapeDefinitionRepresentation; -- moved from StepRepr
|
||||
|
||||
-- Added from CC2 to DIS
|
||||
class RWSweptFaceSolid;
|
||||
class RWExtrudedFaceSolid;
|
||||
class RWRevolvedFaceSolid;
|
||||
|
||||
-- ABV 18 Apr 00: for dimensions and tolerances (Part 47)
|
||||
class RWAngularLocation;
|
||||
class RWAngularSize;
|
||||
class RWDimensionalCharacteristicRepresentation;
|
||||
class RWDimensionalLocation;
|
||||
class RWDimensionalLocationWithPath;
|
||||
class RWDimensionalSize;
|
||||
class RWDimensionalSizeWithPath;
|
||||
class RWShapeDimensionRepresentation;
|
||||
|
||||
-- CKY 25 APR 2001 : dim.tol, continued (TR7J)
|
||||
class RWLimitsAndFits;
|
||||
class RWToleranceValue;
|
||||
class RWMeasureQualification;
|
||||
class RWPlusMinusTolerance;
|
||||
class RWPrecisionQualifier;
|
||||
class RWTypeQualifier;
|
||||
|
||||
class RWQualifiedRepresentationItem;
|
||||
class RWMeasureRepresentationItemAndQualifiedRepresentationItem;
|
||||
|
||||
-- Added from AP214 IS to DIS
|
||||
|
||||
class RWConnectedFaceSubSet;
|
||||
class RWSeamEdge;
|
||||
class RWSubedge;
|
||||
class RWSubface;
|
||||
|
||||
--- Added for AP209
|
||||
class RWPointRepresentation;
|
||||
|
||||
--- added for TR12J (GD&T)
|
||||
class RWShapeRepresentationWithParameters;
|
||||
|
||||
---Package Method ---
|
||||
|
||||
-- Init;
|
||||
---Purpose: enforced the initialisation of the libraries
|
||||
|
||||
end RWStepShape;
|
30
src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: AdvancedBrepShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:22 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWAdvancedBrepShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for AdvancedBrepShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
AdvancedBrepShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWAdvancedBrepShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable AdvancedBrepShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : AdvancedBrepShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : AdvancedBrepShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWAdvancedBrepShapeRepresentation;
|
98
src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWAdvancedBrepShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_AdvancedBrepShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWAdvancedBrepShapeRepresentation::RWStepShape_RWAdvancedBrepShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWAdvancedBrepShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_AdvancedBrepShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"advanced_brep_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWAdvancedBrepShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_AdvancedBrepShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWAdvancedBrepShapeRepresentation::Share(const Handle(StepShape_AdvancedBrepShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWAdvancedFace.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWAdvancedFace.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: AdvancedFace.cdl
|
||||
-- Created: Mon Dec 4 12:02:22 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWAdvancedFace from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for AdvancedFace
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
AdvancedFace from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWAdvancedFace;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable AdvancedFace from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : AdvancedFace from StepShape);
|
||||
|
||||
Share(me; ent : AdvancedFace from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWAdvancedFace;
|
107
src/RWStepShape/RWStepShape_RWAdvancedFace.cxx
Executable file
107
src/RWStepShape/RWStepShape_RWAdvancedFace.cxx
Executable file
@@ -0,0 +1,107 @@
|
||||
|
||||
#include <RWStepShape_RWAdvancedFace.ixx>
|
||||
#include <StepShape_HArray1OfFaceBound.hxx>
|
||||
#include <StepShape_FaceBound.hxx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_AdvancedFace.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWAdvancedFace::RWStepShape_RWAdvancedFace () {}
|
||||
|
||||
void RWStepShape_RWAdvancedFace::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_AdvancedFace)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"advanced_face")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : bounds ---
|
||||
|
||||
Handle(StepShape_HArray1OfFaceBound) aBounds;
|
||||
Handle(StepShape_FaceBound) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
|
||||
aBounds->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : faceGeometry ---
|
||||
|
||||
Handle(StepGeom_Surface) aFaceGeometry;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"face_geometry", ach, STANDARD_TYPE(StepGeom_Surface), aFaceGeometry);
|
||||
|
||||
// --- inherited field : sameSense ---
|
||||
|
||||
Standard_Boolean aSameSense;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadBoolean (num,4,"same_sense",ach,aSameSense);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBounds, aFaceGeometry, aSameSense);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWAdvancedFace::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_AdvancedFace)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field bounds ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbBounds(); i2 ++) {
|
||||
SW.Send(ent->BoundsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field faceGeometry ---
|
||||
|
||||
SW.Send(ent->FaceGeometry());
|
||||
|
||||
// --- inherited field sameSense ---
|
||||
|
||||
SW.SendBoolean(ent->SameSense());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWAdvancedFace::Share(const Handle(StepShape_AdvancedFace)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbBounds();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->BoundsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->FaceGeometry());
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWAngularLocation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWAngularLocation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWAngularLocation.cdl
|
||||
-- Created: Tue Apr 18 16:42:57 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWAngularLocation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for AngularLocation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
AngularLocation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWAngularLocation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : AngularLocation from StepShape);
|
||||
---Purpose: Reads AngularLocation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: AngularLocation from StepShape);
|
||||
---Purpose: Writes AngularLocation
|
||||
|
||||
Share (me; ent : AngularLocation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWAngularLocation;
|
122
src/RWStepShape/RWStepShape_RWAngularLocation.cxx
Executable file
122
src/RWStepShape/RWStepShape_RWAngularLocation.cxx
Executable file
@@ -0,0 +1,122 @@
|
||||
// File: RWStepShape_RWAngularLocation.cxx
|
||||
// Created: Tue Apr 18 16:48:27 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWAngularLocation.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWAngularLocation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWAngularLocation::RWStepShape_RWAngularLocation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularLocation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_AngularLocation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,5,ach,"angular_location") ) return;
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Name;
|
||||
data->ReadString (num, 1, "shape_aspect_relationship.name", ach, aShapeAspectRelationship_Name);
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Description;
|
||||
Standard_Boolean hasShapeAspectRelationship_Description = Standard_True;
|
||||
if ( data->IsParamDefined (num,2) ) {
|
||||
data->ReadString (num, 2, "shape_aspect_relationship.description", ach, aShapeAspectRelationship_Description);
|
||||
}
|
||||
else {
|
||||
hasShapeAspectRelationship_Description = Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatingShapeAspect;
|
||||
data->ReadEntity (num, 3, "shape_aspect_relationship.relating_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatingShapeAspect);
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatedShapeAspect;
|
||||
data->ReadEntity (num, 4, "shape_aspect_relationship.related_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatedShapeAspect);
|
||||
|
||||
// Own fields of AngularLocation
|
||||
|
||||
// PTV 16.09.2000
|
||||
// defaul value set as StepShape_Small, cause there wasn`t default value, but may be situation when
|
||||
// value will not be initialized and returnd in ent->Init.
|
||||
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
||||
if (data->ParamType (num, 5) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num, 5);
|
||||
if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
|
||||
else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
|
||||
else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
|
||||
else ach->AddFail("Parameter #5 (angle_selection) has not allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #5 (angle_selection) is not enumeration");
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aShapeAspectRelationship_Name,
|
||||
hasShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_RelatingShapeAspect,
|
||||
aShapeAspectRelationship_RelatedShapeAspect,
|
||||
aAngleSelection);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularLocation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_AngularLocation) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Name());
|
||||
|
||||
if ( ent->StepRepr_ShapeAspectRelationship::HasDescription() ) {
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Description());
|
||||
}
|
||||
else SW.SendUndef();
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
|
||||
// Own fields of AngularLocation
|
||||
|
||||
switch (ent->AngleSelection()) {
|
||||
case StepShape_Equal: SW.SendEnum (".EQUAL."); break;
|
||||
case StepShape_Large: SW.SendEnum (".LARGE."); break;
|
||||
case StepShape_Small: SW.SendEnum (".SMALL."); break;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularLocation::Share (const Handle(StepShape_AngularLocation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
|
||||
// Own fields of AngularLocation
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWAngularSize.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWAngularSize.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWAngularSize.cdl
|
||||
-- Created: Tue Apr 18 16:42:57 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWAngularSize from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for AngularSize
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
AngularSize from StepShape
|
||||
|
||||
is
|
||||
Create returns RWAngularSize from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : AngularSize from StepShape);
|
||||
---Purpose: Reads AngularSize
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: AngularSize from StepShape);
|
||||
---Purpose: Writes AngularSize
|
||||
|
||||
Share (me; ent : AngularSize from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWAngularSize;
|
99
src/RWStepShape/RWStepShape_RWAngularSize.cxx
Executable file
99
src/RWStepShape/RWStepShape_RWAngularSize.cxx
Executable file
@@ -0,0 +1,99 @@
|
||||
// File: RWStepShape_RWAngularSize.cxx
|
||||
// Created: Tue Apr 18 16:48:28 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWAngularSize.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWAngularSize
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWAngularSize::RWStepShape_RWAngularSize ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularSize::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_AngularSize) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"angular_size") ) return;
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aDimensionalSize_AppliesTo;
|
||||
data->ReadEntity (num, 1, "dimensional_size.applies_to", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aDimensionalSize_AppliesTo);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDimensionalSize_Name;
|
||||
data->ReadString (num, 2, "dimensional_size.name", ach, aDimensionalSize_Name);
|
||||
|
||||
// Own fields of AngularSize
|
||||
|
||||
// PTV 16.09.2000
|
||||
// defaul value set as StepShape_Small, cause there wasn`t default value, but may be situation when
|
||||
// value will not be initialized and returnd in ent->Init.
|
||||
|
||||
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
||||
if (data->ParamType (num, 3) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num, 3);
|
||||
if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
|
||||
else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
|
||||
else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
|
||||
else ach->AddFail("Parameter #3 (angle_selection) has not allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #3 (angle_selection) is not enumeration");
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aDimensionalSize_AppliesTo,
|
||||
aDimensionalSize_Name,
|
||||
aAngleSelection);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularSize::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_AngularSize) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
SW.Send (ent->StepShape_DimensionalSize::AppliesTo());
|
||||
|
||||
SW.Send (ent->StepShape_DimensionalSize::Name());
|
||||
|
||||
// Own fields of AngularSize
|
||||
|
||||
switch (ent->AngleSelection()) {
|
||||
case StepShape_Equal: SW.SendEnum (".EQUAL."); break;
|
||||
case StepShape_Large: SW.SendEnum (".LARGE."); break;
|
||||
case StepShape_Small: SW.SendEnum (".SMALL."); break;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWAngularSize::Share (const Handle(StepShape_AngularSize) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
iter.AddItem (ent->StepShape_DimensionalSize::AppliesTo());
|
||||
|
||||
// Own fields of AngularSize
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWBlock.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWBlock.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Block.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBlock from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for Block
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Block from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBlock;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Block from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Block from StepShape);
|
||||
|
||||
Share(me; ent : Block from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWBlock;
|
95
src/RWStepShape/RWStepShape_RWBlock.cxx
Executable file
95
src/RWStepShape/RWStepShape_RWBlock.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepShape_RWBlock.ixx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_Block.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWBlock::RWStepShape_RWBlock () {}
|
||||
|
||||
void RWStepShape_RWBlock::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_Block)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"block")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : position ---
|
||||
|
||||
Handle(StepGeom_Axis2Placement3d) aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"position", ach, STANDARD_TYPE(StepGeom_Axis2Placement3d), aPosition);
|
||||
|
||||
// --- own field : x ---
|
||||
|
||||
Standard_Real aX;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"x",ach,aX);
|
||||
|
||||
// --- own field : y ---
|
||||
|
||||
Standard_Real aY;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"y",ach,aY);
|
||||
|
||||
// --- own field : z ---
|
||||
|
||||
Standard_Real aZ;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadReal (num,5,"z",ach,aZ);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aX, aY, aZ);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBlock::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_Block)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : position ---
|
||||
|
||||
SW.Send(ent->Position());
|
||||
|
||||
// --- own field : x ---
|
||||
|
||||
SW.Send(ent->X());
|
||||
|
||||
// --- own field : y ---
|
||||
|
||||
SW.Send(ent->Y());
|
||||
|
||||
// --- own field : z ---
|
||||
|
||||
SW.Send(ent->Z());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBlock::Share(const Handle(StepShape_Block)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWBooleanResult.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWBooleanResult.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BooleanResult.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBooleanResult from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for BooleanResult
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BooleanResult from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBooleanResult;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BooleanResult from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BooleanResult from StepShape);
|
||||
|
||||
Share(me; ent : BooleanResult from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWBooleanResult;
|
138
src/RWStepShape/RWStepShape_RWBooleanResult.cxx
Executable file
138
src/RWStepShape/RWStepShape_RWBooleanResult.cxx
Executable file
@@ -0,0 +1,138 @@
|
||||
|
||||
#include <RWStepShape_RWBooleanResult.ixx>
|
||||
#include <StepShape_BooleanOperator.hxx>
|
||||
#include <StepShape_BooleanOperand.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_BooleanResult.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : BooleanOperator ---
|
||||
static TCollection_AsciiString boDifference(".DIFFERENCE.");
|
||||
static TCollection_AsciiString boIntersection(".INTERSECTION.");
|
||||
static TCollection_AsciiString boUnion(".UNION.");
|
||||
|
||||
RWStepShape_RWBooleanResult::RWStepShape_RWBooleanResult () {}
|
||||
|
||||
void RWStepShape_RWBooleanResult::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_BooleanResult)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"boolean_result")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : operator ---
|
||||
|
||||
StepShape_BooleanOperator aOperator = StepShape_boDifference;
|
||||
if (data->ParamType(num,2) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,2);
|
||||
if (boDifference.IsEqual(text)) aOperator = StepShape_boDifference;
|
||||
else if (boIntersection.IsEqual(text)) aOperator = StepShape_boIntersection;
|
||||
else if (boUnion.IsEqual(text)) aOperator = StepShape_boUnion;
|
||||
else ach->AddFail("Enumeration boolean_operator has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #2 (operator) is not an enumeration");
|
||||
|
||||
// --- own field : firstOperand (is a select type) ---
|
||||
|
||||
// firstOperand Type can be : SolidModel
|
||||
// HalfSpaceSolid
|
||||
// CsgPrimitive (Select Type)
|
||||
// sphere
|
||||
// block
|
||||
// right_angular_wedge
|
||||
// torus
|
||||
// right_circular_cone
|
||||
// right_circular_cylinder
|
||||
// BooleanResult
|
||||
// pour que le code soit correct, il faut tester ces types un par un
|
||||
// comme on n'implemente pas la CSG (Decembre 1995), on ne fait pas
|
||||
// Au cas ou cela change : il faut creer un select type
|
||||
// StepShape_BooleanOperand dans lequel on met la vraie valeur instanciee,
|
||||
// on l'occurrence un autre Select Type si cette valeur est sphere,
|
||||
// block, ...
|
||||
|
||||
//StepShape_BooleanOperand aFirstOperand;
|
||||
//Standard_Boolean stat3;
|
||||
//stat3 = data->ReadEntity(num,3,"first_operand",ach,aFirstOperand);
|
||||
Handle(StepShape_SolidModel) aSolidModel1;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num,3,"first_operand",ach, STANDARD_TYPE(StepShape_SolidModel), aSolidModel1);
|
||||
StepShape_BooleanOperand aFirstOperand;
|
||||
aFirstOperand.SetSolidModel(aSolidModel1);
|
||||
|
||||
// --- own field : secondOperand ---
|
||||
|
||||
//StepShape_BooleanOperand aSecondOperand;
|
||||
//Standard_Boolean stat4;
|
||||
//stat4 = data->ReadEntity(num,4,"second_operand",ach,aSecondOperand);
|
||||
Handle(StepShape_SolidModel) aSolidModel2;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num,4,"second_operand",ach, STANDARD_TYPE(StepShape_SolidModel), aSolidModel2);
|
||||
|
||||
StepShape_BooleanOperand aSecondOperand;
|
||||
aSecondOperand.SetSolidModel(aSolidModel2);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aOperator, aFirstOperand, aSecondOperand);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBooleanResult::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_BooleanResult)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : operator ---
|
||||
|
||||
switch(ent->Operator()) {
|
||||
case StepShape_boDifference : SW.SendEnum (boDifference); break;
|
||||
case StepShape_boIntersection : SW.SendEnum (boIntersection); break;
|
||||
case StepShape_boUnion : SW.SendEnum (boUnion); break;
|
||||
}
|
||||
|
||||
// --- own field : firstOperand ---
|
||||
// --- idem au ReadStep : il faut envoyer le bon type :
|
||||
// au cas ou : switch(ent->FirstOperand().TypeOfContent())
|
||||
// case 1: SW.Send(ent->FirstOperand().SolidModel())
|
||||
// case 2: ...
|
||||
|
||||
SW.Send(ent->FirstOperand().SolidModel());
|
||||
|
||||
// --- own field : secondOperand ---
|
||||
|
||||
SW.Send(ent->SecondOperand().SolidModel());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBooleanResult::Share(const Handle(StepShape_BooleanResult)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// idem
|
||||
iter.GetOneItem(ent->FirstOperand().SolidModel());
|
||||
|
||||
iter.GetOneItem(ent->SecondOperand().SolidModel());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWBoxDomain.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWBoxDomain.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BoxDomain.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBoxDomain from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for BoxDomain
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BoxDomain from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBoxDomain;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BoxDomain from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BoxDomain from StepShape);
|
||||
|
||||
Share(me; ent : BoxDomain from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWBoxDomain;
|
85
src/RWStepShape/RWStepShape_RWBoxDomain.cxx
Executable file
85
src/RWStepShape/RWStepShape_RWBoxDomain.cxx
Executable file
@@ -0,0 +1,85 @@
|
||||
|
||||
#include <RWStepShape_RWBoxDomain.ixx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_BoxDomain.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWBoxDomain::RWStepShape_RWBoxDomain () {}
|
||||
|
||||
void RWStepShape_RWBoxDomain::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_BoxDomain)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"box_domain")) return;
|
||||
|
||||
// --- own field : corner ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aCorner;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadEntity(num, 1,"corner", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aCorner);
|
||||
|
||||
// --- own field : xlength ---
|
||||
|
||||
Standard_Real aXlength;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadReal (num,2,"xlength",ach,aXlength);
|
||||
|
||||
// --- own field : ylength ---
|
||||
|
||||
Standard_Real aYlength;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"ylength",ach,aYlength);
|
||||
|
||||
// --- own field : zlength ---
|
||||
|
||||
Standard_Real aZlength;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"zlength",ach,aZlength);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aCorner, aXlength, aYlength, aZlength);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBoxDomain::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_BoxDomain)& ent) const
|
||||
{
|
||||
|
||||
// --- own field : corner ---
|
||||
|
||||
SW.Send(ent->Corner());
|
||||
|
||||
// --- own field : xlength ---
|
||||
|
||||
SW.Send(ent->Xlength());
|
||||
|
||||
// --- own field : ylength ---
|
||||
|
||||
SW.Send(ent->Ylength());
|
||||
|
||||
// --- own field : zlength ---
|
||||
|
||||
SW.Send(ent->Zlength());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBoxDomain::Share(const Handle(StepShape_BoxDomain)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Corner());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BoxedHalfSpace.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBoxedHalfSpace from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for BoxedHalfSpace
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BoxedHalfSpace from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBoxedHalfSpace;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BoxedHalfSpace from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BoxedHalfSpace from StepShape);
|
||||
|
||||
Share(me; ent : BoxedHalfSpace from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWBoxedHalfSpace;
|
89
src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx
Executable file
89
src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx
Executable file
@@ -0,0 +1,89 @@
|
||||
|
||||
#include <RWStepShape_RWBoxedHalfSpace.ixx>
|
||||
#include <StepShape_BoxDomain.hxx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_BoxedHalfSpace.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWBoxedHalfSpace::RWStepShape_RWBoxedHalfSpace () {}
|
||||
|
||||
void RWStepShape_RWBoxedHalfSpace::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_BoxedHalfSpace)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"boxed_half_space")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : baseSurface ---
|
||||
|
||||
Handle(StepGeom_Surface) aBaseSurface;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"base_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBaseSurface);
|
||||
|
||||
// --- inherited field : agreementFlag ---
|
||||
|
||||
Standard_Boolean aAgreementFlag;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadBoolean (num,3,"agreement_flag",ach,aAgreementFlag);
|
||||
|
||||
// --- own field : enclosure ---
|
||||
|
||||
Handle(StepShape_BoxDomain) aEnclosure;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num, 4,"enclosure", ach, STANDARD_TYPE(StepShape_BoxDomain), aEnclosure);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBaseSurface, aAgreementFlag, aEnclosure);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBoxedHalfSpace::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_BoxedHalfSpace)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field baseSurface ---
|
||||
|
||||
SW.Send(ent->BaseSurface());
|
||||
|
||||
// --- inherited field agreementFlag ---
|
||||
|
||||
SW.SendBoolean(ent->AgreementFlag());
|
||||
|
||||
// --- own field : enclosure ---
|
||||
|
||||
SW.Send(ent->Enclosure());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBoxedHalfSpace::Share(const Handle(StepShape_BoxedHalfSpace)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BaseSurface());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->Enclosure());
|
||||
}
|
||||
|
33
src/RWStepShape/RWStepShape_RWBrepWithVoids.cdl
Executable file
33
src/RWStepShape/RWStepShape_RWBrepWithVoids.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BrepWithVoids.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBrepWithVoids from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for BrepWithVoids
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BrepWithVoids from StepShape,
|
||||
EntityIterator from Interface,
|
||||
ShareTool from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBrepWithVoids;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BrepWithVoids from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BrepWithVoids from StepShape);
|
||||
|
||||
Share(me; ent : BrepWithVoids from StepShape; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : BrepWithVoids from StepShape; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWBrepWithVoids;
|
111
src/RWStepShape/RWStepShape_RWBrepWithVoids.cxx
Executable file
111
src/RWStepShape/RWStepShape_RWBrepWithVoids.cxx
Executable file
@@ -0,0 +1,111 @@
|
||||
//:k4 abv 30.11.98: TR9: warnings for BWV
|
||||
|
||||
#include <RWStepShape_RWBrepWithVoids.ixx>
|
||||
#include <StepShape_HArray1OfOrientedClosedShell.hxx>
|
||||
#include <StepShape_OrientedClosedShell.hxx>
|
||||
#include <StepShape_ClosedShell.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_BrepWithVoids.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWBrepWithVoids::RWStepShape_RWBrepWithVoids () {}
|
||||
|
||||
void RWStepShape_RWBrepWithVoids::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_BrepWithVoids)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"brep_with_voids")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : outer ---
|
||||
|
||||
Handle(StepShape_ClosedShell) aOuter;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"outer", ach, STANDARD_TYPE(StepShape_ClosedShell), aOuter);
|
||||
|
||||
// --- own field : voids ---
|
||||
|
||||
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
||||
Handle(StepShape_OrientedClosedShell) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"voids",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aVoids = new StepShape_HArray1OfOrientedClosedShell (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3, i3,"oriented_closed_shell", ach,
|
||||
STANDARD_TYPE(StepShape_OrientedClosedShell), anent3))
|
||||
aVoids->SetValue(i3, anent3);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aOuter, aVoids);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBrepWithVoids::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_BrepWithVoids)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field outer ---
|
||||
|
||||
SW.Send(ent->Outer());
|
||||
|
||||
// --- own field : voids ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbVoids(); i3 ++) {
|
||||
SW.Send(ent->VoidsValue(i3));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWBrepWithVoids::Share(const Handle(StepShape_BrepWithVoids)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Outer());
|
||||
|
||||
|
||||
Standard_Integer nbElem2 = ent->NbVoids();
|
||||
for (Standard_Integer is2=1; is2<=nbElem2; is2 ++) {
|
||||
iter.GetOneItem(ent->VoidsValue(is2));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//:k4 abv 30 Nov 98: ProSTEP TR9: add warning
|
||||
void RWStepShape_RWBrepWithVoids::Check
|
||||
(const Handle(StepShape_BrepWithVoids)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
for ( Standard_Integer i=1; i <= ent->NbVoids(); i++ )
|
||||
if ( ent->VoidsValue(i)->Orientation() ) {
|
||||
ach->AddWarning ("Void has orientation .T. while .F. is required by API 214");
|
||||
break;
|
||||
}
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWClosedShell.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWClosedShell.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ClosedShell.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWClosedShell from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ClosedShell
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ClosedShell from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWClosedShell;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ClosedShell from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ClosedShell from StepShape);
|
||||
|
||||
Share(me; ent : ClosedShell from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWClosedShell;
|
83
src/RWStepShape/RWStepShape_RWClosedShell.cxx
Executable file
83
src/RWStepShape/RWStepShape_RWClosedShell.cxx
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
#include <RWStepShape_RWClosedShell.ixx>
|
||||
#include <StepShape_HArray1OfFace.hxx>
|
||||
#include <StepShape_Face.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ClosedShell.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWClosedShell::RWStepShape_RWClosedShell () {}
|
||||
|
||||
void RWStepShape_RWClosedShell::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ClosedShell)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"closed_shell")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : cfsFaces ---
|
||||
|
||||
Handle(StepShape_HArray1OfFace) aCfsFaces;
|
||||
Handle(StepShape_Face) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"cfs_faces",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aCfsFaces = new StepShape_HArray1OfFace (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"face", ach, STANDARD_TYPE(StepShape_Face), anent2))
|
||||
aCfsFaces->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aCfsFaces);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWClosedShell::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ClosedShell)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field cfsFaces ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbCfsFaces(); i2 ++) {
|
||||
SW.Send(ent->CfsFacesValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWClosedShell::Share(const Handle(StepShape_ClosedShell)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbCfsFaces();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->CfsFacesValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWCompoundShapeRepresentation.cdl
|
||||
-- Created: Fri Dec 28 16:01:59 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWCompoundShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for CompoundShapeRepresentation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
CompoundShapeRepresentation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWCompoundShapeRepresentation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : CompoundShapeRepresentation from StepShape);
|
||||
---Purpose: Reads CompoundShapeRepresentation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: CompoundShapeRepresentation from StepShape);
|
||||
---Purpose: Writes CompoundShapeRepresentation
|
||||
|
||||
Share (me; ent : CompoundShapeRepresentation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWCompoundShapeRepresentation;
|
100
src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx
Executable file
100
src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx
Executable file
@@ -0,0 +1,100 @@
|
||||
// File: RWStepShape_RWCompoundShapeRepresentation.cxx
|
||||
// Created: Fri Dec 28 16:01:59 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWCompoundShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWCompoundShapeRepresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWCompoundShapeRepresentation::RWStepShape_RWCompoundShapeRepresentation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWCompoundShapeRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_CompoundShapeRepresentation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"compound_shape_representation") ) return;
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentation_Name;
|
||||
data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepRepr_RepresentationItem) anIt0;
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
|
||||
aRepresentation_Items->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
|
||||
data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentation_Name,
|
||||
aRepresentation_Items,
|
||||
aRepresentation_ContextOfItems);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWCompoundShapeRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_CompoundShapeRepresentation) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWCompoundShapeRepresentation::Share (const Handle(StepShape_CompoundShapeRepresentation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
||||
iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWConnectedEdgeSet.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWConnectedEdgeSet.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWConnectedEdgeSet.cdl
|
||||
-- Created: Fri Dec 28 16:02:00 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWConnectedEdgeSet from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for ConnectedEdgeSet
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
ConnectedEdgeSet from StepShape
|
||||
|
||||
is
|
||||
Create returns RWConnectedEdgeSet from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : ConnectedEdgeSet from StepShape);
|
||||
---Purpose: Reads ConnectedEdgeSet
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: ConnectedEdgeSet from StepShape);
|
||||
---Purpose: Writes ConnectedEdgeSet
|
||||
|
||||
Share (me; ent : ConnectedEdgeSet from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWConnectedEdgeSet;
|
98
src/RWStepShape/RWStepShape_RWConnectedEdgeSet.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWConnectedEdgeSet.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
// File: RWStepShape_RWConnectedEdgeSet.cxx
|
||||
// Created: Fri Dec 28 16:02:00 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWConnectedEdgeSet.ixx>
|
||||
#include <StepShape_HArray1OfEdge.hxx>
|
||||
#include <StepShape_Edge.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWConnectedEdgeSet
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWConnectedEdgeSet::RWStepShape_RWConnectedEdgeSet ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedEdgeSet::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ConnectedEdgeSet) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"connected_edge_set") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Own fields of ConnectedEdgeSet
|
||||
|
||||
Handle(StepShape_HArray1OfEdge) aCesEdges;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "ces_edges", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aCesEdges = new StepShape_HArray1OfEdge (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepShape_Edge) anIt0;
|
||||
data->ReadEntity (num2, i0, "ces_edges", ach, STANDARD_TYPE(StepShape_Edge), anIt0);
|
||||
aCesEdges->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aCesEdges);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedEdgeSet::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ConnectedEdgeSet) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Own fields of ConnectedEdgeSet
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->CesEdges()->Length(); i1++ ) {
|
||||
Handle(StepShape_Edge) Var0 = ent->CesEdges()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedEdgeSet::Share (const Handle(StepShape_ConnectedEdgeSet) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Own fields of ConnectedEdgeSet
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->CesEdges()->Length(); i1++ ) {
|
||||
Handle(StepShape_Edge) Var0 = ent->CesEdges()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWConnectedFaceSet.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWConnectedFaceSet.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ConnectedFaceSet.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWConnectedFaceSet from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ConnectedFaceSet
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ConnectedFaceSet from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWConnectedFaceSet;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ConnectedFaceSet from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ConnectedFaceSet from StepShape);
|
||||
|
||||
Share(me; ent : ConnectedFaceSet from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWConnectedFaceSet;
|
83
src/RWStepShape/RWStepShape_RWConnectedFaceSet.cxx
Executable file
83
src/RWStepShape/RWStepShape_RWConnectedFaceSet.cxx
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
#include <RWStepShape_RWConnectedFaceSet.ixx>
|
||||
#include <StepShape_HArray1OfFace.hxx>
|
||||
#include <StepShape_Face.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ConnectedFaceSet.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWConnectedFaceSet::RWStepShape_RWConnectedFaceSet () {}
|
||||
|
||||
void RWStepShape_RWConnectedFaceSet::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ConnectedFaceSet)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"connected_face_set")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : cfsFaces ---
|
||||
|
||||
Handle(StepShape_HArray1OfFace) aCfsFaces;
|
||||
Handle(StepShape_Face) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"cfs_faces",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aCfsFaces = new StepShape_HArray1OfFace (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"face", ach, STANDARD_TYPE(StepShape_Face), anent2))
|
||||
aCfsFaces->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aCfsFaces);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWConnectedFaceSet::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ConnectedFaceSet)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : cfsFaces ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbCfsFaces(); i2 ++) {
|
||||
SW.Send(ent->CfsFacesValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWConnectedFaceSet::Share(const Handle(StepShape_ConnectedFaceSet)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbCfsFaces();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->CfsFacesValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWConnectedFaceShapeRepresentation.cdl
|
||||
-- Created: Fri Dec 28 16:02:00 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWConnectedFaceShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for ConnectedFaceShapeRepresentation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
ConnectedFaceShapeRepresentation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWConnectedFaceShapeRepresentation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : ConnectedFaceShapeRepresentation from StepShape);
|
||||
---Purpose: Reads ConnectedFaceShapeRepresentation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: ConnectedFaceShapeRepresentation from StepShape);
|
||||
---Purpose: Writes ConnectedFaceShapeRepresentation
|
||||
|
||||
Share (me; ent : ConnectedFaceShapeRepresentation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWConnectedFaceShapeRepresentation;
|
100
src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx
Executable file
100
src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx
Executable file
@@ -0,0 +1,100 @@
|
||||
// File: RWStepShape_RWConnectedFaceShapeRepresentation.cxx
|
||||
// Created: Fri Dec 28 16:02:01 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWConnectedFaceShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWConnectedFaceShapeRepresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWConnectedFaceShapeRepresentation::RWStepShape_RWConnectedFaceShapeRepresentation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceShapeRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ConnectedFaceShapeRepresentation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"connected_face_shape_representation") ) return;
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentation_Name;
|
||||
data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepRepr_RepresentationItem) anIt0;
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
|
||||
aRepresentation_Items->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
|
||||
data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentation_Name,
|
||||
aRepresentation_Items,
|
||||
aRepresentation_ContextOfItems);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceShapeRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ConnectedFaceShapeRepresentation) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceShapeRepresentation::Share (const Handle(StepShape_ConnectedFaceShapeRepresentation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
||||
iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWConnectedFaceSubSet.cdl
|
||||
-- Created: Fri Jan 4 17:42:43 2002
|
||||
-- Author: data exchange team
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWConnectedFaceSubSet from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for ConnectedFaceSubSet
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
ConnectedFaceSubSet from StepShape
|
||||
|
||||
is
|
||||
Create returns RWConnectedFaceSubSet from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : ConnectedFaceSubSet from StepShape);
|
||||
---Purpose: Reads ConnectedFaceSubSet
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: ConnectedFaceSubSet from StepShape);
|
||||
---Purpose: Writes ConnectedFaceSubSet
|
||||
|
||||
Share (me; ent : ConnectedFaceSubSet from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWConnectedFaceSubSet;
|
112
src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx
Executable file
112
src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx
Executable file
@@ -0,0 +1,112 @@
|
||||
// File: RWStepShape_RWConnectedFaceSubSet.cxx
|
||||
// Created: Fri Jan 4 17:42:43 2002
|
||||
// Author: data exchange team
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWConnectedFaceSubSet.ixx>
|
||||
#include <StepShape_HArray1OfFace.hxx>
|
||||
#include <StepShape_Face.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWConnectedFaceSubSet
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWConnectedFaceSubSet::RWStepShape_RWConnectedFaceSubSet ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceSubSet::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ConnectedFaceSubSet) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"connected_face_sub_set") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Inherited fields of ConnectedFaceSet
|
||||
|
||||
Handle(StepShape_HArray1OfFace) aConnectedFaceSet_CfsFaces;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "connected_face_set.cfs_faces", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aConnectedFaceSet_CfsFaces = new StepShape_HArray1OfFace (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepShape_Face) anIt0;
|
||||
data->ReadEntity (num2, i0, "connected_face_set.cfs_faces", ach, STANDARD_TYPE(StepShape_Face), anIt0);
|
||||
aConnectedFaceSet_CfsFaces->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
// Own fields of ConnectedFaceSubSet
|
||||
|
||||
Handle(StepShape_ConnectedFaceSet) aParentFaceSet;
|
||||
data->ReadEntity (num, 3, "parent_face_set", ach, STANDARD_TYPE(StepShape_ConnectedFaceSet), aParentFaceSet);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aConnectedFaceSet_CfsFaces,
|
||||
aParentFaceSet);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceSubSet::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ConnectedFaceSubSet) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Inherited fields of ConnectedFaceSet
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepShape_ConnectedFaceSet::CfsFaces()->Length(); i1++ ) {
|
||||
Handle(StepShape_Face) Var0 = ent->StepShape_ConnectedFaceSet::CfsFaces()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// Own fields of ConnectedFaceSubSet
|
||||
|
||||
SW.Send (ent->ParentFaceSet());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWConnectedFaceSubSet::Share (const Handle(StepShape_ConnectedFaceSubSet) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Inherited fields of ConnectedFaceSet
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepShape_ConnectedFaceSet::CfsFaces()->Length(); i1++ ) {
|
||||
Handle(StepShape_Face) Var0 = ent->StepShape_ConnectedFaceSet::CfsFaces()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
||||
// Own fields of ConnectedFaceSubSet
|
||||
|
||||
iter.AddItem (ent->ParentFaceSet());
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ContextDependentShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWContextDependentShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ContextDependentShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ContextDependentShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWContextDependentShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer; ach : in out Check;
|
||||
ent : mutable ContextDependentShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ContextDependentShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : ContextDependentShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWContextDependentShapeRepresentation;
|
81
src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx
Executable file
81
src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx
Executable file
@@ -0,0 +1,81 @@
|
||||
|
||||
#include <RWStepShape_RWContextDependentShapeRepresentation.ixx>
|
||||
#include <StepRepr_ShapeRepresentationRelationship.hxx>
|
||||
#include <StepRepr_ProductDefinitionShape.hxx>
|
||||
// pour Share
|
||||
#include <StepShape_ShapeDefinitionRepresentation.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ContextDependentShapeRepresentation.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWContextDependentShapeRepresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWContextDependentShapeRepresentation::RWStepShape_RWContextDependentShapeRepresentation()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWContextDependentShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ContextDependentShapeRepresentation)& ent) const
|
||||
{
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"context_dependent_shape_representation")) return;
|
||||
|
||||
// --- own field : representation_relation ---
|
||||
|
||||
Handle(StepRepr_ShapeRepresentationRelationship) aRepRel;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadEntity(num, 1,"representation_relation", ach, STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship), aRepRel);
|
||||
|
||||
// --- own field : represented_product_relation ---
|
||||
|
||||
Handle(StepRepr_ProductDefinitionShape) aProRel;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"represented_product_relation", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProRel);
|
||||
|
||||
ent->Init(aRepRel, aProRel);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWContextDependentShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ContextDependentShapeRepresentation)& ent) const
|
||||
{
|
||||
SW.Send(ent->RepresentationRelation());
|
||||
SW.Send(ent->RepresentedProductRelation());
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWContextDependentShapeRepresentation::Share
|
||||
(const Handle(StepShape_ContextDependentShapeRepresentation)& ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
iter.AddItem(ent->RepresentationRelation());
|
||||
iter.AddItem(ent->RepresentedProductRelation());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CsgShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCsgShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for CsgShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CsgShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCsgShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CsgShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CsgShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : CsgShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWCsgShapeRepresentation;
|
98
src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWCsgShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_CsgShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWCsgShapeRepresentation::RWStepShape_RWCsgShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWCsgShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_CsgShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"csg_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWCsgShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_CsgShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWCsgShapeRepresentation::Share(const Handle(StepShape_CsgShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWCsgSolid.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWCsgSolid.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CsgSolid.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCsgSolid from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for CsgSolid
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CsgSolid from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCsgSolid;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CsgSolid from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CsgSolid from StepShape);
|
||||
|
||||
Share(me; ent : CsgSolid from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWCsgSolid;
|
73
src/RWStepShape/RWStepShape_RWCsgSolid.cxx
Executable file
73
src/RWStepShape/RWStepShape_RWCsgSolid.cxx
Executable file
@@ -0,0 +1,73 @@
|
||||
|
||||
#include <RWStepShape_RWCsgSolid.ixx>
|
||||
#include <StepShape_CsgSelect.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_CsgSolid.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWCsgSolid::RWStepShape_RWCsgSolid () {}
|
||||
|
||||
void RWStepShape_RWCsgSolid::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_CsgSolid)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"csg_solid")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : treeRootExpression (Select Type) ---
|
||||
// Meme problem que pour la classe RWStepShape_RWBooleanResult
|
||||
|
||||
//StepShape_CsgSelect aTreeRootExpression;
|
||||
//Standard_Boolean stat2;
|
||||
//stat2 = data->ReadEntity(num,2,"tree_root_expression",ach,aTreeRootExpression);
|
||||
|
||||
Handle(StepShape_BooleanResult) aBooleanResult;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"tree_root_expression",ach, STANDARD_TYPE(StepShape_BooleanResult), aBooleanResult);
|
||||
StepShape_CsgSelect aTreeRootExpression;
|
||||
aTreeRootExpression.SetBooleanResult(aBooleanResult);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aTreeRootExpression);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWCsgSolid::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_CsgSolid)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : treeRootExpression ---
|
||||
// idem ...
|
||||
|
||||
SW.Send(ent->TreeRootExpression().BooleanResult());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWCsgSolid::Share(const Handle(StepShape_CsgSolid)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
// idem ...
|
||||
iter.GetOneItem(ent->TreeRootExpression().BooleanResult());
|
||||
}
|
||||
|
@@ -0,0 +1,27 @@
|
||||
-- File: RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cdl
|
||||
-- Created: Tue Jul 11 19:02:37 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Copyright: Matra-Datavision 2000
|
||||
|
||||
class RWDefinitionalRepresentationAndShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ConversionBasedUnitAndLengthUnit
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
DefinitionalRepresentationAndShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWDefinitionalRepresentationAndShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable DefinitionalRepresentationAndShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : DefinitionalRepresentationAndShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : DefinitionalRepresentationAndShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWDefinitionalRepresentationAndShapeRepresentation;
|
@@ -0,0 +1,107 @@
|
||||
|
||||
#include <RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.ixx>
|
||||
#include <StepShape_DefinitionalRepresentationAndShapeRepresentation.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
|
||||
RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation::RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DefinitionalRepresentationAndShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
// skip definitional_representation
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
|
||||
// --- Instance of plex componant definitional_representation ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
// skip shape_representation
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DefinitionalRepresentationAndShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant ConversionBasedUnit ---
|
||||
|
||||
SW.StartEntity("DEFINITIONAL_REPRESENTATION");
|
||||
|
||||
SW.StartEntity("REPRESENTATION");
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
|
||||
// --- Instance of plex componant LengthUnit ---
|
||||
|
||||
SW.StartEntity("SHAPE_REPRESENTATION");
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation::Share(const Handle(StepShape_DefinitionalRepresentationAndShapeRepresentation)& ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWDimensionalCharacteristicRepresentation.cdl
|
||||
-- Created: Tue Apr 18 16:42:58 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWDimensionalCharacteristicRepresentation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for DimensionalCharacteristicRepresentation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
DimensionalCharacteristicRepresentation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWDimensionalCharacteristicRepresentation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : DimensionalCharacteristicRepresentation from StepShape);
|
||||
---Purpose: Reads DimensionalCharacteristicRepresentation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: DimensionalCharacteristicRepresentation from StepShape);
|
||||
---Purpose: Writes DimensionalCharacteristicRepresentation
|
||||
|
||||
Share (me; ent : DimensionalCharacteristicRepresentation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWDimensionalCharacteristicRepresentation;
|
74
src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx
Executable file
74
src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx
Executable file
@@ -0,0 +1,74 @@
|
||||
// File: RWStepShape_RWDimensionalCharacteristicRepresentation.cxx
|
||||
// Created: Tue Apr 18 16:42:58 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWDimensionalCharacteristicRepresentation.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWDimensionalCharacteristicRepresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWDimensionalCharacteristicRepresentation::RWStepShape_RWDimensionalCharacteristicRepresentation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalCharacteristicRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"dimensional_characteristic_representation") ) return;
|
||||
|
||||
// Own fields of DimensionalCharacteristicRepresentation
|
||||
|
||||
StepShape_DimensionalCharacteristic aDimension;
|
||||
data->ReadEntity (num, 1, "dimension", ach, aDimension);
|
||||
|
||||
Handle(StepShape_ShapeDimensionRepresentation) aRepresentation;
|
||||
data->ReadEntity (num, 2, "representation", ach, STANDARD_TYPE(StepShape_ShapeDimensionRepresentation), aRepresentation);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aDimension,
|
||||
aRepresentation);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalCharacteristicRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent) const
|
||||
{
|
||||
|
||||
// Own fields of DimensionalCharacteristicRepresentation
|
||||
|
||||
SW.Send (ent->Dimension().Value());
|
||||
|
||||
SW.Send (ent->Representation());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalCharacteristicRepresentation::Share (const Handle(StepShape_DimensionalCharacteristicRepresentation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Own fields of DimensionalCharacteristicRepresentation
|
||||
|
||||
iter.AddItem (ent->Dimension().Value());
|
||||
|
||||
iter.AddItem (ent->Representation());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWDimensionalLocation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWDimensionalLocation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWDimensionalLocation.cdl
|
||||
-- Created: Tue Apr 18 16:42:58 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWDimensionalLocation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for DimensionalLocation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
DimensionalLocation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWDimensionalLocation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : DimensionalLocation from StepShape);
|
||||
---Purpose: Reads DimensionalLocation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: DimensionalLocation from StepShape);
|
||||
---Purpose: Writes DimensionalLocation
|
||||
|
||||
Share (me; ent : DimensionalLocation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWDimensionalLocation;
|
96
src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx
Executable file
96
src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx
Executable file
@@ -0,0 +1,96 @@
|
||||
// File: RWStepShape_RWDimensionalLocation.cxx
|
||||
// Created: Tue Apr 18 16:42:58 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWDimensionalLocation.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWDimensionalLocation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWDimensionalLocation::RWStepShape_RWDimensionalLocation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DimensionalLocation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,4,ach,"dimensional_location") ) return;
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Name;
|
||||
data->ReadString (num, 1, "shape_aspect_relationship.name", ach, aShapeAspectRelationship_Name);
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Description;
|
||||
Standard_Boolean hasShapeAspectRelationship_Description = Standard_True;
|
||||
if ( data->IsParamDefined (num,2) ) {
|
||||
data->ReadString (num, 2, "shape_aspect_relationship.description", ach, aShapeAspectRelationship_Description);
|
||||
}
|
||||
else {
|
||||
hasShapeAspectRelationship_Description = Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatingShapeAspect;
|
||||
data->ReadEntity (num, 3, "shape_aspect_relationship.relating_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatingShapeAspect);
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatedShapeAspect;
|
||||
data->ReadEntity (num, 4, "shape_aspect_relationship.related_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatedShapeAspect);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aShapeAspectRelationship_Name,
|
||||
hasShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_RelatingShapeAspect,
|
||||
aShapeAspectRelationship_RelatedShapeAspect);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DimensionalLocation) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Name());
|
||||
|
||||
if ( ent->StepRepr_ShapeAspectRelationship::HasDescription() ) {
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Description());
|
||||
}
|
||||
else SW.SendUndef();
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocation::Share (const Handle(StepShape_DimensionalLocation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWDimensionalLocationWithPath.cdl
|
||||
-- Created: Tue Apr 18 16:42:58 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWDimensionalLocationWithPath from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for DimensionalLocationWithPath
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
DimensionalLocationWithPath from StepShape
|
||||
|
||||
is
|
||||
Create returns RWDimensionalLocationWithPath from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : DimensionalLocationWithPath from StepShape);
|
||||
---Purpose: Reads DimensionalLocationWithPath
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: DimensionalLocationWithPath from StepShape);
|
||||
---Purpose: Writes DimensionalLocationWithPath
|
||||
|
||||
Share (me; ent : DimensionalLocationWithPath from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWDimensionalLocationWithPath;
|
110
src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx
Executable file
110
src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx
Executable file
@@ -0,0 +1,110 @@
|
||||
// File: RWStepShape_RWDimensionalLocationWithPath.cxx
|
||||
// Created: Tue Apr 18 16:42:58 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWDimensionalLocationWithPath.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWDimensionalLocationWithPath
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWDimensionalLocationWithPath::RWStepShape_RWDimensionalLocationWithPath ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocationWithPath::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DimensionalLocationWithPath) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,5,ach,"dimensional_location_with_path") ) return;
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Name;
|
||||
data->ReadString (num, 1, "shape_aspect_relationship.name", ach, aShapeAspectRelationship_Name);
|
||||
|
||||
Handle(TCollection_HAsciiString) aShapeAspectRelationship_Description;
|
||||
Standard_Boolean hasShapeAspectRelationship_Description = Standard_True;
|
||||
if ( data->IsParamDefined (num,2) ) {
|
||||
data->ReadString (num, 2, "shape_aspect_relationship.description", ach, aShapeAspectRelationship_Description);
|
||||
}
|
||||
else {
|
||||
hasShapeAspectRelationship_Description = Standard_False;
|
||||
}
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatingShapeAspect;
|
||||
data->ReadEntity (num, 3, "shape_aspect_relationship.relating_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatingShapeAspect);
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatedShapeAspect;
|
||||
data->ReadEntity (num, 4, "shape_aspect_relationship.related_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatedShapeAspect);
|
||||
|
||||
// Own fields of DimensionalLocationWithPath
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aPath;
|
||||
data->ReadEntity (num, 5, "path", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aPath);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aShapeAspectRelationship_Name,
|
||||
hasShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_Description,
|
||||
aShapeAspectRelationship_RelatingShapeAspect,
|
||||
aShapeAspectRelationship_RelatedShapeAspect,
|
||||
aPath);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocationWithPath::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DimensionalLocationWithPath) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Name());
|
||||
|
||||
if ( ent->StepRepr_ShapeAspectRelationship::HasDescription() ) {
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::Description());
|
||||
}
|
||||
else SW.SendUndef();
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
|
||||
// Own fields of DimensionalLocationWithPath
|
||||
|
||||
SW.Send (ent->Path());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalLocationWithPath::Share (const Handle(StepShape_DimensionalLocationWithPath) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of ShapeAspectRelationship
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect());
|
||||
|
||||
iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect());
|
||||
|
||||
// Own fields of DimensionalLocationWithPath
|
||||
|
||||
iter.AddItem (ent->Path());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWDimensionalSize.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWDimensionalSize.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWDimensionalSize.cdl
|
||||
-- Created: Tue Apr 18 16:42:58 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWDimensionalSize from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for DimensionalSize
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
DimensionalSize from StepShape
|
||||
|
||||
is
|
||||
Create returns RWDimensionalSize from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : DimensionalSize from StepShape);
|
||||
---Purpose: Reads DimensionalSize
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: DimensionalSize from StepShape);
|
||||
---Purpose: Writes DimensionalSize
|
||||
|
||||
Share (me; ent : DimensionalSize from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWDimensionalSize;
|
72
src/RWStepShape/RWStepShape_RWDimensionalSize.cxx
Executable file
72
src/RWStepShape/RWStepShape_RWDimensionalSize.cxx
Executable file
@@ -0,0 +1,72 @@
|
||||
// File: RWStepShape_RWDimensionalSize.cxx
|
||||
// Created: Tue Apr 18 16:42:58 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWDimensionalSize.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWDimensionalSize
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWDimensionalSize::RWStepShape_RWDimensionalSize ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSize::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DimensionalSize) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"dimensional_size") ) return;
|
||||
|
||||
// Own fields of DimensionalSize
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aAppliesTo;
|
||||
data->ReadEntity (num, 1, "applies_to", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aAppliesTo);
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
data->ReadString (num, 2, "name", ach, aName);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aAppliesTo,
|
||||
aName);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSize::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DimensionalSize) &ent) const
|
||||
{
|
||||
|
||||
// Own fields of DimensionalSize
|
||||
|
||||
SW.Send (ent->AppliesTo());
|
||||
|
||||
SW.Send (ent->Name());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSize::Share (const Handle(StepShape_DimensionalSize) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Own fields of DimensionalSize
|
||||
|
||||
iter.AddItem (ent->AppliesTo());
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWDimensionalSizeWithPath.cdl
|
||||
-- Created: Tue Apr 18 16:42:58 2000
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWDimensionalSizeWithPath from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for DimensionalSizeWithPath
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
DimensionalSizeWithPath from StepShape
|
||||
|
||||
is
|
||||
Create returns RWDimensionalSizeWithPath from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : DimensionalSizeWithPath from StepShape);
|
||||
---Purpose: Reads DimensionalSizeWithPath
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: DimensionalSizeWithPath from StepShape);
|
||||
---Purpose: Writes DimensionalSizeWithPath
|
||||
|
||||
Share (me; ent : DimensionalSizeWithPath from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWDimensionalSizeWithPath;
|
86
src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx
Executable file
86
src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx
Executable file
@@ -0,0 +1,86 @@
|
||||
// File: RWStepShape_RWDimensionalSizeWithPath.cxx
|
||||
// Created: Tue Apr 18 16:42:58 2000
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepShape_RWDimensionalSizeWithPath.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWDimensionalSizeWithPath
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWDimensionalSizeWithPath::RWStepShape_RWDimensionalSizeWithPath ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSizeWithPath::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_DimensionalSizeWithPath) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"dimensional_size_with_path") ) return;
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aDimensionalSize_AppliesTo;
|
||||
data->ReadEntity (num, 1, "dimensional_size.applies_to", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aDimensionalSize_AppliesTo);
|
||||
|
||||
Handle(TCollection_HAsciiString) aDimensionalSize_Name;
|
||||
data->ReadString (num, 2, "dimensional_size.name", ach, aDimensionalSize_Name);
|
||||
|
||||
// Own fields of DimensionalSizeWithPath
|
||||
|
||||
Handle(StepRepr_ShapeAspect) aPath;
|
||||
data->ReadEntity (num, 3, "path", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aPath);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aDimensionalSize_AppliesTo,
|
||||
aDimensionalSize_Name,
|
||||
aPath);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSizeWithPath::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_DimensionalSizeWithPath) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
SW.Send (ent->StepShape_DimensionalSize::AppliesTo());
|
||||
|
||||
SW.Send (ent->StepShape_DimensionalSize::Name());
|
||||
|
||||
// Own fields of DimensionalSizeWithPath
|
||||
|
||||
SW.Send (ent->Path());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWDimensionalSizeWithPath::Share (const Handle(StepShape_DimensionalSizeWithPath) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of DimensionalSize
|
||||
|
||||
iter.AddItem (ent->StepShape_DimensionalSize::AppliesTo());
|
||||
|
||||
// Own fields of DimensionalSizeWithPath
|
||||
|
||||
iter.AddItem (ent->Path());
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWEdge.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWEdge.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Edge.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWEdge from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for Edge
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Edge from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWEdge;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Edge from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Edge from StepShape);
|
||||
|
||||
Share(me; ent : Edge from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWEdge;
|
78
src/RWStepShape/RWStepShape_RWEdge.cxx
Executable file
78
src/RWStepShape/RWStepShape_RWEdge.cxx
Executable file
@@ -0,0 +1,78 @@
|
||||
|
||||
#include <RWStepShape_RWEdge.ixx>
|
||||
#include <StepShape_Vertex.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_Edge.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWEdge::RWStepShape_RWEdge () {}
|
||||
|
||||
void RWStepShape_RWEdge::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_Edge)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"edge")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : edgeStart ---
|
||||
|
||||
Handle(StepShape_Vertex) aEdgeStart;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"edge_start", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeStart);
|
||||
|
||||
// --- own field : edgeEnd ---
|
||||
|
||||
Handle(StepShape_Vertex) aEdgeEnd;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"edge_end", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeEnd);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aEdgeStart, aEdgeEnd);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWEdge::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_Edge)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : edgeStart ---
|
||||
|
||||
SW.Send(ent->EdgeStart());
|
||||
|
||||
// --- own field : edgeEnd ---
|
||||
|
||||
SW.Send(ent->EdgeEnd());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWEdge::Share(const Handle(StepShape_Edge)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->EdgeStart());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->EdgeEnd());
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWEdgeBasedWireframeModel.cdl
|
||||
-- Created: Fri Dec 28 16:02:01 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWEdgeBasedWireframeModel from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for EdgeBasedWireframeModel
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
EdgeBasedWireframeModel from StepShape
|
||||
|
||||
is
|
||||
Create returns RWEdgeBasedWireframeModel from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : EdgeBasedWireframeModel from StepShape);
|
||||
---Purpose: Reads EdgeBasedWireframeModel
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: EdgeBasedWireframeModel from StepShape);
|
||||
---Purpose: Writes EdgeBasedWireframeModel
|
||||
|
||||
Share (me; ent : EdgeBasedWireframeModel from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWEdgeBasedWireframeModel;
|
98
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
// File: RWStepShape_RWEdgeBasedWireframeModel.cxx
|
||||
// Created: Fri Dec 28 16:02:01 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWEdgeBasedWireframeModel.ixx>
|
||||
#include <StepShape_HArray1OfConnectedEdgeSet.hxx>
|
||||
#include <StepShape_ConnectedEdgeSet.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWEdgeBasedWireframeModel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWEdgeBasedWireframeModel::RWStepShape_RWEdgeBasedWireframeModel ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeModel::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_EdgeBasedWireframeModel) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"edge_based_wireframe_model") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Own fields of EdgeBasedWireframeModel
|
||||
|
||||
Handle(StepShape_HArray1OfConnectedEdgeSet) aEbwmBoundary;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "ebwm_boundary", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aEbwmBoundary = new StepShape_HArray1OfConnectedEdgeSet (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepShape_ConnectedEdgeSet) anIt0;
|
||||
data->ReadEntity (num2, i0, "ebwm_boundary", ach, STANDARD_TYPE(StepShape_ConnectedEdgeSet), anIt0);
|
||||
aEbwmBoundary->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aEbwmBoundary);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeModel::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_EdgeBasedWireframeModel) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Own fields of EdgeBasedWireframeModel
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->EbwmBoundary()->Length(); i1++ ) {
|
||||
Handle(StepShape_ConnectedEdgeSet) Var0 = ent->EbwmBoundary()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeModel::Share (const Handle(StepShape_EdgeBasedWireframeModel) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Own fields of EdgeBasedWireframeModel
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->EbwmBoundary()->Length(); i1++ ) {
|
||||
Handle(StepShape_ConnectedEdgeSet) Var0 = ent->EbwmBoundary()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
}
|
35
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cdl
|
||||
-- Created: Fri Dec 28 16:02:01 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWEdgeBasedWireframeShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for EdgeBasedWireframeShapeRepresentation
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
EdgeBasedWireframeShapeRepresentation from StepShape
|
||||
|
||||
is
|
||||
Create returns RWEdgeBasedWireframeShapeRepresentation from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : EdgeBasedWireframeShapeRepresentation from StepShape);
|
||||
---Purpose: Reads EdgeBasedWireframeShapeRepresentation
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: EdgeBasedWireframeShapeRepresentation from StepShape);
|
||||
---Purpose: Writes EdgeBasedWireframeShapeRepresentation
|
||||
|
||||
Share (me; ent : EdgeBasedWireframeShapeRepresentation from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWEdgeBasedWireframeShapeRepresentation;
|
100
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx
Executable file
100
src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx
Executable file
@@ -0,0 +1,100 @@
|
||||
// File: RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx
|
||||
// Created: Fri Dec 28 16:02:01 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWEdgeBasedWireframeShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWEdgeBasedWireframeShapeRepresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWEdgeBasedWireframeShapeRepresentation::RWStepShape_RWEdgeBasedWireframeShapeRepresentation ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeShapeRepresentation::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_EdgeBasedWireframeShapeRepresentation) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,3,ach,"edge_based_wireframe_shape_representation") ) return;
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentation_Name;
|
||||
data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepRepr_RepresentationItem) anIt0;
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
|
||||
aRepresentation_Items->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
|
||||
data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentation_Name,
|
||||
aRepresentation_Items,
|
||||
aRepresentation_ContextOfItems);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeShapeRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_EdgeBasedWireframeShapeRepresentation) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
SW.Send (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWEdgeBasedWireframeShapeRepresentation::Share (const Handle(StepShape_EdgeBasedWireframeShapeRepresentation) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
||||
iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
|
||||
}
|
33
src/RWStepShape/RWStepShape_RWEdgeCurve.cdl
Executable file
33
src/RWStepShape/RWStepShape_RWEdgeCurve.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: EdgeCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWEdgeCurve from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for EdgeCurve
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
EdgeCurve from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWEdgeCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable EdgeCurve from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : EdgeCurve from StepShape);
|
||||
|
||||
Share(me; ent : EdgeCurve from StepShape; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : EdgeCurve from StepShape; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWEdgeCurve;
|
283
src/RWStepShape/RWStepShape_RWEdgeCurve.cxx
Executable file
283
src/RWStepShape/RWStepShape_RWEdgeCurve.cxx
Executable file
@@ -0,0 +1,283 @@
|
||||
#include <RWStepShape_RWEdgeCurve.ixx>
|
||||
#include <StepGeom_Curve.hxx>
|
||||
#include <StepShape_Vertex.hxx>
|
||||
#include <StepShape_OrientedEdge.hxx>
|
||||
#include <StepShape_FaceBound.hxx>
|
||||
#include <StepShape_VertexPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <StepShape_EdgeCurve.hxx>
|
||||
#include <StepShape_EdgeLoop.hxx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWEdgeCurve::RWStepShape_RWEdgeCurve () {}
|
||||
|
||||
void RWStepShape_RWEdgeCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_EdgeCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"edge_curve")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : edgeStart ---
|
||||
|
||||
Handle(StepShape_Vertex) aEdgeStart;
|
||||
data->ReadEntity(num, 2,"edge_start", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeStart);
|
||||
|
||||
// --- inherited field : edgeEnd ---
|
||||
|
||||
Handle(StepShape_Vertex) aEdgeEnd;
|
||||
data->ReadEntity(num, 3,"edge_end", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeEnd);
|
||||
|
||||
// --- own field : edgeGeometry ---
|
||||
|
||||
Handle(StepGeom_Curve) aEdgeGeometry;
|
||||
data->ReadEntity(num, 4,"edge_geometry", ach, STANDARD_TYPE(StepGeom_Curve), aEdgeGeometry);
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
Standard_Boolean aSameSense;
|
||||
data->ReadBoolean (num,5,"same_sense",ach,aSameSense);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aEdgeStart, aEdgeEnd, aEdgeGeometry, aSameSense);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWEdgeCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_EdgeCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field edgeStart ---
|
||||
|
||||
SW.Send(ent->EdgeStart());
|
||||
|
||||
// --- inherited field edgeEnd ---
|
||||
|
||||
SW.Send(ent->EdgeEnd());
|
||||
|
||||
// --- own field : edgeGeometry ---
|
||||
|
||||
SW.Send(ent->EdgeGeometry());
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
SW.SendBoolean(ent->SameSense());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWEdgeCurve::Share(const Handle(StepShape_EdgeCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->EdgeStart());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->EdgeEnd());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->EdgeGeometry());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepShape_RWEdgeCurve::Check
|
||||
(const Handle(StepShape_EdgeCurve)& ent,
|
||||
const Interface_ShareTool& aShto,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
// cout << "------ calling CheckEdgeCurve ------" << endl;
|
||||
|
||||
Handle(StepShape_OrientedEdge) theOE1, theOE2;
|
||||
Handle(StepShape_FaceBound) theFOB1, theFOB2;
|
||||
//Handle(StepShape_FaceSurface) theFS1, theFS2;
|
||||
|
||||
Standard_Boolean theOEOri1 = Standard_True;
|
||||
Standard_Boolean theOEOri2 = Standard_True;
|
||||
Standard_Boolean theFBOri1 = Standard_True;
|
||||
Standard_Boolean theFBOri2 = Standard_True;
|
||||
//Standard_Boolean theFSOri1 = Standard_True;
|
||||
//Standard_Boolean theFSOri2 = Standard_True;
|
||||
Standard_Boolean Cumulated1, Cumulated2;
|
||||
|
||||
// 1- First Vertex != LastVertex but First VertexPoint == Last VertexPoint
|
||||
// Remark : time comsuming process but useful !
|
||||
// If this append, we can drop one of the two vertices and replace it
|
||||
// everywhere it is referenced. Side effect : tolerance problem !!!
|
||||
|
||||
Handle(StepShape_VertexPoint) StartVertex =
|
||||
Handle(StepShape_VertexPoint)::DownCast(ent->EdgeStart());
|
||||
Handle(StepShape_VertexPoint) EndVertex =
|
||||
Handle(StepShape_VertexPoint)::DownCast(ent->EdgeEnd());
|
||||
|
||||
if (StartVertex != EndVertex) {
|
||||
|
||||
Handle(StepGeom_CartesianPoint) StartPoint =
|
||||
Handle(StepGeom_CartesianPoint)::DownCast(StartVertex->VertexGeometry());
|
||||
Handle(StepGeom_CartesianPoint) EndPoint =
|
||||
Handle(StepGeom_CartesianPoint)::DownCast(EndVertex->VertexGeometry());
|
||||
|
||||
// it can also be a degenerated pcurve
|
||||
|
||||
if (!StartPoint.IsNull() && !EndPoint.IsNull()) {
|
||||
Standard_Real Dist = Sqrt
|
||||
((StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) *
|
||||
(StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) +
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) *
|
||||
(StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) +
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)) *
|
||||
(StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)));
|
||||
if (Dist < Precision::Confusion() ) {
|
||||
ach->AddWarning("Two instances of Vertex have equal (within uncertainty) coordinates");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2- Two-Manifold Topology
|
||||
|
||||
Standard_Boolean sharEC = aShto.IsShared(ent);
|
||||
Standard_Integer nbRef;
|
||||
if(!sharEC){
|
||||
ach->AddFail("ERROR: EdgeCurve not referenced");
|
||||
}
|
||||
else {
|
||||
Interface_EntityIterator myShRef = aShto.Sharings(ent);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_OrientedEdge),Standard_True);
|
||||
nbRef = myShRef.NbEntities();
|
||||
if (nbRef ==2) {
|
||||
theOE1 = Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value());
|
||||
theOEOri1 = theOE1->Orientation();
|
||||
myShRef.Next();
|
||||
theOE2 = Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value());
|
||||
theOEOri2 = theOE2->Orientation();
|
||||
|
||||
// get the FaceBound orientation for theOE1
|
||||
|
||||
Standard_Boolean sharOE1 = aShto.IsShared(theOE1);
|
||||
if(!sharOE1){
|
||||
#ifdef DEB
|
||||
cout << "OrientedEdge1 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_EdgeLoop),Standard_True);
|
||||
nbRef = myShRef.NbEntities();
|
||||
if (nbRef == 1) {
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL1 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL1 = aShto.IsShared(theEL1);
|
||||
if(!sharEL1) {
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop1 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_FaceBound),Standard_True);
|
||||
#ifdef DEB
|
||||
nbRef =
|
||||
#endif
|
||||
myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
theFOB1 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB1.IsNull()) {
|
||||
theFBOri1 = theFOB1->Orientation();
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (nbRef == 0) {
|
||||
#ifdef DEB
|
||||
cout << "OrientedEdge not referenced" << endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (aShto.NbTypedSharings(theOE1,
|
||||
STANDARD_TYPE(StepShape_EdgeLoop)) > 1) {
|
||||
#ifdef DEB
|
||||
cout << "OrientedEdge referenced more than once" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get the FaceBound orientation for theOE2
|
||||
|
||||
Standard_Boolean sharOE2 = aShto.IsShared(theOE2);
|
||||
if(!sharOE2){
|
||||
#ifdef DEB
|
||||
cout << "OrientedEdge2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE2);
|
||||
#ifdef DEB
|
||||
// Standard_Integer nbRef =
|
||||
#endif
|
||||
// unused myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL2 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
|
||||
if(!sharEL2){
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL2);
|
||||
// unused Standard_Integer nbRef = myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
theFOB2 = Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFOB2.IsNull()) {
|
||||
theFBOri2 = theFOB2->Orientation();
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// "cumulate" the FaceBound and the OrientedEdge orientation
|
||||
|
||||
Cumulated1 = theFBOri1 ^ theOEOri1;
|
||||
Cumulated2 = theFBOri2 ^ theOEOri2;
|
||||
|
||||
// the orientation of the OrientedEdges must be opposite
|
||||
|
||||
if (Cumulated1 == Cumulated2) {
|
||||
ach->AddFail("ERROR: non 2-manifold topology");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
33
src/RWStepShape/RWStepShape_RWEdgeLoop.cdl
Executable file
33
src/RWStepShape/RWStepShape_RWEdgeLoop.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: EdgeLoop.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWEdgeLoop from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for EdgeLoop
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
EdgeLoop from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWEdgeLoop;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable EdgeLoop from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : EdgeLoop from StepShape);
|
||||
|
||||
Share(me; ent : EdgeLoop from StepShape; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : EdgeLoop from StepShape; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWEdgeLoop;
|
115
src/RWStepShape/RWStepShape_RWEdgeLoop.cxx
Executable file
115
src/RWStepShape/RWStepShape_RWEdgeLoop.cxx
Executable file
@@ -0,0 +1,115 @@
|
||||
|
||||
#include <RWStepShape_RWEdgeLoop.ixx>
|
||||
|
||||
#include <StepShape_HArray1OfOrientedEdge.hxx>
|
||||
#include <StepShape_OrientedEdge.hxx>
|
||||
|
||||
RWStepShape_RWEdgeLoop::RWStepShape_RWEdgeLoop () {}
|
||||
|
||||
void RWStepShape_RWEdgeLoop::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_EdgeLoop)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"edge_loop")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat0 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : edgeList ---
|
||||
|
||||
Handle(StepShape_HArray1OfOrientedEdge) aEdgeList;
|
||||
Handle(StepShape_OrientedEdge) anent;
|
||||
Standard_Integer nsub1;
|
||||
if (data->ReadSubList (num,2,"edge_list",ach,nsub1)) {
|
||||
Standard_Integer nb1 = data->NbParams(nsub1);
|
||||
aEdgeList = new StepShape_HArray1OfOrientedEdge (1, nb1);
|
||||
for (Standard_Integer i1 = 1; i1 <= nb1; i1 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
if (data->ReadEntity (nsub1, i1,"oriented_edge", ach, STANDARD_TYPE(StepShape_OrientedEdge), anent))
|
||||
aEdgeList->SetValue(i1, anent);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
ent->Init(aName, aEdgeList);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWEdgeLoop::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_EdgeLoop)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : edgeList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1 = 1; i1 <= ent->NbEdgeList(); i1 ++) {
|
||||
SW.Send(ent->EdgeListValue(i1));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Method : Share
|
||||
// ============================================================================
|
||||
|
||||
void RWStepShape_RWEdgeLoop::Share(const Handle(StepShape_EdgeLoop)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbEdgeList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->EdgeListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepShape_RWEdgeLoop::Check
|
||||
(const Handle(StepShape_EdgeLoop)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
// cout << "------ calling CheckEdgeLoop ------" << endl;
|
||||
Standard_Boolean headToTail = Standard_True;
|
||||
//Standard_Boolean noIdentVtx = Standard_True; //szv#4:S4163:12Mar99 unused
|
||||
Standard_Integer nbEdg = ent->NbEdgeList();
|
||||
Handle(StepShape_OrientedEdge) theOE = ent->EdgeListValue(1);
|
||||
Handle(StepShape_Vertex) theVxFrst = theOE->EdgeStart();
|
||||
Handle(StepShape_Vertex) theVxLst = theOE->EdgeEnd();
|
||||
if((nbEdg == 1) && (theVxFrst != theVxLst)){
|
||||
ach->AddFail("Edge loop composed of single Edge : Start and End Vertex of edge are not identical");
|
||||
}
|
||||
for(Standard_Integer i = 2; i <= nbEdg; i++)
|
||||
{
|
||||
theOE = ent->EdgeListValue(i);
|
||||
Handle(StepShape_Vertex) theVxStrt = theOE->EdgeStart();
|
||||
if(theVxStrt != theVxLst){
|
||||
headToTail = Standard_False;
|
||||
}
|
||||
theVxLst = theOE->EdgeEnd();
|
||||
if(theVxStrt == theVxLst){
|
||||
ach->AddWarning("One edge_curve contains identical vertices");
|
||||
}
|
||||
}
|
||||
if(theVxFrst != theVxLst){
|
||||
headToTail = Standard_False;
|
||||
}
|
||||
if(!headToTail) {
|
||||
ach->AddFail("Error : Path does not head to tail");
|
||||
}
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ExtrudedAreaSolid.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWExtrudedAreaSolid from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ExtrudedAreaSolid
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ExtrudedAreaSolid from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWExtrudedAreaSolid;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ExtrudedAreaSolid from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ExtrudedAreaSolid from StepShape);
|
||||
|
||||
Share(me; ent : ExtrudedAreaSolid from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWExtrudedAreaSolid;
|
89
src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx
Executable file
89
src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx
Executable file
@@ -0,0 +1,89 @@
|
||||
|
||||
#include <RWStepShape_RWExtrudedAreaSolid.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CurveBoundedSurface.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ExtrudedAreaSolid.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWExtrudedAreaSolid::RWStepShape_RWExtrudedAreaSolid () {}
|
||||
|
||||
void RWStepShape_RWExtrudedAreaSolid::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ExtrudedAreaSolid)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"extruded_area_solid")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : sweptArea ---
|
||||
|
||||
Handle(StepGeom_CurveBoundedSurface) aSweptArea;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"swept_area", ach, STANDARD_TYPE(StepGeom_CurveBoundedSurface), aSweptArea);
|
||||
|
||||
// --- own field : extrudedDirection ---
|
||||
|
||||
Handle(StepGeom_Direction) aExtrudedDirection;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"extruded_direction", ach, STANDARD_TYPE(StepGeom_Direction), aExtrudedDirection);
|
||||
|
||||
// --- own field : depth ---
|
||||
|
||||
Standard_Real aDepth;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"depth",ach,aDepth);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aSweptArea, aExtrudedDirection, aDepth);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWExtrudedAreaSolid::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ExtrudedAreaSolid)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field sweptArea ---
|
||||
|
||||
SW.Send(ent->SweptArea());
|
||||
|
||||
// --- own field : extrudedDirection ---
|
||||
|
||||
SW.Send(ent->ExtrudedDirection());
|
||||
|
||||
// --- own field : depth ---
|
||||
|
||||
SW.Send(ent->Depth());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWExtrudedAreaSolid::Share(const Handle(StepShape_ExtrudedAreaSolid)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->SweptArea());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ExtrudedDirection());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: RWStepShape_RWExtrudedFaceSolid.cdl
|
||||
-- Created: Mon Mar 15 15:13:10 1999
|
||||
-- Author: data exchange team
|
||||
-- <det@androx.nnov.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1999
|
||||
|
||||
|
||||
class RWExtrudedFaceSolid from RWStepShape
|
||||
|
||||
---Purpose: Read & Write Module for ExtrudedFaceSolid
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ExtrudedFaceSolid from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
Create returns RWExtrudedFaceSolid;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ExtrudedFaceSolid from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ExtrudedFaceSolid from StepShape);
|
||||
|
||||
Share(me; ent : ExtrudedFaceSolid from StepShape; iter : in out EntityIterator);
|
||||
|
||||
|
||||
end RWExtrudedFaceSolid;
|
85
src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx
Executable file
85
src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx
Executable file
@@ -0,0 +1,85 @@
|
||||
|
||||
#include <RWStepShape_RWExtrudedFaceSolid.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepShape_FaceSurface.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ExtrudedFaceSolid.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWExtrudedFaceSolid::RWStepShape_RWExtrudedFaceSolid () {}
|
||||
|
||||
void RWStepShape_RWExtrudedFaceSolid::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ExtrudedFaceSolid)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"extruded_face_solid")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : sweptFace ---
|
||||
|
||||
Handle(StepShape_FaceSurface) aSweptFace;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"swept_face", ach, STANDARD_TYPE(StepShape_FaceSurface), aSweptFace);
|
||||
|
||||
// --- own field : extrudedDirection ---
|
||||
|
||||
Handle(StepGeom_Direction) aExtrudedDirection;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"extruded_direction", ach, STANDARD_TYPE(StepGeom_Direction), aExtrudedDirection);
|
||||
|
||||
// --- own field : depth ---
|
||||
|
||||
Standard_Real aDepth;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"depth",ach,aDepth);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
ent->Init(aName, aSweptFace, aExtrudedDirection, aDepth);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWExtrudedFaceSolid::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ExtrudedFaceSolid)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field sweptFace ---
|
||||
|
||||
SW.Send(ent->SweptFace());
|
||||
|
||||
// --- own field : extrudedDirection ---
|
||||
|
||||
SW.Send(ent->ExtrudedDirection());
|
||||
|
||||
// --- own field : depth ---
|
||||
|
||||
SW.Send(ent->Depth());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWExtrudedFaceSolid::Share(const Handle(StepShape_ExtrudedFaceSolid)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->SweptFace());
|
||||
iter.GetOneItem(ent->ExtrudedDirection());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWFace.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFace.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Face.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFace from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for Face
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Face from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFace;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Face from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Face from StepShape);
|
||||
|
||||
Share(me; ent : Face from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFace;
|
83
src/RWStepShape/RWStepShape_RWFace.cxx
Executable file
83
src/RWStepShape/RWStepShape_RWFace.cxx
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
#include <RWStepShape_RWFace.ixx>
|
||||
#include <StepShape_HArray1OfFaceBound.hxx>
|
||||
#include <StepShape_FaceBound.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_Face.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFace::RWStepShape_RWFace () {}
|
||||
|
||||
void RWStepShape_RWFace::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_Face)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"face")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : bounds ---
|
||||
|
||||
Handle(StepShape_HArray1OfFaceBound) aBounds;
|
||||
Handle(StepShape_FaceBound) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
|
||||
aBounds->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBounds);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFace::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_Face)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : bounds ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbBounds(); i2 ++) {
|
||||
SW.Send(ent->BoundsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFace::Share(const Handle(StepShape_Face)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbBounds();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->BoundsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
35
src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cdl
Executable file
35
src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepShape_RWFaceBasedSurfaceModel.cdl
|
||||
-- Created: Fri Dec 28 16:02:01 2001
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWFaceBasedSurfaceModel from RWStepShape
|
||||
|
||||
---Purpose: Read & Write tool for FaceBasedSurfaceModel
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
FaceBasedSurfaceModel from StepShape
|
||||
|
||||
is
|
||||
Create returns RWFaceBasedSurfaceModel from RWStepShape;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : FaceBasedSurfaceModel from StepShape);
|
||||
---Purpose: Reads FaceBasedSurfaceModel
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: FaceBasedSurfaceModel from StepShape);
|
||||
---Purpose: Writes FaceBasedSurfaceModel
|
||||
|
||||
Share (me; ent : FaceBasedSurfaceModel from StepShape;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWFaceBasedSurfaceModel;
|
98
src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
// File: RWStepShape_RWFaceBasedSurfaceModel.cxx
|
||||
// Created: Fri Dec 28 16:02:01 2001
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepShape_RWFaceBasedSurfaceModel.ixx>
|
||||
#include <StepShape_HArray1OfConnectedFaceSet.hxx>
|
||||
#include <StepShape_ConnectedFaceSet.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWFaceBasedSurfaceModel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWFaceBasedSurfaceModel::RWStepShape_RWFaceBasedSurfaceModel ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWFaceBasedSurfaceModel::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FaceBasedSurfaceModel) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"face_based_surface_model") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Own fields of FaceBasedSurfaceModel
|
||||
|
||||
Handle(StepShape_HArray1OfConnectedFaceSet) aFbsmFaces;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "fbsm_faces", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aFbsmFaces = new StepShape_HArray1OfConnectedFaceSet (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepShape_ConnectedFaceSet) anIt0;
|
||||
data->ReadEntity (num2, i0, "fbsm_faces", ach, STANDARD_TYPE(StepShape_ConnectedFaceSet), anIt0);
|
||||
aFbsmFaces->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aFbsmFaces);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWFaceBasedSurfaceModel::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FaceBasedSurfaceModel) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Own fields of FaceBasedSurfaceModel
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->FbsmFaces()->Length(); i1++ ) {
|
||||
Handle(StepShape_ConnectedFaceSet) Var0 = ent->FbsmFaces()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWFaceBasedSurfaceModel::Share (const Handle(StepShape_FaceBasedSurfaceModel) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Own fields of FaceBasedSurfaceModel
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->FbsmFaces()->Length(); i1++ ) {
|
||||
Handle(StepShape_ConnectedFaceSet) Var0 = ent->FbsmFaces()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
}
|
33
src/RWStepShape/RWStepShape_RWFaceBound.cdl
Executable file
33
src/RWStepShape/RWStepShape_RWFaceBound.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: FaceBound.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFaceBound from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FaceBound
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FaceBound from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFaceBound;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FaceBound from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FaceBound from StepShape);
|
||||
|
||||
Share(me; ent : FaceBound from StepShape; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : FaceBound from StepShape; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWFaceBound;
|
172
src/RWStepShape/RWStepShape_RWFaceBound.cxx
Executable file
172
src/RWStepShape/RWStepShape_RWFaceBound.cxx
Executable file
@@ -0,0 +1,172 @@
|
||||
|
||||
#include <RWStepShape_RWFaceBound.ixx>
|
||||
#include <StepShape_Loop.hxx>
|
||||
#include <StepShape_EdgeLoop.hxx>
|
||||
#include <StepShape_OrientedEdge.hxx>
|
||||
#include <StepShape_Edge.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FaceBound.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFaceBound::RWStepShape_RWFaceBound () {}
|
||||
|
||||
void RWStepShape_RWFaceBound::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FaceBound)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"face_bound")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : bound ---
|
||||
|
||||
Handle(StepShape_Loop) aBound;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"bound", ach, STANDARD_TYPE(StepShape_Loop), aBound);
|
||||
|
||||
// --- own field : orientation ---
|
||||
|
||||
Standard_Boolean aOrientation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadBoolean (num,3,"orientation",ach,aOrientation);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBound, aOrientation);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceBound::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FaceBound)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : bound ---
|
||||
|
||||
SW.Send(ent->Bound());
|
||||
|
||||
// --- own field : orientation ---
|
||||
|
||||
SW.SendBoolean(ent->Orientation());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceBound::Share(const Handle(StepShape_FaceBound)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Bound());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepShape_RWFaceBound::Check
|
||||
(const Handle(StepShape_FaceBound)& ent,
|
||||
const Interface_ShareTool& aShto,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Standard_Boolean theFBOri2 = Standard_True;
|
||||
Standard_Boolean theFBOri1 = ent->Orientation();
|
||||
Handle(StepShape_EdgeLoop) theEL1 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(ent->Bound());
|
||||
if (!theEL1.IsNull()) {
|
||||
Standard_Integer nbEdg = theEL1->NbEdgeList();
|
||||
for(Standard_Integer i=1; i<=nbEdg; i++) {
|
||||
Handle(StepShape_OrientedEdge) theOE1 = theEL1->EdgeListValue(i);
|
||||
Handle(StepShape_Edge) theEdg1 = theOE1->EdgeElement();
|
||||
Interface_EntityIterator myShRef = aShto.Sharings(theEdg1);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_OrientedEdge),Standard_True);
|
||||
Standard_Integer nbRef = myShRef.NbEntities();
|
||||
if(nbRef == 1) {
|
||||
// ach.AddWarning("EdgeCurve only once referenced");
|
||||
}
|
||||
else if (nbRef ==2) {
|
||||
Handle(StepShape_OrientedEdge) theOE2;
|
||||
Handle(StepShape_OrientedEdge) refOE1 =
|
||||
Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value());
|
||||
myShRef.Next();
|
||||
Handle(StepShape_OrientedEdge) refOE2 =
|
||||
Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value());
|
||||
if(theOE1 == refOE1) theOE2 = refOE2;
|
||||
else if(theOE1 == refOE2) theOE2 = refOE1;
|
||||
|
||||
// get the FaceBound orientation for theOE2
|
||||
|
||||
Standard_Boolean sharOE2 = aShto.IsShared(theOE2);
|
||||
if(!sharOE2){
|
||||
#ifdef DEB
|
||||
cout << "OrientedEdge2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theOE2);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_EdgeLoop),Standard_True);
|
||||
myShRef.Start();
|
||||
Handle(StepShape_EdgeLoop) theEL2 =
|
||||
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
|
||||
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
|
||||
if(!sharEL2){
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop2 not shared" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
myShRef = aShto.Sharings(theEL2);
|
||||
myShRef.SelectType (STANDARD_TYPE(StepShape_FaceBound),Standard_True);
|
||||
#ifdef DEB
|
||||
Standard_Integer nbRef =
|
||||
#endif
|
||||
myShRef.NbEntities();
|
||||
myShRef.Start();
|
||||
Handle(StepShape_FaceBound) theFB2 =
|
||||
Handle(StepShape_FaceBound)::DownCast(myShRef.Value());
|
||||
if (!theFB2.IsNull()) {
|
||||
theFBOri2 = theFB2->Orientation();
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
cout << "EdgeLoop not referenced by FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// "cumulate" the FaceBound orientation with the OrientedEdge orientation
|
||||
|
||||
Standard_Boolean theOEOri1 =
|
||||
theFBOri1 ? theOE1->Orientation() : !(theOE1->Orientation());
|
||||
Standard_Boolean theOEOri2 =
|
||||
theFBOri2 ? theOE2->Orientation() : !(theOE2->Orientation());
|
||||
|
||||
// the orientation of the OrientedEdges must be opposite
|
||||
|
||||
if(theOEOri1 == theOEOri2) {
|
||||
ach->AddFail("ERROR: non 2-manifold topology");
|
||||
}
|
||||
} //end if(nbRef == 2)
|
||||
} //end for(i=1; i<=nbEdg; ...)
|
||||
} //end if(!theEL1.IsNull)
|
||||
else {
|
||||
#ifdef DEB
|
||||
cout << "no EdgeLoop in FaceBound" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWFaceOuterBound.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFaceOuterBound.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: FaceOuterBound.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFaceOuterBound from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FaceOuterBound
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FaceOuterBound from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFaceOuterBound;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FaceOuterBound from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FaceOuterBound from StepShape);
|
||||
|
||||
Share(me; ent : FaceOuterBound from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFaceOuterBound;
|
75
src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx
Executable file
75
src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
|
||||
#include <RWStepShape_RWFaceOuterBound.ixx>
|
||||
#include <StepShape_Loop.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FaceOuterBound.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFaceOuterBound::RWStepShape_RWFaceOuterBound () {}
|
||||
|
||||
void RWStepShape_RWFaceOuterBound::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FaceOuterBound)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"face_outer_bound")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : bound ---
|
||||
|
||||
Handle(StepShape_Loop) aBound;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"bound", ach, STANDARD_TYPE(StepShape_Loop), aBound);
|
||||
|
||||
// --- inherited field : orientation ---
|
||||
|
||||
Standard_Boolean aOrientation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadBoolean (num,3,"orientation",ach,aOrientation);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBound, aOrientation);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceOuterBound::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FaceOuterBound)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field bound ---
|
||||
|
||||
SW.Send(ent->Bound());
|
||||
|
||||
// --- inherited field orientation ---
|
||||
|
||||
SW.SendBoolean(ent->Orientation());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceOuterBound::Share(const Handle(StepShape_FaceOuterBound)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Bound());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWFaceSurface.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFaceSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: FaceSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFaceSurface from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FaceSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FaceSurface from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFaceSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FaceSurface from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FaceSurface from StepShape);
|
||||
|
||||
Share(me; ent : FaceSurface from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFaceSurface;
|
107
src/RWStepShape/RWStepShape_RWFaceSurface.cxx
Executable file
107
src/RWStepShape/RWStepShape_RWFaceSurface.cxx
Executable file
@@ -0,0 +1,107 @@
|
||||
|
||||
#include <RWStepShape_RWFaceSurface.ixx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
#include <StepShape_HArray1OfFaceBound.hxx>
|
||||
#include <StepShape_FaceBound.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FaceSurface.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFaceSurface::RWStepShape_RWFaceSurface () {}
|
||||
|
||||
void RWStepShape_RWFaceSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FaceSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"face_surface")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : bounds ---
|
||||
|
||||
Handle(StepShape_HArray1OfFaceBound) aBounds;
|
||||
Handle(StepShape_FaceBound) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
|
||||
aBounds->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : faceGeometry ---
|
||||
|
||||
Handle(StepGeom_Surface) aFaceGeometry;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"face_geometry", ach, STANDARD_TYPE(StepGeom_Surface), aFaceGeometry);
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
Standard_Boolean aSameSense;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadBoolean (num,4,"same_sense",ach,aSameSense);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBounds, aFaceGeometry, aSameSense);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FaceSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field bounds ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbBounds(); i2 ++) {
|
||||
SW.Send(ent->BoundsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : faceGeometry ---
|
||||
|
||||
SW.Send(ent->FaceGeometry());
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
SW.SendBoolean(ent->SameSense());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFaceSurface::Share(const Handle(StepShape_FaceSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbBounds();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->BoundsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->FaceGeometry());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWFacetedBrep.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFacetedBrep.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: FacetedBrep.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFacetedBrep from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FacetedBrep
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FacetedBrep from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFacetedBrep;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FacetedBrep from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FacetedBrep from StepShape);
|
||||
|
||||
Share(me; ent : FacetedBrep from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFacetedBrep;
|
65
src/RWStepShape/RWStepShape_RWFacetedBrep.cxx
Executable file
65
src/RWStepShape/RWStepShape_RWFacetedBrep.cxx
Executable file
@@ -0,0 +1,65 @@
|
||||
|
||||
#include <RWStepShape_RWFacetedBrep.ixx>
|
||||
#include <StepShape_ClosedShell.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FacetedBrep.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFacetedBrep::RWStepShape_RWFacetedBrep () {}
|
||||
|
||||
void RWStepShape_RWFacetedBrep::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FacetedBrep)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"faceted_brep")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : outer ---
|
||||
|
||||
Handle(StepShape_ClosedShell) aOuter;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"outer", ach, STANDARD_TYPE(StepShape_ClosedShell), aOuter);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aOuter);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrep::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FacetedBrep)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field outer ---
|
||||
|
||||
SW.Send(ent->Outer());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrep::Share(const Handle(StepShape_FacetedBrep)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Outer());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: FacetedBrepAndBrepWithVoids.cdl
|
||||
-- Created: Fri Jun 17 11:44:53 1994
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFacetedBrepAndBrepWithVoids from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FacetedBrepAndBrepWithVoids
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FacetedBrepAndBrepWithVoids from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFacetedBrepAndBrepWithVoids;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FacetedBrepAndBrepWithVoids from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FacetedBrepAndBrepWithVoids from StepShape);
|
||||
|
||||
Share(me; ent : FacetedBrepAndBrepWithVoids from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFacetedBrepAndBrepWithVoids;
|
152
src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx
Executable file
152
src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx
Executable file
@@ -0,0 +1,152 @@
|
||||
|
||||
#include <RWStepShape_RWFacetedBrepAndBrepWithVoids.ixx>
|
||||
#include <StepShape_FacetedBrep.hxx>
|
||||
#include <StepShape_BrepWithVoids.hxx>
|
||||
#include <StepShape_ClosedShell.hxx>
|
||||
#include <StepShape_HArray1OfOrientedClosedShell.hxx>
|
||||
#include <StepShape_OrientedClosedShell.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FacetedBrepAndBrepWithVoids.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFacetedBrepAndBrepWithVoids::RWStepShape_RWFacetedBrepAndBrepWithVoids () {}
|
||||
|
||||
void RWStepShape_RWFacetedBrepAndBrepWithVoids::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FacetedBrepAndBrepWithVoids)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant BrepWithVoids ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"brep_with_voids")) return;
|
||||
|
||||
// --- field : voids ---
|
||||
|
||||
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
||||
Handle(StepShape_OrientedClosedShell) anent;
|
||||
Standard_Integer nsub1;
|
||||
if (data->ReadSubList (num,1,"voids",ach,nsub1)) {
|
||||
Standard_Integer nb1 = data->NbParams(nsub1);
|
||||
aVoids = new StepShape_HArray1OfOrientedClosedShell (1, nb1);
|
||||
for (Standard_Integer i1 = 1; i1 <= nb1; i1 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
if (data->ReadEntity (nsub1, i1,"oriented_closed_shell", ach,
|
||||
STANDARD_TYPE(StepShape_OrientedClosedShell), anent))
|
||||
aVoids->SetValue(i1, anent);
|
||||
}
|
||||
}
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant FacetedBrep ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"faceted_brep")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"geometric_representation_item")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype ManifoldSolidBrep ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"manifold_solid_brep")) return;
|
||||
// --- field : outer ---
|
||||
|
||||
|
||||
Handle(StepShape_ClosedShell) aOuter;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 1,"outer", ach, STANDARD_TYPE(StepShape_ClosedShell), aOuter);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"representation_item")) return;
|
||||
|
||||
|
||||
// --- field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat10 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant SolidModel ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"solid_model")) return;
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName, aOuter,aVoids);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrepAndBrepWithVoids::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FacetedBrepAndBrepWithVoids)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant BrepWithVoids ---
|
||||
|
||||
SW.StartEntity("BREP_WITH_VOIDS");
|
||||
// --- field : voids ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1 = 1; i1 <= ent->NbVoids(); i1 ++) {
|
||||
SW.Send(ent->VoidsValue(i1));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant FacetedBrep ---
|
||||
|
||||
SW.StartEntity("FACETED_BREP");
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
||||
|
||||
// --- Instance of common supertype ManifoldSolidBrep ---
|
||||
|
||||
SW.StartEntity("MANIFOLD_SOLID_BREP");
|
||||
// --- field : outer ---
|
||||
|
||||
SW.Send(ent->Outer());
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- Instance of plex componant SolidModel ---
|
||||
|
||||
SW.StartEntity("SOLID_MODEL");
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrepAndBrepWithVoids::Share(const Handle(StepShape_FacetedBrepAndBrepWithVoids)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Outer());
|
||||
|
||||
Standard_Integer nbElem2 = ent->NbVoids();
|
||||
for (Standard_Integer is2=1; is2<=nbElem2; is2 ++) {
|
||||
iter.GetOneItem(ent->VoidsValue(is2));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: FacetedBrepShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWFacetedBrepShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for FacetedBrepShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
FacetedBrepShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWFacetedBrepShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable FacetedBrepShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : FacetedBrepShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : FacetedBrepShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWFacetedBrepShapeRepresentation;
|
98
src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWFacetedBrepShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_FacetedBrepShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWFacetedBrepShapeRepresentation::RWStepShape_RWFacetedBrepShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWFacetedBrepShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_FacetedBrepShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"faceted_brep_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrepShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_FacetedBrepShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWFacetedBrepShapeRepresentation::Share(const Handle(StepShape_FacetedBrepShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWGeometricCurveSet.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWGeometricCurveSet.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricCurveSet.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricCurveSet from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for GeometricCurveSet
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricCurveSet from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricCurveSet;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricCurveSet from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricCurveSet from StepShape);
|
||||
|
||||
Share(me; ent : GeometricCurveSet from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricCurveSet;
|
83
src/RWStepShape/RWStepShape_RWGeometricCurveSet.cxx
Executable file
83
src/RWStepShape/RWStepShape_RWGeometricCurveSet.cxx
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
#include <RWStepShape_RWGeometricCurveSet.ixx>
|
||||
#include <StepShape_HArray1OfGeometricSetSelect.hxx>
|
||||
#include <StepShape_GeometricSetSelect.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_GeometricCurveSet.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWGeometricCurveSet::RWStepShape_RWGeometricCurveSet () {}
|
||||
|
||||
void RWStepShape_RWGeometricCurveSet::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_GeometricCurveSet)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"geometric_curve_set")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : elements ---
|
||||
|
||||
Handle(StepShape_HArray1OfGeometricSetSelect) aElements;
|
||||
StepShape_GeometricSetSelect aElementsItem;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"elements",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aElements = new StepShape_HArray1OfGeometricSetSelect (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2,i2,"elements",ach,aElementsItem))
|
||||
aElements->SetValue(i2,aElementsItem);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aElements);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricCurveSet::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_GeometricCurveSet)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field elements ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbElements(); i2 ++) {
|
||||
SW.Send(ent->ElementsValue(i2).Value());
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricCurveSet::Share(const Handle(StepShape_GeometricCurveSet)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbElements();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ElementsValue(is1).Value());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWGeometricSet.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWGeometricSet.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricSet.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricSet from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for GeometricSet
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricSet from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricSet;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricSet from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricSet from StepShape);
|
||||
|
||||
Share(me; ent : GeometricSet from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricSet;
|
83
src/RWStepShape/RWStepShape_RWGeometricSet.cxx
Executable file
83
src/RWStepShape/RWStepShape_RWGeometricSet.cxx
Executable file
@@ -0,0 +1,83 @@
|
||||
|
||||
#include <RWStepShape_RWGeometricSet.ixx>
|
||||
#include <StepShape_HArray1OfGeometricSetSelect.hxx>
|
||||
#include <StepShape_GeometricSetSelect.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_GeometricSet.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWGeometricSet::RWStepShape_RWGeometricSet () {}
|
||||
|
||||
void RWStepShape_RWGeometricSet::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_GeometricSet)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"geometric_set")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : elements ---
|
||||
|
||||
Handle(StepShape_HArray1OfGeometricSetSelect) aElements;
|
||||
StepShape_GeometricSetSelect aElementsItem;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"elements",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aElements = new StepShape_HArray1OfGeometricSetSelect (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2,i2,"elements",ach,aElementsItem))
|
||||
aElements->SetValue(i2,aElementsItem);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aElements);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricSet::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_GeometricSet)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : elements ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbElements(); i2 ++) {
|
||||
SW.Send(ent->ElementsValue(i2).Value());
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricSet::Share(const Handle(StepShape_GeometricSet)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbElements();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ElementsValue(is1).Value());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricallyBoundedSurfaceShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricallyBoundedSurfaceShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for GeometricallyBoundedSurfaceShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricallyBoundedSurfaceShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricallyBoundedSurfaceShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricallyBoundedSurfaceShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricallyBoundedSurfaceShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : GeometricallyBoundedSurfaceShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricallyBoundedSurfaceShapeRepresentation;
|
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_GeometricallyBoundedSurfaceShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation::RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_GeometricallyBoundedSurfaceShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"geometrically_bounded_surface_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_GeometricallyBoundedSurfaceShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation::Share(const Handle(StepShape_GeometricallyBoundedSurfaceShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricallyBoundedWireframeShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricallyBoundedWireframeShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for GeometricallyBoundedWireframeShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricallyBoundedWireframeShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricallyBoundedWireframeShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricallyBoundedWireframeShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricallyBoundedWireframeShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : GeometricallyBoundedWireframeShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricallyBoundedWireframeShapeRepresentation;
|
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_GeometricallyBoundedWireframeShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation::RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_GeometricallyBoundedWireframeShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"geometrically_bounded_wireframe_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_GeometricallyBoundedWireframeShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation::Share(const Handle(StepShape_GeometricallyBoundedWireframeShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: HalfSpaceSolid.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWHalfSpaceSolid from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for HalfSpaceSolid
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
HalfSpaceSolid from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWHalfSpaceSolid;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable HalfSpaceSolid from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : HalfSpaceSolid from StepShape);
|
||||
|
||||
Share(me; ent : HalfSpaceSolid from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWHalfSpaceSolid;
|
75
src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx
Executable file
75
src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
|
||||
#include <RWStepShape_RWHalfSpaceSolid.ixx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_HalfSpaceSolid.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWHalfSpaceSolid::RWStepShape_RWHalfSpaceSolid () {}
|
||||
|
||||
void RWStepShape_RWHalfSpaceSolid::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_HalfSpaceSolid)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"half_space_solid")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : baseSurface ---
|
||||
|
||||
Handle(StepGeom_Surface) aBaseSurface;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"base_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBaseSurface);
|
||||
|
||||
// --- own field : agreementFlag ---
|
||||
|
||||
Standard_Boolean aAgreementFlag;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadBoolean (num,3,"agreement_flag",ach,aAgreementFlag);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBaseSurface, aAgreementFlag);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWHalfSpaceSolid::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_HalfSpaceSolid)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : baseSurface ---
|
||||
|
||||
SW.Send(ent->BaseSurface());
|
||||
|
||||
// --- own field : agreementFlag ---
|
||||
|
||||
SW.SendBoolean(ent->AgreementFlag());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWHalfSpaceSolid::Share(const Handle(StepShape_HalfSpaceSolid)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BaseSurface());
|
||||
}
|
||||
|
27
src/RWStepShape/RWStepShape_RWLimitsAndFits.cdl
Executable file
27
src/RWStepShape/RWStepShape_RWLimitsAndFits.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: LimitsAndFits.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWLimitsAndFits from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for LimitsAndFits
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
LimitsAndFits from StepShape
|
||||
|
||||
is
|
||||
|
||||
Create returns RWLimitsAndFits;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable LimitsAndFits from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : LimitsAndFits from StepShape);
|
||||
|
||||
end RWLimitsAndFits;
|
53
src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx
Executable file
53
src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx
Executable file
@@ -0,0 +1,53 @@
|
||||
#include <RWStepShape_RWLimitsAndFits.ixx>
|
||||
|
||||
|
||||
RWStepShape_RWLimitsAndFits::RWStepShape_RWLimitsAndFits () {}
|
||||
|
||||
void RWStepShape_RWLimitsAndFits::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_LimitsAndFits)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"limits_and_fits")) return;
|
||||
|
||||
// --- own field : form_variance ---
|
||||
|
||||
Handle(TCollection_HAsciiString) fv;
|
||||
data->ReadString (num,1,"form_variance",ach,fv);
|
||||
|
||||
// --- own field : form_variance ---
|
||||
|
||||
Handle(TCollection_HAsciiString) zv;
|
||||
data->ReadString (num,2,"zone_variance",ach,zv);
|
||||
|
||||
// --- own field : grade ---
|
||||
|
||||
Handle(TCollection_HAsciiString) gr;
|
||||
data->ReadString (num,3,"grade",ach,gr);
|
||||
|
||||
// --- own field : source ---
|
||||
|
||||
Handle(TCollection_HAsciiString) sou;
|
||||
data->ReadString (num,4,"source",ach,sou);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
ent->Init(fv,zv,gr,sou);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWLimitsAndFits::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_LimitsAndFits)& ent) const
|
||||
{
|
||||
SW.Send(ent->FormVariance());
|
||||
SW.Send(ent->ZoneVariance());
|
||||
SW.Send(ent->Grade());
|
||||
SW.Send(ent->Source());
|
||||
}
|
||||
|
27
src/RWStepShape/RWStepShape_RWLoop.cdl
Executable file
27
src/RWStepShape/RWStepShape_RWLoop.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: Loop.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWLoop from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for Loop
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Loop from StepShape
|
||||
|
||||
is
|
||||
|
||||
Create returns RWLoop;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Loop from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Loop from StepShape);
|
||||
|
||||
end RWLoop;
|
40
src/RWStepShape/RWStepShape_RWLoop.cxx
Executable file
40
src/RWStepShape/RWStepShape_RWLoop.cxx
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <RWStepShape_RWLoop.ixx>
|
||||
|
||||
|
||||
RWStepShape_RWLoop::RWStepShape_RWLoop () {}
|
||||
|
||||
void RWStepShape_RWLoop::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_Loop)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"loop")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWLoop::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_Loop)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
30
src/RWStepShape/RWStepShape_RWLoopAndPath.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWLoopAndPath.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: LoopAndPath.cdl
|
||||
-- Created: Mon Dec 4 12:02:37 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWLoopAndPath from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for LoopAndPath
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
LoopAndPath from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWLoopAndPath;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable LoopAndPath from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : LoopAndPath from StepShape);
|
||||
|
||||
Share(me; ent : LoopAndPath from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWLoopAndPath;
|
118
src/RWStepShape/RWStepShape_RWLoopAndPath.cxx
Executable file
118
src/RWStepShape/RWStepShape_RWLoopAndPath.cxx
Executable file
@@ -0,0 +1,118 @@
|
||||
|
||||
#include <RWStepShape_RWLoopAndPath.ixx>
|
||||
#include <StepShape_Loop.hxx>
|
||||
#include <StepShape_Path.hxx>
|
||||
#include <StepShape_HArray1OfOrientedEdge.hxx>
|
||||
#include <StepShape_OrientedEdge.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_LoopAndPath.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWLoopAndPath::RWStepShape_RWLoopAndPath () {}
|
||||
|
||||
void RWStepShape_RWLoopAndPath::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_LoopAndPath)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant Loop ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"loop")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant Path ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"path")) return;
|
||||
|
||||
// --- field : edgeList ---
|
||||
|
||||
Handle(StepShape_HArray1OfOrientedEdge) aEdgeList;
|
||||
Handle(StepShape_OrientedEdge) anent1;
|
||||
Standard_Integer nsub1;
|
||||
if (data->ReadSubList (num,1,"edge_list",ach,nsub1)) {
|
||||
Standard_Integer nb1 = data->NbParams(nsub1);
|
||||
aEdgeList = new StepShape_HArray1OfOrientedEdge (1, nb1);
|
||||
for (Standard_Integer i1 = 1; i1 <= nb1; i1 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
if (data->ReadEntity (nsub1, i1,"oriented_edge", ach, STANDARD_TYPE(StepShape_OrientedEdge), anent1))
|
||||
aEdgeList->SetValue(i1, anent1);
|
||||
}
|
||||
}
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"representation_item")) return;
|
||||
|
||||
// --- field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype TopologicalRepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"topological_representation_item")) return;
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName,aEdgeList);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWLoopAndPath::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_LoopAndPath)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant Loop ---
|
||||
|
||||
SW.StartEntity("LOOP");
|
||||
|
||||
// --- Instance of plex componant Path ---
|
||||
|
||||
SW.StartEntity("PATH");
|
||||
// --- field : edgeList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1 = 1; i1 <= ent->NbEdgeList(); i1 ++) {
|
||||
SW.Send(ent->EdgeListValue(i1));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- Instance of common supertype TopologicalRepresentationItem ---
|
||||
|
||||
SW.StartEntity("TOPOLOGICAL_REPRESENTATION_ITEM");
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWLoopAndPath::Share(const Handle(StepShape_LoopAndPath)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbEdgeList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->EdgeListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ManifoldSolidBrep.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWManifoldSolidBrep from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ManifoldSolidBrep
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ManifoldSolidBrep from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWManifoldSolidBrep;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ManifoldSolidBrep from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ManifoldSolidBrep from StepShape);
|
||||
|
||||
Share(me; ent : ManifoldSolidBrep from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWManifoldSolidBrep;
|
65
src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx
Executable file
65
src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx
Executable file
@@ -0,0 +1,65 @@
|
||||
|
||||
#include <RWStepShape_RWManifoldSolidBrep.ixx>
|
||||
#include <StepShape_ClosedShell.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ManifoldSolidBrep.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWManifoldSolidBrep::RWStepShape_RWManifoldSolidBrep () {}
|
||||
|
||||
void RWStepShape_RWManifoldSolidBrep::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ManifoldSolidBrep)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"manifold_solid_brep")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- own field : outer ---
|
||||
|
||||
Handle(StepShape_ClosedShell) aOuter;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"outer", ach, STANDARD_TYPE(StepShape_ClosedShell), aOuter);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aOuter);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWManifoldSolidBrep::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ManifoldSolidBrep)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : outer ---
|
||||
|
||||
SW.Send(ent->Outer());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWManifoldSolidBrep::Share(const Handle(StepShape_ManifoldSolidBrep)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Outer());
|
||||
}
|
||||
|
30
src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cdl
Executable file
30
src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ManifoldSurfaceShapeRepresentation.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWManifoldSurfaceShapeRepresentation from RWStepShape
|
||||
|
||||
---Purpose : Read & Write Module for ManifoldSurfaceShapeRepresentation
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ManifoldSurfaceShapeRepresentation from StepShape,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWManifoldSurfaceShapeRepresentation;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ManifoldSurfaceShapeRepresentation from StepShape);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ManifoldSurfaceShapeRepresentation from StepShape);
|
||||
|
||||
Share(me; ent : ManifoldSurfaceShapeRepresentation from StepShape; iter : in out EntityIterator);
|
||||
|
||||
end RWManifoldSurfaceShapeRepresentation;
|
98
src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx
Executable file
98
src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx
Executable file
@@ -0,0 +1,98 @@
|
||||
|
||||
#include <RWStepShape_RWManifoldSurfaceShapeRepresentation.ixx>
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepShape_ManifoldSurfaceShapeRepresentation.hxx>
|
||||
|
||||
|
||||
RWStepShape_RWManifoldSurfaceShapeRepresentation::RWStepShape_RWManifoldSurfaceShapeRepresentation () {}
|
||||
|
||||
void RWStepShape_RWManifoldSurfaceShapeRepresentation::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ManifoldSurfaceShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"manifold_surface_shape_representation")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// --- inherited field : items ---
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aItems;
|
||||
Handle(StepRepr_RepresentationItem) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"items",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aItems = new StepRepr_HArray1OfRepresentationItem (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"representation_item", ach,
|
||||
STANDARD_TYPE(StepRepr_RepresentationItem), anent2))
|
||||
aItems->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : contextOfItems ---
|
||||
|
||||
Handle(StepRepr_RepresentationContext) aContextOfItems;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aItems, aContextOfItems);
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWManifoldSurfaceShapeRepresentation::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ManifoldSurfaceShapeRepresentation)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field items ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbItems(); i2 ++) {
|
||||
SW.Send(ent->ItemsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field contextOfItems ---
|
||||
|
||||
SW.Send(ent->ContextOfItems());
|
||||
}
|
||||
|
||||
|
||||
void RWStepShape_RWManifoldSurfaceShapeRepresentation::Share(const Handle(StepShape_ManifoldSurfaceShapeRepresentation)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbItems();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ItemsValue(is1));
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ContextOfItems());
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user