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 | |
7fd59977 |
19 | #include <gp_GTrsf.hxx> |
42cf5bc1 |
20 | #include <gp_Pnt.hxx> |
21 | #include <gp_XYZ.hxx> |
22 | #include <IGESData_IGESEntity.hxx> |
23 | #include <IGESDraw_ConnectPoint.hxx> |
24 | #include <IGESGraph_TextDisplayTemplate.hxx> |
25 | #include <Standard_Type.hxx> |
26 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
27 | |
92efcf78 |
28 | IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ConnectPoint,IGESData_IGESEntity) |
29 | |
b311480e |
30 | IGESDraw_ConnectPoint::IGESDraw_ConnectPoint () { } |
7fd59977 |
31 | |
32 | |
33 | void IGESDraw_ConnectPoint::Init |
34 | (const gp_XYZ& aPoint, |
35 | const Handle(IGESData_IGESEntity)& aDisplaySymbol, |
36 | const Standard_Integer aTypeFlag, |
37 | const Standard_Integer aFunctionFlag, |
38 | const Handle(TCollection_HAsciiString)& aFunctionIdentifier, |
39 | const Handle(IGESGraph_TextDisplayTemplate)& anIdentifierTemplate, |
40 | const Handle(TCollection_HAsciiString)& aFunctionName, |
41 | const Handle(IGESGraph_TextDisplayTemplate)& aFunctionTemplate, |
42 | const Standard_Integer aPointIdentifier, |
43 | const Standard_Integer aFunctionCode, |
44 | const Standard_Integer aSwapFlag, |
45 | const Handle(IGESData_IGESEntity)& anOwnerSubfigure) |
46 | { |
47 | thePoint = aPoint; |
48 | theDisplaySymbol = aDisplaySymbol; |
49 | theTypeFlag = aTypeFlag; |
50 | theFunctionFlag = aFunctionFlag; |
51 | theFunctionIdentifier = aFunctionIdentifier; |
52 | theIdentifierTemplate = anIdentifierTemplate; |
53 | theFunctionName = aFunctionName; |
54 | theFunctionTemplate = aFunctionTemplate; |
55 | thePointIdentifier = aPointIdentifier; |
56 | theFunctionCode = aFunctionCode; |
dde68833 |
57 | theSwapFlag = aSwapFlag != 0; |
7fd59977 |
58 | theOwnerSubfigure = anOwnerSubfigure; |
59 | InitTypeAndForm(132,0); |
60 | } |
61 | |
62 | gp_Pnt IGESDraw_ConnectPoint::Point () const |
63 | { |
64 | gp_Pnt tempPoint(thePoint); |
65 | return tempPoint; |
66 | } |
67 | |
68 | gp_Pnt IGESDraw_ConnectPoint::TransformedPoint () const |
69 | { |
70 | gp_XYZ tempPoint = thePoint; |
71 | if (HasTransf()) Location().Transforms(tempPoint); |
72 | gp_Pnt tempRes(tempPoint); |
73 | |
74 | return (tempRes); |
75 | } |
76 | |
77 | Standard_Boolean IGESDraw_ConnectPoint::HasDisplaySymbol () const |
78 | { |
79 | return (! theDisplaySymbol.IsNull()); |
80 | } |
81 | |
82 | Handle(IGESData_IGESEntity) IGESDraw_ConnectPoint::DisplaySymbol () const |
83 | { |
84 | return theDisplaySymbol; |
85 | } |
86 | |
87 | Standard_Integer IGESDraw_ConnectPoint::TypeFlag () const |
88 | { |
89 | return theTypeFlag; |
90 | } |
91 | |
92 | Standard_Integer IGESDraw_ConnectPoint::FunctionFlag () const |
93 | { |
94 | return theFunctionFlag; |
95 | } |
96 | |
97 | Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionIdentifier |
98 | () const |
99 | { |
100 | return theFunctionIdentifier; |
101 | } |
102 | |
103 | Standard_Boolean IGESDraw_ConnectPoint::HasIdentifierTemplate () const |
104 | { |
105 | return (! theIdentifierTemplate.IsNull()); |
106 | } |
107 | |
108 | Handle(IGESGraph_TextDisplayTemplate) |
109 | IGESDraw_ConnectPoint::IdentifierTemplate () const |
110 | { |
111 | return theIdentifierTemplate; |
112 | } |
113 | |
114 | Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionName () const |
115 | { |
116 | return theFunctionName; |
117 | } |
118 | |
119 | Standard_Boolean IGESDraw_ConnectPoint::HasFunctionTemplate () const |
120 | { |
121 | return (! theFunctionTemplate.IsNull()); |
122 | } |
123 | |
124 | Handle(IGESGraph_TextDisplayTemplate) |
125 | IGESDraw_ConnectPoint::FunctionTemplate () const |
126 | { |
127 | return theFunctionTemplate; |
128 | } |
129 | |
130 | Standard_Integer IGESDraw_ConnectPoint::PointIdentifier () const |
131 | { |
132 | return thePointIdentifier; |
133 | } |
134 | |
135 | Standard_Integer IGESDraw_ConnectPoint::FunctionCode () const |
136 | { |
137 | return theFunctionCode; |
138 | } |
139 | |
140 | Standard_Boolean IGESDraw_ConnectPoint::SwapFlag () const |
141 | { |
142 | return theSwapFlag; |
143 | } |
144 | |
145 | Standard_Boolean IGESDraw_ConnectPoint::HasOwnerSubfigure () const |
146 | { |
147 | return (! theOwnerSubfigure.IsNull()); |
148 | } |
149 | |
150 | Handle(IGESData_IGESEntity) IGESDraw_ConnectPoint::OwnerSubfigure () const |
151 | { |
152 | return theOwnerSubfigure; |
153 | } |