Grasshopper

algorithmic modeling for Rhino

Hello,

 

I'm quite new to the scripting stuff and grasshopper thus I'm searching for some help.

 

I have the following question:

 

I would like to transform a polysurface shape by an original reference curve and a deformed curve. Just like the flow command in rhino. This has to be repeated for multiple deformations which are listed in a excel file.  Only i couldn't find the command in grasshopper, thus i think this requires some vb. I've tried the surface morph but it does not give the same results.

 

So my plan was..

 

*grasshopper

-read the excel file

-create curves

 

*vb

-export curves to individual layers in rhino

-select the polysurfase, orginal curve and deformed curve by their layer and recieve each ID (GUID?)

-run the flow command and select it with their id's

-change the layer of the deformed polysurface to a new layer

-import the deformed polysurface back to grasshopper

-delete the curve defintions

 

* grasshopper

-manipulation of deformed polysurface

-write data back to an excel file

 

*vb

-delete the curves in rhino

 

*grasshopper

-rerun for each deformation curve

 

The grasshopper parts will I think be not a big issue and allready have the largest part of excel working. However the vb part is not working out because of my limited knowledge.

 

Who can help me a bit how i can achieve this, or has better solutions for this?

 

Also I would like to know a bit more about the dotnet vb and the legacy part how this programming should be done. Are there good tutorials for this?

 

Thanks,

 

Alex

 

Views: 1194

Replies to This Discussion

Hi vindalex,

when you say "vb", do you mean VBScript or VB.NET?

--
David Rutten
david@mcneel.com
Seattle, WA
Hi David,

I've done some reading about the scripting in order to understand it and correct me if I'm wrong, the VBScript is done directly (can be written in monkey) and the VB.NET is the language used in grasshopper.

Than in this case, I would like to make the project in grasshopper with the help of VB.NET

Or is is wise to do all in VBScript because VB.NET is too complex for a beginner.

Regards,

Alex
That's a good question, I think VB.NET is definitely more complex since it relies heavily on OOP (Object Oriented Paradigm). RhinoScript is basically just a big list of functions you can use, in VB.NET you have to know about namespaces and classes and interfaces and instances and shared methods.

However certain steps in your list are not possible via RhinoScript, so that pretty much narrows it down.

I do wonder why you care at all about layers since you're importing the brep data back into Grasshopper. Who cares what layer an object is on if it only exists temporarily?

I'll try and code up a Brep+Curve+Curve -> Flow operation as a VB.NET component.

--
David Rutten
david@mcneel.com
Seattle, WA
See attached. Code is commented.

--
David Rutten
david@mcneel.com
Seattle, WA
Attachments:
David,

Thanks for this code. I've a lot to learn.

I wanted to put them in individual layers to ease the selection but thats not required anymore.

Greetings,

Alex

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service