b311480e |
1 | // Created by: CKY / Contract Toubro-Larsen |
2 | // Copyright (c) 1993-1999 Matra Datavision |
3 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | // |
5 | // The content of this file is subject to the Open CASCADE Technology Public |
6 | // License Version 6.5 (the "License"). You may not use the content of this file |
7 | // except in compliance with the License. Please obtain a copy of the License |
8 | // at http://www.opencascade.org and read it completely before using this file. |
7fd59977 |
9 | // |
b311480e |
10 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
7fd59977 |
12 | // |
b311480e |
13 | // The Original Code and all software distributed under the License is |
14 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | // Initial Developer hereby disclaims all such warranties, including without |
16 | // limitation, any warranties of merchantability, fitness for a particular |
17 | // purpose or non-infringement. Please see the License for the specific terms |
18 | // and conditions governing the rights and limitations under the License. |
19 | |
20 | //-------------------------------------------------------------------- |
7fd59977 |
21 | //-------------------------------------------------------------------- |
22 | |
23 | #include <IGESDimen_LinearDimension.ixx> |
24 | #include <Standard_OutOfRange.hxx> |
25 | |
26 | |
b311480e |
27 | IGESDimen_LinearDimension::IGESDimen_LinearDimension () { } |
7fd59977 |
28 | |
29 | |
30 | void IGESDimen_LinearDimension::Init |
31 | (const Handle(IGESDimen_GeneralNote)& aNote, |
32 | const Handle(IGESDimen_LeaderArrow)& aLeader, |
33 | const Handle(IGESDimen_LeaderArrow)& anotherLeader, |
34 | const Handle(IGESDimen_WitnessLine)& aWitness, |
35 | const Handle(IGESDimen_WitnessLine)& anotherWitness) |
36 | { |
37 | theNote = aNote; |
38 | theFirstLeader = aLeader; |
39 | theSecondLeader = anotherLeader; |
40 | theFirstWitness = aWitness; |
41 | theSecondWitness = anotherWitness; |
42 | InitTypeAndForm(216,FormNumber()); |
43 | // FormNumber : Nature of the Dimension 0-1-2 |
44 | } |
45 | |
46 | |
47 | void IGESDimen_LinearDimension::SetFormNumber (const Standard_Integer fm) |
48 | { |
49 | if (fm < 0 || fm > 2) Standard_OutOfRange::Raise |
50 | ("IGESDimen_LinearDimension : SetFormNumber"); |
51 | InitTypeAndForm(216,fm); |
52 | } |
53 | |
54 | |
55 | Handle(IGESDimen_GeneralNote) IGESDimen_LinearDimension::Note () const |
56 | { |
57 | return theNote; |
58 | } |
59 | |
60 | Handle(IGESDimen_LeaderArrow) IGESDimen_LinearDimension::FirstLeader () const |
61 | { |
62 | return theFirstLeader; |
63 | } |
64 | |
65 | Handle(IGESDimen_LeaderArrow) IGESDimen_LinearDimension::SecondLeader () const |
66 | { |
67 | return theSecondLeader; |
68 | } |
69 | |
70 | Standard_Boolean IGESDimen_LinearDimension::HasFirstWitness () const |
71 | { |
72 | return (! theFirstWitness.IsNull()); |
73 | } |
74 | |
75 | Handle(IGESDimen_WitnessLine) IGESDimen_LinearDimension::FirstWitness () const |
76 | { |
77 | return theFirstWitness; |
78 | } |
79 | |
80 | Standard_Boolean IGESDimen_LinearDimension::HasSecondWitness () const |
81 | { |
82 | return (! theSecondWitness.IsNull()); |
83 | } |
84 | |
85 | Handle(IGESDimen_WitnessLine) IGESDimen_LinearDimension::SecondWitness () const |
86 | { |
87 | return theSecondWitness; |
88 | } |