1 -- File: IGESControl_Reader.cdl
2 -- Created: Fri Sep 6 09:18:33 1996
3 -- Author: Christian CAILLET
4 -- <cky@fidox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1996
8 class Reader from IGESControl inherits Reader from XSControl
11 -- Reads IGES files, checks them and translates their contents into Open CASCADE models.
12 -- The IGES data can be that of a whole model or that of a specific list of entities in the model.
13 -- As in XSControl_Reader, you specify the list using a selection.
14 -- For translation of iges files it is possible to use the following sequence:
15 -- To change parameters of translation
16 -- class Interface_Static should be used before the beginning of translation
17 -- (see IGES Parameters and General Parameters)
19 -- IGESControl_Reader reader;
20 -- To load a file in a model use method:
21 -- reader.ReadFile("filename.igs")
22 -- To check a loading file use method Check:
23 -- reader.Check(failsonly); where failsonly is equal to Standard_True or
25 -- To print the results of load:
26 -- reader.PrintCheckLoad(failsonly,mode) where mode is equal to the value of
27 -- enumeration IFSelect_PrintCount
28 -- To transfer entities from a model the following methods can be used:
29 -- for the whole model
30 -- reader.TransferRoots(onlyvisible); where onlyvisible is equal to
31 -- Standard_True or Standard_False;
32 -- To transfer a list of entities:
33 -- reader.TransferList(list);
34 -- To transfer one entity
35 -- reader.TransferEntity(ent) or reader.Transfer(num);
36 -- To obtain a result the following method can be used:
38 -- reader.NbShapes() and reader.Shape(num); or reader.OneShape();
39 -- To print the results of transfer use method:
40 -- reader.PrintTransferInfo(failwarn,mode); where printfail is equal to the
41 -- value of enumeration IFSelect_PrintFail, mode see above.
42 -- Gets correspondence between an IGES entity and a result shape obtained therefrom.
43 -- reader.TransientProcess();
44 -- TopoDS_Shape shape =
45 -- TransferBRep::ShapeResult(reader.TransientProcess(),ent);
48 uses CString, HSequenceOfTransient from TColStd,
49 IGESModel from IGESData,
50 PrintFail from IFSelect,
51 PrintCount from IFSelect,
52 ReturnStatus from IFSelect,
53 WorkSession from XSControl
57 Create returns Reader from IGESControl;
58 ---Purpose : Creates a Reader from scratch
60 Create (WS : mutable WorkSession from XSControl;
61 scratch : Boolean = Standard_True)
62 returns Reader from IGESControl;
63 ---Purpose : Creates a Reader from an already existing Session
65 SetReadVisible(me: in out; ReadRoot: Boolean from Standard);
66 ---Purpose : Set the transion of ALL Roots (if theReadOnlyVisible is False)
67 -- or of Visible Roots (if theReadOnlyVisible is True)
70 GetReadVisible(me) returns Boolean;
73 IGESModel (me) returns IGESModel;
74 ---Purpose : Returns the model as a IGESModel.
75 -- It can then be consulted (header, product)
78 NbRootsForTransfer (me : in out) returns Integer is redefined;
79 ---Purpose : Determines the list of root entities from Model which are candidate for
80 -- a transfer to a Shape (type of entities is PRODUCT)
81 -- <theReadOnlyVisible> is taken into account to define roots
83 PrintTransferInfo(me; failwarn: PrintFail from IFSelect; mode: PrintCount from IFSelect);
84 ---Purpose : Prints Statistics and check list for Transfer
86 -- other methods are inherited from Reader in IGESToBRep
90 theReadOnlyVisible : Boolean from Standard;