mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +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:
|
||||
parser = Lark(grammar_metric)
|
||||
factor = 1
|
||||
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
|
||||
factor = 0.001
|
||||
|
||||
if input_type == 'A':
|
||||
parser = Lark(grammar_metric)
|
||||
@@ -610,8 +612,6 @@ class Snap(bonsai.core.tool.Snap):
|
||||
|
||||
transformer = InputTransform()
|
||||
result = transformer.transform(parse_tree)
|
||||
if bpy.context.scene.unit_settings.length_unit == 'MILLIMETERS':
|
||||
result /= 1000
|
||||
return True, str(result)
|
||||
except:
|
||||
return False, "0"
|
||||
|
||||
Reference in New Issue
Block a user