I would like to save my mesh to a path (C:\dummy\test). Of course, I could just manually save the Rhino file, but I am wondering there is a more “Script-wise” way so that one can generate a mesh in Grasshopper and save it using a component/GhPython script.
Yes, this code perfectly works. But, in your other post “How to optimise GHPython OBJ export?” Terry reported an exporting speed of 3.249 GB/sec. Now with this code, my scripts takes around 1 sec for the given mesh. Is it because of my Computer spec or are they different scripts?
Haha, yes! So Terry wrote a super optimized C++ script/library. Python is by nature slower.
Sure, the specs of your computer, mainly hard-drive and CPU speed play into this a little, but one second to export the example mesh, which has 16900 vertices and 15360 faces doesn’t seem that bad really. For me it takes about 6 seconds 0.6144 seconds.
Fun fact, Terry’s approach is by far quicker than even the native Rhino export, which I use in this script.
@haraaald45, what do you want to use this for? I exported entire OBJ sequences (for animations) without a problem really.
@gankeyu, could you explain a little what you mean? Data input/output that’s basically what I do - I use the Rhino OBJ export -, unless you mean something else?
OP asked specifically for a “component/GhPython script”, if you’re referring to some C# shenanigans.