0023024: Update headers of OCCT files
[occt.git] / src / IGESControl / IGESControl_Writer.cdl
CommitLineData
b311480e 1-- Created on: 1996-01-30
2-- Created by: Christian CAILLET
3-- Copyright (c) 1996-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23class Writer from IGESControl
24
25 ---Purpose : This class creates and writes
26 -- IGES files from CAS.CADE models. An IGES file can be written to
27 -- an existing IGES file or to a new one.
28 -- The translation can be performed in one or several
29 -- operations. Each translation operation
30 -- outputs a distinct root entity in the IGES file.
31 -- To write an IGES file it is possible to use the following sequence:
32 -- To modify the IGES file header or to change translation
33 -- parameters it is necessary to use class Interface_Static (see
34 -- IGESParameters and GeneralParameters).
35
36uses CString, OStream, Transient, Shape from TopoDS,
37 FinderProcess, BasicEditor from IGESData, IGESModel, IGESEntity
38
39is
40
41 Create returns Writer;
42 ---Purpose : Creates a writer object with the
43 -- default unit (millimeters) and write mode (Face).
44 -- IGESControl_Writer (const Standard_CString unit,
45 -- const Standard_Integer modecr = 0);
46
47 Create (unit : CString; modecr : Integer = 0) returns Writer;
48 ---Purpose : Creates a writer with given
49 -- values for units and for write mode.
50 -- unit may be any unit that is accepted by the IGES standard.
51 -- By default, it is the millimeter.
52 -- modecr defines the write mode and may be:
53 -- - 0: Faces (default)
54 -- - 1: BRep.
55
56 Create (model : mutable IGESModel; modecr : Integer = 0) returns Writer;
57 ---Purpose : Creates a writer object with the
58 -- prepared IGES model model in write mode.
59 -- modecr defines the write mode and may be:
60 -- - 0: Faces (default)
61 -- - 1: BRep.
62
63 Model (me) returns IGESModel;
64 ---Purpose : Returns the IGES model to be written in output.
65
66 TransferProcess (me) returns mutable FinderProcess;
67 SetTransferProcess (me : in out; TP : mutable FinderProcess);
68 ---Purpose : Returns/Sets the TransferProcess : it contains final results
69 -- and if some, check messages
70
71 AddShape (me : in out; sh : Shape) returns Boolean;
72 ---Purpose : Translates a Shape to IGES Entities and adds them to the model
73 -- Returns True if done, False if Shape not suitable for IGES or null
74
75 AddGeom (me : in out; geom : Transient) returns Boolean;
76 ---Purpose : Translates a Geometry (Surface or Curve) to IGES Entities and
77 -- adds them to the model
78 -- Returns True if done, False if geom is neither a Surface or
79 -- a Curve suitable for IGES or is null
80
81 AddEntity (me : in out; ent : IGESEntity) returns Boolean;
82 ---Purpose : Adds an IGES entity (and the ones it references) to the model
83
84 ComputeModel (me : in out);
85 ---Purpose : Computes the entities found in
86 -- the model, which is ready to be written.
87 -- This contrasts with the default computation of headers only.
88
89 Write (me : in out; S : in out OStream; fnes : Boolean = Standard_False)
90 returns Boolean;
91 ---Purpose : Computes then writes the model to an OStream
92 -- Returns True when done, false in case of error
93
94 Write (me : in out; file : CString; fnes : Boolean = Standard_False)
95 returns Boolean;
96 ---Purpose : Prepares and writes an IGES model
97 -- either to an OStream, S or to a file name,CString.
98 -- Returns True if the operation was performed correctly and
99 -- False if an error occurred (for instance,
100 -- if the processor could not create the file).
101
102 PrintStatsTransfer (me; what : Integer; mode : Integer = 0);
103 ---Purpose : Prints Statistics about Transfer
104
105fields
106
107 theTP : FinderProcess;
108 themod : IGESModel;
109 thedit : BasicEditor from IGESData;
110 thecr : Integer; -- mode ecr
111 thest : Boolean; -- computed ?
112
113end Writer;