Grasshopper

algorithmic modeling for Rhino

Running a macro that bakes a set of BRep's and then uses Rhinoceros _CreateSolid

Hi everyone

I earlier asked about _CreateSolid command in Grasshopper and got the reply that it isn't in the .SDK NET package (I'm not much of a programmer but what I've gathered it means that I cannot create solids with Grasshopper).

Now the workaround I've been using is to bake each part that consists of 4 BReps and then run a macro in Rhino  wich completes the solid making process

'_SelAll
_Pause
 _CreateSolid
_Enter
_Pause
_Hide (The hide is there so next part can be selected individually)
_Enter

However dooing this for the 30-40 parts for each iteration I'm dooing in ANSYS is not as smooth as I wanted it to be when I first laid my eyes on Grasshopper and was "holy smoke, this is cool".

Is there a possibility to write a script in VB, C# or outside Grasshopper that would bake each individiual BRep set, run this script and move on to the next set till the model has been finished? Well it's possible for sure, just wonder if it's easy and anyone already has a defenition for it or if it's complicated.

Views: 1073

Replies to This Discussion

Hi Aðalsteinn Már Ólafsson (such a beautiful name, I feel compelled to use all of it when addressing you),

I attached a User Object that wraps the CreateSolid command. To install this, run Grasshopper, open the UserObject folder via the File menu and drag+drop the *.ghuser file into that folder. You should now have an extra component in the Intersect.Boolean panel (it's just a regular VB script with a new icon).

Let me know if this works (or not).

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Attachments:
Hi David, thank you for the compliments on my name and swift answer

I've been trying the command and looking at it. What has happened is when I connect surfaces that are non existent in rhino, only as a part of the Grasshopper (i.e. before the bake) I only get the 4 polysurfaces I connect to the CreateSolid item.


However, I did bake each component individually, then selected them as BRep and connected to the CreateSolid command.


I also got some errors when selecting BRep with them connected to the component, I had to choose the BReps before connecting them to the profile.

Hi Aðalsteinn Már Ólafsson,

the script works on lists of Breps. So unless the breps you are feeding it (first image) are all in the same data branch, it won't work as expected. You could try flattening the list of breps, or, better yet, change your data trees so that they all match up.

The images you posted are too small for me to work out what's going on.

Can you post a step-by-step description on how you got the error?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thank you, combining the list into a Flatten Tree item and connecting it to CreateSolid seemed to do the trick.
Hi David,

This is cool. Is there a way to automate the export procedure. Typically to get a surface or solid into any analysis software, we need an iges file. Can we use anything in RhinoCommmon to export it or do we have to use a macro?

If we use a macro, the export window pops up and is there any way at all to set the file type to be exported?

What are your thoughts on this?

Thanks.

Kermin
Hi Kermin,

What analysis software do you use? Have you seen the work I've done on mesh to analysis programs like Strand7 (Straus7), Oasys GSA and Autodesk Robot?



I also hope to get a chance to validate the work I've done on the Sofistik version which has developed nurbs curves and surfaces which would mean it could be meshed in the program. Note that typically I've provided a "bake" component that allows exporting direct from Grasshopper, and there's all sorts of other features under development allowing attributes such as material, restraints, loading etc to be generated there. Also check out the work of the Scan and Solve Rhino plug-in, might be applicable too.

Cheers,

Jon
Hi Jon,
I typically use Strand7 for our analysis. I've been making some custom components to get our structural geometry(lines and plates) directly into analysis to minimize the set up time and more importantly reduce the random error in model manipulation.

See these animations for some of the stuff I've used in the past.
http://www.vimeo.com/8470408
http://www.grasshopper3d.com/video/structural-folding

I've downloaded Scan and Solve but haven't had a chance to play around with it yet.

I'm going to have to start digging deeper into the SDK to do some more of the fancy baking/import/export stuff.

Kermin
Cool, so I assume you saw this video I posted:
http://www.grasshopper3d.com/video/100723-strand7-straus7-fe-and

If you do want to try my tools, get in touch and I'll assist with getting started.
This can be done. If you prefix the Export command with a hyphen you disable any dialogs and you can control the operation from the command line (i.e. through a macro).

I've written a layered dxf exporter script a while ago as a VB component so this is definitely possible.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

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