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 | // |
973c2be1 |
7 | // This library is free software; you can redistribute it and / or modify it |
8 | // under the terms of the GNU Lesser General Public version 2.1 as published |
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_LinearDimension.ixx> |
20 | #include <Standard_OutOfRange.hxx> |
21 | |
22 | |
b311480e |
23 | IGESDimen_LinearDimension::IGESDimen_LinearDimension () { } |
7fd59977 |
24 | |
25 | |
26 | void IGESDimen_LinearDimension::Init |
27 | (const Handle(IGESDimen_GeneralNote)& aNote, |
28 | const Handle(IGESDimen_LeaderArrow)& aLeader, |
29 | const Handle(IGESDimen_LeaderArrow)& anotherLeader, |
30 | const Handle(IGESDimen_WitnessLine)& aWitness, |
31 | const Handle(IGESDimen_WitnessLine)& anotherWitness) |
32 | { |
33 | theNote = aNote; |
34 | theFirstLeader = aLeader; |
35 | theSecondLeader = anotherLeader; |
36 | theFirstWitness = aWitness; |
37 | theSecondWitness = anotherWitness; |
38 | InitTypeAndForm(216,FormNumber()); |
39 | // FormNumber : Nature of the Dimension 0-1-2 |
40 | } |
41 | |
42 | |
43 | void IGESDimen_LinearDimension::SetFormNumber (const Standard_Integer fm) |
44 | { |
45 | if (fm < 0 || fm > 2) Standard_OutOfRange::Raise |
46 | ("IGESDimen_LinearDimension : SetFormNumber"); |
47 | InitTypeAndForm(216,fm); |
48 | } |
49 | |
50 | |
51 | Handle(IGESDimen_GeneralNote) IGESDimen_LinearDimension::Note () const |
52 | { |
53 | return theNote; |
54 | } |
55 | |
56 | Handle(IGESDimen_LeaderArrow) IGESDimen_LinearDimension::FirstLeader () const |
57 | { |
58 | return theFirstLeader; |
59 | } |
60 | |
61 | Handle(IGESDimen_LeaderArrow) IGESDimen_LinearDimension::SecondLeader () const |
62 | { |
63 | return theSecondLeader; |
64 | } |
65 | |
66 | Standard_Boolean IGESDimen_LinearDimension::HasFirstWitness () const |
67 | { |
68 | return (! theFirstWitness.IsNull()); |
69 | } |
70 | |
71 | Handle(IGESDimen_WitnessLine) IGESDimen_LinearDimension::FirstWitness () const |
72 | { |
73 | return theFirstWitness; |
74 | } |
75 | |
76 | Standard_Boolean IGESDimen_LinearDimension::HasSecondWitness () const |
77 | { |
78 | return (! theSecondWitness.IsNull()); |
79 | } |
80 | |
81 | Handle(IGESDimen_WitnessLine) IGESDimen_LinearDimension::SecondWitness () const |
82 | { |
83 | return theSecondWitness; |
84 | } |