Salome HOME
Speed up "Clear mesh data"
[modules/smesh.git] / src / SMESHDS / SMESHDS_Script.cxx
index 3f2b012541112226b1ed377bef41ff95bac15a35..d04795b0b0c44eef5ca4b663f288b049e81e609f 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -89,6 +89,10 @@ SMESHDS_Command* SMESHDS_Script::getCommand(const SMESHDS_CommandType aType)
 //=======================================================================
 void SMESHDS_Script::AddNode(int NewNodeID, double x, double y, double z)
 {
+  if(myIsEmbeddedMode){
+    myIsModified = true;
+    return;
+  }
   getCommand(SMESHDS_AddNode)->AddNode(NewNodeID, x, y, z);
 }
 
@@ -313,7 +317,21 @@ void SMESHDS_Script::Renumber (const bool isNodes, const int startID, const int
     myIsModified = true;
     return;
   }
-  getCommand(SMESHDS_Renumber)->Renumber( isNodes, startID, deltaID );
+  getCommand(SMESHDS_Renumber);
+}
+
+//=======================================================================
+//function : ClearMesh
+//purpose  : 
+//=======================================================================
+void SMESHDS_Script::ClearMesh ()
+{
+  if(myIsEmbeddedMode){
+    myIsModified = true;
+    return;
+  }
+  Clear();// previous commands become useless to reproduce on client side
+  getCommand(SMESHDS_ClearAll);
 }
 
 //=======================================================================