mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 12:40: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
|
||||
// Author : Yves FRICAUD, OCC
|
||||
// Module : SMESH
|
||||
// $Header:
|
||||
//
|
||||
#include "SMESHDS_Command.hxx"
|
||||
|
||||
@ -278,8 +277,8 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
//function : AddPolygonalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||
std::vector<int> nodes_ids)
|
||||
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids)
|
||||
{
|
||||
if (!myType == SMESHDS_AddPolygon) {
|
||||
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
|
||||
@ -300,9 +299,9 @@ void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||
//function : AddPolyhedralVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities)
|
||||
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if (!myType == SMESHDS_AddPolyhedron) {
|
||||
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
|
||||
@ -379,9 +378,9 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
|
||||
//function : ChangePolyhedronNodes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities)
|
||||
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if (myType != SMESHDS_ChangePolyhedronNodes)
|
||||
{
|
||||
@ -726,3 +725,21 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3,
|
||||
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++;
|
||||
}
|
||||
|
@ -43,23 +43,24 @@ class SMESHDS_EXPORT SMESHDS_Command
|
||||
void AddEdge(int NewEdgeID, int idnode1, int idnode2);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
|
||||
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4);
|
||||
int idnode4);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5);
|
||||
int idnode4, int idnode5);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
int idnode4, int idnode5, int idnode6);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||
void AddPolygonalFace (const int ElementID,
|
||||
std::vector<int> nodes_ids);
|
||||
void AddPolyhedralVolume (const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void AddPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddPolyhedralVolume (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void AddBall(int NewBallID, int node, double diameter);
|
||||
// special methods for quadratic elements
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
void AddFace(int NewFaceID, int n1, int n2, int n3,
|
||||
@ -95,9 +96,9 @@ class SMESHDS_EXPORT SMESHDS_Command
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
SMESHDS_CommandType GetType();
|
||||
int GetNumber();
|
||||
|
@ -24,7 +24,6 @@
|
||||
// File : SMESH_Script.cxx
|
||||
// Author : Yves FRICAUD, OCC
|
||||
// Module : SMESH
|
||||
// $Header:
|
||||
//
|
||||
#include "SMESHDS_Script.hxx"
|
||||
#include <iostream>
|
||||
@ -247,7 +246,7 @@ void SMESHDS_Script::AddVolume(int NewVolID, int idnode1, int idnode2, int idnod
|
||||
//function : AddPolygonalFace
|
||||
//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){
|
||||
myIsModified = true;
|
||||
@ -260,9 +259,9 @@ void SMESHDS_Script::AddPolygonalFace (int NewFaceID, std::vector<int> nodes_ids
|
||||
//function : AddPolyhedralVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities)
|
||||
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if(myIsEmbeddedMode){
|
||||
myIsModified = true;
|
||||
@ -272,6 +271,19 @@ void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||
(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 :
|
||||
//purpose :
|
||||
@ -329,9 +341,9 @@ void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
|
||||
//function : ChangePolyhedronNodes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities)
|
||||
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if(myIsEmbeddedMode){
|
||||
myIsModified = true;
|
||||
|
@ -62,11 +62,12 @@ class SMESHDS_EXPORT SMESHDS_Script
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||
|
||||
void AddPolygonalFace (const int NewFaceID,
|
||||
std::vector<int> nodes_ids);
|
||||
void AddPolyhedralVolume (const int NewVolID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void AddPolygonalFace (const int NewFaceID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddPolyhedralVolume (const int NewVolID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void AddBall(int NewBallID, int node, double diameter);
|
||||
|
||||
// special methods for quadratic elements
|
||||
void AddEdge(int NewEdgeID, int n1, int n2, int n12);
|
||||
@ -98,13 +99,13 @@ class SMESHDS_EXPORT SMESHDS_Script
|
||||
int n15, int n26, int n37, int n48,
|
||||
int n1234,int n1256,int n2367,int n3478,
|
||||
int n1458,int n5678,int nCenter);
|
||||
void MoveNode(int NewNodeID, double x, double y, double z);
|
||||
void MoveNode(int NewNodeID, double x, double y, double z);
|
||||
void RemoveNode(int NodeID);
|
||||
void RemoveElement(int ElementID);
|
||||
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
std::vector<int> nodes_ids,
|
||||
std::vector<int> quantities);
|
||||
void ChangePolyhedronNodes(const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void Renumber (const bool isNodes, const int startID, const int deltaID);
|
||||
void ClearMesh();
|
||||
void Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user