Plasma Cutting / Mach3

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
lcorley
Posts: 32
Joined: Tue Feb 16, 2021 5:12 pm

Re: Plasma Cutting / Mach3

Post by lcorley »

Here is my attempt at a postprocessor for the Crossfire plasma table controlled by Mach3.
I started with the mach3_mach4_post.py and modified it in these areas --
  • add torch control for each cut
  • add delay for plasma beam to pierce the stock before beginning cut
  • remove vertical component of move commands (Crossfire is a 2D only machine)
  • remove vertical moves
Comments are welcomed.

regards,
Leon

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24212 (Git)
Attachments
crossfire_post.py
(18.86 KiB) Downloaded 103 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Plasma Cutting / Mach3

Post by freman »

Great, just a couple of quick comments, I'll look in more detail later.

Code: Select all

                if opHorizRapid and opVertRapid:

Two occurrences. Since you've eliminated vertical, does it make any sense to test for opVertRapid ?

Code: Select all

                if hasattr(pathobj.ToolController, 'VertRapid') and pathobj.ToolController.VertRapid > 0:
                    opVertRapid = Units.Quantity(pathobj.ToolController.VertRapid, FreeCAD.Units.Velocity)
                else:
                    FreeCAD.Console.PrintWarning('Tool Controller Vertical Rapid Values are unset'+ '\n')
Likewise, would it matter if it was not set?

Code: Select all

           if adaptiveOp and c.Name in ["G0", "G00"]:
                if opHorizRapid and opVertRapid:
                    if 'Z' not in c.Parameters:
                        outstring.append('F' + format(float(opHorizRapid.getValueAs(UNIT_SPEED_FORMAT)), precision_string))
                    else:
                        outstring.append('F' + format(float(opVertRapid.getValueAs(UNIT_SPEED_FORMAT)), precision_string))

Code: Select all

            if adaptiveOp and c.Name in ["G0", "G00"]:
                if opHorizRapid and opVertRapid:
                    command = 'G1'
                else:
                    outstring.append('(Tool Controller Rapid Values are unset)' + '\n')
Presumably this should never happen, would you want it to produce output? Not looked in detail, sorry if any of that is silly. ;)
Mr.What
Posts: 2
Joined: Mon Jul 11, 2022 2:27 pm

Re: Plasma Cutting / Mach3

Post by Mr.What »

Got your attachment. I'm jumping into FreeCAD just to use it. Still trying to figure out how. Working with a MakerSpace that got an orphaned CrossFire "Legacy". Trying to stay OSS as much as possible.

FreeCAD image and snap have write-only config areas, so I can't add the post-processor. I guess on snap, I can create a copy of the jail, and run from my own area, but haven't figured out how to do that yet. Stock FreeCAD, ubuntu, might be too far behind to import DXF!? (or user error). Build from source has known bugs (at least for Debian/Ubuntu). Broken dependencies on depricated packages.

I'm very intimidated. However, LazyCAM (with mach3) was also intimidating, and may not even work properly. Most CrossFire users seem to have upgraded to newer Fusion360 post or SheetCAM.

Any tips or links to a page that might help me with the steps needed to go from vector image (likely DXF or SVG) to a 2D-plasma "job" which I can post-process to .tap (gcode for mach3)?
lcorley wrote: Fri Feb 26, 2021 5:35 pm Here is my attempt at a postprocessor for the Crossfire plasma table controlled by Mach3.
I started with the mach3_mach4_post.py and modified it in these areas --
  • add torch control for each cut
  • add delay for plasma beam to pierce the stock before beginning cut
  • remove vertical component of move commands (Crossfire is a 2D only machine)
  • remove vertical moves
Comments are welcomed.

regards,
Leon

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24212 (Git)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Plasma Cutting / Mach3

Post by Kunda1 »

Mr.What wrote: Mon Jul 11, 2022 2:43 pm FreeCAD image and snap have write-only config areas, so I can't add the post-processor. I guess on snap, I can create a copy of the jail, and run from my own area, but haven't figured out how to do that yet. Stock FreeCAD, ubuntu, might be too far behind to import DXF!? (or user error). Build from source has known bugs (at least for Debian/Ubuntu). Broken dependencies on depricated packages.
You can open a ticket in the FreeCAD-snap issue queue for orientation on this issue.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
karlnick
Posts: 54
Joined: Sat Jul 25, 2020 9:33 am

Re: Plasma Cutting / Mach3

Post by karlnick »

Mr.What wrote: Mon Jul 11, 2022 2:43 pm ...
FreeCAD image and snap have write-only config areas, so I can't add the post-processor. I guess on snap, I can create a copy of the jail, and run from my own area, but haven't figured out how to do that yet. Stock FreeCAD, ubuntu, might be too far behind to import DXF!? (or user error). Build from source has known bugs (at least for Debian/Ubuntu). Broken dependencies on depricated packages.
...
Had to add post processor to folder FreeCAD/src/Mod/Path/Path/Post/scripts/ and an extra row in FreeCAD/src/Mod/Path/CMakeLists.txt and recompile to get the post processor at on the list. It do work and produce output.

Trying an arc I however got a sticky error message and had to restart Freecad to get it to work again. Have a different Plasma cutter with somewhat different output for example M-code used to turn on/off the torch.
Post Reply