Skip to content

SubdivideSettings::onlyNearNotFlippable - #6956

Merged
Fedr merged 11 commits into
masterfrom
subdivide-near-not-flippable
Sep 29, 2026
Merged

Fedr merged 11 commits into
masterfrom
subdivide-near-not-flippable

Conversation

@Fedr

@Fedr Fedr commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

New SubdivideSettings::onlyNearNotFlippable: if true, only the edges having a vertex of their left or right triangle incident to a notFlippable edge can be split, so subdivision is localized near notFlippable edges. notFlippable must not be null then (asserted; nothing is split in release otherwise), while an empty notFlippable is fine and splits nothing.

  • The vertices incident to notFlippable edges are collected once and extended with the new vertex whenever a notFlippable edge is split (such edges are never flipped, so no other update is needed).
  • After such a split, the edges opposite to the new vertex are also queued: after a cascade of flips in makeDeloneOriginRing some of them become near only via the new vertex.
  • The condition is re-checked when an edge is popped from the queue, because flips could have moved the edge away.
  • In subdivideMesh( ObjectMeshData & ) the flag applies to notFlippable | selectedEdges | creases.

New tests:

  • MRMesh.SubdivideMeshOnlyNearNotFlippable: on a subdivided plane with one boundary edge marked, far fewer splits than without the flag (39 vs 8240 locally), and none with empty notFlippable.
  • MRMesh.SubdivideMeshOnlyNearNotFlippableOpposite: a small jittered plane where one long near edge is left unsplit if the opposite edges are not queued; checks that no long edge near notFlippable remains.

🤖 Generated with Claude Code

Fedr and others added 9 commits September 28, 2026 16:25
If true, only the edges having a vertex of their left or right triangle
incident to a notFlippable edge can be split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fails without queuing the edges opposite to a new vertex on a notFlippable edge:
after a cascade of flips such edge becomes near notFlippable only via the new vertex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re already in the queue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After makeDeloneOriginRing their triangles are different, so an edge rejected
before (e.g. by maxSplittableTriAspectRatio) can become splittable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fedr and others added 2 commits September 29, 2026 17:21
… notFlippable instead of null

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Fedr
Fedr merged commit b9a0624 into master Sep 29, 2026
58 checks passed
@Fedr
Fedr deleted the subdivide-near-not-flippable branch September 29, 2026 16:34
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.

2 participants