-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate redundant references to Surface
#1588
Labels
topic: core
Issues relating to core geometry, operations, algorithms
type: development
Work to ease development or maintenance, without direct effect on features or bugs
Comments
hannobraun
added
type: development
Work to ease development or maintenance, without direct effect on features or bugs
topic: core
Issues relating to core geometry, operations, algorithms
labels
Feb 15, 2023
This was referenced Feb 15, 2023
This seems to be going much easier than expected! I made it most of the way there today (see the pull requests referencing this issue, listed above this comment) and I'm not aware of any serious problems that would prevent me from wrapping this up next week. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic: core
Issues relating to core geometry, operations, algorithms
type: development
Work to ease development or maintenance, without direct effect on features or bugs
(This issue is part of a larger cleanup effort. See #1589.)
As of this writing,
Surface
is referenced by bothCurve
andSurfaceVertex
. Those references must be consistent: aHalfEdge
is only valid, if theCurve
and theSurfaceVertex
instances it references all reference the sameSurface
. In turn, allHalfEdge
s in aCycle
must (transitively) reference the sameSurface
, and allCycle
s in aFace
must do so.This redundancy makes building and modifying these objects unnecessarily hard. There also need to be validation checks on every level from
HalfEdge
upwards to verify consistency. I believe it would be better to referenceSurface
only once, inFace
. This would simplify the object graph a lot.It would also mean that
Surface
is farther away from where it is often needed (for example, to approximate a curve in 3D space, you need the surface that it is defined on). But I think this can be addressed by structuring the code that usesSurface
differently, on a case-by-case basis. I think that overall, this will be a worthwhile trade-off, as any additional complexity in code usingSurface
would be largely restricted to that code, while the additional complexity in the object graph affects the whole kernel negatively.This issue is closely related to other cleanup efforts, namely #1525, #1570, and #1586. It will probably not be possible to address each of those in isolation, as the very complexity these issues aim to address tends to hinder them. Most likely, the issues will be addressed together, by picking low-hanging fruit from each of them, until all of them have been addressed. This is something I am actively working on right now.
The text was updated successfully, but these errors were encountered: