summaryrefslogtreecommitdiff
path: root/inc/RWStl.hxx
blob: 15cdfa6903443feb306ed4d735b23d2f924e6013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _RWStl_HeaderFile
#define _RWStl_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_StlMesh_Mesh_HeaderFile
#include <Handle_StlMesh_Mesh.hxx>
#endif
#ifndef _Handle_Message_ProgressIndicator_HeaderFile
#include <Handle_Message_ProgressIndicator.hxx>
#endif
class StlMesh_Mesh;
class OSD_Path;
class Message_ProgressIndicator;


//! This package contains the methods to be used in <br>
//!          the Stereo Lithograpy Application. The main <br>
//!          features of this application are ,starting from a <br>
//!          Shape : <br>
//!          - mesh this shape with a maximun tolerance, <br>
//!          - display the meshing, <br>
//!          - write the meshing in a file (binary or ascii), <br>
//!          - read of file (binary or ascii) and display it, <br>
//!          - translate a binary file to an ascii file, <br>
//!          - translate an ascii file to an binary file. <br>
class RWStl  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! write the meshing in a file following the <br>
//!         binary format of an STL file. <br>
//!         Returns false if the cannot be opened; <br>
  Standard_EXPORT   static  Standard_Boolean WriteBinary(const Handle(StlMesh_Mesh)& aMesh,const OSD_Path& aPath,const Handle(Message_ProgressIndicator)& aProgInd = NULL) ;
  //! write the meshing in a file following the <br>
//!         Ascii  format of an STL file. <br>
//!         Returns false if the cannot be opened; <br>
  Standard_EXPORT   static  Standard_Boolean WriteAscii(const Handle(StlMesh_Mesh)& aMesh,const OSD_Path& aPath,const Handle(Message_ProgressIndicator)& aProgInd = NULL) ;
  //! This method will chwck if the file is a binary <br>
//!         file or an AsciiFile testing  the 5 first <br>
//!         characters of the file wich are :"solid" in an <br>
//!         ascii file. If we do not find that word we assume <br>
//!         that it is a binary file. <br>
  Standard_EXPORT   static  Handle_StlMesh_Mesh ReadFile(const OSD_Path& aPath,const Handle(Message_ProgressIndicator)& aProgInd = NULL) ;
  //! Read a meshing from a binary file <br>
//!        Raises NoMoreObject from Standard if a statement <br>
//!        does not contain the right number of tokens <br>
//!        Raises TypeMisMatch if a token has not the good <br>
//!        type (often real) <br>
  Standard_EXPORT   static  Handle_StlMesh_Mesh ReadBinary(const OSD_Path& aPath,const Handle(Message_ProgressIndicator)& aProgInd = NULL) ;
  //! Read a meshing from a binary file <br>
//!        Raises NoMoreObject from Standard if a statement <br>
//!        does not contain the right number of tokens <br>
//!        Raises TypeMisMatch if a token has not the good <br>
//!        type (often real) <br>
//!        Raises MoMoreObject if a file is finished before <br>
//!        having found the word endsolid; <br>
  Standard_EXPORT   static  Handle_StlMesh_Mesh ReadAscii(const OSD_Path& aPath,const Handle(Message_ProgressIndicator)& aProgInd = NULL) ;





protected:





private:





};





// other Inline functions and methods (like "C++: function call" methods)


#endif