Consolidate redundant references to GlobalCurve
#1605
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.)
Currently, there are references to
GlobalCurve
in two different places:Curve
andGlobalEdge
. Both of those objects are referenced byHalfEdge
. An instance ofHalfEdge
is only valid, if theGlobalCurve
being referenced is the same one in both places. This is verified by a validation check.This is another part of the object graph that is redundant and can be simplified. I have the following in mind:
GlobalCurve
fromCurve
. (Remove reference toGlobalCurve
fromCurve
#1607)This reference is currently used in the approximation code, to ensure that coincident
Curve
s result in the same approximation. It shouldn't be too much of a problem to adjust this, maybe by moving that approximation caching logic up to theHalfEdge
level.GlobalCurve
. (MergeGlobalCurve
intoGlobalEdge
#1610)Once the previous step is done, the only remaining purpose of
GlobalCurve
(unless I'm forgetting something) is to track its identity, so we can uniquely identify edges that are supposed to be the same. This role is redundant, sinceGlobalEdge
already provides that. At this point, it should be possible to removeGlobalCurve
.Curve
intoHalfEdge
. (MergeCurve
intoHalfEdge
#1616)At this point,
Curve
only contains aSurfacePath
and nothing more, meaning its further existence as a separate object serves no purpose. It can just be inlined intoHalfEdge
.SurfacePath
toCurve
. (RenameSurfacePath
toCurve
#1617)The previous item frees up that name, so it can be taken over by the more awkwardly named
SurfacePath
.I'm going to start working on this shortly, as part of my larger simplification effort (#1589).
The text was updated successfully, but these errors were encountered: