Back to index

salome-smesh  6.5.0
SMESHDS_Script.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00023 //  SMESH SMESHDS : management of mesh data and SMESH document
00024 //  File   : SMESHDS_Script.hxx
00025 //  Module : SMESH
00026 //
00027 #ifndef _SMESHDS_Script_HeaderFile
00028 #define _SMESHDS_Script_HeaderFile
00029 
00030 #include "SMESH_SMESHDS.hxx"
00031 
00032 #include "SMESHDS_Command.hxx"
00033 
00034 #include <list>
00035 #include <vector>
00036 
00037 
00038 class SMESHDS_EXPORT SMESHDS_Script
00039 {
00040   public:
00041         SMESHDS_Script(bool theIsEmbeddedMode);
00042         ~SMESHDS_Script();
00043   
00044         void SetModified(bool theModified);
00045         bool IsModified();
00046 
00047         void AddNode(int NewNodeID, double x, double y, double z);
00048         void Add0DElement(int New0DElementID, int idnode);
00049         void AddEdge(int NewEdgeID, int idnode1, int idnode2);
00050         void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
00051         void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
00052                 int idnode4);
00053         void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00054                 int idnode4);
00055         void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00056                 int idnode4, int idnode5);
00057         void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00058                 int idnode4, int idnode5, int idnode6);
00059         void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00060                 int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
00061         void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
00062                        int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
00063                        int idnode9, int idnode10, int idnode11, int idnode12);
00064 
00065         void AddPolygonalFace (const int NewFaceID,
00066                                std::vector<int> nodes_ids);
00067         void AddPolyhedralVolume (const int NewVolID,
00068                                   std::vector<int> nodes_ids,
00069                                   std::vector<int> quantities);
00070 
00071         // special methods for quadratic elements
00072         void AddEdge(int NewEdgeID, int n1, int n2, int n12);
00073         void AddFace(int NewFaceID, int n1, int n2, int n3,
00074                      int n12, int n23, int n31);
00075         void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
00076                      int n12, int n23, int n34, int n41);
00077         void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
00078                      int n12, int n23, int n34, int n41, int nCenter);
00079         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
00080                        int n12, int n23, int n31, int n14, int n24, int n34);
00081         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5,
00082                        int n12, int n23, int n34, int n41,
00083                        int n15, int n25, int n35, int n45);
00084         void AddVolume(int NewVolID, int n1, int n2, int n3,
00085                        int n4, int n5, int n6,
00086                        int n12, int n23, int n31,
00087                        int n45, int n56, int n64,
00088                        int n14, int n25, int n36);
00089         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
00090                        int n5, int n6, int n7, int n8,
00091                        int n12, int n23, int n34, int n41,
00092                        int n56, int n67, int n78, int n85,
00093                        int n15, int n26, int n37, int n48);
00094         void AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
00095                        int n5,  int n6,  int n7,  int n8,
00096                        int n12, int n23, int n34, int n41,
00097                        int n56, int n67, int n78, int n85,
00098                        int n15, int n26, int n37, int n48,
00099                        int n1234,int n1256,int n2367,int n3478,
00100                        int n1458,int n5678,int nCenter);
00101        void MoveNode(int NewNodeID, double x, double y, double z);
00102         void RemoveNode(int NodeID);
00103         void RemoveElement(int ElementID);
00104         void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
00105         void ChangePolyhedronNodes(const int        ElementID,
00106                                    std::vector<int> nodes_ids,
00107                                    std::vector<int> quantities);
00108         void Renumber (const bool isNodes, const int startID, const int deltaID);
00109         void ClearMesh();
00110         void Clear();
00111         const std::list<SMESHDS_Command*> & GetCommands();
00112 
00113   private:
00114         SMESHDS_Command* getCommand(const SMESHDS_CommandType aType);
00115 
00116         std::list<SMESHDS_Command*> myCommands;
00117 
00118         bool myIsEmbeddedMode;
00119         bool myIsModified;
00120 };
00121 
00122 #endif