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