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.
Feature Request
We need to clean up how
Edgeobjects are created.Details
Make
Edgeobjects is confusing asxyzcoordinates orintkeys can be stored in theirself.uandself.vattributes. A solution to this would be like what is happening with theNodeclass, where there isself.xyzandself.keyattributes in the constructor (both initialized toNoneat runtime). WhenNode.from_pointis invoked,node.xyzis repointed to the supplied point, andnode.keystays 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
Edgeto aDiagram, where the latter should handle the addition adequately upon encountering an edge withu, vkeys only, orxyzcoordinates only, or a combination of the two.