algorithmic modeling for Rhino
Hi everyone this is my first question in this forum!
I'm trying to use the ghpythonlib inside a python component. In particular I'd like to use the vectorDisplay but the code that I wrote doesn't work and I don't know why. In fact there's no error messages but the vector preview is not shown.
Any suggestions?
thanks
_matteo
Tags:
Hi Matteo,
Not all grasshopper native components are currently supported with ghpythonlib.components module.
Components like VectorDisplay, CustomPreview being one of those.
For any further questions, or new topics, please attach your .gh, .3dm files too.
custom drawing in a python component is no small feat since you can't override DrawViewportMeshes the way you can in a C# or VB.NET component. Mostapha's example here: http://www.grasshopper3d.com/forum/topics/rhino-display-customdispl... is the best I know of.
Thanks for the info Andrew.
Here is with Mostapha's example.
DrawViewportMeshes is available in 'Component compilation mode', in the Rhino WIP of the last few months.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Thanks for the update Giulio, sounds great! Think it's about time I go wring the arm(s) of our IT crowd and convince them to fork over a personal license instead of running on the zoo :)
Hi Giulio, This can be very**10 useful for us! Do you have a working example?
Indeed, that solution still has "lingering" displays floating about though. In which case it is substantially simpler to implement David's CustomDisplay class (see attached). Just remember to toggle it back off again ;)
Hi Anders thanks for your example. I'm trying to use the object's preview to display(or not) the vector) but I don't understand how I can do it. In the attached file I replaced the "toogle" statement with:
ghenv.Components.Hidden == False
but it works only if I re-run the script after changing the object's preview. I undertand that I have to be able to detecte the "changed events" for the component but I don't understand how. Do you have any idea?
_matteo
Nice!!
thank you guys so much for your help
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
Yes, sure. See the attached (simple) example.
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com