MeshSet¶
This page documents the core MeshSet API.
Filter-specific methods are documented in Filters to avoid
duplicating the full filter list here.
Methods¶
- MeshSet.__init__(...)¶
__init__(self) -> None
- MeshSet.__len__(...)¶
__len__(self) -> int
- MeshSet.__repr__(self, /)¶
Return repr(self).
- MeshSet.apply_filter(...)¶
apply_filter(self, filter: str, params: dict = {}) -> _meshlab.FilterRunResult
- MeshSet.clear(...)¶
clear(self) -> None
- MeshSet.current_mesh(...)¶
current_mesh(self) -> object
The current Mesh object. Raises if the MeshSet has no current mesh.
- MeshSet.current_mesh_id(...)¶
current_mesh_id(self) -> int
Persistent id of the current mesh – NOT its index. Raises if the MeshSet has no current mesh. Render-state JSON wants this value as a string: {‘mesh_id’: str(ms.current_mesh_id()), ‘settings’: {…}}.
- MeshSet.current_mesh_index(...)¶
current_mesh_index(self) -> int
0-based position of the current mesh in the layer list, or -1 if there is none.
- MeshSet.current_raster(...)¶
current_raster(self) -> int
- MeshSet.filter_list(...)¶
filter_list(self) -> list[str]
- MeshSet.is_current_mesh_visible(...)¶
is_current_mesh_visible(self) -> bool
- MeshSet.is_mesh_visible(...)¶
is_mesh_visible(self, index: int) -> bool
Whether the mesh at this 0-based position is visible.
- MeshSet.list_filters(...)¶
list_filters(self) -> list[_meshlab.FilterInfo]
- MeshSet.load_new_mesh(...)¶
load_new_mesh(self, path: str) -> None
- MeshSet.load_new_raster(...)¶
load_new_raster(self, file_name: str) -> None
- MeshSet.load_project(...)¶
load_project(self, file_name: str) -> None
- MeshSet.mesh(...)¶
mesh(self, index: int) -> object
Mesh at this 0-based position in the layer list.
- MeshSet.mesh_id(...)¶
mesh_id(self, index: int) -> int
Persistent id of the mesh at this 0-based position, for building render-state JSON covering meshes other than the current one.
- MeshSet.mesh_id_exists(...)¶
mesh_id_exists(self, id: int) -> bool
Whether a mesh with this persistent id is still in the document. Takes an id, not an index: ids are never reused, so a stale one is simply False.
- MeshSet.mesh_number(...)¶
mesh_number(self) -> int
- MeshSet.raster_number(...)¶
raster_number(self) -> int
- MeshSet.render_snapshot(...)¶
render_snapshot(self, render_state_json: str, width: int, height: int) -> bytes
- MeshSet.save_current_mesh(...)¶
save_current_mesh(self, path: str) -> None
- MeshSet.save_project(...)¶
save_project(self, file_name: str) -> None
- MeshSet.set_current_mesh(...)¶
set_current_mesh(self, index: int) -> None
Make the mesh at this 0-based position current.
- MeshSet.set_current_mesh_visibility(...)¶
set_current_mesh_visibility(self, visibility: bool) -> None
- MeshSet.set_current_raster(...)¶
set_current_raster(self, index: int) -> None
- MeshSet.set_mesh_visibility(...)¶
set_mesh_visibility(self, index: int, visibility: bool) -> None
Show or hide the mesh at this 0-based position. Takes an index, matching the positional ‘mesh_visibility’ array in render-state JSON.