polyfoammesh.gui.params_panel
Classes
|
|
|
- class polyfoammesh.gui.params_panel.ParamChangeCommand(key, old_val, new_val, panel)[source]
Bases:
QUndoCommand
- class polyfoammesh.gui.params_panel.ParamsPanel(parent=None)[source]
Bases:
QWidget- mesh_params_changed
- run_meshing
- reset_all
- load_step_requested
- cancel_meshing
- unit_changed
- param_changed
- suggestion_completed
- pick_refinement_requested
- add_box_requested
- refinements_changed
- refinement_selection_changed
Index of the selected manual refinement BOX (0-based, boxes only), or -1 when the selection is a sphere/nothing. Lets the main window highlight the matching box in the 3D viewer.
- set_undo_stack(stack)[source]
- Parameters:
stack (QUndoStack)
- set_geometry_cell_estimate(low, nominal, high)[source]
Set the pre-mesh estimate computed by the full pipeline.
The main window knows patch-specific refinement sizes, so its estimate is more representative than the panel-only volume fallback. Keep it as the source for the slider label too.
- get_surface_resolution()[source]
Curvature-following preset derived from the Detail slider.
The slider already tells the app how fine the user wants the mesh; the curvature resolution follows it automatically (very coarse / coarse -> Coarse, medium -> Medium, fine / very fine -> Fine / Very fine). Callers pass it to gmsh_wrapper, which scales the curvature angular error accordingly.
- Return type:
- get_reuse_cached_mesh()[source]
Mesh-cache reuse is AUTOMATIC (no user knob): a cached tet mesh is reused whenever the sizing inputs are unchanged.
- Return type:
- get_bl_wall_size_floor()[source]
Wall cell-size floor (metres) coupling the BL stack to the mesh.
stack / 5capped at 10% of the geometry extent, or 0.0 (off) when BL is disabled. Returns 0.0 on any failure so meshing never blocks on this hint machinery.- Return type:
- get_max_cells_target()[source]
Target cell count (polymesh) — driven by the Mesh Fineness slider.
- Return type:
- get_manual_refinements()[source]
Return list of {centre, radius, cell_size} from manual zone entries.
- add_refinement_from_pick(cx, cy, cz)[source]
Add a refinement zone from a 3D pick — prompts for radius and cell size.
- set_refinement_boxes(boxes)[source]
Replace the stored box entries after a viewer drag (same order).
- selected_refinement_box_index()[source]
Index (among boxes) of the currently selected row, or -1.
- Return type:
- get_patch_names()[source]
Names of the currently loaded geometry patches.
The viewer’s patch table is the single editable patch list; this panel no longer owns a patch widget (it was redundant). Names are derived from the meshes handed to
set_suggest_meshes(), so callers that only need a count (e.g. enabling “Generate Mesh”) keep working unchanged.
- cancel_button()[source]
The Cancel control, embedded by the main window below Reset All.
- Return type:
- staticMetaObject = PySide6.QtCore.QMetaObject("ParamsPanel" inherits "QWidget": Methods: #33 type=Signal, signature=mesh_params_changed(QVariantMap), parameters=QVariantMap #34 type=Signal, signature=run_meshing() #35 type=Signal, signature=reset_all() #36 type=Signal, signature=load_step_requested() #37 type=Signal, signature=cancel_meshing() #38 type=Signal, signature=unit_changed(QString), parameters=QString #39 type=Signal, signature=param_changed(QString,PyObject), parameters=QString, PyObject #40 type=Signal, signature=suggestion_completed(QString), parameters=QString #41 type=Signal, signature=pick_refinement_requested() #42 type=Signal, signature=add_box_requested() #43 type=Signal, signature=refinements_changed(PyObject), parameters=PyObject #44 type=Signal, signature=refinement_selection_changed(int), parameters=int )