SALOME - SMESH
|
00001 // SMESH SMESH_MeshVSLink : Connection of SMESH with MeshVS from OCC 00002 // 00003 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 // File : SMESH_MeshVSLink.cxx 00023 // Created : Mon Dec 1 09:00:00 2008 00024 // Author : Sioutis Fotios 00025 // Module : SMESH 00026 00027 #ifndef _SMESH_MeshVSLink_HeaderFile 00028 #define _SMESH_MeshVSLink_HeaderFile 00029 00030 #ifndef _Standard_HeaderFile 00031 #include <Standard.hxx> 00032 #endif 00033 #ifndef _Handle_SMESH_MeshVSLink_HeaderFile 00034 #include <Handle_SMESH_MeshVSLink.hxx> 00035 #endif 00036 #ifndef _TColStd_PackedMapOfInteger_HeaderFile 00037 #include <TColStd_PackedMapOfInteger.hxx> 00038 #endif 00039 #ifndef _Handle_TColStd_HArray2OfInteger_HeaderFile 00040 #include <Handle_TColStd_HArray2OfInteger.hxx> 00041 #endif 00042 #ifndef _Handle_TColStd_HArray2OfReal_HeaderFile 00043 #include <Handle_TColStd_HArray2OfReal.hxx> 00044 #endif 00045 #ifndef _MeshVS_DataSource3D_HeaderFile 00046 #include <MeshVS_DataSource3D.hxx> 00047 #endif 00048 #ifndef _Standard_Boolean_HeaderFile 00049 #include <Standard_Boolean.hxx> 00050 #endif 00051 #ifndef _Standard_Integer_HeaderFile 00052 #include <Standard_Integer.hxx> 00053 #endif 00054 #ifndef _MeshVS_EntityType_HeaderFile 00055 #include <MeshVS_EntityType.hxx> 00056 #endif 00057 #ifndef _Standard_Address_HeaderFile 00058 #include <Standard_Address.hxx> 00059 #endif 00060 #ifndef _Handle_TColStd_HArray1OfInteger_HeaderFile 00061 #include <Handle_TColStd_HArray1OfInteger.hxx> 00062 #endif 00063 #ifndef _Standard_Real_HeaderFile 00064 #include <Standard_Real.hxx> 00065 #endif 00066 #ifndef _SMESH_Mesh_HeaderFile 00067 #include <SMESH_Mesh.hxx> 00068 #endif 00069 00070 class SMESH_MeshVSLink : public MeshVS_DataSource3D { 00071 00072 public: 00073 // Methods PUBLIC 00074 // 00075 00077 Standard_EXPORT SMESH_MeshVSLink(const SMESH_Mesh *aMesh); 00078 00079 //Not implemented yet 00080 /* 00081 00082 Standard_EXPORT Standard_Boolean GetNodeNormal(const Standard_Integer ranknode,const Standard_Integer ElementId,Standard_Real& nx,Standard_Real& ny,Standard_Real& nz) const; 00083 Standard_EXPORT Standard_Boolean GetNormalsByElement(const Standard_Integer Id,const Standard_Boolean IsNodal,const Standard_Integer MaxNodes,Handle(TColStd_HArray1OfReal)& Normals) const; 00084 Standard_EXPORT void GetAllGroups(TColStd_PackedMapOfInteger& Ids) const; 00085 Standard_EXPORT Standard_Boolean GetGroup(const Standard_Integer Id,MeshVS_EntityType& Type,TColStd_PackedMapOfInteger& Ids) const; 00086 Standard_EXPORT Standard_Address GetGroupAddr(const Standard_Integer ID) const; 00087 Standard_EXPORT Standard_Boolean IsAdvancedSelectionEnabled() const; 00088 Standard_EXPORT Bnd_Box GetBoundingBox() const; 00089 Standard_EXPORT Standard_Boolean GetDetectedEntities(const Handle(MeshVS_Mesh)& Prs,const Standard_Real X,const Standard_Real Y,const Standard_Real aTol,Handle(TColStd_HPackedMapOfInteger)& Nodes,Handle(TColStd_HPackedMapOfInteger)& Elements) ; 00090 Standard_EXPORT Standard_Boolean GetDetectedEntities(const Handle(MeshVS_Mesh)& Prs,const Standard_Real XMin,const Standard_Real YMin,const Standard_Real XMax,const Standard_Real YMax,const Standard_Real aTol,Handle(TColStd_HPackedMapOfInteger)& Nodes,Handle(TColStd_HPackedMapOfInteger)& Elements) ; 00091 Standard_EXPORT Standard_Boolean GetDetectedEntities(const Handle(MeshVS_Mesh)& Prs,const TColgp_Array1OfPnt2d& Polyline,const Bnd_Box2d& aBox,const Standard_Real aTol,Handle(TColStd_HPackedMapOfInteger)& Nodes,Handle(TColStd_HPackedMapOfInteger)& Elements) ; 00092 Standard_EXPORT Standard_Boolean GetDetectedEntities(const Handle(MeshVS_Mesh)& Prs,Handle(TColStd_HPackedMapOfInteger)& Nodes,Handle(TColStd_HPackedMapOfInteger)& Elements) ; 00093 */ 00094 00099 Standard_EXPORT Standard_Boolean GetGeom(const Standard_Integer ID,const Standard_Boolean IsElement,TColStd_Array1OfReal& Coords,Standard_Integer& NbNodes,MeshVS_EntityType& Type) const; 00100 00101 Standard_EXPORT Standard_Boolean Get3DGeom(const Standard_Integer ID,Standard_Integer& NbNodes,Handle(MeshVS_HArray1OfSequenceOfInteger)& Data) const; 00102 00105 Standard_EXPORT Standard_Boolean GetGeomType(const Standard_Integer ID,const Standard_Boolean IsElement,MeshVS_EntityType& Type) const; 00106 00108 Standard_EXPORT Standard_Address GetAddr(const Standard_Integer ID,const Standard_Boolean IsElement) const; 00109 00111 Standard_EXPORT /*virtual*/ Standard_Boolean GetNodesByElement(const Standard_Integer ID,TColStd_Array1OfInteger& NodeIDs,Standard_Integer& NbNodes) const; 00112 00114 Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllNodes() const; 00115 00117 Standard_EXPORT const TColStd_PackedMapOfInteger& GetAllElements() const; 00118 00121 Standard_EXPORT Standard_Boolean GetNormal(const Standard_Integer Id,const Standard_Integer Max,Standard_Real& nx,Standard_Real& ny,Standard_Real& nz) const; 00122 00124 Standard_EXPORT void GetAllGroups(TColStd_PackedMapOfInteger& Ids) const; 00125 00126 // Type management 00127 // 00128 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; 00129 00130 protected: 00131 // Methods PROTECTED 00132 // 00133 00134 // Fields PROTECTED 00135 // 00136 00137 private: 00138 // Methods PRIVATE 00139 // 00140 00141 // Fields PRIVATE 00142 // 00143 SMESH_Mesh *myMesh; 00144 TColStd_PackedMapOfInteger myNodes; 00145 TColStd_PackedMapOfInteger myElements; 00146 TColStd_PackedMapOfInteger myGroups; 00147 }; 00148 00149 // other Inline functions and methods (like "C++: function call" methods) 00150 // 00151 00152 #endif