Replace StepData_ConfParameters with DESTEP_Parameters across multiple files.
New location will help to keep any translate related stuff in one place for high level usage.
THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor();
InternalParameters.ReadBSplineContinuity =
- (StepData_ConfParameters::ReadMode_BSplineContinuity)theResource->IntegerVal(
+ (DESTEP_Parameters::ReadMode_BSplineContinuity)theResource->IntegerVal(
"read.iges.bspline.continuity",
InternalParameters.ReadBSplineContinuity,
aScope);
InternalParameters.ReadPrecisionMode =
- (StepData_ConfParameters::ReadMode_Precision)
+ (DESTEP_Parameters::ReadMode_Precision)
theResource->IntegerVal("read.precision.mode", InternalParameters.ReadPrecisionMode, aScope);
InternalParameters.ReadPrecisionVal =
theResource->RealVal("read.precision.val", InternalParameters.ReadPrecisionVal, aScope);
InternalParameters.ReadMaxPrecisionMode =
- (StepData_ConfParameters::ReadMode_MaxPrecision)theResource->IntegerVal(
+ (DESTEP_Parameters::ReadMode_MaxPrecision)theResource->IntegerVal(
"read.maxprecision.mode",
InternalParameters.ReadMaxPrecisionMode,
aScope);
InternalParameters.ReadSameParamMode,
aScope);
InternalParameters.ReadSurfaceCurveMode =
- (StepData_ConfParameters::ReadMode_SurfaceCurve)theResource->IntegerVal(
+ (DESTEP_Parameters::ReadMode_SurfaceCurve)theResource->IntegerVal(
"read.surfacecurve.mode",
InternalParameters.ReadSurfaceCurveMode,
aScope);
InternalParameters.EncodeRegAngle =
theResource->RealVal("read.encoderegularity.angle", InternalParameters.EncodeRegAngle, aScope);
InternalParameters.AngleUnit =
- (StepData_ConfParameters::AngleUnitMode)theResource->IntegerVal("angleunit.mode",
- InternalParameters.AngleUnit,
- aScope);
+ (DESTEP_Parameters::AngleUnitMode)theResource->IntegerVal("angleunit.mode",
+ InternalParameters.AngleUnit,
+ aScope);
InternalParameters.ReadResourceName =
theResource->StringVal("read.resource.name", InternalParameters.ReadResourceName, aScope);
InternalParameters.ReadProductMode =
theResource->BooleanVal("read.product.mode", InternalParameters.ReadProductMode, aScope);
InternalParameters.ReadProductContext =
- (StepData_ConfParameters::ReadMode_ProductContext)theResource->IntegerVal(
+ (DESTEP_Parameters::ReadMode_ProductContext)theResource->IntegerVal(
"read.product.context",
InternalParameters.ReadProductContext,
aScope);
InternalParameters.ReadShapeRepr =
- (StepData_ConfParameters::ReadMode_ShapeRepr)
- theResource->IntegerVal("read.shape.repr", InternalParameters.ReadShapeRepr, aScope);
+ (DESTEP_Parameters::ReadMode_ShapeRepr)theResource->IntegerVal("read.shape.repr",
+ InternalParameters.ReadShapeRepr,
+ aScope);
InternalParameters.ReadTessellated =
- (StepData_ConfParameters::RWMode_Tessellated)
+ (DESTEP_Parameters::RWMode_Tessellated)
theResource->IntegerVal("read.tessellated", InternalParameters.ReadTessellated, aScope);
InternalParameters.ReadAssemblyLevel =
- (StepData_ConfParameters::ReadMode_AssemblyLevel)
+ (DESTEP_Parameters::ReadMode_AssemblyLevel)
theResource->IntegerVal("read.assembly.level", InternalParameters.ReadAssemblyLevel, aScope);
InternalParameters.ReadRelationship =
theResource->BooleanVal("read.shape.relationship", InternalParameters.ReadRelationship, aScope);
theResource->BooleanVal("read.metadata", InternalParameters.ReadMetadata, aScope);
InternalParameters.WritePrecisionMode =
- (StepData_ConfParameters::WriteMode_PrecisionMode)theResource->IntegerVal(
+ (DESTEP_Parameters::WriteMode_PrecisionMode)theResource->IntegerVal(
"write.precision.mode",
InternalParameters.WritePrecisionMode,
aScope);
InternalParameters.WritePrecisionVal =
theResource->RealVal("write.precision.val", InternalParameters.WritePrecisionVal, aScope);
InternalParameters.WriteAssembly =
- (StepData_ConfParameters::WriteMode_Assembly)
- theResource->IntegerVal("write.assembly", InternalParameters.WriteAssembly, aScope);
+ (DESTEP_Parameters::WriteMode_Assembly)theResource->IntegerVal("write.assembly",
+ InternalParameters.WriteAssembly,
+ aScope);
InternalParameters.WriteSchema =
- (StepData_ConfParameters::WriteMode_StepSchema)
- theResource->IntegerVal("write.schema", InternalParameters.WriteSchema, aScope);
+ (DESTEP_Parameters::WriteMode_StepSchema)theResource->IntegerVal("write.schema",
+ InternalParameters.WriteSchema,
+ aScope);
InternalParameters.WriteTessellated =
- (StepData_ConfParameters::RWMode_Tessellated)
+ (DESTEP_Parameters::RWMode_Tessellated)
theResource->IntegerVal("write.tessellated", InternalParameters.WriteTessellated, aScope);
InternalParameters.WriteProductName =
theResource->StringVal("write.product.name", InternalParameters.WriteProductName, aScope);
InternalParameters.WriteSequence =
theResource->StringVal("write.sequence", InternalParameters.WriteSequence, aScope);
InternalParameters.WriteVertexMode =
- (StepData_ConfParameters::WriteMode_VertexMode)
+ (DESTEP_Parameters::WriteMode_VertexMode)
theResource->IntegerVal("write.vertex.mode", InternalParameters.WriteVertexMode, aScope);
InternalParameters.WriteSubshapeNames =
theResource->BooleanVal("write.stepcaf.subshapes.name",
#ifndef _DESTEP_ConfigurationNode_HeaderFile
#define _DESTEP_ConfigurationNode_HeaderFile
+#include <DESTEP_Parameters.hxx>
#include <DE_ConfigurationNode.hxx>
#include <Resource_FormatType.hxx>
#include <STEPControl_StepModelType.hxx>
-#include <StepData_ConfParameters.hxx>
#include <UnitsMethods_LengthUnit.hxx>
//! The purpose of this class is to configure the transfer process for STEP format
Standard_OVERRIDE;
public:
- StepData_ConfParameters InternalParameters;
+ DESTEP_Parameters InternalParameters;
};
#endif // _DESTEP_ConfigurationNode_HeaderFile
--- /dev/null
+// Copyright (c) 2023 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <Interface_Static.hxx>
+
+#include <DESTEP_Parameters.hxx>
+
+//=================================================================================================
+
+DESTEP_Parameters::DESTEP_Parameters() {}
+
+//=================================================================================================
+
+void DESTEP_Parameters::InitFromStatic()
+{
+ ReadBSplineContinuity = (DESTEP_Parameters::ReadMode_BSplineContinuity)Interface_Static::IVal(
+ "read.iges.bspline.continuity");
+ ReadPrecisionMode =
+ (DESTEP_Parameters::ReadMode_Precision)Interface_Static::IVal("read.precision.mode");
+ ReadPrecisionVal = Interface_Static::RVal("read.precision.val");
+ ReadMaxPrecisionMode =
+ (DESTEP_Parameters::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode");
+ ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val");
+ ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1;
+ ReadSurfaceCurveMode =
+ (DESTEP_Parameters::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode");
+ EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI;
+ AngleUnit = (DESTEP_Parameters::AngleUnitMode)Interface_Static::IVal("step.angleunit.mode");
+
+ ReadResourceName = Interface_Static::CVal("read.step.resource.name");
+ ReadSequence = Interface_Static::CVal("read.step.sequence");
+ ReadProductMode = Interface_Static::IVal("read.step.product.mode") == 1;
+ ReadProductContext =
+ (DESTEP_Parameters::ReadMode_ProductContext)Interface_Static::IVal("read.step.product.context");
+ ReadShapeRepr =
+ (DESTEP_Parameters::ReadMode_ShapeRepr)Interface_Static::IVal("read.step.shape.repr");
+ ReadTessellated =
+ (DESTEP_Parameters::RWMode_Tessellated)Interface_Static::IVal("read.step.tessellated");
+ ReadAssemblyLevel =
+ (DESTEP_Parameters::ReadMode_AssemblyLevel)Interface_Static::IVal("read.step.assembly.level");
+ ReadRelationship = Interface_Static::IVal("read.step.shape.relationship") == 1;
+ ReadShapeAspect = Interface_Static::IVal("read.step.shape.aspect") == 1;
+ ReadConstrRelation = Interface_Static::IVal("read.step.constructivegeom.relationship") == 1;
+ ReadSubshapeNames = Interface_Static::IVal("read.stepcaf.subshapes.name") == 1;
+ ReadCodePage = (Resource_FormatType)Interface_Static::IVal("read.step.codepage");
+ ReadNonmanifold = Interface_Static::IVal("read.step.nonmanifold") == 1;
+ ReadIdeas = Interface_Static::IVal("read.step.ideas") == 1;
+ ReadAllShapes = Interface_Static::IVal("read.step.all.shapes") == 1;
+ ReadRootTransformation = Interface_Static::IVal("read.step.root.transformation") == 1;
+ ReadColor = Interface_Static::IVal("read.color") == 1;
+ ReadName = Interface_Static::IVal("read.name") == 1;
+ ReadLayer = Interface_Static::IVal("read.layer") == 1;
+ ReadProps = Interface_Static::IVal("read.props") == 1;
+ ReadMetadata = Interface_Static::IVal("read.metadata") == 1;
+
+ WritePrecisionMode =
+ (DESTEP_Parameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode");
+ WritePrecisionVal = Interface_Static::RVal("write.precision.val");
+ WriteAssembly =
+ (DESTEP_Parameters::WriteMode_Assembly)Interface_Static::IVal("write.step.assembly");
+ WriteSchema =
+ (DESTEP_Parameters::WriteMode_StepSchema)Interface_Static::IVal("write.step.schema");
+ WriteTessellated =
+ (DESTEP_Parameters::RWMode_Tessellated)Interface_Static::IVal("write.step.tessellated");
+ WriteProductName = Interface_Static::CVal("write.step.product.name");
+ WriteSurfaceCurMode = Interface_Static::IVal("write.surfacecurve.mode") == 1;
+ WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.step.unit");
+ WriteResourceName = Interface_Static::CVal("write.step.resource.name");
+ WriteSequence = Interface_Static::CVal("write.step.sequence");
+ WriteVertexMode =
+ (DESTEP_Parameters::WriteMode_VertexMode)Interface_Static::IVal("write.step.vertex.mode");
+ WriteSubshapeNames = Interface_Static::IVal("write.stepcaf.subshapes.name") == 1;
+ WriteColor = Interface_Static::IVal("write.color") == 1;
+ WriteNonmanifold = Interface_Static::IVal("write.step.nonmanifold") == 1;
+ WriteName = Interface_Static::IVal("write.name") == 1;
+ WriteLayer = Interface_Static::IVal("write.layer") == 1;
+ WriteProps = Interface_Static::IVal("write.props") == 1;
+ WriteModelType = (STEPControl_StepModelType)Interface_Static::IVal("write.model.type");
+}
+
+//=================================================================================================
+
+void DESTEP_Parameters::Reset()
+{
+ DESTEP_Parameters aParameters;
+ *this = aParameters;
+}
--- /dev/null
+// Copyright (c) 2023 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _DESTEP_Parameters_HeaderFile
+#define _DESTEP_Parameters_HeaderFile
+
+#include <Resource_FormatType.hxx>
+#include <STEPControl_StepModelType.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <UnitsMethods_LengthUnit.hxx>
+
+class DESTEP_Parameters
+{
+public:
+ enum ReadMode_BSplineContinuity
+ {
+ ReadMode_BSplineContinuity_C0 = 0,
+ ReadMode_BSplineContinuity_C1,
+ ReadMode_BSplineContinuity_C2
+ };
+
+ enum ReadMode_Precision
+ {
+ ReadMode_Precision_File = 0,
+ ReadMode_Precision_User
+ };
+
+ enum ReadMode_MaxPrecision
+ {
+ ReadMode_MaxPrecision_Preferred = 0,
+ ReadMode_MaxPrecision_Forced
+ };
+
+ enum ReadMode_SurfaceCurve
+ {
+ ReadMode_SurfaceCurve_Default = 0,
+ ReadMode_SurfaceCurve_2DUse_Preferred = 2,
+ ReadMode_SurfaceCurve_2DUse_Forced = -2,
+ ReadMode_SurfaceCurve_3DUse_Preferred = 3,
+ ReadMode_SurfaceCurve_3DUse_Forced = -3
+ };
+
+ enum AngleUnitMode
+ {
+ AngleUnitMode_File = 0,
+ AngleUnitMode_Rad,
+ AngleUnitMode_Deg
+ };
+
+ enum ReadMode_ProductContext
+ {
+ ReadMode_ProductContext_All = 1,
+ ReadMode_ProductContext_Design,
+ ReadMode_ProductContext_Analysis
+ };
+
+ enum ReadMode_ShapeRepr
+ {
+ ReadMode_ShapeRepr_All = 1,
+ ReadMode_ShapeRepr_ABSR,
+ ReadMode_ShapeRepr_MSSR,
+ ReadMode_ShapeRepr_GBSSR,
+ ReadMode_ShapeRepr_FBSR,
+ ReadMode_ShapeRepr_EBWSR,
+ ReadMode_ShapeRepr_GBWSR
+ };
+
+ enum ReadMode_AssemblyLevel
+ {
+ ReadMode_AssemblyLevel_All = 1,
+ ReadMode_AssemblyLevel_Assembly,
+ ReadMode_AssemblyLevel_Structure,
+ ReadMode_AssemblyLevel_Shape
+ };
+
+ enum RWMode_Tessellated
+ {
+ RWMode_Tessellated_Off = 0,
+ RWMode_Tessellated_On,
+ RWMode_Tessellated_OnNoBRep
+ };
+
+ enum WriteMode_PrecisionMode
+ {
+ WriteMode_PrecisionMode_Least = -1,
+ WriteMode_PrecisionMode_Average = 0,
+ WriteMode_PrecisionMode_Greatest = 1,
+ WriteMode_PrecisionMode_Session = 2
+ };
+
+ enum WriteMode_Assembly
+ {
+ WriteMode_Assembly_Off = 0,
+ WriteMode_Assembly_On,
+ WriteMode_Assembly_Auto
+ };
+
+ enum WriteMode_StepSchema
+ {
+ WriteMode_StepSchema_AP214CD = 1,
+ WriteMode_StepSchema_AP214DIS,
+ WriteMode_StepSchema_AP203,
+ WriteMode_StepSchema_AP214IS,
+ WriteMode_StepSchema_AP242DIS
+ };
+
+ enum WriteMode_VertexMode
+ {
+ WriteMode_VertexMode_OneCompound = 0,
+ WriteMode_VertexMode_SingleVertex
+ };
+
+ Standard_EXPORT DESTEP_Parameters();
+
+ //! Initialize parameters
+ Standard_EXPORT void InitFromStatic();
+
+ //! Reset used parameters
+ Standard_EXPORT void Reset();
+
+ Standard_EXPORT TCollection_AsciiString GetString(const ReadMode_ProductContext theMode)
+ {
+ switch (theMode)
+ {
+ case ReadMode_ProductContext_All:
+ return "all";
+ case ReadMode_ProductContext_Design:
+ return "design";
+ case ReadMode_ProductContext_Analysis:
+ return "analysis";
+ default:
+ return "";
+ }
+ }
+
+public:
+ // Common
+ // clang-format off
+ ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
+ ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
+ double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
+ ReadMode_MaxPrecision ReadMaxPrecisionMode = ReadMode_MaxPrecision_Preferred; //<! Defines the mode of applying the maximum allowed tolerance
+ double ReadMaxPrecisionVal = 1; //<! Defines the maximum allowable tolerance
+ bool ReadSameParamMode = false; //<! Defines the using of BRepLib::SameParameter
+ ReadMode_SurfaceCurve ReadSurfaceCurveMode = ReadMode_SurfaceCurve_Default; //<! Reference for the computation of curves in case of 2D/3D
+ double EncodeRegAngle = 0.57295779513; //<! Continuity which these two faces are connected with at that edge
+ AngleUnitMode AngleUnit = AngleUnitMode_File; //<! Indicates what angle units should be used when a STEP file is read
+
+ // Read
+ TCollection_AsciiString ReadResourceName = "STEP"; //<! Defines the name of the resource file to read
+ TCollection_AsciiString ReadSequence = "FromSTEP"; //<! Defines the name of the sequence of operators to read
+ bool ReadProductMode = true; //<! Defines the approach used for selection of top-level STEP entities for translation, and for recognition of assembly structures
+ ReadMode_ProductContext ReadProductContext = ReadMode_ProductContext_All; //<! When reading AP 209 STEP files, allows selecting either only 'design' or 'analysis', or both types of products for translation
+ ReadMode_ShapeRepr ReadShapeRepr = ReadMode_ShapeRepr_All; //<! Specifies preferred type of representation of the shape of the product
+ RWMode_Tessellated ReadTessellated = RWMode_Tessellated_On; //!< Defines whether tessellated shapes should be translated
+ ReadMode_AssemblyLevel ReadAssemblyLevel = ReadMode_AssemblyLevel_All; //<! Specifies which data should be read for the products found in the STEP file
+ bool ReadRelationship = true; //<! Defines whether shapes associated with the main SHAPE_DEFINITION_REPRESENTATION entity of the product via SHAPE_REPRESENTATIONSHIP_RELATION should be translated
+ bool ReadShapeAspect = true; //<! Defines whether shapes associated with the PRODUCT_DEFINITION_SHAPE entity of the product via SHAPE_ASPECT should be translated
+ bool ReadConstrRelation = false; //<! Flag regulating translation of "CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP" entities
+ bool ReadSubshapeNames = false; //<! Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items
+ Resource_FormatType ReadCodePage = Resource_FormatType_UTF8; //<! STEP file encoding for names translation
+ bool ReadNonmanifold = false; //<! Defines non-manifold topology reading
+ bool ReadIdeas = false; //<! Defines !I-Deas-like STEP processing
+ bool ReadAllShapes = false; //<! Parameter to read all top level solids and shells
+ bool ReadRootTransformation = true; ///<!/ Mode to variate apply or not transformation placed in the root shape representation
+ bool ReadColor = true; //<! ColorMode is used to indicate read Colors or not
+ bool ReadName = true; //<! NameMode is used to indicate read Name or not
+ bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
+ bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
+ bool ReadMetadata = true; //! Parameter for metadata reading
+
+ // Write
+ WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
+ double WritePrecisionVal = 0.0001; //<! Resolution value for an STEP file when WriteMode_PrecisionMode is Greatest
+ WriteMode_Assembly WriteAssembly = WriteMode_Assembly_Auto; //<! Writing assembly mode
+ WriteMode_StepSchema WriteSchema = WriteMode_StepSchema_AP214CD; //<! Defines the version of schema used for the output STEP file
+ RWMode_Tessellated WriteTessellated = RWMode_Tessellated_OnNoBRep; //!< Defines whether tessellated shapes should be translated
+ TCollection_AsciiString WriteProductName; //<! Defines the text string that will be used for field 'name' of PRODUCT entities written to the STEP file
+ bool WriteSurfaceCurMode = true; //<! Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file
+ UnitsMethods_LengthUnit WriteUnit = UnitsMethods_LengthUnit_Millimeter; //<! Defines a unit in which the STEP file should be written
+ TCollection_AsciiString WriteResourceName = "STEP"; //<! Defines the name of the resource file to write
+ TCollection_AsciiString WriteSequence = "ToSTEP"; //<! Defines the name of the sequence of operators to write
+ WriteMode_VertexMode WriteVertexMode = WriteMode_VertexMode_OneCompound; //<! Indicates which of free vertices writing mode is switch on
+ bool WriteSubshapeNames = false; //<! Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items
+ bool WriteColor = true; //<! ColorMode is used to indicate write Colors or not
+ bool WriteNonmanifold = false; //<! Defines non-manifold topology writing
+ bool WriteName = true; //<! NameMode is used to indicate write Name or not
+ bool WriteLayer = true; //<! LayerMode is used to indicate write Layers or not
+ bool WriteProps = true; //<! PropsMode is used to indicate write Validation properties or not
+ STEPControl_StepModelType WriteModelType = STEPControl_AsIs; //<! Gives you the choice of translation mode for an Open CASCADE shape that is being translated to STEP
+ // clang-format on
+};
+
+#endif // _DESTEP_Parameters_HeaderFile
#include <DESTEP_Provider.hxx>
#include <DESTEP_ConfigurationNode.hxx>
+#include <DESTEP_Parameters.hxx>
#include <Interface_Static.hxx>
#include <Message.hxx>
#include <STEPCAFControl_Controller.hxx>
#include <STEPCAFControl_Reader.hxx>
#include <STEPCAFControl_Writer.hxx>
-#include <StepData_ConfParameters.hxx>
#include <StepData_StepModel.hxx>
#include <UnitsMethods.hxx>
#include <XCAFDoc_DocumentTool.hxx>
aReader.SetPropsMode(aNode->InternalParameters.ReadProps);
aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata);
- IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
- StepData_ConfParameters aParams = aNode->InternalParameters;
- aReadStat = aReader.ReadFile(thePath.ToCString(), aParams);
+ IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
+ DESTEP_Parameters aParams = aNode->InternalParameters;
+ aReadStat = aReader.ReadFile(thePath.ToCString(), aParams);
if (aReadStat != IFSelect_RetDone)
{
Message::SendFail() << "Error in the DESTEP_Provider during reading the file " << thePath
aWriter.SetNameMode(aNode->InternalParameters.WriteName);
aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer);
aWriter.SetPropsMode(aNode->InternalParameters.WriteProps);
- StepData_ConfParameters aParams = aNode->InternalParameters;
- Standard_Real aScaleFactorMM = 1.;
+ DESTEP_Parameters aParams = aNode->InternalParameters;
+ Standard_Real aScaleFactorMM = 1.;
if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument,
aScaleFactorMM,
UnitsMethods_LengthUnit_Millimeter))
personizeWS(theWS);
STEPControl_Reader aReader;
aReader.SetWS(theWS);
- IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid;
- StepData_ConfParameters aParams = aNode->InternalParameters;
+ IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid;
+ DESTEP_Parameters aParams = aNode->InternalParameters;
aReadstat = aReader.ReadFile(thePath.ToCString(), aParams);
Handle(StepData_StepModel) aModel = aReader.StepModel();
if (aReadstat != IFSelect_RetDone)
IFSelect_ReturnStatus aWritestat = IFSelect_RetVoid;
Handle(StepData_StepModel) aModel = aWriter.Model();
;
- StepData_ConfParameters aParams = aNode->InternalParameters;
+ DESTEP_Parameters aParams = aNode->InternalParameters;
aModel->SetLocalLengthUnit(aNode->GlobalParameters.SystemUnit);
UnitsMethods_LengthUnit aTargetUnit =
UnitsMethods::GetLengthUnitByFactorValue(aNode->GlobalParameters.LengthUnit,
DESTEP_ConfigurationNode.cxx
DESTEP_ConfigurationNode.hxx
+DESTEP_Parameters.cxx
+DESTEP_Parameters.hxx
DESTEP_Provider.cxx
DESTEP_Provider.hxx
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString theFileName,
- const StepData_ConfParameters& theParams)
+ const DESTEP_Parameters& theParams)
{
return myReader.ReadFile(theFileName, theParams);
}
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename,
const Handle(TDocStd_Document)& doc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress)
{
if (ReadFile(filename, theParams) != IFSelect_RetDone)
//=======================================================================
Standard_Boolean STEPCAFControl_Reader::Perform (const TCollection_AsciiString& filename,
const Handle(TDocStd_Document)& doc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress)
{
if (ReadFile(filename.ToCString(), theParams) != IFSelect_RetDone)
//! @param[in] theParams default configuration parameters
//! @return read status
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString theFileName,
- const StepData_ConfParameters& theParams);
+ const DESTEP_Parameters& theParams);
//! Loads a file from stream and returns the read status.
//! @param[in] theName auxiliary stream name
Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename,
const Handle(TDocStd_Document)& doc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Translate STEP file given by filename into the document
//! Return True if succeeded, and False in case of fail
Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename,
const Handle(TDocStd_Document)& doc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Returns data on external files
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)& theDoc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode,
const Standard_CString theMulti,
const Message_ProgressRange& theProgress)
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode,
const Standard_CString theIsMulti,
const Message_ProgressRange& theProgress)
//purpose :
//=======================================================================
Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLabels,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode,
const Standard_CString theIsMulti,
const Message_ProgressRange& theProgress)
//=======================================================================
Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)& theDoc,
const Standard_CString theFileName,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress)
{
if (!Transfer(theDoc, theParams, STEPControl_AsIs, 0L, theProgress))
if (aPS1.UserBreak())
return Standard_False;
- StepData_ConfParameters::WriteMode_Assembly assemblymode = aModel->InternalParameters.WriteAssembly;
- aModel->InternalParameters.WriteAssembly = StepData_ConfParameters::WriteMode_Assembly_On;
+ DESTEP_Parameters::WriteMode_Assembly assemblymode = aModel->InternalParameters.WriteAssembly;
+ aModel->InternalParameters.WriteAssembly = DESTEP_Parameters::WriteMode_Assembly_On;
theWriter.Transfer(aSass, STEPControl_AsIs, aModel->InternalParameters, Standard_True, aPS1.Next());
aModel->InternalParameters.WriteAssembly = assemblymode;
}
anExtFile->SetWS(aNewWS);
anExtFile->SetName(aNewName);
anExtFile->SetLabel(theLabel);
- StepData_ConfParameters::WriteMode_Assembly anAssemblymode = aStepWriter.Model()->InternalParameters.WriteAssembly;
- aStepWriter.Model()->InternalParameters.WriteAssembly = StepData_ConfParameters::WriteMode_Assembly_Off;
+ DESTEP_Parameters::WriteMode_Assembly anAssemblymode = aStepWriter.Model()->InternalParameters.WriteAssembly;
+ aStepWriter.Model()->InternalParameters.WriteAssembly = DESTEP_Parameters::WriteMode_Assembly_Off;
const Standard_CString anIsMulti = 0;
anExtFile->SetTransferStatus(transfer(aStepWriter, aLabelSeq, theMode, anIsMulti, Standard_True, theProgress));
aStepWriter.Model()->InternalParameters.WriteAssembly = anAssemblymode;
#include <STEPCAFControl_DataMapOfLabelExternFile.hxx>
#include <STEPControl_Writer.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx>
-#include <StepData_ConfParameters.hxx>
+#include <DESTEP_Parameters.hxx>
#include <StepData_Factors.hxx>
#include <StepDimTol_Datum.hxx>
#include <StepDimTol_GeometricTolerance.hxx>
//! @param theProgress progress indicator
//! Returns True if translation is OK
Standard_EXPORT Standard_Boolean Transfer(const Handle(TDocStd_Document)& theDoc,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode = STEPControl_AsIs,
const Standard_CString theIsMulti = 0,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! This method uses if need to set parameters avoiding
//! initialization from Interface_Static
Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode = STEPControl_AsIs,
const Standard_CString theIsMulti = 0,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! This method uses if need to set parameters avoiding
//! initialization from Interface_Static
Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& theLabelSeq,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const STEPControl_StepModelType theMode = STEPControl_AsIs,
const Standard_CString theIsMulti = 0,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Returns True if translation is OK
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc,
const Standard_CString theFileName,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Returns data on external files
STEPConstruct_AP203Context theAP203;
Handle(StepGeom_Axis2Placement3d) myAxis;
StepData_Factors myGlobalFactor;
- StepData_ConfParameters::WriteMode_StepSchema mySchema;
+ DESTEP_Parameters::WriteMode_StepSchema mySchema;
TCollection_AsciiString myProductName;
};
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const Standard_CString filename,
- const StepData_ConfParameters& theParams)
+ const DESTEP_Parameters& theParams)
{
Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary();
Handle(Interface_Protocol) aProtocol = WS()->Protocol();
//purpose :
//=======================================================================
IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const Standard_CString theName,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
std::istream& theIStream)
{
Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary();
}
// determinate roots used ProductDefinitionContext
if(IsRoot) {
- StepData_ConfParameters::ReadMode_ProductContext aProdContMode = aStepModel->InternalParameters.ReadProductContext;
+ DESTEP_Parameters::ReadMode_ProductContext aProdContMode = aStepModel->InternalParameters.ReadProductContext;
TCollection_AsciiString str1 = aStepModel->InternalParameters.GetString(aProdContMode);
Standard_Integer ICS = aStepModel->InternalParameters.ReadProductContext;
if(ICS>1) {
#include <XSControl_Reader.hxx>
#include <Standard_Integer.hxx>
-#include <StepData_ConfParameters.hxx>
+#include <DESTEP_Parameters.hxx>
#include <TColStd_SequenceOfAsciiString.hxx>
#include <TColStd_Array1OfAsciiString.hxx>
#include <TColStd_Array1OfReal.hxx>
//! 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,
- const StepData_ConfParameters& theParams);
+ const DESTEP_Parameters& theParams);
//! Loads a file from stream and returns the read status
Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
std::istream& theIStream);
//! Transfers a root given its rank in the list of candidate roots
#include <Interface_Macros.hxx>
#include <STEPControl_ActorWrite.hxx>
#include <STEPControl_Controller.hxx>
-#include <StepData_ConfParameters.hxx>
+#include <DESTEP_Parameters.hxx>
#include <StepData_StepModel.hxx>
#include <StepData_Protocol.hxx>
#include <StepData_StepWriter.hxx>
IFSelect_ReturnStatus STEPControl_Writer::Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph,
const Message_ProgressRange& theProgress)
{
#include <Standard_Real.hxx>
#include <IFSelect_ReturnStatus.hxx>
-#include <StepData_ConfParameters.hxx>
+#include <DESTEP_Parameters.hxx>
#include <STEPControl_StepModelType.hxx>
#include <Standard_Integer.hxx>
#include <Message_ProgressRange.hxx>
Standard_EXPORT IFSelect_ReturnStatus Transfer
(const TopoDS_Shape& sh,
const STEPControl_StepModelType mode,
- const StepData_ConfParameters& theParams,
+ const DESTEP_Parameters& theParams,
const Standard_Boolean compgraph = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange());
StepData.cxx
StepData.hxx
StepData_Array1OfField.hxx
-StepData_ConfParameters.cxx
StepData_ConfParameters.hxx
StepData_DefaultGeneral.cxx
StepData_DefaultGeneral.hxx
+++ /dev/null
-// Copyright (c) 2023 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <Interface_Static.hxx>
-
-#include <StepData_ConfParameters.hxx>
-
-//=======================================================================
-// function : StepData_ConfParameters
-// purpose :
-//=======================================================================
-StepData_ConfParameters::StepData_ConfParameters()
-{}
-
-//=======================================================================
-// function : InitParameters
-// purpose :
-//=======================================================================
-void StepData_ConfParameters::InitFromStatic()
-{
- ReadBSplineContinuity = (StepData_ConfParameters::ReadMode_BSplineContinuity)Interface_Static::IVal("read.iges.bspline.continuity");
- ReadPrecisionMode = (StepData_ConfParameters::ReadMode_Precision)Interface_Static::IVal("read.precision.mode");
- ReadPrecisionVal = Interface_Static::RVal("read.precision.val");
- ReadMaxPrecisionMode = (StepData_ConfParameters::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode");
- ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val");
- ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1;
- ReadSurfaceCurveMode = (StepData_ConfParameters::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode");
- EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI;
- AngleUnit = (StepData_ConfParameters::AngleUnitMode)Interface_Static::IVal("step.angleunit.mode");
-
- ReadResourceName = Interface_Static::CVal("read.step.resource.name");
- ReadSequence = Interface_Static::CVal("read.step.sequence");
- ReadProductMode = Interface_Static::IVal("read.step.product.mode") == 1;
- ReadProductContext = (StepData_ConfParameters::ReadMode_ProductContext)Interface_Static::IVal("read.step.product.context");
- ReadShapeRepr = (StepData_ConfParameters::ReadMode_ShapeRepr)Interface_Static::IVal("read.step.shape.repr");
- ReadTessellated = (StepData_ConfParameters::RWMode_Tessellated)Interface_Static::IVal("read.step.tessellated");
- ReadAssemblyLevel = (StepData_ConfParameters::ReadMode_AssemblyLevel)Interface_Static::IVal("read.step.assembly.level");
- ReadRelationship = Interface_Static::IVal("read.step.shape.relationship") == 1;
- ReadShapeAspect = Interface_Static::IVal("read.step.shape.aspect") == 1;
- ReadConstrRelation = Interface_Static::IVal("read.step.constructivegeom.relationship") == 1;
- ReadSubshapeNames = Interface_Static::IVal("read.stepcaf.subshapes.name") == 1;
- ReadCodePage = (Resource_FormatType)Interface_Static::IVal("read.step.codepage");
- ReadNonmanifold = Interface_Static::IVal("read.step.nonmanifold") == 1;
- ReadIdeas = Interface_Static::IVal("read.step.ideas") == 1;
- ReadAllShapes = Interface_Static::IVal("read.step.all.shapes") == 1;
- ReadRootTransformation = Interface_Static::IVal("read.step.root.transformation") == 1;
- ReadColor = Interface_Static::IVal("read.color") == 1;
- ReadName = Interface_Static::IVal("read.name") == 1;
- ReadLayer = Interface_Static::IVal("read.layer") == 1;
- ReadProps = Interface_Static::IVal("read.props") == 1;
- ReadMetadata = Interface_Static::IVal("read.metadata") == 1;
-
- WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode");
- WritePrecisionVal = Interface_Static::RVal("write.precision.val");
- WriteAssembly = (StepData_ConfParameters::WriteMode_Assembly)Interface_Static::IVal("write.step.assembly");
- WriteSchema = (StepData_ConfParameters::WriteMode_StepSchema)Interface_Static::IVal("write.step.schema");
- WriteTessellated = (StepData_ConfParameters::RWMode_Tessellated)Interface_Static::IVal("write.step.tessellated");
- WriteProductName = Interface_Static::CVal("write.step.product.name");
- WriteSurfaceCurMode = Interface_Static::IVal("write.surfacecurve.mode") == 1;
- WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.step.unit");
- WriteResourceName = Interface_Static::CVal("write.step.resource.name");
- WriteSequence = Interface_Static::CVal("write.step.sequence");
- WriteVertexMode = (StepData_ConfParameters::WriteMode_VertexMode)Interface_Static::IVal("write.step.vertex.mode");
- WriteSubshapeNames = Interface_Static::IVal("write.stepcaf.subshapes.name") == 1;
- WriteColor = Interface_Static::IVal("write.color") == 1;
- WriteNonmanifold = Interface_Static::IVal("write.step.nonmanifold") == 1;
- WriteName = Interface_Static::IVal("write.name") == 1;
- WriteLayer = Interface_Static::IVal("write.layer") == 1;
- WriteProps = Interface_Static::IVal("write.props") == 1;
- WriteModelType = (STEPControl_StepModelType)Interface_Static::IVal("write.model.type");
-}
-
-//=======================================================================
-// function : ResetParameters
-// purpose :
-//=======================================================================
-void StepData_ConfParameters::Reset()
-{
- StepData_ConfParameters aParameters;
- *this = aParameters;
-}
#ifndef _StepData_ConfParameters_HeaderFile
#define _StepData_ConfParameters_HeaderFile
-#include <Resource_FormatType.hxx>
-#include <STEPControl_StepModelType.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <UnitsMethods_LengthUnit.hxx>
+#include <DESTEP_Parameters.hxx>
-class StepData_ConfParameters
-{
-
-public:
-
- enum ReadMode_BSplineContinuity
- {
- ReadMode_BSplineContinuity_C0 = 0,
- ReadMode_BSplineContinuity_C1,
- ReadMode_BSplineContinuity_C2
- };
- enum ReadMode_Precision
- {
- ReadMode_Precision_File = 0,
- ReadMode_Precision_User
- };
- enum ReadMode_MaxPrecision
- {
- ReadMode_MaxPrecision_Preferred = 0,
- ReadMode_MaxPrecision_Forced
- };
- enum ReadMode_SurfaceCurve
- {
- ReadMode_SurfaceCurve_Default = 0,
- ReadMode_SurfaceCurve_2DUse_Preferred = 2,
- ReadMode_SurfaceCurve_2DUse_Forced = -2,
- ReadMode_SurfaceCurve_3DUse_Preferred = 3,
- ReadMode_SurfaceCurve_3DUse_Forced = -3
- };
- enum AngleUnitMode
- {
- AngleUnitMode_File = 0,
- AngleUnitMode_Rad,
- AngleUnitMode_Deg
- };
- enum ReadMode_ProductContext
- {
- ReadMode_ProductContext_All = 1,
- ReadMode_ProductContext_Design,
- ReadMode_ProductContext_Analysis
- };
- enum ReadMode_ShapeRepr
- {
- ReadMode_ShapeRepr_All = 1,
- ReadMode_ShapeRepr_ABSR,
- ReadMode_ShapeRepr_MSSR,
- ReadMode_ShapeRepr_GBSSR,
- ReadMode_ShapeRepr_FBSR,
- ReadMode_ShapeRepr_EBWSR,
- ReadMode_ShapeRepr_GBWSR
- };
- enum ReadMode_AssemblyLevel
- {
- ReadMode_AssemblyLevel_All = 1,
- ReadMode_AssemblyLevel_Assembly,
- ReadMode_AssemblyLevel_Structure,
- ReadMode_AssemblyLevel_Shape
- };
- enum RWMode_Tessellated
- {
- RWMode_Tessellated_Off = 0,
- RWMode_Tessellated_On,
- RWMode_Tessellated_OnNoBRep
- };
- enum WriteMode_PrecisionMode
- {
- WriteMode_PrecisionMode_Least = -1,
- WriteMode_PrecisionMode_Average = 0,
- WriteMode_PrecisionMode_Greatest = 1,
- WriteMode_PrecisionMode_Session = 2
- };
- enum WriteMode_Assembly
- {
- WriteMode_Assembly_Off = 0,
- WriteMode_Assembly_On,
- WriteMode_Assembly_Auto
- };
- enum WriteMode_StepSchema
- {
- WriteMode_StepSchema_AP214CD = 1,
- WriteMode_StepSchema_AP214DIS,
- WriteMode_StepSchema_AP203,
- WriteMode_StepSchema_AP214IS,
- WriteMode_StepSchema_AP242DIS
- };
- enum WriteMode_VertexMode
- {
- WriteMode_VertexMode_OneCompound = 0,
- WriteMode_VertexMode_SingleVertex
- };
-
- Standard_EXPORT StepData_ConfParameters();
-
- //! Initialize parameters
- Standard_EXPORT void InitFromStatic();
-
- //! Reset used parameters
- Standard_EXPORT void Reset();
-
- Standard_EXPORT TCollection_AsciiString GetString(const ReadMode_ProductContext theMode)
- {
- switch (theMode)
- {
- case ReadMode_ProductContext_All:
- return "all";
- case ReadMode_ProductContext_Design:
- return "design";
- case ReadMode_ProductContext_Analysis:
- return "analysis";
- default:
- return "";
- }
- }
-
-public:
- // Common
-// clang-format off
- ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
- ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
- double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
- ReadMode_MaxPrecision ReadMaxPrecisionMode = ReadMode_MaxPrecision_Preferred; //<! Defines the mode of applying the maximum allowed tolerance
- double ReadMaxPrecisionVal = 1; //<! Defines the maximum allowable tolerance
- bool ReadSameParamMode = false; //<! Defines the using of BRepLib::SameParameter
- ReadMode_SurfaceCurve ReadSurfaceCurveMode = ReadMode_SurfaceCurve_Default; //<! Reference for the computation of curves in case of 2D/3D
- double EncodeRegAngle = 0.57295779513; //<! Continuity which these two faces are connected with at that edge
- AngleUnitMode AngleUnit = AngleUnitMode_File; //<! Indicates what angle units should be used when a STEP file is read
-
- // Read
- TCollection_AsciiString ReadResourceName = "STEP"; //<! Defines the name of the resource file to read
- TCollection_AsciiString ReadSequence = "FromSTEP"; //<! Defines the name of the sequence of operators to read
- bool ReadProductMode = true; //<! Defines the approach used for selection of top-level STEP entities for translation, and for recognition of assembly structures
- ReadMode_ProductContext ReadProductContext = ReadMode_ProductContext_All; //<! When reading AP 209 STEP files, allows selecting either only 'design' or 'analysis', or both types of products for translation
- ReadMode_ShapeRepr ReadShapeRepr = ReadMode_ShapeRepr_All; //<! Specifies preferred type of representation of the shape of the product
- RWMode_Tessellated ReadTessellated = RWMode_Tessellated_On; //!< Defines whether tessellated shapes should be translated
- ReadMode_AssemblyLevel ReadAssemblyLevel = ReadMode_AssemblyLevel_All; //<! Specifies which data should be read for the products found in the STEP file
- bool ReadRelationship = true; //<! Defines whether shapes associated with the main SHAPE_DEFINITION_REPRESENTATION entity of the product via SHAPE_REPRESENTATIONSHIP_RELATION should be translated
- bool ReadShapeAspect = true; //<! Defines whether shapes associated with the PRODUCT_DEFINITION_SHAPE entity of the product via SHAPE_ASPECT should be translated
- bool ReadConstrRelation = false; //<! Flag regulating translation of "CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP" entities
- bool ReadSubshapeNames = false; //<! Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items
- Resource_FormatType ReadCodePage = Resource_FormatType_UTF8; //<! STEP file encoding for names translation
- bool ReadNonmanifold = false; //<! Defines non-manifold topology reading
- bool ReadIdeas = false; //<! Defines !I-Deas-like STEP processing
- bool ReadAllShapes = false; //<! Parameter to read all top level solids and shells
- bool ReadRootTransformation = true; ///<!/ Mode to variate apply or not transformation placed in the root shape representation
- bool ReadColor = true; //<! ColorMode is used to indicate read Colors or not
- bool ReadName = true; //<! NameMode is used to indicate read Name or not
- bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
- bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
- bool ReadMetadata = true; //! Parameter for metadata reading
-
- // Write
- WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
- double WritePrecisionVal = 0.0001; //<! Resolution value for an STEP file when WriteMode_PrecisionMode is Greatest
- WriteMode_Assembly WriteAssembly = WriteMode_Assembly_Auto; //<! Writing assembly mode
- WriteMode_StepSchema WriteSchema = WriteMode_StepSchema_AP214CD; //<! Defines the version of schema used for the output STEP file
- RWMode_Tessellated WriteTessellated = RWMode_Tessellated_OnNoBRep; //!< Defines whether tessellated shapes should be translated
- TCollection_AsciiString WriteProductName; //<! Defines the text string that will be used for field 'name' of PRODUCT entities written to the STEP file
- bool WriteSurfaceCurMode = true; //<! Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file
- UnitsMethods_LengthUnit WriteUnit = UnitsMethods_LengthUnit_Millimeter; //<! Defines a unit in which the STEP file should be written
- TCollection_AsciiString WriteResourceName = "STEP"; //<! Defines the name of the resource file to write
- TCollection_AsciiString WriteSequence = "ToSTEP"; //<! Defines the name of the sequence of operators to write
- WriteMode_VertexMode WriteVertexMode = WriteMode_VertexMode_OneCompound; //<! Indicates which of free vertices writing mode is switch on
- bool WriteSubshapeNames = false; //<! Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items
- bool WriteColor = true; //<! ColorMode is used to indicate write Colors or not
- bool WriteNonmanifold = false; //<! Defines non-manifold topology writing
- bool WriteName = true; //<! NameMode is used to indicate write Name or not
- bool WriteLayer = true; //<! LayerMode is used to indicate write Layers or not
- bool WriteProps = true; //<! PropsMode is used to indicate write Validation properties or not
- STEPControl_StepModelType WriteModelType = STEPControl_AsIs; //<! Gives you the choice of translation mode for an Open CASCADE shape that is being translated to STEP
-// clang-format on
-};
+Standard_DEPRECATED("Deprecated alias to moved class")
+typedef DESTEP_Parameters StepData_ConfParameters;
#endif // _StepData_ConfParameters_HeaderFile
#include <Interface_InterfaceModel.hxx>
#include <Resource_FormatType.hxx>
#include <StepData_Factors.hxx>
-#include <StepData_ConfParameters.hxx>
+#include <DESTEP_Parameters.hxx>
class Standard_Transient;
class Interface_EntityIterator;
public:
- StepData_ConfParameters InternalParameters;
+ DESTEP_Parameters InternalParameters;
DEFINE_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel)
STEPControl_Controller::Init();
XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info
IFSelect_ReturnStatus aReadStat;
- StepData_ConfParameters aParameters;
+ DESTEP_Parameters aParameters;
aParameters.InitFromStatic();
int aNbSubShape = 0;
OSD_Parallel::For
return 1;
}
- StepData_ConfParameters aParameters;
+ DESTEP_Parameters aParameters;
aParameters.InitFromStatic();
OSD_Parallel::For