b311480e |
1 | -- Created on: 2000-06-23 |
2 | -- Created by: Sergey MOZOKHIN |
973c2be1 |
3 | -- Copyright (c) 2000-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
7 | -- This library is free software; you can redistribute it and/or modify it under |
8 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class Writer from StlAPI |
17 | |
18 | ---Purpose: This class creates and writes |
19 | -- STL files from Open CASCADE shapes. An STL file can be |
20 | -- written to an existing STL file or to a new one.. |
21 | |
22 | uses |
23 | Shape from TopoDS, |
b9c1e440 |
24 | Mesh from StlMesh, |
25 | ErrorStatus from StlAPI |
7fd59977 |
26 | is |
b9c1e440 |
27 | Create; |
7fd59977 |
28 | ---Purpose: Creates a writer object with |
b9c1e440 |
29 | -- default parameters: ASCIIMode. |
7fd59977 |
30 | |
31 | ASCIIMode(me: in out) returns Boolean; |
32 | ---C++: return & |
33 | ---Purpose: Returns the address to the |
34 | -- flag defining the mode for writing the file. This address |
35 | -- may be used to either read or change the flag. |
36 | -- If the mode returns True (default value) the generated |
37 | -- file is an ASCII file. If the mode returns False, the |
38 | -- generated file is a binary file. |
39 | |
416d4426 |
40 | Write(me : in out; |
41 | aShape : Shape from TopoDS; |
b9c1e440 |
42 | aFileName : CString from Standard) returns ErrorStatus from StlAPI; |
7fd59977 |
43 | ---Purpose: Converts a given shape to STL format and writes it to file with a given filename. |
b9c1e440 |
44 | --- \return the error state. |
7fd59977 |
45 | |
46 | fields |
7fd59977 |
47 | theASCIIMode : Boolean from Standard; |
7fd59977 |
48 | theStlMesh : Mesh from StlMesh; |
49 | end Writer; |