Skip to content

Preserve input vertices during polyhedron measurements - #1537

Open
antonsoo wants to merge 2 commits into
compas-dev:mainfrom
antonsoo:bugfix-polyhedron-measurement-copy
Open

antonsoo wants to merge 2 commits into
compas-dev:mainfrom
antonsoo:bugfix-polyhedron-measurement-copy

Conversation

@antonsoo

Copy link
Copy Markdown

volume_polyhedron and centroid_polyhedron append temporary face centers to the input vertices when triangulating polygonal faces. Measuring a box changes its vertex count from 8 to 14; repeated measurements add unused vertices to subsequent meshes and OBJ exports. A tuple of vertices fails with AttributeError.

Copy the outer vertex sequence before appending temporary points. Coordinate objects, face data, triangulation order and numerical results stay unchanged.

Validation in the compas3 Conda environment:

  • Eight new cases fail before the fix; four triangle controls pass. All 62 core tests pass afterward.
  • Thirty native CAD workflows repeat measurements, build meshes and export/reload OBJ. All now preserve topology, avoiding 576 unused vertices. All 18 working controls and all 26 previously completed numerical streams are unchanged. Independent SciPy hull volumes and affine centers check the results.
  • invoke test: 1023 passed, 12 skipped, using isolated local RPC ports. The original default-port invocation stalled at a socket read.
  • Read-only source lint has the same two existing Rhino import-order findings on base and head. The unrelated automatic edits from invoke lint were restored.

What type of change is this?

  • Bug fix in a backwards-compatible manner.

Checklist

  • Added an Unreleased changelog entry and AUTHORS entry.
  • Ran all tests with the local RPC port isolation described above.
  • Whole-tree lint has no errors; two unchanged findings remain.
  • Added tests that prove the fix.

OpenAI Codex assisted with investigation, implementation and validation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T19:50:22.787892Z 2c81d83 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d06b40726

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md Outdated

This branch has not been deployed

No deployments
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