Hi!
I have COMPAS=0.11.4
Having an error with draw_vertices():
Runtime error (MissingMemberException): ‘dict’ object has no attribute ‘data’
Traceback:
line 77, in draw_points, “C:\Users\sercan\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_ghpython\utilities\drawing.py”
line 51, in draw_vertices, “C:\Users\sercan\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_ghpython\artists\mixins\vertexartist.py”
line 57, in script
But not for draw_edges() or draw_faces() - they seem to work fine.
Any hints how this could be solved?
Thank you!
Selen
this code snippet doesn’t make too much sense to me but i don’t know compas_ghpython that well . i would write something like the following for Rhino. perhaps it helps…
import compas_rhino
from compas.datastructures import Mesh
from compas_rhino.helpers import mesh_from_guid
from compas_rhino.artists import MeshArtist
guid = compas_rhino.select_mesh()
mesh = mesh_from_guid(Mesh, guid)
corners = list(mesh.vertices_where({'vertex_degree': 2}))
artist = MeshArtist(mesh, layer="SomeLayer")
artist.clear_layer()
artist.draw_vertices(keys=corners)
artist.draw_edges()
artist.draw_faces()
artist.redraw()
Yes, it seems like compas_rhino draw_vertices() works without problems in all releases. However it does not help much - i cannot seem to track down what changed after the release 0.10 so that the compas_ghpython draw_vertices() started throwing errors…
the reason why i posted the snippet is because it sounds to me that the mesh object passed to the artist is in fact a dict. in the ghpython snippet it is not entiret clear to me how the mesh is created so perhaps something is wring there?
ha true, that is a fair point. will try to have a look later this week. but i guess the easiest thing would just be to update the code bases, since it seems the problem then just goes away…