logger.error('Could not get a result object after exec of %s file!', str(algo_name))
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:
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)
import salome
from salome.geom import geomBuilder
-from qtsalome import QFileDialog, QApplication, pyqtSignal
+from qtsalome import QFileDialog, QApplication
import GEOM
import SMESH, SALOMEDS
logging.info('\Tol_max: %s', maxTol)
logging.info('\Debug: %s', Debug)
- progress_emitter.emit()
- 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
-
- progress_emitter.emit()
-
- return face
+ # Temporary case to check of it's safe to passe result as ID instead of object
+ box = geompy.MakeBoxDXDYDZ(200, 400, 300)
+ entry = box.GetEntry()
+ print('entry: ', entry)
+ return entry
+
+ # return entry
+ # return box
+
+ # 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():