Cubic bezier to biarc


#1

Hi

I need to do something like this article explains: http://dlacko.org/blog/2016/10/19/approximating-bezier-curves-by-biarcs/ - convert a cubic bezier to biarcs.

I could implement it myself, but it seems like something many people must have done before me. I couldn’t really find anything in the API or in an addon.

So I’ ll just try an ask here, if anything exists to do this, before I might start working on it myself.

Best regards
Carsten


#2

OK, since there were no comments on this, I ended up converting the source code from the original blog post into an addon.

Since I am quite new to both C++ and openframeworks I would appreciate any comments.

Best regards
Carsten


#3

Oh, it currently relies on this fix: https://github.com/openframeworks/openFrameworks/issues/5236


#4

Maybe you can help me. I have implemented the above solution, but it fails when the tangents are vertical (I have not tested with parallel but sloped tangents yet).

I use this idea:


But I just can’t figure out how to handle vertically parallel tangents.

Best regards
Carsten