ladybug-tools / honeybee-vtk

🐝 🌐 Honeybee extension for translating HBJSON files to VTK format
https://www.ladybug.tools/honeybee-vtk/docs/
GNU Affero General Public License v3.0
9 stars 10 forks source link

how to set the writer of arrows.to_vtk #431

Open ymg2007 opened 1 year ago

ymg2007 commented 1 year ago

from ladybug_geometry.geometry3d import Point3D, Vector3D from honeybee_vtk.to_vtk import create_arrow

points = [Point3D(0, 0, 0), Point3D(1, 1, 0), Point3D(1, 0, 0)] vectors = [Vector3D(0, 0, 1), Vector3D(1, 1, 1), Vector3D(2, 0, 0)] arrows = create_arrow(points, vectors) arrows.to_vtk('.', 'arrows') I copy this code to vs code. Run it with the error image Then I changed the code, it returned a new error arrows.to_vtk('.', 'arrows','vtk') image According to the docs of honeybee_vtk, it gived me the description image

https://www.ladybug.tools/honeybee-vtk/docs/honeybee_vtk.types.html?highlight=writer#honeybee_vtk.types.VTKWriters I don‘t know how to fix this error.

ArchitectOnNet commented 9 months ago
from honeybee_vtk.types import VTKWriters
writervtk = VTKWriters(value='vtk')
...
myvtk = arrows.to_vtk('.', 'arrows', writervtk)