Version: 6.3.1
Public Member Functions | Private Member Functions | Private Attributes

SMESHDS_Script Class Reference

#include <SMESHDS_Script.hxx>

Public Member Functions

 SMESHDS_Script (bool theIsEmbeddedMode)
 ~SMESHDS_Script ()
void SetModified (bool theModified)
bool IsModified ()
void AddNode (int NewNodeID, double x, double y, double z)
void Add0DElement (int New0DElementID, int idnode)
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)
void AddVolume (int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4)
void AddVolume (int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
void AddVolume (int NewVolID, int idnode1, int idnode2, int idnode3, 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)
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 AddEdge (int NewEdgeID, int n1, int n2, int n12)
void AddFace (int NewFaceID, int n1, int n2, int n3, int n12, int n23, int n31)
void AddFace (int NewFaceID, int n1, int n2, int n3, int n4, int n12, int n23, int n34, int n41)
void AddVolume (int NewVolID, int n1, int n2, int n3, int n4, int n12, int n23, int n31, int n14, int n24, int n34)
void AddVolume (int NewVolID, int n1, int n2, int n3, int n4, int n5, int n12, int n23, int n34, int n41, int n15, int n25, int n35, int n45)
void AddVolume (int NewVolID, int n1, int n2, int n3, int n4, int n5, int n6, int n12, int n23, int n31, int n45, int n56, int n64, int n14, int n25, int n36)
void AddVolume (int NewVolID, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n12, int n23, int n34, int n41, int n56, int n67, int n78, int n85, int n15, int n26, int n37, int n48)
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 Renumber (const bool isNodes, const int startID, const int deltaID)
void ClearMesh ()
void Clear ()
const std::list
< SMESHDS_Command * > & 
GetCommands ()

Private Member Functions

SMESHDS_CommandgetCommand (const SMESHDS_CommandType aType)

Private Attributes

std::list< SMESHDS_Command * > myCommands
bool myIsEmbeddedMode
bool myIsModified

Detailed Description

Definition at line 38 of file SMESHDS_Script.hxx.


Constructor & Destructor Documentation

SMESHDS_Script::SMESHDS_Script ( bool  theIsEmbeddedMode)

Definition at line 38 of file SMESHDS_Script.cxx.

                                                    :
  myIsEmbeddedMode(theIsEmbeddedMode)
{
  //cerr << "=========================== myIsEmbeddedMode " << myIsEmbeddedMode << endl;
}
SMESHDS_Script::~SMESHDS_Script ( )

Definition at line 48 of file SMESHDS_Script.cxx.

References Clear().

{
  Clear();
}

Member Function Documentation

void SMESHDS_Script::Add0DElement ( int  New0DElementID,
int  idnode 
)
void SMESHDS_Script::AddEdge ( int  NewEdgeID,
int  idnode1,
int  idnode2 
)

Definition at line 119 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddEdge(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddEdge.

Referenced by SMESHDS_Mesh.AddEdge(), and SMESHDS_Mesh.AddEdgeWithID().

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddEdge)->AddEdge(NewEdgeID, idnode1, idnode2);
}
void SMESHDS_Script::AddEdge ( int  NewEdgeID,
int  n1,
int  n2,
int  n12 
)

Definition at line 384 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddEdge(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadEdge.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadEdge)->AddEdge(NewEdgeID, n1, n2, n12);
}
void SMESHDS_Script::AddFace ( int  NewFaceID,
int  n1,
int  n2,
int  n3,
int  n4,
int  n12,
int  n23,
int  n34,
int  n41 
)

Definition at line 412 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddFace(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadQuadrangle.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadQuadrangle)->AddFace(NewFaceID, n1, n2, n3, n4,
                                                 n12, n23, n34, n41);
}
void SMESHDS_Script::AddFace ( int  NewFaceID,
int  idnode1,
int  idnode2,
int  idnode3 
)

