SALOME - SMESH
SMESHDS_Script.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // SMESH SMESHDS : management of mesh data and SMESH document
23 // File : SMESHDS_Script.hxx
24 // Module : SMESH
25 //
26 #ifndef _SMESHDS_Script_HeaderFile
27 #define _SMESHDS_Script_HeaderFile
28 
29 #include "SMESH_SMESHDS.hxx"
30 
31 #include "SMESHDS_Command.hxx"
32 
33 #include <list>
34 #include <vector>
35 
36 
38 {
39  public:
40  SMESHDS_Script(bool theIsEmbeddedMode);
42 
43  void SetModified(bool theModified);
44  bool IsModified();
45 
46  void AddNode(int NewNodeID, double x, double y, double z);
47  void Add0DElement(int New0DElementID, int idnode);
48  void AddEdge(int NewEdgeID, int idnode1, int idnode2);
49  void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
50  void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
51  int idnode4);
52  void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
53  int idnode4);
54  void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
55  int idnode4, int idnode5);
56  void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
57  int idnode4, int idnode5, int idnode6);
58  void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
59  int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
60 
61  void AddPolygonalFace (const int NewFaceID,
62  std::vector<int> nodes_ids);
63  void AddPolyhedralVolume (const int NewVolID,
64  std::vector<int> nodes_ids,
65  std::vector<int> quantities);
66 
67  // special methods for quadratic elements
68  void AddEdge(int NewEdgeID, int n1, int n2, int n12);
69  void AddFace(int NewFaceID, int n1, int n2, int n3,
70  int n12, int n23, int n31);
71  void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
72  int n12, int n23, int n34, int n41);
73  void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
74  int n12, int n23, int n31, int n14, int n24, int n34);
75  void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5,
76  int n12, int n23, int n34, int n41,
77  int n15, int n25, int n35, int n45);
78  void AddVolume(int NewVolID, int n1, int n2, int n3,
79  int n4, int n5, int n6,
80  int n12, int n23, int n31,
81  int n45, int n56, int n64,
82  int n14, int n25, int n36);
83  void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
84  int n5, int n6, int n7, int n8,
85  int n12, int n23, int n34, int n41,
86  int n56, int n67, int n78, int n85,
87  int n15, int n26, int n37, int n48);
88  void MoveNode(int NewNodeID, double x, double y, double z);
89  void RemoveNode(int NodeID);
90  void RemoveElement(int ElementID);
91  void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
92  void ChangePolyhedronNodes(const int ElementID,
93  std::vector<int> nodes_ids,
94  std::vector<int> quantities);
95  void Renumber (const bool isNodes, const int startID, const int deltaID);
96  void ClearMesh();
97  void Clear();
98  const std::list<SMESHDS_Command*> & GetCommands();
99 
100  private:
102 
103  std::list<SMESHDS_Command*> myCommands;
104 
107 };
108 
109 #endif
SMESHDS_Script::AddVolume
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)
SMESHDS_Script::AddVolume
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)
SMESHDS_Script::getCommand
SMESHDS_Command * getCommand(const SMESHDS_CommandType aType)
SMESHDS_Script::myCommands
std::list< SMESHDS_Command * > myCommands
Definition: SMESHDS_Script.hxx:103
SMESHDS_Command.hxx
SMESHDS_CommandType
SMESHDS_CommandType
Definition: SMESHDS_CommandType.hxx:31
SMESHDS_Script::AddFace
void AddFace(int NewFaceID, int n1, int n2, int n3, int n12, int n23, int n31)
SMESHDS_Script::RemoveElement
void RemoveElement(int ElementID)
SMESHDS_Script::AddPolygonalFace
void AddPolygonalFace(const int NewFaceID, std::vector< int > nodes_ids)
SMESHDS_Script::MoveNode
void MoveNode(int NewNodeID, double x, double y, double z)
SMESHDS_Script::AddPolyhedralVolume
void AddPolyhedralVolume(const int NewVolID, std::vector< int > nodes_ids, std::vector< int > quantities)
SMESHDS_Script::ChangePolyhedronNodes
void ChangePolyhedronNodes(const int ElementID, std::vector< int > nodes_ids, std::vector< int > quantities)
SMESHDS_Script::Clear
void Clear()
SMESHDS_Script::SetModified
void SetModified(bool theModified)
SMESHDS_Script::AddFace
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, int n12, int n23, int n34, int n41)
SMESHDS_Script
Definition: SMESHDS_Script.hxx:38
SMESHDS_Script::SMESHDS_Script
SMESHDS_Script(bool theIsEmbeddedMode)
SMESHDS_Script::myIsModified
bool myIsModified
Definition: SMESHDS_Script.hxx:106
SMESHDS_Script::AddVolume
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
SMESHDS_Script::Renumber
void Renumber(const bool isNodes, const int startID, const int deltaID)
SMESHDS_Script::Add0DElement
void Add0DElement(int New0DElementID, int idnode)
SMESHDS_Script::IsModified
bool IsModified()
SMESHDS_EXPORT
#define SMESHDS_EXPORT
Definition: SMESH_SMESHDS.hxx:36
SMESHDS_Script::RemoveNode
void RemoveNode(int NodeID)
SMESHDS_Script::AddEdge
void AddEdge(int NewEdgeID, int idnode1, int idnode2)
SMESHDS_Script::AddEdge
void AddEdge(int NewEdgeID, int n1, int n2, int n12)
SMESHDS_Script::AddVolume
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
SMESHDS_Script::AddVolume
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n12, int n23, int n31, int n14, int n24, int n34)
SMESHDS_Script::AddVolume
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4)
SMESHDS_Script::AddFace
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, int idnode4)
SMESHDS_Script::myIsEmbeddedMode
bool myIsEmbeddedMode
Definition: SMESHDS_Script.hxx:105
SMESHDS_Script::AddVolume
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)
SMESHDS_Script::ClearMesh
void ClearMesh()
SMESHDS_Script::ChangeElementNodes
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
SMESHDS_Script::AddFace
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3)
SMESHDS_Command
Definition: SMESHDS_Command.hxx:36
SMESHDS_Script::AddNode
void AddNode(int NewNodeID, double x, double y, double z)
SMESHDS_Script::GetCommands
const std::list< SMESHDS_Command * > & GetCommands()
SMESH_SMESHDS.hxx
SMESHDS_Script::~SMESHDS_Script
~SMESHDS_Script()
SMESHDS_Script::AddVolume
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)