polyfoammesh.commercial.watertight
Watertight (closed-volume) meshing workflow — authoritative.
Inspired by ANSYS Fluent Meshing Watertight Workflow, this module orchestrates the complete end-to-end meshing pipeline:
Import & validate geometry
Heal & watertight check
Feature extraction & auto-sizing
Local refinement sources (box, cylinder, sphere)
Boundary layer specification
Volume mesh generation (cartesian / polyhedral)
Quality check & auto-fix loop
Export in multiple formats
Every step emits Octopoda events for audit-trail and CI/CD integration.
Classes
|
A local refinement region. |
|
End-to-end watertight meshing workflow. |
|
|
|
- class polyfoammesh.commercial.watertight.WorkflowStep(value)[source]
Bases:
Enum- IMPORT = 1
- HEAL = 2
- FEATURES = 3
- SIZING = 4
- REFINEMENT = 5
- BOUNDARY_LAYER = 6
- VOLUME_MESH = 7
- QUALITY = 8
- EXPORT = 9
- class polyfoammesh.commercial.watertight.RefinementSource(name, shape, center, size, cell_size, enabled=True)[source]
Bases:
objectA local refinement region.
Used for box/cylinder/sphere refinment zones that override the global cell size in a specific region.
- Parameters:
- class polyfoammesh.commercial.watertight.WorkflowResult(success=False, steps_completed=<factory>, case_dir='', quality=None, cell_count=0, wall_time_seconds=0.0, errors=<factory>, warnings=<factory>)[source]
Bases:
object- Parameters:
- quality: MeshQualityReport | None = None
- class polyfoammesh.commercial.watertight.WatertightWorkflow(of_config=None)[source]
Bases:
objectEnd-to-end watertight meshing workflow.
Usage:
wf = WatertightWorkflow(of_config) wf.set_geometry("path/to/model.step") wf.set_cell_sizes(max_cell=0.05, min_cell=0.01) result = wf.run() if result.success: print(f"Mesh ready: {result.cell_count} cells")
- Parameters:
of_config (OFConfig | None)
- set_cell_sizes(max_cell, min_cell, bbox_dim=None)[source]
Set global cell size limits.
- Return type:
- Parameters:
- add_refinement(source)[source]
- Return type:
- Parameters:
source (RefinementSource)
- on_step(step, callback)[source]
Register a callback invoked before a workflow step runs.
The callback receives the
WorkflowStepenum value.- Return type:
- Parameters:
step (WorkflowStep)
callback (Callable)