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

Coding - Apply .clang-format formatting #286

Update empty method guards to new style with regex (see PR).
Used clang-format 18.1.8.
New actions to validate code formatting is added.
Update .clang-format with disabling of include sorting.
  It is temporary changes, then include will be sorted.
Apply formatting for /src and /tools folder.
The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
dpasukhi
2025-01-25 20:15:22 +00:00
parent dbba6f1289
commit a5a7b3185b
14005 changed files with 1273539 additions and 1195567 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,6 @@ class StepRepr_ConstructiveGeometryRepresentationRelationship;
class StepRepr_MechanicalDesignAndDraughtingRelationship;
class StepData_StepModel;
class STEPControl_ActorRead;
DEFINE_STANDARD_HANDLE(STEPControl_ActorRead, Transfer_ActorOfTransientProcess)
@@ -66,31 +65,33 @@ class STEPControl_ActorRead : public Transfer_ActorOfTransientProcess
public:
Standard_EXPORT STEPControl_ActorRead(const Handle(Interface_InterfaceModel)& theModel);
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean Recognize(const Handle(Standard_Transient)& start)
Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer
(const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer(
const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root shape
Standard_EXPORT Handle(Transfer_Binder) TransferShape (
const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Standard_Boolean isManifold = Standard_True,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root
//! shape
Standard_EXPORT Handle(Transfer_Binder) TransferShape(
const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Standard_Boolean isManifold = Standard_True,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! set units and tolerances context by given ShapeRepresentation
Standard_EXPORT void PrepareUnits (const Handle(StepRepr_Representation)& rep,
const Handle(Transfer_TransientProcess)& TP,
StepData_Factors& theLocalFactors);
Standard_EXPORT void PrepareUnits(const Handle(StepRepr_Representation)& rep,
const Handle(Transfer_TransientProcess)& TP,
StepData_Factors& theLocalFactors);
//! reset units and tolerances context to default
//! (mm, radians, read.precision.val, etc.)
Standard_EXPORT void ResetUnits(Handle(StepData_StepModel)& theModel,
StepData_Factors& theLocalFactors);
StepData_Factors& theLocalFactors);
//! Set model
Standard_EXPORT void SetModel(const Handle(Interface_InterfaceModel)& theModel);
@@ -99,124 +100,135 @@ public:
//! or ITEM_DEFINED_TRANSFORMATION) taking into account their
//! representation contexts (i.e. units, which may be different)
//! Returns True if transformation is computed and is not an identity.
Standard_EXPORT Standard_Boolean ComputeTransformation (const Handle(StepGeom_Axis2Placement3d)& Origin,
const Handle(StepGeom_Axis2Placement3d)& Target,
const Handle(StepRepr_Representation)& OrigContext,
const Handle(StepRepr_Representation)& TargContext,
const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors());
Standard_EXPORT Standard_Boolean
ComputeTransformation(const Handle(StepGeom_Axis2Placement3d)& Origin,
const Handle(StepGeom_Axis2Placement3d)& Target,
const Handle(StepRepr_Representation)& OrigContext,
const Handle(StepRepr_Representation)& TargContext,
const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors());
//! Computes transformation defined by given
//! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR,
const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors());
Standard_EXPORT Standard_Boolean
ComputeSRRWT(const Handle(StepRepr_RepresentationRelationship)& SRR,
const Handle(Transfer_TransientProcess)& TP,
gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors());
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess)
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorRead, Transfer_ActorOfTransientProcess)
protected:
//! Transfers product definition entity
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (
const Handle(StepBasic_ProductDefinition)& PD,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root
//! shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepBasic_ProductDefinition)& PD,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers next assembly usage occurrence entity
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers shape representation entity
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (
const Handle(StepShape_ShapeRepresentation)& sr,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
Standard_Boolean& isBound,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root
//! shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepShape_ShapeRepresentation)& sr,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
Standard_Boolean& isBound,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers context dependent shape representation entity
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers shape representation relationship entity
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (
const Handle(StepRepr_ShapeRepresentationRelationship)& und,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Standard_Integer nbrep = 0,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! theUseTrsf - special flag for using Axis2Placement from ShapeRepresentation for transform root
//! shape
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepRepr_ShapeRepresentationRelationship)& und,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Standard_Integer nbrep = 0,
const Standard_Boolean theUseTrsf = Standard_False,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Transfers geometric representation item entity such as ManifoldSolidBRep ,...etc
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepGeom_GeometricRepresentationItem)& git,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Standard_Boolean isManifold,
const Message_ProgressRange& theProgress);
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepGeom_GeometricRepresentationItem)& git,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Standard_Boolean isManifold,
const Message_ProgressRange& theProgress);
//! Transfers mapped item
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepRepr_MappedItem)& mapit,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepRepr_MappedItem)& mapit,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
//! Transfers FaceSurface entity
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
(const Handle(StepShape_FaceSurface)& fs,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepShape_FaceSurface)& fs,
const Handle(Transfer_TransientProcess)& TP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors = StepData_Factors());
Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors = StepData_Factors());
//! Transfers MechanicalDesignAndDraughtingRelationship entity
Handle(TransferBRep_ShapeBinder) TransferEntity(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
Handle(TransferBRep_ShapeBinder) TransferEntity(
const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors,
const Message_ProgressRange& theProgress);
//! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off.
Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay
(const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const Message_ProgressRange& theProgress);
//! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is
//! equal Off.
Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay(
const Handle(Standard_Transient)& start,
const Handle(Transfer_TransientProcess)& TP,
const Message_ProgressRange& theProgress);
private:
Standard_EXPORT TopoDS_Shell closeIDEASShell (const TopoDS_Shell& shell, const TopTools_ListOfShape& closingShells);
Standard_EXPORT TopoDS_Shell closeIDEASShell(const TopoDS_Shell& shell,
const TopTools_ListOfShape& closingShells);
Standard_EXPORT void computeIDEASClosings (const TopoDS_Compound& comp, TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap);
Standard_EXPORT void computeIDEASClosings(
const TopoDS_Compound& comp,
TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap);
Standard_EXPORT TopoDS_Shape TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
const Handle(StepShape_ShapeRepresentation)& theRep,
const Standard_Boolean theUseTrsf,
const Standard_Boolean theReadConstructiveGeomRR,
const StepData_Factors& theLocalFactors,
TopoDS_Compound& theCund,
Message_ProgressScope& thePS);
Standard_EXPORT TopoDS_Shape
TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
const Handle(StepShape_ShapeRepresentation)& theRep,
const Standard_Boolean theUseTrsf,
const Standard_Boolean theReadConstructiveGeomRR,
const StepData_Factors& theLocalFactors,
TopoDS_Compound& theCund,
Message_ProgressScope& thePS);
private:
StepToTopoDS_NMTool myNMTool;
Standard_Real myPrecision;
Standard_Real myMaxTol;
Handle(StepRepr_Representation) mySRContext;
StepToTopoDS_NMTool myNMTool;
Standard_Real myPrecision;
Standard_Real myMaxTol;
Handle(StepRepr_Representation) mySRContext;
Handle(Interface_InterfaceModel) myModel;
};

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,6 @@ class StepGeom_Axis2Placement3d;
class TopoDS_Shape;
class StepShape_NonManifoldSurfaceShapeRepresentation;
class STEPControl_ActorWrite;
DEFINE_STANDARD_HANDLE(STEPControl_ActorWrite, Transfer_ActorOfFinderProcess)
@@ -44,59 +43,60 @@ class STEPControl_ActorWrite : public Transfer_ActorOfFinderProcess
public:
Standard_EXPORT STEPControl_ActorWrite();
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer
(const Handle(Transfer_Finder)& start,
const Handle(Transfer_FinderProcess)& FP,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
Standard_EXPORT Handle(Transfer_Binder) TransferSubShape
(const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
Handle(StepGeom_Axis2Placement3d)& AX1,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(Transfer_Binder) TransferShape
(const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(Transfer_Binder) TransferCompound
(const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT void SetMode (const STEPControl_StepModelType M);
Standard_EXPORT virtual Standard_Boolean Recognize(const Handle(Transfer_Finder)& start)
Standard_OVERRIDE;
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer(
const Handle(Transfer_Finder)& start,
const Handle(Transfer_FinderProcess)& FP,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
Standard_EXPORT Handle(Transfer_Binder) TransferSubShape(
const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
Handle(StepGeom_Axis2Placement3d)& AX1,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(Transfer_Binder) TransferShape(
const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
const Standard_Boolean isManifold = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Handle(Transfer_Binder) TransferCompound(
const Handle(Transfer_Finder)& start,
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
const Handle(Transfer_FinderProcess)& FP,
const StepData_Factors& theLocalFactors = StepData_Factors(),
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT void SetMode(const STEPControl_StepModelType M);
Standard_EXPORT STEPControl_StepModelType Mode() const;
Standard_EXPORT void SetGroupMode (const Standard_Integer mode);
Standard_EXPORT void SetGroupMode(const Standard_Integer mode);
Standard_EXPORT Standard_Integer GroupMode() const;
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
Standard_EXPORT void SetTolerance(const Standard_Real Tol);
//! Customizable method to check whether shape S should
//! be written as assembly or not
//! Default implementation uses flag GroupMode and analyses
//! the shape itself
//! NOTE: this method can modify shape
Standard_EXPORT virtual Standard_Boolean IsAssembly (const Handle(StepData_StepModel)& theModel,
TopoDS_Shape& S) const;
Standard_EXPORT virtual Standard_Boolean IsAssembly(const Handle(StepData_StepModel)& theModel,
TopoDS_Shape& S) const;
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorWrite,Transfer_ActorOfFinderProcess)
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorWrite, Transfer_ActorOfFinderProcess)
private:
//! Non-manifold shapes are stored in NMSSR group
@@ -104,30 +104,26 @@ private:
//! Use this method to get the corresponding NMSSR (or
//! to create a new one if doesn't exist yet)
//! (ssv; 13.11.2010)
Standard_EXPORT Handle(StepShape_NonManifoldSurfaceShapeRepresentation) getNMSSRForGroup (const Handle(TopTools_HSequenceOfShape)& shapeGroup, const Handle(Transfer_FinderProcess)& FP, Standard_Boolean& isNMSSRCreated) const;
Standard_EXPORT Handle(StepShape_NonManifoldSurfaceShapeRepresentation) getNMSSRForGroup(
const Handle(TopTools_HSequenceOfShape)& shapeGroup,
const Handle(Transfer_FinderProcess)& FP,
Standard_Boolean& isNMSSRCreated) const;
//! bind already written shared faces to STEP entity for non-manifold
Standard_EXPORT void mergeInfoForNM(const Handle(Transfer_FinderProcess)& theFP, const Handle(Standard_Transient) &theInfo) const;
Standard_EXPORT void mergeInfoForNM(const Handle(Transfer_FinderProcess)& theFP,
const Handle(Standard_Transient)& theInfo) const;
//! Gets sequence of vertices of all compounds level by recursive
//! @param[in] theShape shape to iterate, checked for compound type and sub shapes vertex type
//! @param[out] theVertices sequence of found vertices via recursively iterate of shape
//! @return TRUE if one or more vertex was found and all shapes were compound or vertex
Standard_Boolean separateShapeToSoloVertex(const TopoDS_Shape& theShape,
Standard_Boolean separateShapeToSoloVertex(const TopoDS_Shape& theShape,
TopTools_SequenceOfShape& theVertices);
private:
Standard_Integer mygroup;
Standard_Real mytoler;
Standard_Integer mygroup;
Standard_Real mytoler;
STEPConstruct_ContextTool myContext;
};
#endif // _STEPControl_ActorWrite_HeaderFile

View File

@@ -11,7 +11,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//:j4 gka 16.03.99 S4134
//: j4 gka 16.03.99 S4134
// gka 05.04.99 S4136: parameters definitions changed
#include <APIHeaderSection_EditHeader.hxx>
@@ -52,201 +52,212 @@
#include <XSAlgo_ShapeProcessor.hxx>
#include <XSControl_WorkSession.hxx>
IMPLEMENT_STANDARD_RTTIEXT(STEPControl_Controller,XSControl_Controller)
IMPLEMENT_STANDARD_RTTIEXT(STEPControl_Controller, XSControl_Controller)
// Pour NewModel et Write : definition de produit (temporaire ...)
STEPControl_Controller::STEPControl_Controller ()
: XSControl_Controller ("STEP", "step")
STEPControl_Controller::STEPControl_Controller()
: XSControl_Controller("STEP", "step")
{
static Standard_Boolean init = Standard_False;
static Standard_Mutex aMutex;
static Standard_Mutex aMutex;
aMutex.Lock();
if (!init) {
RWHeaderSection::Init(); RWStepAP214::Init();
if (!init)
{
RWHeaderSection::Init();
RWStepAP214::Init();
Interface_Static::Init ("step","write.step.product.name",'t',"Open CASCADE STEP translator " OCC_VERSION_STRING);
Interface_Static::Init ("step","write.step.assembly",'e',"");
Interface_Static::Init ("step","write.step.assembly",'&',"enum 0");
Interface_Static::Init ("step","write.step.assembly",'&',"eval Off");
Interface_Static::Init ("step","write.step.assembly",'&',"eval On");
Interface_Static::Init ("step","write.step.assembly",'&',"eval Auto");
Interface_Static::SetCVal("write.step.assembly","Auto");
Interface_Static::Init("step",
"write.step.product.name",
't',
"Open CASCADE STEP translator " OCC_VERSION_STRING);
Interface_Static::Init("step", "write.step.assembly", 'e', "");
Interface_Static::Init("step", "write.step.assembly", '&', "enum 0");
Interface_Static::Init("step", "write.step.assembly", '&', "eval Off");
Interface_Static::Init("step", "write.step.assembly", '&', "eval On");
Interface_Static::Init("step", "write.step.assembly", '&', "eval Auto");
Interface_Static::SetCVal("write.step.assembly", "Auto");
Interface_Static::Init("step","step.angleunit.mode", 'e',"");
Interface_Static::Init("step","step.angleunit.mode", '&',"enum 0");
Interface_Static::Init("step","step.angleunit.mode", '&',"eval File");
Interface_Static::Init("step","step.angleunit.mode", '&',"eval Rad");
Interface_Static::Init("step","step.angleunit.mode", '&',"eval Deg");
Interface_Static::SetCVal("step.angleunit.mode","File");
Interface_Static::Init("step", "step.angleunit.mode", 'e', "");
Interface_Static::Init("step", "step.angleunit.mode", '&', "enum 0");
Interface_Static::Init("step", "step.angleunit.mode", '&', "eval File");
Interface_Static::Init("step", "step.angleunit.mode", '&', "eval Rad");
Interface_Static::Init("step", "step.angleunit.mode", '&', "eval Deg");
Interface_Static::SetCVal("step.angleunit.mode", "File");
Interface_Static::Init("step","write.step.schema", 'e',"");
Interface_Static::Init("step","write.step.schema",'&',"enum 1");
Interface_Static::Init("step","write.step.schema",'&',"eval AP214CD");
Interface_Static::Init("step","write.step.schema",'&',"eval AP214DIS");
Interface_Static::Init("step","write.step.schema",'&',"eval AP203");
Interface_Static::Init("step","write.step.schema",'&',"eval AP214IS");
Interface_Static::Init("step","write.step.schema",'&',"eval AP242DIS");
Interface_Static::SetCVal("write.step.schema","AP214IS");
Interface_Static::Init("step", "write.step.schema", 'e', "");
Interface_Static::Init("step", "write.step.schema", '&', "enum 1");
Interface_Static::Init("step", "write.step.schema", '&', "eval AP214CD");
Interface_Static::Init("step", "write.step.schema", '&', "eval AP214DIS");
Interface_Static::Init("step", "write.step.schema", '&', "eval AP203");
Interface_Static::Init("step", "write.step.schema", '&', "eval AP214IS");
Interface_Static::Init("step", "write.step.schema", '&', "eval AP242DIS");
Interface_Static::SetCVal("write.step.schema", "AP214IS");
// Type of Product Definition for reading
// Note: the numbers should be consistent with function FindShapeReprType()
// in STEPControl_ActorRead.cxx
Interface_Static::Init("step","read.step.shape.repr",'e',"");
Interface_Static::Init("step","read.step.shape.repr",'&',"enum 1");
Interface_Static::Init("step","read.step.shape.repr",'&',"eval All"); // 1
Interface_Static::Init("step","read.step.shape.repr",'&',"eval ABSR"); // 2
Interface_Static::Init("step","read.step.shape.repr",'&',"eval MSSR"); // 3
Interface_Static::Init("step","read.step.shape.repr",'&',"eval GBSSR"); // 4
Interface_Static::Init("step","read.step.shape.repr",'&',"eval FBSR"); // 5
Interface_Static::Init("step","read.step.shape.repr",'&',"eval EBWSR"); // 6
Interface_Static::Init("step","read.step.shape.repr",'&',"eval GBWSR"); // 7
Interface_Static::SetCVal("read.step.shape.repr","All");
Interface_Static::Init("step", "read.step.shape.repr", 'e', "");
Interface_Static::Init("step", "read.step.shape.repr", '&', "enum 1");
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval All"); // 1
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval ABSR"); // 2
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval MSSR"); // 3
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval GBSSR"); // 4
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval FBSR"); // 5
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval EBWSR"); // 6
Interface_Static::Init("step", "read.step.shape.repr", '&', "eval GBWSR"); // 7
Interface_Static::SetCVal("read.step.shape.repr", "All");
// Mode for reading shapes attached to main SDR by SRR
// (hybrid model representation in AP203 since 1998)
Interface_Static::Init("step","read.step.shape.relationship",'e',"");
Interface_Static::Init("step","read.step.shape.relationship",'&',"enum 0");
Interface_Static::Init("step","read.step.shape.relationship",'&',"eval OFF");
Interface_Static::Init("step","read.step.shape.relationship",'&',"eval ON");
Interface_Static::SetCVal("read.step.shape.relationship","ON");
Interface_Static::Init("step", "read.step.shape.relationship", 'e', "");
Interface_Static::Init("step", "read.step.shape.relationship", '&', "enum 0");
Interface_Static::Init("step", "read.step.shape.relationship", '&', "eval OFF");
Interface_Static::Init("step", "read.step.shape.relationship", '&', "eval ON");
Interface_Static::SetCVal("read.step.shape.relationship", "ON");
// Mode for reading shapes attached to Product by ShapeAspect
// Mode for reading shapes attached to Product by ShapeAspect
// (hybrid model representation in AP203 before 1998)
Interface_Static::Init("step","read.step.shape.aspect",'e',"");
Interface_Static::Init("step","read.step.shape.aspect",'&',"enum 0");
Interface_Static::Init("step","read.step.shape.aspect",'&',"eval OFF");
Interface_Static::Init("step","read.step.shape.aspect",'&',"eval ON");
Interface_Static::SetCVal("read.step.shape.aspect","ON");
Interface_Static::Init("step", "read.step.shape.aspect", 'e', "");
Interface_Static::Init("step", "read.step.shape.aspect", '&', "enum 0");
Interface_Static::Init("step", "read.step.shape.aspect", '&', "eval OFF");
Interface_Static::Init("step", "read.step.shape.aspect", '&', "eval ON");
Interface_Static::SetCVal("read.step.shape.aspect", "ON");
// Mode for reading SDR and ShapeRepr if it is necessary
Interface_Static::Init("step","read.step.product.mode",'e',"");
Interface_Static::Init("step","read.step.product.mode",'&',"enum 0");
Interface_Static::Init("step","read.step.product.mode",'&',"eval OFF");
Interface_Static::Init("step","read.step.product.mode",'&',"eval ON");
Interface_Static::SetCVal("read.step.product.mode","ON");
Interface_Static::Init("step", "read.step.product.mode", 'e', "");
Interface_Static::Init("step", "read.step.product.mode", '&', "enum 0");
Interface_Static::Init("step", "read.step.product.mode", '&', "eval OFF");
Interface_Static::Init("step", "read.step.product.mode", '&', "eval ON");
Interface_Static::SetCVal("read.step.product.mode", "ON");
// Order of reading ShapeDefinitionRepresentation in ProductDefinition
Interface_Static::Init("step","read.step.product.context",'e',"");
Interface_Static::Init("step","read.step.product.context",'&',"enum 1");
Interface_Static::Init("step","read.step.product.context",'&',"eval all"); // 1
Interface_Static::Init("step","read.step.product.context",'&',"eval design"); // 2
Interface_Static::Init("step","read.step.product.context",'&',"eval analysis");// 3
Interface_Static::SetCVal("read.step.product.context","all");
Interface_Static::Init("step", "read.step.product.context", 'e', "");
Interface_Static::Init("step", "read.step.product.context", '&', "enum 1");
Interface_Static::Init("step", "read.step.product.context", '&', "eval all"); // 1
Interface_Static::Init("step", "read.step.product.context", '&', "eval design"); // 2
Interface_Static::Init("step", "read.step.product.context", '&', "eval analysis"); // 3
Interface_Static::SetCVal("read.step.product.context", "all");
// What we try to read in ProductDefinition
Interface_Static::Init("step","read.step.assembly.level",'e',"");
Interface_Static::Init("step","read.step.assembly.level",'&',"enum 1");
Interface_Static::Init("step","read.step.assembly.level",'&',"eval all"); // 1
Interface_Static::Init("step","read.step.assembly.level",'&',"eval assembly"); // 2
Interface_Static::Init("step","read.step.assembly.level",'&',"eval structure");// 3
Interface_Static::Init("step","read.step.assembly.level",'&',"eval shape"); // 4
Interface_Static::SetCVal("read.step.assembly.level","all");
Interface_Static::Init("step", "read.step.assembly.level", 'e', "");
Interface_Static::Init("step", "read.step.assembly.level", '&', "enum 1");
Interface_Static::Init("step", "read.step.assembly.level", '&', "eval all"); // 1
Interface_Static::Init("step", "read.step.assembly.level", '&', "eval assembly"); // 2
Interface_Static::Init("step", "read.step.assembly.level", '&', "eval structure"); // 3
Interface_Static::Init("step", "read.step.assembly.level", '&', "eval shape"); // 4
Interface_Static::SetCVal("read.step.assembly.level", "all");
// unit: supposed to be cascade unit (target unit for reading)
Interface_Static::Init("step","write.step.unit", 'e',"");
Interface_Static::Init("step","write.step.unit",'&',"enum 1");
Interface_Static::Init("step","write.step.unit",'&',"eval INCH"); // 1
Interface_Static::Init("step","write.step.unit",'&',"eval MM"); // 2
Interface_Static::Init("step","write.step.unit",'&',"eval ??"); // 3
Interface_Static::Init("step","write.step.unit",'&',"eval FT"); // 4
Interface_Static::Init("step","write.step.unit",'&',"eval MI"); // 5
Interface_Static::Init("step","write.step.unit",'&',"eval M"); // 6
Interface_Static::Init("step","write.step.unit",'&',"eval KM"); // 7
Interface_Static::Init("step","write.step.unit",'&',"eval MIL"); // 8
Interface_Static::Init("step","write.step.unit",'&',"eval UM"); // 9
Interface_Static::Init("step","write.step.unit",'&',"eval CM"); //10
Interface_Static::Init("step","write.step.unit",'&',"eval UIN"); //11
Interface_Static::SetCVal ("write.step.unit","MM");
Interface_Static::Init("step", "write.step.unit", 'e', "");
Interface_Static::Init("step", "write.step.unit", '&', "enum 1");
Interface_Static::Init("step", "write.step.unit", '&', "eval INCH"); // 1
Interface_Static::Init("step", "write.step.unit", '&', "eval MM"); // 2
Interface_Static::Init("step", "write.step.unit", '&', "eval ??"); // 3
Interface_Static::Init("step", "write.step.unit", '&', "eval FT"); // 4
Interface_Static::Init("step", "write.step.unit", '&', "eval MI"); // 5
Interface_Static::Init("step", "write.step.unit", '&', "eval M"); // 6
Interface_Static::Init("step", "write.step.unit", '&', "eval KM"); // 7
Interface_Static::Init("step", "write.step.unit", '&', "eval MIL"); // 8
Interface_Static::Init("step", "write.step.unit", '&', "eval UM"); // 9
Interface_Static::Init("step", "write.step.unit", '&', "eval CM"); // 10
Interface_Static::Init("step", "write.step.unit", '&', "eval UIN"); // 11
Interface_Static::SetCVal("write.step.unit", "MM");
// Non-manifold topology reading: OFF by default (ssv; 26.11.2010)
Interface_Static::Init ("step","read.step.nonmanifold",'e',"");
Interface_Static::Init ("step","read.step.nonmanifold",'&',"enum 0");
Interface_Static::Init ("step","read.step.nonmanifold",'&',"eval Off");
Interface_Static::Init ("step","read.step.nonmanifold",'&',"eval On");
Interface_Static::SetIVal("read.step.nonmanifold",0);
Interface_Static::Init("step", "read.step.nonmanifold", 'e', "");
Interface_Static::Init("step", "read.step.nonmanifold", '&', "enum 0");
Interface_Static::Init("step", "read.step.nonmanifold", '&', "eval Off");
Interface_Static::Init("step", "read.step.nonmanifold", '&', "eval On");
Interface_Static::SetIVal("read.step.nonmanifold", 0);
// Non-manifold topology writing: OFF by default (ssv; 26.11.2010)
Interface_Static::Init ("step","write.step.nonmanifold",'e',"");
Interface_Static::Init ("step","write.step.nonmanifold",'&',"enum 0");
Interface_Static::Init ("step","write.step.nonmanifold",'&',"eval Off");
Interface_Static::Init ("step","write.step.nonmanifold",'&',"eval On");
Interface_Static::SetIVal("write.step.nonmanifold",0);
Interface_Static::Init("step", "write.step.nonmanifold", 'e', "");
Interface_Static::Init("step", "write.step.nonmanifold", '&', "enum 0");
Interface_Static::Init("step", "write.step.nonmanifold", '&', "eval Off");
Interface_Static::Init("step", "write.step.nonmanifold", '&', "eval On");
Interface_Static::SetIVal("write.step.nonmanifold", 0);
// I-Deas-like STEP processing: OFF by default (ssv; 22.11.2010)
Interface_Static::Init ("step","read.step.ideas",'e',"");
Interface_Static::Init ("step","read.step.ideas",'&',"enum 0");
Interface_Static::Init ("step","read.step.ideas",'&',"eval Off");
Interface_Static::Init ("step","read.step.ideas",'&',"eval On");
Interface_Static::SetIVal("read.step.ideas",0);
Interface_Static::Init("step", "read.step.ideas", 'e', "");
Interface_Static::Init("step", "read.step.ideas", '&', "enum 0");
Interface_Static::Init("step", "read.step.ideas", '&', "eval Off");
Interface_Static::Init("step", "read.step.ideas", '&', "eval On");
Interface_Static::SetIVal("read.step.ideas", 0);
//Parameter to write all free vertices in one SDR (name and style of vertex are lost) (default)
//or each vertex in its own SDR (name and style of vertex are exported). (ika; 21.07.2014)
Interface_Static::Init ("step","write.step.vertex.mode",'e',"");
Interface_Static::Init ("step","write.step.vertex.mode",'&',"enum 0");
Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval One Compound");
Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval Single Vertex");
Interface_Static::SetIVal("write.step.vertex.mode",0);
// Parameter to write all free vertices in one SDR (name and style of vertex are lost) (default)
// or each vertex in its own SDR (name and style of vertex are exported). (ika; 21.07.2014)
Interface_Static::Init("step", "write.step.vertex.mode", 'e', "");
Interface_Static::Init("step", "write.step.vertex.mode", '&', "enum 0");
Interface_Static::Init("step", "write.step.vertex.mode", '&', "eval One Compound");
Interface_Static::Init("step", "write.step.vertex.mode", '&', "eval Single Vertex");
Interface_Static::SetIVal("write.step.vertex.mode", 0);
// abv 15.11.00: ShapeProcessing
Interface_Static::Init ("XSTEP", "write.step.resource.name", 't', "STEP");
Interface_Static::Init ("XSTEP", "read.step.resource.name", 't', "STEP");
Interface_Static::Init ("XSTEP", "write.step.sequence", 't', "ToSTEP");
Interface_Static::Init ("XSTEP", "read.step.sequence", 't', "FromSTEP");
Interface_Static::Init ("XSTEP", "ToSTEP.exec.op", 't', "SplitCommonVertex,DirectFaces");
Interface_Static::Init ("XSTEP", "FromSTEP.exec.op", 't', "FixShape");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.Tolerance3d", 't', "&Runtime.Tolerance");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTolerance3d", 't', "&Runtime.MaxTolerance");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MinTolerance3d", 't', "1.e-7");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeShellMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeFaceMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeWireMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSameParameterMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSolidMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShellOrientationMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.CreateOpenSolidMode", 't', "0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShellMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFaceOrientationMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFaceMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixWireMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixOrientationMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddNaturalBoundMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixMissingSeamMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSmallAreaWireMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.RemoveSmallAreaFaceMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixIntersectingWiresMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixLoopWiresMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSplitFaceMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.AutoCorrectPrecisionMode", 't', "1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ModifyTopologyMode", 't', "0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ModifyGeometryMode", 't', "1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ClosedWireMode", 't', "1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.PreferencePCurveMode", 't', "1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixReorderMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSmallMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixConnectedMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixEdgeCurvesMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixDegeneratedMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixLackingMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSelfIntersectionMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.RemoveLoopMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixReversed2dMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixRemovePCurveMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixRemoveCurve3dMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddPCurveMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddCurve3dMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSeamMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShiftedMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixEdgeSameParameterMode", 't', "0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixNotchedEdgesMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixTailMode", 't', "0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTailAngle", 't', "0.0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTailWidth", 't', "-1.0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSelfIntersectingEdgeMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixIntersectingEdgesMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexPositionMode", 't', "0");
Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexToleranceMode", 't', "-1");
Interface_Static::Init ("XSTEP", "FromSTEP.FixFaceSize.Tolerance", 't', "1.e-7");
Interface_Static::Init("XSTEP", "write.step.resource.name", 't', "STEP");
Interface_Static::Init("XSTEP", "read.step.resource.name", 't', "STEP");
Interface_Static::Init("XSTEP", "write.step.sequence", 't', "ToSTEP");
Interface_Static::Init("XSTEP", "read.step.sequence", 't', "FromSTEP");
Interface_Static::Init("XSTEP", "ToSTEP.exec.op", 't', "SplitCommonVertex,DirectFaces");
Interface_Static::Init("XSTEP", "FromSTEP.exec.op", 't', "FixShape");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.Tolerance3d", 't', "&Runtime.Tolerance");
Interface_Static::Init("XSTEP",
"FromSTEP.FixShape.MaxTolerance3d",
't',
"&Runtime.MaxTolerance");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.MinTolerance3d", 't', "1.e-7");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixFreeShellMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixFreeFaceMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixFreeWireMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSameParameterMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSolidMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixShellOrientationMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.CreateOpenSolidMode", 't', "0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixShellMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixFaceOrientationMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixFaceMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixWireMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixOrientationMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixAddNaturalBoundMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixMissingSeamMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSmallAreaWireMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.RemoveSmallAreaFaceMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixIntersectingWiresMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixLoopWiresMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSplitFaceMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.AutoCorrectPrecisionMode", 't', "1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.ModifyTopologyMode", 't', "0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.ModifyGeometryMode", 't', "1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.ClosedWireMode", 't', "1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.PreferencePCurveMode", 't', "1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixReorderMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSmallMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixConnectedMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixEdgeCurvesMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixDegeneratedMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixLackingMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSelfIntersectionMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.RemoveLoopMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixReversed2dMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixRemovePCurveMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixRemoveCurve3dMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixAddPCurveMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixAddCurve3dMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSeamMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixShiftedMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixEdgeSameParameterMode", 't', "0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixNotchedEdgesMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixTailMode", 't', "0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.MaxTailAngle", 't', "0.0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.MaxTailWidth", 't', "-1.0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixSelfIntersectingEdgeMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixIntersectingEdgesMode", 't', "-1");
Interface_Static::Init("XSTEP",
"FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode",
't',
"-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixVertexPositionMode", 't', "0");
Interface_Static::Init("XSTEP", "FromSTEP.FixShape.FixVertexToleranceMode", 't', "-1");
Interface_Static::Init("XSTEP", "FromSTEP.FixFaceSize.Tolerance", 't', "1.e-7");
// ika 28.07.16: Parameter to read all top level solids and shells,
// should be used only in case of invalid shape_representation without links to shapes.
@@ -256,15 +267,15 @@ STEPControl_Controller::STEPControl_Controller ()
Interface_Static::Init("step", "read.step.all.shapes", '&', "eval On");
Interface_Static::SetIVal("read.step.all.shapes", 0);
// Mode for reading constructive geometry representation relationship to read
//StepRepr_ConstructiveGeometryRepresentation method implemented only for StepGeom_MakeAxis2Placement3d
//for axis placements representing axis for suplemented geometry. Axis placements are translated to planar faces with CS
//equal to translated axis placements
Interface_Static::Init("step","read.step.constructivegeom.relationship",'e',"");
Interface_Static::Init("step","read.step.constructivegeom.relationship",'&',"enum 0");
Interface_Static::Init("step","read.step.constructivegeom.relationship",'&',"eval OFF");
Interface_Static::Init("step","read.step.constructivegeom.relationship",'&',"eval ON");
Interface_Static::SetCVal("read.step.constructivegeom.relationship","OFF");
// Mode for reading constructive geometry representation relationship to read
// StepRepr_ConstructiveGeometryRepresentation method implemented only for
// StepGeom_MakeAxis2Placement3d for axis placements representing axis for suplemented geometry.
// Axis placements are translated to planar faces with CS equal to translated axis placements
Interface_Static::Init("step", "read.step.constructivegeom.relationship", 'e', "");
Interface_Static::Init("step", "read.step.constructivegeom.relationship", '&', "enum 0");
Interface_Static::Init("step", "read.step.constructivegeom.relationship", '&', "eval OFF");
Interface_Static::Init("step", "read.step.constructivegeom.relationship", '&', "eval ON");
Interface_Static::SetCVal("read.step.constructivegeom.relationship", "OFF");
// Mode to variate apply or not transformation placed in the root shape representation.
// Issues #29068 and #31491.
@@ -278,7 +289,7 @@ STEPControl_Controller::STEPControl_Controller ()
// Note: the numbers should be consistent with Resource_FormatType enumeration
Interface_Static::Init("step", "read.step.codepage", 'e', "");
Interface_Static::Init("step", "read.step.codepage", '&', "enum 0");
// clang-format off
// clang-format off
Interface_Static::Init("step", "read.step.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS 0
Interface_Static::Init("step", "read.step.codepage", '&', "eval EUC"); // Resource_FormatType_EUC 1
Interface_Static::Init("step", "read.step.codepage", '&', "eval NoConversion"); // Resource_FormatType_NoConversion 2
@@ -304,15 +315,15 @@ STEPControl_Controller::STEPControl_Controller ()
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-8"); // Resource_FormatType_iso8859_8 22
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9 23
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP850"); // Resource_FormatType_CP850 24
// clang-format on
// clang-format on
Interface_Static::SetCVal("read.step.codepage", "UTF8");
// Tessellated geometry reading: Off by default
Interface_Static::Init("step", "read.step.tessellated", 'e', "");
Interface_Static::Init("step", "read.step.tessellated", '&', "enum 0");
Interface_Static::Init("step", "read.step.tessellated", '&', "eval Off"); // 0
Interface_Static::Init("step", "read.step.tessellated", '&', "eval On"); // 1
Interface_Static::Init("step", "read.step.tessellated", '&', "eval OnNoBRep"); // 2
Interface_Static::Init("step", "read.step.tessellated", '&', "eval Off"); // 0
Interface_Static::Init("step", "read.step.tessellated", '&', "eval On"); // 1
Interface_Static::Init("step", "read.step.tessellated", '&', "eval OnNoBRep"); // 2
Interface_Static::SetCVal("read.step.tessellated", "On");
// Tessellated geometry writing: Off by default
@@ -323,103 +334,106 @@ STEPControl_Controller::STEPControl_Controller ()
Interface_Static::Init("step", "write.step.tessellated", '&', "eval OnNoBRep"); // 2
Interface_Static::SetCVal("write.step.tessellated", "OnNoBRep");
// clang-format off
// clang-format off
Standard_STATIC_ASSERT((int)Resource_FormatType_CP850 - (int)Resource_FormatType_CP1250 == 18); // "Error: Invalid Codepage Enumeration"
// clang-format on
// clang-format on
init = Standard_True;
}
aMutex.Unlock();
Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite;
myAdaptorWrite = ActWrite;
myAdaptorWrite = ActWrite;
Handle(StepSelect_WorkLibrary) swl = new StepSelect_WorkLibrary;
swl->SetDumpLabel(1);
myAdaptorLibrary = swl;
myAdaptorProtocol = STEPEdit::Protocol();
SetModeWrite (0,4);
SetModeWriteHelp (0,"As Is");
SetModeWriteHelp (1,"Faceted Brep");
SetModeWriteHelp (2,"Shell Based");
SetModeWriteHelp (3,"Manifold Solid");
SetModeWriteHelp (4,"Wireframe");
TraceStatic ("read.surfacecurve.mode",5);
SetModeWrite(0, 4);
SetModeWriteHelp(0, "As Is");
SetModeWriteHelp(1, "Faceted Brep");
SetModeWriteHelp(2, "Shell Based");
SetModeWriteHelp(3, "Manifold Solid");
SetModeWriteHelp(4, "Wireframe");
TraceStatic("read.surfacecurve.mode", 5);
// --- SELECTIONS, SIGNATURES, COMPTEURS, EDITEURS
DeclareAndCast(IFSelect_Selection,xmr,SessionItem("xst-model-roots"));
if (!xmr.IsNull()) {
DeclareAndCast(IFSelect_Selection, xmr, SessionItem("xst-model-roots"));
if (!xmr.IsNull())
{
Handle(IFSelect_Signature) sty = STEPEdit::SignType();
AddSessionItem (sty,"step-type");
Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty,Standard_False,Standard_True);
AddSessionItem (tys,"step-types");
AddSessionItem(sty, "step-type");
Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty, Standard_False, Standard_True);
AddSessionItem(tys, "step-types");
//szv:mySignType = sty;
//pdn S4133 18.02.99
AddSessionItem (new IFSelect_SignAncestor(),"xst-derived");
// szv:mySignType = sty;
// pdn S4133 18.02.99
AddSessionItem(new IFSelect_SignAncestor(), "xst-derived");
Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
stdvar->SetProtocol(STEPEdit::Protocol());
AddSessionItem (stdvar,"step-derived");
Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
selsdr->SetInput (xmr);
AddSessionItem (selsdr,"step-shape-def-repr");
AddSessionItem(stdvar, "step-derived");
AddSessionItem (STEPEdit::NewSelectPlacedItem(),"step-placed-items");
Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
selsdr->SetInput(xmr);
AddSessionItem(selsdr, "step-shape-def-repr");
AddSessionItem(STEPEdit::NewSelectPlacedItem(), "step-placed-items");
// input deja pret avec ModelAll
AddSessionItem (STEPEdit::NewSelectShapeRepr(),"step-shape-repr");
AddSessionItem(STEPEdit::NewSelectShapeRepr(), "step-shape-repr");
}
//pdn
// pdn
Handle(STEPSelections_SelectFaces) stfaces = new STEPSelections_SelectFaces;
stfaces->SetInput (xmr);
AddSessionItem (stfaces,"step-faces");
stfaces->SetInput(xmr);
AddSessionItem(stfaces, "step-faces");
Handle(STEPSelections_SelectInstances) stinst = new STEPSelections_SelectInstances;
AddSessionItem (stinst,"step-instances");
AddSessionItem(stinst, "step-instances");
Handle(STEPSelections_SelectGSCurves) stcurves = new STEPSelections_SelectGSCurves;
stcurves->SetInput (xmr);
AddSessionItem (stcurves,"step-GS-curves");
stcurves->SetInput(xmr);
AddSessionItem(stcurves, "step-GS-curves");
Handle(STEPSelections_SelectAssembly) assembly = new STEPSelections_SelectAssembly;
assembly->SetInput (xmr);
AddSessionItem (assembly,"step-assembly");
assembly->SetInput(xmr);
AddSessionItem(assembly, "step-assembly");
Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader;
Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header");
AddSessionItem (edhead,"step-header-edit");
AddSessionItem (edheadf,"step-header");
Handle(IFSelect_EditForm) edheadf =
new IFSelect_EditForm(edhead, Standard_False, Standard_True, "Step Header");
AddSessionItem(edhead, "step-header-edit");
AddSessionItem(edheadf, "step-header");
Handle(STEPEdit_EditContext) edctx = new STEPEdit_EditContext;
Handle(IFSelect_EditForm) edctxf = new IFSelect_EditForm (edctx,Standard_False,Standard_True,"STEP Product Definition Context");
AddSessionItem (edctx,"step-context-edit");
AddSessionItem (edctxf,"step-context");
Handle(IFSelect_EditForm) edctxf =
new IFSelect_EditForm(edctx, Standard_False, Standard_True, "STEP Product Definition Context");
AddSessionItem(edctx, "step-context-edit");
AddSessionItem(edctxf, "step-context");
Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
Handle(IFSelect_EditForm) edsdrf = new IFSelect_EditForm (edsdr,Standard_False,Standard_True,"STEP Product Data (SDR)");
AddSessionItem (edsdr,"step-SDR-edit");
AddSessionItem (edsdrf,"step-SDR-data");
Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
Handle(IFSelect_EditForm) edsdrf =
new IFSelect_EditForm(edsdr, Standard_False, Standard_True, "STEP Product Data (SDR)");
AddSessionItem(edsdr, "step-SDR-edit");
AddSessionItem(edsdrf, "step-SDR-data");
}
Handle(Interface_InterfaceModel) STEPControl_Controller::NewModel () const
Handle(Interface_InterfaceModel) STEPControl_Controller::NewModel() const
{
return STEPEdit::NewModel();
}
//=======================================================================
//function : ActorRead
//purpose :
//=======================================================================
Handle(Transfer_ActorOfTransientProcess) STEPControl_Controller::ActorRead(const Handle(Interface_InterfaceModel)& theModel) const
//=================================================================================================
Handle(Transfer_ActorOfTransientProcess) STEPControl_Controller::ActorRead(
const Handle(Interface_InterfaceModel)& theModel) const
{
DeclareAndCast(STEPControl_ActorRead, anAdap, myAdaptorRead);
if (anAdap.IsNull()) {
if (anAdap.IsNull())
{
anAdap = new STEPControl_ActorRead(theModel);
anAdap->SetModel(theModel);
}
@@ -428,126 +442,130 @@ Handle(Transfer_ActorOfTransientProcess) STEPControl_Controller::ActorRead(const
// #### PROVISOIRE ??? ####
IFSelect_ReturnStatus STEPControl_Controller::TransferWriteShape
(const TopoDS_Shape& shape,
const Handle(Transfer_FinderProcess)& FP,
const Handle(Interface_InterfaceModel)& model,
const Standard_Integer modeshape,
const Message_ProgressRange& theProgress) const
IFSelect_ReturnStatus STEPControl_Controller::TransferWriteShape(
const TopoDS_Shape& shape,
const Handle(Transfer_FinderProcess)& FP,
const Handle(Interface_InterfaceModel)& model,
const Standard_Integer modeshape,
const Message_ProgressRange& theProgress) const
{
if (modeshape < 0 || modeshape > 4) return IFSelect_RetError;
if (modeshape < 0 || modeshape > 4)
return IFSelect_RetError;
Handle(STEPControl_ActorWrite) ActWrite =
Handle(STEPControl_ActorWrite)::DownCast(myAdaptorWrite);
// A PRESENT ON PASSE PAR LE PROFILE
// A PRESENT ON PASSE PAR LE PROFILE
Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(model);
if (!ActWrite.IsNull())
ActWrite->SetGroupMode (aModel->InternalParameters.WriteAssembly);
TopoDS_Shape aShape = shape;
if (!ActWrite.IsNull())
ActWrite->SetGroupMode(aModel->InternalParameters.WriteAssembly);
TopoDS_Shape aShape = shape;
TopTools_DataMapOfShapeShape aModifedMap;
if (aModel->InternalParameters.WriteNonmanifold)
{
ShapeUpgrade_RemoveLocations aRemLoc;
aRemLoc.SetRemoveLevel(TopAbs_COMPOUND);
aRemLoc.Remove(aShape);
aShape = aRemLoc.GetResult();
aShape = aRemLoc.GetResult();
aModifedMap = aRemLoc.GetModifiedShapesMap();
}
const IFSelect_ReturnStatus aStatus = XSControl_Controller::TransferWriteShape(aShape, FP, model, modeshape, theProgress);
XSAlgo_ShapeProcessor::MergeShapeTransferInfo(FP, aModifedMap, Handle(ShapeExtend_MsgRegistrator)());
const IFSelect_ReturnStatus aStatus =
XSControl_Controller::TransferWriteShape(aShape, FP, model, modeshape, theProgress);
XSAlgo_ShapeProcessor::MergeShapeTransferInfo(FP,
aModifedMap,
Handle(ShapeExtend_MsgRegistrator)());
return aStatus;
}
Standard_Boolean STEPControl_Controller::Init ()
Standard_Boolean STEPControl_Controller::Init()
{
static Standard_Boolean inic = Standard_False;
if (!inic) {
if (!inic)
{
Handle(STEPControl_Controller) STEPCTL = new STEPControl_Controller;
STEPCTL->AutoRecord(); // avec les noms donnes a la construction
XSAlgo::Init();
STEPCTL->AutoRecord(); // avec les noms donnes a la construction
XSAlgo::Init();
inic = Standard_True;
}
return Standard_True;
}
//=======================================================================
//function : Customise
//purpose :
//=======================================================================
void STEPControl_Controller::Customise(Handle(XSControl_WorkSession)& WS)
//=================================================================================================
void STEPControl_Controller::Customise(Handle(XSControl_WorkSession)& WS)
{
XSControl_Controller::Customise(WS);
Handle(IFSelect_SelectModelRoots) slr;
Handle(Standard_Transient) slr1 = WS->NamedItem("xst-model-roots");
if(!slr1.IsNull())
Handle(Standard_Transient) slr1 = WS->NamedItem("xst-model-roots");
if (!slr1.IsNull())
slr = Handle(IFSelect_SelectModelRoots)::DownCast(slr1);
else {
else
{
slr = new IFSelect_SelectModelRoots;
WS->AddNamedItem ("xst-model-roots",slr);
WS->AddNamedItem("xst-model-roots", slr);
}
Handle(STEPSelections_SelectForTransfer) st1= new STEPSelections_SelectForTransfer;
st1->SetReader (WS->TransferReader());
WS->AddNamedItem ("xst-transferrable-roots",st1);
Handle(STEPSelections_SelectForTransfer) st1 = new STEPSelections_SelectForTransfer;
st1->SetReader(WS->TransferReader());
WS->AddNamedItem("xst-transferrable-roots", st1);
if (!slr.IsNull()) {
if (!slr.IsNull())
{
Handle(IFSelect_Signature) sty = STEPEdit::SignType();
WS->AddNamedItem ("step-type",sty);
Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty,Standard_False,Standard_True);
WS->AddNamedItem ("step-types",tys);
WS->AddNamedItem("step-type", sty);
//szv:mySignType = sty;
WS->SetSignType( sty );
//pdn S4133 18.02.99
WS->AddNamedItem ("xst-derived",new IFSelect_SignAncestor());
Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty, Standard_False, Standard_True);
WS->AddNamedItem("step-types", tys);
// szv:mySignType = sty;
WS->SetSignType(sty);
// pdn S4133 18.02.99
WS->AddNamedItem("xst-derived", new IFSelect_SignAncestor());
Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
stdvar->SetProtocol(STEPEdit::Protocol());
WS->AddNamedItem ("step-derived",stdvar);
WS->AddNamedItem("step-derived", stdvar);
Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
selsdr->SetInput (slr);
WS->AddNamedItem ("step-shape-def-repr",selsdr);
selsdr->SetInput(slr);
WS->AddNamedItem("step-shape-def-repr", selsdr);
Handle(IFSelect_SelectSignature) selrrs = STEPEdit::NewSelectPlacedItem();
WS->AddNamedItem ("step-placed-items",selrrs);
WS->AddNamedItem("step-placed-items", selrrs);
Handle(IFSelect_SelectSignature) selsr = STEPEdit::NewSelectShapeRepr();
// input deja pret avec ModelAll
WS->AddNamedItem ("step-shape-repr",selsr);
WS->AddNamedItem("step-shape-repr", selsr);
}
//pdn
// pdn
Handle(STEPSelections_SelectFaces) stfaces = new STEPSelections_SelectFaces;
stfaces->SetInput (slr);
WS->AddNamedItem ("step-faces",stfaces);
stfaces->SetInput(slr);
WS->AddNamedItem("step-faces", stfaces);
Handle(STEPSelections_SelectInstances) stinst = new STEPSelections_SelectInstances;
WS->AddNamedItem ("step-instances",stinst);
WS->AddNamedItem("step-instances", stinst);
Handle(STEPSelections_SelectGSCurves) stcurves = new STEPSelections_SelectGSCurves;
stcurves->SetInput (slr);
WS->AddNamedItem ("step-GS-curves",stcurves);
stcurves->SetInput(slr);
WS->AddNamedItem("step-GS-curves", stcurves);
Handle(STEPSelections_SelectAssembly) assembly = new STEPSelections_SelectAssembly;
assembly->SetInput (slr);
WS->AddNamedItem ("step-assembly",assembly);
assembly->SetInput(slr);
WS->AddNamedItem("step-assembly", assembly);
Handle(APIHeaderSection_EditHeader) edhead = new APIHeaderSection_EditHeader;
Handle(IFSelect_EditForm) edheadf = new IFSelect_EditForm (edhead,Standard_False,Standard_True,"Step Header");
WS->AddNamedItem ("step-header-edit",edhead);
WS->AddNamedItem ("step-header",edheadf);
Handle(IFSelect_EditForm) edheadf =
new IFSelect_EditForm(edhead, Standard_False, Standard_True, "Step Header");
WS->AddNamedItem("step-header-edit", edhead);
WS->AddNamedItem("step-header", edheadf);
Handle(STEPEdit_EditContext) edctx = new STEPEdit_EditContext;
Handle(IFSelect_EditForm) edctxf = new IFSelect_EditForm (edctx,Standard_False,Standard_True,"STEP Product Definition Context");
WS->AddNamedItem ("step-context-edit",edctx);
WS->AddNamedItem ("step-context",edctxf);
Handle(IFSelect_EditForm) edctxf =
new IFSelect_EditForm(edctx, Standard_False, Standard_True, "STEP Product Definition Context");
WS->AddNamedItem("step-context-edit", edctx);
WS->AddNamedItem("step-context", edctxf);
Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
Handle(IFSelect_EditForm) edsdrf = new IFSelect_EditForm (edsdr,Standard_False,Standard_True,"STEP Product Data (SDR)");
WS->AddNamedItem ("step-SDR-edit",edsdr);
WS->AddNamedItem ("step-SDR-data",edsdrf);
Handle(STEPEdit_EditSDR) edsdr = new STEPEdit_EditSDR;
Handle(IFSelect_EditForm) edsdrf =
new IFSelect_EditForm(edsdr, Standard_False, Standard_True, "STEP Product Data (SDR)");
WS->AddNamedItem("step-SDR-edit", edsdr);
WS->AddNamedItem("step-SDR-data", edsdrf);
}

View File

@@ -28,7 +28,6 @@ class XSControl_WorkSession;
class TopoDS_Shape;
class Transfer_FinderProcess;
class STEPControl_Controller;
DEFINE_STANDARD_HANDLE(STEPControl_Controller, XSControl_Controller)
@@ -37,60 +36,42 @@ class STEPControl_Controller : public XSControl_Controller
{
public:
//! Initializes the use of STEP Norm (the first time) and
//! returns a Controller
Standard_EXPORT STEPControl_Controller();
//! Creates a new empty Model ready to receive data of the Norm.
//! It is taken from STEP Template Model
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE;
//! Returns the Actor for Read attached to the pair (norm,appli)
Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) ActorRead(const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE;
Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) ActorRead(
const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE;
Standard_EXPORT virtual void Customise(Handle(XSControl_WorkSession)& WS) Standard_OVERRIDE;
Standard_EXPORT virtual void Customise (Handle(XSControl_WorkSession)& WS) Standard_OVERRIDE;
//! Takes one Shape and transfers it to the InterfaceModel
//! (already created by NewModel for instance)
//! <modeshape> is to be interpreted by each kind of XstepAdaptor
//! Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape
//! -2 bad model (requires a StepModel)
//! modeshape : 1 Facetted BRep, 2 Shell, 3 Manifold Solid
Standard_EXPORT virtual IFSelect_ReturnStatus TransferWriteShape
(const TopoDS_Shape& shape,
const Handle(Transfer_FinderProcess)& FP,
const Handle(Interface_InterfaceModel)& model,
const Standard_Integer modetrans = 0,
const Message_ProgressRange& theProgress = Message_ProgressRange()) const Standard_OVERRIDE;
Standard_EXPORT virtual IFSelect_ReturnStatus TransferWriteShape(
const TopoDS_Shape& shape,
const Handle(Transfer_FinderProcess)& FP,
const Handle(Interface_InterfaceModel)& model,
const Standard_Integer modetrans = 0,
const Message_ProgressRange& theProgress = Message_ProgressRange()) const Standard_OVERRIDE;
//! Standard Initialisation. It creates a Controller for STEP
//! and records it to various names, available to select it later
//! Returns True when done, False if could not be done
Standard_EXPORT static Standard_Boolean Init();
DEFINE_STANDARD_RTTIEXT(STEPControl_Controller,XSControl_Controller)
DEFINE_STANDARD_RTTIEXT(STEPControl_Controller, XSControl_Controller)
protected:
private:
};
#endif // _STEPControl_Controller_HeaderFile

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,6 @@ class XSControl_WorkSession;
class StepData_StepModel;
class StepRepr_RepresentationContext;
//! Reads STEP files, checks them and translates their contents
//! into Open CASCADE models. The STEP data can be that of
//! a whole model or that of a specific list of entities in the model.
@@ -67,56 +66,60 @@ class StepRepr_RepresentationContext;
//! WS = reader.WS();
//! if ( WS->TransferReader()->HasResult(ent) )
//! TopoDS_Shape shape = WS->TransferReader()->ShapeResult(ent);
class STEPControl_Reader : public XSControl_Reader
class STEPControl_Reader : public XSControl_Reader
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a reader object with an empty STEP model.
Standard_EXPORT STEPControl_Reader();
//! Creates a Reader for STEP from an already existing Session
//! Clears the session if it was not yet set for STEP
Standard_EXPORT STEPControl_Reader(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
Standard_EXPORT STEPControl_Reader(const Handle(XSControl_WorkSession)& WS,
const Standard_Boolean scratch = Standard_True);
//! Returns the model as a StepModel.
//! It can then be consulted (header, product)
Standard_EXPORT Handle(StepData_StepModel) StepModel() const;
//! Loads a file and returns the read status
//! Zero for a Model which compies with the Controller
Standard_EXPORT virtual IFSelect_ReturnStatus ReadFile(const Standard_CString filename) Standard_OVERRIDE;
Standard_EXPORT virtual IFSelect_ReturnStatus ReadFile(const Standard_CString filename)
Standard_OVERRIDE;
//! Loads a file from stream and returns the read status
Standard_EXPORT virtual IFSelect_ReturnStatus ReadStream(const Standard_CString theName,
std::istream& theIStream) Standard_OVERRIDE;
std::istream& theIStream)
Standard_OVERRIDE;
//! Loads a file and returns the read status
//! Zero for a Model which compies with the Controller
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString filename,
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString filename,
const DESTEP_Parameters& theParams);
//! Loads a file from stream and returns the read status
Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName,
Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName,
const DESTEP_Parameters& theParams,
std::istream& theIStream);
std::istream& theIStream);
//! Transfers a root given its rank in the list of candidate roots
//! Default is the first one
//! Returns True if a shape has resulted, false else
//! Same as inherited TransferOneRoot, kept for compatibility
Standard_EXPORT Standard_Boolean TransferRoot (const Standard_Integer num = 1,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT Standard_Boolean
TransferRoot(const Standard_Integer num = 1,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Determines the list of root entities from Model which are candidate for
//! a transfer to a Shape (type of entities is PRODUCT)
Standard_EXPORT virtual Standard_Integer NbRootsForTransfer() Standard_OVERRIDE;
//! Returns sequence of all unit names for shape representations
//! found in file
Standard_EXPORT void FileUnits (TColStd_SequenceOfAsciiString& theUnitLengthNames, TColStd_SequenceOfAsciiString& theUnitAngleNames, TColStd_SequenceOfAsciiString& theUnitSolidAngleNames);
Standard_EXPORT void FileUnits(TColStd_SequenceOfAsciiString& theUnitLengthNames,
TColStd_SequenceOfAsciiString& theUnitAngleNames,
TColStd_SequenceOfAsciiString& theUnitSolidAngleNames);
//! Sets system length unit used by transfer process.
//! Performs only if a model is not NULL
@@ -130,22 +133,20 @@ protected:
//! Returns default parameters for shape fixing.
//! This method is used by the base class to get default parameters for shape fixing.
//! @return default parameters for shape fixing.
Standard_EXPORT virtual DE_ShapeFixParameters GetDefaultShapeFixParameters() const Standard_OVERRIDE;
Standard_EXPORT virtual DE_ShapeFixParameters GetDefaultShapeFixParameters() const
Standard_OVERRIDE;
//! Returns default flags for shape processing.
//! @return Default flags for shape processing.
Standard_EXPORT virtual ShapeProcess::OperationsFlags GetDefaultShapeProcessFlags() const Standard_OVERRIDE;
Standard_EXPORT virtual ShapeProcess::OperationsFlags GetDefaultShapeProcessFlags() const
Standard_OVERRIDE;
private:
//! Returns units for length , angle and solidangle for shape representations
Standard_EXPORT Standard_Boolean findUnits (const Handle(StepRepr_RepresentationContext)& theReprContext, TColStd_Array1OfAsciiString& theNameUnits, TColStd_Array1OfReal& theFactorUnits);
Standard_EXPORT Standard_Boolean
findUnits(const Handle(StepRepr_RepresentationContext)& theReprContext,
TColStd_Array1OfAsciiString& theNameUnits,
TColStd_Array1OfReal& theFactorUnits);
};
#endif // _STEPControl_Reader_HeaderFile

View File

@@ -31,14 +31,14 @@
//! translates an Open CASCADE shape into a STEP geometric_curve_set entity.
enum STEPControl_StepModelType
{
STEPControl_AsIs,
STEPControl_ManifoldSolidBrep,
STEPControl_BrepWithVoids,
STEPControl_FacetedBrep,
STEPControl_FacetedBrepAndBrepWithVoids,
STEPControl_ShellBasedSurfaceModel,
STEPControl_GeometricCurveSet,
STEPControl_Hybrid
STEPControl_AsIs,
STEPControl_ManifoldSolidBrep,
STEPControl_BrepWithVoids,
STEPControl_FacetedBrep,
STEPControl_FacetedBrepAndBrepWithVoids,
STEPControl_ShellBasedSurfaceModel,
STEPControl_GeometricCurveSet,
STEPControl_Hybrid
};
#endif // _STEPControl_StepModelType_HeaderFile

View File

@@ -29,106 +29,73 @@
#include <XSControl_WorkSession.hxx>
#include <UnitsMethods.hxx>
//=======================================================================
//function : STEPControl_Writer
//purpose :
//=======================================================================
STEPControl_Writer::STEPControl_Writer ()
//=================================================================================================
STEPControl_Writer::STEPControl_Writer()
{
STEPControl_Controller::Init();
SetWS (new XSControl_WorkSession);
SetWS(new XSControl_WorkSession);
}
//=================================================================================================
//=======================================================================
//function : STEPControl_Writer
//purpose :
//=======================================================================
STEPControl_Writer::STEPControl_Writer
(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch)
STEPControl_Writer::STEPControl_Writer(const Handle(XSControl_WorkSession)& WS,
const Standard_Boolean scratch)
{
STEPControl_Controller::Init();
SetWS(WS, scratch);
}
//=======================================================================
//function : SetWS
//purpose :
//=======================================================================
//=================================================================================================
void STEPControl_Writer::SetWS(const Handle(XSControl_WorkSession)& WS,
const Standard_Boolean scratch)
const Standard_Boolean scratch)
{
thesession = WS;
thesession->SelectNorm("STEP");
thesession->InitTransferReader(0);
Handle(StepData_StepModel) model = Model (scratch);
Handle(StepData_StepModel) model = Model(scratch);
}
//=================================================================================================
//=======================================================================
//function : WS
//purpose :
//=======================================================================
Handle(XSControl_WorkSession) STEPControl_Writer::WS () const
Handle(XSControl_WorkSession) STEPControl_Writer::WS() const
{
return thesession;
}
//=================================================================================================
//=======================================================================
//function : Model
//purpose :
//=======================================================================
Handle(StepData_StepModel) STEPControl_Writer::Model
(const Standard_Boolean newone)
Handle(StepData_StepModel) STEPControl_Writer::Model(const Standard_Boolean newone)
{
DeclareAndCast(StepData_StepModel,model,thesession->Model());
DeclareAndCast(StepData_StepModel, model, thesession->Model());
if (newone || model.IsNull())
model = GetCasted(StepData_StepModel,thesession->NewModel());
model = GetCasted(StepData_StepModel, thesession->NewModel());
return model;
}
//=================================================================================================
//=======================================================================
//function : SetTolerance
//purpose :
//=======================================================================
void STEPControl_Writer::SetTolerance (const Standard_Real Tol)
void STEPControl_Writer::SetTolerance(const Standard_Real Tol)
{
DeclareAndCast(STEPControl_ActorWrite,act,WS()->NormAdaptor()->ActorWrite());
if (!act.IsNull()) act->SetTolerance (Tol);
DeclareAndCast(STEPControl_ActorWrite, act, WS()->NormAdaptor()->ActorWrite());
if (!act.IsNull())
act->SetTolerance(Tol);
}
//=================================================================================================
//=======================================================================
//function : UnsetTolerance
//purpose :
//=======================================================================
void STEPControl_Writer::UnsetTolerance ()
void STEPControl_Writer::UnsetTolerance()
{
SetTolerance (-1.);
SetTolerance(-1.);
}
//=================================================================================================
//=======================================================================
//function : Transfer
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPControl_Writer::Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
IFSelect_ReturnStatus STEPControl_Writer::Transfer(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
{
Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(thesession->Model());
if (!aStepModel.IsNull())
@@ -138,24 +105,36 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer
return Transfer(sh, mode, aStepModel->InternalParameters, compgraph, theProgress);
}
IFSelect_ReturnStatus STEPControl_Writer::Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
IFSelect_ReturnStatus STEPControl_Writer::Transfer(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
{
Standard_Integer mws = -1;
switch (mode) {
case STEPControl_AsIs : mws = 0; break;
case STEPControl_FacetedBrep : mws = 1; break;
case STEPControl_ShellBasedSurfaceModel : mws = 2; break;
case STEPControl_ManifoldSolidBrep : mws = 3; break;
case STEPControl_GeometricCurveSet : mws = 4; break;
default : break;
switch (mode)
{
case STEPControl_AsIs:
mws = 0;
break;
case STEPControl_FacetedBrep:
mws = 1;
break;
case STEPControl_ShellBasedSurfaceModel:
mws = 2;
break;
case STEPControl_ManifoldSolidBrep:
mws = 3;
break;
case STEPControl_GeometricCurveSet:
mws = 4;
break;
default:
break;
}
if (mws < 0) return IFSelect_RetError; // cas non reconnu
thesession->TransferWriter()->SetTransferMode (mws);
if (mws < 0)
return IFSelect_RetError; // cas non reconnu
thesession->TransferWriter()->SetTransferMode(mws);
if (!Model()->IsInitializedUnit())
{
XSAlgo_ShapeProcessor::PrepareForTransfer(); // update unit info
@@ -167,26 +146,22 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer
}
Handle(STEPControl_ActorWrite) ActWrite =
Handle(STEPControl_ActorWrite)::DownCast(WS()->NormAdaptor()->ActorWrite());
ActWrite->SetGroupMode(Handle(StepData_StepModel)::DownCast(thesession->Model())->InternalParameters.WriteAssembly);
ActWrite->SetGroupMode(
Handle(StepData_StepModel)::DownCast(thesession->Model())->InternalParameters.WriteAssembly);
InitializeMissingParameters();
return thesession->TransferWriteShape(sh, compgraph, theProgress);
}
//=================================================================================================
//=======================================================================
//function : Write
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPControl_Writer::Write (const Standard_CString theFileName)
IFSelect_ReturnStatus STEPControl_Writer::Write(const Standard_CString theFileName)
{
return thesession->SendAll (theFileName);
return thesession->SendAll(theFileName);
}
//=======================================================================
//function : WriteStream
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPControl_Writer::WriteStream (std::ostream& theOStream)
//=================================================================================================
IFSelect_ReturnStatus STEPControl_Writer::WriteStream(std::ostream& theOStream)
{
Handle(StepData_StepModel) aModel = Model();
if (aModel.IsNull())
@@ -194,29 +169,25 @@ IFSelect_ReturnStatus STEPControl_Writer::WriteStream (std::ostream& theOStream)
return IFSelect_RetFail;
}
Handle(StepData_Protocol) aProtocol = Handle(StepData_Protocol)::DownCast (aModel->Protocol());
Handle(StepData_Protocol) aProtocol = Handle(StepData_Protocol)::DownCast(aModel->Protocol());
if (aProtocol.IsNull())
{
return IFSelect_RetFail;
}
StepData_StepWriter aWriter (aModel);
aWriter.SendModel (aProtocol);
return aWriter.Print (theOStream)
? IFSelect_RetDone
: IFSelect_RetFail;
StepData_StepWriter aWriter(aModel);
aWriter.SendModel(aProtocol);
return aWriter.Print(theOStream) ? IFSelect_RetDone : IFSelect_RetFail;
}
//=======================================================================
//function : PrintStatsTransfer
//purpose :
//=======================================================================
//=================================================================================================
void STEPControl_Writer::PrintStatsTransfer
(const Standard_Integer what, const Standard_Integer mode) const
void STEPControl_Writer::PrintStatsTransfer(const Standard_Integer what,
const Standard_Integer mode) const
{
thesession->TransferWriter()->PrintStats (what,mode);
thesession->TransferWriter()->PrintStats(what, mode);
}
//=============================================================================
void STEPControl_Writer::SetShapeFixParameters(const ParameterMap& theParameters)
@@ -240,7 +211,7 @@ void STEPControl_Writer::SetShapeFixParameters(ParameterMap&& theParameters)
//=============================================================================
void STEPControl_Writer::SetShapeFixParameters(const DE_ShapeFixParameters& theParameters,
const ParameterMap& theAdditionalParameters)
const ParameterMap& theAdditionalParameters)
{
if (Handle(Transfer_ActorOfFinderProcess) anActor = GetActor())
{

View File

@@ -41,44 +41,46 @@ class Transfer_ActorOfFinderProcess;
//! written to an existing STEP file or to a new one.
//! Translation can be performed in one or several operations. Each
//! translation operation outputs a distinct root entity in the STEP file.
class STEPControl_Writer
class STEPControl_Writer
{
public:
DEFINE_STANDARD_ALLOC
using ParameterMap = std::unordered_map<std::string, std::string>;
// Flags defining operations to be performed on shapes. Since there is no std::optional in C++11,
// we use a pair. The first element is the flags, the second element is a boolean value that indicates
// whether the flags were set.
// we use a pair. The first element is the flags, the second element is a boolean value that
// indicates whether the flags were set.
using ProcessingFlags = std::pair<ShapeProcess::OperationsFlags, bool>;
//! Creates a Writer from scratch
Standard_EXPORT STEPControl_Writer();
//! Creates a Writer from an already existing Session
//! If <scratch> is True (D), clears already recorded data
Standard_EXPORT STEPControl_Writer(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
Standard_EXPORT STEPControl_Writer(const Handle(XSControl_WorkSession)& WS,
const Standard_Boolean scratch = Standard_True);
//! Sets a length-measure value that
//! will be written to uncertainty-measure-with-unit
//! when the next shape is translated.
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
Standard_EXPORT void SetTolerance(const Standard_Real Tol);
//! Unsets the tolerance formerly forced by SetTolerance
Standard_EXPORT void UnsetTolerance();
//! Sets a specific session to <me>
Standard_EXPORT void SetWS (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
Standard_EXPORT void SetWS(const Handle(XSControl_WorkSession)& WS,
const Standard_Boolean scratch = Standard_True);
//! Returns the session used in <me>
Standard_EXPORT Handle(XSControl_WorkSession) WS() const;
//! Returns the produced model. Produces a new one if not yet done
//! or if <newone> is True
//! This method allows for instance to edit product or header
//! data before writing.
Standard_EXPORT Handle(StepData_StepModel) Model (const Standard_Boolean newone = Standard_False);
Standard_EXPORT Handle(StepData_StepModel) Model(const Standard_Boolean newone = Standard_False);
//! Translates shape sh to a STEP
//! entity. mode defines the STEP entity type to be output:
//! - STEPControlStd_AsIs translates a shape to its highest possible
@@ -91,25 +93,25 @@ public:
//! shell_based_surface_model entity.
//! - STEPControlStd_GeometricCurveSet translates a shape into a STEP
//! geometric_curve_set entity.
Standard_EXPORT IFSelect_ReturnStatus Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const Standard_Boolean compgraph = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT IFSelect_ReturnStatus
Transfer(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const Standard_Boolean compgraph = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Translates shape sh to a STEP entity
Standard_EXPORT IFSelect_ReturnStatus Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT IFSelect_ReturnStatus
Transfer(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes a STEP model in the file identified by filename.
Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString theFileName);
Standard_EXPORT IFSelect_ReturnStatus Write(const Standard_CString theFileName);
//! Writes a STEP model in the std::ostream.
Standard_EXPORT IFSelect_ReturnStatus WriteStream (std::ostream& theOStream);
Standard_EXPORT IFSelect_ReturnStatus WriteStream(std::ostream& theOStream);
//! Displays the statistics for the
//! last translation. what defines the kind of statistics that are displayed:
@@ -131,7 +133,8 @@ public:
//! - 5 gives the number of pairs (STEP or result type and status),
//! - 6 gives the number of pairs (STEP or result type and status)
//! AND the list of entity numbers in the STEP model.
Standard_EXPORT void PrintStatsTransfer (const Standard_Integer what, const Standard_Integer mode = 0) const;
Standard_EXPORT void PrintStatsTransfer(const Standard_Integer what,
const Standard_Integer mode = 0) const;
//! Sets parameters for shape processing.
//! @param theParameters the parameters for shape processing.
@@ -149,7 +152,7 @@ public:
//! @param theParameters the parameters for shape processing.
//! @param theAdditionalParameters the additional parameters for shape processing.
Standard_EXPORT void SetShapeFixParameters(const DE_ShapeFixParameters& theParameters,
const ParameterMap& theAdditionalParameters = {});
const ParameterMap& theAdditionalParameters = {});
//! Returns parameters for shape processing that was set by SetParameters() method.
//! @return the parameters for shape processing. Empty map if no parameters were set.