Skip to content

ConvexHullMesher: Set convex flag - #32

Merged
jschueller merged 1 commit into
masterfrom
convex
Jul 28, 2026
Merged

ConvexHullMesher: Set convex flag#32
jschueller merged 1 commit into
masterfrom
convex

Conversation

@jschueller

@jschueller jschueller commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes

    • Convex-hull meshes are now correctly marked as convex across supported dimensions and computation paths.
    • Volume meshing now validates that the input surface represents a convex volume and reports an error otherwise.
  • Documentation

    • Clarified that volume meshes must be built from surfaces associated with convex volumes.
  • Tests

    • Added coverage verifying convex-hull status and preserving convexity during volume mesh round trips.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jschueller, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6da06881-acdf-4c2c-8561-5bb8e9b946b4

📥 Commits

Reviewing files that changed from the base of the PR and between 6936c3f and de0368d.

📒 Files selected for processing (6)
  • lib/src/ConvexHullMesher.cxx
  • lib/src/VolumeMesher.cxx
  • lib/test/t_VolumeMesher_std.cxx
  • python/src/VolumeMesher_doc.i
  • python/test/t_ConvexHullMesher_std.py
  • python/test/t_VolumeMesher_std.py
📝 Walkthrough

Walkthrough

ConvexHullMesher now marks generated meshes as convex across all construction paths. VolumeMesher rejects non-convex surface meshes, and C++/Python tests plus Python documentation reflect the convex-volume requirement.

Changes

Convex volume meshing

Layer / File(s) Summary
Mark generated hulls as convex
lib/src/ConvexHullMesher.cxx, python/test/t_ConvexHullMesher_std.py
All ConvexHullMesher paths set isConvex to true, with tests asserting convexity across hull cases.
Require convex surfaces for volume meshing
lib/src/VolumeMesher.cxx, lib/test/t_VolumeMesher_std.cxx, python/test/t_VolumeMesher_std.py, python/src/VolumeMesher_doc.i
VolumeMesher rejects non-convex surfaces; round-trip tests synchronize convexity metadata, and the docstring specifies the convex-volume requirement.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • openturns/otmeshing#28: Introduces the VolumeMesher pipeline and overlaps with these ConvexHullMesher and VolumeMesher changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately captures the main ConvexHullMesher change to mark hulls as convex.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch convex

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
lib/src/VolumeMesher.cxx (1)

76-77: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a regression test for the new convexity precondition.

Test a valid surface with setIsConvex(false) and assert InvalidArgumentException; otherwise this new rejection contract is not protected against regression.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/src/VolumeMesher.cxx` around lines 76 - 77, Add a regression test for the
convexity precondition enforced in VolumeMesher: create a valid surface mesh,
set its convexity to false with setIsConvex(false), and assert that constructing
or invoking the relevant VolumeMesher path throws InvalidArgumentException. Keep
the test focused on this rejection contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/src/VolumeMesher_doc.i`:
- Line 2: Update the method-level documentation for VolumeMesher.build to state
that the associated surface mesh must represent a convex volume and satisfy
surface.isConvex(). Keep the existing class-level description and method
behavior unchanged.

---

Nitpick comments:
In `@lib/src/VolumeMesher.cxx`:
- Around line 76-77: Add a regression test for the convexity precondition
enforced in VolumeMesher: create a valid surface mesh, set its convexity to
false with setIsConvex(false), and assert that constructing or invoking the
relevant VolumeMesher path throws InvalidArgumentException. Keep the test
focused on this rejection contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a60042e2-68f8-41b7-a6e0-769270b7212c

📥 Commits

Reviewing files that changed from the base of the PR and between df50e33 and 6936c3f.

📒 Files selected for processing (6)
  • lib/src/ConvexHullMesher.cxx
  • lib/src/VolumeMesher.cxx
  • lib/test/t_VolumeMesher_std.cxx
  • python/src/VolumeMesher_doc.i
  • python/test/t_ConvexHullMesher_std.py
  • python/test/t_VolumeMesher_std.py

Comment thread python/src/VolumeMesher_doc.i
@jschueller
jschueller merged commit b8f494a into master Jul 28, 2026
7 checks passed
@jschueller
jschueller deleted the convex branch July 28, 2026 14:38
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