upxo.meshing.gbconformant.pipeline.presets module

Named groups of settings for a kind of material and size of crop.

A preset is a set of values for the settings it controls. Applying one sets those settings to its values and every other setting a preset controls back to its default, so presets can be switched between freely; settings no preset controls are left as they are. The values come from the development notebooks or from runs on the development crop of the FM-steel data, as each preset’s notes say.

class upxo.meshing.gbconformant.pipeline.presets.Preset(key: 'str', title: 'str', material: 'str', size_class: 'str', summary: 'str', settings: 'dict', notes: 'tuple' = (), source: 'str' = '', measured: 'Optional[dict]' = None)[source]

Bases: object

key: str
title: str
material: str
size_class: str
summary: str
settings: dict
notes: tuple = ()
source: str = ''
measured: dict | None = None
describe() → str[source]
upxo.meshing.gbconformant.pipeline.presets.measured_text(measured: dict) → str[source]

One line on what the development crop (8,800 voxels, 28 features) gave under the preset.

upxo.meshing.gbconformant.pipeline.presets.preset_keys() → list[source]
upxo.meshing.gbconformant.pipeline.presets.get_preset(key: str) → Preset[source]
upxo.meshing.gbconformant.pipeline.presets.controlled_keys() → list[source]

Every setting some preset sets.

upxo.meshing.gbconformant.pipeline.presets.values_of(key: str) → dict[source]

The value of every controlled setting under preset key (default where the preset says nothing).

upxo.meshing.gbconformant.pipeline.presets.changes(config: dict, key: str) → list[source]

[(setting, current, new)] for what applying key would change in config.

upxo.meshing.gbconformant.pipeline.presets.apply_preset(config: dict, key: str) → list[source]

Set the controlled settings of config for preset key; returns the changes made.

upxo.meshing.gbconformant.pipeline.presets.which_preset(config: dict) → str | None[source]

The preset whose values config holds for every controlled setting, or None.

upxo.meshing.gbconformant.pipeline.presets.size_class(voxels: int) → str[source]
upxo.meshing.gbconformant.pipeline.presets.recommend(voxels: int, material: str = 'fm_steel') → list[source]

Presets that suit a crop of voxels voxels, best first.

upxo.meshing.gbconformant.pipeline.presets.validate_presets() → None[source]

Every preset names real settings with values that pass the settings checks (raises ValueError).