]> OCCT Git - occt.git/commitdiff
Coding - Move StepData_ConfParameters to DESTEP package #261
authordpasukhi <dpasukhi@opencascade.com>
Thu, 16 Jan 2025 23:09:25 +0000 (23:09 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Fri, 17 Jan 2025 15:48:38 +0000 (15:48 +0000)
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.

20 files changed:
src/DESTEP/DESTEP_ConfigurationNode.cxx
src/DESTEP/DESTEP_ConfigurationNode.hxx
src/DESTEP/DESTEP_Parameters.cxx [new file with mode: 0644]
src/DESTEP/DESTEP_Parameters.hxx [new file with mode: 0644]
src/DESTEP/DESTEP_Provider.cxx
src/DESTEP/FILES
src/STEPCAFControl/STEPCAFControl_Reader.cxx
src/STEPCAFControl/STEPCAFControl_Reader.hxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPCAFControl/STEPCAFControl_Writer.hxx
src/STEPConstruct/STEPConstruct_ContextTool.hxx
src/STEPControl/STEPControl_Reader.cxx
src/STEPControl/STEPControl_Reader.hxx
src/STEPControl/STEPControl_Writer.cxx
src/STEPControl/STEPControl_Writer.hxx
src/StepData/FILES
src/StepData/StepData_ConfParameters.cxx [deleted file]
src/StepData/StepData_ConfParameters.hxx
src/StepData/StepData_StepModel.hxx
src/XSDRAWSTEP/XSDRAWSTEP.cxx

index 196351539854e08ca13ba5811209ca6b4a2ff6e1..b7c7fc2aaf8428b40723e7a12c2bdc2c4edfa33d 100644 (file)
@@ -55,17 +55,17 @@ bool DESTEP_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
     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);
@@ -76,16 +76,16 @@ bool DESTEP_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
                             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);
@@ -94,18 +94,19 @@ bool DESTEP_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
   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);
@@ -145,20 +146,22 @@ bool DESTEP_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
     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);
@@ -175,7 +178,7 @@ bool DESTEP_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRe
   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",
index 055bc90d1a5af1edf7b928c9f992a3bf358375b9..b4819ff6b5e03a117acb2a769d003fbdd9ef607e 100644 (file)
 #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
@@ -87,7 +87,7 @@ public:
     Standard_OVERRIDE;
 
 public:
-  StepData_ConfParameters InternalParameters;
+  DESTEP_Parameters InternalParameters;
 };
 
 #endif // _DESTEP_ConfigurationNode_HeaderFile
diff --git a/src/DESTEP/DESTEP_Parameters.cxx b/src/DESTEP/DESTEP_Parameters.cxx
new file mode 100644 (file)
index 0000000..871f22d
--- /dev/null
@@ -0,0 +1,97 @@
+// 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;
+}
diff --git a/src/DESTEP/DESTEP_Parameters.hxx b/src/DESTEP/DESTEP_Parameters.hxx
new file mode 100644 (file)
index 0000000..de3d273
--- /dev/null
@@ -0,0 +1,204 @@
+// 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
index 1856c271f376d400e8fd9e33eaf2e42b70543a62..42f12767cca1f8b48a911f1cffe44485a7327ef9 100644 (file)
 #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>
@@ -70,9 +70,9 @@ bool DESTEP_Provider::Read(const TCollection_AsciiString&  thePath,
   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
@@ -114,8 +114,8 @@ bool DESTEP_Provider::Write(const TCollection_AsciiString&  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))
@@ -200,8 +200,8 @@ bool DESTEP_Provider::Read(const TCollection_AsciiString& thePath,
   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)
@@ -242,7 +242,7 @@ bool DESTEP_Provider::Write(const TCollection_AsciiString& thePath,
   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,
index 3b3c6b86c12d2dfe80ea4ecdb5945ff503f5075c..871afca5339b924e4af109fa3d2cb6130af36b80 100644 (file)
@@ -1,4 +1,6 @@
 DESTEP_ConfigurationNode.cxx
 DESTEP_ConfigurationNode.hxx
+DESTEP_Parameters.cxx
+DESTEP_Parameters.hxx
 DESTEP_Provider.cxx
 DESTEP_Provider.hxx
index 2034d02dedec6c024decb4c077f3b2393e92fa99..9c47f86874a7f5b89f29619dd04879e9e90a1f4d 100644 (file)
@@ -375,7 +375,7 @@ IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString th
 //purpose  :
 //=======================================================================
 IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString theFileName,
-                                                       const StepData_ConfParameters& theParams)
+                                                       const DESTEP_Parameters& theParams)
 {
   return myReader.ReadFile(theFileName, theParams);
 }
@@ -450,7 +450,7 @@ Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename
 //=======================================================================
 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)
@@ -482,7 +482,7 @@ Standard_Boolean STEPCAFControl_Reader::Perform (const TCollection_AsciiString &
 //=======================================================================
 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)
