sleep(1)
- logging.warning('The algo script is not implemented! Return default values...')
- limits = [0.0, 100.0]
+ geom_builder_types = { GEOM.EDGE : 'EDGE', GEOM.FACE : 'FACE', GEOM.SOLID : 'SOLID' }
+ type_str = geom_builder_types[selection_level]
+ shape_type = geompy.ShapeType[type_str]
+
+ logging.info('Computing Min / Max...')
+ if type_str == "EDGE":
+ basicProp = 0
+ elif type_str == "FACE":
+ basicProp = 1
+ elif type_str == "SOLID":
+ basicProp = 2
+ else :
+ logging.info("Problème avec la définition du type d'élément !")
+ return False
+
+ lElements = geompy.SubShapeAll(source_solid, shape_type)
+ minSize = 1e7
+ maxSize = -1
+ for element in lElements:
+ size = geompy.BasicProperties(element)[basicProp]
+ if size < minSize :
+ minSize = size
+ if size > maxSize :
+ maxSize = size
+ limits = [minSize, maxSize]
logging.info('Done.')
progress_emitter.emit()