flatcam

Open full view…

Postprocessor documentation

zorglups
Mon, 04 Nov 2019 21:53:17 GMT

Hello Marius. Thank you for Flatcam. With it, I created my best ever home made PCB. That was the really first PCB made by my 14 year old boy so thank you for that. The PCB are created in EAGLE and I use Flatcam to generate gcode for a Prusa 3D printer equiped with a sharp steel rod (as shown on Lamja.com). After a few trial, this worked wonderfully. My problem is that the drills are not in the Gerber files and we definitely need "pilot holes" to drive the tiny drill bit (otherwise it "walks" away). I can export them through Excellon file but as far as I could find, only a CNC can be used to drill the holes. The other possibility is to draw an isolation circle (by selecting mill hole) but I want the rod to draw a disk (or several concentric circles). I wrote a small python routine that produce spiral gcodes and taking XY as parameter. I could write a python script that takes the gcode created for the CNC from the Excellon file, detects the gcode pattern used to drill holes and replace that pattern with a spiral gcode. I would rather prefer to participate in FlatCAM. I see 2 ways: - Create a postprocessor for Excellon files. - Enhance the "mill hole function" by giving it a "spiral" or "disk" function. Can you provide me a bit of documentation/explanation of what the different postprocessor parts do ? Can you tell me where the "mill hole" part is on the bitbucket ? What are your thoughts about this ?

Marius Stanciu
Tue, 05 Nov 2019 11:23:53 GMT

Hello zorglups, First, the author of FlatCAM software is the owner of this site, JP Caram. I only took over the development a while back and making what is now FlatCAM beta (originally a fork of FlatCAM). Now it seems that due of differences of 'vision' the next version of FlatCAM may have some things that are in FlatCAM beta, but not all. But I will continue with what is now called FlatCAM beta because I feel that is what FlatCAM should be. As I understand, your problem now is that you are manually drilling the holes and you need pilot drills to compensate the drill bit deflection. Meaning that you need to have a copper 'hole' in the Gerber pads. That is already available in the latest version of FlatCAM although it is not that visible. Actually it's a side effect that I decided to keep exactly for this kind of situations. When using the Film Tool found in the Menu -> Tool -> Film Tool, when generating a Positive Film there is an option to generate Punch Holes. It will generate a SVG file with holes in the pads (the reference being either an Excellon file or the cen ter of the pads) but in the process will generate also a new Gerber file having those holes in the pads center. Which is what you need if I understood correctly. Regarding development, right now I am working to a tool database and a Excellon Calibration Tool. Once I finish those I am going to create a new 'tool' that will allow the user to create an entire postprocessor file from the GUI and saving that file in a location where it can be detected by the App. This will allow custom implementation without having to do Python programming for each. The 'mill__holes_' method is: FlatCAMObj.py -> FlatCAMExcellon class -> generate__milling___drills()_ method Each postprocessor class is made out of a few methods that are listed as abstract methods in the FlatCAMPostProc.py file -> FlatCAMPostProc class. They are: start__code()_ -> will add a series of comments with useful data and also will add the required GCode commands that are setting the GCode reference (incremental or absolute), GCode unite (INCH , METIRC) and so on lift__code()_ -> will raise the tool from a lower depth to a higher one, Z_Move (or Z_Travel, it's the same) where it is safe to travel from one point to another without cutting into material down__code()_-> will lower the tool to the cutting depth toolchange__code()_ -> will create a Gcode sequence for changing tools (either manual or automatic) up__to___zero___code()_ -> will raise the tool from the cutting depth to the Z0. May be called before the lift__code()_ to create a difference between raising while in material and raising tool outside of the material linear__code()_ -> will move the tool with a certain feedrate (speed) while in the material on the XY plane rapid__code()_ -> will move the tool with a certain, higher feedrate (speed) while outside of the material on the XY plane. It is required by some 3D printers that do not understand G0 GCode command (move as fast as you can) so it is a hack to simulate G0 while still using the G1 but with the highest feedrate that the 3D printer can safely use. end__code()_ -> a final sequence of X, Y, Z moves to rest the spindle to a desired position when the job finish feedrate__code()_ -> set the feedrate (speed) for the moves in the XY plane z__feedrate___code()_ -> set the feedrate (speed) for the moves in the Z plane spindle__code()_ -> start the spindle either for CCW move or CW move spindle__stop___code()_ -> stop the spindle dwell_code() -> sets a pause (time) allowing the spindle to reach it's set RPM

zorglups
Thu, 07 Nov 2019 22:52:44 GMT

Thank you so much for replying !!! This is really appreciated. I'll have a closer look and will report here what worked the best for me in the current situation.