Problem Fatal Exception Case

This commit is contained in:
NathalieGore 2024-09-27 13:38:20 +02:00
parent d270b0ab08
commit 4e90f531cf

View File

@ -32,10 +32,13 @@ from salome.geom import geomBuilder
from qtsalome import QFileDialog, QApplication, pyqtSignal
import GEOM
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New()
salome.salome_init()
geompy = geomBuilder.New()
def run(args_dict, progress_emitter):
"""
Helper function to call run() with arguments parsed from dictionary.
@ -75,14 +78,26 @@ def run(args_dict, progress_emitter):
logging.info('\Debug: %s', Debug)
progress_emitter.emit()
for i in range(5000):
vertex = geompy.MakeVertex(0,0,0)
logging.info('\I: %s', i)
nbTry = 500
ratioMin = 0.09
ratioMax = 0.11
for i in range(nbTry):
face = geompy.ImportBREP("FatalException.brep")
aire = geompy.BasicProperties(face)[1]
Mesh = smesh.Mesh(face,'Mesh')
MG_CADSurf = Mesh.Triangle(algo=smeshBuilder.MG_CADSurf)
MG_CADSurf_Parameters = MG_CADSurf.Parameters()
MG_CADSurf_Parameters.SetMaxSize( ratioMax * aire )
MG_CADSurf_Parameters.SetMinSize( ratioMin * aire )
MG_CADSurf_Parameters.SetPhySize( aire * ((ratioMin+2*ratioMax)/3) )
MG_CADSurf_Parameters.SetGradation( 1.1 )
isDone = Mesh.Compute()
if not progress_emitter.emit():
return False
return False
return vertex
progress_emitter.emit()
return face
def test():