Casting from Rhino Geometry to GH Geometry - Grasshopper2024-03-29T15:00:57Zhttps://www.grasshopper3d.com/forum/topics/casting-from-rhino-geometry-to-gh-geometry?feed=yes&xn_auth=noCastFrom is probably a wee bi…tag:www.grasshopper3d.com,2012-09-06:2985220:Comment:6788292012-09-06T19:06:08.065ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>CastFrom is probably a wee bit slower than the functions available in the Grasshopper.Kernel.GH_Convert class. How many cylinders are you creating in 2 seconds? If the code you pasted above is all there's to it, I imagine it's thousands and thousands no?</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>CastFrom is probably a wee bit slower than the functions available in the Grasshopper.Kernel.GH_Convert class. How many cylinders are you creating in 2 seconds? If the code you pasted above is all there's to it, I imagine it's thousands and thousands no?</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Hi David,
Thanks for the repl…tag:www.grasshopper3d.com,2012-09-06:2985220:Comment:6786802012-09-06T15:13:11.901Zkermin chokhttps://www.grasshopper3d.com/profile/kerminchok
<p>Hi David,</p>
<p>Thanks for the reply. I have timed the code execution and it appears that it takes about 2 secs for the rhinocommon geometry creation loop and another 2 secs for the DA.SetDataList etc to execute. </p>
<p></p>
<p>All GH geometry is essentially created by using the CASTFROM function and we should be using RhinoCommon calls to create the manipulated geometry to be casted. Is this the correct understanding?</p>
<p></p>
<p>Thanks.</p>
<p>Hi David,</p>
<p>Thanks for the reply. I have timed the code execution and it appears that it takes about 2 secs for the rhinocommon geometry creation loop and another 2 secs for the DA.SetDataList etc to execute. </p>
<p></p>
<p>All GH geometry is essentially created by using the CASTFROM function and we should be using RhinoCommon calls to create the manipulated geometry to be casted. Is this the correct understanding?</p>
<p></p>
<p>Thanks.</p> Casting is about as fast as I…tag:www.grasshopper3d.com,2012-09-06:2985220:Comment:6783012012-09-06T09:19:00.994ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>Casting is about as fast as I can make it. If you want to shave a few nanoseconds off the type-guid jump table, then you can create a list of GH_Surface or GH_Brep instead. Have you profiled your code to see how long it takes to run in comparison to the entire component?</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p>Casting is about as fast as I can make it. If you want to shave a few nanoseconds off the type-guid jump table, then you can create a list of GH_Surface or GH_Brep instead. Have you profiled your code to see how long it takes to run in comparison to the entire component?</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>