1 // Created on: 1993-01-11 2 // Created by: CKY / Contract Toubro-Larsen ( TCD ) 3 // Copyright (c) 1993-1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 8 // This library is free software; you can redistribute it and/or modify it under 9 // the terms of the GNU Lesser General Public License version 2.1 as published 10 // by the Free Software Foundation, with special exception defined in the file 11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 12 // distribution for complete text of the license and disclaimer of any warranty. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 #ifndef _IGESDraw_NetworkSubfigure_HeaderFile 18 #define _IGESDraw_NetworkSubfigure_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_Type.hxx> 22 23 #include <gp_XYZ.hxx> 24 #include <Standard_Integer.hxx> 25 #include <IGESDraw_HArray1OfConnectPoint.hxx> 26 #include <IGESData_IGESEntity.hxx> 27 #include <Standard_Boolean.hxx> 28 class IGESDraw_NetworkSubfigureDef; 29 class TCollection_HAsciiString; 30 class IGESGraph_TextDisplayTemplate; 31 class IGESDraw_ConnectPoint; 32 33 34 class IGESDraw_NetworkSubfigure; 35 DEFINE_STANDARD_HANDLE(IGESDraw_NetworkSubfigure, IGESData_IGESEntity) 36 37 //! defines IGES Network Subfigure Instance Entity, 38 //! Type <420> Form Number <0> in package IGESDraw 39 //! 40 //! Used to specify each instance of Network Subfigure 41 //! Definition Entity (Type 320, Form 0). 42 class IGESDraw_NetworkSubfigure : public IGESData_IGESEntity 43 { 44 45 public: 46 47 48 Standard_EXPORT IGESDraw_NetworkSubfigure(); 49 50 //! This method is used to set the fields of the class 51 //! NetworkSubfigure 52 //! - aDefinition : Network Subfigure Definition Entity 53 //! - aTranslation : Translation data relative to the model 54 //! space or the definition space 55 //! - aScaleFactor : Scale factors in the definition space 56 //! - aTypeFlag : Type flag 57 //! - aDesignator : Primary reference designator 58 //! - aTemplate : Primary reference designator Text 59 //! display Template Entity 60 //! - allConnectPoints : Associated Connect Point Entities 61 Standard_EXPORT void Init (const Handle(IGESDraw_NetworkSubfigureDef)& aDefinition, const gp_XYZ& aTranslation, const gp_XYZ& aScaleFactor, const Standard_Integer aTypeFlag, const Handle(TCollection_HAsciiString)& aDesignator, const Handle(IGESGraph_TextDisplayTemplate)& aTemplate, const Handle(IGESDraw_HArray1OfConnectPoint)& allConnectPoints); 62 63 //! returns Network Subfigure Definition Entity specified by this entity 64 Standard_EXPORT Handle(IGESDraw_NetworkSubfigureDef) SubfigureDefinition() const; 65 66 //! returns Translation Data relative to either model space or to 67 //! the definition space of a referring entity 68 Standard_EXPORT gp_XYZ Translation() const; 69 70 //! returns the Transformed Translation Data relative to either model 71 //! space or to the definition space of a referring entity 72 Standard_EXPORT gp_XYZ TransformedTranslation() const; 73 74 //! returns Scale factor in definition space(x, y, z axes) 75 Standard_EXPORT gp_XYZ ScaleFactors() const; 76 77 //! returns Type Flag which implements the distinction between Logical 78 //! design and Physical design data,and is required if both are present. 79 //! Type Flag = 0 : Not specified (default) 80 //! = 1 : Logical 81 //! = 2 : Physical 82 Standard_EXPORT Standard_Integer TypeFlag() const; 83 84 //! returns the primary reference designator 85 Standard_EXPORT Handle(TCollection_HAsciiString) ReferenceDesignator() const; 86 87 //! returns True if Text Display Template Entity is specified, 88 //! else False 89 Standard_EXPORT Standard_Boolean HasDesignatorTemplate() const; 90 91 //! returns primary reference designator Text Display Template Entity, 92 //! or null. If null, no Text Display Template Entity specified 93 Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) DesignatorTemplate() const; 94 95 //! returns the number of associated Connect Point Entities 96 Standard_EXPORT Standard_Integer NbConnectPoints() const; 97 98 //! returns the Index'th associated Connect point Entity 99 //! raises exception if Index <= 0 or Index > NbConnectPoints() 100 Standard_EXPORT Handle(IGESDraw_ConnectPoint) ConnectPoint (const Standard_Integer Index) const; 101 102 103 104 105 DEFINE_STANDARD_RTTIEXT(IGESDraw_NetworkSubfigure,IGESData_IGESEntity) 106 107 protected: 108 109 110 111 112 private: 113 114 115 Handle(IGESDraw_NetworkSubfigureDef) theSubfigureDefinition; 116 gp_XYZ theTranslation; 117 gp_XYZ theScaleFactor; 118 Standard_Integer theTypeFlag; 119 Handle(TCollection_HAsciiString) theDesignator; 120 Handle(IGESGraph_TextDisplayTemplate) theDesignatorTemplate; 121 Handle(IGESDraw_HArray1OfConnectPoint) theConnectPoints; 122 123 124 }; 125 126 127 128 129 130 131 132 #endif // _IGESDraw_NetworkSubfigure_HeaderFile 133