Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/DESTEP_Parameters.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (c) 2023 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _DESTEP_Parameters_HeaderFile
0015 #define _DESTEP_Parameters_HeaderFile
0016 
0017 #include <DE_ShapeFixParameters.hxx>
0018 #include <Resource_FormatType.hxx>
0019 #include <STEPControl_StepModelType.hxx>
0020 #include <TCollection_AsciiString.hxx>
0021 #include <UnitsMethods_LengthUnit.hxx>
0022 
0023 class DESTEP_Parameters
0024 {
0025 public:
0026   enum ReadMode_BSplineContinuity
0027   {
0028     ReadMode_BSplineContinuity_C0 = 0,
0029     ReadMode_BSplineContinuity_C1,
0030     ReadMode_BSplineContinuity_C2
0031   };
0032 
0033   enum ReadMode_Precision
0034   {
0035     ReadMode_Precision_File = 0,
0036     ReadMode_Precision_User
0037   };
0038 
0039   enum ReadMode_MaxPrecision
0040   {
0041     ReadMode_MaxPrecision_Preferred = 0,
0042     ReadMode_MaxPrecision_Forced
0043   };
0044 
0045   enum ReadMode_SurfaceCurve
0046   {
0047     ReadMode_SurfaceCurve_Default         = 0,
0048     ReadMode_SurfaceCurve_2DUse_Preferred = 2,
0049     ReadMode_SurfaceCurve_2DUse_Forced    = -2,
0050     ReadMode_SurfaceCurve_3DUse_Preferred = 3,
0051     ReadMode_SurfaceCurve_3DUse_Forced    = -3
0052   };
0053 
0054   enum AngleUnitMode
0055   {
0056     AngleUnitMode_File = 0,
0057     AngleUnitMode_Rad,
0058     AngleUnitMode_Deg
0059   };
0060 
0061   enum ReadMode_ProductContext
0062   {
0063     ReadMode_ProductContext_All = 1,
0064     ReadMode_ProductContext_Design,
0065     ReadMode_ProductContext_Analysis
0066   };
0067 
0068   enum ReadMode_ShapeRepr
0069   {
0070     ReadMode_ShapeRepr_All = 1,
0071     ReadMode_ShapeRepr_ABSR,
0072     ReadMode_ShapeRepr_MSSR,
0073     ReadMode_ShapeRepr_GBSSR,
0074     ReadMode_ShapeRepr_FBSR,
0075     ReadMode_ShapeRepr_EBWSR,
0076     ReadMode_ShapeRepr_GBWSR
0077   };
0078 
0079   enum ReadMode_AssemblyLevel
0080   {
0081     ReadMode_AssemblyLevel_All = 1,
0082     ReadMode_AssemblyLevel_Assembly,
0083     ReadMode_AssemblyLevel_Structure,
0084     ReadMode_AssemblyLevel_Shape
0085   };
0086 
0087   enum RWMode_Tessellated
0088   {
0089     RWMode_Tessellated_Off = 0,
0090     RWMode_Tessellated_On,
0091     RWMode_Tessellated_OnNoBRep
0092   };
0093 
0094   enum WriteMode_PrecisionMode
0095   {
0096     WriteMode_PrecisionMode_Least    = -1,
0097     WriteMode_PrecisionMode_Average  = 0,
0098     WriteMode_PrecisionMode_Greatest = 1,
0099     WriteMode_PrecisionMode_Session  = 2
0100   };
0101 
0102   enum WriteMode_Assembly
0103   {
0104     WriteMode_Assembly_Off = 0,
0105     WriteMode_Assembly_On,
0106     WriteMode_Assembly_Auto
0107   };
0108 
0109   enum WriteMode_StepSchema
0110   {
0111     WriteMode_StepSchema_AP214CD = 1,
0112     WriteMode_StepSchema_AP214DIS,
0113     WriteMode_StepSchema_AP203,
0114     WriteMode_StepSchema_AP214IS,
0115     WriteMode_StepSchema_AP242DIS
0116   };
0117 
0118   enum WriteMode_VertexMode
0119   {
0120     WriteMode_VertexMode_OneCompound = 0,
0121     WriteMode_VertexMode_SingleVertex
0122   };
0123 
0124 public:
0125   Standard_EXPORT DESTEP_Parameters();
0126 
0127   //! Initialize parameters
0128   Standard_EXPORT void InitFromStatic();
0129 
0130   //! Reset used parameters
0131   Standard_EXPORT void Reset();
0132 
0133   Standard_EXPORT TCollection_AsciiString GetString(const ReadMode_ProductContext theMode)
0134   {
0135     switch (theMode)
0136     {
0137       case ReadMode_ProductContext_All:
0138         return "all";
0139       case ReadMode_ProductContext_Design:
0140         return "design";
0141       case ReadMode_ProductContext_Analysis:
0142         return "analysis";
0143       default:
0144         return "";
0145     }
0146   }
0147 
0148   //! Returns default shape fix parameters for transferring STEP files.
0149   Standard_EXPORT static DE_ShapeFixParameters GetDefaultShapeFixParameters();
0150 
0151 public:
0152   // Common
0153   // clang-format off
0154   ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
0155   ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
0156   double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
0157   ReadMode_MaxPrecision ReadMaxPrecisionMode = ReadMode_MaxPrecision_Preferred; //<! Defines the mode of applying the maximum allowed tolerance
0158   double ReadMaxPrecisionVal = 1; //<! Defines the maximum allowable tolerance
0159   bool ReadSameParamMode = false; //<! Defines the using of BRepLib::SameParameter
0160   ReadMode_SurfaceCurve ReadSurfaceCurveMode = ReadMode_SurfaceCurve_Default; //<! Reference for the computation of curves in case of 2D/3D
0161   double EncodeRegAngle = 0.57295779513; //<! Continuity which these two faces are connected with at that edge
0162   AngleUnitMode AngleUnit = AngleUnitMode_File; //<! Indicates what angle units should be used when a STEP file is read
0163 
0164   // Read
0165   bool ReadProductMode = true; //<! Defines the approach used for selection of top-level STEP entities for translation, and for recognition of assembly structures
0166   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
0167   ReadMode_ShapeRepr ReadShapeRepr = ReadMode_ShapeRepr_All; //<! Specifies preferred type of representation of the shape of the product
0168   RWMode_Tessellated ReadTessellated = RWMode_Tessellated_On; //!< Defines whether tessellated shapes should be translated
0169   ReadMode_AssemblyLevel ReadAssemblyLevel = ReadMode_AssemblyLevel_All; //<! Specifies which data should be read for the products found in the STEP file
0170   bool ReadRelationship = true; //<! Defines whether shapes associated with the main SHAPE_DEFINITION_REPRESENTATION entity of the product via SHAPE_REPRESENTATIONSHIP_RELATION should be translated
0171   bool ReadShapeAspect = true; //<! Defines whether shapes associated with the PRODUCT_DEFINITION_SHAPE entity of the product via SHAPE_ASPECT should be translated
0172   bool ReadConstrRelation = false; //<! Flag regulating translation of "CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP" entities
0173   bool ReadSubshapeNames = false; //<! Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items
0174   Resource_FormatType ReadCodePage = Resource_FormatType_UTF8; //<! STEP file encoding for names translation
0175   bool ReadNonmanifold = false; //<! Defines non-manifold topology reading
0176   bool ReadIdeas = false; //<! Defines !I-Deas-like STEP processing
0177   bool ReadAllShapes = false; //<! Parameter to read all top level solids and shells
0178   bool ReadRootTransformation = true; ///<!/ Mode to variate apply or not transformation placed in the root shape representation
0179   bool ReadColor = true; //<! ColorMode is used to indicate read Colors or not
0180   bool ReadName = true; //<! NameMode is used to indicate read Name or not
0181   bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
0182   bool ReadProps = true; //<! PropsMode is used to indicate read Validation properties or not
0183   bool ReadMetadata = true; //! Parameter for metadata reading
0184   bool ReadProductMetadata = false; //! Parameter for product metadata reading
0185   
0186   // Write
0187   WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
0188   double WritePrecisionVal = 0.0001; //<! Resolution value for an STEP file when WriteMode_PrecisionMode is Greatest
0189   WriteMode_Assembly WriteAssembly = WriteMode_Assembly_Auto; //<! Writing assembly mode
0190   WriteMode_StepSchema WriteSchema = WriteMode_StepSchema_AP214IS; //<! Defines the version of schema used for the output STEP file
0191   RWMode_Tessellated WriteTessellated = RWMode_Tessellated_OnNoBRep; //!< Defines whether tessellated shapes should be translated
0192   TCollection_AsciiString WriteProductName; //<! Defines the text string that will be used for field 'name' of PRODUCT entities written to the STEP file
0193   bool WriteSurfaceCurMode = true; //<! Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file
0194   UnitsMethods_LengthUnit WriteUnit = UnitsMethods_LengthUnit_Millimeter; //<! Defines a unit in which the STEP file should be written
0195   WriteMode_VertexMode WriteVertexMode = WriteMode_VertexMode_OneCompound; //<! Indicates which of free vertices writing mode is switch on
0196   bool WriteSubshapeNames = false; //<! Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items
0197   bool WriteColor = true; //<! ColorMode is used to indicate write Colors or not
0198   bool WriteNonmanifold = false; //<! Defines non-manifold topology writing
0199   bool WriteName = true; //<! NameMode is used to indicate write Name or not
0200   bool WriteLayer = true; //<! LayerMode is used to indicate write Layers or not
0201   bool WriteProps = true; //<! PropsMode is used to indicate write Validation properties or not
0202   STEPControl_StepModelType WriteModelType = STEPControl_AsIs; //<! Gives you the choice of translation mode for an Open CASCADE shape that is being translated to STEP
0203   // clang-format on
0204 };
0205 
0206 #endif // _DESTEP_Parameters_HeaderFile