index 262c422f40445d3c35c48ff8e67e7b681ce62d1c..d5a13322c50aa5036e07773116fd9f6f6921d9b8 100644 (file)
@@ -91,7 +91,7 @@ public:
   //! @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
@@ -123,7 +123,7 @@ public:
 
   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
@@ -136,7 +136,7 @@ public:
   //! 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
index d9a716269bc2fcb27da9b5392ce31e0bcc494b85..0e4ac924cd26671c69bbaf16e74814a24cf2ce84 100644 (file)
@@ -401,7 +401,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)&
 //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)
@@ -438,7 +438,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel,
 //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)
@@ -475,7 +475,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLab
 //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)
@@ -514,7 +514,7 @@ Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)&
 //=======================================================================
 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))
@@ -687,8 +687,8 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter,
       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;
     }
@@ -849,8 +849,8 @@ TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& theLabe
     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;
index ef970c6914708f6faa4486ff33cf8636eca53ef0..fa6ed158fd180f10d52a8692411a82309d955522 100644 (file)
@@ -24,7 +24,7 @@
 #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>
@@ -103,7 +103,7 @@ public:
   //! @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());
@@ -118,7 +118,7 @@ public:
   //! 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());
@@ -133,7 +133,7 @@ public:
   //! 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());
@@ -154,7 +154,7 @@ public:
   //! 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
index 35add18f49fde544fef3d609f389d4e0f13161bc..0e136cf524b938321b86e1c675c14a5148262b92 100644 (file)
@@ -143,7 +143,7 @@ private:
   STEPConstruct_AP203Context theAP203;
   Handle(StepGeom_Axis2Placement3d) myAxis;
   StepData_Factors myGlobalFactor;
-  StepData_ConfParameters::WriteMode_StepSchema mySchema;
+  DESTEP_Parameters::WriteMode_StepSchema mySchema;
   TCollection_AsciiString myProductName;
 
 };
index a35346360d9660a19bfb87a9cb4b6e6b3a8e8580..b6b6bcd6c12925fa9f42ae530f7011a99bc5f098 100644 (file)
@@ -136,7 +136,7 @@ IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const Standard_CString filena
 //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();
@@ -208,7 +208,7 @@ IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const Standard_CString theN
 //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();
@@ -326,7 +326,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
       }
       // 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) {
index 86550b9737b2ba611cb6473baa3c01b889ba4a91..e7913a833b631ab7a02066835ba2ffad26faa95b 100644 (file)
@@ -23,7 +23,7 @@
 
 #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>
@@ -96,11 +96,11 @@ public:
   //! 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
index e16cb584c3429481cbf9b09e64f0dec3f87d9d62..f09d68a1a7ea737cc1e656c3dbb5dd3b7f1f8153 100644 (file)
@@ -17,7 +17,7 @@
 #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>
@@ -140,7 +140,7 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer
 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)
 {
index 312a6fb0fc83bb0b9b930636cf62efa9ea9b1b66..e2c113b6a093ec6e0c5229f4ec9df8cd76a03d05 100644 (file)
@@ -23,7 +23,7 @@
 
 #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>
@@ -94,7 +94,7 @@ public:
   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());
 
index f1de2437c0ac1e3f82b191d90681bd7f09f08b32..75ee894be1f53748896a2c51dabdb0f8b1d4bde5 100644 (file)
@@ -1,7 +1,6 @@
 StepData.cxx
 StepData.hxx
 StepData_Array1OfField.hxx
-StepData_ConfParameters.cxx
 StepData_ConfParameters.hxx
 StepData_DefaultGeneral.cxx
 StepData_DefaultGeneral.hxx
diff --git a/src/StepData/StepData_ConfParameters.cxx b/src/StepData/StepData_ConfParameters.cxx
deleted file mode 100644 (file)
index 57e0205..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-// 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;
-}
index 8a4f8be1b90b0422fd6a7e838ca3e5c42e9bd719..bf657d4251fe48659173c74104415373bf2c3f26 100644 (file)
 #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
index cdf100812e5bf0e1ab2055f05931d93fef3d196b..c79516822b8678497e12982a3f9311ed12238de7 100644 (file)
@@ -22,7 +22,7 @@
 #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;
@@ -124,7 +124,7 @@ public:
 
 public:
 
-  StepData_ConfParameters InternalParameters;
+  DESTEP_Parameters InternalParameters;
 
   DEFINE_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel)
 
index 5dcea737045ac9e5b47aba573a39b217a918e822..9f123cf4e1d92157eb034e2c1276eda8041dceac 100644 (file)
@@ -284,7 +284,7 @@ static Standard_Integer testreadstep(Draw_Interpretor& theDI,
   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
@@ -497,7 +497,7 @@ static Standard_Integer testwrite(Draw_Interpretor& theDI,
     return 1;
   }
 
-  StepData_ConfParameters aParameters;
+  DESTEP_Parameters aParameters;
   aParameters.InitFromStatic();
 
   OSD_Parallel::For