mesh1.Compute()
mesh2.Compute()
-# ---- udate object browser
-salome.sg.updateObjBrowser(1);
+# ---- update object browser
+salome.sg.updateObjBrowser(1)
Compound2 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05, True)
smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems')
#end
+
+salome.sg.updateObjBrowser(1)
my_hexa.Quadrangle()
my_hexa.Hexahedron()
my_hexa.Compute()
+
+salome.sg.updateObjBrowser(1)
print hypVolume.GetMaxElementVolume()
smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume))
-
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute shell"
ret = mesh.Compute()
print ret
print "Number of tetrahedrons: ", mesh.NbTetras()
else:
print "probleme when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
print hypVolume.GetMaxElementVolume()
smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume))
-
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute shell"
ret = mesh.Compute()
print ret
print "Number of tetrahedrons: ", mesh.NbTetras()
else:
print "probleme when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
print hypVolume.GetMaxElementVolume()
smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume))
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute the mesh of the boxe"
ret = mesh.Compute()
print ret
print "Number of tetrahedrons: ", mesh.NbTetras()
else:
print "probleme when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
hexa3D = mesh.Hexahedron()
hexa3D.SetName("Hexa_3D")
-
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute compshell"
ret = mesh.Compute()
print ret
print "Number of hexahedrons : ", mesh.NbHexas()
else:
print "problem when Computing the mesh"
+
+salome.sg.updateObjBrowser(1)
netgen.SetFineness( smeshBuilder.Fine )
#netgen.SetOptimize( 1 )
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute mesh"
ret = mesh.Compute()
print ret
else:
print "problem when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
print hypVolume.GetMaxElementVolume()
smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume))
-
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute compshell"
ret = mesh.Compute(mesh)
print ret
else:
print "problem when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
print hypLengthFromEdge.GetId()
smesh.SetName(hypLengthFromEdge,"LengthFromEdge")
-
-salome.sg.updateObjBrowser(1)
-
-
print "-------------------------- compute the skin flight"
ret = mesh.Compute()
print ret
print "Number of volumes : ", mesh.NbVolumes()
else:
print "probleme when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
netgen.SetQuadAllowed( 1 )
#netgen.SetOptimize( 1 )
-salome.sg.updateObjBrowser(1)
-
print "-------------------------- compute mesh"
ret = mesh.Compute()
print ret
else:
print "problem when computing the mesh"
+
+salome.sg.updateObjBrowser(1)
#ii = ii+1
ii = ii+1
print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3)
+
+salome.sg.updateObjBrowser(1)
# ----------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ----------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ----------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
mixed.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ----------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# --------------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# -------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ------------------
hexa.Compute()
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ------------------
hexa.Compute()
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# --------------------
hexa_groupe = hexa.Group(groupe)
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# ------------------------
tetra.Group(group)
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
\ No newline at end of file
hexa.Group(group_a)
hexa.Group(group_b)
hexa.Group(group_1)
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
print "Ok: tepal"
else:
print "KO: tepal"
+
+# Update object browser
+# ---------------------
+
+salome.sg.updateObjBrowser(1)
# @param discardModifs if True and the mesh has been edited since
# a last total re-compute and that may prevent successful partial re-compute,
# then the mesh is cleaned before Compute()
+ # @param refresh if @c True, Object browser is automatically updated (when running in GUI)
# @return True or False
# @ingroup l2_construct
- def Compute(self, geom=0, discardModifs=False):
+ def Compute(self, geom=0, discardModifs=False, refresh=False):
if geom == 0 or not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object):
if self.geom == 0:
geom = self.mesh.GetShapeToMesh()
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) )
- salome.sg.updateObjBrowser(1)
+ if refresh: salome.sg.updateObjBrowser(1)
pass
return ok
return self.mesh.SetMeshOrder(submeshes)
## Removes all nodes and elements
+ # @refresh if @c True, Object browser is automatically updated (when running in GUI)
# @ingroup l2_construct
- def Clear(self):
+ def Clear(self, refresh=False):
self.mesh.Clear()
if ( salome.sg.hasDesktop() and
- salome.myStudyManager.GetStudyByID( self.mesh.GetStudyId() )):
+ salome.myStudyManager.GetStudyByID( self.mesh.GetStudyId() ) ):
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
- salome.sg.updateObjBrowser(1)
+ if refresh: salome.sg.updateObjBrowser(1)
## Removes all nodes and elements of indicated shape
+ # @refresh if @c True, Object browser is automatically updated (when running in GUI)
# @ingroup l2_construct
- def ClearSubMesh(self, geomId):
+ def ClearSubMesh(self, geomId, refresh=False):
self.mesh.ClearSubMesh(geomId)
if salome.sg.hasDesktop():
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
- salome.sg.updateObjBrowser(1)
+ if refresh: salome.sg.updateObjBrowser(1)
## Computes a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron
# @param fineness [0.0,1.0] defines mesh fineness