Grasshopper

algorithmic modeling for Rhino

I currently have two 2D curves. One of the curves is on the xy plane (all the z-values of the points = 0). The other curve is on the xz plane (all y-values of the points = 0). Essentially what I have is are curves for the alignment and a profile for a roadway.

Is there a way that I can create a 3D curve from these two curves? I want the 3D curve to follow the xy-path of the alignment curve and the vertical path of the profile curve. 

The obvious solution is to discretize both curves into the same number of points, extract the z-coordinate of each of the points from the profile curve and xy-coordinate of each of the points from the alignment curve, create points from these coordinates, and create a curve/polyline from these points.

Is there any way to maintain the curvature of each of the two lines?

Thank you all in advance. 

Views: 759

Replies to This Discussion

Does TweenCurve component give you what you want?

No. I'm trying to maintain the xy coordinates for the alignment curve and the z coordinate for the profile curve. Tween will probably mess all of those coordinates up. 

What about lofting each curve and then getting the intersection between the 2 surfaces?

Thanks for the response. I've been playing with that a little, and it gets me close to where I want to be. However, the 3D curve would get distorted since the length of profile curve in the x direction is based on the actual length of the alignment curve, not the length just in the x direction. The profile curve is in green and the alignment curve is in red. 

I wonder...does "Pull Curve" work for this? 

Attachments:

I would say your best bet is what you described in your original post... Use EvaluateLength to get the curve info at a number of positions along the curves and then build a new curve based on the elements you want from each curve.

You can then evaluate the new curve and look at the tangent vectors to see what's going on with the curvature but I don't understand how you could maintain curvature from one of the original curves.

You can use EvaluateCurve to look at the Angles at each evaluation parameter too.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service