Repository navigation
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
NULLor SQLiteNULL. - 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
GVolumenormalizes unset spellings inmfield,digitization,identifier,copyOf,solidsOpr, and
mirrortoNonebefore publishing. ASCII output uses theNULLtoken; SQLite stores SQLNULL.- Added
GVolume.publish_passive()for geometries that use GEMC2's frame-rotation placement convention. make_tube()andmake_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 remainsstr.
CAD
gemc-sqlite -cadstores each CAD mesh reference and scale in the geometryparameterscolumn.
The optionaldescriptionfield is preserved as descriptive text.
PyVista
- Added closed
G4Ellipsoidpreview 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 = 0are 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.ymlinstead oftest.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 to1. Consumers of newly generated
geometry must support this layout. PyVista and the updated GEMC CAD builder still accept legacy rows with
the path indescriptionand a numeric or unset scale inparameters. Mesh paths cannot contain commas. make_polycone()now raisesValueErrorfor missing or mismatched arrays; mismatched arrays previously
raisedSystemExit. Callers that handle that failure should catchValueErrorinstead.- 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, andnot providedas 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 asltcc/stls. - PyVista skips standalone mesh construction for
Componentvolumes, 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.0value to0.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
andinstead ofor, missing single-array mismatches - Issue #5: [High] make_trap() passes an extra
selfto 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