polyfoammesh.commercial.monitor
Real-Time Quality Dashboard — 3D heatmap data and quality metrics.
Provides structured quality data that can be consumed by the 3D viewer for cell-by-cell heatmap rendering, worst-cell identification, histogram generation, and convergence tracking across mesh iterations.
Usage:
monitor = QualityMonitor()
monitor.ingest_checkmesh(output_text)
print(monitor.summary())
heatmap = monitor.heatmap_data()
worst = monitor.worst_cells(n=10)
Classes
|
A single quality metric with value, threshold, and pass/fail status. |
|
Real-time mesh quality monitor. |
|
A point-in-time quality snapshot for convergence tracking. |
|
Information about a low-quality cell. |
- class polyfoammesh.commercial.monitor.QualityMetric(name='', value=0.0, warn_threshold=0.0, fail_threshold=0.0, unit='')[source]
Bases:
objectA single quality metric with value, threshold, and pass/fail status.
- class polyfoammesh.commercial.monitor.QualitySnapshot(timestamp='', iteration=0, metrics=<factory>, passed=False)[source]
Bases:
objectA point-in-time quality snapshot for convergence tracking.
- class polyfoammesh.commercial.monitor.WorstCell(index=0, metric='', value=0.0, location=(0.0, 0.0, 0.0))[source]
Bases:
objectInformation about a low-quality cell.
- class polyfoammesh.commercial.monitor.QualityMonitor(thresholds=None)[source]
Bases:
objectReal-time mesh quality monitor.
Parses checkMesh output and provides structured data for UI visualization (heatmaps, histograms, worst-cell lists) and convergence tracking across iterations.
Usage:
monitor = QualityMonitor() monitor.ingest_checkmesh(checkmesh_output) print(monitor.summary())
- THRESHOLDS: dict[str, tuple[float, float]] = {'aspect_ratio': (1000.0, 5000.0), 'non_orthogonality': (65.0, 85.0), 'skewness': (4.0, 10.0)}
- heatmap_data()[source]
Return per-cell data arrays for heatmap colouring.
Returns a dict with keys like
skewness,non_orthogonality,aspect_ratio— each containing a list of per-cell values extracted from the raw checkMesh output.
- worst_cells(n=10)[source]
Identify the N worst cells by each metric.
Parses the checkMesh detail output to find cells with the highest skewness, non-orthogonality, and aspect ratio.