X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=test%2FSMESH_Nut.py;h=884d7e12e760e836739beb8e58d3d19b908aa9f5;hp=d6f142dc3aa4adb94289d79268f3e849f584965c;hb=HEAD;hpb=4cf07a14111e98e8889620ee7e6371574c31a50c diff --git a/test/SMESH_Nut.py b/test/SMESH_Nut.py index d6f142dc3..aacfcadd1 100644 --- a/test/SMESH_Nut.py +++ b/test/SMESH_Nut.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -129,8 +129,8 @@ smesh.SetName(hAvLength, "AverageLength_"+str(theAverageLength)) print("-------------------------- MaxElementArea") theMaxElementArea = 20 -algoMef = mesh.Triangle(smeshBuilder.MEFISTO) -hArea = algoMef.MaxElementArea( theMaxElementArea ) +algoTri = mesh.Triangle() +hArea = algoTri.MaxElementArea( theMaxElementArea ) print(hArea.GetName()) print(hArea.GetId()) print(hArea.GetMaxElementArea()) @@ -147,7 +147,9 @@ smesh.SetName(hVolume, "MaxElementVolume_"+str(theMaxElementVolume)) print("-------------------------- compute the mesh of the mechanic piece") -mesh.Compute() +isDone = mesh.Compute() +if not isDone: + raise Exception("Error when computing Mesh") print("Information about the Nut:") print("Number of nodes : ", mesh.NbNodes())