Skip to content

Commit

Permalink
add tool diameter option
Browse files Browse the repository at this point in the history
  • Loading branch information
BvdP committed Feb 18, 2015
1 parent e187c0b commit 1d49d02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions shelves.inx
Expand Up @@ -16,6 +16,7 @@
<_item value="pc">pc</_item>
</param>
<param name="thickness" type="float" min="1.0" max="100.0" _gui-text="Material thickness">1.2</param>
<param name="tool_diameter" type="float" min="0.0" _gui-text="Tool diameter (mind the units!)">0.3</param>
<param name="tolerance" type="float" min="-10000.0" max="10000.0" _gui-text="Tolerance">0.05</param>
<param name="height" type="float" min="0.0" max="10000.0" _gui-text="Height">100</param>
<param name="width" type="float" min="0.0" max="10000.0" _gui-text="Width">100</param>
Expand Down
5 changes: 5 additions & 0 deletions shelves.py
Expand Up @@ -145,6 +145,10 @@ def __init__(self):
type = 'string', dest = 'unit', default = 'cm',
help = 'Unit, should be one of ')

self.OptionParser.add_option('--tool_diameter', action = 'store',
type = 'float', dest = 'tool_diameter', default = '0.3',
help = 'Tool diameter')

self.OptionParser.add_option('--tolerance', action = 'store',
type = 'float', dest = 'tolerance', default = '0.05',
help = '')
Expand Down Expand Up @@ -222,6 +226,7 @@ def effect(self):
groove_depth = self.unittouu(str(self.options.groove_depth) + unit)
tab_size = self.unittouu(str(self.options.tab_size) + unit)
tolerance = self.unittouu(str(self.options.tolerance) + unit)
tool_diameter = self.unittouu(str(self.options.tool_diameter) + unit)

svg = self.document.getroot()
docWidth = self.unittouu(svg.get('width'))
Expand Down

0 comments on commit 1d49d02

Please sign in to comment.