Today i added code for recognizing closed contours, i used the Qlist library to make array's.
Qlist array's are nice. Maybe i use Hash array's some day. They are allocating memory different and can be faster when
using huge files. The Hash array is not switching allocated memory. The Hash array can have memory all around, so it does not have to change the whole Qlist one memory line down.

Maybe the name Hash is allocated to Bitcoin.
The program now specifies a inside offset, a outside offset and no offset (open contours).
It's working for line function's at the moment. I have to integrate it also for circle and arc's.
My software vision about the program work flow can make a little change coming day's.
I write the textfile output in one sequence at this moment, very fast, but a very hard to do for this program.
I will try to stay at this workflow, but when we use for example auto-nesting we have to change g-code object's up or down in
the g-code list. A tiny example is "keep parts together", rotate them an fit them in a certain area.
The cad drawing :
Red = outside offset
Yellow = inside offset
Grey = no offset
Green = can be marking or what we want to do...
Cyan = slower
The linuxcnc output :
If you look at the g-code output you see double g-code lines, G0 and G1. So far this is no problem.
This can be deleted, but i can use this for inversing the cw to
ccw movement at the object. They will be deleted when the G41.1 and G42.1 are integrated.
The idea is to make for each object, one array.
For a example A little C++ code how to swap an array (Qlist) I have to write this code soon. But i write now how to do it, before
writing actual C++ code...
This is the vision :
Array 1 = Object 1 (gcode object, see picture)
Array 2 = Object 2 (gcode object, can be 1000 lines of code, no problem for the array's)
We can use multiple parameters for each array....
We put value's in the array's...
Array 1 = x_start, y_start, z_start, x_end, y_end, z_end, cw, ccw
To inverse from clockwise (cw) to counterclockwise (ccw). It's a kind of interpolation, a very easy way of this kind...
If we use a swap function from the Qlist C++ library we can swap (change) the
x_start value with the
x_end value,
when this is done for all parameters, we have inverted the cutting path from cw to ccw. The swap function is very fast.
Array 1 = x_start(100), y_start, z_start, x_end(50), y_end, z_end, cw(1), ccw(0)
after swap :
Array 1 = x_start(50), y_start, z_start, x_end(100), y_end, z_end, cw(0), ccw(1)
For tubes, it's handy to have defined inside, outside and no offset's for each tube.
The used cad color lines are perfect to define this.
3d lead in.
Cutting a part of a space craft with a free program :woohoo:
It's the top window of the space craft, a 3d cone shape...
So far so good.