meshlabxml/files.py
def measure_all(fbasename=None, log=None, ml_version=ml_version):
    """Measures mesh geometry, aabb and topology."""
    ml_script1_file = 'TEMP3D_measure_gAndT.mlx'
    if ml_version == '1.3.4BETA':
        file_out = 'TEMP3D_aabb.xyz'
    else:
        file_out = None

    ml_script1 = mlx.FilterScript(file_in=fbasename, file_out=file_out, ml_version=ml_version)
    compute.measure_geometry(ml_script1)
    compute.measure_topology(ml_script1)
    ml_script1.save_to_file(ml_script1_file)
    ml_script1.run_script(log=log, script_file=ml_script1_file)
    geometry = ml_script1.geometry
    topology = ml_script1.topology

    if ml_version == '1.3.4BETA':
        if log is not None:
            log_file = open(log, 'a')
            log_file.write(
                '***Axis Aligned Bounding Results for file "%s":\n' %
                fbasename)
            log_file.close()
        aabb = measure_aabb(file_out, log)
    else:
        aabb = geometry['aabb']
    return aabb, geometry, topology
def measure_all(fbasename=None, log=None, ml_version=ml_version):
    ml_script1_file = 'TEMP3D_measure_gAndT.mlx'
    if ml_version == '1.3.4BETA':
        file_out = 'TEMP3D_aabb.xyz'
    else:
        file_out = None

    ml_script1 = mlx.FilterScript(file_in=fbasename, file_out=file_out, ml_version=ml_version)
    compute.measure_geometry(ml_script1)
    compute.measure_topology(ml_script1)
    ml_script1.save_to_file(ml_script1_file)
    ml_script1.run_script(log=log, script_file=ml_script1_file)
    geometry = ml_script1.geometry
    topology = ml_script1.topology

    if ml_version == '1.3.4BETA':
        if log is not None:
            log_file = open(log, 'a')
            log_file.write(
                '***Axis Aligned Bounding Results for file "%s":\n' %
                fbasename)
            log_file.close()
        aabb = measure_aabb(file_out, log)
    else:
        aabb = geometry['aabb']
    return aabb, geometry, topology
def measure_all ( fbasename = None , log = None , ml_version = ml_version ) : ml_script1_file = 'TEMP3D_measure_gAndT.mlx' if ml_version == '1.3.4BETA' : file_out = 'TEMP3D_aabb.xyz' else : file_out = None ml_script1 = mlx . FilterScript ( file_in = fbasename , file_out = file_out , ml_version = ml_version ) compute . measure_geometry ( ml_script1 ) compute . measure_topology ( ml_script1 ) ml_script1 . save_to_file ( ml_script1_file ) ml_script1 . run_script ( log = log , script_file = ml_script1_file ) geometry = ml_script1 . geometry topology = ml_script1 . topology if ml_version == '1.3.4BETA' : if log is not None : log_file = open ( log , 'a' ) log_file . write ( '***Axis Aligned Bounding Results for file "%s":\n' % fbasename ) log_file . close ( ) aabb = measure_aabb ( file_out , log ) else : aabb = geometry [ 'aabb' ] return aabb , geometry , topology
Measures mesh geometry, aabb and topology.
Measures mesh geometry aabb and topology .