Skip to content

v0.5.0

Latest

Choose a tag to compare

@maureeungaro maureeungaro released this 08 Oct 14:02
· 2 commits to main since this release

PYGEMC Release 0.5.0

Upcoming in the next release. Changes since v0.4.0.

This version includes:

  • CAD mesh references in geometry parameters, leaving descriptions available for descriptive text.
  • Canonical serialization of optional geometry metadata as ASCII NULL or SQLite NULL.
  • Geometry authoring helpers for passive placements, full-azimuth solids, and numeric formatting.
  • PyVista visibility fixes and more reliable rendering of boolean solids.

Release notes

API

Geometry

  • GVolume normalizes unset spellings in mfield, digitization, identifier, copyOf, solidsOpr, and
    mirror to None before publishing. ASCII output uses the NULL token; SQLite stores SQL NULL.
  • Added GVolume.publish_passive() for geometries that use GEMC2's frame-rotation placement convention.
  • make_tube() and make_polycone() now default to a full azimuth. Polycone arrays remain required.
  • The keyword-only GVolume(..., value_formatter=...) option controls numeric formatting for box, tube,
    and polycone dimensions, positions, and rotations; the default remains str.

CAD

  • gemc-sqlite -cad stores each CAD mesh reference and scale in the geometry parameters column.
    The optional description field is preserved as descriptive text.

PyVista

  • Added closed G4Ellipsoid preview meshes, including Z cuts, so HTCC mirror booleans have their
    ellipsoid operands available.
  • PyVista accepts leading @ in boolean expressions and converts common-mother operand placements
    into the first solid's local frame, matching GEMC2 absolute-coordinate booleans.
  • Volumes with visible = 0 are now omitted instead of drawn as faint wireframes. Invisible mothers still
    contribute their transforms to visible daughters.
  • Failed or incomplete boolean operations are omitted instead of displaying a non-physical construction
    operand as a fallback.
  • Elliptical-tube shells and supported full-depth tube-sector cuts are generated directly, preserving LTCC
    elliptical mirrors when generic mesh booleans cannot resolve their thin curved surfaces.
  • Boolean previews report an unavailable pymeshlab backend rather than silently falling back to VTK.

Documentation

  • Added a CI workflow guide covering tests, releases, PyPI trusted publishing, the GEMC integration dispatcher,
    required permissions, cross-repository contracts, and safe workflow rollout.

Tests

  • Added direct coverage for optional geometry metadata at the ASCII and SQLite serialization boundaries.
  • Added geometry API coverage for passive publication, solid-builder defaults, polycone validation, and custom
    numeric formatting.
  • Updated CAD upload tests for mesh parameters, default and explicit scales, and descriptive text.
  • Expanded PyVista tests for system-relative CAD paths, legacy CAD rows, invisible mothers, skipped boolean
    components, failed boolean operations, and elliptical mirror sectors.
  • Added real-mesh tests for sphere intersections at different scales and chained polycone/ellipsoid booleans.
  • Install the native OpenGL runtime in Ubuntu CI and check that pymeshlab boolean filters load before testing.
  • Updated the GEMC compatibility-test dispatcher to target test_after_pygemc.yml instead of test.yml.
    Downstream build and publication behavior is controlled by the GEMC repository's workflows.

Compatibility notes

  • CAD parameters use <mesh path>, <scale>, with scale defaulting to 1. Consumers of newly generated
    geometry must support this layout. PyVista and the updated GEMC CAD builder still accept legacy rows with
    the path in description and a numeric or unset scale in parameters. Mesh paths cannot contain commas.
  • make_polycone() now raises ValueError for missing or mismatched arrays; mismatched arrays previously
    raised SystemExit. Callers that handle that failure should catch ValueError instead.
  • Polycone plane counts are now serialized as <n>*counts. PyVista accepts both this form and the previous
    unitless count.
  • Optional geometry fields treat empty strings, NULL, ~, no, none, and not provided as unset,
    ignoring surrounding whitespace and case. These spellings cannot be used as literal metadata values.

Detailed list of changes and fixes

  • Export the resolved source directory from the Meson subproject for downstream Python installation.
  • PyVista resolves relative mesh parameters beside the SQLite database and under its <system>/
    subdirectory, supporting generated layouts such as ltcc/stls.
  • PyVista skips standalone mesh construction for Component volumes, which were already excluded from
    scene actors in 0.4. They remain available as boolean operands.
  • Direct boolean mesh builders run before generic operand meshing, avoiding unnecessary mesh construction
    for supported analytic results.
  • Normalize VTK boolean operands to a common unit-sized frame, remove degenerate revolution cells, and
    reject open results, allowing the Boolean Solids lens to render through the fallback backend.
  • Check pymeshlab's native filters before declaring its worker ready and report import or missing-filter
    errors, including guidance for the Ubuntu OpenGL runtime.
  • SQLite schema extension and row serialization omit private attributes whose names start with _, keeping
    the numeric formatter out of database columns.
  • Corrected the Meson project version from the stale 0.1.0 value to 0.4.0.

Addressed issues

  • Issue #2: [High] add_rotation() emits a multi-token rotation string the C++ parser silently drops
  • Issue #3: [High] set_rotation() then add_rotation() raises AttributeError due to inconsistent rotations type
  • Issue #4: [High] make_polycone() length check uses and instead of or, missing single-array mismatches
  • Issue #5: [High] make_trap() passes an extra self to already-bound methods, raising TypeError
  • Issue #6: [Medium] GConfiguration ignores constructor args; argparse defaults clobber factory/variation/runno
  • Issue #7: [Medium] gemc-sqlite CLI builds queries via raw f-strings (breakage + SQL injection)
  • Issue #8: [Low] convert_angle(out='gon') returns radians instead of gradians
  • Issue #15: Simplify Analyzer UI
  • Issue #16: Plot smeared quantities