Commit | Line | Data |
---|---|---|
7fd59977 | 1 | -- File: RWStl.cdl |
2 | -- Created: Thu Oct 13 12:57:13 1994 | |
3 | -- Author: Marc LEGAY | |
4 | -- <mle@bourdon> | |
5 | ---Copyright: Matra Datavision 1994 | |
6 | ||
7 | package RWStl | |
8 | ||
9 | ---Purpose: This package contains the methods to be used in | |
10 | -- the Stereo Lithograpy Application. The main | |
11 | -- features of this application are ,starting from a | |
12 | -- Shape : | |
13 | -- - mesh this shape with a maximun tolerance, | |
14 | -- - display the meshing, | |
15 | -- - write the meshing in a file (binary or ascii), | |
16 | -- - read of file (binary or ascii) and display it, | |
17 | -- - translate a binary file to an ascii file, | |
18 | -- - translate an ascii file to an binary file. | |
19 | ||
20 | uses | |
21 | ||
22 | OSD, | |
23 | Standard, | |
9c6afe19 RK |
24 | StlMesh, |
25 | Message | |
7fd59977 | 26 | |
27 | is | |
28 | ||
9c6afe19 RK |
29 | WriteBinary (aMesh : Mesh from StlMesh; aPath : Path from OSD; |
30 | aProgInd : ProgressIndicator from Message = NULL) | |
7fd59977 | 31 | returns Boolean from Standard; |
32 | ---Purpose : write the meshing in a file following the | |
33 | -- binary format of an STL file. | |
34 | -- Returns false if the cannot be opened; | |
35 | ||
9c6afe19 RK |
36 | WriteAscii (aMesh : Mesh from StlMesh; aPath : Path from OSD; |
37 | aProgInd : ProgressIndicator from Message = NULL) | |
7fd59977 | 38 | returns Boolean from Standard; |
39 | ---Purpose : write the meshing in a file following the | |
40 | -- Ascii format of an STL file. | |
41 | -- Returns false if the cannot be opened; | |
42 | ||
43 | ||
9c6afe19 RK |
44 | ReadFile (aPath : Path from OSD; |
45 | aProgInd : ProgressIndicator from Message = NULL) returns | |
7fd59977 | 46 | Mesh from StlMesh; |
47 | ---Purpose : This method will chwck if the file is a binary | |
48 | -- file or an AsciiFile testing the 5 first | |
49 | -- characters of the file wich are :"solid" in an | |
50 | -- ascii file. If we do not find that word we assume | |
51 | -- that it is a binary file. | |
52 | ||
9c6afe19 RK |
53 | ReadBinary (aPath : Path from OSD; |
54 | aProgInd : ProgressIndicator from Message = NULL) returns | |
7fd59977 | 55 | Mesh from StlMesh; |
56 | ---Purpose : Read a meshing from a binary file | |
57 | -- Raises NoMoreObject from Standard if a statement | |
58 | -- does not contain the right number of tokens | |
59 | -- Raises TypeMisMatch if a token has not the good | |
60 | -- type (often real) | |
61 | ||
9c6afe19 RK |
62 | ReadAscii (aPath : Path from OSD; |
63 | aProgInd : ProgressIndicator from Message = NULL) returns | |
7fd59977 | 64 | Mesh from StlMesh; |
65 | ---Purpose : Read a meshing from a binary file | |
66 | -- Raises NoMoreObject from Standard if a statement | |
67 | -- does not contain the right number of tokens | |
68 | -- Raises TypeMisMatch if a token has not the good | |
69 | -- type (often real) | |
70 | -- Raises MoMoreObject if a file is finished before | |
71 | -- having found the word endsolid; | |
72 | ||
73 | end RWStl; | |
74 | ||
75 | ||
76 |