wassimj / topologicpy

The python bindings for topologic
MIT License
83 stars 23 forks source link

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

Closed djsiete closed 1 month ago

djsiete commented 2 months ago

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...

wassimj commented 2 months ago

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

wassimj commented 1 month ago

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