Definition at line 132 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddFace(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddTriangle.

Referenced by SMESHDS_Mesh.AddFace(), and SMESHDS_Mesh.AddFaceWithID().

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddTriangle)->AddFace(NewFaceID,
                                           idnode1, idnode2, idnode3);
}
void SMESHDS_Script::AddFace ( int  NewFaceID,
int  idnode1,
int  idnode2,
int  idnode3,
int  idnode4 
)

Definition at line 147 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddFace(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadrangle.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadrangle)->AddFace(NewFaceID,
                                             idnode1, idnode2,
                                             idnode3, idnode4);
}
void SMESHDS_Script::AddFace ( int  NewFaceID,
int  n1,
int  n2,
int  n3,
int  n12,
int  n23,
int  n31 
)

Definition at line 397 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddFace(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadTriangle.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadTriangle)->AddFace(NewFaceID, n1, n2, n3,
                                               n12, n23, n31);
}
void SMESHDS_Script::AddNode ( int  NewNodeID,
double  x,
double  y,
double  z 
)
void SMESHDS_Script::AddPolygonalFace ( const int  NewFaceID,
std::vector< int nodes_ids 
)
void SMESHDS_Script::AddPolyhedralVolume ( const int  NewVolID,
std::vector< int nodes_ids,
std::vector< int quantities 
)
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  idnode1,
int  idnode2,
int  idnode3,
int  idnode4 
)

Definition at line 164 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddTetrahedron.

Referenced by SMESHDS_Mesh.AddVolume(), and SMESHDS_Mesh.AddVolumeWithID().

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddTetrahedron)->AddVolume(NewID,
                                                idnode1, idnode2,
                                                idnode3, idnode4);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  n1,
int  n2,
int  n3,
int  n4,
int  n12,
int  n23,
int  n31,
int  n14,
int  n24,
int  n34 
)

Definition at line 427 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadTetrahedron.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadTetrahedron)->AddVolume(NewVolID, n1, n2, n3, n4,
                                                    n12, n23, n31,
                                                    n14, n24, n34);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  idnode1,
int  idnode2,
int  idnode3,
int  idnode4,
int  idnode5 
)

Definition at line 181 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddPyramid.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddPyramid)->AddVolume(NewID,
                                            idnode1, idnode2,
                                            idnode3, idnode4, idnode5);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n12,
int  n23,
int  n34,
int  n41,
int  n15,
int  n25,
int  n35,
int  n45 
)

Definition at line 444 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadPyramid.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadPyramid)->AddVolume(NewVolID, n1, n2, n3, n4, n5,
                                                n12, n23, n34, n41,
                                                n15, n25, n35, n45);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n12,
int  n23,
int  n31,
int  n45,
int  n56,
int  n64,
int  n14,
int  n25,
int  n36 
)

Definition at line 461 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadPentahedron.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadPentahedron)->AddVolume(NewVolID, n1,n2,n3,n4,n5,n6,
                                                    n12, n23, n31,
                                                    n45, n56, n64,
                                                    n14, n25, n36);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  idnode1,
int  idnode2,
int  idnode3,
int  idnode4,
int  idnode5,
int  idnode6 
)

Definition at line 198 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddPrism.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddPrism)->AddVolume(NewID,
                                          idnode1, idnode2, idnode3,
                                          idnode4, idnode5, idnode6);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n12,
int  n23,
int  n34,
int  n41,
int  n56,
int  n67,
int  n78,
int  n85,
int  n15,
int  n26,
int  n37,
int  n48 
)

Definition at line 480 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddQuadHexahedron.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddQuadHexahedron)->AddVolume(NewVolID, n1, n2, n3, n4,
                                                   n5, n6, n7, n8,
                                                   n12, n23, n34, n41,
                                                   n56, n67, n78, n85,
                                                   n15, n26, n37, n48);
}
void SMESHDS_Script::AddVolume ( int  NewVolID,
int  idnode1,
int  idnode2,
int  idnode3,
int  idnode4,
int  idnode5,
int  idnode6,
int  idnode7,
int  idnode8 
)

