Skip to content

Edge objects mix up xyz coordinates and node keys as u, v attributes #1

Description

@arpastrana

Feature Request

We need to clean up how Edge objects are created.

Details

Make Edge objects is confusing as xyz coordinates or int keys can be stored in their self.u and self.v attributes. A solution to this would be like what is happening with the Node class, where there is self.xyz and self.key attributes in the constructor (both initialized to None at runtime). When Node.from_point is invoked, node.xyz is repointed to the supplied point, and node.key stays dormant. The converse is true when a node is instantiated from a key (which should be the de-facto way).

The trick comes when adding an Edge to a Diagram, where the latter should handle the addition adequately upon encountering an edge with u, v keys only, or xyz coordinates only, or a combination of the two.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions