SALOME - SMESH
SMESHDS_Command.hxx
Go to the documentation of this file.
00001 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 //  This library is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU Lesser General Public
00008 //  License as published by the Free Software Foundation; either
00009 //  version 2.1 of the License.
00010 //
00011 //  This library is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 //  Lesser General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU Lesser General Public
00017 //  License along with this library; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  SMESH SMESHDS : management of mesh data and SMESH document
00023 //  File   : SMESHDS_Command.hxx
00024 //  Module : SMESH
00025 //
00026 #ifndef _SMESHDS_Command_HeaderFile
00027 #define _SMESHDS_Command_HeaderFile
00028 
00029 #include "SMESH_SMESHDS.hxx"
00030 
00031 #include "SMESHDS_CommandType.hxx"
00032 #include <list>
00033 #include <vector>
00034 
00035 class SMESHDS_EXPORT SMESHDS_Command
00036 {
00037 
00038   public:
00039      SMESHDS_Command(const SMESHDS_CommandType aType);
00040      void AddNode(int NewNodeID, double x, double y, double z);
00041      void Add0DElement(int New0DElementID, int idnode);
00042      void AddEdge(int NewEdgeID, int idnode1, int idnode2);
00043      void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
00044      void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
00045           int idnode4);
00046      void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00047           int idnode4);
00048      void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00049           int idnode4, int idnode5);
00050      void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00051           int idnode4, int idnode5, int idnode6);
00052      void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00053           int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
00054         void AddPolygonalFace (const int        ElementID,
00055                                std::vector<int> nodes_ids);
00056         void AddPolyhedralVolume (const int        ElementID,
00057                                   std::vector<int> nodes_ids,
00058                                   std::vector<int> quantities);
00059         // special methods for quadratic elements
00060      void AddEdge(int NewEdgeID, int n1, int n2, int n12);
00061         void AddFace(int NewFaceID, int n1, int n2, int n3,
00062                      int n12, int n23, int n31);
00063         void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
00064                      int n12, int n23, int n34, int n41);
00065         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
00066                        int n12, int n23, int n31, int n14, int n24, int n34);
00067         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5,
00068                        int n12, int n23, int n34, int n41,
00069                        int n15, int n25, int n35, int n45);
00070         void AddVolume(int NewVolID, int n1, int n2, int n3,
00071                        int n4, int n5, int n6,
00072                        int n12, int n23, int n31,
00073                        int n45, int n56, int n64,
00074                        int n14, int n25, int n36);
00075         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
00076                        int n5, int n6, int n7, int n8,
00077                        int n12, int n23, int n34, int n41,
00078                        int n56, int n67, int n78, int n85,
00079                        int n15, int n26, int n37, int n48);
00080         
00081      void MoveNode(int NewNodeID, double x, double y, double z);
00082      void RemoveNode(int NodeID);
00083      void RemoveElement(int ElementID);
00084      void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
00085      void ChangePolyhedronNodes(const int ElementID,
00086                                    std::vector<int> nodes_ids,
00087                                    std::vector<int> quantities);
00088      void Renumber (const bool isNodes, const int startID, const int deltaID);
00089      SMESHDS_CommandType GetType();
00090      int GetNumber();
00091      const std::list<int> & GetIndexes();
00092      const std::list<double> & GetCoords();
00093       ~SMESHDS_Command();
00094   private:
00095      SMESHDS_CommandType myType;
00096      int myNumber;
00097      std::list<double> myReals;
00098      std::list<int> myIntegers;
00099 };
00100 #endif