Grasshopper

algorithmic modeling for Rhino

Here is a script replicating the shape created by pouring sand on a closed shape (here a polygon). From above it draws medial axis, but here it is a Brep generated from a closed polyline. The limit angle of repose is here 45° but it could certainly be changed by using a scale in Z. 

The script use just classic Rhino/Grasshopper function. It didn't work with all polygons, I didn't search why. The closed polygon must be on XY plane, it could be clockwise or anti-clockwise.

Have fun, me I will continue to play with real sand on the beach for some days :-)

Views: 9245

Attachments:

Replies to This Discussion

FYI: I get a repeating Rhino Crash each time I try to extract any of the 4 Curve parameters that feed into the Stream Filter in this GH file.

@Kim : For the crash I don't know. I have no problem to bake internalized curves !!!

Here is a new version which enables to give

  1. an angle of repose from 5° to 85°.
  2. End type for concave parts could be Round (constant slope), Butt (roof like) and Square (??). I used the same naming as in Offset component (Clipper/Bowerbird).

The Butt style could be useful to make roofs. 
Not working for all polygons, I don't know why at the moment. 

Some corrections for Butt and coloring depending on orientation of the roof.

Attachments:

Hi Laurent;

I wanted to preserve a copy the original internalized curves, before experimenting further. Hence I chose to do an extract curve parameter operation, instead of a copy and paste.

I have never seen a Rhino Crash when extracting a curve parameter...... which is strange as it happens only in this script. ...... I have no trouble baking! :)

Hi Kim, 

I just tested the Extract Parameter command and I have no crash. I didn't knew this command, thanks. 

A script to make "roofs" with many curves, doesn't work for one curve (I don't master enough GH trees) and doesn't work for complex curves and sometimes simple curves. 

All curves must be closed and are transformed to polygons (not sur it is a Vanilla script). 

The script : 

Attachments:

Some others script working with mesh

https://discourse.mcneel.com/t/old-town-roofs/51634 and Offset from Clipper

Hi Laurent,
Is it possible for the "Complex" shape to work with "Butt (angular) roof"?

I tried both v2.1 and v3 of your definition but it failed for some reason.

Hello Djordje

yes they are some problems. Mainly they are due to Boundary Volume components, but indeed it is due to Rhino method  "Brep[] CreateSolid( IEnumerablespan class="identifier">Brep> breps, double tolerance )". I tested it and it ouputs many volumes but not the one we need. I suppose David took the volume with the biggest volume. 

So as it is not cool to let an unresolved problem I wrote a C# component. It seems more robust. Sometimes you will have to play with tolerances and recompute solution. I parallelized the component so it is fastest with many curves. 

Angle of roofs are 45° but it is easy to change with a NuScale. 

sand%20dune%20c%23.gh

A version that work also with Rhino 5 and GH 0.9

Problem with inconsistency of ClosedCurveOrientation 

See 

https://discourse.mcneel.com/t/clockwise-or-counter-clockwise-orien...

sand_dune_csharp_RH5_LEGACY.gh

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