FemMesh.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FEM_FEMMESH_H
00025 #define FEM_FEMMESH_H
00026
00027 #include <App/ComplexGeoData.h>
00028 #include <Base/Placement.h>
00029
00030 #include <vector>
00031 #include <list>
00032 #include <boost/shared_ptr.hpp>
00033
00034 class SMESH_Gen;
00035 class SMESH_Mesh;
00036 class SMESH_Hypothesis;
00037 class TopoDS_Shape;
00038
00039 namespace Fem
00040 {
00041
00042 typedef boost::shared_ptr<SMESH_Hypothesis> SMESH_HypothesisPtr;
00043
00046 class AppFemExport FemMesh : public Data::ComplexGeoData
00047 {
00048 TYPESYSTEM_HEADER();
00049
00050 public:
00051 FemMesh();
00052 FemMesh(const FemMesh&);
00053 ~FemMesh();
00054
00055 FemMesh &operator=(const FemMesh&);
00056 const SMESH_Mesh* getSMesh() const;
00057 SMESH_Mesh* getSMesh();
00058 SMESH_Gen * getGenerator();
00059 void addHypothesis(const TopoDS_Shape & aSubShape, SMESH_HypothesisPtr hyp);
00060 void setStanardHypotheses();
00061 void compute();
00062
00063
00064 virtual unsigned int getMemSize (void) const;
00065 virtual void Save (Base::Writer &) const;
00066 virtual void Restore(Base::XMLReader &);
00067 void SaveDocFile (Base::Writer &writer) const;
00068 void RestoreDocFile(Base::Reader &reader);
00069
00076 virtual std::vector<const char*> getElementTypes(void) const;
00077 virtual unsigned long countSubElements(const char* Type) const;
00079 virtual Data::Segment* getSubElement(const char* Type, unsigned long) const;
00081
00084
00085 void setTransform(const Base::Matrix4D& rclTrf);
00087 Base::Matrix4D getTransform(void) const;
00089 Base::BoundBox3d getBoundBox(void)const;
00091
00094
00095 void transformGeometry(const Base::Matrix4D &rclMat);
00097
00099 void read(const char *FileName);
00100 void write(const char *FileName) const;
00101 void writeABAQUS(const std::string &Filename, Base::Placement* = 0) const;
00102
00103 private:
00104 void copyMeshData(const FemMesh&);
00105 void readNastran(const std::string &Filename);
00106
00107 private:
00108 SMESH_Gen *myGen;
00109 SMESH_Mesh *myMesh;
00110
00111 std::list<SMESH_HypothesisPtr> hypoth;
00112 };
00113
00114 }
00115
00116
00117 #endif // FEM_FEMMESH_H