4 curves held within 3 family placements. I am trying to join / create 4 new polycurves with respect to the nearby points per string. I have attempted taking the curves, finding start and end points, then using nearest point then creating 4 new polycurves, but no joy. Any thoughts?
Not entirely sure what your goal is.
Assuming you want to connect all the start (or all the end) points in sequence, you can try this:
- Grab all the start points.
Line.ByBestFitThroughPointsto get a relative measurement context. 3.- ‘Curve.PointAtParameter` to get the parameter of each point on the new line.
List.SortByKeyto get the points ordered by their parameter values.PolyCurve.ByPointsto draw the sequence of curves connecting the ordered points.
If the start points are not consistently on the same end, you can try this:
- Feed the list of curves into a
List.Deconstructnode. Curve.StartPointto get the start point of the rest of the curves.- `Curve.ParameterAtPoint’ to get the parameter of the start points on the first curve.
- Test of the value of the parameter is greater than 0.5.
- If the test was true, reverse the curve, otherwise return the curve as it was.
- `List.Join’ to join the first curve to the reversed or maintained curves.
This topic is about ordering and orienting lines that @jacob.small helped me with recently. The first script re-orders lines and the second script also changes their orientation.
Assuming you want to connect all the start (or all the end) points in sequence, you can try this:
If the start points are not consistently on the same end, you can try this:
I shall take a look at your suggestion shortly. Many thanks.
