Horizontal curve deformation based on vertical curve

I have some polycurve which completely belongs to XY plane, and other one in YZ plane. Is there a way to create a new 3D polycurve which will have XY coordinates from first curve and Z coordinates from second polycurve?

Try looking into Point.Add :slight_smile:

Simply use a Vector.ByCoordinates(0,0,Z) to pull the Z values from your YZ plane polycurve and populate them into your XY plane polycurve.

Probably a more efficient way of doing it, but here is one potential solution:

Point.Add Example

rade, try to create vertical planes intersecting both curves ( use PlaneAtParameter) then you get intersections for both curves. with that create points taking xy from curve a and z from curve b

(Point.X, Point.Y, Point.Z) and Point.ByCoordinates.

these points can be used for creating your curve i.e. NurbsCurve.ByPoints

 

Peter, I did something as you suggested, so here is a solution: Divide both polycurves at equal number of segments, get all first points of that segments and last point of last segment. Now you have eqaul number of point coordinate values for both horizontal and vertical polycurve. Join that values with Point.ByCoordinates and create NurbsCurve.ByPoints. Also, I suggest after - processing with function Curve.ApproximateWithArcAndLineSegments, because if you have some segments which were straight lines at same distance in horizontal polycurve and vertical polycurve, that function will optimize it with only one segment (for example, I divided polycurves at every 5 m, and there was straight line segment of 80 m, if I didn’t have Curve.ApproximateWithArcAndLineSegments node, I have 16 segments, and with that node only one!)

Hi Rade

Would you mind posting an example file?

Cheers

PS were you able to use your final curve as path/rail for a sweep function?