mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
Fix bug where adding text no longer works with new scales
This commit is contained in:
@@ -52,7 +52,14 @@ class Annotator:
|
|||||||
# This is a magic number for OpenGost
|
# This is a magic number for OpenGost
|
||||||
font_size = 1.6 / 1000
|
font_size = 1.6 / 1000
|
||||||
font_size *= float(text_obj.data.BIMTextProperties.font_size)
|
font_size *= float(text_obj.data.BIMTextProperties.font_size)
|
||||||
font_size *= float(camera.data.BIMCameraProperties.diagram_scale.split(':')[1])
|
|
||||||
|
if camera.data.BIMCameraProperties.diagram_scale == 'CUSTOM':
|
||||||
|
human_scale, fraction = camera.data.BIMCameraProperties.custom_diagram_scale.split('|')
|
||||||
|
else:
|
||||||
|
human_scale, fraction = camera.data.BIMCameraProperties.diagram_scale.split('|')
|
||||||
|
numerator, denominator = fraction.split('/')
|
||||||
|
font_size /= float(numerator) / float(denominator)
|
||||||
|
|
||||||
text_obj.data.size = font_size
|
text_obj.data.size = font_size
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user