0023024: Update headers of OCCT files
[occt.git] / src / STEPControl / STEPControl_Writer.cdl
1 -- Created on: 1996-07-08
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
21
22
23 class Writer from STEPControl
24
25         ---Purpose : This class creates and writes
26         -- STEP files from Open CASCADE models. A STEP file can be
27         -- written to an existing STEP file or to a new one.
28         -- Translation can be performed in one or several operations. Each
29         -- translation operation outputs a distinct root entity in the STEP file.
30
31 uses
32
33     CString,
34     StepModel from StepData, WorkSession from XSControl,
35     ReturnStatus from IFSelect,
36     Shape from TopoDS,
37     StepModelType from STEPControl
38
39 is
40
41     Create returns Writer;
42     ---Purpose : Creates a Writer from scratch
43
44     Create (WS : mutable WorkSession from XSControl;
45                  scratch : Boolean = Standard_True) returns Writer;
46     ---Purpose : Creates a Writer from an already existing Session
47     --           If <scratch> is True (D), clears already recorded data
48
49     SetTolerance (me : in out; Tol : Real);
50     ---Purpose : Sets a length-measure value that
51     --           will be written to uncertainty-measure-with-unit
52     --           when the next shape is translated.
53
54     UnsetTolerance (me : in out);
55     ---Purpose : Unsets the tolerance formerly forced by SetTolerance
56
57     SetWS (me : in out; WS : mutable WorkSession from XSControl;
58                  scratch : Boolean = Standard_True);
59     ---Purpose : Sets a specific session to <me>
60
61     WS (me) returns WorkSession from XSControl;
62     ---Purpose : Returns the session used in <me>
63
64     Model (me : in out; newone : Boolean = Standard_False) returns StepModel;
65     ---Purpose : Returns the produced model. Produces a new one if not yet done
66     --           or if <newone> is True
67     --           This method allows for instance to edit product or header
68     --           data before writing.
69
70     Transfer (me : in out; sh : Shape from TopoDS;
71                            mode : StepModelType from STEPControl;
72                            compgraph : Boolean = Standard_True)
73         returns ReturnStatus;
74         ---Purpose : Translates shape sh to a STEP
75         -- entity. mode defines the STEP entity type to be output:
76         -- - STEPControlStd_AsIs translates a shape to its highest possible
77         --   STEP representation.
78         -- - STEPControlStd_ManifoldSolidBrep translates a shape to a STEP
79         --   manifold_solid_brep or brep_with_voids entity.
80         -- - STEPControlStd_FacetedBrep translates a shape into a STEP
81         --   faceted_brep entity.
82         -- - STEPControlStd_ShellBasedSurfaceModel translates a shape into a STEP
83         --   shell_based_surface_model entity.
84         -- - STEPControlStd_GeometricCurveSet translates a shape into a STEP
85         --   geometric_curve_set entity.
86   
87
88     Write (me : in out; filename : CString) returns ReturnStatus;
89         ---Purpose : Writes a STEP model in the file identified by filename.
90
91     PrintStatsTransfer (me; what : Integer; mode : Integer = 0);
92         ---Purpose :  Displays the statistics for the
93         -- last translation. what defines the kind of statistics that are displayed:
94         -- - 0 gives general statistics   (number of translated roots,
95         --   number of warnings, number of   fail messages),
96         -- - 1 gives root results,
97         -- - 2 gives statistics for all checked entities,
98         -- - 3 gives the list of translated entities,
99         -- - 4 gives warning and fail messages,
100         -- - 5 gives fail messages only.
101         --   mode is used according to the use of what. If what is 0, mode is
102         -- ignored. If what is 1, 2 or 3, mode defines the following:
103         -- - 0 lists the numbers of STEP entities in a STEP model,
104         -- - 1 gives the number, identifier, type and result type for each
105         --   STEP entity and/or its status (fail, warning, etc.),
106         -- - 2 gives maximum information for each STEP entity (i.e. checks),
107         -- - 3 gives the number of entities by the type of a STEP entity,
108         -- - 4 gives the number of of STEP entities per result type and/or status,
109         -- - 5 gives the number of pairs (STEP or result type and status),
110         -- - 6 gives the number of pairs (STEP or result type and status)
111         --   AND the list of entity numbers in the STEP model.
112
113 fields
114
115     thesession : WorkSession from XSControl;
116
117 end Writer;