Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:15

0001 // Created on: 2003-12-11
0002 // Created by: Alexander SOLOVYOV
0003 // Copyright (c) 2003-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _MeshVS_DeformedDataSource_HeaderFile
0017 #define _MeshVS_DeformedDataSource_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <MeshVS_DataMapOfIntegerVector.hxx>
0023 #include <MeshVS_DataSource.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TColStd_Array1OfReal.hxx>
0026 #include <MeshVS_EntityType.hxx>
0027 #include <MeshVS_HArray1OfSequenceOfInteger.hxx>
0028 #include <TColStd_Array1OfInteger.hxx>
0029 class gp_Vec;
0030 
0031 
0032 class MeshVS_DeformedDataSource;
0033 DEFINE_STANDARD_HANDLE(MeshVS_DeformedDataSource, MeshVS_DataSource)
0034 
0035 //! The class provides default class which helps to represent node displacements by deformed mesh
0036 //! This class has an internal handle to canonical non-deformed mesh data source and
0037 //! map of displacement vectors. The displacement can be magnified to useful size.
0038 //! All methods is implemented with calling the corresponding methods of non-deformed data source.
0039 class MeshVS_DeformedDataSource : public MeshVS_DataSource
0040 {
0041 
0042 public:
0043 
0044   
0045   //! Constructor
0046   //! theNonDeformDS is canonical non-deformed data source, by which we are able to calculate
0047   //! deformed mesh geometry
0048   //! theMagnify is coefficient of displacement magnify
0049   Standard_EXPORT MeshVS_DeformedDataSource(const Handle(MeshVS_DataSource)& theNonDeformDS, const Standard_Real theMagnify);
0050   
0051   Standard_EXPORT virtual Standard_Boolean GetGeom (const Standard_Integer ID, const Standard_Boolean IsElement, TColStd_Array1OfReal& Coords, Standard_Integer& NbNodes, MeshVS_EntityType& Type) const Standard_OVERRIDE;
0052   
0053   Standard_EXPORT virtual Standard_Boolean GetGeomType (const Standard_Integer ID, const Standard_Boolean IsElement, MeshVS_EntityType& Type) const Standard_OVERRIDE;
0054   
0055   Standard_EXPORT virtual Standard_Boolean Get3DGeom (const Standard_Integer ID, Standard_Integer& NbNodes, Handle(MeshVS_HArray1OfSequenceOfInteger)& Data) const Standard_OVERRIDE;
0056   
0057   Standard_EXPORT virtual Standard_Address GetAddr (const Standard_Integer ID, const Standard_Boolean IsElement) const Standard_OVERRIDE;
0058   
0059   Standard_EXPORT virtual Standard_Boolean GetNodesByElement (const Standard_Integer ID, TColStd_Array1OfInteger& NodeIDs, Standard_Integer& NbNodes) const Standard_OVERRIDE;
0060   
0061   Standard_EXPORT virtual const TColStd_PackedMapOfInteger& GetAllNodes() const Standard_OVERRIDE;
0062   
0063   Standard_EXPORT virtual const TColStd_PackedMapOfInteger& GetAllElements() const Standard_OVERRIDE;
0064   
0065   //! This method returns map of nodal displacement vectors
0066   Standard_EXPORT const MeshVS_DataMapOfIntegerVector& GetVectors() const;
0067   
0068   //! This method sets map of nodal displacement vectors (Map).
0069   Standard_EXPORT void SetVectors (const MeshVS_DataMapOfIntegerVector& Map);
0070   
0071   //! This method returns vector ( Vect ) assigned to node number ID.
0072   Standard_EXPORT Standard_Boolean GetVector (const Standard_Integer ID, gp_Vec& Vect) const;
0073   
0074   //! This method sets vector ( Vect ) assigned to node number ID.
0075   Standard_EXPORT void SetVector (const Standard_Integer ID, const gp_Vec& Vect);
0076   
0077   Standard_EXPORT void SetNonDeformedDataSource (const Handle(MeshVS_DataSource)& theDS);
0078   
0079   //! With this methods you can read and change internal canonical data source
0080   Standard_EXPORT Handle(MeshVS_DataSource) GetNonDeformedDataSource() const;
0081   
0082   Standard_EXPORT void SetMagnify (const Standard_Real theMagnify);
0083   
0084   //! With this methods you can read and change magnify coefficient of nodal displacements
0085   Standard_EXPORT Standard_Real GetMagnify() const;
0086 
0087 
0088 
0089 
0090   DEFINE_STANDARD_RTTIEXT(MeshVS_DeformedDataSource,MeshVS_DataSource)
0091 
0092 protected:
0093 
0094 
0095 
0096 
0097 private:
0098 
0099 
0100   Handle(MeshVS_DataSource) myNonDeformedDataSource;
0101   TColStd_PackedMapOfInteger myEmptyMap;
0102   MeshVS_DataMapOfIntegerVector myVectors;
0103   Standard_Real myMagnify;
0104 
0105 
0106 };
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 #endif // _MeshVS_DeformedDataSource_HeaderFile