This commit is contained in:
Dion Moult
2023-04-17 09:11:33 +10:00
parent d2fbdfeada
commit 507f03640a
4 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ def add_drawing(ifc, collector, drawing, target_view=None, location_hint=None):
ifc.run("group.assign_group", group=group, products=[element])
collector.assign(camera)
pset = ifc.run("pset.add_pset", product=element, name="EPset_Drawing")
if drawing.get_unit_system == "METRIC":
if drawing.get_unit_system() == "METRIC":
scale = "1/100"
human_scale = "1:100"
else:
+1
View File
@@ -278,6 +278,7 @@ class Drawing:
def get_reference_document(cls, reference): pass
def get_reference_location(cls, reference): pass
def get_text_literal(cls, obj): pass
def get_unit_system(cls): pass
def import_assigned_product(cls, obj): pass
def import_drawings(cls): pass
def import_schedules(cls): pass
@@ -353,6 +353,10 @@ class Drawing(blenderbim.core.tool.Drawing):
def get_path_with_ext(cls, path, ext):
return os.path.splitext(path)[0] + f".{ext}"
@classmethod
def get_unit_system(cls):
return bpy.context.scene.unit_settings.system
@classmethod
def get_drawing_collection(cls, drawing):
obj = tool.Ifc.get_object(drawing)
+1
View File
@@ -264,6 +264,7 @@ class TestAddDrawing:
drawing.get_default_drawing_resource_path("Markers").should_be_called().will_return("markers.svg")
drawing.get_default_drawing_resource_path("Symbols").should_be_called().will_return("symbols.svg")
drawing.get_default_drawing_resource_path("Patterns").should_be_called().will_return("patterns.svg")
drawing.get_unit_system().should_be_called().will_return("METRIC")
ifc.run(
"pset.edit_pset",
pset="pset",