X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fex12_grid17partition.py;h=13cfc13a2bc2344b4fe19eac0568cca9a53cf8db;hb=0fc0831670e27a5611b941c52dc152fd63964515;hp=55164b7778e578751d408f59afa60c92486686ef;hpb=e18c7bf13376458fb15a7866f246fe376702c9fb;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/ex12_grid17partition.py b/src/SMESH_SWIG/ex12_grid17partition.py index 55164b777..13cfc13a2 100644 --- a/src/SMESH_SWIG/ex12_grid17partition.py +++ b/src/SMESH_SWIG/ex12_grid17partition.py @@ -1,5 +1,5 @@ # -*- 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 @@ -27,16 +27,19 @@ import salome 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() + +import time +t1= time.time() # Geometry # ======== -# grid compound of 17 x 17 elements +# grid compound of 3 x 3 elements # an element is compound of 3 concentric cylinders # an element is centered in a square of the grid @@ -56,7 +59,7 @@ g_rayon1 = 20 g_rayon2 = 30 g_rayon3 = 40 -g_grid = 17 +g_grid = 3 g_trim = 1000 @@ -120,6 +123,8 @@ piece = geompy.MakeMultiTranslation2D(c_element, geompy.MakeVectorDXDYDZ(1, 0, 0 piece_id = geompy.addToStudy(piece, "ex12_grid17partition") +t2= time.time() + # Meshing # ======= @@ -140,7 +145,12 @@ hexa.Hexahedron() hexa.Compute() +t3= time.time() + +print ("time geom",t2-t1) +print ("time mesh",t3-t2 ) + # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser()