polyfoammesh.core.session

Functions

clear_snapshot()

Remove the session snapshot (e.g. after successful restore).

has_snapshot()

load_snapshot()

Load the most recent session snapshot, or None.

save_snapshot(snapshot)

Persist a session snapshot to disk.

Classes

SessionSnapshot([version, timestamp, ...])

A point-in-time snapshot of the application state.

class polyfoammesh.core.session.SessionSnapshot(version='', timestamp='', geometry_path='', case_dir='', max_cell=0.05, min_cell=0.01, detail='medium', unit='m', bl_enabled=False, bl_n_layers=3, bl_thickness_ratio=0.005, bl_expansion_ratio=1.2, mesher='cfmesh', theme='system', viewer_bg='Dark', extra=<factory>)[source]

Bases: object

A point-in-time snapshot of the application state.

Parameters:
version: str = ''
timestamp: str = ''
geometry_path: str = ''
case_dir: str = ''
max_cell: float = 0.05
min_cell: float = 0.01
detail: str = 'medium'
unit: str = 'm'
bl_enabled: bool = False
bl_n_layers: int = 3
bl_thickness_ratio: float = 0.005
bl_expansion_ratio: float = 1.2
mesher: str = 'cfmesh'
theme: str = 'system'
viewer_bg: str = 'Dark'
extra: dict[str, Any]
polyfoammesh.core.session.save_snapshot(snapshot)[source]

Persist a session snapshot to disk.

Return type:

None

Parameters:

snapshot (SessionSnapshot)

polyfoammesh.core.session.load_snapshot()[source]

Load the most recent session snapshot, or None.

Return type:

SessionSnapshot | None

polyfoammesh.core.session.clear_snapshot()[source]

Remove the session snapshot (e.g. after successful restore).

Return type:

None

polyfoammesh.core.session.has_snapshot()[source]
Return type:

bool