# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(salome.myStudy)
+smesh = smeshBuilder.New()
-# ---- define a boxe
+# ---- define a box
box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
### ---------------------------- SMESH --------------------------------------
-# ---- init a Mesh with the boxe
+# ---- init a Mesh with the box
mesh = smesh.Mesh(box, "MeshBox")
print(hypVolume.GetMaxElementVolume())
smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume))
-print("-------------------------- compute the mesh of the boxe")
+print("-------------------------- compute the mesh of the box")
ret = mesh.Compute()
print(ret)
if ret != 0:
log = mesh.GetLog(0) # no erase trace
- for linelog in log:
- print(linelog)
+ # for linelog in log:
+ # print(linelog)
print("Information about the MeshBox:")
print("Number of nodes : ", mesh.NbNodes())
print("Number of edges : ", mesh.NbEdges())
else:
print("probleme when computing the mesh")
-salome.sg.updateObjBrowser(True)
+salome.sg.updateObjBrowser()