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 | |
19 | #include <IGESDimen_DimensionDisplayData.ixx> |
20 | |
21 | |
b311480e |
22 | IGESDimen_DimensionDisplayData::IGESDimen_DimensionDisplayData () { } |
7fd59977 |
23 | |
24 | |
25 | void IGESDimen_DimensionDisplayData::Init |
26 | (const Standard_Integer numProps, |
27 | const Standard_Integer aDimType, const Standard_Integer aLabelPos, |
28 | const Standard_Integer aCharSet, |
29 | const Handle(TCollection_HAsciiString)& aString, |
30 | const Standard_Integer aSymbol, const Standard_Real anAng, |
31 | const Standard_Integer anAlign, const Standard_Integer aLevel, |
32 | const Standard_Integer aPlace, const Standard_Integer anOrient, |
33 | const Standard_Real initVal, |
34 | const Handle(TColStd_HArray1OfInteger)& notes, |
35 | const Handle(TColStd_HArray1OfInteger)& startInd, |
36 | const Handle(TColStd_HArray1OfInteger)& endInd) |
37 | { |
38 | if (!notes.IsNull()) |
39 | if (notes->Lower() != 1 || |
40 | (startInd->Lower() != 1 || notes->Length() != startInd->Length()) || |
41 | (endInd->Lower() != 1 || notes->Length() != endInd->Length()) ) |
42 | Standard_DimensionMismatch::Raise("IGESDimen_DimensionDisplayData : Init"); |
43 | |
44 | theNbPropertyValues = numProps; |
45 | theDimensionType = aDimType; |
46 | theLabelPosition = aLabelPos; |
47 | theCharacterSet = aCharSet; |
48 | theLString = aString; |
49 | theDecimalSymbol = aSymbol; |
50 | theWitnessLineAngle = anAng; |
51 | theTextAlignment = anAlign; |
52 | theTextLevel = aLevel; |
53 | theTextPlacement = aPlace; |
54 | theArrowHeadOrientation = anOrient; |
55 | theInitialValue = initVal; |
56 | theSupplementaryNotes = notes; |
57 | theStartIndex = startInd; |
58 | theEndIndex = endInd; |
59 | InitTypeAndForm(406,30); |
60 | } |
61 | |
62 | |
63 | Standard_Integer IGESDimen_DimensionDisplayData::NbPropertyValues () const |
64 | { |
65 | return theNbPropertyValues; |
66 | } |
67 | |
68 | Standard_Integer IGESDimen_DimensionDisplayData::DimensionType () const |
69 | { |
70 | return theDimensionType; |
71 | } |
72 | |
73 | Standard_Integer IGESDimen_DimensionDisplayData::LabelPosition () const |
74 | { |
75 | return theLabelPosition; |
76 | } |
77 | |
78 | Standard_Integer IGESDimen_DimensionDisplayData::CharacterSet () const |
79 | { |
80 | return theCharacterSet; |
81 | } |
82 | |
83 | Handle(TCollection_HAsciiString) IGESDimen_DimensionDisplayData::LString () const |
84 | { |
85 | return theLString; |
86 | } |
87 | |
88 | Standard_Integer IGESDimen_DimensionDisplayData::DecimalSymbol () const |
89 | { |
90 | return theDecimalSymbol; |
91 | } |
92 | |
93 | Standard_Real IGESDimen_DimensionDisplayData::WitnessLineAngle () const |
94 | { |
95 | return theWitnessLineAngle; |
96 | } |
97 | |
98 | Standard_Integer IGESDimen_DimensionDisplayData::TextAlignment () const |
99 | { |
100 | return theTextAlignment; |
101 | } |
102 | |
103 | Standard_Integer IGESDimen_DimensionDisplayData::TextLevel () const |
104 | { |
105 | return theTextLevel; |
106 | } |
107 | |
108 | Standard_Integer IGESDimen_DimensionDisplayData::TextPlacement () const |
109 | { |
110 | return theTextPlacement; |
111 | } |
112 | |
113 | Standard_Integer IGESDimen_DimensionDisplayData::ArrowHeadOrientation () const |
114 | { |
115 | return theArrowHeadOrientation; |
116 | } |
117 | |
118 | Standard_Real IGESDimen_DimensionDisplayData::InitialValue () const |
119 | { |
120 | return theInitialValue; |
121 | } |
122 | |
123 | Standard_Integer IGESDimen_DimensionDisplayData::NbSupplementaryNotes () const |
124 | { |
125 | return (theSupplementaryNotes.IsNull() ? 0 : theSupplementaryNotes->Length()); |
126 | } |
127 | |
128 | Standard_Integer IGESDimen_DimensionDisplayData::SupplementaryNote |
129 | (const Standard_Integer num) const |
130 | { |
131 | return theSupplementaryNotes->Value(num); |
132 | } |
133 | |
134 | Standard_Integer IGESDimen_DimensionDisplayData::StartIndex |
135 | (const Standard_Integer num) const |
136 | { |
137 | return theStartIndex->Value(num); |
138 | } |
139 | |
140 | Standard_Integer IGESDimen_DimensionDisplayData::EndIndex |
141 | (const Standard_Integer num) const |
142 | { |
143 | return theEndIndex->Value(num); |
144 | } |