Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Rethink geometry.require<ManagedQuantityName>

Aperta
#231 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Start by locating the Geometry implementations of require and the existing ensure behavior. Trace how requireCount controls recalculation and how quantities are acquired in the relevant geometry methods. Done means the API exposes the proposed ensure methods without repeatedly incrementing requireCount, with behavior covered by the repository's applicable tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hey,

I noticed that once you do geometry.require<ManagedQuantityName> it will increment the requireCount. This means that in every method that needs the managed quantity, requireCount will be incremented every time. This somehow feels unclean.

This also means that the managed quantity will always be automatically recalculated, unless you explicitly do geometry.unrequire<ManagedQuantityName>.

I think it would make sense to expose the ensure<ManagedQuantityName> methods. You could do require<ManagedQuantityName> once on Geometry creation, and then just use ensure<ManagedQuantityName> whenever you need the quantity, not incrementing the count every time.

What do you think?

Lingua principale
C++
Stelle
1.3k
Fork
183
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nmwsharp/geometry-central

Tutte le issue di nmwsharp/geometry-central

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.