-- Created on: 2000-08-15 -- Created by: Andrey BETENEV -- Copyright (c) 2000-2012 OPEN CASCADE SAS -- -- The content of this file is subject to the Open CASCADE Technology Public -- License Version 6.5 (the "License"). You may not use the content of this file -- except in compliance with the License. Please obtain a copy of the License -- at http://www.opencascade.org and read it completely before using this file. -- -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -- -- The Original Code and all software distributed under the License is -- distributed on an "AS IS" basis, without warranty of any kind, and the -- Initial Developer hereby disclaims all such warranties, including without -- limitation, any warranties of merchantability, fitness for a particular -- purpose or non-infringement. Please see the License for the specific terms -- and conditions governing the rights and limitations under the License. class Reader from IGESCAFControl inherits Reader from IGESControl ---Purpose: Provides a tool to read IGES file and put it into -- DECAF document. Besides transfer of shapes (including -- assemblies) provided by IGESControl, supports also -- colors and part names -- IGESCAFControl_Reader reader; Methods for translation of an IGES file: -- reader.ReadFile("filename"); -- reader.Transfer(Document); or -- reader.Perform("filename",doc); -- Methods for managing reading attributes. -- Colors -- reader.SetColorMode(colormode); -- Standard_Boolean colormode = reader.GetColorMode(); -- Layers -- reader.SetLayerMode(layermode); -- Standard_Boolean layermode = reader.GetLayerMode(); -- Names -- reader.SetNameMode(namemode); -- Standard_Boolean namemode = reader.GetNameMode(); uses AsciiString from TCollection, WorkSession from XSControl, Document from TDocStd is Create returns Reader; ---Purpose: Creates a reader with an empty -- IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. Create (WS : mutable WorkSession from XSControl; scratch : Boolean = Standard_True) returns Reader; ---Purpose: Creates a reader tool and attaches it to an already existing Session -- Clears the session if it was not yet set for IGES Transfer (me: in out; doc: in out Document from TDocStd) returns Boolean; ---Purpose: Translates currently loaded IGES file into the document -- Returns True if succeeded, and False in case of fail Perform (me: in out; filename: AsciiString from TCollection; doc: in out Document from TDocStd) returns Boolean; Perform (me: in out; filename: CString; doc: in out Document from TDocStd) returns Boolean; ---Purpose: Translate IGES file given by filename into the document -- Return True if succeeded, and False in case of fail ---Scope: protected methods ReadColors (me; doc: in out Document from TDocStd) returns Boolean is protected; ---Purpose: Reads colors of IGES entities and sets -- corresponding color assignments in the DECAF document ReadNames (me; doc: in out Document from TDocStd) returns Boolean is protected; ---Purpose: Reads Names of IGES entities and sets -- corresponding name to label with shape in the DECAF document ReadLayers (me; doc: in out Document from TDocStd) returns Boolean is protected; ---Purpose: Reads layers of parts defined in the IGES model and -- set reference between shape and layers in the DECAF document --- Work with fileds for different mode of reading IGES file. SetColorMode(me: in out; colormode: Boolean from Standard); ---Purpose: Set ColorMode for indicate read Colors or not. GetColorMode(me) returns Boolean; SetNameMode(me: in out; namemode: Boolean from Standard); ---Purpose: Set NameMode for indicate read Name or not. GetNameMode(me) returns Boolean; SetLayerMode(me: in out; layermode: Boolean from Standard); ---Purpose: Set LayerMode for indicate read Layers or not. GetLayerMode(me) returns Boolean; fields myColorMode: Boolean; myNameMode: Boolean; myLayerMode: Boolean; end Reader;