Cut holes in mesh

Open
#144 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by reading the mesh construction logic in src/surface/manifold_surface_mesh.cpp around lines 48 and 154-161, then inspect SeparateEdge around lines 671 and 808-814. Reproduce the reported failures with a mesh containing an interior edge loop. Done means the library can represent the loop as a boundary or clearly documents the supported approach.

Written by the indexing model from the issue text.

Description

First of all, a huge thanks for creating this fantastic library!

I've been experimenting with GC inside of Rhino to work with modelling terrains. One thing I'm struggling with is cutting holes in the mesh. Consider this basic example:

Initial mesh:
image

Faces to remove:
image

Resulting mesh with a hole inside:
image

I tried several approaches:

  1. Omit the interior faces while constructing a new mesh:
    https://github.com/nmwsharp/geometry-central/blob/ebe40292466517b2139f8f546688db278414e3bb/src/surface/manifold_surface_mesh.cpp#L48

This fails here:
https://github.com/nmwsharp/geometry-central/blob/ebe40292466517b2139f8f546688db278414e3bb/src/surface/manifold_surface_mesh.cpp#L154-L161

  1. Pass the edges defining the interior boundary to the SeparateEdge function
    https://github.com/nmwsharp/geometry-central/blob/ebe40292466517b2139f8f546688db278414e3bb/src/surface/manifold_surface_mesh.cpp#L671

Which fails here;
https://github.com/nmwsharp/geometry-central/blob/ebe40292466517b2139f8f546688db278414e3bb/src/surface/manifold_surface_mesh.cpp#L808-L814

Is there a straight-forward way to define an edge loop as a boundary?
@nmwsharp, @MarkGillespie, @keenancrane

Dominant language
C++
Stars
1.3k
Forks
183
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmwsharp/geometry-central

All issues in nmwsharp/geometry-central

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.