Dividing Polycurve

Hi Guys,

So I read many similar subjects and tried as many solutions as possible, not sure what’s wrong.
Am simply trying to divide the below shape into equal 1200mm intervals. The curved corners should be the only part that are variable (their start and end point) but clearly there is a problem with the beginning of those curves.
Am new to Dynamo so it might be something simple and am missing it

Don’t understand quite well your problem
but maybe try point.pruneduplicates
to get rid of closed points

Hi @bishoy_erian ,
See if this is of any help.

230421LineDivisionRough.dyn (28.4 KB)
Cheers KS

1 Like

@bishoy_erian is this what you are after? Do note, depending on version, we did upgrade the PolyCurve implementation so please do double check it works for you :slight_smile:

Noting that the Math.Round is needed due to very minor differences. For a building scale they are identical splits :raised_hands:

1 Like

Hi Kai,

Thanks a lot, this is actually very close to what I want. But for some reason when I create the lines in Revit using Detail Curve by Curve node, It creates multiple overlapping lines with each one 1200.752mm shorter than the other, instead of multiple segments each with 1200mm size. Am actually trying to get the curve to be also 1200 straight lines, not arc length of 1200.

Thanks for your script though, it’s really awesome


!

Hi @solamour Thanks for that scrip, am not sure if what I did was right, I ended up changing the number of divisions to reach as close as possible to the size I want…is that what you are suggesting here? Cuz I was actually hoping to get a script that I can input the size and it divides the whole path according to this size
image

@bishoy_erian - the method I showed was slicing your curve by a chosen number of slices, not a desired length :blush: There are nodes that do that though! Or you can use math for it.

I’m on my phone, so only paeudo code right now…

  1. Use a Curve.PointAtParameter node
  2. For the parameter use a Code Block of: 0..1..#amt
    Where 0 is the start of the curve, 1 the end and #amt a number of points.
  3. Use a Curve.Length node and then divide that by your chosen chord length (i.e. 1200) to get a count. Plug this into the amt port generated on your code block
  4. This will give you the correct amount of points to have 1200mm lengths. Cut the original curve with the points as I showed above.
3 Likes

Hi @bishoy_erian think you are more after chord length as Sol say…or


3 Likes