Align control points between two heights

Hi together

I have a maybe simple question, which i cannot figure out since a long time now.

I’m wondering how I can distribute the controllpoints evenly between the start and endpoint of a line. And also how i can give a line a slope in percentage.
For example modeling a street. Having a start point at 405meters and an endpoint of 408 - then distribute all other vertices for making the curve of the street between those two heights.

I attached a screenshot to better explain.

Thanks for suggestions or even a solution.
Cheers - Beyon

Hi @Beyon
This is a 2-step operation, using Align and Distribute. First turn on control points (F10) of your polyline. Start Align and select your control points as the objects to align. Select the To Line option in the prompt and click the start and end point of your polyline. Notice that the control points stay selected, so go ahead and start Distribute, select the Direction option and again click the start and end points of your polyline.
HTH, Jakob

1 Like

Thank you for your reply.
Somehow that doesnt work for me.

Using align to To Line also gets rid of the curve in u-v direction, not only z values. And Distribute only works for whole objects and not control points as it seems.

Hi Beyon - please post a file with the input and the desired output, even if approximate. I think Jakob is on the right track…

-Pascal

i made a small example file.

The red layer is my desired output. Black is input.
From Topview, both curves are exactly the same, but from the side view points are evenly distributet from high to low in the z axis.

I made a workaround with a grasshopper script but it only works for either the y or x axis - so its not very satisfying.
example.3dm (30.1 KB)
Control_Points_z-axis.gh (11.4 KB)

thanks Beyon

Hi Beyon - yoo can try this, from an elevation view of the curve - at the prompt for the vertical plane, snap to the two ends of the input curve.

! _Project _Direction _Custom _Pause _IP _Vertical _Pause _Pause _Enter 0 0,1,0

Note, this does not, and your example does not, distribute the points in any way evenly - it makes the curve fall on a plane between the two ends of the curve, which is what it looks like you want.

-Pascal