mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 11:23:43 +00:00
Small fix in polytool with angle input when working with millimeters units
This commit is contained in:
@@ -601,6 +601,8 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
else:
|
else:
|
||||||
parser = Lark(grammar_metric)
|
parser = Lark(grammar_metric)
|
||||||
factor = 1
|
factor = 1
|
||||||
|
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
|
||||||
|
factor = 0.001
|
||||||
|
|
||||||
if input_type == 'A':
|
if input_type == 'A':
|
||||||
parser = Lark(grammar_metric)
|
parser = Lark(grammar_metric)
|
||||||
@@ -610,8 +612,6 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
|
|
||||||
transformer = InputTransform()
|
transformer = InputTransform()
|
||||||
result = transformer.transform(parse_tree)
|
result = transformer.transform(parse_tree)
|
||||||
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
|
|
||||||
result /= 1000
|
|
||||||
return True, str(result)
|
return True, str(result)
|
||||||
except:
|
except:
|
||||||
return False, "0"
|
return False, "0"
|
||||||
|
|||||||
Reference in New Issue
Block a user