flatcam

Open full view…

Laser Focus Tool Shape

erky
Wed, 24 Nov 2021 08:49:59 GMT

Greetings! I am trying to use flatcam to engrave pcbs with a neje laser. It works fine, but I lose accuracy because the shape of the laser focus is rectangular (0.1mm x 0.2mm). I have recently started using flatcam, and I have seen that different shapes of engraving tool can be used (c1, c2, c3, c4, B, V). It does not seem to me that they can be defined rectangular shapes. is it so? (sorry my google translator english)

Marius Stanciu
Wed, 24 Nov 2021 11:10:02 GMT

Hi, It looks like you are using FlatCAM beta. The C1, C2, C3 etc shapes have nothing to do with the beam shape for a laser, they make reference to the type of endmill bit that can be used. A circular endmill means that the diameter is the same regardless of the depth of cut but a V-shape has a different diameter depending of the depth-of-cut. Having a laser with the oval or rectangular shaped beam means that you are out of luck. Try to make the "dot" as little as possible to minimize the issue. Best regards, Marius

erky
Thu, 25 Nov 2021 14:09:13 GMT

Thank you for replying. Many power lasers (10..15W power) actually have a rectangular or square shape of focus. It's not bad luck :-). It might be interesting to equip flatcam with an option that takes this case into account. By solving a small computational geometry problem, one could calculate the distance between the rectangle and the edge of a track or pad, and correct the trajectory. Do you know which flatcam library is doing these calculations? I would like to take a look to see if it is very complicated to define a "distance" function that takes this situation into account. In the photo you can see an example of engraving. Enrico [Incisione](//muut.com/u/flatcam/s2/:flatcam:joSX:incisione.jpg.jpg)

Marius Stanciu
Thu, 25 Nov 2021 18:00:42 GMT

Sorry, perhaps my choice of words was not the best, but what I wanted to convey is that due of how this application is made, it will be very hard to make such a correction. The reason for the above is that each isolation is done by using a buffer() method which is applied over a Shapely geometric element (line, polygon etc). This buffer will create another polygon, bigger than the original, at a distance from the edge (exterior) of the source polygon. This is done at the same distance from the edge of the source geometric element (polygon etc) all over the edge (perimeter). By taking the exterior (edge) of the buffered polygon we get a path at a certain distance (always constant). What you need is a way to create this buffer over the small segments of the perimeter (curves are turned into linear segments, linear interpolation) of the source polygon (for simplicity I'm referring only to a polygon now) at the *minimal distance* between a square (your beam shape) polygon and the polygon to be isolated (buffered). Basically the buffer() method need to be ditched and use a parallel offset line method which I know that the Shapely package has. I'm not saying it is impossible, just that is very hard to do it. The methods that do the isolation can be found in the Isolation Plugin (Tool) file in the appTools (or appPlugins depending on what branch you are working) folder.

Marius Stanciu
Thu, 25 Nov 2021 18:05:02 GMT

BTW, here is the manual with the available methods for geometric processing. https://shapely.readthedocs.io/en/stable/manual.html