Additional changes to support G73
This commit is contained in:
@@ -275,7 +275,7 @@ void PathSegmentWalker::walk(PathSegmentVisitor &cb, const Base::Vector3d &start
|
||||
// relative mode
|
||||
absolutecenter = false;
|
||||
|
||||
} else if ((name=="G81")||(name=="G82")||(name=="G83")||(name=="G84")||(name=="G85")||(name=="G86")||(name=="G89")){
|
||||
} else if ((name=="G73")||(name=="G81")||(name=="G82")||(name=="G83")||(name=="G84")||(name=="G85")||(name=="G86")||(name=="G89")){
|
||||
// drill,tap,bore
|
||||
double r = 0;
|
||||
if (cmd.has("R"))
|
||||
|
||||
@@ -2,30 +2,31 @@
|
||||
|
||||
This is a documentation of all GCodes used by the FreeCAD Path Workbench
|
||||
|
||||
| Command | Description | Supported parameters |
|
||||
| --- | --- | --- |
|
||||
| G0, G00 | Rapid move | X,Y,Z,A,B,C |
|
||||
| G1, G01 | Normal interpolated move | X,Y,Z,A,B,C |
|
||||
| G2, G02 | Clockwise arc | X,Y,Z,A,B,C,I,J,K |
|
||||
| G3, G03 | Counterclockwise arc | X,Y,Z,A,B,C,I,J,K |
|
||||
| G40 | Turn off tool radius compensation | Radius compensation is done in FreeCAD |
|
||||
| G41 | Tool radius compensation value | Radius compensation is done in FreeCAD |
|
||||
| G42 | Tool radius compensation value | Radius compensation is done in FreeCAD |
|
||||
| G43 | Tool length offset | |
|
||||
| G44 | Tool length offset | |
|
||||
| G53 | Machine coordinate system fixture | ??? |
|
||||
| G54 | Scratchpad coordinate system fixture | ??? |
|
||||
| G55 - G59.9 | Machine specific work offset fixtures relative to homing switches | ??? |
|
||||
| G81 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G82 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G83 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G90 | Absolute coordinates | |
|
||||
| G91 | Relative coordinates | |
|
||||
| G98 | Return to initial Z level in canned cycle | |
|
||||
| G99 | Return to R level in canned cycle | |
|
||||
| M0, M00 | Compulsory stop | |
|
||||
| M1, M01 | Optional stop | |
|
||||
| M3, M03 | Spindle on (clockwise rotation) | S\<rounds per minute\> |
|
||||
| M4, M04 | Spindle on (counterclockwise rotation) | S\<rounds per minute\> |
|
||||
| M6, M06 | Tool change | T\<tool number\> |
|
||||
| (\<String\>) | comment | |
|
||||
| Command | Description | Supported parameters |
|
||||
| --- | --- | --- |
|
||||
| G0, G00 | Rapid move | X,Y,Z,A,B,C |
|
||||
| G1, G01 | Normal interpolated move | X,Y,Z,A,B,C |
|
||||
| G2, G02 | Clockwise arc | X,Y,Z,A,B,C,I,J,K |
|
||||
| G3, G03 | Counterclockwise arc | X,Y,Z,A,B,C,I,J,K |
|
||||
| G40 | Turn off tool radius compensation | Radius compensation is done in FreeCAD |
|
||||
| G41 | Tool radius compensation value | Radius compensation is done in FreeCAD |
|
||||
| G42 | Tool radius compensation value | Radius compensation is done in FreeCAD |
|
||||
| G43 | Tool length offset | |
|
||||
| G44 | Tool length offset | |
|
||||
| G53 | Machine coordinate system fixture | ??? |
|
||||
| G54 | Scratchpad coordinate system fixture | ??? |
|
||||
| G55 - G59.9 | Machine specific work offset fixtures relative to homing switches | ??? |
|
||||
| G73 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G81 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G82 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G83 | Machine specific drill operation | X,Y,Z,R,Q |
|
||||
| G90 | Absolute coordinates | |
|
||||
| G91 | Relative coordinates | |
|
||||
| G98 | Return to initial Z level in canned cycle | |
|
||||
| G99 | Return to R level in canned cycle | |
|
||||
| M0, M00 | Compulsory stop | |
|
||||
| M1, M01 | Optional stop | |
|
||||
| M3, M03 | Spindle on (clockwise rotation) | S\<rounds per minute\> |
|
||||
| M4, M04 | Spindle on (counterclockwise rotation) | S\<rounds per minute\> |
|
||||
| M6, M06 | Tool change | T\<tool number\> |
|
||||
| (\<String\>) | comment | |
|
||||
|
||||
@@ -295,7 +295,7 @@ class PathArray:
|
||||
CmdMoveStraight = ["G1", "G01"]
|
||||
CmdMoveCW = ["G2", "G02"]
|
||||
CmdMoveCCW = ["G3", "G03"]
|
||||
CmdDrill = ["G81", "G82", "G83"]
|
||||
CmdDrill = ["G73", "G81", "G82", "G83"]
|
||||
CmdMoveArc = CmdMoveCW + CmdMoveCCW
|
||||
CmdMove = CmdMoveStraight + CmdMoveArc
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ CmdMoveRapid = ["G0", "G00"]
|
||||
CmdMoveStraight = ["G1", "G01"]
|
||||
CmdMoveCW = ["G2", "G02"]
|
||||
CmdMoveCCW = ["G3", "G03"]
|
||||
CmdMoveDrill = ["G81", "G82", "G83"]
|
||||
CmdMoveDrill = ["G73", "G81", "G82", "G83"]
|
||||
CmdMoveArc = CmdMoveCW + CmdMoveCCW
|
||||
CmdMove = CmdMoveStraight + CmdMoveArc + CmdMoveDrill
|
||||
CmdMoveAll = CmdMove + CmdMoveRapid
|
||||
|
||||
@@ -290,7 +290,7 @@ class PathSimulation:
|
||||
|
||||
if cmd.Name in ["G80"]:
|
||||
self.firstDrill = True
|
||||
if cmd.Name in ["G81", "G82", "G83"]:
|
||||
if cmd.Name in ["G73", "G81", "G82", "G83"]:
|
||||
if self.firstDrill:
|
||||
extendcommand = Path.Command("G0", {"Z": cmd.r})
|
||||
self.curpos = self.RapidMove(extendcommand, self.curpos)
|
||||
@@ -372,7 +372,7 @@ class PathSimulation:
|
||||
) = self.voxSim.GetResultMesh()
|
||||
if cmd.Name in ["G80"]:
|
||||
self.firstDrill = True
|
||||
if cmd.Name in ["G81", "G82", "G83"]:
|
||||
if cmd.Name in ["G73", "G81", "G82", "G83"]:
|
||||
extendcommands = []
|
||||
if self.firstDrill:
|
||||
extendcommands.append(Path.Command("G0", {"Z": cmd.r}))
|
||||
|
||||
Reference in New Issue
Block a user