I’m working on creating a canopy structure for a project and I’ve run into an issue that has stumped me. I selected a model line in Revit and Offset the line. Then i divided both lines using Curve.PointsAtEqualChordLength and it seems to work for 90% of the curve. As you see in the screenshot, it skips a point and the chord is no longer equal. I’ve looked through the forums to find some solutions but so far no luck. Any ideas would be greatly appreciated!
Here is one possible way to solve…
Check out the Dynamo Dictionary for Curve.PointsAtEqualChordLength. I think it does something you are not expecting.
What it returns is 12 points equally spaced between the start and end of the curve, but not the end points. Meaning that between the 12 points and the end points, there are actually 13 segments.
If you want to divide the circle into 60 equal segments, you should instead use 59 as the division number and then add the start points as @Kulkul has shown.
Or you can use Curve.PointsAtEqualSegmentLength which does what you might be expecting. The number of divisions represent how many segments you want.
Both cases requires what @Kulkul wrote though.
A quick one/liner using point at parameter might work too. I’m on a train so I can’t test myself, but something like this:
EDIT: Never mind. I basically just said what Kenny said. Dynamo is looking at a closed curve, not a continuous circle.
Thanks for the help guys I really appreciate it. I tried inserting a start and end point for the curve but now I think i may need to rework script as it seems to be connecting to one point now. I should have attached a screenshot of the upper part of my script but the Curve.PointsAtEqualChordLength is feeding into geometry translate node that allows me to move the points in a Sine wave along the Z-Axis. I’m wondering if I’m placing the end and startpt node in teh wrong spot? I’ve attached a screen shot.
Actually I think I found a solution, I added a curve endpoint node to the curve and combined it into a new list.
Obviously if anyone here thinks this will lead to trouble later on or has a much more effiecient way of doing this, please let me know. Always looking to learn D
It will not trouble later. Don’t worry you’re safe.
If your end goal is getting missing points and creating line then you’re on right track. Don’t worry
Please mark the post as solved. Cheers!