b311480e |
1 | -- Created on: 1996-09-06 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Reader from IGESControl inherits Reader from XSControl |
18 | |
19 | ---Purpose : |
20 | -- Reads IGES files, checks them and translates their contents into Open CASCADE models. |
21 | -- The IGES data can be that of a whole model or that of a specific list of entities in the model. |
22 | -- As in XSControl_Reader, you specify the list using a selection. |
23 | -- For translation of iges files it is possible to use the following sequence: |
24 | -- To change parameters of translation |
25 | -- class Interface_Static should be used before the beginning of translation |
26 | -- (see IGES Parameters and General Parameters) |
27 | -- Creation of reader |
28 | -- IGESControl_Reader reader; |
29 | -- To load a file in a model use method: |
30 | -- reader.ReadFile("filename.igs") |
31 | -- To check a loading file use method Check: |
32 | -- reader.Check(failsonly); where failsonly is equal to Standard_True or |
33 | -- Standard_False; |
34 | -- To print the results of load: |
35 | -- reader.PrintCheckLoad(failsonly,mode) where mode is equal to the value of |
36 | -- enumeration IFSelect_PrintCount |
37 | -- To transfer entities from a model the following methods can be used: |
38 | -- for the whole model |
39 | -- reader.TransferRoots(onlyvisible); where onlyvisible is equal to |
40 | -- Standard_True or Standard_False; |
41 | -- To transfer a list of entities: |
42 | -- reader.TransferList(list); |
43 | -- To transfer one entity |
44 | -- reader.TransferEntity(ent) or reader.Transfer(num); |
45 | -- To obtain a result the following method can be used: |
46 | -- reader.IsDone() |
47 | -- reader.NbShapes() and reader.Shape(num); or reader.OneShape(); |
48 | -- To print the results of transfer use method: |
49 | -- reader.PrintTransferInfo(failwarn,mode); where printfail is equal to the |
50 | -- value of enumeration IFSelect_PrintFail, mode see above. |
51 | -- Gets correspondence between an IGES entity and a result shape obtained therefrom. |
52 | -- reader.TransientProcess(); |
53 | -- TopoDS_Shape shape = |
54 | -- TransferBRep::ShapeResult(reader.TransientProcess(),ent); |
55 | |
56 | |
57 | uses CString, HSequenceOfTransient from TColStd, |
58 | IGESModel from IGESData, |
59 | PrintFail from IFSelect, |
60 | PrintCount from IFSelect, |
61 | ReturnStatus from IFSelect, |
62 | WorkSession from XSControl |
63 | |
64 | is |
65 | |
66 | Create returns Reader from IGESControl; |
67 | ---Purpose : Creates a Reader from scratch |
68 | |
6e33d3ce |
69 | Create (WS : WorkSession from XSControl; |
7fd59977 |
70 | scratch : Boolean = Standard_True) |
71 | returns Reader from IGESControl; |
72 | ---Purpose : Creates a Reader from an already existing Session |
73 | |
74 | SetReadVisible(me: in out; ReadRoot: Boolean from Standard); |
75 | ---Purpose : Set the transion of ALL Roots (if theReadOnlyVisible is False) |
76 | -- or of Visible Roots (if theReadOnlyVisible is True) |
77 | ---C++: inline |
78 | |
79 | GetReadVisible(me) returns Boolean; |
80 | ---C++: inline |
81 | |
82 | IGESModel (me) returns IGESModel; |
83 | ---Purpose : Returns the model as a IGESModel. |
84 | -- It can then be consulted (header, product) |
85 | |
86 | |
87 | NbRootsForTransfer (me : in out) returns Integer is redefined; |
88 | ---Purpose : Determines the list of root entities from Model which are candidate for |
89 | -- a transfer to a Shape (type of entities is PRODUCT) |
90 | -- <theReadOnlyVisible> is taken into account to define roots |
91 | |
92 | PrintTransferInfo(me; failwarn: PrintFail from IFSelect; mode: PrintCount from IFSelect); |
93 | ---Purpose : Prints Statistics and check list for Transfer |
94 | |
95 | -- other methods are inherited from Reader in IGESToBRep |
96 | |
97 | fields |
98 | |
99 | theReadOnlyVisible : Boolean from Standard; |
100 | |
101 | end Reader; |