1 // Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SMESH SMESHDS : management of mesh data and SMESH document
24 // File : SMESHDS_Command.hxx
27 #ifndef _SMESHDS_Command_HeaderFile
28 #define _SMESHDS_Command_HeaderFile
30 #include "SMESH_SMESHDS.hxx"
32 #include "SMESHDS_CommandType.hxx"
33 #include <smIdType.hxx>
37 class SMESHDS_EXPORT SMESHDS_Command
41 SMESHDS_Command(const SMESHDS_CommandType aType);
42 void AddNode(int NewNodeID, double x, double y, double z);
43 void Add0DElement(int New0DElementID, int idnode);
44 void AddEdge(int NewEdgeID, int idnode1, int idnode2);
45 void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
46 void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
48 void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
50 void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
51 smIdType idnode4, smIdType idnode5);
52 void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
53 smIdType idnode4, smIdType idnode5, smIdType idnode6);
54 void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
55 smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8);
56 void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
57 smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8,
58 smIdType idnode9, smIdType idnode10, smIdType idnode11, smIdType idnode12);
59 void AddPolygonalFace (const smIdType ElementID,
60 const std::vector<smIdType>& nodes_ids);
61 void AddQuadPolygonalFace (const smIdType ElementID,
62 const std::vector<smIdType>& nodes_ids);
63 void AddPolyhedralVolume (const smIdType ElementID,
64 const std::vector<smIdType>& nodes_ids,
65 const std::vector<smIdType>& quantities);
66 void AddBall(int NewBallID, int node, double diameter);
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,
72 int n12, int n23, int n31, int nCenter);
73 void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
74 int n12, int n23, int n34, int n41);
75 void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
76 int n12, int n23, int n34, int n41, int nCenter);
77 void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
78 int n12, int n23, int n31, int n14, int n24, int n34);
79 void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5,
80 int n12, int n23, int n34, int n41,
81 int n15, int n25, int n35, int n45);
82 void AddVolume(int NewVolID, int n1, int n2, int n3,
83 int n4, int n5, int n6,
84 int n12, int n23, int n31,
85 int n45, int n56, int n64,
86 int n14, int n25, int n36);
87 void AddVolume(int NewVolID, int n1, int n2, int n3,
88 int n4, int n5, int n6,
89 int n12, int n23, int n31,
90 int n45, int n56, int n64,
91 int n14, int n25, int n36,
92 int n1245, int n2356, int n1346);
93 void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
94 int n5, int n6, int n7, int n8,
95 int n12, int n23, int n34, int n41,
96 int n56, int n67, int n78, int n85,
97 int n15, int n26, int n37, int n48);
98 void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
99 int n5, int n6, int n7, int n8,
100 int n12, int n23, int n34, int n41,
101 int n56, int n67, int n78, int n85,
102 int n15, int n26, int n37, int n48,
103 int n1234,int n1256,int n2367,int n3478,
104 int n1458,int n5678,int nCenter);
106 void MoveNode(int NewNodeID, double x, double y, double z);
107 void RemoveNode(int NodeID);
108 void RemoveElement(int ElementID);
109 void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
110 void ChangePolyhedronNodes(const int ElementID,
111 const std::vector<int>& nodes_ids,
112 const std::vector<int>& quantities);
113 void Renumber (const bool isNodes, const int startID, const int deltaID);
114 SMESHDS_CommandType GetType();
116 const std::list<int> & GetIndexes();
117 const std::list<double> & GetCoords();
120 SMESHDS_CommandType myType;
122 std::list<double> myReals;
123 std::list<int> myIntegers;