b311480e |
1 | // Created by: CKY / Contract Toubro-Larsen |
2 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
3 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
7fd59977 |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
7fd59977 |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
16 | //-------------------------------------------------------------------- |
7fd59977 |
17 | //-------------------------------------------------------------------- |
18 | |
42cf5bc1 |
19 | #include <IGESData_DirChecker.hxx> |
20 | #include <IGESData_IGESDumper.hxx> |
7fd59977 |
21 | #include <IGESData_IGESEntity.hxx> |
42cf5bc1 |
22 | #include <IGESData_IGESReaderData.hxx> |
23 | #include <IGESData_IGESWriter.hxx> |
24 | #include <IGESData_ParamCursor.hxx> |
25 | #include <IGESData_ParamReader.hxx> |
26 | #include <IGESSolid_SolidInstance.hxx> |
27 | #include <IGESSolid_ToolSolidInstance.hxx> |
28 | #include <Interface_Check.hxx> |
29 | #include <Interface_CopyTool.hxx> |
30 | #include <Interface_EntityIterator.hxx> |
7fd59977 |
31 | #include <Interface_Macros.hxx> |
42cf5bc1 |
32 | #include <Interface_ShareTool.hxx> |
7fd59977 |
33 | #include <Message_Messenger.hxx> |
42cf5bc1 |
34 | #include <Standard_DomainError.hxx> |
7fd59977 |
35 | |
36 | IGESSolid_ToolSolidInstance::IGESSolid_ToolSolidInstance () { } |
37 | |
38 | |
39 | void IGESSolid_ToolSolidInstance::ReadOwnParams |
40 | (const Handle(IGESSolid_SolidInstance)& ent, |
41 | const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const |
42 | { |
43 | Handle(IGESData_IGESEntity) tempEntity; |
44 | //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed |
45 | |
46 | PR.ReadEntity(IR, PR.Current(), "Solid Entity", tempEntity); //szv#4:S4163:12Mar99 `st=` not needed |
47 | |
48 | DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent); |
49 | ent->Init(tempEntity); |
50 | } |
51 | |
52 | void IGESSolid_ToolSolidInstance::WriteOwnParams |
53 | (const Handle(IGESSolid_SolidInstance)& ent, IGESData_IGESWriter& IW) const |
54 | { |
55 | IW.Send(ent->Entity()); |
56 | } |
57 | |
58 | void IGESSolid_ToolSolidInstance::OwnShared |
59 | (const Handle(IGESSolid_SolidInstance)& ent, Interface_EntityIterator& iter) const |
60 | { |
61 | iter.GetOneItem(ent->Entity()); |
62 | } |
63 | |
64 | void IGESSolid_ToolSolidInstance::OwnCopy |
65 | (const Handle(IGESSolid_SolidInstance)& another, |
66 | const Handle(IGESSolid_SolidInstance)& ent, Interface_CopyTool& TC) const |
67 | { |
68 | DeclareAndCast(IGESData_IGESEntity, tempEntity, |
69 | TC.Transferred(another->Entity())); |
70 | ent->Init (tempEntity); |
71 | } |
72 | |
73 | IGESData_DirChecker IGESSolid_ToolSolidInstance::DirChecker |
74 | (const Handle(IGESSolid_SolidInstance)& /*ent*/) const |
75 | { |
76 | IGESData_DirChecker DC(430, 0,1); |
77 | |
78 | DC.Structure (IGESData_DefVoid); |
79 | DC.LineFont (IGESData_DefAny); |
80 | DC.Color (IGESData_DefAny); |
81 | |
82 | DC.GraphicsIgnored (1); |
83 | return DC; |
84 | } |
85 | |
86 | void IGESSolid_ToolSolidInstance::OwnCheck |
87 | (const Handle(IGESSolid_SolidInstance)& /*ent*/, |
88 | const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const |
89 | { |
90 | } |
91 | |
92 | void IGESSolid_ToolSolidInstance::OwnDump |
93 | (const Handle(IGESSolid_SolidInstance)& ent, const IGESData_IGESDumper& dumper, |
0ebe5b0a |
94 | Standard_OStream& S, const Standard_Integer level) const |
7fd59977 |
95 | { |
0ebe5b0a |
96 | S << "IGESSolid_SolidInstance\n" |
97 | << "Solid entity : "; |
7fd59977 |
98 | dumper.Dump(ent->Entity(),S, (level <= 4) ? 0 : 1); |
0ebe5b0a |
99 | S << std::endl; |
7fd59977 |
100 | } |