Automatic minimum radius correction

@gieljan_vantyghem @maxbe95

Sorry for replying this late. I cannot reproduce the issues on closed curves. For the ones I’ve tested the script works. Of course it refuses occasional, if the minimum radius cannot be applied. But then its rather a geometrical issue. Could provide some curves?

EDIT: I see its not working correctly at some points. I’ll have a look and see if I can tweak it

Ok, now it works. The fix was quite easy: (12.8 KB)

1 Like

Very Nice, TomTom! Thanks for sharing.
Now, I have one more problem occurring. Do you have an idea how this could be solved?

Ok the issue here seems to be that it detects two places which are within the replacement area, and so it is unclear how to deal with that, or what to fillet first. Do you see how it detects two points?! In this scenario it would require to incremental execute the whole operation. To solve this it would need a major rework. First anything needs to be scripted in one piece and then it has to detect and fillet locally, after it continues to the next location. Right now it detects all minimal radiis in one step, and then it fillets it in second one.

So its definitly possible to fix that, but its a bit of work.

Another issue could occur, if it is not able to create a proper fillet. A radius could be too big, or the curves never met in a way to properly fit a circular blend.

In general, its really hard to build a bullet proof algorithm in such a short time, that any case will be solved and its likely many more issues will occur.

I’ll see if I can improve that if I (or any other person) finds time doing this.

I think I would use it as follow: Automate as much as possible, and for all open places just do it manually. Is this case happening very often to you?

Hi TomTom, Thanks again your quick response. I’m just curious if the problem can be solved (without increasing the computational cost too much). I understand that many more issues might be present. However, every steps that gets solved is a nice update for your algorithm. In the recent years, I’ve learned to code C# as well. Maybe when I find some time I will have a look. Quick idea: What would happen if you just remove one of the two points when they are closer than the radius of the radius correction? Secondly, I saw that you don’t have an output when the radius is small enough and no correction is being made. Maybe just transfer the original curve to the end as well (so that no matter the variables, there is always a solution. Finally, I think maybe you can add an error warning to the C# component for when the radius of correction becomes too big. (e.g. The correction couldn’t be applied. Radius too large.)
Again, many thanks for sharing this wonderuful piece of code. Your original concept for the correction is great!