topologicpy icon indicating copy to clipboard operation
topologicpy copied to clipboard

AttributeError: module 'topologicpy' has no attribute 'Vertex'

Open djsiete opened this issue 1 year ago • 1 comments

I'd like to apologise in advance because I'm still an absolute beginner to this.

I'm trying to create a simple room in topologicpy using four simple vertices. Here's my code:

import topologicpy
print(topologicpy.__version__)

print(dir(topologicpy.Vertex.Vertex))

from topologicpy import Vertex, Edge, Wire, Face, Cell, CellComplex, Topology

# Create vertices for Room 1
v1 = Vertex.ByCoordinates(0, 0, 0)
v2 = Vertex.ByCoordinates(5, 0, 0)
v3 = Vertex.ByCoordinates(5, 4, 0)
v4 = Vertex.ByCoordinates(0, 4, 0)

I've reverted back to v0.7.17 just in case, but I get the same error in that version as in the latest version.

What gives? I've looked in the documentation and the attribute Vertex is indeed present in topologicpy.

Or isn't it?

Thanks...

djsiete avatar Jul 08 '24 21:07 djsiete

Your import statement is wrong It should be from topologicpy.Vertex import Vertex from topologicpy.Edge import Edge

wassimj avatar Jul 08 '24 21:07 wassimj

I'm closing this issue since I have not heard back from you.

wassimj avatar Aug 25 '24 09:08 wassimj