Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/DEIGES_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 _DEIGES_Parameters_HeaderFile
0015 #define _DEIGES_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 DEIGES_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 WriteMode_BRep
0055   {
0056     WriteMode_BRep_Faces = 0,
0057     WriteMode_BRep_BRep
0058   };
0059 
0060   enum WriteMode_ConvertSurface
0061   {
0062     WriteMode_ConvertSurface_Off = 0,
0063     WriteMode_ConvertSurface_On
0064   };
0065 
0066   enum WriteMode_PrecisionMode
0067   {
0068     WriteMode_PrecisionMode_Least    = -1,
0069     WriteMode_PrecisionMode_Average  = 0,
0070     WriteMode_PrecisionMode_Greatest = 1,
0071     WriteMode_PrecisionMode_Session  = 2
0072   };
0073 
0074   enum WriteMode_PlaneMode
0075   {
0076     WriteMode_PlaneMode_Plane = 0,
0077     WriteMode_PlaneMode_BSpline
0078   };
0079 
0080 public:
0081   DEIGES_Parameters() = default;
0082 
0083   //! Initialize parameters
0084   Standard_EXPORT void InitFromStatic();
0085 
0086   //! Reset used parameters
0087   Standard_EXPORT void Reset();
0088 
0089   //! Returns default shape fix parameters for transferring IGES files.
0090   Standard_EXPORT static DE_ShapeFixParameters GetDefaultShapeFixParameters();
0091 
0092 public:
0093   // Common
0094   // clang-format off
0095   ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; //<! Manages the continuity of BSpline curves
0096   ReadMode_Precision ReadPrecisionMode = ReadMode_Precision_File; //<! Reads the precision mode value
0097   double ReadPrecisionVal = 0.0001; //<! ReadMode_Precision for shape construction (if enabled user mode)
0098   ReadMode_MaxPrecision ReadMaxPrecisionMode = ReadMode_MaxPrecision_Preferred; //<! Defines the mode of applying the maximum allowed tolerance
0099   double ReadMaxPrecisionVal = 1; //<! Defines the maximum allowable tolerance
0100   bool ReadSameParamMode = false; //<! Defines the using of BRepLib::SameParameter
0101   ReadMode_SurfaceCurve ReadSurfaceCurveMode = ReadMode_SurfaceCurve_Default; //<! reference for the computation of curves in case of 2D/3D
0102   double EncodeRegAngle = 0.57295779513; //<! Continuity which these two faces are connected with at that edge
0103 
0104   //Read
0105   bool ReadApproxd1 = false; //<! Flag to split bspline curves of degree 1
0106   bool ReadFaultyEntities = false; //<! Parameter for reading failed entities
0107   bool ReadOnlyVisible = false; //<! Parameter for reading invisible entities
0108   bool ReadColor = true; //<! ColorMode is used to indicate read Colors or not
0109   bool ReadName = true; //<! NameMode is used to indicate read Name or not
0110   bool ReadLayer = true; //<! LayerMode is used to indicate read Layers or not
0111 
0112   // Write
0113   WriteMode_BRep WriteBRepMode = WriteMode_BRep_Faces; //<! Flag to define entities type to write
0114   WriteMode_ConvertSurface WriteConvertSurfaceMode = WriteMode_ConvertSurface_Off; //<! Flag to convert surface to elementary
0115   TCollection_AsciiString WriteHeaderAuthor; //<! Name of the author of the file
0116   TCollection_AsciiString WriteHeaderCompany; //<! Name of the sending company
0117   TCollection_AsciiString WriteHeaderProduct; //<! Name of the sending product
0118   TCollection_AsciiString WriteHeaderReciever; //<! Name of the receiving company
0119   WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the IGES file
0120   double WritePrecisionVal = 0.0001; //<! Resolution value for an IGES file when WriteMode_PrecisionMode is Greatest
0121   WriteMode_PlaneMode WritePlaneMode = WriteMode_PlaneMode_Plane; //<! Flag to convert plane to the BSline
0122   bool WriteOffsetMode = false; //<! Writing offset curves like BSplines
0123   bool WriteColor      = true;  //<! ColorMode is used to indicate write Colors or not
0124   bool WriteName       = true;  //<! NameMode is used to indicate write Name or not
0125   bool WriteLayer      = true;  //<! LayerMode is used to indicate write Layers or not
0126   // clang-format on
0127 };
0128 
0129 #endif // _DESTEP_Parameters_HeaderFile