PathScripts.post.centroid_post Namespace Reference

Functions

def export (objectslist, filename, argstring)
 
def linenumber ()
 
def parse (pathobj)
 
def processArguments (argstring)
 

Variables

int AXIS_PRECISION = 4
 
 cam_file = os.path.basename(FreeCAD.ActiveDocument.FileName)
 
string COMMAND_SPACE = " "
 
string COMMENT = ";"
 
dictionary CORNER_MAX = {"x": 609.6, "y": 152.4, "z": 304.8}
 
dictionary CORNER_MIN = {"x": -609.6, "y": -152.4, "z": 0}
 
int FEED_PRECISION = 1
 
string HEADER
 
int LINENR = 100
 
string MACHINE_NAME = "Centroid"
 
bool MODAL = False
 
bool OUTPUT_COMMENTS = True
 
bool OUTPUT_HEADER = True
 
bool OUTPUT_LINE_NUMBERS = False
 
string POST_OPERATION = """"""
 
string POSTAMBLE
 
string PRE_OPERATION = """"""
 
string PREAMBLE
 
 pythonopen = open
 
string SAFETYBLOCK
 
bool SHOW_EDITOR = True
 
int SPINDLE_DECIMALS = 0
 
string TOOL_CHANGE = """"""
 
string TOOLRETURN
 
string TOOLTIP
 
string TOOLTIP_ARGS
 
string UNIT_FORMAT = "mm"
 
string UNIT_SPEED_FORMAT = "mm/min"
 
string UNITS = "G21"
 
string ZAXISRETURN
 

Function Documentation

◆ export()

def PathScripts.post.centroid_post.export (   objectslist,
  filename,
  argstring 
)

◆ linenumber()

def PathScripts.post.centroid_post.linenumber ( )

◆ parse()

◆ processArguments()

def PathScripts.post.centroid_post.processArguments (   argstring)

Variable Documentation

◆ AXIS_PRECISION

int PathScripts.post.centroid_post.AXIS_PRECISION = 4

◆ cam_file

string PathScripts.post.centroid_post.cam_file = os.path.basename(FreeCAD.ActiveDocument.FileName)

◆ COMMAND_SPACE

string PathScripts.post.centroid_post.COMMAND_SPACE = " "

◆ COMMENT

string PathScripts.post.centroid_post.COMMENT = ";"

◆ CORNER_MAX

dictionary PathScripts.post.centroid_post.CORNER_MAX = {"x": 609.6, "y": 152.4, "z": 304.8}

◆ CORNER_MIN

dictionary PathScripts.post.centroid_post.CORNER_MIN = {"x": -609.6, "y": -152.4, "z": 0}

◆ FEED_PRECISION

int PathScripts.post.centroid_post.FEED_PRECISION = 1

◆ HEADER

string PathScripts.post.centroid_post.HEADER
Initial value:
1= """;Exported by FreeCAD
2;Post Processor: {}
3;CAM file: {}
4;Output Time: {}
5""".format(
6 __name__, cam_file, str(datetime.datetime.now())
7)

◆ LINENR

int PathScripts.post.centroid_post.LINENR = 100

◆ MACHINE_NAME

string PathScripts.post.centroid_post.MACHINE_NAME = "Centroid"

◆ MODAL

bool PathScripts.post.centroid_post.MODAL = False

◆ OUTPUT_COMMENTS

bool PathScripts.post.centroid_post.OUTPUT_COMMENTS = True

◆ OUTPUT_HEADER

bool PathScripts.post.centroid_post.OUTPUT_HEADER = True

◆ OUTPUT_LINE_NUMBERS

bool PathScripts.post.centroid_post.OUTPUT_LINE_NUMBERS = False

◆ POST_OPERATION

string PathScripts.post.centroid_post.POST_OPERATION = """"""

◆ POSTAMBLE

string PathScripts.post.centroid_post.POSTAMBLE
Initial value:
1= """M99
2"""

◆ PRE_OPERATION

string PathScripts.post.centroid_post.PRE_OPERATION = """"""

◆ PREAMBLE

string PathScripts.post.centroid_post.PREAMBLE
Initial value:
1= """G53 G00 G17
2"""

◆ pythonopen

PathScripts.post.centroid_post.pythonopen = open

◆ SAFETYBLOCK

string PathScripts.post.centroid_post.SAFETYBLOCK
Initial value:
1= """G90 G80 G40 G49
2"""

◆ SHOW_EDITOR

bool PathScripts.post.centroid_post.SHOW_EDITOR = True

◆ SPINDLE_DECIMALS

int PathScripts.post.centroid_post.SPINDLE_DECIMALS = 0

◆ TOOL_CHANGE

string PathScripts.post.centroid_post.TOOL_CHANGE = """"""

◆ TOOLRETURN

string PathScripts.post.centroid_post.TOOLRETURN
Initial value:
1= """M5
2M25
3G49 H0
4"""

◆ TOOLTIP

string PathScripts.post.centroid_post.TOOLTIP
Initial value:
1= """
2This is a postprocessor file for the Path workbench. It is used to
3take a pseudo-gcode fragment outputted by a Path object, and output
4real GCode suitable for a centroid 3 axis mill. This postprocessor, once placed
5in the appropriate PathScripts folder, can be used directly from inside
6FreeCAD, via the GUI importer or via python scripts with:
7
8import centroid_post
9centroid_post.export(object,"/path/to/file.ncc","")
10"""

◆ TOOLTIP_ARGS

string PathScripts.post.centroid_post.TOOLTIP_ARGS
Initial value:
1= """
2Arguments for centroid:
3 --header,--no-header ... output headers (--header)
4 --comments,--no-comments ... output comments (--comments)
5 --line-numbers,--no-line-numbers ... prefix with line numbers (--no-lin-numbers)
6 --show-editor, --no-show-editor ... pop up editor before writing output(--show-editor)
7 --feed-precision=1 ... number of digits of precision for feed rate. Default=1
8 --axis-precision=4 ... number of digits of precision for axis moves. Default=4
9 --inches ... Convert output for US imperial mode (G20)
10"""

◆ UNIT_FORMAT

string PathScripts.post.centroid_post.UNIT_FORMAT = "mm"

◆ UNIT_SPEED_FORMAT

string PathScripts.post.centroid_post.UNIT_SPEED_FORMAT = "mm/min"

◆ UNITS

string PathScripts.post.centroid_post.UNITS = "G21"

◆ ZAXISRETURN

string PathScripts.post.centroid_post.ZAXISRETURN
Initial value:
1= """G91 G28 X0 Z0
2G90
3"""