Path: Add Property to Job for geometry tolerance

This commit is contained in:
Ian Rees
2017-04-02 18:52:00 +12:00
parent 78d8272d77
commit c913481ec1
5 changed files with 57 additions and 10 deletions

View File

@@ -24,6 +24,7 @@
import FreeCAD
import FreeCADGui
from FreeCAD import Units
from PySide import QtCore, QtGui
from PathScripts.PathPreferences import PathPreferences
from PathScripts.PathPostProcessor import PostProcessor
@@ -45,7 +46,8 @@ class JobPreferencesPage:
item = self.form.postProcessorList.item(i)
if item.checkState() == QtCore.Qt.CheckState.Unchecked:
blacklist.append(item.text())
PathPreferences.savePostProcessorDefaults(processor, args, blacklist)
geometryTolerance = Units.Quantity(self.form.geometryTolerance.text())
PathPreferences.savePostProcessorDefaults(processor, args, blacklist, geometryTolerance)
path = str(self.form.leOutputFile.text())
policy = str(self.form.cboOutputPolicy.currentText())
@@ -92,6 +94,10 @@ class JobPreferencesPage:
self.verifyAndUpdateDefaultPostProcessorWith(PathPreferences.defaultPostProcessor())
self.form.defaultPostProcessorArgs.setText(PathPreferences.defaultPostProcessorArgs())
geomTol = Units.Quantity(PathPreferences.defaultGeometryTolerance(), Units.Length)
self.form.geometryTolerance.setText(geomTol.UserString)
self.form.leOutputFile.setText(PathPreferences.defaultOutputFile())
self.selectComboEntry(self.form.cboOutputPolicy, PathPreferences.defaultOutputPolicy())