26 #ifndef _SMESHDS_Mesh_HeaderFile 27 #define _SMESHDS_Mesh_HeaderFile 41 #include <TopTools_IndexedMapOfShape.hxx> 42 #include <TopoDS_Shape.hxx> 43 #include <TopoDS_Solid.hxx> 44 #include <TopoDS_Shell.hxx> 45 #include <TopoDS_Face.hxx> 46 #include <TopoDS_Vertex.hxx> 47 #include <TopoDS_Edge.hxx> 49 #include <NCollection_DataMap.hxx> 62 bool IsEmbeddedMode();
64 void ShapeToMesh(
const TopoDS_Shape & S);
65 TopoDS_Shape ShapeToMesh()
const;
115 int n12,
int n23,
int n31,
int ID);
132 int n12,
int n23,
int n34,
int n41,
int ID);
211 int n12,
int n23,
int n31,
212 int n14,
int n24,
int n34,
int ID);
237 int n12,
int n23,
int n34,
int n41,
238 int n15,
int n25,
int n35,
int n45,
270 int n4,
int n5,
int n6,
271 int n12,
int n23,
int n31,
272 int n45,
int n56,
int n64,
273 int n14,
int n25,
int n36,
309 int n5,
int n6,
int n7,
int n8,
310 int n12,
int n23,
int n34,
int n41,
311 int n56,
int n67,
int n78,
int n85,
312 int n15,
int n26,
int n37,
int n48,
365 (std::vector<int> nodes_ids,
366 std::vector<int> quantities,
370 (std::vector<const SMDS_MeshNode*> nodes,
371 std::vector<int> quantities,
375 (std::vector<const SMDS_MeshNode*> nodes,
376 std::vector<int> quantities);
378 void MoveNode(
const SMDS_MeshNode *,
double x,
double y,
double z);
395 std::vector<const SMDS_MeshNode*> nodes);
397 std::vector<const SMDS_MeshNode*> nodes,
398 std::vector<int> quantities);
399 void Renumber (
const bool isNodes,
const int startID=1,
const int deltaID=1);
401 void SetNodeInVolume(
SMDS_MeshNode * aNode,
const TopoDS_Shell & S);
402 void SetNodeInVolume(
SMDS_MeshNode * aNode,
const TopoDS_Solid & S);
403 void SetNodeOnFace(
SMDS_MeshNode * aNode,
const TopoDS_Face & S,
double u=0.,
double v=0.);
404 void SetNodeOnEdge(
SMDS_MeshNode * aNode,
const TopoDS_Edge & S,
double u=0.);
405 void SetNodeOnVertex(
SMDS_MeshNode * aNode,
const TopoDS_Vertex & S);
408 const TopoDS_Shape & S);
410 const TopoDS_Shape & S);
411 bool HasMeshElements(
const TopoDS_Shape & S);
414 std::list<int> SubMeshIndices();
416 {
return myShapeIndexToSubMesh; }
418 bool HasHypothesis(
const TopoDS_Shape & S);
419 const std::list<const SMESHDS_Hypothesis*>& GetHypothesis(
const TopoDS_Shape & S)
const;
422 int ShapeToIndex(
const TopoDS_Shape & aShape)
const;
423 const TopoDS_Shape& IndexToShape(
int ShapeIndex)
const;
427 int AddCompoundSubmesh(
const TopoDS_Shape& S, TopAbs_ShapeEnum type = TopAbs_SHAPE);
428 void SetNodeInVolume(
const SMDS_MeshNode * aNode,
int Index);
429 void SetNodeOnFace(
SMDS_MeshNode * aNode,
int Index ,
double u=0.,
double v=0.);
430 void SetNodeOnEdge(
SMDS_MeshNode * aNode,
int Index ,
double u=0.);
437 const std::set<SMESHDS_GroupBase*>&
GetGroups()
const {
return myGroups; }
439 bool IsGroupOfSubShapes (
const TopoDS_Shape& aSubShape)
const;
447 std::map<int,SMESHDS_SubMesh*>::iterator it = myShapeIndexToSubMesh.find( Index );
448 if ( it == myShapeIndexToSubMesh.end() )
449 it = myShapeIndexToSubMesh.insert( std::make_pair(Index,
new SMESHDS_SubMesh() )).first;
450 it->second->AddNode( aNode );
458 typedef std::list<const SMESHDS_Hypothesis*>
THypList;
virtual SMDS_MeshFace * AddPolygonalFace(std::vector< const SMDS_MeshNode *> nodes)
virtual SMDS_MeshVolume * AddVolume(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4)
const std::set< SMESHDS_GroupBase * > & GetGroups() const
SMESHDS_Script * myScript
virtual SMDS_Mesh0DElement * Add0DElement(const SMDS_MeshNode *n)
virtual SMDS_MeshNode * AddNodeWithID(double x, double y, double z, int ID)
void AddGroup(SMESHDS_GroupBase *theGroup)
ShapeToHypothesis myShapeToHypothesis
bool ChangePolyhedronNodes(const SMDS_MeshElement *elem, const std::vector< const SMDS_MeshNode *> &nodes, const std::vector< int > &quantities)
TopoDS_Shape myCurSubShape
SMESHDS_SubMesh * myCurSubMesh
const std::map< int, SMESHDS_SubMesh * > & SubMeshes() const
virtual SMDS_Mesh0DElement * Add0DElementWithID(int n, int ID)
virtual SMDS_MeshFace * AddFaceWithID(int n1, int n2, int n3, int ID)
virtual void RemoveNode(const SMDS_MeshNode *node)
std::list< const SMESHDS_Hypothesis * > THypList
virtual SMDS_MeshVolume * AddVolumeWithID(int n1, int n2, int n3, int n4, int ID)
TopTools_IndexedMapOfShape myIndexToShape
NCollection_DataMap< TopoDS_Shape, THypList > ShapeToHypothesis
void RemoveGroup(SMESHDS_GroupBase *theGroup)
int MaxShapeIndex() const
std::set< SMESHDS_GroupBase * > TGroups
std::map< int, SMESHDS_SubMesh * > TShapeIndexToSubMesh
bool ChangeElementNodes(const SMDS_MeshElement *elem, const SMDS_MeshNode *nodes[], const int nbnodes)
virtual void RemoveElement(const SMDS_MeshElement *elem, std::list< const SMDS_MeshElement *> &removedElems, std::list< const SMDS_MeshElement *> &removedNodes, bool removenodes=false)
virtual SMDS_MeshEdge * AddEdgeWithID(int n1, int n2, int ID)
virtual SMDS_MeshVolume * AddPolyhedralVolume(std::vector< const SMDS_MeshNode *> nodes, std::vector< int > quantities)
virtual SMDS_MeshFace * AddFace(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3)
void addNodeToSubmesh(const SMDS_MeshNode *aNode, int Index)
virtual SMDS_MeshEdge * AddEdge(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2)
virtual SMDS_MeshNode * AddNode(double x, double y, double z)
TShapeIndexToSubMesh myShapeIndexToSubMesh
virtual void RemoveFreeElement(const SMDS_MeshElement *elem)
virtual SMDS_MeshFace * AddPolygonalFaceWithID(std::vector< int > nodes_ids, const int ID)
virtual void Renumber(const bool isNodes, const int startID=1, const int deltaID=1)
virtual SMDS_MeshVolume * AddPolyhedralVolumeWithID(std::vector< int > nodes_ids, std::vector< int > quantities, const int ID)