mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 20:00:02 +00:00
Fixed error in PLAN_LEVEL elevation value in printed svgs #2961
Also added more precision to inPerFoot in helper.format_distance to avoid this a bit annoying precision problem where format function keeps adding 1/256" Without precision - https://i.imgur.com/D9WYjvJ.png With precision - https://i.imgur.com/3XgOFSH.png
This commit is contained in:
@@ -131,7 +131,7 @@ def format_distance(value, isArea=False, hide_units=True):
|
|||||||
unit_length = bpy.context.scene.unit_settings.length_unit
|
unit_length = bpy.context.scene.unit_settings.length_unit
|
||||||
|
|
||||||
toInches = 39.3700787401574887
|
toInches = 39.3700787401574887
|
||||||
inPerFoot = 11.999
|
inPerFoot = 11.9999
|
||||||
|
|
||||||
if isArea:
|
if isArea:
|
||||||
toInches = 1550
|
toInches = 1550
|
||||||
|
|||||||
@@ -794,7 +794,7 @@ class SvgWriter:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
# TODO: allow metric to be configurable
|
# TODO: allow metric to be configurable
|
||||||
rl = ((matrix_world @ points[0].co).xyz + obj.location).z
|
rl = (matrix_world @ points[0].co).z
|
||||||
if bpy.context.scene.unit_settings.system == "IMPERIAL":
|
if bpy.context.scene.unit_settings.system == "IMPERIAL":
|
||||||
rl = helper.format_distance(rl)
|
rl = helper.format_distance(rl)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user