def measure_section(fbasename=None, log=None, axis='<STR_LIT:z>', offset=<NUM_LIT:0.0>,<EOL>rotate_x_angle=None, ml_version=ml_version):
ml_script1_file = '<STR_LIT>'<EOL>file_out = '<STR_LIT>'<EOL>ml_script1 = mlx.FilterScript(file_in=fbasename, file_out=file_out, ml_version=ml_version)<EOL>if rotate_x_angle is not None:<EOL><INDENT>transform.rotate(ml_script1, axis='<STR_LIT:x>', angle=rotate_x_angle)<EOL><DEDENT>compute.section(ml_script1, axis=axis, offset=offset)<EOL>layers.delete_lower(ml_script1)<EOL>ml_script1.save_to_file(ml_script1_file)<EOL>ml_script1.run_script(log=log, script_file=ml_script1_file)<EOL>aabb = measure_aabb(file_out, log)<EOL>return aabb<EOL>
Measure a cross section of a mesh

    Perform a plane cut in one of the major axes (X, Y, Z). If you want to cut on
    a different plane you will need to rotate the model in place, perform the cut,
    and rotate it back.

    Args:
        fbasename (str): filename of input model
        log (str): filename of log file
        axis (str): axis perpendicular to the cutting plane, e.g. specify "z" to cut
            parallel to the XY plane.
        offset (float): amount to offset the cutting plane from the origin
        rotate_x_angle (float): degrees to rotate about the X axis. Useful for correcting "Up" direction: 90 to rotate Y to Z, and -90 to rotate Z to Y. 

    Returns:
        dict: dictionary with the following keys for the aabb of the section:
            min (list): list of the x, y & z minimum values
            max (list): list of the x, y & z maximum values
            center (list): the x, y & z coordinates of the center of the aabb
            size (list): list of the x, y & z sizes (max - min)
            diagonal (float): the diagonal of the aabb