Grasshopper

algorithmic modeling for Rhino

I have a toggle that activates two components. The first component bakes points in the rhino environment. The second component (a vb script) then uses these baked points and creates a mesh.  I therefore need the second component to be activated say 5 seconds after the toggle is activated.  I have used the timer but this results in multiple meshes being created as the second component is activated by the timer.

I have tried using the meshfrompoints C# component but the problem is when the number of points exceed 1000, it tends to slow the process down.

I attach a screenshot to explain what I am trying to do.

Regards

WT

Views: 653

Attachments:

Replies to This Discussion

hi,

you may try the data dam component

You may check this one too:

http://www.grasshopper3d.com/forum/topics/set-store-and-refresh-an-...

Cheers,

Raul

Why 5 seconds? Can't the script run as soon as the other one finishes?

Or, for that matter, why not combine the Bake and MeshFromPoints code into a single script. That way you can bake the points, select the points, run the command, delete the points, harvest the mesh geometry, delete the mesh and return the geometry out of the script component.

Sure it would take a couple dozen lines of code instead of 3, but it would make the whole thing entirely automatic and contained.

I only used 5 seconds as an example. It is because I was using a third party component to do the baking. I will search for a vb script that will do the same.

Thank you.

You won't find an existing script that does what you want, I just though that since you're using code already, why not do it all in code? See attached. C# instead of VB though.

Attachments:

Thank you for the code. 

Unfortunately when the number of points is around 7000, the process of transferring the points to the rhino environment appears to swamp the system, requiring about 40 seconds to create the surface. Is there anyway to replace the loop section in the script?

regards

Isn't the time all spend inside the _MeshFromPoints command? Adding points should be a fairly quick operation, especially with the viewport redraw switched off. I think the command is simply slow and there's nothing you can do about that.

When the 7000 points are within the rhino environment and I use the meshfrompoints command within a vb component, it takes 0.25 seconds to generate the surface.

Today this morning, I tried your script again on my works computer and the bottleneck does not happen, creating a surface in about 0.4 seconds.  Rather puzzling - wonder whether it is to do with some memory drain problem. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service