Skip to content

pythonocc: core parity fixes, deterministic ConvexHull, backend docstring refactor - #4

Merged
Tokarzewski merged 1 commit into
mainfrom
ci/pip-pythonocc-wheels
Aug 10, 2026
Merged

pythonocc: core parity fixes, deterministic ConvexHull, backend docstring refactor#4
Tokarzewski merged 1 commit into
mainfrom
ci/pip-pythonocc-wheels

Conversation

@Tokarzewski

Copy link
Copy Markdown
Owner

PythonOCC backend parity fixes, verified by the fork's tests/pythonocc suite (858 passing incl. the new differential harness).

  • Cell.Dodecahedron: correct zList rounding + drop the obsolete geometry-rebuild (12 faces, vol 2.7852 == core)
  • CellComplex.Torus: preserve CellComplex through transforms; drop open shells (shell count 1 == core)
  • CellComplex.ByWires: one face per ring-edge pair (loft soup was over-built)
  • Topology.Geometry / JSON: tolerance-based vertex dedup + geometry-stable UUID cache
  • Topology.Centroid/CenterOfMass: Vertex own-coords, Cluster member-average
  • Cluster BREP serialization (compound for shapeless clusters); Graph coordinate dedup
  • ConvexHull: deterministic flatten-plane (was random.sample; also fixed a latent infinite loop)
  • Backend docstring refactor: condensed 36 verbose docstrings to essential caveats (-367 lines)

…kend docstring refactor

Parity fixes (topologic_core vs pythonocc backend, verified by the fork's
tests/pythonocc suite — 856 passing):
- Cell.Dodecahedron: round zList so the mirrored half is translated correctly
  (was 0 due to float noise), and drop the obsolete geometry-rebuild step that
  degraded both backends (12->10 faces pyocc, 12->14 core). Now identical:
  12 faces, vol 2.7852, both backends.
- CellComplex.Torus: preserve CellComplex through transforms and drop open
  (zero-volume) shells from single solids so Shell count matches core (2->1).
- CellComplex.ByWires: build exactly one face per ring-edge pair (the old
  try/except branches over-built on backends that return None instead of
  raising), fixing the loft face soup.
- Topology.Geometry: tolerance-aware vertex dedup (noisy shared vertices were
  split by exact equality, corrupting rebuilds e.g. Icosahedron).
- Topology.JSONString/ByJSONDictionary: geometry-stable UUID cache so shared
  sub-topologies round-trip (was KeyError under pythonocc).
- Topology.Centroid/CenterOfMass: Vertex returns its own coords (was origin);
  Cluster averages member centroids (matches core).
- Cluster BREP serialization: build a compound for shapeless clusters so
  BREPString round-trips.
- Graph.ByVerticesEdges: dedupe vertices by coordinates (was 5-7 vs 3).
- ConvexHull: replace random.sample flatten-plane selection with a
  deterministic non-collinear triple pick (was nondeterministic and, on
  near-degenerate input, sometimes wrong; also fixes a latent infinite loop).

Refactor: condense 36 verbose backend docstrings (12-37 lines) down to their
essential caveats, removing ~367 lines with no behavior change.
@Tokarzewski
Tokarzewski merged commit e6062d0 into main Aug 10, 2026
57 checks passed
@Tokarzewski
Tokarzewski deleted the ci/pip-pythonocc-wheels branch August 10, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant