Grasshopper

algorithmic modeling for Rhino

10% SLOPE RAMP GENERATOR FROM POPULATE 3D POINTS (ANEMONE LOOP)

Can anyone help me figure out what I'm doing wrong?

I'm trying to create a 'ramp generator' using points & lines.

The goal is for the loop to pass through as many points as possible to create a series of ramps with slopes =< 10%.

Here's my pseudo-code:

1. Populate brep with random points

2. Sort points by Z values

3. Draw line from point '0' of sorted points to all other sorted points

4. Project lines down to plane of first point and cull all lines =< 5.7 degrees (10% slope)

5. Sort remaining lines by length and return line with the largest length (what I want)

6. Cull all points used to create lines =< 5.7 (step 4)

7. ??? now, I want to somehow pass remaining points from step 6 back into the loop and return the next curve that is: the largest length curve from all curves =< 5.7 degrees

I've attached the script

Thanks ya'll!

Views: 1412

Attachments:

Replies to This Discussion

Something like this? Anyway, how does this help in real situations?

Attachments:

Thanks! I've been tinkering with it...It should be something more like this

You see anything that can be optimized?

I'm developing a rhetorical space where ground planes are =< 10% (aka the max slope for driving a forklift)

Its just the first step of ongoing exploration.

Attachments:

You may find the same fix in the file I posted earlier. Nevertheless, I don't know if I should fix it for you.

I'm not sure if this is what you are after, but check it out. Modified parts are marked in red.

Attachments:

Yep. exactly what I'm looking for.

TY

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service