I have been doing a lot of offsetting of curves (especially font characters lately) and have noticed that no matter what you do it seems for some cases you simply can’t get the same offset in GH as you do in Rhino.
I am trying both normal offset and offset loose and already offset in both directions (just like clipper does) and then take the offset with the larger area. Yet still Offset can much too easily fail and in cases where there are several possible offsets, it only outputs one of them and not all of them as you would expect.
Here are 2 examples where you can see the results from both offsets in GH as well as the result from Rhino.
Why is it so difficult and is there an offset component that can output not just any/the first possible offset, but all of them (like you can basically do in Rhino)?
gh_offset.gh (17.5 KB)
ps: while Clipper is great and we have used it for other use-cases, it is not an option in this case, as it only works using Polylines, but we have to stick with Nurbs curves here.
offset_python.gh (5.4 KB)
It is kind of frustrating for how long this issue hasn’t been addressed.
Super cool, thank you!
I will intentionally not mark it as “solution”, since McNeel should really just fix that. Alas, it seems like new features are more important than fixing bugs in current ones…
By all means. This is not really a solution in the greater scale of things.
I also noticed there are still cases where there is a difference and where non of the offsets produce the desired result (except clipper, which is not an option). This one seems to be particularly hard:
gh_offset_star.gh (16.9 KB)
Yep… Rhino can’t do it right, ergo the script doesn’t do it right. And yes, clipper does not always suit the task. Funny, 'cos this works in Autocad without an issue.
I have played a bit with what we have, but you need to use Rhino 7. The reason is that there is a “Trim” option in it. This option must be off. It still gives bad result, but at least from thereon is simple to solve. Trouble is that I don’t know Python and I can’t find syntax to add the Trim option myself. I don’t know if this method will work with anything else, since I have not tested it more.
possible solution_R7.gh (9.8 KB)
Awesome. Yeah, we are just making the switch to Rhino 7 in the coming days, so then I’ll check it out! Thanks
This way it will work on Rhino 6. Test it and give me feedback if it indeed does the work for most cases. I really don’t know.
possible solution_R7_V2.gh (17.5 KB)
Maybe there is way simpler way… I am just fooling around with it.
Maybe, if others joind the topic, we can test solutions against failed offsets against same offset but done maybe in Autocad. Then refine a solution and make an user object or something. Or if somebody who can code would make a component? 'Cos this problem comes around all the time on the forum.
Fixed an issue here:
possible solution_R7_V3.gh (17.4 KB)
Agreed. The go-to answer is usually to use Clipper, but since Clipper converts everything to polylines, it’s not a good solution in all cases. We would like to stay in the NURBS world for as long as possible.
I have no damn idea why this works… But it bloody works… Or kind of… After some values it fails, then it works again. I guess something in the way Rhino itself does offsets is screwed up.
Offset_Curve_Working.gh (10.0 KB)