Adding Points along Curve

Hi there.

The list of points all lies on a polycurve.

I chop it by 2.

I want to add 5 more points equally between the two points of the Sublist but the new points must be on the existing poly curve as well.

What should I do here?

Hi @Potato ,

Try something like this:


2023-04-14 Add Intermediate Points on Curve.dyn (38.9 KB)

3 Likes

First off, thank you for replying Daan!

I see your photo actually is the answer already… :joy:


[WIP] Alignment Segment Plane vs Tendon Curve .dyn (118.0 KB)
Tendon Mass Family.rfa (1.8 MB)
Alignment + Tendon.dwg (83.7 KB)

This is what I was trying to do.
I want to add 5 points into the 2 points there.

I didn’t remove the first and last from the list. Because I want all 7 of them in on list.
But the points that I get, aren’t the same as what I visualized

Can you see what I did wrong? I think the problem lies at my Curve.


I’m getting Negatives

I think you are making it too complicated for what it needs to be:

2 Likes

I don’t have the [25,50,75,500]; Segment length

When I extract it from my Polycurve, it comes back as a negative Double.

Its because the list comes back as negative that I cannot proceed to the next step… I think

Try this. Assuming all curves are more than 300mm long it should work.

Interim split.dyn (15.6 KB)

I think this one doesn’t split the curve at my designated point before adding 5 more points.
I think the problem is still my segment length being negative.

Can you check out the files I posted and see if you get the negative values as well?

I believe if you have negative values then your curves are shorter than the start/end offset so there is no curve left to divide. You can see in my example that it successfully split up the main curve, then divided what was left to suit.

When I look at the Background3D Preview, it seems the points are on the curve (as expected)
Still, the numbers comes back as Negative.

Update:
Arh! It seems the script for getting 150mm offset of the points in the second step (Irrelevant to the question posted) caused my points to be out of the curve itself.
That was why the ParameterAtPoint and SegmentLengthAtParameter came back as Null.

I updated the 150mm offset part and it’s working as expected now!
Thanks! @Daan @GavinCrump !!

1 Like