// File : SMESH_Command.cxx
// Author : Yves FRICAUD, OCC
// Module : SMESH
-// $Header:
//
#include "SMESHDS_Command.hxx"
//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");
//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");
//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)
{
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++;
+}
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,
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();
// File : SMESH_Script.cxx
// Author : Yves FRICAUD, OCC
// Module : SMESH
-// $Header:
//
#include "SMESHDS_Script.hxx"
#include <iostream>
//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;
//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;
(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 :
//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;
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);
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();