From: eap Date: Tue, 27 Aug 2019 11:13:23 +0000 (+0300) Subject: #17319: EDF 20003 - suppress Meshes in TUI X-Git-Tag: V9_4_0a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66f913b2532f95303d193ebe98273f11782798fb;p=modules%2Fsmesh.git #17319: EDF 20003 - suppress Meshes in TUI --- diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 26332db27..464cf3714 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -475,6 +475,24 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ): obj,name = name,obj return Mesh(self, self.geompyD, obj, name) + def RemoveMesh( self, mesh ): + """ + Delete a mesh + """ + if isinstance( mesh, Mesh ): + mesh = mesh.GetMesh() + pass + if not isinstance( mesh, SMESH._objref_SMESH_Mesh ): + raise TypeError("%s is not a mesh" % mesh ) + so = salome.ObjectToSObject( mesh ) + if so: + sb = salome.myStudy.NewBuilder() + sb.RemoveObjectWithChildren( so ) + else: + mesh.UnRegister() + pass + return + def EnumToLong(self,theItem): """ Return a long value from enumeration