lagrange.scripts.meshstat¶
Print basic information about a mesh file.
Attributes¶
Functions¶
|
|
|
|
|
|
|
|
|
Ensure the UV attribute is indexed and float64. Returns (id, name). |
|
|
|
|
|
Populate |
|
Populate |
|
Populate |
|
Populate |
|
Return summary statistics for a 1-D numpy array, ignoring non-finite values. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Convert numpy scalars/arrays/Path objects to JSON-serializable types. |
Module Contents¶
- lagrange.scripts.meshstat._colored(text, color)¶
- Parameters:
text (str)
color (str)
- Return type:
str
- lagrange.scripts.meshstat._dtype_to_str(dtype)¶
- Return type:
str
- lagrange.scripts.meshstat._element_to_str(element)¶
- Return type:
str
- lagrange.scripts.meshstat._facet_type(mesh)¶
- Return type:
tuple[str, dict | None]
- lagrange.scripts.meshstat._normalize_uv_attribute(mesh, uv_attr_id)¶
Ensure the UV attribute is indexed and float64. Returns (id, name).
- Parameters:
uv_attr_id (int)
- Return type:
tuple[int, str]
- lagrange.scripts.meshstat._safe_attribute_name(name)¶
- Parameters:
name (str)
- Return type:
str
- lagrange.scripts.meshstat._usage_to_str(usage)¶
- Return type:
str
- lagrange.scripts.meshstat.collect_attributes(mesh, info)¶
Populate
info["attributes"]with the list of user-visible attributes.- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.collect_basic_info(mesh, info)¶
Populate
info["basic"]with mesh shape/bbox metadata.Initializes mesh edges if needed so
num_edgesis reported correctly (SurfaceMesh.num_edgesreturns 0 untilinitialize_edgeshas been called).- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.collect_extended_info(mesh, info)¶
Populate
info["extended"]with topology/manifoldness checks.- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.collect_uv_info(mesh, info, metrics)¶
Populate
info["uv"]with per-UV-attribute metrics (charts/flips/overlap/seams/distortion).Assumes
meshis already a triangle mesh.- Parameters:
info (dict)
metrics (list)
- Return type:
None
- lagrange.scripts.meshstat.compute_stats(values, percentiles=(1, 10, 25, 75, 90, 99))¶
Return summary statistics for a 1-D numpy array, ignoring non-finite values.
- Parameters:
values (numpy.ndarray)
- Return type:
dict
- lagrange.scripts.meshstat.main(argv=None)¶
- Parameters:
argv (list | None)
- Return type:
int
- lagrange.scripts.meshstat.parse_args(argv=None)¶
- Parameters:
argv (list | None)
- Return type:
argparse.Namespace
- lagrange.scripts.meshstat.print_attributes(mesh, info)¶
- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.print_bad(message)¶
- Parameters:
message (str)
- Return type:
None
- lagrange.scripts.meshstat.print_basic_info(mesh, info)¶
- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.print_extra_info(mesh, info)¶
- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.print_header(message)¶
- Parameters:
message (str)
- Return type:
None
- lagrange.scripts.meshstat.print_property(name, value, expected=None)¶
- Parameters:
name (str)
- Return type:
None
- lagrange.scripts.meshstat.print_section(message)¶
- Parameters:
message (str)
- Return type:
None
- lagrange.scripts.meshstat.print_uv_info(info)¶
- Parameters:
info (dict)
- Return type:
None
- lagrange.scripts.meshstat.run(args)¶
- Parameters:
args (argparse.Namespace)
- Return type:
int
- lagrange.scripts.meshstat.save_info(mesh_file, info)¶
- Parameters:
mesh_file (str)
info (dict)
- Return type:
pathlib.Path
- lagrange.scripts.meshstat.to_jsonable(value)¶
Convert numpy scalars/arrays/Path objects to JSON-serializable types.
- lagrange.scripts.meshstat._DISTORTION_METRIC_NAMES = ['Dirichlet', 'InverseDirichlet', 'SymmetricDirichlet', 'AreaRatio', 'MIPS']¶
- lagrange.scripts.meshstat.logger¶