Thingiverse

Eagle PCB - HPGL to Gcode Converter - Powershell by mr2clean
by Thingiverse
Last crawled date: 4 years, 5 months ago
Output Gcode is good to be used with your 3dPrinter, use your 3dprinter as a pen plotter.
Extruder is excluded from gcode.
Generate your HPGL-code from Eagle PCB and convert it to Gcode with this PowerShell script.
[Update] - To disable circle ("AA") translation to gcode set - "-GenerateCircles" to "No"
In Eagle PCB: Open your board layout and choose, File->CAM Processor->Output "HPGL"
Usage:
Load script
Save the script to "C:\temp\Convert-HpglToGcode.ps1"
Open powershell and navigate to "C:\temp" (cd C:\temp)
Paste the following in the powershell window ". .\Convert-HpglToGcode.ps1"
Run the command below
eg. 'Convert-HpglToGcode -Source "C:\Temp\InputFile.hpgl" -Destination "C:\Temp\OutputFile.gcode"'
Minimum req:
Convert-HpglToGcode -Source "C:\Temp\InputFile.hpgl" -Destination "C:\Temp\OutputFile.gcode"
Optional switches:
HPGL units per mm, default is 40.2
-HpglUnitsPerMM "40.2"
Set printer/cnc speed
-Speed "500"
home all axis
-HomeAxis "X Y Z"
Retention / Lift Z between movement
-Retention "1.5"
Generate Circles - HPGL "AA"
-GenerateCircles N/No/HellNo!
Extruder is excluded from gcode.
Generate your HPGL-code from Eagle PCB and convert it to Gcode with this PowerShell script.
[Update] - To disable circle ("AA") translation to gcode set - "-GenerateCircles" to "No"
In Eagle PCB: Open your board layout and choose, File->CAM Processor->Output "HPGL"
Usage:
Load script
Save the script to "C:\temp\Convert-HpglToGcode.ps1"
Open powershell and navigate to "C:\temp" (cd C:\temp)
Paste the following in the powershell window ". .\Convert-HpglToGcode.ps1"
Run the command below
eg. 'Convert-HpglToGcode -Source "C:\Temp\InputFile.hpgl" -Destination "C:\Temp\OutputFile.gcode"'
Minimum req:
Convert-HpglToGcode -Source "C:\Temp\InputFile.hpgl" -Destination "C:\Temp\OutputFile.gcode"
Optional switches:
HPGL units per mm, default is 40.2
-HpglUnitsPerMM "40.2"
Set printer/cnc speed
-Speed "500"
home all axis
-HomeAxis "X Y Z"
Retention / Lift Z between movement
-Retention "1.5"
Generate Circles - HPGL "AA"
-GenerateCircles N/No/HellNo!