unit-cell-gui 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/CHANGELOG.md +31 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/CITATION.cff +2 -2
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/MANIFEST.in +1 -1
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/PKG-INFO +23 -2
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/README.md +22 -1
- unit_cell_gui-0.2.2/RELEASE_NOTES_0.2.2.md +42 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/pyproject.toml +1 -1
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/__init__.py +1 -1
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/opengl_viewer.py +274 -151
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui.egg-info/PKG-INFO +23 -2
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui.egg-info/SOURCES.txt +3 -3
- unit_cell_gui-0.2.2/tests/test_visibility_cache.py +275 -0
- unit_cell_gui-0.2.1/RELEASE_NOTES_0.2.1.md +0 -51
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/LICENSE +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/THIRD_PARTY_NOTICES.txt +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/setup.cfg +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/gl_geometry.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/hatching.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/models.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/py.typed +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/qt_config.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/render_geometry.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/view_helpers.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui/viewer.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui.egg-info/dependency_links.txt +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui.egg-info/requires.txt +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/src/unit_cell_gui.egg-info/top_level.txt +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/tests/test_gl_geometry.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/tests/test_render_geometry.py +0 -0
- {unit_cell_gui-0.2.1 → unit_cell_gui-0.2.2}/tests/test_unit_cell_gui.py +0 -0
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2 - 2026-10-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Individual polyhedron visibility changes now filter resident face, edge and
|
|
8
|
+
atom/face-intersection ranges at draw time, instead of rebuilding their
|
|
9
|
+
geometry and re-uploading the complete buffers.
|
|
10
|
+
- Apply the same visibility selection to opaque and transparent faces, edges,
|
|
11
|
+
hatching and intersection contours, including multiple polyhedra sharing a
|
|
12
|
+
site key.
|
|
13
|
+
|
|
14
|
+
### Performance
|
|
15
|
+
|
|
16
|
+
- Cache engraving hatching separately for each polyhedron. Reuse GPU buffers
|
|
17
|
+
when the view and effective division count are unchanged; rebuild only the
|
|
18
|
+
affected polyhedra when visible depth extrema alter the density.
|
|
19
|
+
- Preserve the original hatching algorithms and density/GRIP normalization
|
|
20
|
+
over visible polyhedra. Keep at most four CPU density variants per polyhedron
|
|
21
|
+
for the current view; discard them when the view or scene changes.
|
|
22
|
+
- Vectorize finite-face clipping of sphere/face section segments while keeping
|
|
23
|
+
the original 160-sample circles and boundary tolerance.
|
|
24
|
+
- Defer intersection and hatching preparation until their layers are visible.
|
|
25
|
+
- Release per-polyhedron hatching GPU resources on scene replacement/clearing
|
|
26
|
+
and context cleanup; recreate them when needed.
|
|
27
|
+
|
|
28
|
+
### Compatibility
|
|
29
|
+
|
|
30
|
+
- Keep all public scene models, display options, style overrides, viewer aliases
|
|
31
|
+
and orientation/interaction signals unchanged. Hosts using the existing
|
|
32
|
+
0.2.x API do not need integration changes.
|
|
33
|
+
|
|
3
34
|
## 0.2.1 - 2026-09-15
|
|
4
35
|
|
|
5
36
|
### Fixed
|
|
@@ -8,7 +8,7 @@ authors:
|
|
|
8
8
|
repository-code: https://github.com/ofussr/unit-cell-gui
|
|
9
9
|
url: https://github.com/ofussr/unit-cell-gui
|
|
10
10
|
orcid: https://orcid.org/0000-0002-5571-8525
|
|
11
|
-
version: 0.2.
|
|
12
|
-
date-released: 2026-
|
|
11
|
+
version: 0.2.2
|
|
12
|
+
date-released: 2026-10-01
|
|
13
13
|
doi: 10.5281/zenodo.22714946
|
|
14
14
|
license: MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unit-cell-gui
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: PySide6 widget for rendering caller-supplied unit-cell scenes
|
|
5
5
|
Author-email: Mikhail Mirushchenko <miruschenko98@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -137,6 +137,24 @@ Per-position colours, visibility and opaque-polyhedron selections are replaced
|
|
|
137
137
|
atomically with `viewer.set_style_overrides(StyleOverrides(...))`. The widget
|
|
138
138
|
copies these mappings, so the host can keep its own independent UI state.
|
|
139
139
|
|
|
140
|
+
## Visibility and rendering caches
|
|
141
|
+
|
|
142
|
+
Both global and per-site polyhedron visibility filter already prepared geometry
|
|
143
|
+
at draw time. Faces, edges and atom/face intersection contours remain in GPU
|
|
144
|
+
buffers when a site is hidden or shown. This avoids rebuilding the full
|
|
145
|
+
polyhedron layer for each individual visibility change.
|
|
146
|
+
|
|
147
|
+
Engraving hatching is cached per polyhedron. Its density still follows the
|
|
148
|
+
depth range of the visible polyhedra: hiding the nearest or farthest object can
|
|
149
|
+
change other objects' effective division counts. Only affected hatch buffers
|
|
150
|
+
are updated. Rotation, zoom, panning and window-size changes keep the original
|
|
151
|
+
view-dependent hatching behaviour. CPU density variants are bounded and are
|
|
152
|
+
discarded when the view or scene changes.
|
|
153
|
+
|
|
154
|
+
Intersection contours and hatching are prepared when their layers are first
|
|
155
|
+
needed. The initial preparation still has a cost; subsequent site visibility
|
|
156
|
+
changes reuse the prepared data.
|
|
157
|
+
|
|
140
158
|
|
|
141
159
|
## Renderer compatibility
|
|
142
160
|
|
|
@@ -146,11 +164,14 @@ style-override, orientation-synchronization and interaction calls remain the
|
|
|
146
164
|
same. `OpenGLUnitCellViewer` remains available as an explicit name and refers
|
|
147
165
|
to the same renderer class.
|
|
148
166
|
|
|
167
|
+
## Used in
|
|
168
|
+
|
|
169
|
+
`unit-cell-gui` is used as the crystal-structure viewer in [XRD Combine](https://github.com/ofussr/XRD-Combine), where it is integrated with CIF processing, diffraction tools, and synchronized crystallographic views.
|
|
149
170
|
|
|
150
171
|
## How to cite
|
|
151
172
|
|
|
152
173
|
If you use `unit-cell-gui` in academic work, please cite the Zenodo record:
|
|
153
174
|
|
|
154
|
-
[](https://doi.org/10.5281/zenodo.22714946)
|
|
155
176
|
|
|
156
177
|
You can also use the metadata provided in [`CITATION.cff`](CITATION.cff).
|
|
@@ -119,6 +119,24 @@ Per-position colours, visibility and opaque-polyhedron selections are replaced
|
|
|
119
119
|
atomically with `viewer.set_style_overrides(StyleOverrides(...))`. The widget
|
|
120
120
|
copies these mappings, so the host can keep its own independent UI state.
|
|
121
121
|
|
|
122
|
+
## Visibility and rendering caches
|
|
123
|
+
|
|
124
|
+
Both global and per-site polyhedron visibility filter already prepared geometry
|
|
125
|
+
at draw time. Faces, edges and atom/face intersection contours remain in GPU
|
|
126
|
+
buffers when a site is hidden or shown. This avoids rebuilding the full
|
|
127
|
+
polyhedron layer for each individual visibility change.
|
|
128
|
+
|
|
129
|
+
Engraving hatching is cached per polyhedron. Its density still follows the
|
|
130
|
+
depth range of the visible polyhedra: hiding the nearest or farthest object can
|
|
131
|
+
change other objects' effective division counts. Only affected hatch buffers
|
|
132
|
+
are updated. Rotation, zoom, panning and window-size changes keep the original
|
|
133
|
+
view-dependent hatching behaviour. CPU density variants are bounded and are
|
|
134
|
+
discarded when the view or scene changes.
|
|
135
|
+
|
|
136
|
+
Intersection contours and hatching are prepared when their layers are first
|
|
137
|
+
needed. The initial preparation still has a cost; subsequent site visibility
|
|
138
|
+
changes reuse the prepared data.
|
|
139
|
+
|
|
122
140
|
|
|
123
141
|
## Renderer compatibility
|
|
124
142
|
|
|
@@ -128,11 +146,14 @@ style-override, orientation-synchronization and interaction calls remain the
|
|
|
128
146
|
same. `OpenGLUnitCellViewer` remains available as an explicit name and refers
|
|
129
147
|
to the same renderer class.
|
|
130
148
|
|
|
149
|
+
## Used in
|
|
150
|
+
|
|
151
|
+
`unit-cell-gui` is used as the crystal-structure viewer in [XRD Combine](https://github.com/ofussr/XRD-Combine), where it is integrated with CIF processing, diffraction tools, and synchronized crystallographic views.
|
|
131
152
|
|
|
132
153
|
## How to cite
|
|
133
154
|
|
|
134
155
|
If you use `unit-cell-gui` in academic work, please cite the Zenodo record:
|
|
135
156
|
|
|
136
|
-
[](https://doi.org/10.5281/zenodo.22714946)
|
|
137
158
|
|
|
138
159
|
You can also use the metadata provided in [`CITATION.cff`](CITATION.cff).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# unit-cell-gui 0.2.2
|
|
2
|
+
|
|
3
|
+
This maintenance release fixes pauses when hiding or showing individual
|
|
4
|
+
polyhedra through `StyleOverrides.polyhedron_site_visibility`.
|
|
5
|
+
|
|
6
|
+
## Faster individual visibility changes
|
|
7
|
+
|
|
8
|
+
- Keep polyhedron faces, edges and atom/face intersection contours in GPU
|
|
9
|
+
buffers and select visible site ranges during drawing.
|
|
10
|
+
- Cache engraving hatching per polyhedron and reuse unchanged GPU buffers.
|
|
11
|
+
When hiding a depth-extreme polyhedron changes other polyhedra's density,
|
|
12
|
+
update only the affected hatch geometry.
|
|
13
|
+
- Preserve the original visible-depth normalization, density and GRIP controls,
|
|
14
|
+
shared-edge hatch directions and intact quadrilateral faces.
|
|
15
|
+
|
|
16
|
+
## Initial preparation and resource handling
|
|
17
|
+
|
|
18
|
+
- Vectorize sphere/face section clipping without reducing the original
|
|
19
|
+
160-sample resolution or changing boundary tolerance.
|
|
20
|
+
- Prepare intersection contours and hatching only when their layers are needed.
|
|
21
|
+
- Bound CPU hatching variants for the current view and release per-polyhedron
|
|
22
|
+
GPU buffers when a scene is replaced, cleared or its context is cleaned up.
|
|
23
|
+
|
|
24
|
+
## Compatibility
|
|
25
|
+
|
|
26
|
+
The public API is unchanged: `UnitCellViewer`, `CrystalCanvas`,
|
|
27
|
+
`OpenGLUnitCellViewer`, scene models, display options, style overrides,
|
|
28
|
+
orientation synchronization and interaction signals remain compatible with
|
|
29
|
+
0.2.1. No host-application changes are required for this visibility fix.
|
|
30
|
+
|
|
31
|
+
## Validation
|
|
32
|
+
|
|
33
|
+
- 41 tests passed with a real OpenGL context, including visibility, clipping,
|
|
34
|
+
hatching, resource cleanup and context-rebuild checks.
|
|
35
|
+
- 15 framebuffer comparisons against 0.2.1 were pixel-identical, covering
|
|
36
|
+
colour and engraving views, transparent and opaque polyhedra, individual and
|
|
37
|
+
global visibility, rotation, atom scaling, external atoms and quadrilateral
|
|
38
|
+
hatching.
|
|
39
|
+
- In one synthetic nine-octahedron scene on Mesa software OpenGL, median
|
|
40
|
+
individual-toggle time decreased from approximately 544 ms to 15 ms.
|
|
41
|
+
This is a local benchmark, not a timing guarantee for other structures or
|
|
42
|
+
hardware.
|