pythonocc: core parity fixes, deterministic ConvexHull, backend docstring refactor - #4
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PythonOCC backend parity fixes, verified by the fork's
tests/pythonoccsuite (858 passing incl. the new differential harness).