Grasshopper

algorithmic modeling for Rhino

Solidify Surface (OffsetSrf) and triangulated surfaces

Hi, 
This is my first post, yet I have found many many helpful discusions and people here already.
I have a parametrically driven surface (image a) which I then want to make porose using a pattern (b) and then offset to solidify (c) the problem is that in the regular rhino  command you can do OffsetSrf and then toggle S = Solid . In rhinoscript I know it is possible to call specific rhino commandline commands using the actual comman string... how can I automate this process in grasshopper?

a

b

c

 

 

 

Also I saw this cool video (Maya) 

http://data-tribe.net/wework4her/index.php?entry=entry090616-152816 

And I was wondering if anyone just has a ballpark guess what is the logic driving this surface? ... I am doing some research of triangulated surfaces to create curtain walls and this example looks very compelling...

Thank You

Views: 2262

Replies to This Discussion

Hi Erez,

you cannot use Rhino Commands on Grasshopper geometry, as commands always operate on existing objects. Grasshopper keeps it's geometry internal, and only draws a ghosted preview of its geometry in the viewport. This preview cannot be rendered, cannot be selected, cannot be exported.

If you really need to use Rhino commands on your geometry, you'll have to Bake the geometry first. You can either do this manually (use the Bake tools in Grasshopper) or you could choose to Bake the geometry in a Script, run a command and then read the result back in. This is not trivial, as Commands often do not give a lot of feedback as to what happened.

As for the Maya animation, I have no idea what they are trying to accomplish (it looks pretty chaotic), but the term "isosurface" is usually reserved for surface that represents a section through a 3D field of continuous scalar values. Metaballs are the most commonly known isosurfaces, but many others are possible. The mesh in the animation seems to be created by a type of Marching Cube algorithm, which is how most isosurfaces are solved.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,
Thanks for the quick response.
You wrote that it is possible to bake geometry in a script , run a command, and read the result back in. Even though commands do not give back feedback , how can I accomplish this??
This is exactly what I would like to do , yet are you talking about an automated process inside a script or a manual one? I need to do multiple automatic processes because I want to run a grasshopper file on a database of many inputs and generate many results.
Thanks you for the answer.
As for the animation , any information on inplementing Marching Cube algorithm in grasshopper or a scipt?
Hi Erez,

the hard part is reading the geometry back in. It can be very difficult to know which objects the command you just ran added.

OffsetSrf luckily overwrites the existing geometry, so that should at least be reasonably easy. Which commands exactly are you looking to use?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
I want to use OffsetSrf with the S flag on (Solid)...
How do I call the command from within a script?
Erez,

I don't have a working version of Grasshopper at the moment (in the middle of making some changes), so I'll have to do this dry.

Your script will need to have two input parameters, one Brep and a Double. Let's call them "shape" and "offset" respectively.

The first step in your script is to add shape to the Rhino Document. You can access the Rhino document via the doc object in the script. Something like this:

Dim brep_obj As MRhinoBrepObject = doc.AddBrepObject(shape)


Now, you must deselect everything except your newly added shape:

doc.UnselectAll()
brep_obj.Select(True)



Now you can call your command:

app.RunScript("-_OffsetSrf _Pause _Loose _Solid " & offset.ToString)


I'm not sure if the above Command Macro is correct, you may have to experiment with that a bit. Assuming the command completed successfully, the Brep you added to the document has been replaced with the offsetted solid. So extract this solid from the document and assign it to your output:

Dim obj_ref As New MRhinoObjRef(brep_obj.Attributes().m_uuid)
if (obj_ref.Brep IsNot Nothing) Then A = New OnBrep(obj_ref.Brep())



Finally, delete the original shape so the document is left unmolested.

doc.DeleteObject(obj_ref)


--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thank you for your great help... I will update on how this is coming along

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