Variable Fillet based on segment length

Hi Guys,
I am working on a small helper script to be able to make road fillet. So I am not drawing them by hand in Rhino.

I think I almost got it.

  1. I cull all segments where original fillet won’t fit
  2. Apply original filet to rest of corners
  3. Extend lines to create a new corner instead of a small segment
  4. Fillet a new corner .

Point 3 is were I have problem. How to make sure I have a correct fillet radius for a new corner? Or maybe contracting an arc?

Thank you

MultiFillet.gh (13.7 KB)

It seems you encountered 2 problems:
1 Fillet has a bug
2 Extend curve actually adds a new segment, so the fillet functions stops at the junction of new segment. You can fix that by using “Simplify Curve” component

Also, see this:
MultiFillet_re.gh (17.1 KB) that keeps correct radius.
MultiFillet_re2.gh (19.0 KB) that (tries to) keeps the shape


@DavidRutten “Fillet” seems to have a bug. Same thing also in current Rhino 7 WIP.
2020-06-02 02_14_19-Window
fillet_bug.gh (5.4 KB)

It seems the gh component function won’t go past mid-point of segments while creating the arcs.

The c# version give result with correct radiuses:

private void RunScript(Curve C, double R, ref object A)
  {
    double t = this.RhinoDocument.ModelAbsoluteTolerance;
    A = Rhino.Geometry.Curve.CreateFilletCornersCurve(C, R, t, t);
  }

I don’t know if this was already noted, searching gave me no specific similar case.

3 Likes

Thank you @maje90 didn’t know fillet had a problem.

Hi @maje90 I was fighting with your and my example for a couple of days. Still can’t get it to work properly :face_with_symbols_over_mouth:

The are a couple of problems:

  1. Sometimes curves are open
  2. Sometimes they have only two sides which are two small and should be culled beforehand

I almost gave up on this :anguished:

MultiFillet_02.gh (18.4 KB)

An idea, instead of constant fillet radius, would be to set the fillet radius as a function of the length of the two side lines. something like this sequence: for each curve, explode, then curve length, then get the smallest length and set radius equal to, say, 1/3 of this length.

Good thought , but I need bigger radius every time there is no space for original and cull small segments.
Like roads

well, if that approach is not working, you may have to think of some different logic. Possibilities include using discontinuities and midpoints as source points, then interpolate curves. Also, after you have produced your curves by whatever means, you can look for curves that are not what you want, and flag them for even manual work in Rhino, for example look for open curves, curves that have less segments than the original veronai cell, and so on.
Another approach is that you have Grasshopper do most of the work for you, then you manually, in rhino, finish your design.
Stick with it though, the ideas do not happen all at once, more like incremental improvements

1 Like

Thank you @markz I think I kind of solved it. Not exactly what I wanted , but good enough at a masterplan scale.
Not perfect, I might come back to this problem…

1 Like