1 -- Created on: 1992-04-06
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class IGESReaderData from IGESData inherits FileReaderData
19 ---Purpose : specific FileReaderData for IGES
20 -- contains header as GlobalSection, and for each Entity, its
21 -- directory part as DirPart, list of Parameters as ParamSet
22 -- Each Item has a DirPart, plus classically a ParamSet and the
23 -- correspondant recognized Entity (inherited from FileReaderData)
24 -- Parameters are accessed through specific objects, ParamReaders
26 uses Integer, Boolean, CString, HAsciiString, HSequenceOfHAsciiString,
27 ParamType, ParamSet, Check,
28 GlobalSection, DirPart, Array1OfDirPart, IGESType, ReadStage
32 Create (nbe,nbp : Integer) returns IGESReaderData;
33 ---Purpose : creates IGESReaderData correctly dimensionned (for arrays)
34 -- <nbe> count of entities, that is, half nb of directory lines
35 -- <nbp> : count of parameters
37 AddStartLine (me : mutable; aval : CString);
38 ---Purpose : adds a start line to start section
40 StartSection (me) returns HSequenceOfHAsciiString;
41 ---Purpose : Returns the Start Section in once
43 AddGlobal (me : mutable; atype : ParamType; aval : CString);
44 ---Purpose : adds a parameter to global section's parameter list
46 SetGlobalSection (me : mutable);
47 ---Purpose : reads header (as GlobalSection) content from the ParamSet
48 -- after it has been filled by successive calls to AddGlobal
50 GlobalSection (me) returns GlobalSection;
51 ---Purpose : returns header as GlobalSection
52 ---C++ : return const &
54 SetDirPart (me : mutable; num : Integer;
55 i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17 : Integer;
56 res1,res2,label,subs : CString);
57 ---Purpose : fills a DirPart, designated by its rank (that is, (N+1)/2 if N
58 -- is its first number in section D)
60 DirPart (me; num : Integer) returns DirPart;
61 ---Purpose : returns DirPart identified by record no (half Dsect number)
62 ---C++ : return const &
64 DirValues (me; num : Integer;
65 i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17 : out Integer;
66 res1,res2,label,subs : out CString);
67 ---Purpose : returns values recorded in directory part n0 <num>
69 DirType (me; num : Integer) returns IGESType;
70 ---Purpose : returns "type" and "form" info from a directory part
74 NbEntities (me) returns Integer is redefined;
75 ---Purpose : Returns count of recorded Entities (i.e. size of Directory)
77 FindNextRecord (me; num : Integer) returns Integer;
78 ---Purpose : determines next suitable record from num; that is num+1 except
79 -- for last one which gives 0
81 SetEntityNumbers (me : mutable);
82 ---Purpose : determines reference numbers in EntityNumber fields (called by
83 -- SetEntities from IGESReaderTool)
84 -- works on "Integer" type Parameters, because IGES does not
85 -- distinguish Integer and Entity Refs : every Integer which is
86 -- odd and less than twice NbRecords can be an Entity Ref ...
87 -- (Ref Number is then (N+1)/2 if N is the Integer Value)
89 -- Loading the IGESModel --
91 GlobalCheck (me) returns Check;
92 ---Purpose : Returns the recorded Global Check
94 SetDefaultLineWeight (me : mutable; defw : Real);
95 ---Purpose : allows to set a default line weight, will be later applied at
96 -- load time, on Entities which have no specified line weight
98 DefaultLineWeight (me) returns Real;
99 ---Purpose : Returns the recorded Default Line Weight, if there is
104 thectyp : IGESType; -- its IGESType (for purpose of optimization)
105 thestar : HSequenceOfHAsciiString; -- start section
106 theparh : ParamSet; -- ParamSet reading global parameters
107 thehead : GlobalSection;
108 thedirs : Array1OfDirPart;
109 thestep : ReadStage; -- to continue an interrupted party
110 thedefw : Real; -- default line weight (if desired)
111 thechk : Check; -- check on header (kept by IGESModel)