File indexing completed on 2025-01-18 10:03:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _BRepMesh_DiscretFactory_HeaderFile
0015 #define _BRepMesh_DiscretFactory_HeaderFile
0016
0017 #include <Standard.hxx>
0018 #include <Standard_DefineAlloc.hxx>
0019 #include <Standard_Macro.hxx>
0020 #include <BRepMesh_PluginEntryType.hxx>
0021 #include <BRepMesh_FactoryError.hxx>
0022 #include <TColStd_MapOfAsciiString.hxx>
0023 #include <TCollection_AsciiString.hxx>
0024 #include <Plugin_MapOfFunctions.hxx>
0025 #include <BRepMesh_DiscretRoot.hxx>
0026
0027 class TopoDS_Shape;
0028
0029
0030
0031
0032 class BRepMesh_DiscretFactory
0033 {
0034 public:
0035
0036 DEFINE_STANDARD_ALLOC
0037
0038
0039 Standard_EXPORT static BRepMesh_DiscretFactory& Get();
0040
0041
0042 const TColStd_MapOfAsciiString& Names() const
0043 {
0044 return myNames;
0045 }
0046
0047
0048
0049
0050 Standard_Boolean SetDefaultName(const TCollection_AsciiString& theName)
0051 {
0052 return SetDefault(theName, myFunctionName);
0053 }
0054
0055
0056 const TCollection_AsciiString& DefaultName() const
0057 {
0058 return myDefaultName;
0059 }
0060
0061
0062
0063
0064 Standard_Boolean SetFunctionName(const TCollection_AsciiString& theFuncName)
0065 {
0066 return SetDefault(myDefaultName, theFuncName);
0067 }
0068
0069
0070 const TCollection_AsciiString& FunctionName() const
0071 {
0072 return myFunctionName;
0073 }
0074
0075
0076 BRepMesh_FactoryError ErrorStatus() const
0077 {
0078 return myErrorStatus;
0079 }
0080
0081
0082
0083
0084
0085 Standard_EXPORT Standard_Boolean SetDefault(const TCollection_AsciiString& theName,
0086 const TCollection_AsciiString& theFuncName = "DISCRETALGO");
0087
0088
0089
0090
0091
0092 Standard_EXPORT Handle(BRepMesh_DiscretRoot) Discret(const TopoDS_Shape& theShape,
0093 const Standard_Real theLinDeflection,
0094 const Standard_Real theAngDeflection);
0095
0096 protected:
0097
0098
0099 Standard_EXPORT BRepMesh_DiscretFactory();
0100
0101
0102 Standard_EXPORT virtual ~BRepMesh_DiscretFactory();
0103
0104
0105 Standard_EXPORT void clear();
0106
0107 BRepMesh_PluginEntryType myPluginEntry;
0108 BRepMesh_FactoryError myErrorStatus;
0109 TColStd_MapOfAsciiString myNames;
0110 TCollection_AsciiString myDefaultName;
0111 TCollection_AsciiString myFunctionName;
0112 Plugin_MapOfFunctions myFactoryMethods;
0113 };
0114
0115 #endif