Placing oriented objects along nurb curves at specific points

Hello everybody, I am a beginner user of Dynamo.

I am facing this problem:

  • I have 6 parallel lines and several points along them

  • I want to place a cube in the position of every point but according to the xyz of the lines, so that I have Xcube parallel to Xline and Ycube parallel to Yline, for each point. Instead, I have what appears in the following picture.

This is the graph I developed:

Part1


Part2

So basically I have levareged the Baseline.PointByStationOffsetElevation node to place the points using the baseline as a reference.
Now I want to place these cubes on these points positions.
I can use these points as origin for the Cuboid.ByLenghts node, but the latter does not allow me to rotate the cubes according to the nurbcurves.

Thank you to anyone who is willing to help me out.

Hi @mattia.intignano,

You could try using coordinate systems along the baseline to get the rotation you’re looking for. Below are a couple of nodes you could use get the coordinate system along the baseline and then use that coordinate system to place the cuboid.

Thank you @omar.g for your help. It works by placing the aligned cubes along the baseline. I need to have a grid of them tho, along lines parallel to the baseline. I’ll still work on it. If you have other suggestions they are all welcome! Thank you again.

Hi @mattia.intignano, good to hear the coordinate system is working for the baseline so it seems you’re close. To get the cubes aligned with the rest of the points that are offset from the baseline, you will need to apply the same coordinate system that you have at each station of the baseline to the points that are offset at the same station because the lines are parallel and rotation should be the same.

Below is an example of how one way to apply the coordinate system vectors to the points. The below nodes could potentially be applied to your “Part 2” screenshot above but can’t be sure without seeing the script.

Hope that helps.

Hi
I’m working on a similar project but I want to rotate the object along a profile to make it possible to create a tunnel solid created on several sections.
The issue that occur is that the coordinate system isn’t perpendicular to the curve, the axis is horisontal and vertical.
The problem occurs even if I test on a line with different elevation at start and at end

Hi,
Not sure I’m following the issue you’re describing. The coordinate system should orientate such that the x-axis of the coordinate system is perpendicular to the curve, the y-axis is parallel to the curve, and the z-axis perpendicular to the slope of the curve like shown below.

found out that I have been using the wrong node for circles at coordinate system but at least I learned to get the rotation from vector …you see in my picture that I have been using the Circle.byCenterPointRadiusNormal instead of Circle.byCenterPointRadius and then didn’t add the correct normal so thanks to you @omar.g I learned a new way :slight_smile:

Uploading: image.png…

Great! Awesome to hear you learned something new here on the forums.

Thank you so much @omar.g, your intervention was risolutive.

I’ve found an alternative that exploits the alignment instead of the baseline.
Here the pics of the script and the model. I will also apply your solution tho.


I need to specify, as I found out later, that the tool alignment refers to the C3D alignment, that does not contain elevation. For that, I will then use the baseline extracted from the corridor, and follow omar suggestion.