I’m trying to create a script to add surface elevation labels on an aliment’s geometry points. Now I have trouble to get those geometry points coordinates. Which nodes should I use? Any suggestion?
Thanks, but how to get the curve quarter points?
If you have specific requirements for what is considered a “geometry point”, then you’ll probably need to compute the station values that you need and then use the Alignment.PointAtStationOffset
node.
For example, the midpoint would be
AlignmentSubEntity.StartStation + AlignmentSubEntity.Length / 2
Yes, this only works on Civil3d 2025. C3d2024 doesn’t have those nodes.
Anyway, how to repeat the nodes? I need to repeat 4 times to get all the quarter points.
I have the nodes developed as below, but not sure how to make a loop to get all the 4 points.
You could do it with the Sequence
or Range
nodes, but it will be a little more work to get the end station to come out right. As an alternative, there is a super simple way to handle this with one line in a code block. You can just do this:
start..end..#divisions;
That will ensure that the start and end are correct, and then you can divide it up into however many equal intervals that you want. By the way, there’s nothing special about the names start
, end
, and divisions
. You could make them whatever you want, for example a..b..#c;
would do the exact same thing.
You can find more documentation about this in the Dynamo Primer.
Thanks a lot. This seems very efficient. I will give it a try.
Nice! Sure, you can use the Label.SetRotation
node for that. The tricky part will be figuring out what the appropriate rotation angle is for each label. It goes like this:
- Figure out the direction of the alignment at each station
- Calculate the angle between that direction and the X axis
- Add 90 degrees