List and fillet convex curves

Hi

Is there a way to put concave and convex curves into separate lists?

I wish to join the convex curves in the picture and fillet them, and then extend all the curves outwards, like in the second picture.

List Convex Curves.gh (12.7 KB)

All of the ‘Segments’ from Explode are straight ‘Line-like Curves’, there are no “concave and convex curves”.

So apparently you want to measure angles between successive pairs of segments to identify pairs that have angles less than 90 degrees?

1 Like

Hi

Yes, this is probably the right way, since you are right that they are all straight lines after exploded

Tricky to differentiate between concave and convex angles
 :thinking:

You could also extrude the polylines and then fillet the convex edges.

Or create a convex hull, find the corners which are on the convex hull and fillet these


1 Like

So they can be distinguished then my problem is matching them to the lines.
List Convex Curves a.gh (15.4 KB)

1 Like


Convex Curves_2025Apr11c.gh (32.7 KB)

The white group culls ‘t’ values for convex angles that are used to Shatter the original polygons. The purple group counts vertices of the fragments, used by Dispatch to separate fragments that need Fillet (yellow group).

For clarity, they are piped. Hide the Pipe component to see the radiused polylines.

My version.
List Convex Curves b.gh (16.0 KB)

I point out to Joseph that reversing the direction of the curves produces an incorrect result.

I also found this solution using “Fillet at parameter”.
It also solves very complex curves.
But the radius of the fillet is not automatically reduced as with the use of “Fillet” and cannot exceed a critical value.
List Convex Curves c.gh (15.0 KB)

Easily fixed by replacing XY Plane (‘P’ input of Angle) with a Planar component (orange group) and disabling ‘Invert’ on the ‘P’ input of Cull Pattern. This has the side effect of working on planar polygons regardless of their orientation. (gray group rotates them out of XY plane)


Convex Curves_2025Apr12a.gh (35.9 KB)

@leopoldomonzani - I don’t understand your code but it appears to work well when rotated the same way. Except for ArcDim (Arc Dimension), which is not relevant to your results.

P.S. On further study, I understand your code now. Creative


Thank you so much both! only had the opportunity to look at it now, this is perfect! I like the List convex curves b version version a bit better because it is easier to extend the lines. The purpose is to use a CNC drag knife that cannot cut sharp corners.

Thank you

I don’t care which version you like better but List Convex Curves b.gh has no extended lines at all? My version (Convex Curves_2025Apr12a.gh) has a Extend Curve component in the green group, so I don’t see how it can be any easier?



1 Like

I agree.

Oh sorry, I wasn’t comparing your code with Leopolds, I was comparing Leopolds B version with the C version. Yours work perfectly as well!

@leopoldomonzani’s solution is very clever, I admire “outside the box” thinking like that

Hi

Just wondering if there is a way to solve the problems that seems to appear on some shapes using your code. Some of the shapes come out right like on the upper left, but others fillet the wrong curves or the entire shape like the bottom one.

The reason for this is because I am trying to attach edge loops to make it into one continuous closed curve with no hard corners and for shapes it doesn’t work.



Convex Curves Loop.gh (23.3 KB)

Whose code? The GH you posted looks like it starts with some of mine (not sure which version?) with a different set of test curves, to which you have added two chunks of code.

“12 days later” plus modified code and geometry qualifies for the Pottery Barn Rule as far as I’m concerned: “If you break it, you own it”.

If you didn’t understand the code I posted, which you marked as “Solution” at the time, you should have said so.

Ok, this is your code unmodified.

I just added some extra code to show what I was using it for. But the problem lies in the previous code that some shapes, will have some errors, and I am not certain as to why. It worked on the example that I provided, but when I applied it to the shapes I intended to work with later I saw that some shapes were not forming as intended, hence the delay.

Convex Curves Loop 2.gh (25.8 KB)

Check to see if this helps:
Convex Curves Loop.gh (28.3 KB)

'Not saying I got it right. However, if we’re ‘strict’ about what your topic title implies, then @martinsiegrist gave you the answer long ago.

Also, I wouldn’t trust Fillet@parameter component. It’s weird. And, you can only fillet so much depending on the shape of each curve.

2 Likes

Thank you! This seems to work great!
Ok, I will check if the fillet can be replaced with something else

1 Like