1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
//--------------------------------------------------------------------
//
// File Name : IGESDimen_LinearDimension.cxx
// Date :
// Author : CKY / Contract Toubro-Larsen
// Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------
#include <IGESDimen_ToolLinearDimension.ixx>
#include <IGESData_ParamCursor.hxx>
#include <IGESDimen_GeneralNote.hxx>
#include <IGESDimen_LeaderArrow.hxx>
#include <IGESDimen_WitnessLine.hxx>
#include <Interface_Macros.hxx>
IGESDimen_ToolLinearDimension::IGESDimen_ToolLinearDimension () { }
void IGESDimen_ToolLinearDimension::ReadOwnParams
(const Handle(IGESDimen_LinearDimension)& ent,
const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const
{
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
Handle(IGESDimen_GeneralNote) note;
Handle(IGESDimen_LeaderArrow) firstLeader;
Handle(IGESDimen_LeaderArrow) secondLeader;
Handle(IGESDimen_WitnessLine) firstWitness;
Handle(IGESDimen_WitnessLine) secondWitness;
PR.ReadEntity(IR, PR.Current(), "General Note Entity",
STANDARD_TYPE(IGESDimen_GeneralNote),note); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(), "First Leader Entity",
STANDARD_TYPE(IGESDimen_LeaderArrow), firstLeader); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(),"Second Leader Entity",
STANDARD_TYPE(IGESDimen_LeaderArrow), secondLeader); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR, PR.Current(), "First Witness Entity",
STANDARD_TYPE(IGESDimen_WitnessLine), firstWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
PR.ReadEntity(IR,PR.Current(),"Second Witness Entity",
STANDARD_TYPE(IGESDimen_WitnessLine), secondWitness, Standard_True); //szv#4:S4163:12Mar99 `st=` not needed
DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
ent->Init (note, firstLeader, secondLeader, firstWitness, secondWitness);
}
void IGESDimen_ToolLinearDimension::WriteOwnParams
(const Handle(IGESDimen_LinearDimension)& ent, IGESData_IGESWriter& IW) const
{
IW.Send(ent->Note());
IW.Send(ent->FirstLeader());
IW.Send(ent->SecondLeader());
IW.Send(ent->FirstWitness());
IW.Send(ent->SecondWitness());
}
void IGESDimen_ToolLinearDimension::OwnShared
(const Handle(IGESDimen_LinearDimension)& ent, Interface_EntityIterator& iter) const
{
iter.GetOneItem(ent->Note());
iter.GetOneItem(ent->FirstLeader());
iter.GetOneItem(ent->SecondLeader());
iter.GetOneItem(ent->FirstWitness());
iter.GetOneItem(ent->SecondWitness());
}
void IGESDimen_ToolLinearDimension::OwnCopy
(const Handle(IGESDimen_LinearDimension)& another,
const Handle(IGESDimen_LinearDimension)& ent, Interface_CopyTool& TC) const
{
DeclareAndCast(IGESDimen_GeneralNote, note,
TC.Transferred(another->Note()));
DeclareAndCast(IGESDimen_LeaderArrow, firstLeader,
TC.Transferred(another->FirstLeader()));
DeclareAndCast(IGESDimen_LeaderArrow, secondLeader,
TC.Transferred(another->SecondLeader()));
DeclareAndCast(IGESDimen_WitnessLine, firstWitness,
TC.Transferred(another->FirstWitness()));
DeclareAndCast(IGESDimen_WitnessLine, secondWitness,
TC.Transferred(another->SecondWitness()));
ent->Init(note, firstLeader, secondLeader, firstWitness, secondWitness);
ent->SetFormNumber (another->FormNumber());
}
IGESData_DirChecker IGESDimen_ToolLinearDimension::DirChecker
(const Handle(IGESDimen_LinearDimension)& /*ent*/) const
{
IGESData_DirChecker DC (216, 0, 2);
DC.Structure(IGESData_DefVoid);
DC.LineFont(IGESData_DefAny);
DC.LineWeight(IGESData_DefValue);
DC.Color(IGESData_DefAny);
DC.UseFlagRequired(1);
return DC;
}
void IGESDimen_ToolLinearDimension::OwnCheck
(const Handle(IGESDimen_LinearDimension)& /*ent*/,
const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const
{
}
void IGESDimen_ToolLinearDimension::OwnDump
(const Handle(IGESDimen_LinearDimension)& ent, const IGESData_IGESDumper& dumper,
const Handle(Message_Messenger)& S, const Standard_Integer level) const
{
Standard_Integer sublevel = (level > 4) ? 1 : 0;
S << "IGESDimen_LinearDimension" << endl;
if (ent->FormNumber() == 0) S << " (Undetermined Form)" << endl;
else if (ent->FormNumber() == 1) S << " (Diameter Form)" << endl;
else if (ent->FormNumber() == 2) S << " (Radius Form)" << endl;
S << "General Note Entity : ";
dumper.Dump(ent->Note(),S, sublevel);
S << endl;
S << "First Leader Entity : ";
dumper.Dump(ent->FirstLeader(),S, sublevel);
S << endl;
S << "Second Leader Entity : ";
dumper.Dump(ent->SecondLeader(),S, sublevel);
S << endl;
S << "First Witness Entity : ";
dumper.Dump(ent->FirstWitness(),S, sublevel);
S << endl;
S << "Second Witness Entity : ";
dumper.Dump(ent->SecondWitness(),S, sublevel);
S << endl;
}
|