mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-26 08:00:34 +05:00
[bos #38044][EDF] (2023-T3) Support for automatic reparation. An attempt to pass to the parent process an ID instead of reference for result object.
This commit is contained in:
parent
0c71d36f22
commit
6bc13470f7
@ -196,6 +196,10 @@ def execute(selected_object, algo_name, args_dict, is_dump_on = True, is_copy_on
|
|||||||
logger.error('Could not get a result object after exec of %s file!', str(algo_name))
|
logger.error('Could not get a result object after exec of %s file!', str(algo_name))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# Temporary case to check of it's safe to passe result as ID instead of object
|
||||||
|
result_object = geompy.GetObject(result_object)
|
||||||
|
geompy.addToStudy(result_object, args_dict['result_name'])
|
||||||
|
|
||||||
if is_dump_on:
|
if is_dump_on:
|
||||||
args_str = make_dump_args(algo_name, args_dict_str, is_dump_on, is_copy_on)
|
args_str = make_dump_args(algo_name, args_dict_str, is_dump_on, is_copy_on)
|
||||||
save_to_dump(geompy, selected_object, result_object, args_str)
|
save_to_dump(geompy, selected_object, result_object, args_str)
|
||||||
|
@ -29,7 +29,7 @@ from time import sleep
|
|||||||
import salome
|
import salome
|
||||||
|
|
||||||
from salome.geom import geomBuilder
|
from salome.geom import geomBuilder
|
||||||
from qtsalome import QFileDialog, QApplication, pyqtSignal
|
from qtsalome import QFileDialog, QApplication
|
||||||
import GEOM
|
import GEOM
|
||||||
|
|
||||||
import SMESH, SALOMEDS
|
import SMESH, SALOMEDS
|
||||||
@ -77,27 +77,36 @@ def run(args_dict, progress_emitter):
|
|||||||
logging.info('\Tol_max: %s', maxTol)
|
logging.info('\Tol_max: %s', maxTol)
|
||||||
logging.info('\Debug: %s', Debug)
|
logging.info('\Debug: %s', Debug)
|
||||||
|
|
||||||
progress_emitter.emit()
|
# Temporary case to check of it's safe to passe result as ID instead of object
|
||||||
nbTry = 500
|
box = geompy.MakeBoxDXDYDZ(200, 400, 300)
|
||||||
ratioMin = 0.09
|
entry = box.GetEntry()
|
||||||
ratioMax = 0.11
|
print('entry: ', entry)
|
||||||
for i in range(nbTry):
|
return entry
|
||||||
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
|
|
||||||
|
|
||||||
progress_emitter.emit()
|
# return entry
|
||||||
|
# return box
|
||||||
|
|
||||||
return face
|
# progress_emitter.emit()
|
||||||
|
# nbTry = 500
|
||||||
|
# ratioMin = 0.09
|
||||||
|
# ratioMax = 0.11
|
||||||
|
# for i in range(nbTry):
|
||||||
|
# face = geompy.ImportBREP("/home/kleontev/dev/38044_auto_repair/ImportBrepCrash/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
|
||||||
|
|
||||||
|
# progress_emitter.emit()
|
||||||
|
|
||||||
|
# return face
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
|
Loading…
Reference in New Issue
Block a user