Grasshopper

algorithmic modeling for Rhino

Hi, I'm new to grasshopper and have been trying to spread a certain geometry along a curve. 

As I'm trying to construct a road I want it to have the correct slope and to have het correct rotation in het XY-plane. What I don't want is tortion on my planes (put in another way, I want the line in my example to stay horizontal (the start and endpoint of my line should have the same z-coördinate) while remaining the correct slope and rotation in het XY-plane. Any ideas on how to solve this?

Some screens of the situation:

I've tried all kinds of frames on the curve and tried with allign planes but I still don't get it quitte right.I tried to experiment with measuring the corners and rotate every plane but I couldn't get it to work...

Your help is much appreciated!

Views: 3004

Replies to This Discussion

Have you tried to align the planes with the guide vector being Z?

Perhaps it's something to do with the way you are constructing or moving the lines to the planes?

If you post your def we can have a look

I've tried to align the planes with the z-vector but no succes there.

Only thing that seems to be working relatively well is the solution below (purple box)

In the right panel I'm keeping an eye on the difference in z-coordinates (0.0 is what I want).

The only problem is that sometimes the plane won't orient right and it'll flip, I have no clue as to why this happens.

Is there a way to control or fix this issue?

I also included my grasshopper file (It's the code on top that matters).

Attachments:

You have used the Tangent vector of the curve to align the planes and I think this can flip depending on the curvature. Someone will probably be able to give you a better explanation.

Use a unit X vector...

Attachments:

Thx, it's not quitte what I wanted, but the alligned planes gave me an idea so now I worked out a solution that works!

The problem in your file is that the planes are actually "straight" vertical (they stay perpendicular to the world-horizontal plane (XY)) instead of bending with the curve and staying perpendicular to the curve (blue corner below). I have no acces to rhino or grasshopper at the moment but I'll try and post my solution tomorrow.

This is an interesting subject...  Take a look at the attached files using a single "rail" and "section" curve.

The "Sweep, one rail, one section" is the simplest, but it exhibits torsion as the section curve is twisted.

The "Torsion Free!" code uses horizontal planes to build vertical planes that orient the section curve as expected - and produce a roadway without torsion too.

P.S.  Be sure to use 'Shaded', not 'Raytraced with Neon', to see the rail and section curves.

Attachments:

Thx for your effort! I'll take a look at your solution tomorrow, but the results look very good!

In a very simular way I also found a solution to the problem (also creating the "no tortion" planes by using the horizontal planes in some way).
It feels like there should (or might) be an easier solution but perhaps there isn't :p


I'll post my solution tomorrow because I don't have acces to rhino and grasshopper at the moment.

This code is better:

Attachments:

Thx for your help guys!

Here's another way to create the perpendicular planes without tortion,

it might be usefull for someone...

Attachments:

Hello all,

creating perpframes and aligning them with z vector should work:

Attachments:

That is an impressively simple bit of code!  I am surprised that "Align" to "Z" removes only the roll (torsion) from the PerpFrame, leaving the pitch intact.  This is what Stijn wanted, though I wanted to remove both, and did in my earlier code.

I made a few changes to your version so that it uses the same rail/sweep idea I did before.  I found it necessary to rotate my "sweep curve" (in yellow) before passing it to your "Orient" step:

Attachments:

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