(mesh, info)
| 41 | info["vertex_per_voxel"] = mesh.vertex_per_voxel; |
| 42 | |
| 43 | def print_bbox(mesh, info): |
| 44 | print_section_header("Boundding box"); |
| 45 | if mesh.num_vertices == 0: |
| 46 | print_red("Cannot compute bbox on empty mesh."); |
| 47 | return; |
| 48 | bbox_min, bbox_max = mesh.bbox; |
| 49 | if mesh.dim == 3: |
| 50 | print_format = "[{v[0]:^10.6g} {v[1]:^10.6g} {v[2]:^10.6g}]"; |
| 51 | elif mesh.dim == 2: |
| 52 | print_format = "[{v[0]:^10.6g} {v[1]:^10.6g}]"; |
| 53 | print("bbox_min: " + print_format.format(v=bbox_min)); |
| 54 | print("bbox_max: " + print_format.format(v=bbox_max)); |
| 55 | print("bbox_size: " + print_format.format(v=bbox_max - bbox_min)); |
| 56 | |
| 57 | info["bbox_min"] = bbox_min.tolist(); |
| 58 | info["bbox_max"] = bbox_max.tolist(); |
| 59 | |
| 60 | def quantile_breakdown(data, name, info, title=None, with_total=True): |
| 61 | if title is None: |
no test coverage detected