0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / IGESDraw / IGESDraw_ConnectPoint.cxx
1 // Created by: CKY / Contract Toubro-Larsen
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 //--------------------------------------------------------------------
17 //--------------------------------------------------------------------
18
19 #include <gp_GTrsf.hxx>
20 #include <gp_Pnt.hxx>
21 #include <gp_XYZ.hxx>
22 #include <IGESDraw_ConnectPoint.hxx>
23 #include <IGESGraph_TextDisplayTemplate.hxx>
24 #include <Standard_Type.hxx>
25 #include <TCollection_HAsciiString.hxx>
26
27 IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ConnectPoint,IGESData_IGESEntity)
28
29 IGESDraw_ConnectPoint::IGESDraw_ConnectPoint ()    {  }
30
31
32     void IGESDraw_ConnectPoint::Init
33   (const gp_XYZ&                                aPoint,
34    const Handle(IGESData_IGESEntity)&           aDisplaySymbol,
35    const Standard_Integer                       aTypeFlag,
36    const Standard_Integer                       aFunctionFlag,
37    const Handle(TCollection_HAsciiString)&      aFunctionIdentifier,
38    const Handle(IGESGraph_TextDisplayTemplate)& anIdentifierTemplate,
39    const Handle(TCollection_HAsciiString)&      aFunctionName,
40    const Handle(IGESGraph_TextDisplayTemplate)& aFunctionTemplate,
41    const Standard_Integer                       aPointIdentifier,
42    const Standard_Integer                       aFunctionCode,
43    const Standard_Integer                       aSwapFlag,
44    const Handle(IGESData_IGESEntity)&           anOwnerSubfigure)
45 {
46   thePoint              = aPoint;
47   theDisplaySymbol      = aDisplaySymbol;
48   theTypeFlag           = aTypeFlag;
49   theFunctionFlag       = aFunctionFlag;
50   theFunctionIdentifier = aFunctionIdentifier;
51   theIdentifierTemplate = anIdentifierTemplate;
52   theFunctionName       = aFunctionName;
53   theFunctionTemplate   = aFunctionTemplate;
54   thePointIdentifier    = aPointIdentifier;
55   theFunctionCode       = aFunctionCode;
56   theSwapFlag           = aSwapFlag != 0;
57   theOwnerSubfigure     = anOwnerSubfigure;
58   InitTypeAndForm(132,0);
59 }
60
61     gp_Pnt IGESDraw_ConnectPoint::Point () const
62 {
63   gp_Pnt tempPoint(thePoint);
64   return tempPoint;
65 }
66
67     gp_Pnt IGESDraw_ConnectPoint::TransformedPoint () const
68 {
69   gp_XYZ tempPoint = thePoint;
70   if (HasTransf()) Location().Transforms(tempPoint);
71   gp_Pnt tempRes(tempPoint);
72
73   return (tempRes);
74 }
75
76     Standard_Boolean IGESDraw_ConnectPoint::HasDisplaySymbol () const
77 {
78   return (! theDisplaySymbol.IsNull());
79 }
80
81     Handle(IGESData_IGESEntity) IGESDraw_ConnectPoint::DisplaySymbol () const
82 {
83   return theDisplaySymbol;
84 }
85
86     Standard_Integer IGESDraw_ConnectPoint::TypeFlag () const
87 {
88   return theTypeFlag;
89 }
90
91     Standard_Integer IGESDraw_ConnectPoint::FunctionFlag () const
92 {
93   return theFunctionFlag;
94 }
95
96     Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionIdentifier
97   () const
98 {
99   return theFunctionIdentifier;
100 }
101
102     Standard_Boolean IGESDraw_ConnectPoint::HasIdentifierTemplate () const
103 {
104   return (! theIdentifierTemplate.IsNull());
105 }
106
107     Handle(IGESGraph_TextDisplayTemplate)
108     IGESDraw_ConnectPoint::IdentifierTemplate () const
109 {
110   return theIdentifierTemplate;
111 }
112
113     Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionName () const
114 {
115   return theFunctionName;
116 }
117
118     Standard_Boolean IGESDraw_ConnectPoint::HasFunctionTemplate () const
119 {
120   return (! theFunctionTemplate.IsNull());
121 }
122
123     Handle(IGESGraph_TextDisplayTemplate)
124     IGESDraw_ConnectPoint::FunctionTemplate () const
125 {
126   return theFunctionTemplate;
127 }
128
129     Standard_Integer IGESDraw_ConnectPoint::PointIdentifier () const
130 {
131   return thePointIdentifier;
132 }
133
134     Standard_Integer IGESDraw_ConnectPoint::FunctionCode () const
135 {
136   return theFunctionCode;
137 }
138
139     Standard_Boolean IGESDraw_ConnectPoint::SwapFlag () const
140 {
141   return theSwapFlag;
142 }
143
144     Standard_Boolean IGESDraw_ConnectPoint::HasOwnerSubfigure () const
145 {
146   return (! theOwnerSubfigure.IsNull());
147 }
148
149     Handle(IGESData_IGESEntity)  IGESDraw_ConnectPoint::OwnerSubfigure () const
150 {
151   return theOwnerSubfigure;
152 }