Definition at line 215 of file SMESHDS_Script.cxx.

References SMESHDS_Command.AddVolume(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_AddHexahedron.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_AddHexahedron)->AddVolume(NewID,
                                               idnode1, idnode2, idnode3, idnode4,
                                               idnode5, idnode6, idnode7, idnode8);
}
void SMESHDS_Script::ChangeElementNodes ( int  ElementID,
int  nodes[],
int  nbnodes 
)
void SMESHDS_Script::ChangePolyhedronNodes ( const int  ElementID,
std::vector< int nodes_ids,
std::vector< int quantities 
)
void SMESHDS_Script::Clear ( )

Definition at line 357 of file SMESHDS_Script.cxx.

References myCommands.

Referenced by ClearMesh(), SMESHDS_Mesh.ClearScript(), and ~SMESHDS_Script().

{
  list<SMESHDS_Command*>::iterator anIt = myCommands.begin();
  for (; anIt != myCommands.end(); anIt++) {
    delete (*anIt);
  }
  myCommands.clear();
}
void SMESHDS_Script::ClearMesh ( )

Definition at line 343 of file SMESHDS_Script.cxx.

References Clear(), getCommand(), myIsEmbeddedMode, myIsModified, and SMESHDS_ClearAll.

Referenced by SMESHDS_Mesh.ClearMesh().

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  Clear();// previous commands become useless to reproduce on client side
  getCommand(SMESHDS_ClearAll);
}
SMESHDS_Command * SMESHDS_Script::getCommand ( const SMESHDS_CommandType  aType) [private]

Definition at line 69 of file SMESHDS_Script.cxx.

References SMESHDS_Command.GetType(), and myCommands.

Referenced by Add0DElement(), AddEdge(), AddFace(), AddNode(), AddPolygonalFace(), AddPolyhedralVolume(), AddVolume(), ChangeElementNodes(), ChangePolyhedronNodes(), ClearMesh(), MoveNode(), RemoveElement(), RemoveNode(), and Renumber().

{
  SMESHDS_Command* com;
  if (myCommands.empty())
  {
    com = new SMESHDS_Command(aType);
    myCommands.insert(myCommands.end(),com);
  }
  else
  {
    com = myCommands.back();
    if (com->GetType() != aType)
    {
      com = new SMESHDS_Command(aType);
      myCommands.insert(myCommands.end(),com);
    }
  }
  return com;
}
const list< SMESHDS_Command * > & SMESHDS_Script::GetCommands ( )

Definition at line 370 of file SMESHDS_Script.cxx.

References myCommands.

{
  return myCommands;
}
bool SMESHDS_Script::IsModified ( )

Definition at line 60 of file SMESHDS_Script.cxx.

References myIsModified.

Referenced by SMESH_Client.Update().

{
  return myIsModified;
}
void SMESHDS_Script::MoveNode ( int  NewNodeID,
double  x,
double  y,
double  z 
)
void SMESHDS_Script::RemoveElement ( int  ElementID)
void SMESHDS_Script::RemoveNode ( int  NodeID)
void SMESHDS_Script::Renumber ( const bool  isNodes,
const int  startID,
const int  deltaID 
)

Definition at line 330 of file SMESHDS_Script.cxx.

References getCommand(), myIsEmbeddedMode, myIsModified, SMESHDS_Command.Renumber(), and SMESHDS_Renumber.

{
  if(myIsEmbeddedMode){
    myIsModified = true;
    return;
  }
  getCommand(SMESHDS_Renumber)->Renumber( isNodes, startID, deltaID );
}
void SMESHDS_Script::SetModified ( bool  theModified)

Definition at line 54 of file SMESHDS_Script.cxx.

References myIsModified.

Referenced by SMESHDS_Mesh.compactMesh(), and SMESH_Client.Update().

{
  myIsModified = theModified;
}

Field Documentation

Definition at line 104 of file SMESHDS_Script.hxx.

Referenced by Clear(), getCommand(), and GetCommands().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS