Beispiel #1
0
def getFillGcode( gcodeText, fillPreferences = None ):
	"Fill the slices of a gcode text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'fill' ):
		return gcodeText
	if fillPreferences == None:
		fillPreferences = FillPreferences()
		preferences.readPreferences( fillPreferences )
	skein = FillSkein()
	skein.parseGcode( fillPreferences, gcodeText )
	return skein.output.getvalue()
Beispiel #2
0
def getFillGcode(gcodeText, fillPreferences=None):
    "Fill the slices of a gcode text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'fill'):
        return gcodeText
    if fillPreferences == None:
        fillPreferences = FillPreferences()
        preferences.readPreferences(fillPreferences)
    skein = FillSkein()
    skein.parseGcode(fillPreferences, gcodeText)
    return skein.output.getvalue()
Beispiel #3
0
def getTowerGcode( gcodeText, towerPreferences = None ):
	"Tower a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'tower' ):
		return gcodeText
	if towerPreferences == None:
		towerPreferences = TowerPreferences()
		preferences.readPreferences( towerPreferences )
	if towerPreferences.maximumTowerHeight.value < 1:
		return gcodeText
	skein = TowerSkein()
	skein.parseGcode( gcodeText, towerPreferences )
	return skein.output.getvalue()
Beispiel #4
0
def getStretchGcode( gcodeText, stretchPreferences = None ):
	"Stretch a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'stretch' ):
		return gcodeText
	if stretchPreferences == None:
		stretchPreferences = StretchPreferences()
		preferences.readPreferences( stretchPreferences )
	if stretchPreferences.stretchOverHalfExtrusionWidth.value <= 0.0:
		return gcodeText
	skein = StretchSkein()
	skein.parseGcode( gcodeText, stretchPreferences )
	return skein.output.getvalue()
Beispiel #5
0
def getCombGcode( gcodeText, combPreferences = None ):
	"Comb a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'comb' ):
		return gcodeText
	if combPreferences == None:
		combPreferences = CombPreferences()
		preferences.readPreferences( combPreferences )
	if not combPreferences.comb.value:
		return gcodeText
	skein = CombSkein()
	skein.parseGcode( gcodeText )
	return skein.output.getvalue()
Beispiel #6
0
def getTowerGcode(gcodeText, towerPreferences=None):
    "Tower a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'tower'):
        return gcodeText
    if towerPreferences == None:
        towerPreferences = TowerPreferences()
        preferences.readPreferences(towerPreferences)
    if towerPreferences.maximumTowerHeight.value < 1:
        return gcodeText
    skein = TowerSkein()
    skein.parseGcode(gcodeText, towerPreferences)
    return skein.output.getvalue()
Beispiel #7
0
def getCombGcode(gcodeText, combPreferences=None):
    "Comb a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'comb'):
        return gcodeText
    if combPreferences == None:
        combPreferences = CombPreferences()
        preferences.readPreferences(combPreferences)
    if not combPreferences.comb.value:
        return gcodeText
    skein = CombSkein()
    skein.parseGcode(gcodeText)
    return skein.output.getvalue()
Beispiel #8
0
def getStretchGcode(gcodeText, stretchPreferences=None):
    "Stretch a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'stretch'):
        return gcodeText
    if stretchPreferences == None:
        stretchPreferences = StretchPreferences()
        preferences.readPreferences(stretchPreferences)
    if stretchPreferences.stretchOverHalfExtrusionWidth.value <= 0.0:
        return gcodeText
    skein = StretchSkein()
    skein.parseGcode(gcodeText, stretchPreferences)
    return skein.output.getvalue()
Beispiel #9
0
def getFilletGcode(gcodeText, filletPreferences=None):
    "Fillet a gcode linear move text."
    if gcodeText == '':
        return ''
    if gcodec.isProcedureDone(gcodeText, 'fillet'):
        return gcodeText
    if filletPreferences == None:
        filletPreferences = FilletPreferences()
        preferences.readPreferences(filletPreferences)
    if filletPreferences.arcPoint.value:
        return getArcPointGcode(filletPreferences, gcodeText)
    elif filletPreferences.arcRadius.value:
        return getArcRadiusGcode(filletPreferences, gcodeText)
    elif filletPreferences.arcSegment.value:
        return getArcSegmentGcode(filletPreferences, gcodeText)
    elif filletPreferences.bevel.value:
        return getBevelGcode(filletPreferences, gcodeText)
    return gcodeText
