Divide rectangle curve with graphmapper

Hi everyone,

My problem look simple but i cant solve it.
I want to divide a rectangle (closed curve) in segments with different length.

See in my file, i make an example with a set of points moved using data from graph mapper.
The length between points are more end more wider.

I want to do the same to divide a rectangle, I’ve set a graphmapper with 10 points but when I connect it to a Divide Length it give me 51 points.

If someone have an idea !

Sorry for my english, thanks !

divide_rec_curve.gh (12.5 KB)

You’re confusing length with parameter and trying to divide the same curve by multiple lengths at the same time. In this case, you’re really more interested (I think) in evaluating the rectangle at points defined by the parameter of the curve t, and since the polyline is linear, there’s no concern about the correspondence of length and parameter. Also, take note of the reparameterization here of the rectangle in Evaluate Curve.

divide_rec_curve2.gh (7.4 KB)

and since the polyline is linear, there’s no concern about the correspondence of length and parameter.

This is incorrect. You should use eval length with normalized length set to true if length is a concern. Reparameterized eval of params will not correspond to length, instead it corresponds to polyline verts. In this case 0,0 .25, 0.5, 0.75, 1 will be the rectangles corners.

divide_rec_curve3.gh (9.4 KB)

Well that certainly addresses an embarrassing gap in my knowledge; I wonder how many others there are?

1 Like

eh well, we all learn something each day right?

Hello,

Thanks to all for your answer, it works well.
Now, I got a new question, is it possible to get Integer numbers from the graph mapper instead of Floating numbers ?
It could useful if you want a precise length between points…Not necessary for the rectangle which normalized but for the set of points…

Again thanks for your time and knowledge !

is it possible to get Integer numbers from the graph mapper instead of Floating numbers ?

Multiply or remap the output values, then use the round component