Compute Overall Measurements (Mesh) - User Manual
Dragonfly Prototype Apps · Compute Overall Measurements (Mesh)...
Version 1.0 · 2026-07-04
English Manual
Contents
1. Overview
2. Use Cases
3. Installation and Enabling
4. Runtime Environment and First-Run Setup
5. Interface Guide
6. Step-by-Step Usage
7. Parameters
8. Outputs
9. FAQ and Troubleshooting
10. Notes and Known Limitations
11. References
1. Overview
Compute Overall Measurements (Mesh) is a Dragonfly Prototype Apps plugin that reports a full set of whole-mesh (global) scalar measurements for any surface mesh already present in your scene. Simply pick a mesh from the dropdown, click Compute, and the panel shows the results directly as a grouped table: topology and integrity checks, size measurements, shape descriptors, convexity metrics, and principal moments of inertia.
The plugin is read-only: it reads the mesh vertices and triangle faces, computes the scalars, and displays the table in the panel. Nothing is written back onto the mesh, and no scene object is modified. A Copy results button exports the whole table as tab-separated text for pasting into reports or spreadsheets.
Underlying engine and algorithms: the geometry compute runs in an isolated Windows venv subprocess built on permissive open-source scientific Python libraries. The dependencies and version constraints are: trimesh>=4.0,<5.0 (area, volume, inertia, convex hull, watertightness / Euler number, bounding boxes), scipy>=1.10 (convex hull via qhull + oriented bounding box), and numpy>=1.24,<2.0. All ship prebuilt wheels — no local compilation is required.
License notes: the three dependencies trimesh, scipy, and numpy are all permissively licensed (MIT / BSD). There is no libigl, CGAL, or any GPL component, which makes the plugin suitable for commercial and internal engineering workflows.
This plugin reports whole-mesh scalars. If you need per-vertex scalar fields written back onto the mesh with a colormap (curvature, thickness, geodesic distance, roughness, …), use the companion plugin Compute Vertex Measurements (Mesh).
2. Use Cases
The plugin is ideal for quantitatively characterizing objects that were segmented and reconstructed as meshes. Typical applications include:
- Particle / grain shape analysis in materials science — describe particle or grain shape with sphericity, solidity, and compactness.
- Porosity and defect checks in industrial CT of castings and additive-manufactured (AM) parts — verify the enclosed volume of pores and defects.
- Morphology measurements in life-science imaging — measure surface area, volume, bounding boxes, and inertia of cells, bones, or organs.
- Quality check before 3D printing or simulation — quickly confirm whether a mesh is watertight and topologically sound (connected components, genus) before sending it downstream.
Any object that can be represented as a surface mesh in Dragonfly can serve as input for overall measurement.
3. Installation and Enabling
1. Download the Prototype Apps online package from ImageFly and extract it. Close Dragonfly, run install_prototype_apps.exe and select the Dragonfly version to install into.
2. Start Dragonfly, open Prototype Apps ▸ App Store and search for Compute Overall Measurements (Mesh). If an Enable button is shown, click it and follow the sign-in, download or installation prompts.
3. Restart Dragonfly when prompted, then open Compute Overall Measurements (Mesh) from the Prototype Apps menu. Return to App Store to enable or disable it later.
To uninstall all Prototype Apps, close Dragonfly and run uninstall_prototype_apps.exe from the online package.
4. Runtime Environment and First-Run Setup
The geometry compute does not run directly in Dragonfly's bundled Python (Python_env). Instead it runs in an isolated virtual environment (venv) as a subprocess, to avoid polluting Dragonfly's runtime. This venv must be built once on first use.
On Dragonfly 2027.1 (Python 3.14) the bundled Python cannot build this environment. Install 64-bit Python 3.12 from python.org, make it available through the Python launcher or PATH, and run Setup Environment. Dragonfly 2025.1 can use its bundled Python.
What the Setup environment button does:
1. On Dragonfly 2027.1 (Python 3.14) the bundled Python cannot build this environment. Install 64-bit Python 3.12 from python.org, make it available through the Python launcher or PATH, and run Setup Environment. Dragonfly 2025.1 can use its bundled Python.
2. Creates a venv inside the plugin's code folder and pip-installs the three dependencies numpy, scipy, and trimesh.
3. Records the full path to the venv's python in venv_python.txt so it can be reused on later runs.
Internet / GPU / WSL / external apps: building the environment needs the internet once (downloads roughly 100–200 MB of packages). No GPU is required, no WSL, and no external application. After setup, all subsequent computation runs fully locally and offline.
Where the environment lives: the venv and runtime files reside inside the installed plugin code folder (under %LOCALAPPDATA%\comet\<Dragonfly version>\pythonUserExtensions\GenericMenuItems\OverallMeasurements\runner\):
Path | Purpose |
runner\venv | The isolated virtual environment created on first Setup environment click |
runner\venv_python.txt | Records the venv python path so the plugin can reuse it |
runner\jobs | Per-compute temporary job directories (input / results / status files) |
On Dragonfly 2027.1 (Python 3.14) the bundled Python cannot build this environment. Install 64-bit Python 3.12 from python.org, make it available through the Python launcher or PATH, and run Setup Environment. Dragonfly 2025.1 can use its bundled Python.
5. Interface Guide
The panel is a dockable floating window composed, top to bottom, of the following controls (matching the code exactly):
Control | Type | Description |
Mesh | Dropdown | Lists every representable mesh object in the scene by title. Populated automatically when the panel opens. |
Refresh | Button | Re-scans the scene for meshes and refreshes the dropdown (use after creating or deleting a mesh in Dragonfly). |
Results table | Table | Three columns: Measurement, Value, Unit. After compute, all results appear grouped; group-title rows are bold and span the row. |
Warning bar | Text bar | Shown only when warnings exist (e.g. a non-watertight mesh); lists each note in orange text. |
Environment | Text label | Shows the environment state: checking... / ready / not set up / setup failed. |
Setup environment | Button | Click once on first use to build the isolated venv and install dependencies (see Chapter 4). |
Compute | Button | Computes overall measurements for the currently selected mesh. It is the default button. |
Copy results | Button | Copies the current results table to the clipboard as tab-separated text. Disabled until a result exists. |
Progress bar | Progress bar | Shows a busy state during compute or environment setup. |
Log box | Read-only text | Shows run logs: number of meshes found, vertices/faces read, progress percentage, error traces, etc. |
All mesh reads and scene access run on Dragonfly's UI thread, while the heavy geometry compute runs in a background thread / subprocess, so the interface stays responsive during computation.
6. Step-by-Step Usage
Input requirement: the scene must contain at least one representable surface mesh object. If none exists, first import or reconstruct a mesh (e.g. from a segmentation) in Dragonfly.
End-to-end steps:
1. Open Prototype Apps ▸ Compute Overall Measurements (Mesh)...; the panel appears.
2. On first use, click Setup environment and wait until the log shows “Environment ready” and the state becomes ready. This is done only once.
3. Select the mesh to measure in the Mesh dropdown. If the list is empty or missing a new mesh, click Refresh.
4. Click Compute. The progress bar activates and the log shows the vertex/face counts read and the compute progress.
5. When compute finishes, the results table is filled. If the mesh is not watertight, the warning bar shows the relevant note in orange.
6. To export: click Copy results — the table enters the clipboard as tab-separated text, ready to paste into Excel or a report.
What you get: a grouped results table (topology & integrity, size, shape, convexity, inertia) plus any warning notes. The process never changes any scene object.
7. Parameters
The plugin has no numeric algorithm parameters to set; the actionable items and their default states are listed below.
Item | Default / default state | Description |
Mesh dropdown | First mesh selected when the panel opens | Choose the target mesh; contents come from the scene scan. |
Setup environment | Not built at first; path remembered after setup | Builds the venv and installs numpy/scipy/trimesh; only needed once. |
Compute | The default button (triggerable with Enter) | Runs overall measurements on the selected mesh. |
Copy results | Disabled until a result exists | Copies the results table as tab-separated text. |
Dependency versions | trimesh>=4.0,<5.0; scipy>=1.10; numpy>=1.24,<2.0 | Installed once by Setup environment; no manual choice needed. |
The measurements themselves have no adjustable thresholds: whether values such as volume or sphericity are reported depends on whether the mesh is watertight (see the “watertight gating” notes in Chapters 8 and 10).
8. Outputs
The output is not a new Dragonfly object — the plugin creates no Channel, ROI, MultiROI, or new mesh, and writes nothing back to the source mesh. All results are presented as an in-panel table plus copyable text. The table has five groups:
Group | Measurements included | Unit |
Topology & integrity | vertices, faces, edges, connected components, open boundary edges, watertight, winding consistent, convex, Euler number χ, genus | count / yes-no |
Size | surface area, enclosed volume, AABB extents, oriented bbox (OBB) extents, bounding-sphere radius, centroid, center of mass | length / length² / length³ |
Shape | sphericity (Wadell), compactness (isoperimetric quotient) | [0, 1] |
Convexity | convex-hull volume, convex-hull area, solidity (V / V_hull), convexity (A_hull / A) | length³ / length² / [0, 1] |
Inertia (unit density) | principal moments I₁, I₂, I₃ | length⁵ |
How to view: results appear directly in the panel's table with bold group-title rows. Numbers show with compact significant figures; vectors (e.g. bounding-box extents, centroid) show as (x, y, z); values that cannot be computed show as N/A.
About units: values are expressed in the mesh's own world-coordinate units (length = a length unit, length² = area, length³ = volume, length⁵ = moment of inertia). Sphericity, compactness, solidity, and convexity are dimensionless ratios in the range [0, 1].
Watertight gating: volume, sphericity, compactness, solidity, genus, and principal inertia are only meaningful for a closed, watertight mesh. If the mesh has open boundaries, those rows show N/A and the warning bar explains why — this prevents silently reporting a meaningless volume for an open CT surface.
9. FAQ and Troubleshooting
Q: I can't find “Compute Overall Measurements (Mesh)...” in the menu.
A: Confirm that Compute Overall Measurements (Mesh) is enabled in Prototype Apps ▸ App Store, then restart Dragonfly.
Q: Volume, sphericity, genus, etc. show N/A.
A: These quantities are only defined for a watertight mesh. When the mesh has open boundary edges (Open boundary edges > 0, Watertight = no) they show N/A — this is expected behavior and the warning bar explains why. If you truly need these values, repair the mesh in Dragonfly so it is closed (no open boundaries) and recompute.
Q: Setup environment failed — what now?
A: Check that PyPI is reachable, then check the base interpreter. On Dragonfly 2027.1 (Python 3.14) the bundled Python cannot build this environment. Install 64-bit Python 3.12 from python.org, make it available through the Python launcher or PATH, and run Setup Environment. Dragonfly 2025.1 can use its bundled Python.
Q: The Mesh dropdown is empty.
A: The scene contains no representable mesh object. Import a mesh or reconstruct one from a segmentation first, then click Refresh to re-scan.
Q: Compute is slow or seems unresponsive.
A: Convex-hull and inertia computations scale with mesh size. For meshes with very large vertex/face counts, compute may take a while; the progress bar and log keep updating. Compute runs in the background and does not block Dragonfly — wait for “Done.” in the log.
10. Notes and Known Limitations
- Read-only: the plugin never modifies scene objects and creates no new objects; results are shown in the panel and can be copied out.
- Watertight gating: volume, sphericity, compactness, solidity, genus, and principal inertia are reported only for closed watertight meshes; otherwise N/A. This is intentional, to avoid misleading numbers.
- Winding consistency: if the mesh winding is inconsistent (Winding consistent = no), the sign of volume / inertia may be wrong; the warning bar flags this.
- Units follow the mesh: all dimensioned values use the mesh's own world-coordinate units; the plugin does no unit conversion.
- Internet only on first setup: only the first Setup environment needs the internet to download dependencies; afterward it works offline. No GPU required.
- Input type: only existing surface meshes (Mesh) are supported; it does not process volume data (Channel) or ROI/MultiROI directly — reconstruct them into a mesh first.
11. References
- trimesh (mesh geometry: area, volume, inertia, convex hull, watertightness / Euler number, bounding boxes) — https://trimesh.org/
- SciPy (convex hull via qhull, oriented bounding box) — https://scipy.org/
- NumPy (fundamental numerical computing library) — https://numpy.org/
- Definitions of sphericity (Wadell) and the isoperimetric quotient (compactness) are given in standard morphology / image-analysis literature.
- Companion plugin: Compute Vertex Measurements (Mesh) (per-vertex scalar measurements with a colormap).