How to manage options for mesh mutations

Open
#56 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start by reviewing issue #52 and the current SurfaceMesh::flipEdge()/flip signature mentioned here. Compare per-method options with stateful class flags against the listed usability, safety, scalability, and implementation concerns. Done means the project has a decided option-management strategy and its consequences are recorded.

Written by the indexing model from the issue text.

Description

enhancement

After #52 SurfaceMesh::flipEdge() now looks like:

  bool flip(Edge e, bool preventSelfEdges = true);

This gets at a design question: how should we expose behavior options?

Two possible strategies are:

  • Options per-method to control behavior (as above)
  • Stateful (mutable or immutable) flags on the class, which set a consistent behavior for all such function calls.

We should think about which of these strategies we want to pursue, and what the consequences would be.

Some motivating questions to consider:

  • What is the most natural for a user? What minimizes verbosity-creep?
  • What is least likely to lead to bugs, and easiest to debug?
  • What scales well as these classes grow in complexity and functionality?
  • What is not-too-painful to implement internally?
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.