mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 23:20:33 +05:00
0021459: EDF 1495 SMESH: Manipulation of discrete elements with attributes
+ void AddBall(int NewBallID, int node, double diameter);
This commit is contained in:
parent
71fffb2772
commit
e519caf020
@ -24,7 +24,6 @@
|
|||||||
// File : SMESH_Command.cxx
|
// File : SMESH_Command.cxx
|
||||||
// Author : Yves FRICAUD, OCC
|
// Author : Yves FRICAUD, OCC
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header:
|
|
||||||
//
|
//
|
||||||
#include "SMESHDS_Command.hxx"
|
#include "SMESHDS_Command.hxx"
|
||||||
|
|
||||||
@ -279,7 +278,7 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||||
std::vector<int> nodes_ids)
|
const std::vector<int>& nodes_ids)
|
||||||
{
|
{
|
||||||
if (!myType == SMESHDS_AddPolygon) {
|
if (!myType == SMESHDS_AddPolygon) {
|
||||||
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
|
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
|
||||||
@ -301,8 +300,8 @@ void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities)
|
const std::vector<int>& quantities)
|
||||||
{
|
{
|
||||||
if (!myType == SMESHDS_AddPolyhedron) {
|
if (!myType == SMESHDS_AddPolyhedron) {
|
||||||
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
|
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
|
||||||
@ -380,8 +379,8 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
|
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities)
|
const std::vector<int>& quantities)
|
||||||
{
|
{
|
||||||
if (myType != SMESHDS_ChangePolyhedronNodes)
|
if (myType != SMESHDS_ChangePolyhedronNodes)
|
||||||
{
|
{
|
||||||
@ -726,3 +725,21 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3,
|
|||||||
myNumber++;
|
myNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Record adding a Ball
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
void SMESHDS_Command::AddBall(int NewBallID, int node, double diameter)
|
||||||
|
{
|
||||||
|
if (!myType == SMESHDS_AddBall)
|
||||||
|
{
|
||||||
|
MESSAGE("SMESHDS_Command::SMESHDS_AddBall : Bad Type");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myIntegers.push_back(NewBallID);
|
||||||
|
myIntegers.push_back(node);
|
||||||
|
myReals.push_back(diameter);
|
||||||
|
myNumber++;
|
||||||
|
}
|
||||||
|
@ -56,10 +56,11 @@ class SMESHDS_EXPORT SMESHDS_Command
|
|||||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
||||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||||
void AddPolygonalFace (const int ElementID,
|
void AddPolygonalFace (const int ElementID,
|
||||||
std::vector<int> nodes_ids);
|
const std::vector<int>& nodes_ids);
|
||||||
void AddPolyhedralVolume (const int ElementID,
|
void AddPolyhedralVolume (const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities);
|
const std::vector<int>& quantities);
|
||||||
|
void AddBall(int NewBallID, int node, double diameter);
|
||||||
// special methods for quadratic elements
|
// special methods for quadratic elements
|
||||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||||
void AddFace(int NewFaceID, int n1, int n2, int n3,
|
void AddFace(int NewFaceID, int n1, int n2, int n3,
|
||||||
@ -96,8 +97,8 @@ class SMESHDS_EXPORT SMESHDS_Command
|
|||||||
void RemoveElement(int ElementID);
|
void RemoveElement(int ElementID);
|
||||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||||
void ChangePolyhedronNodes(const int ElementID,
|
void ChangePolyhedronNodes(const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities);
|
const std::vector<int>& quantities);
|
||||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||||
SMESHDS_CommandType GetType();
|
SMESHDS_CommandType GetType();
|
||||||
int GetNumber();
|
int GetNumber();
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
// File : SMESH_Script.cxx
|
// File : SMESH_Script.cxx
|
||||||
// Author : Yves FRICAUD, OCC
|
// Author : Yves FRICAUD, OCC
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header:
|
|
||||||
//
|
//
|
||||||
#include "SMESHDS_Script.hxx"
|
#include "SMESHDS_Script.hxx"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -247,7 +246,7 @@ void SMESHDS_Script::AddVolume(int NewVolID, int idnode1, int idnode2, int idnod
|
|||||||
//function : AddPolygonalFace
|
//function : AddPolygonalFace
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Script::AddPolygonalFace (int NewFaceID, std::vector<int> nodes_ids)
|
void SMESHDS_Script::AddPolygonalFace (int NewFaceID, const std::vector<int>& nodes_ids)
|
||||||
{
|
{
|
||||||
if(myIsEmbeddedMode){
|
if(myIsEmbeddedMode){
|
||||||
myIsModified = true;
|
myIsModified = true;
|
||||||
@ -261,8 +260,8 @@ void SMESHDS_Script::AddPolygonalFace (int NewFaceID, std::vector<int> nodes_ids
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities)
|
const std::vector<int>& quantities)
|
||||||
{
|
{
|
||||||
if(myIsEmbeddedMode){
|
if(myIsEmbeddedMode){
|
||||||
myIsModified = true;
|
myIsModified = true;
|
||||||
@ -272,6 +271,19 @@ void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
|||||||
(NewID, nodes_ids, quantities);
|
(NewID, nodes_ids, quantities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddBall
|
||||||
|
//purpose : Record adding a Ball
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void SMESHDS_Script::AddBall(int NewBallID, int node, double diameter)
|
||||||
|
{
|
||||||
|
if ( myIsEmbeddedMode )
|
||||||
|
myIsModified = true;
|
||||||
|
else
|
||||||
|
getCommand(SMESHDS_AddBall)->AddBall(NewBallID, node, diameter);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -330,8 +342,8 @@ void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
|
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities)
|
const std::vector<int>& quantities)
|
||||||
{
|
{
|
||||||
if(myIsEmbeddedMode){
|
if(myIsEmbeddedMode){
|
||||||
myIsModified = true;
|
myIsModified = true;
|
||||||
|
@ -63,10 +63,11 @@ class SMESHDS_EXPORT SMESHDS_Script
|
|||||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||||
|
|
||||||
void AddPolygonalFace (const int NewFaceID,
|
void AddPolygonalFace (const int NewFaceID,
|
||||||
std::vector<int> nodes_ids);
|
const std::vector<int>& nodes_ids);
|
||||||
void AddPolyhedralVolume (const int NewVolID,
|
void AddPolyhedralVolume (const int NewVolID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities);
|
const std::vector<int>& quantities);
|
||||||
|
void AddBall(int NewBallID, int node, double diameter);
|
||||||
|
|
||||||
// special methods for quadratic elements
|
// special methods for quadratic elements
|
||||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||||
@ -103,8 +104,8 @@ class SMESHDS_EXPORT SMESHDS_Script
|
|||||||
void RemoveElement(int ElementID);
|
void RemoveElement(int ElementID);
|
||||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||||
void ChangePolyhedronNodes(const int ElementID,
|
void ChangePolyhedronNodes(const int ElementID,
|
||||||
std::vector<int> nodes_ids,
|
const std::vector<int>& nodes_ids,
|
||||||
std::vector<int> quantities);
|
const std::vector<int>& quantities);
|
||||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||||
void ClearMesh();
|
void ClearMesh();
|
||||||
void Clear();
|
void Clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user