mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-22 15:55:38 +05:00
0021459: EDF 1495 SMESH: Manipulation of discrete elements with attributes
+ virtual SMDS_BallElement* AddBallWithID(int n, double diameter, int ID); + virtual SMDS_BallElement* AddBallWithID(const SMDS_MeshNode * n, double diameter, int ID); + virtual SMDS_BallElement* AddBall (const SMDS_MeshNode * n, double diameter);
This commit is contained in:
parent
9f32eead4d
commit
71fffb2772
@ -24,7 +24,6 @@
|
|||||||
// File : SMESH_Mesh.cxx
|
// File : SMESH_Mesh.cxx
|
||||||
// Author : Yves FRICAUD, OCC
|
// Author : Yves FRICAUD, OCC
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header:
|
|
||||||
//
|
//
|
||||||
#include "SMESHDS_Mesh.hxx"
|
#include "SMESHDS_Mesh.hxx"
|
||||||
|
|
||||||
@ -35,22 +34,23 @@
|
|||||||
#include "SMDS_SpacePosition.hxx"
|
#include "SMDS_SpacePosition.hxx"
|
||||||
#include "SMDS_Downward.hxx"
|
#include "SMDS_Downward.hxx"
|
||||||
#include "SMESHDS_GroupOnGeom.hxx"
|
#include "SMESHDS_GroupOnGeom.hxx"
|
||||||
|
#include "SMESHDS_Script.hxx"
|
||||||
|
|
||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
#include <TopoDS_Edge.hxx>
|
||||||
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
#include <TopoDS_Shell.hxx>
|
||||||
|
#include <TopoDS_Solid.hxx>
|
||||||
|
#include <TopoDS_Vertex.hxx>
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/*Standard_Boolean IsEqual( const TopoDS_Shape& S1, const TopoDS_Shape& S2 )
|
|
||||||
{
|
|
||||||
return S1.IsSame( S2 );
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Create
|
//function : Create
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -305,10 +305,40 @@ SMDS_Mesh0DElement* SMESHDS_Mesh::Add0DElement(const SMDS_MeshNode * node)
|
|||||||
return anElem;
|
return anElem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function :AddBallWithID
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMDS_BallElement* SMESHDS_Mesh::AddBallWithID(int node, double diameter, int ID)
|
||||||
|
{
|
||||||
|
SMDS_BallElement* anElem = SMDS_Mesh::AddBallWithID(node,diameter,ID);
|
||||||
|
if (anElem) myScript->AddBall(anElem->GetID(), node, diameter);
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_BallElement* SMESHDS_Mesh::AddBallWithID(const SMDS_MeshNode * node,
|
||||||
|
double diameter,
|
||||||
|
int ID)
|
||||||
|
{
|
||||||
|
SMDS_BallElement* anElem = SMDS_Mesh::AddBallWithID(node,diameter,ID);
|
||||||
|
if (anElem) myScript->AddBall(anElem->GetID(), node->GetID(), diameter);
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_BallElement* SMESHDS_Mesh::AddBall (const SMDS_MeshNode * node,
|
||||||
|
double diameter)
|
||||||
|
{
|
||||||
|
SMDS_BallElement* anElem = SMDS_Mesh::AddBall(node,diameter);
|
||||||
|
if (anElem) myScript->AddBall(anElem->GetID(), node->GetID(), diameter);
|
||||||
|
return anElem;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :AddEdgeWithID
|
//function :AddEdgeWithID
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDS_MeshEdge* SMESHDS_Mesh::AddEdgeWithID(int n1, int n2, int ID)
|
SMDS_MeshEdge* SMESHDS_Mesh::AddEdgeWithID(int n1, int n2, int ID)
|
||||||
{
|
{
|
||||||
SMDS_MeshEdge* anElem = SMDS_Mesh::AddEdgeWithID(n1,n2,ID);
|
SMDS_MeshEdge* anElem = SMDS_Mesh::AddEdgeWithID(n1,n2,ID);
|
||||||
|
@ -30,22 +30,25 @@
|
|||||||
#include "SMESH_SMESHDS.hxx"
|
#include "SMESH_SMESHDS.hxx"
|
||||||
|
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
|
||||||
#include "SMDS_Mesh0DElement.hxx"
|
|
||||||
#include "SMDS_MeshEdge.hxx"
|
|
||||||
#include "SMDS_MeshFace.hxx"
|
|
||||||
#include "SMDS_MeshVolume.hxx"
|
|
||||||
#include "SMESHDS_Hypothesis.hxx"
|
|
||||||
#include "SMESHDS_SubMesh.hxx"
|
#include "SMESHDS_SubMesh.hxx"
|
||||||
#include "SMESHDS_Script.hxx"
|
|
||||||
|
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Solid.hxx>
|
|
||||||
#include <TopoDS_Shell.hxx>
|
class TopoDS_Solid ;
|
||||||
#include <TopoDS_Face.hxx>
|
class TopoDS_Shell ;
|
||||||
#include <TopoDS_Vertex.hxx>
|
class TopoDS_Face ;
|
||||||
#include <TopoDS_Edge.hxx>
|
class TopoDS_Vertex;
|
||||||
|
class TopoDS_Edge ;
|
||||||
|
|
||||||
|
class SMESHDS_Script;
|
||||||
|
class SMESHDS_Hypothesis;
|
||||||
|
class SMDS_MeshNode ;
|
||||||
|
class SMDS_MeshEdge ;
|
||||||
|
class SMDS_MeshFace ;
|
||||||
|
class SMDS_MeshVolume ;
|
||||||
|
class SMDS_Mesh0DElement;
|
||||||
|
class SMDS_BallElement;
|
||||||
|
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.hxx>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -77,6 +80,10 @@ public:
|
|||||||
virtual SMDS_Mesh0DElement* Add0DElementWithID(const SMDS_MeshNode * node, int ID);
|
virtual SMDS_Mesh0DElement* Add0DElementWithID(const SMDS_MeshNode * node, int ID);
|
||||||
virtual SMDS_Mesh0DElement* Add0DElement (const SMDS_MeshNode * node);
|
virtual SMDS_Mesh0DElement* Add0DElement (const SMDS_MeshNode * node);
|
||||||
|
|
||||||
|
virtual SMDS_BallElement* AddBallWithID(int n, double diameter, int ID);
|
||||||
|
virtual SMDS_BallElement* AddBallWithID(const SMDS_MeshNode * n, double diameter, int ID);
|
||||||
|
virtual SMDS_BallElement* AddBall (const SMDS_MeshNode * n, double diameter);
|
||||||
|
|
||||||
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
||||||
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
||||||
const SMDS_MeshNode * n2,
|
const SMDS_MeshNode * n2,
|
||||||
|
Loading…
Reference in New Issue
Block a user