Beispiel #10
0
def getFilletGcode( gcodeText, filletPreferences = None ):
	"Fillet a gcode linear move text."
	if gcodeText == '':
		return ''
	if gcodec.isProcedureDone( gcodeText, 'fillet' ):
		return gcodeText
	if filletPreferences == None:
		filletPreferences = FilletPreferences()
		preferences.readPreferences( filletPreferences )
	if filletPreferences.arcPoint.value:
		return getArcPointGcode( filletPreferences, gcodeText )
	elif filletPreferences.arcRadius.value:
		return getArcRadiusGcode( filletPreferences, gcodeText )
	elif filletPreferences.arcSegment.value:
		return getArcSegmentGcode( filletPreferences, gcodeText )
	elif filletPreferences.bevel.value:
		return getBevelGcode( filletPreferences, gcodeText )
	return gcodeText
Beispiel #11
0
def getStretchChainGcode( gcodeText, stretchPreferences = None ):
	"Stretch a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
	if not gcodec.isProcedureDone( gcodeText, 'comb' ):
		gcodeText = comb.getCombChainGcode( gcodeText )
	return getStretchGcode( gcodeText, stretchPreferences )
Beispiel #12
0
def getTowerChainGcode(gcodeText, towerPreferences=None):
    "Tower a gcode linear move text.  Chain tower the gcode if it is not already towered."
    if not gcodec.isProcedureDone(gcodeText, 'fill'):
        gcodeText = fill.getFillChainGcode(gcodeText)
    return getTowerGcode(gcodeText, towerPreferences)
Beispiel #13
0
def getCombChainGcode(gcodeText, combPreferences=None):
    "Comb a gcode linear move text.  Chain comb the gcode if it is not already combed."
    if not gcodec.isProcedureDone(gcodeText, 'fill'):
        gcodeText = fill.getFillChainGcode(gcodeText)
    return getCombGcode(gcodeText, combPreferences)
Beispiel #14
0
def getCombChainGcode( gcodeText, combPreferences = None ):
	"Comb a gcode linear move text.  Chain comb the gcode if it is not already combed."
	if not gcodec.isProcedureDone( gcodeText, 'fill' ):
		gcodeText = fill.getFillChainGcode( gcodeText )
	return getCombGcode( gcodeText, combPreferences )
Beispiel #15
0
def getFillChainGcode(gcodeText, fillPreferences=None):
    "Fill the slices of a gcode text.  Chain fill the gcode if it is not already sliced."
    if not gcodec.isProcedureDone(gcodeText, 'slice'):
        gcodeText = slice.getSliceGcode(gcodeText)
    return getFillGcode(gcodeText, fillPreferences)
Beispiel #16
0
def getStretchChainGcode(gcodeText, stretchPreferences=None):
    "Stretch a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
    if not gcodec.isProcedureDone(gcodeText, 'comb'):
        gcodeText = comb.getCombChainGcode(gcodeText)
    return getStretchGcode(gcodeText, stretchPreferences)
Beispiel #17
0
def getTowerChainGcode( gcodeText, towerPreferences = None ):
	"Tower a gcode linear move text.  Chain tower the gcode if it is not already towered."
	if not gcodec.isProcedureDone( gcodeText, 'fill' ):
		gcodeText = fill.getFillChainGcode( gcodeText )
	return getTowerGcode( gcodeText, towerPreferences )
Beispiel #18
0
def getFillChainGcode( gcodeText, fillPreferences = None ):
	"Fill the slices of a gcode text.  Chain fill the gcode if it is not already sliced."
	if not gcodec.isProcedureDone( gcodeText, 'slice' ):
		gcodeText = slice.getSliceGcode( gcodeText )
	return getFillGcode( gcodeText, fillPreferences )
Beispiel #19
0
def getFilletChainGcode(gcodeText, filletPreferences=None):
    "Fillet a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
    if not gcodec.isProcedureDone(gcodeText, 'stretch'):
        gcodeText = stretch.getStretchChainGcode(gcodeText)
    return getFilletGcode(gcodeText, filletPreferences)
Beispiel #20
0
def getFilletChainGcode( gcodeText, filletPreferences = None ):
	"Fillet a gcode linear move text.  Chain stretch the gcode if it is not already stretched."
	if not gcodec.isProcedureDone( gcodeText, 'stretch' ):
		gcodeText = stretch.getStretchChainGcode( gcodeText )
	return getFilletGcode( gcodeText, filletPreferences )