File indexing completed on 2025-01-18 10:04:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _RWStl_HeaderFile
0017 #define _RWStl_HeaderFile
0018
0019 #include <OSD_Path.hxx>
0020 #include <Poly_Triangulation.hxx>
0021 #include <Standard_Macro.hxx>
0022 #include <Message_ProgressScope.hxx>
0023 #include <NCollection_Sequence.hxx>
0024
0025
0026 class RWStl
0027 {
0028 public:
0029
0030
0031
0032
0033 Standard_EXPORT static Standard_Boolean WriteBinary (const Handle(Poly_Triangulation)& theMesh,
0034 const OSD_Path& thePath,
0035 const Message_ProgressRange& theProgress = Message_ProgressRange());
0036
0037
0038
0039
0040 Standard_EXPORT static Standard_Boolean WriteAscii (const Handle(Poly_Triangulation)& theMesh,
0041 const OSD_Path& thePath,
0042 const Message_ProgressRange& theProgress = Message_ProgressRange());
0043
0044
0045
0046 Standard_EXPORT static Handle(Poly_Triangulation) ReadFile (const OSD_Path& theFile,
0047 const Message_ProgressRange& theProgress = Message_ProgressRange());
0048
0049
0050
0051 static Handle(Poly_Triangulation) ReadFile (const Standard_CString theFile,
0052 const Message_ProgressRange& theProgress = Message_ProgressRange())
0053 {
0054 return ReadFile (theFile, M_PI / 2.0, theProgress);
0055 }
0056
0057
0058
0059
0060
0061
0062 Standard_EXPORT static Handle(Poly_Triangulation) ReadFile (const Standard_CString theFile,
0063 const Standard_Real theMergeAngle,
0064 const Message_ProgressRange& theProgress = Message_ProgressRange());
0065
0066
0067
0068
0069
0070
0071 Standard_EXPORT static void ReadFile(const Standard_CString theFile,
0072 const Standard_Real theMergeAngle,
0073 NCollection_Sequence<Handle(Poly_Triangulation)>& theTriangList,
0074 const Message_ProgressRange& theProgress = Message_ProgressRange());
0075
0076
0077
0078 Standard_EXPORT static Handle(Poly_Triangulation) ReadBinary (const OSD_Path& thePath,
0079 const Message_ProgressRange& theProgress = Message_ProgressRange());
0080
0081
0082
0083 Standard_EXPORT static Handle(Poly_Triangulation) ReadAscii (const OSD_Path& thePath,
0084 const Message_ProgressRange& theProgress = Message_ProgressRange());
0085
0086 private:
0087
0088
0089 static Standard_Boolean writeASCII (const Handle(Poly_Triangulation)& theMesh,
0090 FILE *theFile,
0091 const Message_ProgressRange& theProgress);
0092
0093
0094 static Standard_Boolean writeBinary (const Handle(Poly_Triangulation)& theMesh,
0095 FILE *theFile,
0096 const Message_ProgressRange& theProgress);
0097 };
0098
0099 #endif