Issues With Lofting Curves

Hello,

I have been trying to loft these two curves that I extracted from a ‘brep’. The loft or any attempt to connect these two by a surface fails. I am looking for a seamless loft. As I rebuild the curve I lose the accuracy and the curve deforms.

If it is possible, is there a way to extract the points located at the kinks of these curves?

I have attached the ‘.gh’ file.

Thank you for your time

Loft_Issue.gh (21.6 KB)

Hi.
Have a look at this: Loft_Issue_RE.gh (24.3 KB)

The main idea is to split your curves into segments and re-pair segments and do a proper loft for each pair…
As your curves are actually polylines, degree=1, the “hardest” part is to detect the right corners… see inside.

Hello,

Thank You so much it works. I just have a few follow-up questions in order to better understand the logic that you have used.

I have highlighted the two areas I do not understand too well;

  1. Why have you used a value of ‘-1’ and what are points are you culling with this?
  2. That segment repair bit is something unclear to me.

If you can elaborate a little on those areas of your code, it would be really amazing.

Thank you so much for your help

Why have you used a value of ‘-1’ and what are points are you culling with this?

negative values get you to the end of the list. -1 = the last item in the list.

1 Like

Not “repairing” but “re-pairing” … ugh… sorry for my low quality english.
You have 2 curves, each made of 4 segments.
You need to “pair” 1st segment of 1st curve with 1st segment of 2nd curve … and so on…
But during the shattering the segment order is lost, so with a curve-point (point of mid-curve) distance check, you can pick the nearest curve and “re-pair” the segments… so you can then loft.

1 Like

Ahhh, thank you so much I understand now. :slight_smile: