26 #ifndef _SMESHDS_Mesh_HeaderFile
27 #define _SMESHDS_Mesh_HeaderFile
40 #include <TopTools_IndexedMapOfShape.hxx>
41 #include <TopoDS_Shape.hxx>
42 #include <TopoDS_Solid.hxx>
43 #include <TopoDS_Shell.hxx>
44 #include <TopoDS_Face.hxx>
45 #include <TopoDS_Vertex.hxx>
46 #include <TopoDS_Edge.hxx>
48 #include <NCollection_DataMap.hxx>
61 bool IsEmbeddedMode();
110 int n12,
int n23,
int n31,
int ID);
127 int n12,
int n23,
int n34,
int n41,
int ID);
206 int n12,
int n23,
int n31,
207 int n14,
int n24,
int n34,
int ID);
232 int n12,
int n23,
int n34,
int n41,
233 int n15,
int n25,
int n35,
int n45,
265 int n4,
int n5,
int n6,
266 int n12,
int n23,
int n31,
267 int n45,
int n56,
int n64,
268 int n14,
int n25,
int n36,
304 int n5,
int n6,
int n7,
int n8,
305 int n12,
int n23,
int n34,
int n41,
306 int n56,
int n67,
int n78,
int n85,
307 int n15,
int n26,
int n37,
int n48,
360 (std::vector<int> nodes_ids,
361 std::vector<int> quantities,
365 (std::vector<const SMDS_MeshNode*> nodes,
366 std::vector<int> quantities,
370 (std::vector<const SMDS_MeshNode*> nodes,
371 std::vector<int> quantities);
373 void MoveNode(
const SMDS_MeshNode *,
double x,
double y,
double z);
390 std::vector<const SMDS_MeshNode*> nodes);
392 std::vector<const SMDS_MeshNode*> nodes,
393 std::vector<int> quantities);
394 void Renumber (
const bool isNodes,
const int startID=1,
const int deltaID=1);
396 void SetNodeInVolume(
SMDS_MeshNode * aNode,
const TopoDS_Shell & S);
397 void SetNodeInVolume(
SMDS_MeshNode * aNode,
const TopoDS_Solid & S);
398 void SetNodeOnFace(
SMDS_MeshNode * aNode,
const TopoDS_Face & S,
double u=0.,
double v=0.);
399 void SetNodeOnEdge(
SMDS_MeshNode * aNode,
const TopoDS_Edge & S,
double u=0.);
400 void SetNodeOnVertex(
SMDS_MeshNode * aNode,
const TopoDS_Vertex & S);
409 std::list<int> SubMeshIndices();
411 {
return myShapeIndexToSubMesh; }
414 const std::list<const SMESHDS_Hypothesis*>& GetHypothesis(
const TopoDS_Shape & S)
const;
422 int AddCompoundSubmesh(
const TopoDS_Shape& S, TopAbs_ShapeEnum type = TopAbs_SHAPE);
423 void SetNodeInVolume(
const SMDS_MeshNode * aNode,
int Index);
424 void SetNodeOnFace(
SMDS_MeshNode * aNode,
int Index ,
double u=0.,
double v=0.);
425 void SetNodeOnEdge(
SMDS_MeshNode * aNode,
int Index ,
double u=0.);
432 const std::set<SMESHDS_GroupBase*>&
GetGroups()
const {
return myGroups; }
434 bool IsGroupOfSubShapes (
const TopoDS_Shape& aSubShape)
const;
442 std::map<int,SMESHDS_SubMesh*>::iterator it = myShapeIndexToSubMesh.find( Index );
443 if ( it == myShapeIndexToSubMesh.end() )
444 it = myShapeIndexToSubMesh.insert( std::make_pair(Index,
new SMESHDS_SubMesh() )).first;
445 it->second->AddNode( aNode );
453 typedef std::list<const SMESHDS_Hypothesis*>
THypList;
virtual SMDS_MeshVolume * AddVolume(const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4)
virtual SMDS_MeshFace * AddPolygonalFace(std::vector< const SMDS_MeshNode * > nodes)
SMESHDS_Script * myScript
virtual void RemoveElement(const SMDS_MeshElement *elem, std::list< const SMDS_MeshElement * > &removedElems, std::list< const SMDS_MeshElement * > &removedNodes, bool removenodes=false)
virtual SMDS_MeshNode * AddNodeWithID(double x, double y, double z, int ID)
void AddGroup(SMESHDS_GroupBase *theGroup)
const std::set< SMESHDS_GroupBase * > & GetGroups() const
ShapeToHypothesis myShapeToHypothesis
TopoDS_Shape myCurSubShape
SMESHDS_SubMesh * myCurSubMesh
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)
int MaxShapeIndex() const
TopTools_IndexedMapOfShape myIndexToShape
NCollection_DataMap< TopoDS_Shape, THypList > ShapeToHypothesis
void RemoveGroup(SMESHDS_GroupBase *theGroup)
const std::map< int, SMESHDS_SubMesh * > & SubMeshes() const
std::set< SMESHDS_GroupBase * > TGroups
virtual SMDS_MeshVolume * AddPolyhedralVolume(std::vector< const SMDS_MeshNode * > nodes, std::vector< int > quantities)
std::map< int, SMESHDS_SubMesh * > TShapeIndexToSubMesh
bool ChangeElementNodes(const SMDS_MeshElement *elem, const SMDS_MeshNode *nodes[], const int nbnodes)
bool ChangePolyhedronNodes(const SMDS_MeshElement *elem, const std::vector< const SMDS_MeshNode * > &nodes, const std::vector< int > &quantities)
virtual SMDS_MeshEdge * AddEdgeWithID(int n1, int n2, int ID)
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)