mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Fix #2975. Fix bug where imperial projects still created drawings with metric scales by default.
This commit is contained in:
@@ -189,13 +189,19 @@ def add_drawing(ifc, collector, drawing, target_view=None, location_hint=None):
|
|||||||
ifc.run("group.assign_group", group=group, products=[element])
|
ifc.run("group.assign_group", group=group, products=[element])
|
||||||
collector.assign(camera)
|
collector.assign(camera)
|
||||||
pset = ifc.run("pset.add_pset", product=element, name="EPset_Drawing")
|
pset = ifc.run("pset.add_pset", product=element, name="EPset_Drawing")
|
||||||
|
if drawing.get_unit_system == "METRIC":
|
||||||
|
scale = "1/100"
|
||||||
|
human_scale = "1:100"
|
||||||
|
else:
|
||||||
|
scale = "1/96"
|
||||||
|
human_scale = "1/8\"=1'-0\""
|
||||||
ifc.run(
|
ifc.run(
|
||||||
"pset.edit_pset",
|
"pset.edit_pset",
|
||||||
pset=pset,
|
pset=pset,
|
||||||
properties={
|
properties={
|
||||||
"TargetView": target_view,
|
"TargetView": target_view,
|
||||||
"Scale": "1/100",
|
"Scale": scale,
|
||||||
"HumanScale": "1:100",
|
"HumanScale": human_scale,
|
||||||
"HasUnderlay": False,
|
"HasUnderlay": False,
|
||||||
"HasLinework": True,
|
"HasLinework": True,
|
||||||
"HasAnnotation": True,
|
"HasAnnotation": True,
|
||||||
|
|||||||
Reference in New Issue
Block a user