mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
1
src/RWStepGeom/FILES
Executable file
1
src/RWStepGeom/FILES
Executable file
@@ -0,0 +1 @@
|
||||
RWStepGeom_CMPLRS.edl
|
113
src/RWStepGeom/RWStepGeom.cdl
Executable file
113
src/RWStepGeom/RWStepGeom.cdl
Executable file
@@ -0,0 +1,113 @@
|
||||
-- File: StepGeom.cdl
|
||||
-- Created: Mon Dec 4 12:02:22 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
package RWStepGeom
|
||||
|
||||
uses
|
||||
|
||||
StepData, Interface, TCollection, TColStd, StepGeom
|
||||
|
||||
is
|
||||
|
||||
|
||||
--class ReadWriteModule;
|
||||
|
||||
--class GeneralModule;
|
||||
|
||||
class RWAxis1Placement;
|
||||
class RWAxis2Placement2d;
|
||||
class RWAxis2Placement3d;
|
||||
class RWBSplineCurve;
|
||||
class RWBSplineCurveWithKnots;
|
||||
class RWBSplineSurface;
|
||||
class RWBSplineSurfaceWithKnots;
|
||||
class RWBezierCurve;
|
||||
class RWBezierSurface;
|
||||
class RWBoundaryCurve;
|
||||
class RWBoundedCurve;
|
||||
class RWBoundedSurface;
|
||||
class RWCartesianPoint;
|
||||
class RWCartesianTransformationOperator;
|
||||
class RWCartesianTransformationOperator3d;
|
||||
class RWCircle;
|
||||
class RWCompositeCurve;
|
||||
class RWCompositeCurveOnSurface;
|
||||
class RWCompositeCurveSegment;
|
||||
class RWConic;
|
||||
class RWConicalSurface;
|
||||
class RWCurve;
|
||||
class RWCurveBoundedSurface;
|
||||
class RWCurveReplica;
|
||||
class RWCylindricalSurface;
|
||||
class RWDegeneratePcurve;
|
||||
class RWDegenerateToroidalSurface;
|
||||
class RWDirection;
|
||||
class RWElementarySurface;
|
||||
class RWEllipse;
|
||||
class RWEvaluatedDegeneratePcurve;
|
||||
class RWGeometricRepresentationContext;
|
||||
class RWGeometricRepresentationContextAndGlobalUnitAssignedContext;
|
||||
-- added by FMA:
|
||||
class RWGeometricRepresentationContextAndParametricRepresentationContext;
|
||||
-- added by FMA:
|
||||
class RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
|
||||
class RWGeometricRepresentationItem;
|
||||
class RWHyperbola;
|
||||
class RWIntersectionCurve;
|
||||
class RWLine;
|
||||
class RWOffsetCurve3d;
|
||||
class RWOffsetSurface;
|
||||
class RWOuterBoundaryCurve;
|
||||
class RWParabola;
|
||||
class RWPcurve;
|
||||
class RWPlacement;
|
||||
class RWPlane;
|
||||
class RWPoint;
|
||||
class RWPointOnCurve;
|
||||
class RWPointOnSurface;
|
||||
class RWPointReplica;
|
||||
class RWPolyline;
|
||||
class RWQuasiUniformCurve;
|
||||
class RWQuasiUniformSurface;
|
||||
class RWRationalBSplineCurve;
|
||||
class RWRationalBSplineSurface;
|
||||
class RWRectangularCompositeSurface;
|
||||
class RWRectangularTrimmedSurface;
|
||||
class RWReparametrisedCompositeCurveSegment;
|
||||
class RWSeamCurve;
|
||||
class RWSphericalSurface;
|
||||
class RWSurface;
|
||||
class RWSurfaceCurve;
|
||||
class RWSurfaceOfLinearExtrusion;
|
||||
class RWSurfaceOfRevolution;
|
||||
class RWSurfaceCurveAndBoundedCurve;
|
||||
class RWSurfacePatch;
|
||||
class RWSurfaceReplica;
|
||||
class RWSweptSurface;
|
||||
class RWToroidalSurface;
|
||||
class RWTrimmedCurve;
|
||||
class RWUniformCurve;
|
||||
class RWUniformSurface;
|
||||
class RWOrientedSurface; -- Added from AP214 DIS to IS 4.01.2002
|
||||
class RWVector;
|
||||
|
||||
class RWUniformCurveAndRationalBSplineCurve;
|
||||
class RWBSplineCurveWithKnotsAndRationalBSplineCurve;
|
||||
class RWQuasiUniformCurveAndRationalBSplineCurve;
|
||||
class RWBezierCurveAndRationalBSplineCurve;
|
||||
class RWBSplineSurfaceWithKnotsAndRationalBSplineSurface;
|
||||
class RWUniformSurfaceAndRationalBSplineSurface;
|
||||
class RWQuasiUniformSurfaceAndRationalBSplineSurface;
|
||||
class RWBezierSurfaceAndRationalBSplineSurface;
|
||||
|
||||
---Package Method ---
|
||||
|
||||
-- Init;
|
||||
---Purpose: enforced the initialisation of the libraries
|
||||
|
||||
end RWStepGeom;
|
17
src/RWStepGeom/RWStepGeom_CMPLRS.edl
Executable file
17
src/RWStepGeom/RWStepGeom_CMPLRS.edl
Executable file
@@ -0,0 +1,17 @@
|
||||
-- File: CMPLRS.edl
|
||||
-- Author: Christian CAILLET
|
||||
-- History: Wed May 21 10:57:28 1997
|
||||
-- Copyright: Matra Datavision 1997
|
||||
|
||||
-- Pb compil gros code HP-UX sous WOK++
|
||||
-- trop de warning -> shut up
|
||||
|
||||
@if ( %Station == "hp" ) then
|
||||
|
||||
@string %CMPLRS_CXX_Options = %CMPLRS_CXX_Options " -w ";
|
||||
|
||||
-- Pb optimiseur (O2) pas fiable
|
||||
|
||||
@set %ModeOpt = "+O1";
|
||||
|
||||
@endif;
|
30
src/RWStepGeom/RWStepGeom_RWAxis1Placement.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWAxis1Placement.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Axis1Placement.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWAxis1Placement from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Axis1Placement
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Axis1Placement from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWAxis1Placement;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Axis1Placement from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Axis1Placement from StepGeom);
|
||||
|
||||
Share(me; ent : Axis1Placement from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWAxis1Placement;
|
94
src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx
Executable file
94
src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx
Executable file
@@ -0,0 +1,94 @@
|
||||
|
||||
#include <RWStepGeom_RWAxis1Placement.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Axis1Placement.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWAxis1Placement::RWStepGeom_RWAxis1Placement () {}
|
||||
|
||||
void RWStepGeom_RWAxis1Placement::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Axis1Placement)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"axis1_placement")) 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 : location ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aLocation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"location", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aLocation);
|
||||
|
||||
// --- own field : axis ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis;
|
||||
Standard_Boolean hasAaxis = Standard_True;
|
||||
if (data->IsParamDefined(num,3)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"axis", ach, STANDARD_TYPE(StepGeom_Direction), aAxis);
|
||||
}
|
||||
else {
|
||||
hasAaxis = Standard_False;
|
||||
aAxis.Nullify();
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aLocation, hasAaxis, aAxis);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis1Placement::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Axis1Placement)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field location ---
|
||||
|
||||
SW.Send(ent->Location());
|
||||
|
||||
// --- own field : axis ---
|
||||
|
||||
Standard_Boolean hasAaxis = ent->HasAxis();
|
||||
if (hasAaxis) {
|
||||
SW.Send(ent->Axis());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis1Placement::Share(const Handle(StepGeom_Axis1Placement)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Location());
|
||||
|
||||
if (ent->HasAxis()) {
|
||||
iter.GetOneItem(ent->Axis());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Axis2Placement2d.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWAxis2Placement2d from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Axis2Placement2d
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Axis2Placement2d from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWAxis2Placement2d;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Axis2Placement2d from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Axis2Placement2d from StepGeom);
|
||||
|
||||
Share(me; ent : Axis2Placement2d from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWAxis2Placement2d;
|
94
src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx
Executable file
94
src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx
Executable file
@@ -0,0 +1,94 @@
|
||||
|
||||
#include <RWStepGeom_RWAxis2Placement2d.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Axis2Placement2d.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWAxis2Placement2d::RWStepGeom_RWAxis2Placement2d () {}
|
||||
|
||||
void RWStepGeom_RWAxis2Placement2d::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Axis2Placement2d)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"axis2_placement_2d")) 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 : location ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aLocation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"location", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aLocation);
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
Handle(StepGeom_Direction) aRefDirection;
|
||||
Standard_Boolean hasArefDirection = Standard_True;
|
||||
if (data->IsParamDefined(num,3)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"ref_direction", ach, STANDARD_TYPE(StepGeom_Direction), aRefDirection);
|
||||
}
|
||||
else {
|
||||
hasArefDirection = Standard_False;
|
||||
aRefDirection.Nullify();
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aLocation, hasArefDirection, aRefDirection);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis2Placement2d::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Axis2Placement2d)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field location ---
|
||||
|
||||
SW.Send(ent->Location());
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
Standard_Boolean hasArefDirection = ent->HasRefDirection();
|
||||
if (hasArefDirection) {
|
||||
SW.Send(ent->RefDirection());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis2Placement2d::Share(const Handle(StepGeom_Axis2Placement2d)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Location());
|
||||
|
||||
if (ent->HasRefDirection()) {
|
||||
iter.GetOneItem(ent->RefDirection());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Axis2Placement3d.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWAxis2Placement3d from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Axis2Placement3d
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Axis2Placement3d from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWAxis2Placement3d;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Axis2Placement3d from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Axis2Placement3d from StepGeom);
|
||||
|
||||
Share(me; ent : Axis2Placement3d from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWAxis2Placement3d;
|
122
src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx
Executable file
122
src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx
Executable file
@@ -0,0 +1,122 @@
|
||||
|
||||
#include <RWStepGeom_RWAxis2Placement3d.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWAxis2Placement3d::RWStepGeom_RWAxis2Placement3d () {}
|
||||
|
||||
void RWStepGeom_RWAxis2Placement3d::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Axis2Placement3d)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"axis2_placement_3d")) 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 : location ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aLocation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"location", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aLocation);
|
||||
|
||||
// --- own field : axis ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis;
|
||||
Standard_Boolean hasAaxis = Standard_True;
|
||||
if (data->IsParamDefined(num,3)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"axis", ach, STANDARD_TYPE(StepGeom_Direction), aAxis);
|
||||
}
|
||||
else {
|
||||
hasAaxis = Standard_False;
|
||||
aAxis.Nullify();
|
||||
}
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
Handle(StepGeom_Direction) aRefDirection;
|
||||
Standard_Boolean hasArefDirection = Standard_True;
|
||||
if (data->IsParamDefined(num,4)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num, 4,"ref_direction", ach, STANDARD_TYPE(StepGeom_Direction), aRefDirection);
|
||||
}
|
||||
else {
|
||||
hasArefDirection = Standard_False;
|
||||
aRefDirection.Nullify();
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aLocation, hasAaxis, aAxis, hasArefDirection, aRefDirection);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis2Placement3d::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Axis2Placement3d)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field location ---
|
||||
|
||||
SW.Send(ent->Location());
|
||||
|
||||
// --- own field : axis ---
|
||||
|
||||
Standard_Boolean hasAaxis = ent->HasAxis();
|
||||
if (hasAaxis) {
|
||||
SW.Send(ent->Axis());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
Standard_Boolean hasArefDirection = ent->HasRefDirection();
|
||||
if (hasArefDirection) {
|
||||
SW.Send(ent->RefDirection());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWAxis2Placement3d::Share(const Handle(StepGeom_Axis2Placement3d)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Location());
|
||||
|
||||
if (ent->HasAxis()) {
|
||||
iter.GetOneItem(ent->Axis());
|
||||
}
|
||||
|
||||
|
||||
if (ent->HasRefDirection()) {
|
||||
iter.GetOneItem(ent->RefDirection());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWBSplineCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBSplineCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BSplineCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineCurve from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBSplineCurve;
|
152
src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx
Executable file
152
src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx
Executable file
@@ -0,0 +1,152 @@
|
||||
|
||||
#include <RWStepGeom_RWBSplineCurve.ixx>
|
||||
#include <StepGeom_HArray1OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineCurveForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineCurve.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : BSplineCurveForm ---
|
||||
static TCollection_AsciiString bscfEllipticArc(".ELLIPTIC_ARC.");
|
||||
static TCollection_AsciiString bscfPolylineForm(".POLYLINE_FORM.");
|
||||
static TCollection_AsciiString bscfParabolicArc(".PARABOLIC_ARC.");
|
||||
static TCollection_AsciiString bscfCircularArc(".CIRCULAR_ARC.");
|
||||
static TCollection_AsciiString bscfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bscfHyperbolicArc(".HYPERBOLIC_ARC.");
|
||||
|
||||
RWStepGeom_RWBSplineCurve::RWStepGeom_RWBSplineCurve () {}
|
||||
|
||||
void RWStepGeom_RWBSplineCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,6,ach,"b_spline_curve")) 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 : degree ---
|
||||
|
||||
Standard_Integer aDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"degree",ach,aDegree);
|
||||
|
||||
// --- own field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3, i3,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent3))
|
||||
aControlPointsList->SetValue(i3, anent3);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : curveForm ---
|
||||
|
||||
StepGeom_BSplineCurveForm aCurveForm = StepGeom_bscfPolylineForm;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (bscfEllipticArc.IsEqual(text)) aCurveForm = StepGeom_bscfEllipticArc;
|
||||
else if (bscfPolylineForm.IsEqual(text)) aCurveForm = StepGeom_bscfPolylineForm;
|
||||
else if (bscfParabolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfParabolicArc;
|
||||
else if (bscfCircularArc.IsEqual(text)) aCurveForm = StepGeom_bscfCircularArc;
|
||||
else if (bscfUnspecified.IsEqual(text)) aCurveForm = StepGeom_bscfUnspecified;
|
||||
else if (bscfHyperbolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfHyperbolicArc;
|
||||
else ach->AddFail("Enumeration b_spline_curve_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (curve_form) is not an enumeration");
|
||||
|
||||
// --- own field : closedCurve ---
|
||||
|
||||
StepData_Logical aClosedCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"closed_curve",ach,aClosedCurve);
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : degree ---
|
||||
|
||||
SW.Send(ent->Degree());
|
||||
|
||||
// --- own field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbControlPointsList(); i3 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i3));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : curveForm ---
|
||||
|
||||
switch(ent->CurveForm()) {
|
||||
case StepGeom_bscfEllipticArc : SW.SendEnum (bscfEllipticArc); break;
|
||||
case StepGeom_bscfPolylineForm : SW.SendEnum (bscfPolylineForm); break;
|
||||
case StepGeom_bscfParabolicArc : SW.SendEnum (bscfParabolicArc); break;
|
||||
case StepGeom_bscfCircularArc : SW.SendEnum (bscfCircularArc); break;
|
||||
case StepGeom_bscfUnspecified : SW.SendEnum (bscfUnspecified); break;
|
||||
case StepGeom_bscfHyperbolicArc : SW.SendEnum (bscfHyperbolicArc); break;
|
||||
}
|
||||
|
||||
// --- own field : closedCurve ---
|
||||
|
||||
SW.SendLogical(ent->ClosedCurve());
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurve::Share(const Handle(StepGeom_BSplineCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbControlPointsList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
33
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cdl
Executable file
33
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BSplineCurveWithKnots.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineCurveWithKnots from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineCurveWithKnots
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineCurveWithKnots from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineCurveWithKnots;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineCurveWithKnots from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineCurveWithKnots from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineCurveWithKnots from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : BSplineCurveWithKnots from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWBSplineCurveWithKnots;
|
270
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx
Executable file
270
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx
Executable file
@@ -0,0 +1,270 @@
|
||||
|
||||
#include <RWStepGeom_RWBSplineCurveWithKnots.ixx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <StepGeom_KnotType.hxx>
|
||||
#include <StepGeom_HArray1OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineCurveForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineCurveWithKnots.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : KnotType ---
|
||||
static TCollection_AsciiString ktUniformKnots(".UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktQuasiUniformKnots(".QUASI_UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktPiecewiseBezierKnots(".PIECEWISE_BEZIER_KNOTS.");
|
||||
static TCollection_AsciiString ktUnspecified(".UNSPECIFIED.");
|
||||
|
||||
|
||||
// --- Enum : BSplineCurveForm ---
|
||||
static TCollection_AsciiString bscfEllipticArc(".ELLIPTIC_ARC.");
|
||||
static TCollection_AsciiString bscfPolylineForm(".POLYLINE_FORM.");
|
||||
static TCollection_AsciiString bscfParabolicArc(".PARABOLIC_ARC.");
|
||||
static TCollection_AsciiString bscfCircularArc(".CIRCULAR_ARC.");
|
||||
static TCollection_AsciiString bscfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bscfHyperbolicArc(".HYPERBOLIC_ARC.");
|
||||
|
||||
RWStepGeom_RWBSplineCurveWithKnots::RWStepGeom_RWBSplineCurveWithKnots () {}
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnots::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineCurveWithKnots)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,9,ach,"b_spline_curve_with_knots")) 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 : degree ---
|
||||
|
||||
Standard_Integer aDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"degree",ach,aDegree);
|
||||
|
||||
// --- inherited field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3, i3,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent3))
|
||||
aControlPointsList->SetValue(i3, anent3);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : curveForm ---
|
||||
|
||||
StepGeom_BSplineCurveForm aCurveForm = StepGeom_bscfPolylineForm;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (bscfEllipticArc.IsEqual(text)) aCurveForm = StepGeom_bscfEllipticArc;
|
||||
else if (bscfPolylineForm.IsEqual(text)) aCurveForm = StepGeom_bscfPolylineForm;
|
||||
else if (bscfParabolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfParabolicArc;
|
||||
else if (bscfCircularArc.IsEqual(text)) aCurveForm = StepGeom_bscfCircularArc;
|
||||
else if (bscfUnspecified.IsEqual(text)) aCurveForm = StepGeom_bscfUnspecified;
|
||||
else if (bscfHyperbolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfHyperbolicArc;
|
||||
else ach->AddFail("Enumeration b_spline_curve_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (curve_form) is not an enumeration");
|
||||
|
||||
// --- inherited field : closedCurve ---
|
||||
|
||||
StepData_Logical aClosedCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"closed_curve",ach,aClosedCurve);
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
// --- own field : knotMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aKnotMultiplicities;
|
||||
Standard_Integer aKnotMultiplicitiesItem;
|
||||
Standard_Integer nsub7;
|
||||
if (data->ReadSubList (num,7,"knot_multiplicities",ach,nsub7)) {
|
||||
Standard_Integer nb7 = data->NbParams(nsub7);
|
||||
aKnotMultiplicities = new TColStd_HArray1OfInteger (1, nb7);
|
||||
for (Standard_Integer i7 = 1; i7 <= nb7; i7 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
if (data->ReadInteger (nsub7,i7,"knot_multiplicities",ach,aKnotMultiplicitiesItem))
|
||||
aKnotMultiplicities->SetValue(i7,aKnotMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : knots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aKnots;
|
||||
Standard_Real aKnotsItem;
|
||||
Standard_Integer nsub8;
|
||||
if (data->ReadSubList (num,8,"knots",ach,nsub8)) {
|
||||
Standard_Integer nb8 = data->NbParams(nsub8);
|
||||
aKnots = new TColStd_HArray1OfReal (1, nb8);
|
||||
for (Standard_Integer i8 = 1; i8 <= nb8; i8 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
if (data->ReadReal (nsub8,i8,"knots",ach,aKnotsItem))
|
||||
aKnots->SetValue(i8,aKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : knotSpec ---
|
||||
|
||||
StepGeom_KnotType aKnotSpec = StepGeom_ktUniformKnots;
|
||||
if (data->ParamType(num,9) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,9);
|
||||
if (ktUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktUniformKnots;
|
||||
else if (ktQuasiUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktQuasiUniformKnots;
|
||||
else if (ktPiecewiseBezierKnots.IsEqual(text)) aKnotSpec = StepGeom_ktPiecewiseBezierKnots;
|
||||
else if (ktUnspecified.IsEqual(text)) aKnotSpec = StepGeom_ktUnspecified;
|
||||
else ach->AddFail("Enumeration knot_type has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #9 (knot_spec) is not an enumeration");
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect, aKnotMultiplicities, aKnots, aKnotSpec);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnots::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineCurveWithKnots)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field degree ---
|
||||
|
||||
SW.Send(ent->Degree());
|
||||
|
||||
// --- inherited field controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbControlPointsList(); i3 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i3));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field curveForm ---
|
||||
|
||||
switch(ent->CurveForm()) {
|
||||
case StepGeom_bscfEllipticArc : SW.SendEnum (bscfEllipticArc); break;
|
||||
case StepGeom_bscfPolylineForm : SW.SendEnum (bscfPolylineForm); break;
|
||||
case StepGeom_bscfParabolicArc : SW.SendEnum (bscfParabolicArc); break;
|
||||
case StepGeom_bscfCircularArc : SW.SendEnum (bscfCircularArc); break;
|
||||
case StepGeom_bscfUnspecified : SW.SendEnum (bscfUnspecified); break;
|
||||
case StepGeom_bscfHyperbolicArc : SW.SendEnum (bscfHyperbolicArc); break;
|
||||
}
|
||||
|
||||
// --- inherited field closedCurve ---
|
||||
|
||||
SW.SendLogical(ent->ClosedCurve());
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- own field : knotMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i7 = 1; i7 <= ent->NbKnotMultiplicities(); i7 ++) {
|
||||
SW.Send(ent->KnotMultiplicitiesValue(i7));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : knots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i8 = 1; i8 <= ent->NbKnots(); i8 ++) {
|
||||
SW.Send(ent->KnotsValue(i8));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : knotSpec ---
|
||||
|
||||
switch(ent->KnotSpec()) {
|
||||
case StepGeom_ktUniformKnots : SW.SendEnum (ktUniformKnots); break;
|
||||
case StepGeom_ktQuasiUniformKnots : SW.SendEnum (ktQuasiUniformKnots); break;
|
||||
case StepGeom_ktPiecewiseBezierKnots : SW.SendEnum (ktPiecewiseBezierKnots); break;
|
||||
case StepGeom_ktUnspecified : SW.SendEnum (ktUnspecified); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnots::Share(const Handle(StepGeom_BSplineCurveWithKnots)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbControlPointsList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnots::Check
|
||||
(const Handle(StepGeom_BSplineCurveWithKnots)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Standard_Integer nbCPL = ent->NbControlPointsList();
|
||||
Standard_Integer dgBSC = ent->Degree();
|
||||
Standard_Integer nbMult = ent->NbKnotMultiplicities();
|
||||
Standard_Integer nbKno = ent->NbKnots();
|
||||
Standard_Integer sumMult = 0;
|
||||
// cout << "BSplineCurveWithKnots: nbMult=" << nbMult << " nbKno= " <<
|
||||
// nbKno << " nbCPL= " << nbCPL << " degree= " << dgBSC << endl;
|
||||
if(nbMult != nbKno) {
|
||||
ach->AddFail("ERROR: No.of KnotMultiplicities not equal No.of Knots");
|
||||
}
|
||||
Standard_Integer i;//svv Jan 10 2000: porting on DEC
|
||||
for (i=1; i<=nbMult-1; i++) {
|
||||
sumMult = sumMult + ent->KnotMultiplicitiesValue(i);
|
||||
}
|
||||
Standard_Integer sumNonP = nbCPL + dgBSC + 1;
|
||||
Standard_Integer mult1 = ent->KnotMultiplicitiesValue(1);
|
||||
Standard_Integer multN = ent->KnotMultiplicitiesValue(nbMult);
|
||||
// cout << "BSplineCurveWithKnots: mult1=" << mult1 << " multN= " <<
|
||||
// multN << " sumMult= " << sumMult << endl;
|
||||
if((sumMult + multN) == sumNonP) {
|
||||
}
|
||||
else if((sumMult == nbCPL) && (mult1 == multN)) {
|
||||
}
|
||||
else {
|
||||
ach->AddFail("ERROR: wrong number of Knot Multiplicities");
|
||||
}
|
||||
for(i=2; i<=nbKno; i++) {
|
||||
Standard_Real distKn = ent->KnotsValue(i-1) - ent->KnotsValue(i);
|
||||
if(Abs(distKn) <= RealEpsilon())
|
||||
ach->AddWarning("WARNING: Curve contains identical KnotsValues");
|
||||
else if(distKn > RealEpsilon())
|
||||
ach->AddFail("ERROR: Curve contains descending KnotsValues");
|
||||
}
|
||||
}
|
||||
|
33
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cdl
Executable file
33
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BSplineCurveWithKnotsAndRationalBSplineCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:33 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineCurveWithKnotsAndRationalBSplineCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineCurveWithKnotsAndRationalBSplineCurve
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineCurveWithKnotsAndRationalBSplineCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineCurveWithKnotsAndRationalBSplineCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineCurveWithKnotsAndRationalBSplineCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineCurveWithKnotsAndRationalBSplineCurve from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineCurveWithKnotsAndRationalBSplineCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : BSplineCurveWithKnotsAndRationalBSplineCurve from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWBSplineCurveWithKnotsAndRationalBSplineCurve;
|
349
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
Executable file
349
src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx
Executable file
@@ -0,0 +1,349 @@
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
#include <RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.ixx>
|
||||
#include <StepGeom_BSplineCurveWithKnots.hxx>
|
||||
#include <StepGeom_RationalBSplineCurve.hxx>
|
||||
#include <StepGeom_HArray1OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineCurveForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <StepGeom_KnotType.hxx>
|
||||
|
||||
#include <RWStepGeom_RWBSplineCurveWithKnots.hxx>
|
||||
#include <RWStepGeom_RWRationalBSplineCurve.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineCurveForm ---
|
||||
static TCollection_AsciiString bscfEllipticArc(".ELLIPTIC_ARC.");
|
||||
static TCollection_AsciiString bscfPolylineForm(".POLYLINE_FORM.");
|
||||
static TCollection_AsciiString bscfParabolicArc(".PARABOLIC_ARC.");
|
||||
static TCollection_AsciiString bscfCircularArc(".CIRCULAR_ARC.");
|
||||
static TCollection_AsciiString bscfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bscfHyperbolicArc(".HYPERBOLIC_ARC.");
|
||||
|
||||
// --- Enum : KnotType ---
|
||||
static TCollection_AsciiString ktUniformKnots(".UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktQuasiUniformKnots(".QUASI_UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktPiecewiseBezierKnots(".PIECEWISE_BEZIER_KNOTS.");
|
||||
static TCollection_AsciiString ktUnspecified(".UNSPECIFIED.");
|
||||
|
||||
RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve () {}
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
Standard_Integer num = 0; // num0
|
||||
data->NamedForComplex("BOUNDED_CURVE BNDCRV",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant BoundedCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bounded_curve")) return;
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
// num = 0; gka TRJ9
|
||||
data->NamedForComplex("B_SPLINE_CURVE BSPCR",num0,num,ach);
|
||||
|
||||
// --- Instance of common supertype BSplineCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"b_spline_curve")) return;
|
||||
// --- field : degree ---
|
||||
|
||||
|
||||
Standard_Integer aDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"degree",ach,aDegree);
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
|
||||
Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent2))
|
||||
aControlPointsList->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : curveForm ---
|
||||
|
||||
|
||||
StepGeom_BSplineCurveForm aCurveForm = StepGeom_bscfPolylineForm;
|
||||
if (data->ParamType(num,3) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,3);
|
||||
if (bscfEllipticArc.IsEqual(text)) aCurveForm = StepGeom_bscfEllipticArc;
|
||||
else if (bscfPolylineForm.IsEqual(text)) aCurveForm = StepGeom_bscfPolylineForm;
|
||||
else if (bscfParabolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfParabolicArc;
|
||||
else if (bscfCircularArc.IsEqual(text)) aCurveForm = StepGeom_bscfCircularArc;
|
||||
else if (bscfUnspecified.IsEqual(text)) aCurveForm = StepGeom_bscfUnspecified;
|
||||
else if (bscfHyperbolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfHyperbolicArc;
|
||||
else ach->AddFail("Enumeration b_spline_curve_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #3 (curve_form) is not an enumeration");
|
||||
// --- field : closedCurve ---
|
||||
|
||||
|
||||
StepData_Logical aClosedCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadLogical (num,4,"closed_curve",ach,aClosedCurve);
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
// num = 0; //gka TRJ9
|
||||
data->NamedForComplex("B_SPLINE_CURVE_WITH_KNOTS BSCWK",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant BSplineCurveWithKnots ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"b_spline_curve_with_knots")) return;
|
||||
|
||||
// --- field : knotMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aKnotMultiplicities;
|
||||
Standard_Integer aKnotMultiplicitiesItem;
|
||||
Standard_Integer nsub6;
|
||||
if (data->ReadSubList (num,1,"knot_multiplicities",ach,nsub6)) {
|
||||
Standard_Integer nb6 = data->NbParams(nsub6);
|
||||
aKnotMultiplicities = new TColStd_HArray1OfInteger (1, nb6);
|
||||
for (Standard_Integer i6 = 1; i6 <= nb6; i6 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
if (data->ReadInteger (nsub6,i6,"knot_multiplicities",ach,aKnotMultiplicitiesItem))
|
||||
aKnotMultiplicities->SetValue(i6,aKnotMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : knots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aKnots;
|
||||
Standard_Real aKnotsItem;
|
||||
Standard_Integer nsub7;
|
||||
if (data->ReadSubList (num,2,"knots",ach,nsub7)) {
|
||||
Standard_Integer nb7 = data->NbParams(nsub7);
|
||||
aKnots = new TColStd_HArray1OfReal (1, nb7);
|
||||
for (Standard_Integer i7 = 1; i7 <= nb7; i7 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
if (data->ReadReal (nsub7,i7,"knots",ach,aKnotsItem))
|
||||
aKnots->SetValue(i7,aKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : knotSpec ---
|
||||
|
||||
StepGeom_KnotType aKnotSpec = StepGeom_ktUniformKnots;
|
||||
if (data->ParamType(num,3) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,3);
|
||||
if (ktUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktUniformKnots;
|
||||
else if (ktQuasiUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktQuasiUniformKnots;
|
||||
else if (ktPiecewiseBezierKnots.IsEqual(text)) aKnotSpec = StepGeom_ktPiecewiseBezierKnots;
|
||||
else if (ktUnspecified.IsEqual(text)) aKnotSpec = StepGeom_ktUnspecified;
|
||||
else ach->AddFail("Enumeration knot_type has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #3 (knot_spec) is not an enumeration");
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
// num = 0; gka TRJ9
|
||||
data->NamedForComplex("CURVE",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant Curve ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"curve")) return;
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
//num = 0;
|
||||
data->NamedForComplex("GEOMETRIC_REPRESENTATION_ITEM GMRPIT",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"geometric_representation_item")) return;
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
//num = 0;
|
||||
data->NamedForComplex("RATIONAL_B_SPLINE_CURVE RBSC",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant RationalBSplineCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"rational_b_spline_curve")) return;
|
||||
|
||||
// --- field : weightsData ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aWeightsData;
|
||||
Standard_Real aWeightsDataItem;
|
||||
Standard_Integer nsub9;
|
||||
if (data->ReadSubList (num,1,"weights_data",ach,nsub9)) {
|
||||
Standard_Integer nb9 = data->NbParams(nsub9);
|
||||
aWeightsData = new TColStd_HArray1OfReal (1, nb9);
|
||||
for (Standard_Integer i9 = 1; i9 <= nb9; i9 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat9 =` not needed
|
||||
if (data->ReadReal (nsub9,i9,"weights_data",ach,aWeightsDataItem))
|
||||
aWeightsData->SetValue(i9,aWeightsDataItem);
|
||||
}
|
||||
}
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
// sln 04.10.2001. BUC61003. Correction of looking for items of complex entity
|
||||
//num = 0;
|
||||
data->NamedForComplex("REPRESENTATION_ITEM RPRITM",num0,num,ach);
|
||||
|
||||
// --- 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);
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName,aDegree,aControlPointsList,aCurveForm,aClosedCurve,aSelfIntersect,aKnotMultiplicities,aKnots,aKnotSpec,aWeightsData);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant BoundedCurve ---
|
||||
|
||||
SW.StartEntity("BOUNDED_CURVE");
|
||||
|
||||
// --- Instance of common supertype BSplineCurve ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_CURVE");
|
||||
// --- field : degree ---
|
||||
|
||||
SW.Send(ent->Degree());
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbControlPointsList(); i2 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : curveForm ---
|
||||
|
||||
switch(ent->CurveForm()) {
|
||||
case StepGeom_bscfEllipticArc : SW.SendEnum (bscfEllipticArc); break;
|
||||
case StepGeom_bscfPolylineForm : SW.SendEnum (bscfPolylineForm); break;
|
||||
case StepGeom_bscfParabolicArc : SW.SendEnum (bscfParabolicArc); break;
|
||||
case StepGeom_bscfCircularArc : SW.SendEnum (bscfCircularArc); break;
|
||||
case StepGeom_bscfUnspecified : SW.SendEnum (bscfUnspecified); break;
|
||||
case StepGeom_bscfHyperbolicArc : SW.SendEnum (bscfHyperbolicArc); break;
|
||||
}
|
||||
// --- field : closedCurve ---
|
||||
|
||||
SW.SendLogical(ent->ClosedCurve());
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- Instance of plex componant BSplineCurveWithKnots ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_CURVE_WITH_KNOTS");
|
||||
// --- field : knotMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i6 = 1; i6 <= ent->NbKnotMultiplicities(); i6 ++) {
|
||||
SW.Send(ent->KnotMultiplicitiesValue(i6));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : knots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i7 = 1; i7 <= ent->NbKnots(); i7 ++) {
|
||||
SW.Send(ent->KnotsValue(i7));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : knotSpec ---
|
||||
|
||||
switch(ent->KnotSpec()) {
|
||||
case StepGeom_ktUniformKnots : SW.SendEnum (ktUniformKnots); break;
|
||||
case StepGeom_ktQuasiUniformKnots : SW.SendEnum (ktQuasiUniformKnots); break;
|
||||
case StepGeom_ktPiecewiseBezierKnots : SW.SendEnum (ktPiecewiseBezierKnots); break;
|
||||
case StepGeom_ktUnspecified : SW.SendEnum (ktUnspecified); break;
|
||||
}
|
||||
|
||||
// --- Instance of plex componant Curve ---
|
||||
|
||||
SW.StartEntity("CURVE");
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
||||
|
||||
// --- Instance of plex componant RationalBSplineCurve ---
|
||||
|
||||
SW.StartEntity("RATIONAL_B_SPLINE_CURVE");
|
||||
// --- field : weightsData ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i9 = 1; i9 <= ent->NbWeightsData(); i9 ++) {
|
||||
SW.Send(ent->WeightsDataValue(i9));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::Share(const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbControlPointsList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::Check
|
||||
(const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& ent,
|
||||
const Interface_ShareTool& aShto,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) aRationalBSC =
|
||||
Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(ent);
|
||||
Handle(StepGeom_BSplineCurveWithKnots) aBSCWK =
|
||||
aRationalBSC->BSplineCurveWithKnots();
|
||||
RWStepGeom_RWBSplineCurveWithKnots t1;
|
||||
t1.Check(aBSCWK,aShto,ach);
|
||||
Handle(StepGeom_RationalBSplineCurve) aRBSC =
|
||||
aRationalBSC->RationalBSplineCurve();
|
||||
RWStepGeom_RWRationalBSplineCurve t2;
|
||||
t2.Check(aRBSC,aShto,ach);
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWBSplineSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBSplineSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BSplineSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineSurface from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBSplineSurface;
|
202
src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx
Executable file
202
src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx
Executable file
@@ -0,0 +1,202 @@
|
||||
|
||||
#include <RWStepGeom_RWBSplineSurface.ixx>
|
||||
#include <StepGeom_HArray2OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineSurfaceForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineSurface.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : BSplineSurfaceForm ---
|
||||
static TCollection_AsciiString bssfSurfOfLinearExtrusion(".SURF_OF_LINEAR_EXTRUSION.");
|
||||
static TCollection_AsciiString bssfPlaneSurf(".PLANE_SURF.");
|
||||
static TCollection_AsciiString bssfGeneralisedCone(".GENERALISED_CONE.");
|
||||
static TCollection_AsciiString bssfToroidalSurf(".TOROIDAL_SURF.");
|
||||
static TCollection_AsciiString bssfConicalSurf(".CONICAL_SURF.");
|
||||
static TCollection_AsciiString bssfSphericalSurf(".SPHERICAL_SURF.");
|
||||
static TCollection_AsciiString bssfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bssfRuledSurf(".RULED_SURF.");
|
||||
static TCollection_AsciiString bssfSurfOfRevolution(".SURF_OF_REVOLUTION.");
|
||||
static TCollection_AsciiString bssfCylindricalSurf(".CYLINDRICAL_SURF.");
|
||||
static TCollection_AsciiString bssfQuadricSurf(".QUADRIC_SURF.");
|
||||
|
||||
RWStepGeom_RWBSplineSurface::RWStepGeom_RWBSplineSurface () {}
|
||||
|
||||
void RWStepGeom_RWBSplineSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,8,ach,"b_spline_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);
|
||||
|
||||
// --- own field : uDegree ---
|
||||
|
||||
Standard_Integer aUDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"u_degree",ach,aUDegree);
|
||||
|
||||
// --- own field : vDegree ---
|
||||
|
||||
Standard_Integer aVDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadInteger (num,3,"v_degree",ach,aVDegree);
|
||||
|
||||
// --- own field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent4;
|
||||
Standard_Integer nsub4;
|
||||
if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
|
||||
Standard_Integer nbi4 = data->NbParams(nsub4);
|
||||
Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
|
||||
aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
|
||||
for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
|
||||
Standard_Integer nsi4;
|
||||
if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
|
||||
for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
if (data->ReadEntity (nsi4, j4,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent4))
|
||||
aControlPointsList->SetValue(i4, j4, anent4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : surfaceForm ---
|
||||
|
||||
StepGeom_BSplineSurfaceForm aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
if (data->ParamType(num,5) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,5);
|
||||
if (bssfSurfOfLinearExtrusion.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfLinearExtrusion;
|
||||
else if (bssfPlaneSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
else if (bssfGeneralisedCone.IsEqual(text)) aSurfaceForm = StepGeom_bssfGeneralisedCone;
|
||||
else if (bssfToroidalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfToroidalSurf;
|
||||
else if (bssfConicalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfConicalSurf;
|
||||
else if (bssfSphericalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfSphericalSurf;
|
||||
else if (bssfUnspecified.IsEqual(text)) aSurfaceForm = StepGeom_bssfUnspecified;
|
||||
else if (bssfRuledSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfRuledSurf;
|
||||
else if (bssfSurfOfRevolution.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfRevolution;
|
||||
else if (bssfCylindricalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfCylindricalSurf;
|
||||
else if (bssfQuadricSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfQuadricSurf;
|
||||
else ach->AddFail("Enumeration b_spline_surface_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #5 (surface_form) is not an enumeration");
|
||||
|
||||
// --- own field : uClosed ---
|
||||
|
||||
StepData_Logical aUClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"u_closed",ach,aUClosed);
|
||||
|
||||
// --- own field : vClosed ---
|
||||
|
||||
StepData_Logical aVClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
data->ReadLogical (num,7,"v_closed",ach,aVClosed);
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
data->ReadLogical (num,8,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : uDegree ---
|
||||
|
||||
SW.Send(ent->UDegree());
|
||||
|
||||
// --- own field : vDegree ---
|
||||
|
||||
SW.Send(ent->VDegree());
|
||||
|
||||
// --- own field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i4 = 1; i4 <= ent->NbControlPointsListI(); i4 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j4 = 1; j4 <= ent->NbControlPointsListJ(); j4 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i4,j4));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : surfaceForm ---
|
||||
|
||||
switch(ent->SurfaceForm()) {
|
||||
case StepGeom_bssfSurfOfLinearExtrusion : SW.SendEnum (bssfSurfOfLinearExtrusion); break;
|
||||
case StepGeom_bssfPlaneSurf : SW.SendEnum (bssfPlaneSurf); break;
|
||||
case StepGeom_bssfGeneralisedCone : SW.SendEnum (bssfGeneralisedCone); break;
|
||||
case StepGeom_bssfToroidalSurf : SW.SendEnum (bssfToroidalSurf); break;
|
||||
case StepGeom_bssfConicalSurf : SW.SendEnum (bssfConicalSurf); break;
|
||||
case StepGeom_bssfSphericalSurf : SW.SendEnum (bssfSphericalSurf); break;
|
||||
case StepGeom_bssfUnspecified : SW.SendEnum (bssfUnspecified); break;
|
||||
case StepGeom_bssfRuledSurf : SW.SendEnum (bssfRuledSurf); break;
|
||||
case StepGeom_bssfSurfOfRevolution : SW.SendEnum (bssfSurfOfRevolution); break;
|
||||
case StepGeom_bssfCylindricalSurf : SW.SendEnum (bssfCylindricalSurf); break;
|
||||
case StepGeom_bssfQuadricSurf : SW.SendEnum (bssfQuadricSurf); break;
|
||||
}
|
||||
|
||||
// --- own field : uClosed ---
|
||||
|
||||
SW.SendLogical(ent->UClosed());
|
||||
|
||||
// --- own field : vClosed ---
|
||||
|
||||
SW.SendLogical(ent->VClosed());
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurface::Share(const Handle(StepGeom_BSplineSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbiElem1 = ent->NbControlPointsListI();
|
||||
Standard_Integer nbjElem1 = ent->NbControlPointsListJ();
|
||||
for (Standard_Integer is1=1; is1<=nbiElem1; is1 ++) {
|
||||
for (Standard_Integer js1=1; js1<=nbjElem1; js1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1,js1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
33
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cdl
Executable file
33
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BSplineSurfaceWithKnots.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineSurfaceWithKnots from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineSurfaceWithKnots
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineSurfaceWithKnots from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineSurfaceWithKnots;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineSurfaceWithKnots from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineSurfaceWithKnots from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineSurfaceWithKnots from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : BSplineSurfaceWithKnots from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWBSplineSurfaceWithKnots;
|
405
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx
Executable file
405
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx
Executable file
@@ -0,0 +1,405 @@
|
||||
|
||||
#include <RWStepGeom_RWBSplineSurfaceWithKnots.ixx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <StepGeom_KnotType.hxx>
|
||||
#include <StepGeom_HArray2OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineSurfaceForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineSurfaceWithKnots.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : KnotType ---
|
||||
static TCollection_AsciiString ktUniformKnots(".UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktQuasiUniformKnots(".QUASI_UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktPiecewiseBezierKnots(".PIECEWISE_BEZIER_KNOTS.");
|
||||
static TCollection_AsciiString ktUnspecified(".UNSPECIFIED.");
|
||||
|
||||
|
||||
// --- Enum : BSplineSurfaceForm ---
|
||||
static TCollection_AsciiString bssfSurfOfLinearExtrusion(".SURF_OF_LINEAR_EXTRUSION.");
|
||||
static TCollection_AsciiString bssfPlaneSurf(".PLANE_SURF.");
|
||||
static TCollection_AsciiString bssfGeneralisedCone(".GENERALISED_CONE.");
|
||||
static TCollection_AsciiString bssfToroidalSurf(".TOROIDAL_SURF.");
|
||||
static TCollection_AsciiString bssfConicalSurf(".CONICAL_SURF.");
|
||||
static TCollection_AsciiString bssfSphericalSurf(".SPHERICAL_SURF.");
|
||||
static TCollection_AsciiString bssfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bssfRuledSurf(".RULED_SURF.");
|
||||
static TCollection_AsciiString bssfSurfOfRevolution(".SURF_OF_REVOLUTION.");
|
||||
static TCollection_AsciiString bssfCylindricalSurf(".CYLINDRICAL_SURF.");
|
||||
static TCollection_AsciiString bssfQuadricSurf(".QUADRIC_SURF.");
|
||||
|
||||
RWStepGeom_RWBSplineSurfaceWithKnots::RWStepGeom_RWBSplineSurfaceWithKnots () {}
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnots::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineSurfaceWithKnots)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,13,ach,"b_spline_surface_with_knots")) 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 : uDegree ---
|
||||
|
||||
Standard_Integer aUDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"u_degree",ach,aUDegree);
|
||||
|
||||
// --- inherited field : vDegree ---
|
||||
|
||||
Standard_Integer aVDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadInteger (num,3,"v_degree",ach,aVDegree);
|
||||
|
||||
// --- inherited field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent4;
|
||||
Standard_Integer nsub4;
|
||||
if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
|
||||
Standard_Integer nbi4 = data->NbParams(nsub4);
|
||||
Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
|
||||
aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
|
||||
for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
|
||||
Standard_Integer nsi4;
|
||||
if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
|
||||
for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
if (data->ReadEntity (nsi4, j4,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent4))
|
||||
aControlPointsList->SetValue(i4, j4, anent4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : surfaceForm ---
|
||||
|
||||
StepGeom_BSplineSurfaceForm aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
if (data->ParamType(num,5) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,5);
|
||||
if (bssfSurfOfLinearExtrusion.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfLinearExtrusion;
|
||||
else if (bssfPlaneSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
else if (bssfGeneralisedCone.IsEqual(text)) aSurfaceForm = StepGeom_bssfGeneralisedCone;
|
||||
else if (bssfToroidalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfToroidalSurf;
|
||||
else if (bssfConicalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfConicalSurf;
|
||||
else if (bssfSphericalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfSphericalSurf;
|
||||
else if (bssfUnspecified.IsEqual(text)) aSurfaceForm = StepGeom_bssfUnspecified;
|
||||
else if (bssfRuledSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfRuledSurf;
|
||||
else if (bssfSurfOfRevolution.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfRevolution;
|
||||
else if (bssfCylindricalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfCylindricalSurf;
|
||||
else if (bssfQuadricSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfQuadricSurf;
|
||||
else ach->AddFail("Enumeration b_spline_surface_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #5 (surface_form) is not an enumeration");
|
||||
|
||||
// --- inherited field : uClosed ---
|
||||
|
||||
StepData_Logical aUClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"u_closed",ach,aUClosed);
|
||||
|
||||
// --- inherited field : vClosed ---
|
||||
|
||||
StepData_Logical aVClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
data->ReadLogical (num,7,"v_closed",ach,aVClosed);
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
data->ReadLogical (num,8,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
// --- own field : uMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aUMultiplicities;
|
||||
Standard_Integer aUMultiplicitiesItem;
|
||||
Standard_Integer nsub9;
|
||||
if (data->ReadSubList (num,9,"u_multiplicities",ach,nsub9)) {
|
||||
Standard_Integer nb9 = data->NbParams(nsub9);
|
||||
aUMultiplicities = new TColStd_HArray1OfInteger (1, nb9);
|
||||
for (Standard_Integer i9 = 1; i9 <= nb9; i9 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat9 =` not needed
|
||||
if (data->ReadInteger (nsub9,i9,"u_multiplicities",ach,aUMultiplicitiesItem))
|
||||
aUMultiplicities->SetValue(i9,aUMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : vMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aVMultiplicities;
|
||||
Standard_Integer aVMultiplicitiesItem;
|
||||
Standard_Integer nsub10;
|
||||
if (data->ReadSubList (num,10,"v_multiplicities",ach,nsub10)) {
|
||||
Standard_Integer nb10 = data->NbParams(nsub10);
|
||||
aVMultiplicities = new TColStd_HArray1OfInteger (1, nb10);
|
||||
for (Standard_Integer i10 = 1; i10 <= nb10; i10 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat10 =` not needed
|
||||
if (data->ReadInteger (nsub10,i10,"v_multiplicities",ach,aVMultiplicitiesItem))
|
||||
aVMultiplicities->SetValue(i10,aVMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : uKnots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aUKnots;
|
||||
Standard_Real aUKnotsItem;
|
||||
Standard_Integer nsub11;
|
||||
if (data->ReadSubList (num,11,"u_knots",ach,nsub11)) {
|
||||
Standard_Integer nb11 = data->NbParams(nsub11);
|
||||
aUKnots = new TColStd_HArray1OfReal (1, nb11);
|
||||
for (Standard_Integer i11 = 1; i11 <= nb11; i11 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat11 =` not needed
|
||||
if (data->ReadReal (nsub11,i11,"u_knots",ach,aUKnotsItem))
|
||||
aUKnots->SetValue(i11,aUKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : vKnots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aVKnots;
|
||||
Standard_Real aVKnotsItem;
|
||||
Standard_Integer nsub12;
|
||||
if (data->ReadSubList (num,12,"v_knots",ach,nsub12)) {
|
||||
Standard_Integer nb12 = data->NbParams(nsub12);
|
||||
aVKnots = new TColStd_HArray1OfReal (1, nb12);
|
||||
for (Standard_Integer i12 = 1; i12 <= nb12; i12 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat12 =` not needed
|
||||
if (data->ReadReal (nsub12,i12,"v_knots",ach,aVKnotsItem))
|
||||
aVKnots->SetValue(i12,aVKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : knotSpec ---
|
||||
|
||||
StepGeom_KnotType aKnotSpec = StepGeom_ktUniformKnots;
|
||||
if (data->ParamType(num,13) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,13);
|
||||
if (ktUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktUniformKnots;
|
||||
else if (ktQuasiUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktQuasiUniformKnots;
|
||||
else if (ktPiecewiseBezierKnots.IsEqual(text)) aKnotSpec = StepGeom_ktPiecewiseBezierKnots;
|
||||
else if (ktUnspecified.IsEqual(text)) aKnotSpec = StepGeom_ktUnspecified;
|
||||
else ach->AddFail("Enumeration knot_type has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #13 (knot_spec) is not an enumeration");
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aUMultiplicities, aVMultiplicities, aUKnots, aVKnots, aKnotSpec);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnots::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineSurfaceWithKnots)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field uDegree ---
|
||||
|
||||
SW.Send(ent->UDegree());
|
||||
|
||||
// --- inherited field vDegree ---
|
||||
|
||||
SW.Send(ent->VDegree());
|
||||
|
||||
// --- inherited field controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i4 = 1; i4 <= ent->NbControlPointsListI(); i4 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j4 = 1; j4 <= ent->NbControlPointsListJ(); j4 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i4,j4));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field surfaceForm ---
|
||||
|
||||
switch(ent->SurfaceForm()) {
|
||||
case StepGeom_bssfSurfOfLinearExtrusion : SW.SendEnum (bssfSurfOfLinearExtrusion); break;
|
||||
case StepGeom_bssfPlaneSurf : SW.SendEnum (bssfPlaneSurf); break;
|
||||
case StepGeom_bssfGeneralisedCone : SW.SendEnum (bssfGeneralisedCone); break;
|
||||
case StepGeom_bssfToroidalSurf : SW.SendEnum (bssfToroidalSurf); break;
|
||||
case StepGeom_bssfConicalSurf : SW.SendEnum (bssfConicalSurf); break;
|
||||
case StepGeom_bssfSphericalSurf : SW.SendEnum (bssfSphericalSurf); break;
|
||||
case StepGeom_bssfUnspecified : SW.SendEnum (bssfUnspecified); break;
|
||||
case StepGeom_bssfRuledSurf : SW.SendEnum (bssfRuledSurf); break;
|
||||
case StepGeom_bssfSurfOfRevolution : SW.SendEnum (bssfSurfOfRevolution); break;
|
||||
case StepGeom_bssfCylindricalSurf : SW.SendEnum (bssfCylindricalSurf); break;
|
||||
case StepGeom_bssfQuadricSurf : SW.SendEnum (bssfQuadricSurf); break;
|
||||
}
|
||||
|
||||
// --- inherited field uClosed ---
|
||||
|
||||
SW.SendLogical(ent->UClosed());
|
||||
|
||||
// --- inherited field vClosed ---
|
||||
|
||||
SW.SendLogical(ent->VClosed());
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- own field : uMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i9 = 1; i9 <= ent->NbUMultiplicities(); i9 ++) {
|
||||
SW.Send(ent->UMultiplicitiesValue(i9));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : vMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i10 = 1; i10 <= ent->NbVMultiplicities(); i10 ++) {
|
||||
SW.Send(ent->VMultiplicitiesValue(i10));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : uKnots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i11 = 1; i11 <= ent->NbUKnots(); i11 ++) {
|
||||
SW.Send(ent->UKnotsValue(i11));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : vKnots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i12 = 1; i12 <= ent->NbVKnots(); i12 ++) {
|
||||
SW.Send(ent->VKnotsValue(i12));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : knotSpec ---
|
||||
|
||||
switch(ent->KnotSpec()) {
|
||||
case StepGeom_ktUniformKnots : SW.SendEnum (ktUniformKnots); break;
|
||||
case StepGeom_ktQuasiUniformKnots : SW.SendEnum (ktQuasiUniformKnots); break;
|
||||
case StepGeom_ktPiecewiseBezierKnots : SW.SendEnum (ktPiecewiseBezierKnots); break;
|
||||
case StepGeom_ktUnspecified : SW.SendEnum (ktUnspecified); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnots::Share(const Handle(StepGeom_BSplineSurfaceWithKnots)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbiElem1 = ent->NbControlPointsListI();
|
||||
Standard_Integer nbjElem1 = ent->NbControlPointsListJ();
|
||||
for (Standard_Integer is1=1; is1<=nbiElem1; is1 ++) {
|
||||
for (Standard_Integer js1=1; js1<=nbjElem1; js1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1,js1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnots::Check
|
||||
(const Handle(StepGeom_BSplineSurfaceWithKnots)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Standard_Integer nbCPLU = ent->NbControlPointsListI();
|
||||
Standard_Integer nbCPLV = ent->NbControlPointsListJ();
|
||||
Standard_Integer dgBSSU = ent->UDegree();
|
||||
Standard_Integer dgBSSV = ent->VDegree();
|
||||
Standard_Integer nbMulU = ent->NbUMultiplicities();
|
||||
Standard_Integer nbMulV = ent->NbVMultiplicities();
|
||||
Standard_Integer nbKnoU = ent->NbUKnots();
|
||||
Standard_Integer nbKnoV = ent->NbVKnots();
|
||||
Standard_Integer sumMulU = 0;
|
||||
Standard_Integer sumMulV = 0;
|
||||
Standard_Integer i;
|
||||
// cout << "BSplineSurfaceWithKnots: nbMulU=" << nbMulU << " nbKnoU= " <<
|
||||
// nbKnoU << " nbCPLU= " << nbCPLU << " degreeU= " << dgBSSU << endl;
|
||||
// cout << " nbMulV=" << nbMulV << " nbKnoV= " <<
|
||||
// nbKnoV << " nbCPLV= " << nbCPLV << " degreeV= " << dgBSSV << endl;
|
||||
if(nbMulU != nbKnoU) {
|
||||
ach->AddFail("ERROR: No.of KnotMultiplicities not equal No.of Knots in U");
|
||||
}
|
||||
if(nbMulV != nbKnoV) {
|
||||
ach->AddFail("ERROR: No.of KnotMultiplicities not equal No.of Knots in V");
|
||||
}
|
||||
|
||||
// check in U direction
|
||||
|
||||
for(i=1; i<=nbMulU-1; i++) {
|
||||
sumMulU = sumMulU + ent->UMultiplicitiesValue(i);
|
||||
}
|
||||
Standard_Integer sumNonPU = nbCPLU + dgBSSU + 1;
|
||||
Standard_Integer mult1U = ent->UMultiplicitiesValue(1);
|
||||
Standard_Integer multNU = ent->UMultiplicitiesValue(nbMulU);
|
||||
// cout << "BSplineSurfaceWithKnots: mult1U=" << mult1U << " multNU= " <<
|
||||
// multNU << " sumMulU= " << sumMulU << endl;
|
||||
if((sumMulU + multNU) == sumNonPU) {
|
||||
}
|
||||
else if((sumMulU == nbCPLU) && (mult1U == multNU)) {
|
||||
}
|
||||
else {
|
||||
ach->AddFail("ERROR: wrong number of Knot Multiplicities in U");
|
||||
}
|
||||
for(i=2; i<=nbKnoU; i++) {
|
||||
Standard_Real distKn = ent->UKnotsValue(i-1) - ent->UKnotsValue(i);
|
||||
if(Abs(distKn) <= RealEpsilon())
|
||||
ach->AddWarning("WARNING: Surface contains identical KnotsValues in U");
|
||||
else if(distKn > RealEpsilon())
|
||||
ach->AddFail("ERROR: Surface contains descending KnotsValues in U");
|
||||
}
|
||||
|
||||
// check in V direction
|
||||
|
||||
for(i=1; i<=nbMulV-1; i++) {
|
||||
sumMulV = sumMulV + ent->VMultiplicitiesValue(i);
|
||||
}
|
||||
Standard_Integer sumNonPV = nbCPLV + dgBSSV + 1;
|
||||
Standard_Integer mult1V = ent->VMultiplicitiesValue(1);
|
||||
Standard_Integer multNV = ent->VMultiplicitiesValue(nbMulV);
|
||||
// cout << " : mult1V=" << mult1V << " multNV= " <<
|
||||
// multNV << " sumMulV= " << sumMulV << endl;
|
||||
if((sumMulV + multNV) == sumNonPV) {
|
||||
}
|
||||
else if((sumMulV == nbCPLV) && (mult1V == multNV)) {
|
||||
}
|
||||
else {
|
||||
ach->AddFail("ERROR: wrong number of Knot Multiplicities in V");
|
||||
}
|
||||
for(i=2; i<=nbKnoV; i++) {
|
||||
Standard_Real distKn = ent->VKnotsValue(i-1) - ent->VKnotsValue(i);
|
||||
if(Abs(distKn) <= RealEpsilon())
|
||||
ach->AddWarning("WARNING: Surface contains identical KnotsValues in V");
|
||||
else if(distKn > RealEpsilon())
|
||||
ach->AddFail("ERROR: Surface contains descending KnotsValues in V");
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
-- File: BSplineSurfaceWithKnotsAndRationalBSplineSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:34 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBSplineSurfaceWithKnotsAndRationalBSplineSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BSplineSurfaceWithKnotsAndRationalBSplineSurface
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BSplineSurfaceWithKnotsAndRationalBSplineSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBSplineSurfaceWithKnotsAndRationalBSplineSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BSplineSurfaceWithKnotsAndRationalBSplineSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BSplineSurfaceWithKnotsAndRationalBSplineSurface from StepGeom);
|
||||
|
||||
Share(me; ent : BSplineSurfaceWithKnotsAndRationalBSplineSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : BSplineSurfaceWithKnotsAndRationalBSplineSurface from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWBSplineSurfaceWithKnotsAndRationalBSplineSurface;
|
444
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
Executable file
444
src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx
Executable file
@@ -0,0 +1,444 @@
|
||||
|
||||
#include <RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.ixx>
|
||||
#include <StepGeom_BSplineSurfaceWithKnots.hxx>
|
||||
#include <StepGeom_RationalBSplineSurface.hxx>
|
||||
#include <StepGeom_HArray2OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineSurfaceForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <StepGeom_KnotType.hxx>
|
||||
#include <TColStd_HArray2OfReal.hxx>
|
||||
|
||||
#include <RWStepGeom_RWBSplineSurfaceWithKnots.hxx>
|
||||
#include <RWStepGeom_RWRationalBSplineSurface.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineSurfaceForm ---
|
||||
static TCollection_AsciiString bssfSurfOfLinearExtrusion(".SURF_OF_LINEAR_EXTRUSION.");
|
||||
static TCollection_AsciiString bssfPlaneSurf(".PLANE_SURF.");
|
||||
static TCollection_AsciiString bssfGeneralisedCone(".GENERALISED_CONE.");
|
||||
static TCollection_AsciiString bssfToroidalSurf(".TOROIDAL_SURF.");
|
||||
static TCollection_AsciiString bssfConicalSurf(".CONICAL_SURF.");
|
||||
static TCollection_AsciiString bssfSphericalSurf(".SPHERICAL_SURF.");
|
||||
static TCollection_AsciiString bssfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bssfRuledSurf(".RULED_SURF.");
|
||||
static TCollection_AsciiString bssfSurfOfRevolution(".SURF_OF_REVOLUTION.");
|
||||
static TCollection_AsciiString bssfCylindricalSurf(".CYLINDRICAL_SURF.");
|
||||
static TCollection_AsciiString bssfQuadricSurf(".QUADRIC_SURF.");
|
||||
|
||||
// --- Enum : KnotType ---
|
||||
static TCollection_AsciiString ktUniformKnots(".UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktQuasiUniformKnots(".QUASI_UNIFORM_KNOTS.");
|
||||
static TCollection_AsciiString ktPiecewiseBezierKnots(".PIECEWISE_BEZIER_KNOTS.");
|
||||
static TCollection_AsciiString ktUnspecified(".UNSPECIFIED.");
|
||||
|
||||
RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface () {}
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = 0; // num0
|
||||
data->NamedForComplex("BOUNDED_SURFACE BNDSRF",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant BoundedSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bounded_surface")) return;
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("B_SPLINE_SURFACE BSPSR",num0,num,ach);
|
||||
|
||||
// --- Instance of common supertype BSplineSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,7,ach,"b_spline_surface")) return;
|
||||
// --- field : uDegree ---
|
||||
|
||||
|
||||
Standard_Integer aUDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"u_degree",ach,aUDegree);
|
||||
// --- field : vDegree ---
|
||||
|
||||
|
||||
Standard_Integer aVDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"v_degree",ach,aVDegree);
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
|
||||
Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
|
||||
Standard_Integer nbi3 = data->NbParams(nsub3);
|
||||
Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
|
||||
aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
|
||||
Standard_Integer nsi3;
|
||||
if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) {
|
||||
Standard_Integer nsi3 = data->ParamNumber(nsub3,i3);
|
||||
for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsi3, j3,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent3))
|
||||
aControlPointsList->SetValue(i3, j3, anent3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : surfaceForm ---
|
||||
|
||||
|
||||
StepGeom_BSplineSurfaceForm aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (bssfSurfOfLinearExtrusion.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfLinearExtrusion;
|
||||
else if (bssfPlaneSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
else if (bssfGeneralisedCone.IsEqual(text)) aSurfaceForm = StepGeom_bssfGeneralisedCone;
|
||||
else if (bssfToroidalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfToroidalSurf;
|
||||
else if (bssfConicalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfConicalSurf;
|
||||
else if (bssfSphericalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfSphericalSurf;
|
||||
else if (bssfUnspecified.IsEqual(text)) aSurfaceForm = StepGeom_bssfUnspecified;
|
||||
else if (bssfRuledSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfRuledSurf;
|
||||
else if (bssfSurfOfRevolution.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfRevolution;
|
||||
else if (bssfCylindricalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfCylindricalSurf;
|
||||
else if (bssfQuadricSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfQuadricSurf;
|
||||
else ach->AddFail("Enumeration b_spline_surface_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (surface_form) is not an enumeration");
|
||||
// --- field : uClosed ---
|
||||
|
||||
|
||||
StepData_Logical aUClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"u_closed",ach,aUClosed);
|
||||
// --- field : vClosed ---
|
||||
|
||||
|
||||
StepData_Logical aVClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"v_closed",ach,aVClosed);
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
data->ReadLogical (num,7,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("B_SPLINE_SURFACE_WITH_KNOTS BSSWK",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant BSplineSurfaceWithKnots ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"b_spline_surface_with_knots")) return;
|
||||
|
||||
// --- field : uMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aUMultiplicities;
|
||||
Standard_Integer aUMultiplicitiesItem;
|
||||
Standard_Integer nsub8;
|
||||
if (data->ReadSubList (num,1,"u_multiplicities",ach,nsub8)) {
|
||||
Standard_Integer nb8 = data->NbParams(nsub8);
|
||||
aUMultiplicities = new TColStd_HArray1OfInteger (1, nb8);
|
||||
for (Standard_Integer i8 = 1; i8 <= nb8; i8 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
if (data->ReadInteger (nsub8,i8,"u_multiplicities",ach,aUMultiplicitiesItem))
|
||||
aUMultiplicities->SetValue(i8,aUMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : vMultiplicities ---
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) aVMultiplicities;
|
||||
Standard_Integer aVMultiplicitiesItem;
|
||||
Standard_Integer nsub9;
|
||||
if (data->ReadSubList (num,2,"v_multiplicities",ach,nsub9)) {
|
||||
Standard_Integer nb9 = data->NbParams(nsub9);
|
||||
aVMultiplicities = new TColStd_HArray1OfInteger (1, nb9);
|
||||
for (Standard_Integer i9 = 1; i9 <= nb9; i9 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat9 =` not needed
|
||||
if (data->ReadInteger (nsub9,i9,"v_multiplicities",ach,aVMultiplicitiesItem))
|
||||
aVMultiplicities->SetValue(i9,aVMultiplicitiesItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : uKnots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aUKnots;
|
||||
Standard_Real aUKnotsItem;
|
||||
Standard_Integer nsub10;
|
||||
if (data->ReadSubList (num,3,"u_knots",ach,nsub10)) {
|
||||
Standard_Integer nb10 = data->NbParams(nsub10);
|
||||
aUKnots = new TColStd_HArray1OfReal (1, nb10);
|
||||
for (Standard_Integer i10 = 1; i10 <= nb10; i10 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat10 =` not needed
|
||||
if (data->ReadReal (nsub10,i10,"u_knots",ach,aUKnotsItem))
|
||||
aUKnots->SetValue(i10,aUKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : vKnots ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aVKnots;
|
||||
Standard_Real aVKnotsItem;
|
||||
Standard_Integer nsub11;
|
||||
if (data->ReadSubList (num,4,"v_knots",ach,nsub11)) {
|
||||
Standard_Integer nb11 = data->NbParams(nsub11);
|
||||
aVKnots = new TColStd_HArray1OfReal (1, nb11);
|
||||
for (Standard_Integer i11 = 1; i11 <= nb11; i11 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat11 =` not needed
|
||||
if (data->ReadReal (nsub11,i11,"v_knots",ach,aVKnotsItem))
|
||||
aVKnots->SetValue(i11,aVKnotsItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : knotSpec ---
|
||||
|
||||
StepGeom_KnotType aKnotSpec = StepGeom_ktUniformKnots;
|
||||
if (data->ParamType(num,5) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,5);
|
||||
if (ktUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktUniformKnots;
|
||||
else if (ktQuasiUniformKnots.IsEqual(text)) aKnotSpec = StepGeom_ktQuasiUniformKnots;
|
||||
else if (ktPiecewiseBezierKnots.IsEqual(text)) aKnotSpec = StepGeom_ktPiecewiseBezierKnots;
|
||||
else if (ktUnspecified.IsEqual(text)) aKnotSpec = StepGeom_ktUnspecified;
|
||||
else ach->AddFail("Enumeration knot_type has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #5 (knot_spec) is not an enumeration");
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("GEOMETRIC_REPRESENTATION_ITEM GMRPIT",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"geometric_representation_item")) return;
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("RATIONAL_B_SPLINE_SURFACE RBSS",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant RationalBSplineSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"rational_b_spline_surface")) return;
|
||||
|
||||
// --- field : weightsData ---
|
||||
|
||||
Handle(TColStd_HArray2OfReal) aWeightsData;
|
||||
Standard_Real aWeightsDataItem;
|
||||
Standard_Integer nsub13;
|
||||
if (data->ReadSubList (num,1,"weights_data",ach,nsub13)) {
|
||||
Standard_Integer nbi13 = data->NbParams(nsub13);
|
||||
Standard_Integer nbj13 = data->NbParams(data->ParamNumber(nsub13,1));
|
||||
aWeightsData = new TColStd_HArray2OfReal (1,nbi13,1,nbj13);
|
||||
for (Standard_Integer i13 = 1; i13 <= nbi13; i13 ++) {
|
||||
Standard_Integer nsi13;
|
||||
if (data->ReadSubList (nsub13,i13,"sub-part(weights_data)",ach,nsi13)) {
|
||||
Standard_Integer nsi13 = data->ParamNumber(nsub13,i13);
|
||||
for (Standard_Integer j13 =1; j13 <= nbj13; j13 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat13 =` not needed
|
||||
if (data->ReadReal (nsi13,j13,"weights_data",ach,aWeightsDataItem))
|
||||
aWeightsData->SetValue(i13,j13,aWeightsDataItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("REPRESENTATION_ITEM RPRITM",num0,num,ach);
|
||||
|
||||
// --- 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 stat14 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
// num = data->NextForComplex(num);
|
||||
data->NamedForComplex("SURFACE SRFC",num0,num,ach);
|
||||
|
||||
// --- Instance of plex componant Surface ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"surface")) return;
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName,aUDegree,aVDegree,aControlPointsList,aSurfaceForm,aUClosed,aVClosed,aSelfIntersect,aUMultiplicities,aVMultiplicities,aUKnots,aVKnots,aKnotSpec,aWeightsData);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant BoundedSurface ---
|
||||
|
||||
SW.StartEntity("BOUNDED_SURFACE");
|
||||
|
||||
// --- Instance of common supertype BSplineSurface ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_SURFACE");
|
||||
// --- field : uDegree ---
|
||||
|
||||
SW.Send(ent->UDegree());
|
||||
// --- field : vDegree ---
|
||||
|
||||
SW.Send(ent->VDegree());
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbControlPointsListI(); i3 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j3 = 1; j3 <= ent->NbControlPointsListJ(); j3 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i3,j3));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : surfaceForm ---
|
||||
|
||||
switch(ent->SurfaceForm()) {
|
||||
case StepGeom_bssfSurfOfLinearExtrusion : SW.SendEnum (bssfSurfOfLinearExtrusion); break;
|
||||
case StepGeom_bssfPlaneSurf : SW.SendEnum (bssfPlaneSurf); break;
|
||||
case StepGeom_bssfGeneralisedCone : SW.SendEnum (bssfGeneralisedCone); break;
|
||||
case StepGeom_bssfToroidalSurf : SW.SendEnum (bssfToroidalSurf); break;
|
||||
case StepGeom_bssfConicalSurf : SW.SendEnum (bssfConicalSurf); break;
|
||||
case StepGeom_bssfSphericalSurf : SW.SendEnum (bssfSphericalSurf); break;
|
||||
case StepGeom_bssfUnspecified : SW.SendEnum (bssfUnspecified); break;
|
||||
case StepGeom_bssfRuledSurf : SW.SendEnum (bssfRuledSurf); break;
|
||||
case StepGeom_bssfSurfOfRevolution : SW.SendEnum (bssfSurfOfRevolution); break;
|
||||
case StepGeom_bssfCylindricalSurf : SW.SendEnum (bssfCylindricalSurf); break;
|
||||
case StepGeom_bssfQuadricSurf : SW.SendEnum (bssfQuadricSurf); break;
|
||||
}
|
||||
// --- field : uClosed ---
|
||||
|
||||
SW.SendLogical(ent->UClosed());
|
||||
// --- field : vClosed ---
|
||||
|
||||
SW.SendLogical(ent->VClosed());
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- Instance of plex componant BSplineSurfaceWithKnots ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_SURFACE_WITH_KNOTS");
|
||||
// --- field : uMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i8 = 1; i8 <= ent->NbUMultiplicities(); i8 ++) {
|
||||
SW.Send(ent->UMultiplicitiesValue(i8));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : vMultiplicities ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i9 = 1; i9 <= ent->NbVMultiplicities(); i9 ++) {
|
||||
SW.Send(ent->VMultiplicitiesValue(i9));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : uKnots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i10 = 1; i10 <= ent->NbUKnots(); i10 ++) {
|
||||
SW.Send(ent->UKnotsValue(i10));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : vKnots ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i11 = 1; i11 <= ent->NbVKnots(); i11 ++) {
|
||||
SW.Send(ent->VKnotsValue(i11));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : knotSpec ---
|
||||
|
||||
switch(ent->KnotSpec()) {
|
||||
case StepGeom_ktUniformKnots : SW.SendEnum (ktUniformKnots); break;
|
||||
case StepGeom_ktQuasiUniformKnots : SW.SendEnum (ktQuasiUniformKnots); break;
|
||||
case StepGeom_ktPiecewiseBezierKnots : SW.SendEnum (ktPiecewiseBezierKnots); break;
|
||||
case StepGeom_ktUnspecified : SW.SendEnum (ktUnspecified); break;
|
||||
}
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
||||
|
||||
// --- Instance of plex componant RationalBSplineSurface ---
|
||||
|
||||
SW.StartEntity("RATIONAL_B_SPLINE_SURFACE");
|
||||
// --- field : weightsData ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i13 = 1; i13 <= ent->NbWeightsDataI(); i13 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j13 = 1; j13 <= ent->NbWeightsDataJ(); j13 ++) {
|
||||
SW.Send(ent->WeightsDataValue(i13,j13));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- Instance of plex componant Surface ---
|
||||
|
||||
SW.StartEntity("SURFACE");
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::Share(const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbiElem1 = ent->NbControlPointsListI();
|
||||
Standard_Integer nbjElem1 = ent->NbControlPointsListJ();
|
||||
for (Standard_Integer is1=1; is1<=nbiElem1; is1 ++) {
|
||||
for (Standard_Integer js1=1; js1<=nbjElem1; js1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1,js1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::Check
|
||||
(const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& ent,
|
||||
const Interface_ShareTool& aShto,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) aRationalBSS =
|
||||
Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)
|
||||
::DownCast(ent);
|
||||
Handle(StepGeom_BSplineSurfaceWithKnots) aBSSWK =
|
||||
aRationalBSS->BSplineSurfaceWithKnots();
|
||||
RWStepGeom_RWBSplineSurfaceWithKnots t1;
|
||||
t1.Check(aBSSWK,aShto,ach);
|
||||
Handle(StepGeom_RationalBSplineSurface) aRBSS =
|
||||
aRationalBSS->RationalBSplineSurface();
|
||||
RWStepGeom_RWRationalBSplineSurface t2;
|
||||
t2.Check(aRBSS,aShto,ach);
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWBezierCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBezierCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BezierCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBezierCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BezierCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BezierCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBezierCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BezierCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BezierCurve from StepGeom);
|
||||
|
||||
Share(me; ent : BezierCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBezierCurve;
|
151
src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx
Executable file
151
src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx
Executable file
@@ -0,0 +1,151 @@
|
||||
|
||||
#include <RWStepGeom_RWBezierCurve.ixx>
|
||||
#include <StepGeom_HArray1OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineCurveForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BezierCurve.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineCurveForm ---
|
||||
static TCollection_AsciiString bscfEllipticArc(".ELLIPTIC_ARC.");
|
||||
static TCollection_AsciiString bscfPolylineForm(".POLYLINE_FORM.");
|
||||
static TCollection_AsciiString bscfParabolicArc(".PARABOLIC_ARC.");
|
||||
static TCollection_AsciiString bscfCircularArc(".CIRCULAR_ARC.");
|
||||
static TCollection_AsciiString bscfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bscfHyperbolicArc(".HYPERBOLIC_ARC.");
|
||||
|
||||
RWStepGeom_RWBezierCurve::RWStepGeom_RWBezierCurve () {}
|
||||
|
||||
void RWStepGeom_RWBezierCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BezierCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,6,ach,"bezier_curve")) 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 : degree ---
|
||||
|
||||
Standard_Integer aDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"degree",ach,aDegree);
|
||||
|
||||
// --- inherited field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3, i3,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent3))
|
||||
aControlPointsList->SetValue(i3, anent3);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : curveForm ---
|
||||
|
||||
StepGeom_BSplineCurveForm aCurveForm = StepGeom_bscfPolylineForm;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (bscfEllipticArc.IsEqual(text)) aCurveForm = StepGeom_bscfEllipticArc;
|
||||
else if (bscfPolylineForm.IsEqual(text)) aCurveForm = StepGeom_bscfPolylineForm;
|
||||
else if (bscfParabolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfParabolicArc;
|
||||
else if (bscfCircularArc.IsEqual(text)) aCurveForm = StepGeom_bscfCircularArc;
|
||||
else if (bscfUnspecified.IsEqual(text)) aCurveForm = StepGeom_bscfUnspecified;
|
||||
else if (bscfHyperbolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfHyperbolicArc;
|
||||
else ach->AddFail("Enumeration b_spline_curve_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (curve_form) is not an enumeration");
|
||||
|
||||
// --- inherited field : closedCurve ---
|
||||
|
||||
StepData_Logical aClosedCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"closed_curve",ach,aClosedCurve);
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BezierCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field degree ---
|
||||
|
||||
SW.Send(ent->Degree());
|
||||
|
||||
// --- inherited field controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbControlPointsList(); i3 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i3));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field curveForm ---
|
||||
|
||||
switch(ent->CurveForm()) {
|
||||
case StepGeom_bscfEllipticArc : SW.SendEnum (bscfEllipticArc); break;
|
||||
case StepGeom_bscfPolylineForm : SW.SendEnum (bscfPolylineForm); break;
|
||||
case StepGeom_bscfParabolicArc : SW.SendEnum (bscfParabolicArc); break;
|
||||
case StepGeom_bscfCircularArc : SW.SendEnum (bscfCircularArc); break;
|
||||
case StepGeom_bscfUnspecified : SW.SendEnum (bscfUnspecified); break;
|
||||
case StepGeom_bscfHyperbolicArc : SW.SendEnum (bscfHyperbolicArc); break;
|
||||
}
|
||||
|
||||
// --- inherited field closedCurve ---
|
||||
|
||||
SW.SendLogical(ent->ClosedCurve());
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierCurve::Share(const Handle(StepGeom_BezierCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbControlPointsList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BezierCurveAndRationalBSplineCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:33 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBezierCurveAndRationalBSplineCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BezierCurveAndRationalBSplineCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BezierCurveAndRationalBSplineCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBezierCurveAndRationalBSplineCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BezierCurveAndRationalBSplineCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BezierCurveAndRationalBSplineCurve from StepGeom);
|
||||
|
||||
Share(me; ent : BezierCurveAndRationalBSplineCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBezierCurveAndRationalBSplineCurve;
|
236
src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx
Executable file
236
src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx
Executable file
@@ -0,0 +1,236 @@
|
||||
|
||||
#include <RWStepGeom_RWBezierCurveAndRationalBSplineCurve.ixx>
|
||||
#include <StepGeom_BezierCurve.hxx>
|
||||
#include <StepGeom_RationalBSplineCurve.hxx>
|
||||
#include <StepGeom_HArray1OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineCurveForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BezierCurveAndRationalBSplineCurve.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineCurveForm ---
|
||||
static TCollection_AsciiString bscfEllipticArc(".ELLIPTIC_ARC.");
|
||||
static TCollection_AsciiString bscfPolylineForm(".POLYLINE_FORM.");
|
||||
static TCollection_AsciiString bscfParabolicArc(".PARABOLIC_ARC.");
|
||||
static TCollection_AsciiString bscfCircularArc(".CIRCULAR_ARC.");
|
||||
static TCollection_AsciiString bscfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bscfHyperbolicArc(".HYPERBOLIC_ARC.");
|
||||
|
||||
RWStepGeom_RWBezierCurveAndRationalBSplineCurve::RWStepGeom_RWBezierCurveAndRationalBSplineCurve () {}
|
||||
|
||||
void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BezierCurveAndRationalBSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant BezierCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bezier_curve")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant BoundedCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bounded_curve")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype BSplineCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"b_spline_curve")) return;
|
||||
// --- field : degree ---
|
||||
|
||||
|
||||
Standard_Integer aDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"degree",ach,aDegree);
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
|
||||
Handle(StepGeom_HArray1OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"control_points_list",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aControlPointsList = new StepGeom_HArray1OfCartesianPoint (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent2))
|
||||
aControlPointsList->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : curveForm ---
|
||||
|
||||
|
||||
StepGeom_BSplineCurveForm aCurveForm = StepGeom_bscfPolylineForm;
|
||||
if (data->ParamType(num,3) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,3);
|
||||
if (bscfEllipticArc.IsEqual(text)) aCurveForm = StepGeom_bscfEllipticArc;
|
||||
else if (bscfPolylineForm.IsEqual(text)) aCurveForm = StepGeom_bscfPolylineForm;
|
||||
else if (bscfParabolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfParabolicArc;
|
||||
else if (bscfCircularArc.IsEqual(text)) aCurveForm = StepGeom_bscfCircularArc;
|
||||
else if (bscfUnspecified.IsEqual(text)) aCurveForm = StepGeom_bscfUnspecified;
|
||||
else if (bscfHyperbolicArc.IsEqual(text)) aCurveForm = StepGeom_bscfHyperbolicArc;
|
||||
else ach->AddFail("Enumeration b_spline_curve_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #3 (curve_form) is not an enumeration");
|
||||
// --- field : closedCurve ---
|
||||
|
||||
|
||||
StepData_Logical aClosedCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadLogical (num,4,"closed_curve",ach,aClosedCurve);
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant Curve ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"curve")) 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 plex componant RationalBSplineCurve ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"rational_b_spline_curve")) return;
|
||||
|
||||
// --- field : weightsData ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aWeightsData;
|
||||
Standard_Real aWeightsDataItem;
|
||||
Standard_Integer nsub6;
|
||||
if (data->ReadSubList (num,1,"weights_data",ach,nsub6)) {
|
||||
Standard_Integer nb6 = data->NbParams(nsub6);
|
||||
aWeightsData = new TColStd_HArray1OfReal (1, nb6);
|
||||
for (Standard_Integer i6 = 1; i6 <= nb6; i6 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
if (data->ReadReal (nsub6,i6,"weights_data",ach,aWeightsDataItem))
|
||||
aWeightsData->SetValue(i6,aWeightsDataItem);
|
||||
}
|
||||
}
|
||||
|
||||
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 stat7 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName,aDegree,aControlPointsList,aCurveForm,aClosedCurve,aSelfIntersect,aWeightsData);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BezierCurveAndRationalBSplineCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant BezierCurve ---
|
||||
|
||||
SW.StartEntity("BEZIER_CURVE");
|
||||
|
||||
// --- Instance of plex componant BoundedCurve ---
|
||||
|
||||
SW.StartEntity("BOUNDED_CURVE");
|
||||
|
||||
// --- Instance of common supertype BSplineCurve ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_CURVE");
|
||||
// --- field : degree ---
|
||||
|
||||
SW.Send(ent->Degree());
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbControlPointsList(); i2 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : curveForm ---
|
||||
|
||||
switch(ent->CurveForm()) {
|
||||
case StepGeom_bscfEllipticArc : SW.SendEnum (bscfEllipticArc); break;
|
||||
case StepGeom_bscfPolylineForm : SW.SendEnum (bscfPolylineForm); break;
|
||||
case StepGeom_bscfParabolicArc : SW.SendEnum (bscfParabolicArc); break;
|
||||
case StepGeom_bscfCircularArc : SW.SendEnum (bscfCircularArc); break;
|
||||
case StepGeom_bscfUnspecified : SW.SendEnum (bscfUnspecified); break;
|
||||
case StepGeom_bscfHyperbolicArc : SW.SendEnum (bscfHyperbolicArc); break;
|
||||
}
|
||||
// --- field : closedCurve ---
|
||||
|
||||
SW.SendLogical(ent->ClosedCurve());
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- Instance of plex componant Curve ---
|
||||
|
||||
SW.StartEntity("CURVE");
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
||||
|
||||
// --- Instance of plex componant RationalBSplineCurve ---
|
||||
|
||||
SW.StartEntity("RATIONAL_B_SPLINE_CURVE");
|
||||
// --- field : weightsData ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i6 = 1; i6 <= ent->NbWeightsData(); i6 ++) {
|
||||
SW.Send(ent->WeightsDataValue(i6));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierCurveAndRationalBSplineCurve::Share(const Handle(StepGeom_BezierCurveAndRationalBSplineCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbControlPointsList();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWBezierSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBezierSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BezierSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBezierSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BezierSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BezierSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBezierSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BezierSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BezierSurface from StepGeom);
|
||||
|
||||
Share(me; ent : BezierSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBezierSurface;
|
201
src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx
Executable file
201
src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx
Executable file
@@ -0,0 +1,201 @@
|
||||
|
||||
#include <RWStepGeom_RWBezierSurface.ixx>
|
||||
#include <StepGeom_HArray2OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineSurfaceForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BezierSurface.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineSurfaceForm ---
|
||||
static TCollection_AsciiString bssfSurfOfLinearExtrusion(".SURF_OF_LINEAR_EXTRUSION.");
|
||||
static TCollection_AsciiString bssfPlaneSurf(".PLANE_SURF.");
|
||||
static TCollection_AsciiString bssfGeneralisedCone(".GENERALISED_CONE.");
|
||||
static TCollection_AsciiString bssfToroidalSurf(".TOROIDAL_SURF.");
|
||||
static TCollection_AsciiString bssfConicalSurf(".CONICAL_SURF.");
|
||||
static TCollection_AsciiString bssfSphericalSurf(".SPHERICAL_SURF.");
|
||||
static TCollection_AsciiString bssfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bssfRuledSurf(".RULED_SURF.");
|
||||
static TCollection_AsciiString bssfSurfOfRevolution(".SURF_OF_REVOLUTION.");
|
||||
static TCollection_AsciiString bssfCylindricalSurf(".CYLINDRICAL_SURF.");
|
||||
static TCollection_AsciiString bssfQuadricSurf(".QUADRIC_SURF.");
|
||||
|
||||
RWStepGeom_RWBezierSurface::RWStepGeom_RWBezierSurface () {}
|
||||
|
||||
void RWStepGeom_RWBezierSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BezierSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,8,ach,"bezier_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 : uDegree ---
|
||||
|
||||
Standard_Integer aUDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"u_degree",ach,aUDegree);
|
||||
|
||||
// --- inherited field : vDegree ---
|
||||
|
||||
Standard_Integer aVDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadInteger (num,3,"v_degree",ach,aVDegree);
|
||||
|
||||
// --- inherited field : controlPointsList ---
|
||||
|
||||
Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent4;
|
||||
Standard_Integer nsub4;
|
||||
if (data->ReadSubList (num,4,"control_points_list",ach,nsub4)) {
|
||||
Standard_Integer nbi4 = data->NbParams(nsub4);
|
||||
Standard_Integer nbj4 = data->NbParams(data->ParamNumber(nsub4,1));
|
||||
aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi4, 1, nbj4);
|
||||
for (Standard_Integer i4 = 1; i4 <= nbi4; i4 ++) {
|
||||
Standard_Integer nsi4;
|
||||
if (data->ReadSubList (nsub4,i4,"sub-part(control_points_list)",ach,nsi4)) {
|
||||
for (Standard_Integer j4 =1; j4 <= nbj4; j4 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
if (data->ReadEntity (nsi4, j4,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent4))
|
||||
aControlPointsList->SetValue(i4, j4, anent4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : surfaceForm ---
|
||||
|
||||
StepGeom_BSplineSurfaceForm aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
if (data->ParamType(num,5) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,5);
|
||||
if (bssfSurfOfLinearExtrusion.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfLinearExtrusion;
|
||||
else if (bssfPlaneSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
else if (bssfGeneralisedCone.IsEqual(text)) aSurfaceForm = StepGeom_bssfGeneralisedCone;
|
||||
else if (bssfToroidalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfToroidalSurf;
|
||||
else if (bssfConicalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfConicalSurf;
|
||||
else if (bssfSphericalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfSphericalSurf;
|
||||
else if (bssfUnspecified.IsEqual(text)) aSurfaceForm = StepGeom_bssfUnspecified;
|
||||
else if (bssfRuledSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfRuledSurf;
|
||||
else if (bssfSurfOfRevolution.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfRevolution;
|
||||
else if (bssfCylindricalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfCylindricalSurf;
|
||||
else if (bssfQuadricSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfQuadricSurf;
|
||||
else ach->AddFail("Enumeration b_spline_surface_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #5 (surface_form) is not an enumeration");
|
||||
|
||||
// --- inherited field : uClosed ---
|
||||
|
||||
StepData_Logical aUClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"u_closed",ach,aUClosed);
|
||||
|
||||
// --- inherited field : vClosed ---
|
||||
|
||||
StepData_Logical aVClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
data->ReadLogical (num,7,"v_closed",ach,aVClosed);
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
data->ReadLogical (num,8,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BezierSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field uDegree ---
|
||||
|
||||
SW.Send(ent->UDegree());
|
||||
|
||||
// --- inherited field vDegree ---
|
||||
|
||||
SW.Send(ent->VDegree());
|
||||
|
||||
// --- inherited field controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i4 = 1; i4 <= ent->NbControlPointsListI(); i4 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j4 = 1; j4 <= ent->NbControlPointsListJ(); j4 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i4,j4));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field surfaceForm ---
|
||||
|
||||
switch(ent->SurfaceForm()) {
|
||||
case StepGeom_bssfSurfOfLinearExtrusion : SW.SendEnum (bssfSurfOfLinearExtrusion); break;
|
||||
case StepGeom_bssfPlaneSurf : SW.SendEnum (bssfPlaneSurf); break;
|
||||
case StepGeom_bssfGeneralisedCone : SW.SendEnum (bssfGeneralisedCone); break;
|
||||
case StepGeom_bssfToroidalSurf : SW.SendEnum (bssfToroidalSurf); break;
|
||||
case StepGeom_bssfConicalSurf : SW.SendEnum (bssfConicalSurf); break;
|
||||
case StepGeom_bssfSphericalSurf : SW.SendEnum (bssfSphericalSurf); break;
|
||||
case StepGeom_bssfUnspecified : SW.SendEnum (bssfUnspecified); break;
|
||||
case StepGeom_bssfRuledSurf : SW.SendEnum (bssfRuledSurf); break;
|
||||
case StepGeom_bssfSurfOfRevolution : SW.SendEnum (bssfSurfOfRevolution); break;
|
||||
case StepGeom_bssfCylindricalSurf : SW.SendEnum (bssfCylindricalSurf); break;
|
||||
case StepGeom_bssfQuadricSurf : SW.SendEnum (bssfQuadricSurf); break;
|
||||
}
|
||||
|
||||
// --- inherited field uClosed ---
|
||||
|
||||
SW.SendLogical(ent->UClosed());
|
||||
|
||||
// --- inherited field vClosed ---
|
||||
|
||||
SW.SendLogical(ent->VClosed());
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierSurface::Share(const Handle(StepGeom_BezierSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbiElem1 = ent->NbControlPointsListI();
|
||||
Standard_Integer nbjElem1 = ent->NbControlPointsListJ();
|
||||
for (Standard_Integer is1=1; is1<=nbiElem1; is1 ++) {
|
||||
for (Standard_Integer js1=1; js1<=nbjElem1; js1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1,js1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BezierSurfaceAndRationalBSplineSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:34 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBezierSurfaceAndRationalBSplineSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BezierSurfaceAndRationalBSplineSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BezierSurfaceAndRationalBSplineSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBezierSurfaceAndRationalBSplineSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BezierSurfaceAndRationalBSplineSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BezierSurfaceAndRationalBSplineSurface from StepGeom);
|
||||
|
||||
Share(me; ent : BezierSurfaceAndRationalBSplineSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBezierSurfaceAndRationalBSplineSurface;
|
296
src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx
Executable file
296
src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx
Executable file
@@ -0,0 +1,296 @@
|
||||
|
||||
#include <RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.ixx>
|
||||
#include <StepGeom_BezierSurface.hxx>
|
||||
#include <StepGeom_RationalBSplineSurface.hxx>
|
||||
#include <StepGeom_HArray2OfCartesianPoint.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_BSplineSurfaceForm.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <TColStd_HArray2OfReal.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : BSplineSurfaceForm ---
|
||||
static TCollection_AsciiString bssfSurfOfLinearExtrusion(".SURF_OF_LINEAR_EXTRUSION.");
|
||||
static TCollection_AsciiString bssfPlaneSurf(".PLANE_SURF.");
|
||||
static TCollection_AsciiString bssfGeneralisedCone(".GENERALISED_CONE.");
|
||||
static TCollection_AsciiString bssfToroidalSurf(".TOROIDAL_SURF.");
|
||||
static TCollection_AsciiString bssfConicalSurf(".CONICAL_SURF.");
|
||||
static TCollection_AsciiString bssfSphericalSurf(".SPHERICAL_SURF.");
|
||||
static TCollection_AsciiString bssfUnspecified(".UNSPECIFIED.");
|
||||
static TCollection_AsciiString bssfRuledSurf(".RULED_SURF.");
|
||||
static TCollection_AsciiString bssfSurfOfRevolution(".SURF_OF_REVOLUTION.");
|
||||
static TCollection_AsciiString bssfCylindricalSurf(".CYLINDRICAL_SURF.");
|
||||
static TCollection_AsciiString bssfQuadricSurf(".QUADRIC_SURF.");
|
||||
|
||||
RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface () {}
|
||||
|
||||
void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BezierSurfaceAndRationalBSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant BezierSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bezier_surface")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant BoundedSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"bounded_surface")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype BSplineSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,7,ach,"b_spline_surface")) return;
|
||||
// --- field : uDegree ---
|
||||
|
||||
|
||||
Standard_Integer aUDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"u_degree",ach,aUDegree);
|
||||
// --- field : vDegree ---
|
||||
|
||||
|
||||
Standard_Integer aVDegree;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadInteger (num,2,"v_degree",ach,aVDegree);
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
|
||||
Handle(StepGeom_HArray2OfCartesianPoint) aControlPointsList;
|
||||
Handle(StepGeom_CartesianPoint) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"control_points_list",ach,nsub3)) {
|
||||
Standard_Integer nbi3 = data->NbParams(nsub3);
|
||||
Standard_Integer nbj3 = data->NbParams(data->ParamNumber(nsub3,1));
|
||||
aControlPointsList = new StepGeom_HArray2OfCartesianPoint (1, nbi3, 1, nbj3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nbi3; i3 ++) {
|
||||
Standard_Integer nsi3;
|
||||
if (data->ReadSubList (nsub3,i3,"sub-part(control_points_list)",ach,nsi3)) {
|
||||
for (Standard_Integer j3 =1; j3 <= nbj3; j3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsi3, j3,"cartesian_point", ach,
|
||||
STANDARD_TYPE(StepGeom_CartesianPoint), anent3))
|
||||
aControlPointsList->SetValue(i3, j3, anent3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- field : surfaceForm ---
|
||||
|
||||
|
||||
StepGeom_BSplineSurfaceForm aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (bssfSurfOfLinearExtrusion.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfLinearExtrusion;
|
||||
else if (bssfPlaneSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfPlaneSurf;
|
||||
else if (bssfGeneralisedCone.IsEqual(text)) aSurfaceForm = StepGeom_bssfGeneralisedCone;
|
||||
else if (bssfToroidalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfToroidalSurf;
|
||||
else if (bssfConicalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfConicalSurf;
|
||||
else if (bssfSphericalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfSphericalSurf;
|
||||
else if (bssfUnspecified.IsEqual(text)) aSurfaceForm = StepGeom_bssfUnspecified;
|
||||
else if (bssfRuledSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfRuledSurf;
|
||||
else if (bssfSurfOfRevolution.IsEqual(text)) aSurfaceForm = StepGeom_bssfSurfOfRevolution;
|
||||
else if (bssfCylindricalSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfCylindricalSurf;
|
||||
else if (bssfQuadricSurf.IsEqual(text)) aSurfaceForm = StepGeom_bssfQuadricSurf;
|
||||
else ach->AddFail("Enumeration b_spline_surface_form has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (surface_form) is not an enumeration");
|
||||
// --- field : uClosed ---
|
||||
|
||||
|
||||
StepData_Logical aUClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadLogical (num,5,"u_closed",ach,aUClosed);
|
||||
// --- field : vClosed ---
|
||||
|
||||
|
||||
StepData_Logical aVClosed;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadLogical (num,6,"v_closed",ach,aVClosed);
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
|
||||
data->ReadLogical (num,7,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
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 plex componant RationalBSplineSurface ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"rational_b_spline_surface")) return;
|
||||
|
||||
// --- field : weightsData ---
|
||||
|
||||
Handle(TColStd_HArray2OfReal) aWeightsData;
|
||||
Standard_Real aWeightsDataItem;
|
||||
Standard_Integer nsub8;
|
||||
if (data->ReadSubList (num,1,"items",ach,nsub8)) {
|
||||
Standard_Integer nbi8 = data->NbParams(nsub8);
|
||||
Standard_Integer nbj8 = data->NbParams(data->ParamNumber(nsub8,1));
|
||||
aWeightsData = new TColStd_HArray2OfReal (1,nbi8,1,nbj8);
|
||||
for (Standard_Integer i8 = 1; i8 <= nbi8; i8 ++) {
|
||||
Standard_Integer nsi8;
|
||||
if (data->ReadSubList(nsub8,i8,"sub-part(weights_data)",ach,nsi8)){
|
||||
for (Standard_Integer j8 =1; j8 <= nbj8; j8 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
|
||||
if (data->ReadReal (nsi8,j8,"weights_data",ach,aWeightsDataItem))
|
||||
aWeightsData->SetValue(i8,j8,aWeightsDataItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 stat9 =` not needed
|
||||
data->ReadString (num,1,"name",ach,aName);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant Surface ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"surface")) return;
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aName,aUDegree,aVDegree,aControlPointsList,aSurfaceForm,aUClosed,aVClosed,aSelfIntersect,aWeightsData);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BezierSurfaceAndRationalBSplineSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant BezierSurface ---
|
||||
|
||||
SW.StartEntity("BEZIER_SURFACE");
|
||||
|
||||
// --- Instance of plex componant BoundedSurface ---
|
||||
|
||||
SW.StartEntity("BOUNDED_SURFACE");
|
||||
|
||||
// --- Instance of common supertype BSplineSurface ---
|
||||
|
||||
SW.StartEntity("B_SPLINE_SURFACE");
|
||||
// --- field : uDegree ---
|
||||
|
||||
SW.Send(ent->UDegree());
|
||||
// --- field : vDegree ---
|
||||
|
||||
SW.Send(ent->VDegree());
|
||||
// --- field : controlPointsList ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbControlPointsListI(); i3 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j3 = 1; j3 <= ent->NbControlPointsListJ(); j3 ++) {
|
||||
SW.Send(ent->ControlPointsListValue(i3,j3));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
// --- field : surfaceForm ---
|
||||
|
||||
switch(ent->SurfaceForm()) {
|
||||
case StepGeom_bssfSurfOfLinearExtrusion : SW.SendEnum (bssfSurfOfLinearExtrusion); break;
|
||||
case StepGeom_bssfPlaneSurf : SW.SendEnum (bssfPlaneSurf); break;
|
||||
case StepGeom_bssfGeneralisedCone : SW.SendEnum (bssfGeneralisedCone); break;
|
||||
case StepGeom_bssfToroidalSurf : SW.SendEnum (bssfToroidalSurf); break;
|
||||
case StepGeom_bssfConicalSurf : SW.SendEnum (bssfConicalSurf); break;
|
||||
case StepGeom_bssfSphericalSurf : SW.SendEnum (bssfSphericalSurf); break;
|
||||
case StepGeom_bssfUnspecified : SW.SendEnum (bssfUnspecified); break;
|
||||
case StepGeom_bssfRuledSurf : SW.SendEnum (bssfRuledSurf); break;
|
||||
case StepGeom_bssfSurfOfRevolution : SW.SendEnum (bssfSurfOfRevolution); break;
|
||||
case StepGeom_bssfCylindricalSurf : SW.SendEnum (bssfCylindricalSurf); break;
|
||||
case StepGeom_bssfQuadricSurf : SW.SendEnum (bssfQuadricSurf); break;
|
||||
}
|
||||
// --- field : uClosed ---
|
||||
|
||||
SW.SendLogical(ent->UClosed());
|
||||
// --- field : vClosed ---
|
||||
|
||||
SW.SendLogical(ent->VClosed());
|
||||
// --- field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationItem ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM");
|
||||
|
||||
// --- Instance of plex componant RationalBSplineSurface ---
|
||||
|
||||
SW.StartEntity("RATIONAL_B_SPLINE_SURFACE");
|
||||
// --- field : weightsData ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i8 = 1; i8 <= ent->NbWeightsDataI(); i8 ++) {
|
||||
SW.NewLine(Standard_False);
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer j8 = 1; j8 <= ent->NbWeightsDataJ(); j8 ++) {
|
||||
SW.Send(ent->WeightsDataValue(i8,j8));
|
||||
SW.JoinLast(Standard_False);
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of plex componant RepresentationItem ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_ITEM");
|
||||
// --- field : name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- Instance of plex componant Surface ---
|
||||
|
||||
SW.StartEntity("SURFACE");
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface::Share(const Handle(StepGeom_BezierSurfaceAndRationalBSplineSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbiElem1 = ent->NbControlPointsListI();
|
||||
Standard_Integer nbjElem1 = ent->NbControlPointsListJ();
|
||||
for (Standard_Integer is1=1; is1<=nbiElem1; is1 ++) {
|
||||
for (Standard_Integer js1=1; js1<=nbjElem1; js1 ++) {
|
||||
iter.GetOneItem(ent->ControlPointsListValue(is1,js1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: BoundaryCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:23 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBoundaryCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BoundaryCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BoundaryCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBoundaryCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BoundaryCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BoundaryCurve from StepGeom);
|
||||
|
||||
Share(me; ent : BoundaryCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWBoundaryCurve;
|
95
src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWBoundaryCurve.ixx>
|
||||
#include <StepGeom_HArray1OfCompositeCurveSegment.hxx>
|
||||
#include <StepGeom_CompositeCurveSegment.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_BoundaryCurve.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWBoundaryCurve::RWStepGeom_RWBoundaryCurve () {}
|
||||
|
||||
void RWStepGeom_RWBoundaryCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BoundaryCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"boundary_curve")) 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 : segments ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
|
||||
Handle(StepGeom_CompositeCurveSegment) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"composite_curve_segment", ach,
|
||||
STANDARD_TYPE(StepGeom_CompositeCurveSegment), anent2))
|
||||
aSegments->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadLogical (num,3,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aSegments, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBoundaryCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BoundaryCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field segments ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbSegments(); i2 ++) {
|
||||
SW.Send(ent->SegmentsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBoundaryCurve::Share(const Handle(StepGeom_BoundaryCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbSegments();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->SegmentsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
27
src/RWStepGeom/RWStepGeom_RWBoundedCurve.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWBoundedCurve.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: BoundedCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBoundedCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BoundedCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BoundedCurve from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBoundedCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BoundedCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BoundedCurve from StepGeom);
|
||||
|
||||
end RWBoundedCurve;
|
40
src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx
Executable file
40
src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <RWStepGeom_RWBoundedCurve.ixx>
|
||||
|
||||
|
||||
RWStepGeom_RWBoundedCurve::RWStepGeom_RWBoundedCurve () {}
|
||||
|
||||
void RWStepGeom_RWBoundedCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BoundedCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"bounded_curve")) 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 RWStepGeom_RWBoundedCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BoundedCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
27
src/RWStepGeom/RWStepGeom_RWBoundedSurface.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWBoundedSurface.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: BoundedSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWBoundedSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for BoundedSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
BoundedSurface from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWBoundedSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable BoundedSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : BoundedSurface from StepGeom);
|
||||
|
||||
end RWBoundedSurface;
|
40
src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx
Executable file
40
src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <RWStepGeom_RWBoundedSurface.ixx>
|
||||
|
||||
|
||||
RWStepGeom_RWBoundedSurface::RWStepGeom_RWBoundedSurface () {}
|
||||
|
||||
void RWStepGeom_RWBoundedSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_BoundedSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"bounded_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);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWBoundedSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_BoundedSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
27
src/RWStepGeom/RWStepGeom_RWCartesianPoint.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWCartesianPoint.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: CartesianPoint.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCartesianPoint from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CartesianPoint
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CartesianPoint from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCartesianPoint;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CartesianPoint from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CartesianPoint from StepGeom);
|
||||
|
||||
end RWCartesianPoint;
|
76
src/RWStepGeom/RWStepGeom_RWCartesianPoint.cxx
Executable file
76
src/RWStepGeom/RWStepGeom_RWCartesianPoint.cxx
Executable file
@@ -0,0 +1,76 @@
|
||||
|
||||
#include <RWStepGeom_RWCartesianPoint.ixx>
|
||||
//#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCartesianPoint::RWStepGeom_RWCartesianPoint () {}
|
||||
|
||||
void RWStepGeom_RWCartesianPoint::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CartesianPoint)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"cartesian_point")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
// Protected
|
||||
if (!data->ReadString (num,1,"name",ach,aName)) {
|
||||
ach->Mend("Set to empty string");
|
||||
aName = new TCollection_HAsciiString;
|
||||
}
|
||||
|
||||
// --- own field : coordinates ---
|
||||
// OPTIMISED : X Y Z directly read and set
|
||||
|
||||
// Handle(TColStd_HArray1OfReal) aCoordinates;
|
||||
Standard_Real aCoordinatesItem;
|
||||
Standard_Integer nsub2, nbcoord=0;
|
||||
Standard_Real XYZ[3] = {0.,0.,0.};
|
||||
if (data->ReadSubList (num,2,"coordinates",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
if(nb2 > 3) {
|
||||
ach->AddWarning("More than 3 coordinates, ignored");
|
||||
}
|
||||
nbcoord = nb2;
|
||||
for (Standard_Integer i2 = 0; i2 < nb2; i2 ++) {
|
||||
if (data->ReadReal (nsub2,i2+1,"coordinates",ach,aCoordinatesItem)) {
|
||||
XYZ[i2] = aCoordinatesItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
// ent->Init(aName, aCoordinates);
|
||||
if (nbcoord >= 3) ent->Init3D (aName, XYZ[0],XYZ[1],XYZ[2]);
|
||||
else ent->Init2D (aName, XYZ[0],XYZ[1]);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCartesianPoint::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CartesianPoint)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : coordinates ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbCoordinates(); i2 ++) {
|
||||
SW.Send(ent->CoordinatesValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CartesianTransformationOperator.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCartesianTransformationOperator from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CartesianTransformationOperator
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CartesianTransformationOperator from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCartesianTransformationOperator;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CartesianTransformationOperator from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CartesianTransformationOperator from StepGeom);
|
||||
|
||||
Share(me; ent : CartesianTransformationOperator from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCartesianTransformationOperator;
|
153
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx
Executable file
153
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx
Executable file
@@ -0,0 +1,153 @@
|
||||
|
||||
#include <RWStepGeom_RWCartesianTransformationOperator.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CartesianTransformationOperator.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCartesianTransformationOperator::RWStepGeom_RWCartesianTransformationOperator () {}
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CartesianTransformationOperator)& ent) const
|
||||
{
|
||||
|
||||
// 29 MAI 1997
|
||||
// PATCH CKY : functionally_defined_transformation est aussi supertype, avec
|
||||
// deux champs STRING. Pour bien faire, les ajouter. Au minimum, les faire
|
||||
// sauter. On attend 7 champs au lieu de 5 et on commence au champ 3
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,7,ach,"cartesian_transformation_operator")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,3,"name",ach,aName);
|
||||
|
||||
// --- own field : axis1 ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis1;
|
||||
Standard_Boolean hasAaxis1 = Standard_True;
|
||||
if (data->IsParamDefined(num,4)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 4,"axis1", ach, STANDARD_TYPE(StepGeom_Direction), aAxis1);
|
||||
}
|
||||
else {
|
||||
hasAaxis1 = Standard_False;
|
||||
aAxis1.Nullify();
|
||||
}
|
||||
|
||||
// --- own field : axis2 ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis2;
|
||||
Standard_Boolean hasAaxis2 = Standard_True;
|
||||
if (data->IsParamDefined(num,5)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 5,"axis2", ach, STANDARD_TYPE(StepGeom_Direction), aAxis2);
|
||||
}
|
||||
else {
|
||||
hasAaxis2 = Standard_False;
|
||||
aAxis2.Nullify();
|
||||
}
|
||||
|
||||
// --- own field : localOrigin ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aLocalOrigin;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num, 6,"local_origin", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aLocalOrigin);
|
||||
|
||||
// --- own field : scale ---
|
||||
|
||||
Standard_Real aScale;
|
||||
Standard_Boolean hasAscale = Standard_True;
|
||||
if (data->IsParamDefined(num,7)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadReal (num,7,"scale",ach,aScale);
|
||||
}
|
||||
else {
|
||||
hasAscale = Standard_False;
|
||||
aScale = 0.;
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, hasAaxis1, aAxis1, hasAaxis2, aAxis2, aLocalOrigin, hasAscale, aScale);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CartesianTransformationOperator)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
// PATCH CKY : name depuis geometric_representation_item
|
||||
// et name + descr depuis functionally_defined_transformation
|
||||
|
||||
SW.Send(ent->Name());
|
||||
SW.Send(ent->Name());
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : axis1 ---
|
||||
|
||||
Standard_Boolean hasAaxis1 = ent->HasAxis1();
|
||||
if (hasAaxis1) {
|
||||
SW.Send(ent->Axis1());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- own field : axis2 ---
|
||||
|
||||
Standard_Boolean hasAaxis2 = ent->HasAxis2();
|
||||
if (hasAaxis2) {
|
||||
SW.Send(ent->Axis2());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- own field : localOrigin ---
|
||||
|
||||
SW.Send(ent->LocalOrigin());
|
||||
|
||||
// --- own field : scale ---
|
||||
|
||||
Standard_Boolean hasAscale = ent->HasScale();
|
||||
if (hasAscale) {
|
||||
SW.Send(ent->Scale());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator::Share(const Handle(StepGeom_CartesianTransformationOperator)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
if (ent->HasAxis1()) {
|
||||
iter.GetOneItem(ent->Axis1());
|
||||
}
|
||||
|
||||
|
||||
if (ent->HasAxis2()) {
|
||||
iter.GetOneItem(ent->Axis2());
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->LocalOrigin());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CartesianTransformationOperator3d.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCartesianTransformationOperator3d from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CartesianTransformationOperator3d
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CartesianTransformationOperator3d from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCartesianTransformationOperator3d;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CartesianTransformationOperator3d from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CartesianTransformationOperator3d from StepGeom);
|
||||
|
||||
Share(me; ent : CartesianTransformationOperator3d from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCartesianTransformationOperator3d;
|
181
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx
Executable file
181
src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx
Executable file
@@ -0,0 +1,181 @@
|
||||
|
||||
#include <RWStepGeom_RWCartesianTransformationOperator3d.ixx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CartesianTransformationOperator3d.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCartesianTransformationOperator3d::RWStepGeom_RWCartesianTransformationOperator3d () {}
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator3d::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CartesianTransformationOperator3d)& ent) const
|
||||
{
|
||||
|
||||
// 29 MAI 1997
|
||||
// PATCH CKY : functionally_defined_transformation est aussi supertype, avec
|
||||
// deux champs STRING. Pour bien faire, les ajouter. Au minimum, les faire
|
||||
// sauter. On attend 8 champs au lieu de 6 et on commence au champ 3
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,8,ach,"cartesian_transformation_operator_3d")) return;
|
||||
|
||||
// --- inherited field : name ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aName;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,3,"name",ach,aName);
|
||||
|
||||
// --- inherited field : axis1 ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis1;
|
||||
Standard_Boolean hasAaxis1 = Standard_True;
|
||||
if (data->IsParamDefined(num,4)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 4,"axis1", ach, STANDARD_TYPE(StepGeom_Direction), aAxis1);
|
||||
}
|
||||
else {
|
||||
hasAaxis1 = Standard_False;
|
||||
aAxis1.Nullify();
|
||||
}
|
||||
|
||||
// --- inherited field : axis2 ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis2;
|
||||
Standard_Boolean hasAaxis2 = Standard_True;
|
||||
if (data->IsParamDefined(num,5)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 5,"axis2", ach, STANDARD_TYPE(StepGeom_Direction), aAxis2);
|
||||
}
|
||||
else {
|
||||
hasAaxis2 = Standard_False;
|
||||
aAxis2.Nullify();
|
||||
}
|
||||
|
||||
// --- inherited field : localOrigin ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aLocalOrigin;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num, 6,"local_origin", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aLocalOrigin);
|
||||
|
||||
// --- inherited field : scale ---
|
||||
|
||||
Standard_Real aScale;
|
||||
Standard_Boolean hasAscale = Standard_True;
|
||||
if (data->IsParamDefined(num,7)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadReal (num,7,"scale",ach,aScale);
|
||||
}
|
||||
else {
|
||||
hasAscale = Standard_False;
|
||||
aScale = 0.;
|
||||
}
|
||||
|
||||
// --- own field : axis3 ---
|
||||
|
||||
Handle(StepGeom_Direction) aAxis3;
|
||||
Standard_Boolean hasAaxis3 = Standard_True;
|
||||
if (data->IsParamDefined(num,8)) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
|
||||
data->ReadEntity(num, 8,"axis3", ach, STANDARD_TYPE(StepGeom_Direction), aAxis3);
|
||||
}
|
||||
else {
|
||||
hasAaxis3 = Standard_False;
|
||||
aAxis3.Nullify();
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, hasAaxis1, aAxis1, hasAaxis2, aAxis2, aLocalOrigin, hasAscale, aScale, hasAaxis3, aAxis3);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator3d::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CartesianTransformationOperator3d)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
// PATCH CKY : name depuis geometric_representation_item
|
||||
// et name + descr depuis functionally_defined_transformation
|
||||
|
||||
SW.Send(ent->Name());
|
||||
SW.Send(ent->Name());
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field axis1 ---
|
||||
|
||||
Standard_Boolean hasAaxis1 = ent->HasAxis1();
|
||||
if (hasAaxis1) {
|
||||
SW.Send(ent->Axis1());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- inherited field axis2 ---
|
||||
|
||||
Standard_Boolean hasAaxis2 = ent->HasAxis2();
|
||||
if (hasAaxis2) {
|
||||
SW.Send(ent->Axis2());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- inherited field localOrigin ---
|
||||
|
||||
SW.Send(ent->LocalOrigin());
|
||||
|
||||
// --- inherited field scale ---
|
||||
|
||||
Standard_Boolean hasAscale = ent->HasScale();
|
||||
if (hasAscale) {
|
||||
SW.Send(ent->Scale());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
|
||||
// --- own field : axis3 ---
|
||||
|
||||
Standard_Boolean hasAaxis3 = ent->HasAxis3();
|
||||
if (hasAaxis3) {
|
||||
SW.Send(ent->Axis3());
|
||||
}
|
||||
else {
|
||||
SW.SendUndef();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCartesianTransformationOperator3d::Share(const Handle(StepGeom_CartesianTransformationOperator3d)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
if (ent->HasAxis1()) {
|
||||
iter.GetOneItem(ent->Axis1());
|
||||
}
|
||||
|
||||
|
||||
if (ent->HasAxis2()) {
|
||||
iter.GetOneItem(ent->Axis2());
|
||||
}
|
||||
|
||||
|
||||
|
||||
iter.GetOneItem(ent->LocalOrigin());
|
||||
|
||||
if (ent->HasAxis3()) {
|
||||
iter.GetOneItem(ent->Axis3());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCircle.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCircle.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Circle.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCircle from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Circle
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Circle from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCircle;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Circle from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Circle from StepGeom);
|
||||
|
||||
Share(me; ent : Circle from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCircle;
|
75
src/RWStepGeom/RWStepGeom_RWCircle.cxx
Executable file
75
src/RWStepGeom/RWStepGeom_RWCircle.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
|
||||
#include <RWStepGeom_RWCircle.ixx>
|
||||
#include <StepGeom_Axis2Placement.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Circle.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCircle::RWStepGeom_RWCircle () {}
|
||||
|
||||
void RWStepGeom_RWCircle::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Circle)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"circle")) 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 : position ---
|
||||
|
||||
StepGeom_Axis2Placement aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"position",ach,aPosition);
|
||||
|
||||
// --- own field : radius ---
|
||||
|
||||
Standard_Real aRadius;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"radius",ach,aRadius);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aRadius);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCircle::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Circle)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position().Value());
|
||||
|
||||
// --- own field : radius ---
|
||||
|
||||
SW.Send(ent->Radius());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCircle::Share(const Handle(StepGeom_Circle)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position().Value());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCompositeCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCompositeCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CompositeCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCompositeCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CompositeCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CompositeCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCompositeCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CompositeCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CompositeCurve from StepGeom);
|
||||
|
||||
Share(me; ent : CompositeCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCompositeCurve;
|
95
src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWCompositeCurve.ixx>
|
||||
#include <StepGeom_HArray1OfCompositeCurveSegment.hxx>
|
||||
#include <StepGeom_CompositeCurveSegment.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CompositeCurve.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCompositeCurve::RWStepGeom_RWCompositeCurve () {}
|
||||
|
||||
void RWStepGeom_RWCompositeCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CompositeCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"composite_curve")) 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 : segments ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
|
||||
Handle(StepGeom_CompositeCurveSegment) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"composite_curve_segment", ach,
|
||||
STANDARD_TYPE(StepGeom_CompositeCurveSegment), anent2))
|
||||
aSegments->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadLogical (num,3,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aSegments, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CompositeCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : segments ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbSegments(); i2 ++) {
|
||||
SW.Send(ent->SegmentsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurve::Share(const Handle(StepGeom_CompositeCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbSegments();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->SegmentsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CompositeCurveOnSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCompositeCurveOnSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CompositeCurveOnSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CompositeCurveOnSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCompositeCurveOnSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CompositeCurveOnSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CompositeCurveOnSurface from StepGeom);
|
||||
|
||||
Share(me; ent : CompositeCurveOnSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCompositeCurveOnSurface;
|
95
src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWCompositeCurveOnSurface.ixx>
|
||||
#include <StepGeom_HArray1OfCompositeCurveSegment.hxx>
|
||||
#include <StepGeom_CompositeCurveSegment.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CompositeCurveOnSurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCompositeCurveOnSurface::RWStepGeom_RWCompositeCurveOnSurface () {}
|
||||
|
||||
void RWStepGeom_RWCompositeCurveOnSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CompositeCurveOnSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"composite_curve_on_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 : segments ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
|
||||
Handle(StepGeom_CompositeCurveSegment) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"composite_curve_segment", ach,
|
||||
STANDARD_TYPE(StepGeom_CompositeCurveSegment), anent2))
|
||||
aSegments->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadLogical (num,3,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aSegments, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurveOnSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CompositeCurveOnSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field segments ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbSegments(); i2 ++) {
|
||||
SW.Send(ent->SegmentsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurveOnSurface::Share(const Handle(StepGeom_CompositeCurveOnSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbSegments();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->SegmentsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CompositeCurveSegment.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCompositeCurveSegment from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CompositeCurveSegment
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CompositeCurveSegment from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCompositeCurveSegment;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CompositeCurveSegment from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CompositeCurveSegment from StepGeom);
|
||||
|
||||
Share(me; ent : CompositeCurveSegment from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCompositeCurveSegment;
|
96
src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx
Executable file
96
src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx
Executable file
@@ -0,0 +1,96 @@
|
||||
|
||||
#include <RWStepGeom_RWCompositeCurveSegment.ixx>
|
||||
#include <StepGeom_TransitionCode.hxx>
|
||||
#include <StepGeom_Curve.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CompositeCurveSegment.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
|
||||
// --- Enum : TransitionCode ---
|
||||
static TCollection_AsciiString tcDiscontinuous(".DISCONTINUOUS.");
|
||||
static TCollection_AsciiString tcContSameGradientSameCurvature(".CONT_SAME_GRADIENT_SAME_CURVATURE.");
|
||||
static TCollection_AsciiString tcContSameGradient(".CONT_SAME_GRADIENT.");
|
||||
static TCollection_AsciiString tcContinuous(".CONTINUOUS.");
|
||||
|
||||
RWStepGeom_RWCompositeCurveSegment::RWStepGeom_RWCompositeCurveSegment () {}
|
||||
|
||||
void RWStepGeom_RWCompositeCurveSegment::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CompositeCurveSegment)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"composite_curve_segment")) return;
|
||||
|
||||
// --- own field : transition ---
|
||||
|
||||
StepGeom_TransitionCode aTransition = StepGeom_tcDiscontinuous;
|
||||
if (data->ParamType(num,1) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,1);
|
||||
if (tcDiscontinuous.IsEqual(text)) aTransition = StepGeom_tcDiscontinuous;
|
||||
else if (tcContSameGradientSameCurvature.IsEqual(text)) aTransition = StepGeom_tcContSameGradientSameCurvature;
|
||||
else if (tcContSameGradient.IsEqual(text)) aTransition = StepGeom_tcContSameGradient;
|
||||
else if (tcContinuous.IsEqual(text)) aTransition = StepGeom_tcContinuous;
|
||||
else ach->AddFail("Enumeration transition_code has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #1 (transition) is not an enumeration");
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
Standard_Boolean aSameSense;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadBoolean (num,2,"same_sense",ach,aSameSense);
|
||||
|
||||
// --- own field : parentCurve ---
|
||||
|
||||
Handle(StepGeom_Curve) aParentCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"parent_curve", ach, STANDARD_TYPE(StepGeom_Curve), aParentCurve);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aTransition, aSameSense, aParentCurve);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurveSegment::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CompositeCurveSegment)& ent) const
|
||||
{
|
||||
|
||||
// --- own field : transition ---
|
||||
|
||||
switch(ent->Transition()) {
|
||||
case StepGeom_tcDiscontinuous : SW.SendEnum (tcDiscontinuous); break;
|
||||
case StepGeom_tcContSameGradientSameCurvature : SW.SendEnum (tcContSameGradientSameCurvature); break;
|
||||
case StepGeom_tcContSameGradient : SW.SendEnum (tcContSameGradient); break;
|
||||
case StepGeom_tcContinuous : SW.SendEnum (tcContinuous); break;
|
||||
}
|
||||
|
||||
// --- own field : sameSense ---
|
||||
|
||||
SW.SendBoolean(ent->SameSense());
|
||||
|
||||
// --- own field : parentCurve ---
|
||||
|
||||
SW.Send(ent->ParentCurve());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCompositeCurveSegment::Share(const Handle(StepGeom_CompositeCurveSegment)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->ParentCurve());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWConic.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWConic.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Conic.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWConic from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Conic
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Conic from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWConic;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Conic from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Conic from StepGeom);
|
||||
|
||||
Share(me; ent : Conic from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWConic;
|
65
src/RWStepGeom/RWStepGeom_RWConic.cxx
Executable file
65
src/RWStepGeom/RWStepGeom_RWConic.cxx
Executable file
@@ -0,0 +1,65 @@
|
||||
|
||||
#include <RWStepGeom_RWConic.ixx>
|
||||
#include <StepGeom_Axis2Placement.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Conic.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWConic::RWStepGeom_RWConic () {}
|
||||
|
||||
void RWStepGeom_RWConic::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Conic)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"conic")) 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 ---
|
||||
|
||||
StepGeom_Axis2Placement aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"position",ach,aPosition);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWConic::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Conic)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : position ---
|
||||
|
||||
SW.Send(ent->Position().Value());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWConic::Share(const Handle(StepGeom_Conic)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position().Value());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWConicalSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWConicalSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ConicalSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:24 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWConicalSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for ConicalSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ConicalSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWConicalSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ConicalSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ConicalSurface from StepGeom);
|
||||
|
||||
Share(me; ent : ConicalSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWConicalSurface;
|
85
src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx
Executable file
85
src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx
Executable file
@@ -0,0 +1,85 @@
|
||||
|
||||
#include <RWStepGeom_RWConicalSurface.ixx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_ConicalSurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWConicalSurface::RWStepGeom_RWConicalSurface () {}
|
||||
|
||||
void RWStepGeom_RWConicalSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_ConicalSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"conical_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 : 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 : radius ---
|
||||
|
||||
Standard_Real aRadius;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"radius",ach,aRadius);
|
||||
|
||||
// --- own field : semiAngle ---
|
||||
|
||||
Standard_Real aSemiAngle;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"semi_angle",ach,aSemiAngle);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aRadius, aSemiAngle);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWConicalSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_ConicalSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position());
|
||||
|
||||
// --- own field : radius ---
|
||||
|
||||
SW.Send(ent->Radius());
|
||||
|
||||
// --- own field : semiAngle ---
|
||||
|
||||
SW.Send(ent->SemiAngle());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWConicalSurface::Share(const Handle(StepGeom_ConicalSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position());
|
||||
}
|
||||
|
27
src/RWStepGeom/RWStepGeom_RWCurve.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWCurve.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: Curve.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Curve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Curve from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Curve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Curve from StepGeom);
|
||||
|
||||
end RWCurve;
|
40
src/RWStepGeom/RWStepGeom_RWCurve.cxx
Executable file
40
src/RWStepGeom/RWStepGeom_RWCurve.cxx
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <RWStepGeom_RWCurve.ixx>
|
||||
|
||||
|
||||
RWStepGeom_RWCurve::RWStepGeom_RWCurve () {}
|
||||
|
||||
void RWStepGeom_RWCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Curve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"curve")) 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 RWStepGeom_RWCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Curve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
35
src/RWStepGeom/RWStepGeom_RWCurveBoundedSurface.cdl
Executable file
35
src/RWStepGeom/RWStepGeom_RWCurveBoundedSurface.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepGeom_RWCurveBoundedSurface.cdl
|
||||
-- Created: Fri Nov 26 16:26:38 1999
|
||||
-- Author: Andrey BETENEV
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
-- Copyright: Matra Datavision 1999
|
||||
|
||||
class RWCurveBoundedSurface from RWStepGeom
|
||||
|
||||
---Purpose: Read & Write tool for CurveBoundedSurface
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
CurveBoundedSurface from StepGeom
|
||||
|
||||
is
|
||||
Create returns RWCurveBoundedSurface from RWStepGeom;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : CurveBoundedSurface from StepGeom);
|
||||
---Purpose: Reads CurveBoundedSurface
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: CurveBoundedSurface from StepGeom);
|
||||
---Purpose: Writes CurveBoundedSurface
|
||||
|
||||
Share (me; ent : CurveBoundedSurface from StepGeom;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWCurveBoundedSurface;
|
112
src/RWStepGeom/RWStepGeom_RWCurveBoundedSurface.cxx
Executable file
112
src/RWStepGeom/RWStepGeom_RWCurveBoundedSurface.cxx
Executable file
@@ -0,0 +1,112 @@
|
||||
// File: RWStepGeom_RWCurveBoundedSurface.cxx
|
||||
// Created: Fri Nov 26 16:26:38 1999
|
||||
// Author: Andrey BETENEV
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
|
||||
// Copyright: Matra Datavision 1999
|
||||
|
||||
#include <RWStepGeom_RWCurveBoundedSurface.ixx>
|
||||
#include <StepGeom_HArray1OfSurfaceBoundary.hxx>
|
||||
#include <StepGeom_SurfaceBoundary.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepGeom_RWCurveBoundedSurface
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepGeom_RWCurveBoundedSurface::RWStepGeom_RWCurveBoundedSurface ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWCurveBoundedSurface::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CurveBoundedSurface) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,4,ach,"curve_bounded_surface") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Own fields of CurveBoundedSurface
|
||||
|
||||
Handle(StepGeom_Surface) aBasisSurface;
|
||||
data->ReadEntity (num, 2, "basis_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBasisSurface);
|
||||
|
||||
Handle(StepGeom_HArray1OfSurfaceBoundary) aBoundaries;
|
||||
Standard_Integer sub3 = 0;
|
||||
if ( data->ReadSubList (num, 3, "boundaries", ach, sub3) ) {
|
||||
Standard_Integer num2 = sub3;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aBoundaries = new StepGeom_HArray1OfSurfaceBoundary (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
StepGeom_SurfaceBoundary anIt0;
|
||||
data->ReadEntity (num2, i0, "boundaries", ach, anIt0);
|
||||
aBoundaries->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Boolean aImplicitOuter;
|
||||
data->ReadBoolean (num, 4, "implicit_outer", ach, aImplicitOuter);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aBasisSurface,
|
||||
aBoundaries,
|
||||
aImplicitOuter);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWCurveBoundedSurface::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CurveBoundedSurface) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Own fields of CurveBoundedSurface
|
||||
|
||||
SW.Send (ent->BasisSurface());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2=1; i2 <= ent->Boundaries()->Length(); i2++ ) {
|
||||
StepGeom_SurfaceBoundary Var0 = ent->Boundaries()->Value(i2);
|
||||
SW.Send (Var0.Value());
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
SW.SendBoolean (ent->ImplicitOuter());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWCurveBoundedSurface::Share (const Handle(StepGeom_CurveBoundedSurface) &ent,
|
||||
Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Own fields of CurveBoundedSurface
|
||||
|
||||
iter.AddItem (ent->BasisSurface());
|
||||
|
||||
for (Standard_Integer i2=1; i2 <= ent->Boundaries()->Length(); i2++ ) {
|
||||
StepGeom_SurfaceBoundary Var0 = ent->Boundaries()->Value(i2);
|
||||
iter.AddItem (Var0.Value());
|
||||
}
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWCurveReplica.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCurveReplica.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CurveReplica.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCurveReplica from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CurveReplica
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CurveReplica from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCurveReplica;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CurveReplica from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CurveReplica from StepGeom);
|
||||
|
||||
Share(me; ent : CurveReplica from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCurveReplica;
|
79
src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx
Executable file
79
src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx
Executable file
@@ -0,0 +1,79 @@
|
||||
|
||||
#include <RWStepGeom_RWCurveReplica.ixx>
|
||||
#include <StepGeom_Curve.hxx>
|
||||
#include <StepGeom_CartesianTransformationOperator.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CurveReplica.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCurveReplica::RWStepGeom_RWCurveReplica () {}
|
||||
|
||||
void RWStepGeom_RWCurveReplica::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CurveReplica)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"curve_replica")) 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 : parentCurve ---
|
||||
|
||||
Handle(StepGeom_Curve) aParentCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"parent_curve", ach, STANDARD_TYPE(StepGeom_Curve), aParentCurve);
|
||||
|
||||
// --- own field : transformation ---
|
||||
|
||||
Handle(StepGeom_CartesianTransformationOperator) aTransformation;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"transformation", ach, STANDARD_TYPE(StepGeom_CartesianTransformationOperator), aTransformation);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aParentCurve, aTransformation);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCurveReplica::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CurveReplica)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : parentCurve ---
|
||||
|
||||
SW.Send(ent->ParentCurve());
|
||||
|
||||
// --- own field : transformation ---
|
||||
|
||||
SW.Send(ent->Transformation());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCurveReplica::Share(const Handle(StepGeom_CurveReplica)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->ParentCurve());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->Transformation());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: CylindricalSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWCylindricalSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for CylindricalSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
CylindricalSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWCylindricalSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable CylindricalSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : CylindricalSurface from StepGeom);
|
||||
|
||||
Share(me; ent : CylindricalSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWCylindricalSurface;
|
75
src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx
Executable file
75
src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
|
||||
#include <RWStepGeom_RWCylindricalSurface.ixx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_CylindricalSurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWCylindricalSurface::RWStepGeom_RWCylindricalSurface () {}
|
||||
|
||||
void RWStepGeom_RWCylindricalSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_CylindricalSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"cylindrical_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 : 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 : radius ---
|
||||
|
||||
Standard_Real aRadius;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"radius",ach,aRadius);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aRadius);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCylindricalSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_CylindricalSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position());
|
||||
|
||||
// --- own field : radius ---
|
||||
|
||||
SW.Send(ent->Radius());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWCylindricalSurface::Share(const Handle(StepGeom_CylindricalSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: DegeneratePcurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWDegeneratePcurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for DegeneratePcurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
DegeneratePcurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWDegeneratePcurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable DegeneratePcurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : DegeneratePcurve from StepGeom);
|
||||
|
||||
Share(me; ent : DegeneratePcurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWDegeneratePcurve;
|
79
src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx
Executable file
79
src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx
Executable file
@@ -0,0 +1,79 @@
|
||||
|
||||
#include <RWStepGeom_RWDegeneratePcurve.ixx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
#include <StepRepr_DefinitionalRepresentation.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_DegeneratePcurve.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWDegeneratePcurve::RWStepGeom_RWDegeneratePcurve () {}
|
||||
|
||||
void RWStepGeom_RWDegeneratePcurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_DegeneratePcurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"degenerate_pcurve")) 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 : basisSurface ---
|
||||
|
||||
Handle(StepGeom_Surface) aBasisSurface;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"basis_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBasisSurface);
|
||||
|
||||
// --- own field : referenceToCurve ---
|
||||
|
||||
Handle(StepRepr_DefinitionalRepresentation) aReferenceToCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"reference_to_curve", ach, STANDARD_TYPE(StepRepr_DefinitionalRepresentation), aReferenceToCurve);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBasisSurface, aReferenceToCurve);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDegeneratePcurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_DegeneratePcurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : basisSurface ---
|
||||
|
||||
SW.Send(ent->BasisSurface());
|
||||
|
||||
// --- own field : referenceToCurve ---
|
||||
|
||||
SW.Send(ent->ReferenceToCurve());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDegeneratePcurve::Share(const Handle(StepGeom_DegeneratePcurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BasisSurface());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ReferenceToCurve());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: DegenerateToroidalSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWDegenerateToroidalSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for DegenerateToroidalSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
DegenerateToroidalSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWDegenerateToroidalSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable DegenerateToroidalSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : DegenerateToroidalSurface from StepGeom);
|
||||
|
||||
Share(me; ent : DegenerateToroidalSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWDegenerateToroidalSurface;
|
95
src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWDegenerateToroidalSurface.ixx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_DegenerateToroidalSurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWDegenerateToroidalSurface::RWStepGeom_RWDegenerateToroidalSurface () {}
|
||||
|
||||
void RWStepGeom_RWDegenerateToroidalSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_DegenerateToroidalSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"degenerate_toroidal_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 : 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);
|
||||
|
||||
// --- inherited field : majorRadius ---
|
||||
|
||||
Standard_Real aMajorRadius;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"major_radius",ach,aMajorRadius);
|
||||
|
||||
// --- inherited field : minorRadius ---
|
||||
|
||||
Standard_Real aMinorRadius;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"minor_radius",ach,aMinorRadius);
|
||||
|
||||
// --- own field : selectOuter ---
|
||||
|
||||
Standard_Boolean aSelectOuter;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadBoolean (num,5,"select_outer",ach,aSelectOuter);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aMajorRadius, aMinorRadius, aSelectOuter);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDegenerateToroidalSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_DegenerateToroidalSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position());
|
||||
|
||||
// --- inherited field majorRadius ---
|
||||
|
||||
SW.Send(ent->MajorRadius());
|
||||
|
||||
// --- inherited field minorRadius ---
|
||||
|
||||
SW.Send(ent->MinorRadius());
|
||||
|
||||
// --- own field : selectOuter ---
|
||||
|
||||
SW.SendBoolean(ent->SelectOuter());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDegenerateToroidalSurface::Share(const Handle(StepGeom_DegenerateToroidalSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWDirection.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWDirection.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Direction.cdl
|
||||
-- Created: Mon Dec 4 12:02:25 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWDirection from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Direction
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Direction from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWDirection;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Direction from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Direction from StepGeom);
|
||||
|
||||
Check (me; ent : Direction from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWDirection;
|
78
src/RWStepGeom/RWStepGeom_RWDirection.cxx
Executable file
78
src/RWStepGeom/RWStepGeom_RWDirection.cxx
Executable file
@@ -0,0 +1,78 @@
|
||||
|
||||
#include <RWStepGeom_RWDirection.ixx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWDirection::RWStepGeom_RWDirection () {}
|
||||
|
||||
void RWStepGeom_RWDirection::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Direction)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"direction")) 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 : directionRatios ---
|
||||
|
||||
Handle(TColStd_HArray1OfReal) aDirectionRatios;
|
||||
Standard_Real aDirectionRatiosItem;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"direction_ratios",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aDirectionRatios = new TColStd_HArray1OfReal (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadReal (nsub2,i2,"direction_ratios",ach,aDirectionRatiosItem))
|
||||
aDirectionRatios->SetValue(i2,aDirectionRatiosItem);
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aDirectionRatios);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDirection::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Direction)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : directionRatios ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbDirectionRatios(); i2 ++) {
|
||||
SW.Send(ent->DirectionRatiosValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWDirection::Check
|
||||
(const Handle(StepGeom_Direction)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
Standard_Integer nbVal = ent->NbDirectionRatios();
|
||||
Standard_Integer i;
|
||||
for(i=1; i<=nbVal; i++) {
|
||||
if(Abs(ent->DirectionRatiosValue(i)) >= RealEpsilon()) break;
|
||||
}
|
||||
if(i>nbVal) ach->AddFail("ERROR: DirectionRatios all 0.0");
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWElementarySurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWElementarySurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: ElementarySurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWElementarySurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for ElementarySurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
ElementarySurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWElementarySurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable ElementarySurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : ElementarySurface from StepGeom);
|
||||
|
||||
Share(me; ent : ElementarySurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWElementarySurface;
|
65
src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx
Executable file
65
src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx
Executable file
@@ -0,0 +1,65 @@
|
||||
|
||||
#include <RWStepGeom_RWElementarySurface.ixx>
|
||||
#include <StepGeom_Axis2Placement3d.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_ElementarySurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWElementarySurface::RWStepGeom_RWElementarySurface () {}
|
||||
|
||||
void RWStepGeom_RWElementarySurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_ElementarySurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"elementary_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);
|
||||
|
||||
// --- 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);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWElementarySurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_ElementarySurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : position ---
|
||||
|
||||
SW.Send(ent->Position());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWElementarySurface::Share(const Handle(StepGeom_ElementarySurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position());
|
||||
}
|
||||
|
33
src/RWStepGeom/RWStepGeom_RWEllipse.cdl
Executable file
33
src/RWStepGeom/RWStepGeom_RWEllipse.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: Ellipse.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWEllipse from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Ellipse
|
||||
-- Check added by CKY , 7-OCT-1996
|
||||
|
||||
uses Check from Interface, ShareTool from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Ellipse from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWEllipse;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Ellipse from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Ellipse from StepGeom);
|
||||
|
||||
Share(me; ent : Ellipse from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
Check(me; ent : Ellipse from StepGeom; shares : ShareTool; ach : in out Check);
|
||||
|
||||
end RWEllipse;
|
95
src/RWStepGeom/RWStepGeom_RWEllipse.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWEllipse.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWEllipse.ixx>
|
||||
#include <StepGeom_Axis2Placement.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Ellipse.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWEllipse::RWStepGeom_RWEllipse () {}
|
||||
|
||||
void RWStepGeom_RWEllipse::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Ellipse)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"ellipse")) 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 : position ---
|
||||
|
||||
StepGeom_Axis2Placement aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"position",ach,aPosition);
|
||||
|
||||
// --- own field : semiAxis1 ---
|
||||
|
||||
Standard_Real aSemiAxis1;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"semi_axis_1",ach,aSemiAxis1);
|
||||
|
||||
// --- own field : semiAxis2 ---
|
||||
|
||||
Standard_Real aSemiAxis2;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"semi_axis_2",ach,aSemiAxis2);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aSemiAxis1, aSemiAxis2);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWEllipse::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Ellipse)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position().Value());
|
||||
|
||||
// --- own field : semiAxis1 ---
|
||||
|
||||
SW.Send(ent->SemiAxis1());
|
||||
|
||||
// --- own field : semiAxis2 ---
|
||||
|
||||
SW.Send(ent->SemiAxis2());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWEllipse::Share(const Handle(StepGeom_Ellipse)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position().Value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RWStepGeom_RWEllipse::Check
|
||||
(const Handle(StepGeom_Ellipse)& ent,
|
||||
const Interface_ShareTool& ,
|
||||
Handle(Interface_Check)& ach) const
|
||||
{
|
||||
if (ent->SemiAxis1() < ent->SemiAxis2())
|
||||
ach->AddWarning("ERROR: Ellipse: SemiMajor smaller than SemiMinor");
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: EvaluatedDegeneratePcurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:26 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWEvaluatedDegeneratePcurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for EvaluatedDegeneratePcurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
EvaluatedDegeneratePcurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWEvaluatedDegeneratePcurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable EvaluatedDegeneratePcurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : EvaluatedDegeneratePcurve from StepGeom);
|
||||
|
||||
Share(me; ent : EvaluatedDegeneratePcurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWEvaluatedDegeneratePcurve;
|
93
src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx
Executable file
93
src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx
Executable file
@@ -0,0 +1,93 @@
|
||||
|
||||
#include <RWStepGeom_RWEvaluatedDegeneratePcurve.ixx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
#include <StepRepr_DefinitionalRepresentation.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_EvaluatedDegeneratePcurve.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWEvaluatedDegeneratePcurve::RWStepGeom_RWEvaluatedDegeneratePcurve () {}
|
||||
|
||||
void RWStepGeom_RWEvaluatedDegeneratePcurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_EvaluatedDegeneratePcurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"evaluated_degenerate_pcurve")) 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 : basisSurface ---
|
||||
|
||||
Handle(StepGeom_Surface) aBasisSurface;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"basis_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBasisSurface);
|
||||
|
||||
// --- inherited field : referenceToCurve ---
|
||||
|
||||
Handle(StepRepr_DefinitionalRepresentation) aReferenceToCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"reference_to_curve", ach, STANDARD_TYPE(StepRepr_DefinitionalRepresentation), aReferenceToCurve);
|
||||
|
||||
// --- own field : equivalentPoint ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aEquivalentPoint;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadEntity(num, 4,"equivalent_point", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aEquivalentPoint);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBasisSurface, aReferenceToCurve, aEquivalentPoint);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWEvaluatedDegeneratePcurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_EvaluatedDegeneratePcurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field basisSurface ---
|
||||
|
||||
SW.Send(ent->BasisSurface());
|
||||
|
||||
// --- inherited field referenceToCurve ---
|
||||
|
||||
SW.Send(ent->ReferenceToCurve());
|
||||
|
||||
// --- own field : equivalentPoint ---
|
||||
|
||||
SW.Send(ent->EquivalentPoint());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWEvaluatedDegeneratePcurve::Share(const Handle(StepGeom_EvaluatedDegeneratePcurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BasisSurface());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->ReferenceToCurve());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->EquivalentPoint());
|
||||
}
|
||||
|
@@ -0,0 +1,38 @@
|
||||
-- File: RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cdl
|
||||
-- Created: Fri Dec 8 09:28:11 1995
|
||||
-- Author: Frederic MAUPAS
|
||||
-- <fma@anion>
|
||||
---Copyright: Matra Datavision 1995
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for
|
||||
-- GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
|
||||
|
||||
ReadStep (me;
|
||||
data : StepReaderData;
|
||||
num : Integer;
|
||||
ach : in out Check;
|
||||
ent : mutable GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter;
|
||||
ent : GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx from StepGeom);
|
||||
|
||||
Share(me;
|
||||
ent : GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
|
@@ -0,0 +1,186 @@
|
||||
|
||||
#include <RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.ixx>
|
||||
#include <StepGeom_GeometricRepresentationContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_HArray1OfNamedUnit.hxx>
|
||||
#include <StepBasic_NamedUnit.hxx>
|
||||
#include <StepBasic_HArray1OfUncertaintyMeasureWithUnit.hxx>
|
||||
#include <StepBasic_UncertaintyMeasureWithUnit.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx () {}
|
||||
|
||||
void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return;
|
||||
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
Standard_Integer aCoordinateSpaceDimension;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// --- Instance of plex componant GlobalUncertaintyAssignedContext ---
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"global_uncertainty_assigned_context")) return;
|
||||
|
||||
// --- field : uncertainty ---
|
||||
|
||||
Handle(StepBasic_HArray1OfUncertaintyMeasureWithUnit) aUncertainty;
|
||||
Handle(StepBasic_UncertaintyMeasureWithUnit) anent3;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,1,"uncertainty",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aUncertainty = new StepBasic_HArray1OfUncertaintyMeasureWithUnit (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3, i3,"uncertainty_measure_with_unit", ach,
|
||||
STANDARD_TYPE(StepBasic_UncertaintyMeasureWithUnit), anent3))
|
||||
aUncertainty->SetValue(i3, anent3);
|
||||
}
|
||||
}
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// --- Instance of plex componant GlobalUnitAssignedContext ---
|
||||
// ------------------------------------------------------------
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"global_unit_assigned_context")) return;
|
||||
|
||||
// --- field : units ---
|
||||
|
||||
Handle(StepBasic_HArray1OfNamedUnit) aUnits;
|
||||
Handle(StepBasic_NamedUnit) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,1,"units",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aUnits = new StepBasic_HArray1OfNamedUnit (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"unit", ach, STANDARD_TYPE(StepBasic_NamedUnit), anent2))
|
||||
aUnits->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
// ----------------------------------------------------------
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"representation_context")) return;
|
||||
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextIdentifier;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
|
||||
|
||||
// --- field : contextType ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextType;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadString (num,2,"context_type",ach,aContextType);
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension,aUnits, aUncertainty);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)& ent) const
|
||||
{
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT");
|
||||
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
SW.Send(ent->CoordinateSpaceDimension());
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// --- Instance of plex componant GlobalUncertaintyAssignedContext ---
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
SW.StartEntity("GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT");
|
||||
|
||||
// --- field : uncertainty ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbUncertainty(); i3 ++) {
|
||||
SW.Send(ent->UncertaintyValue(i3));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// --- Instance of plex componant GlobalUnitAssignedContext ---
|
||||
// ------------------------------------------------------------
|
||||
|
||||
SW.StartEntity("GLOBAL_UNIT_ASSIGNED_CONTEXT");
|
||||
|
||||
// --- field : units ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbUnits(); i2 ++) {
|
||||
SW.Send(ent->UnitsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
// ----------------------------------------------------------
|
||||
|
||||
SW.StartEntity("REPRESENTATION_CONTEXT");
|
||||
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
SW.Send(ent->ContextIdentifier());
|
||||
|
||||
// --- field : contextType ---
|
||||
|
||||
SW.Send(ent->ContextType());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::Share(const Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbUnits();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->UnitsValue(is1));
|
||||
}
|
||||
|
||||
Standard_Integer nbElem2 = ent->NbUncertainty();
|
||||
for (Standard_Integer is2=1; is2<=nbElem2; is2 ++) {
|
||||
iter.GetOneItem(ent->UncertaintyValue(is2));
|
||||
}
|
||||
|
||||
}
|
||||
|
27
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: GeometricRepresentationContext.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricRepresentationContext from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for GeometricRepresentationContext
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricRepresentationContext from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricRepresentationContext;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricRepresentationContext from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricRepresentationContext from StepGeom);
|
||||
|
||||
end RWGeometricRepresentationContext;
|
60
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx
Executable file
60
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx
Executable file
@@ -0,0 +1,60 @@
|
||||
|
||||
#include <RWStepGeom_RWGeometricRepresentationContext.ixx>
|
||||
|
||||
|
||||
RWStepGeom_RWGeometricRepresentationContext::RWStepGeom_RWGeometricRepresentationContext () {}
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContext::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_GeometricRepresentationContext)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"geometric_representation_context")) return;
|
||||
|
||||
// --- inherited field : contextIdentifier ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextIdentifier;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
|
||||
|
||||
// --- inherited field : contextType ---
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextType;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadString (num,2,"context_type",ach,aContextType);
|
||||
|
||||
// --- own field : coordinateSpaceDimension ---
|
||||
|
||||
Standard_Integer aCoordinateSpaceDimension;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadInteger (num,3,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aContextIdentifier, aContextType, aCoordinateSpaceDimension);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContext::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_GeometricRepresentationContext)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field contextIdentifier ---
|
||||
|
||||
SW.Send(ent->ContextIdentifier());
|
||||
|
||||
// --- inherited field contextType ---
|
||||
|
||||
SW.Send(ent->ContextType());
|
||||
|
||||
// --- own field : coordinateSpaceDimension ---
|
||||
|
||||
SW.Send(ent->CoordinateSpaceDimension());
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricRepresentationContextAndGlobalUnitAssignedContext.cdl
|
||||
-- Created: Thu Dec 7 14:30:30 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricRepresentationContextAndGlobalUnitAssignedContext from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for GeometricRepresentationContextAndGlobalUnitAssignedContext
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricRepresentationContextAndGlobalUnitAssignedContext from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricRepresentationContextAndGlobalUnitAssignedContext;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricRepresentationContextAndGlobalUnitAssignedContext from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricRepresentationContextAndGlobalUnitAssignedContext from StepGeom);
|
||||
|
||||
Share(me; ent : GeometricRepresentationContextAndGlobalUnitAssignedContext from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricRepresentationContextAndGlobalUnitAssignedContext;
|
@@ -0,0 +1,126 @@
|
||||
|
||||
#include <RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.ixx>
|
||||
#include <StepGeom_GeometricRepresentationContext.hxx>
|
||||
#include <StepRepr_GlobalUnitAssignedContext.hxx>
|
||||
#include <StepBasic_HArray1OfNamedUnit.hxx>
|
||||
#include <StepBasic_NamedUnit.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext () {}
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return;
|
||||
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
Standard_Integer aCoordinateSpaceDimension;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant GlobalUnitAssignedContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"global_unit_assigned_context")) return;
|
||||
|
||||
// --- field : units ---
|
||||
|
||||
Handle(StepBasic_HArray1OfNamedUnit) aUnits;
|
||||
Handle(StepBasic_NamedUnit) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,1,"units",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aUnits = new StepBasic_HArray1OfNamedUnit (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"unit", ach, STANDARD_TYPE(StepBasic_NamedUnit), anent2))
|
||||
aUnits->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"representation_context")) return;
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextIdentifier;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
|
||||
// --- field : contextType ---
|
||||
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextType;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadString (num,2,"context_type",ach,aContextType);
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension,aUnits);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT");
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
SW.Send(ent->CoordinateSpaceDimension());
|
||||
|
||||
// --- Instance of plex componant GlobalUnitAssignedContext ---
|
||||
|
||||
SW.StartEntity("GLOBAL_UNIT_ASSIGNED_CONTEXT");
|
||||
// --- field : units ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbUnits(); i2 ++) {
|
||||
SW.Send(ent->UnitsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_CONTEXT");
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
SW.Send(ent->ContextIdentifier());
|
||||
// --- field : contextType ---
|
||||
|
||||
SW.Send(ent->ContextType());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::Share(const Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbUnits();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->UnitsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
-- File: GeometricRepresentationContextAndParametricRepresentationContext.cdl
|
||||
-- Created: Thu Dec 7 14:30:30 1995
|
||||
-- Author: FMA
|
||||
-- Copyright: Matra-Datavision 1996
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricRepresentationContextAndParametricRepresentationContext from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for GeometricRepresentationContextAndParametricRepresentationContext
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricRepresentationContextAndParametricRepresentationContext from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricRepresentationContextAndParametricRepresentationContext;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricRepresentationContextAndParametricRepresentationContext from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricRepresentationContextAndParametricRepresentationContext from StepGeom);
|
||||
|
||||
Share(me; ent : GeometricRepresentationContextAndParametricRepresentationContext from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWGeometricRepresentationContextAndParametricRepresentationContext;
|
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.ixx>
|
||||
#include <StepGeom_GeometricRepresentationContext.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_GeometricRepresentationContextAndParametricRepresentationContext.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext () {}
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num0,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
|
||||
{
|
||||
|
||||
Standard_Integer num = num0;
|
||||
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"geometric_representation_context")) return;
|
||||
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
Standard_Integer aCoordinateSpaceDimension;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
|
||||
data->ReadInteger (num,1,"coordinate_space_dimension",ach,aCoordinateSpaceDimension);
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of plex componant ParametricRepresentationContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,0,ach,"parametric_representation_context")) return;
|
||||
|
||||
num = data->NextForComplex(num);
|
||||
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
|
||||
if (!data->CheckNbParams(num,2,ach,"representation_context")) return;
|
||||
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextIdentifier;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadString (num,1,"context_identifier",ach,aContextIdentifier);
|
||||
// --- field : contextType ---
|
||||
|
||||
|
||||
Handle(TCollection_HAsciiString) aContextType;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadString (num,2,"context_type",ach,aContextType);
|
||||
|
||||
//--- Initialisation of the red entity ---
|
||||
|
||||
ent->Init(aContextIdentifier,aContextType,aCoordinateSpaceDimension);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent) const
|
||||
{
|
||||
|
||||
// --- Instance of plex componant GeometricRepresentationContext ---
|
||||
|
||||
SW.StartEntity("GEOMETRIC_REPRESENTATION_CONTEXT");
|
||||
// --- field : coordinateSpaceDimension ---
|
||||
|
||||
SW.Send(ent->CoordinateSpaceDimension());
|
||||
|
||||
// --- Instance of plex componant ParametricRepresentationContext ---
|
||||
|
||||
SW.StartEntity("PARAMETRIC_REPRESENTATION_CONTEXT");
|
||||
|
||||
// --- Instance of common supertype RepresentationContext ---
|
||||
|
||||
SW.StartEntity("REPRESENTATION_CONTEXT");
|
||||
// --- field : contextIdentifier ---
|
||||
|
||||
SW.Send(ent->ContextIdentifier());
|
||||
// --- field : contextType ---
|
||||
|
||||
SW.Send(ent->ContextType());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::Share(const Handle(StepGeom_GeometricRepresentationContextAndParametricRepresentationContext)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
}
|
||||
|
27
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cdl
Executable file
27
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cdl
Executable file
@@ -0,0 +1,27 @@
|
||||
-- File: GeometricRepresentationItem.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWGeometricRepresentationItem from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for GeometricRepresentationItem
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
GeometricRepresentationItem from StepGeom
|
||||
|
||||
is
|
||||
|
||||
Create returns RWGeometricRepresentationItem;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable GeometricRepresentationItem from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : GeometricRepresentationItem from StepGeom);
|
||||
|
||||
end RWGeometricRepresentationItem;
|
40
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx
Executable file
40
src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <RWStepGeom_RWGeometricRepresentationItem.ixx>
|
||||
|
||||
|
||||
RWStepGeom_RWGeometricRepresentationItem::RWStepGeom_RWGeometricRepresentationItem () {}
|
||||
|
||||
void RWStepGeom_RWGeometricRepresentationItem::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_GeometricRepresentationItem)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,1,ach,"geometric_representation_item")) 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 RWStepGeom_RWGeometricRepresentationItem::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_GeometricRepresentationItem)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWHyperbola.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWHyperbola.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Hyperbola.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWHyperbola from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Hyperbola
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Hyperbola from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWHyperbola;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Hyperbola from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Hyperbola from StepGeom);
|
||||
|
||||
Share(me; ent : Hyperbola from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWHyperbola;
|
85
src/RWStepGeom/RWStepGeom_RWHyperbola.cxx
Executable file
85
src/RWStepGeom/RWStepGeom_RWHyperbola.cxx
Executable file
@@ -0,0 +1,85 @@
|
||||
|
||||
#include <RWStepGeom_RWHyperbola.ixx>
|
||||
#include <StepGeom_Axis2Placement.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Hyperbola.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWHyperbola::RWStepGeom_RWHyperbola () {}
|
||||
|
||||
void RWStepGeom_RWHyperbola::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Hyperbola)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"hyperbola")) 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 : position ---
|
||||
|
||||
StepGeom_Axis2Placement aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"position",ach,aPosition);
|
||||
|
||||
// --- own field : semiAxis ---
|
||||
|
||||
Standard_Real aSemiAxis;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"semi_axis",ach,aSemiAxis);
|
||||
|
||||
// --- own field : semiImagAxis ---
|
||||
|
||||
Standard_Real aSemiImagAxis;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadReal (num,4,"semi_imag_axis",ach,aSemiImagAxis);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aSemiAxis, aSemiImagAxis);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWHyperbola::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Hyperbola)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position().Value());
|
||||
|
||||
// --- own field : semiAxis ---
|
||||
|
||||
SW.Send(ent->SemiAxis());
|
||||
|
||||
// --- own field : semiImagAxis ---
|
||||
|
||||
SW.Send(ent->SemiImagAxis());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWHyperbola::Share(const Handle(StepGeom_Hyperbola)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position().Value());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: IntersectionCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWIntersectionCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for IntersectionCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
IntersectionCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWIntersectionCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable IntersectionCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : IntersectionCurve from StepGeom);
|
||||
|
||||
Share(me; ent : IntersectionCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWIntersectionCurve;
|
124
src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx
Executable file
124
src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx
Executable file
@@ -0,0 +1,124 @@
|
||||
|
||||
#include <RWStepGeom_RWIntersectionCurve.ixx>
|
||||
#include <StepGeom_Curve.hxx>
|
||||
#include <StepGeom_HArray1OfPcurveOrSurface.hxx>
|
||||
#include <StepGeom_PcurveOrSurface.hxx>
|
||||
#include <StepGeom_PreferredSurfaceCurveRepresentation.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_IntersectionCurve.hxx>
|
||||
|
||||
|
||||
|
||||
// --- Enum : PreferredSurfaceCurveRepresentation ---
|
||||
static TCollection_AsciiString pscrPcurveS2(".PCURVE_S2.");
|
||||
static TCollection_AsciiString pscrPcurveS1(".PCURVE_S1.");
|
||||
static TCollection_AsciiString pscrCurve3d(".CURVE_3D.");
|
||||
|
||||
RWStepGeom_RWIntersectionCurve::RWStepGeom_RWIntersectionCurve () {}
|
||||
|
||||
void RWStepGeom_RWIntersectionCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_IntersectionCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"intersection_curve")) 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 : curve3d ---
|
||||
|
||||
Handle(StepGeom_Curve) aCurve3d;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"curve_3d", ach, STANDARD_TYPE(StepGeom_Curve), aCurve3d);
|
||||
|
||||
// --- inherited field : associatedGeometry ---
|
||||
|
||||
Handle(StepGeom_HArray1OfPcurveOrSurface) aAssociatedGeometry;
|
||||
StepGeom_PcurveOrSurface aAssociatedGeometryItem;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"associated_geometry",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aAssociatedGeometry = new StepGeom_HArray1OfPcurveOrSurface (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3,i3,"associated_geometry",ach,aAssociatedGeometryItem))
|
||||
aAssociatedGeometry->SetValue(i3,aAssociatedGeometryItem);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : masterRepresentation ---
|
||||
|
||||
StepGeom_PreferredSurfaceCurveRepresentation aMasterRepresentation = StepGeom_pscrCurve3d;
|
||||
if (data->ParamType(num,4) == Interface_ParamEnum) {
|
||||
Standard_CString text = data->ParamCValue(num,4);
|
||||
if (pscrPcurveS2.IsEqual(text)) aMasterRepresentation = StepGeom_pscrPcurveS2;
|
||||
else if (pscrPcurveS1.IsEqual(text)) aMasterRepresentation = StepGeom_pscrPcurveS1;
|
||||
else if (pscrCurve3d.IsEqual(text)) aMasterRepresentation = StepGeom_pscrCurve3d;
|
||||
else ach->AddFail("Enumeration preferred_surface_curve_representation has not an allowed value");
|
||||
}
|
||||
else ach->AddFail("Parameter #4 (master_representation) is not an enumeration");
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aCurve3d, aAssociatedGeometry, aMasterRepresentation);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWIntersectionCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_IntersectionCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field curve3d ---
|
||||
|
||||
SW.Send(ent->Curve3d());
|
||||
|
||||
// --- inherited field associatedGeometry ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i3 = 1; i3 <= ent->NbAssociatedGeometry(); i3 ++) {
|
||||
SW.Send(ent->AssociatedGeometryValue(i3).Value());
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field masterRepresentation ---
|
||||
|
||||
switch(ent->MasterRepresentation()) {
|
||||
case StepGeom_pscrPcurveS2 : SW.SendEnum (pscrPcurveS2); break;
|
||||
case StepGeom_pscrPcurveS1 : SW.SendEnum (pscrPcurveS1); break;
|
||||
case StepGeom_pscrCurve3d : SW.SendEnum (pscrCurve3d); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWIntersectionCurve::Share(const Handle(StepGeom_IntersectionCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Curve3d());
|
||||
|
||||
|
||||
Standard_Integer nbElem2 = ent->NbAssociatedGeometry();
|
||||
for (Standard_Integer is2=1; is2<=nbElem2; is2 ++) {
|
||||
iter.GetOneItem(ent->AssociatedGeometryValue(is2).Value());
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWLine.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWLine.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Line.cdl
|
||||
-- Created: Mon Dec 4 12:02:27 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWLine from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Line
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Line from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWLine;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Line from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Line from StepGeom);
|
||||
|
||||
Share(me; ent : Line from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWLine;
|
79
src/RWStepGeom/RWStepGeom_RWLine.cxx
Executable file
79
src/RWStepGeom/RWStepGeom_RWLine.cxx
Executable file
@@ -0,0 +1,79 @@
|
||||
|
||||
#include <RWStepGeom_RWLine.ixx>
|
||||
#include <StepGeom_CartesianPoint.hxx>
|
||||
#include <StepGeom_Vector.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Line.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWLine::RWStepGeom_RWLine () {}
|
||||
|
||||
void RWStepGeom_RWLine::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Line)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"line")) 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 : pnt ---
|
||||
|
||||
Handle(StepGeom_CartesianPoint) aPnt;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"pnt", ach, STANDARD_TYPE(StepGeom_CartesianPoint), aPnt);
|
||||
|
||||
// --- own field : dir ---
|
||||
|
||||
Handle(StepGeom_Vector) aDir;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadEntity(num, 3,"dir", ach, STANDARD_TYPE(StepGeom_Vector), aDir);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPnt, aDir);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWLine::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Line)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : pnt ---
|
||||
|
||||
SW.Send(ent->Pnt());
|
||||
|
||||
// --- own field : dir ---
|
||||
|
||||
SW.Send(ent->Dir());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWLine::Share(const Handle(StepGeom_Line)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Pnt());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->Dir());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: OffsetCurve3d.cdl
|
||||
-- Created: Mon Dec 4 12:02:28 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWOffsetCurve3d from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for OffsetCurve3d
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
OffsetCurve3d from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWOffsetCurve3d;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable OffsetCurve3d from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : OffsetCurve3d from StepGeom);
|
||||
|
||||
Share(me; ent : OffsetCurve3d from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWOffsetCurve3d;
|
100
src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx
Executable file
100
src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx
Executable file
@@ -0,0 +1,100 @@
|
||||
|
||||
#include <RWStepGeom_RWOffsetCurve3d.ixx>
|
||||
#include <StepGeom_Curve.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
#include <StepGeom_Direction.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_OffsetCurve3d.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWOffsetCurve3d::RWStepGeom_RWOffsetCurve3d () {}
|
||||
|
||||
void RWStepGeom_RWOffsetCurve3d::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_OffsetCurve3d)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,5,ach,"offset_curve_3d")) 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 : basisCurve ---
|
||||
|
||||
Handle(StepGeom_Curve) aBasisCurve;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"basis_curve", ach, STANDARD_TYPE(StepGeom_Curve), aBasisCurve);
|
||||
|
||||
// --- own field : distance ---
|
||||
|
||||
Standard_Real aDistance;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"distance",ach,aDistance);
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadLogical (num,4,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
Handle(StepGeom_Direction) aRefDirection;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
|
||||
data->ReadEntity(num, 5,"ref_direction", ach, STANDARD_TYPE(StepGeom_Direction), aRefDirection);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBasisCurve, aDistance, aSelfIntersect, aRefDirection);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOffsetCurve3d::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_OffsetCurve3d)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : basisCurve ---
|
||||
|
||||
SW.Send(ent->BasisCurve());
|
||||
|
||||
// --- own field : distance ---
|
||||
|
||||
SW.Send(ent->Distance());
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
|
||||
// --- own field : refDirection ---
|
||||
|
||||
SW.Send(ent->RefDirection());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOffsetCurve3d::Share(const Handle(StepGeom_OffsetCurve3d)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BasisCurve());
|
||||
|
||||
|
||||
iter.GetOneItem(ent->RefDirection());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWOffsetSurface.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWOffsetSurface.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: OffsetSurface.cdl
|
||||
-- Created: Mon Dec 4 12:02:28 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWOffsetSurface from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for OffsetSurface
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
OffsetSurface from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWOffsetSurface;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable OffsetSurface from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : OffsetSurface from StepGeom);
|
||||
|
||||
Share(me; ent : OffsetSurface from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWOffsetSurface;
|
86
src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx
Executable file
86
src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx
Executable file
@@ -0,0 +1,86 @@
|
||||
|
||||
#include <RWStepGeom_RWOffsetSurface.ixx>
|
||||
#include <StepGeom_Surface.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_OffsetSurface.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWOffsetSurface::RWStepGeom_RWOffsetSurface () {}
|
||||
|
||||
void RWStepGeom_RWOffsetSurface::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_OffsetSurface)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,4,ach,"offset_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);
|
||||
|
||||
// --- own field : basisSurface ---
|
||||
|
||||
Handle(StepGeom_Surface) aBasisSurface;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num, 2,"basis_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBasisSurface);
|
||||
|
||||
// --- own field : distance ---
|
||||
|
||||
Standard_Real aDistance;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"distance",ach,aDistance);
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||
data->ReadLogical (num,4,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aBasisSurface, aDistance, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOffsetSurface::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_OffsetSurface)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- own field : basisSurface ---
|
||||
|
||||
SW.Send(ent->BasisSurface());
|
||||
|
||||
// --- own field : distance ---
|
||||
|
||||
SW.Send(ent->Distance());
|
||||
|
||||
// --- own field : selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOffsetSurface::Share(const Handle(StepGeom_OffsetSurface)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->BasisSurface());
|
||||
}
|
||||
|
35
src/RWStepGeom/RWStepGeom_RWOrientedSurface.cdl
Executable file
35
src/RWStepGeom/RWStepGeom_RWOrientedSurface.cdl
Executable file
@@ -0,0 +1,35 @@
|
||||
-- File: RWStepGeom_RWOrientedSurface.cdl
|
||||
-- Created: Fri Jan 4 17:42:44 2002
|
||||
-- Author: data exchange team
|
||||
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
-- Copyright: Matra Datavision 2000
|
||||
|
||||
class RWOrientedSurface from RWStepGeom
|
||||
|
||||
---Purpose: Read & Write tool for OrientedSurface
|
||||
|
||||
uses
|
||||
Check from Interface,
|
||||
StepWriter from StepData,
|
||||
StepReaderData from StepData,
|
||||
EntityIterator from Interface,
|
||||
OrientedSurface from StepGeom
|
||||
|
||||
is
|
||||
Create returns RWOrientedSurface from RWStepGeom;
|
||||
---Purpose: Empty constructor
|
||||
|
||||
ReadStep (me; data: StepReaderData from StepData; num: Integer;
|
||||
ach : in out Check from Interface;
|
||||
ent : OrientedSurface from StepGeom);
|
||||
---Purpose: Reads OrientedSurface
|
||||
|
||||
WriteStep (me; SW: in out StepWriter from StepData;
|
||||
ent: OrientedSurface from StepGeom);
|
||||
---Purpose: Writes OrientedSurface
|
||||
|
||||
Share (me; ent : OrientedSurface from StepGeom;
|
||||
iter: in out EntityIterator from Interface);
|
||||
---Purpose: Fills data for graph (shared items)
|
||||
|
||||
end RWOrientedSurface;
|
76
src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx
Executable file
76
src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx
Executable file
@@ -0,0 +1,76 @@
|
||||
// File: RWStepGeom_RWOrientedSurface.cxx
|
||||
// Created: Fri Jan 4 17:42:44 2002
|
||||
// Author: data exchange team
|
||||
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
|
||||
// Copyright: Matra Datavision 2000
|
||||
|
||||
#include <RWStepGeom_RWOrientedSurface.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepGeom_RWOrientedSurface
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepGeom_RWOrientedSurface::RWStepGeom_RWOrientedSurface ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWOrientedSurface::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_OrientedSurface) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,2,ach,"oriented_surface") ) return;
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
Handle(TCollection_HAsciiString) aRepresentationItem_Name;
|
||||
data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
|
||||
|
||||
// Own fields of OrientedSurface
|
||||
|
||||
Standard_Boolean aOrientation;
|
||||
data->ReadBoolean (num, 2, "orientation", ach, aOrientation);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentationItem_Name,
|
||||
aOrientation);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWOrientedSurface::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_OrientedSurface) &ent) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
SW.Send (ent->StepRepr_RepresentationItem::Name());
|
||||
|
||||
// Own fields of OrientedSurface
|
||||
|
||||
SW.SendBoolean (ent->Orientation());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Share
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepGeom_RWOrientedSurface::Share (const Handle(StepGeom_OrientedSurface) &/*ent*/,
|
||||
Interface_EntityIterator& /*iter*/) const
|
||||
{
|
||||
|
||||
// Inherited fields of RepresentationItem
|
||||
|
||||
// Own fields of OrientedSurface
|
||||
}
|
30
src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: OuterBoundaryCurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:28 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWOuterBoundaryCurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for OuterBoundaryCurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
OuterBoundaryCurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWOuterBoundaryCurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable OuterBoundaryCurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : OuterBoundaryCurve from StepGeom);
|
||||
|
||||
Share(me; ent : OuterBoundaryCurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWOuterBoundaryCurve;
|
95
src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx
Executable file
95
src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx
Executable file
@@ -0,0 +1,95 @@
|
||||
|
||||
#include <RWStepGeom_RWOuterBoundaryCurve.ixx>
|
||||
#include <StepGeom_HArray1OfCompositeCurveSegment.hxx>
|
||||
#include <StepGeom_CompositeCurveSegment.hxx>
|
||||
#include <StepData_Logical.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_OuterBoundaryCurve.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWOuterBoundaryCurve::RWStepGeom_RWOuterBoundaryCurve () {}
|
||||
|
||||
void RWStepGeom_RWOuterBoundaryCurve::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_OuterBoundaryCurve)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"outer_boundary_curve")) 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 : segments ---
|
||||
|
||||
Handle(StepGeom_HArray1OfCompositeCurveSegment) aSegments;
|
||||
Handle(StepGeom_CompositeCurveSegment) anent2;
|
||||
Standard_Integer nsub2;
|
||||
if (data->ReadSubList (num,2,"segments",ach,nsub2)) {
|
||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||
aSegments = new StepGeom_HArray1OfCompositeCurveSegment (1, nb2);
|
||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
if (data->ReadEntity (nsub2, i2,"composite_curve_segment", ach,
|
||||
STANDARD_TYPE(StepGeom_CompositeCurveSegment), anent2))
|
||||
aSegments->SetValue(i2, anent2);
|
||||
}
|
||||
}
|
||||
|
||||
// --- inherited field : selfIntersect ---
|
||||
|
||||
StepData_Logical aSelfIntersect;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadLogical (num,3,"self_intersect",ach,aSelfIntersect);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aSegments, aSelfIntersect);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOuterBoundaryCurve::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_OuterBoundaryCurve)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field segments ---
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i2 = 1; i2 <= ent->NbSegments(); i2 ++) {
|
||||
SW.Send(ent->SegmentsValue(i2));
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
// --- inherited field selfIntersect ---
|
||||
|
||||
SW.SendLogical(ent->SelfIntersect());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWOuterBoundaryCurve::Share(const Handle(StepGeom_OuterBoundaryCurve)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
Standard_Integer nbElem1 = ent->NbSegments();
|
||||
for (Standard_Integer is1=1; is1<=nbElem1; is1 ++) {
|
||||
iter.GetOneItem(ent->SegmentsValue(is1));
|
||||
}
|
||||
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWParabola.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWParabola.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Parabola.cdl
|
||||
-- Created: Mon Dec 4 12:02:28 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWParabola from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Parabola
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Parabola from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWParabola;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Parabola from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Parabola from StepGeom);
|
||||
|
||||
Share(me; ent : Parabola from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWParabola;
|
75
src/RWStepGeom/RWStepGeom_RWParabola.cxx
Executable file
75
src/RWStepGeom/RWStepGeom_RWParabola.cxx
Executable file
@@ -0,0 +1,75 @@
|
||||
|
||||
#include <RWStepGeom_RWParabola.ixx>
|
||||
#include <StepGeom_Axis2Placement.hxx>
|
||||
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
|
||||
|
||||
#include <StepGeom_Parabola.hxx>
|
||||
|
||||
|
||||
RWStepGeom_RWParabola::RWStepGeom_RWParabola () {}
|
||||
|
||||
void RWStepGeom_RWParabola::ReadStep
|
||||
(const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepGeom_Parabola)& ent) const
|
||||
{
|
||||
|
||||
|
||||
// --- Number of Parameter Control ---
|
||||
|
||||
if (!data->CheckNbParams(num,3,ach,"parabola")) 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 : position ---
|
||||
|
||||
StepGeom_Axis2Placement aPosition;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
||||
data->ReadEntity(num,2,"position",ach,aPosition);
|
||||
|
||||
// --- own field : focalDist ---
|
||||
|
||||
Standard_Real aFocalDist;
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
data->ReadReal (num,3,"focal_dist",ach,aFocalDist);
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
||||
|
||||
ent->Init(aName, aPosition, aFocalDist);
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWParabola::WriteStep
|
||||
(StepData_StepWriter& SW,
|
||||
const Handle(StepGeom_Parabola)& ent) const
|
||||
{
|
||||
|
||||
// --- inherited field name ---
|
||||
|
||||
SW.Send(ent->Name());
|
||||
|
||||
// --- inherited field position ---
|
||||
|
||||
SW.Send(ent->Position().Value());
|
||||
|
||||
// --- own field : focalDist ---
|
||||
|
||||
SW.Send(ent->FocalDist());
|
||||
}
|
||||
|
||||
|
||||
void RWStepGeom_RWParabola::Share(const Handle(StepGeom_Parabola)& ent, Interface_EntityIterator& iter) const
|
||||
{
|
||||
|
||||
iter.GetOneItem(ent->Position().Value());
|
||||
}
|
||||
|
30
src/RWStepGeom/RWStepGeom_RWPcurve.cdl
Executable file
30
src/RWStepGeom/RWStepGeom_RWPcurve.cdl
Executable file
@@ -0,0 +1,30 @@
|
||||
-- File: Pcurve.cdl
|
||||
-- Created: Mon Dec 4 12:02:28 1995
|
||||
-- Author: EXPRESS->CDL V0.2 Translator
|
||||
-- Copyright: Matra-Datavision 1993
|
||||
|
||||
|
||||
|
||||
|
||||
class RWPcurve from RWStepGeom
|
||||
|
||||
---Purpose : Read & Write Module for Pcurve
|
||||
|
||||
uses Check from Interface,
|
||||
StepReaderData from StepData,
|
||||
StepWriter from StepData,
|
||||
Pcurve from StepGeom,
|
||||
EntityIterator from Interface
|
||||
|
||||
is
|
||||
|
||||
Create returns RWPcurve;
|
||||
|
||||
ReadStep (me; data : StepReaderData; num : Integer;
|
||||
ach : in out Check; ent : mutable Pcurve from StepGeom);
|
||||
|
||||
WriteStep (me; SW : in out StepWriter; ent : Pcurve from StepGeom);
|
||||
|
||||
Share(me; ent : Pcurve from StepGeom; iter : in out EntityIterator);
|
||||
|
||||
end RWPcurve;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user