1 -- Created on: 2000-08-15
2 -- Created by: Andrey BETENEV
3 -- Copyright (c) 2000-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class Reader from IGESCAFControl inherits Reader from IGESControl
18 ---Purpose: Provides a tool to read IGES file and put it into
19 -- DECAF document. Besides transfer of shapes (including
20 -- assemblies) provided by IGESControl, supports also
21 -- colors and part names
22 -- IGESCAFControl_Reader reader; Methods for translation of an IGES file:
23 -- reader.ReadFile("filename");
24 -- reader.Transfer(Document); or
25 -- reader.Perform("filename",doc);
26 -- Methods for managing reading attributes.
28 -- reader.SetColorMode(colormode);
29 -- Standard_Boolean colormode = reader.GetColorMode();
31 -- reader.SetLayerMode(layermode);
32 -- Standard_Boolean layermode = reader.GetLayerMode();
34 -- reader.SetNameMode(namemode);
35 -- Standard_Boolean namemode = reader.GetNameMode();
38 AsciiString from TCollection,
39 WorkSession from XSControl,
44 Create returns Reader;
45 ---Purpose: Creates a reader with an empty
46 -- IGES model and sets ColorMode, LayerMode and NameMode to Standard_True.
48 Create (WS : WorkSession from XSControl;
49 scratch : Boolean = Standard_True) returns Reader;
50 ---Purpose: Creates a reader tool and attaches it to an already existing Session
51 -- Clears the session if it was not yet set for IGES
53 Transfer (me: in out; doc: in out Document from TDocStd)
55 ---Purpose: Translates currently loaded IGES file into the document
56 -- Returns True if succeeded, and False in case of fail
58 Perform (me: in out; filename: AsciiString from TCollection;
59 doc: in out Document from TDocStd) returns Boolean;
61 Perform (me: in out; filename: CString; doc: in out Document from TDocStd)
63 ---Purpose: Translate IGES file given by filename into the document
64 -- Return True if succeeded, and False in case of fail
66 ---Scope: protected methods
68 ReadColors (me; doc: in out Document from TDocStd)
69 returns Boolean is protected;
70 ---Purpose: Reads colors of IGES entities and sets
71 -- corresponding color assignments in the DECAF document
73 ReadNames (me; doc: in out Document from TDocStd)
74 returns Boolean is protected;
75 ---Purpose: Reads Names of IGES entities and sets
76 -- corresponding name to label with shape in the DECAF document
78 ReadLayers (me; doc: in out Document from TDocStd)
79 returns Boolean is protected;
80 ---Purpose: Reads layers of parts defined in the IGES model and
81 -- set reference between shape and layers in the DECAF document
83 --- Work with fileds for different mode of reading IGES file.
85 SetColorMode(me: in out; colormode: Boolean from Standard);
86 ---Purpose: Set ColorMode for indicate read Colors or not.
88 GetColorMode(me) returns Boolean;
90 SetNameMode(me: in out; namemode: Boolean from Standard);
91 ---Purpose: Set NameMode for indicate read Name or not.
93 GetNameMode(me) returns Boolean;
95 SetLayerMode(me: in out; layermode: Boolean from Standard);
96 ---Purpose: Set LayerMode for indicate read Layers or not.
98 GetLayerMode(me) returns Boolean;
102 myColorMode: Boolean;
104 myLayerMode: Boolean;