> Sometimes it feels for me that everyone is building their own CAM tool. And I wonder if it is not better to concentrate the
> energy and work all together on one CAM tool.
Yes, you're right! I didn't know the linked tool, but I tested every cam available for hobby users that I could find. Lot of them are abandoned or dead and others are left unfinished ...
For me the best are Cambam and Deskproto - the later is beautiful for 3D milling with 4 or 5 axis.
Cambam seems to be abandoned too and Deskproto does not really support technical pieces.
I read a lot about blender cam, but I never was able to get it working. Same is true for FreeCad cam.
So I tried to create an easy to use cam for technical pieces with up to 5 axis. I'm not interested in milling 3d surfaces like the linked sample. My testing data is a simple chuck adapter for a lathe (or 4th axis) that I milled many years ago.
That time I tried to use available cams to create toolpaths, but none of them was able to work it out so I ended up with manual coding.
And that adapter is nothing complicated.
That time I had no plans to write a cam. When linux version of deskproto came out, I spent much time with testing. The bugs of deskproto made me start coding a dxf-viewer. Just to see, whether my ideas are realistic and manageable.
When the dxf-viewer was working, I thought, well, I could try to create a cam.
But then on brainstorming about what features I want to support, I came to the conclusion, that I don't want to bother with DXF.
I never did some 2D drawings in CAD. Always used 3D.
... and as I already used opencascade for the linuxcnc controller app, I just investiged, what is possible with opencascade.
My sampledata is some CAD drawings created with freecad and exported in different formats ...
Actually I like the work and I love challenges that exceed my abilities

May be, I'm able to create something useful ...
>> So I think, calculations should be possible without cutting the edge into dots
> The PointInPolygon needs this dots. It's just a fast preprocess for calculating the exact intersection point.
> When you think my previous post example is usefull, i can expand this example with calculating the exact intersection point.
Thank you very much for your time and your support.
I stil don't understand PIP function, but I finally got into TubeShape.
Sorry, but your code may be sophisticated for some complicated shapes, but for my problems its a very poor implementation.
TubeShape cuts the circle into more than 600 pieces and then it iterates over these pieces.
As written, in my case workpiece may be either round or rectangle. I don't plan to support other shapes.
To find out, whether a point is inside of a circle, you just need to calculate the distance to the center of the circle. That's one call of sqrt() - so I guess, calculation will be much faster than iterating over 600 segments of a circle.
Calculation whether a point is inside a rectangle could be faster than the calculation of point in circle.
So the only missing math is to calculate the cutpoints with my offset contours. But I'm confident, that I find that out too.