# -*- 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
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())
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())