Skip to content
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

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

Open
arpastrana opened this issue Oct 9, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@arpastrana
Copy link
Owner

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.

@arpastrana arpastrana added the enhancement New feature or request label Oct 9, 2020
@arpastrana arpastrana self-assigned this Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant