1 // Created by: CKY / Contract Toubro-Larsen
2 // Copyright (c) 1993-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 //--------------------------------------------------------------------
17 //--------------------------------------------------------------------
19 #include <gp_GTrsf.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>
28 IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ConnectPoint,IGESData_IGESEntity)
30 IGESDraw_ConnectPoint::IGESDraw_ConnectPoint () { }
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)
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;
57 theSwapFlag = aSwapFlag != 0;
58 theOwnerSubfigure = anOwnerSubfigure;
59 InitTypeAndForm(132,0);
62 gp_Pnt IGESDraw_ConnectPoint::Point () const
64 gp_Pnt tempPoint(thePoint);
68 gp_Pnt IGESDraw_ConnectPoint::TransformedPoint () const
70 gp_XYZ tempPoint = thePoint;
71 if (HasTransf()) Location().Transforms(tempPoint);
72 gp_Pnt tempRes(tempPoint);
77 Standard_Boolean IGESDraw_ConnectPoint::HasDisplaySymbol () const
79 return (! theDisplaySymbol.IsNull());
82 Handle(IGESData_IGESEntity) IGESDraw_ConnectPoint::DisplaySymbol () const
84 return theDisplaySymbol;
87 Standard_Integer IGESDraw_ConnectPoint::TypeFlag () const
92 Standard_Integer IGESDraw_ConnectPoint::FunctionFlag () const
94 return theFunctionFlag;
97 Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionIdentifier
100 return theFunctionIdentifier;
103 Standard_Boolean IGESDraw_ConnectPoint::HasIdentifierTemplate () const
105 return (! theIdentifierTemplate.IsNull());
108 Handle(IGESGraph_TextDisplayTemplate)
109 IGESDraw_ConnectPoint::IdentifierTemplate () const
111 return theIdentifierTemplate;
114 Handle(TCollection_HAsciiString) IGESDraw_ConnectPoint::FunctionName () const
116 return theFunctionName;
119 Standard_Boolean IGESDraw_ConnectPoint::HasFunctionTemplate () const
121 return (! theFunctionTemplate.IsNull());
124 Handle(IGESGraph_TextDisplayTemplate)
125 IGESDraw_ConnectPoint::FunctionTemplate () const
127 return theFunctionTemplate;
130 Standard_Integer IGESDraw_ConnectPoint::PointIdentifier () const
132 return thePointIdentifier;
135 Standard_Integer IGESDraw_ConnectPoint::FunctionCode () const
137 return theFunctionCode;
140 Standard_Boolean IGESDraw_ConnectPoint::SwapFlag () const
145 Standard_Boolean IGESDraw_ConnectPoint::HasOwnerSubfigure () const
147 return (! theOwnerSubfigure.IsNull());
150 Handle(IGESData_IGESEntity) IGESDraw_ConnectPoint::OwnerSubfigure () const
152 return theOwnerSubfigure;