diff --git a/src/bonsai/bonsai/bim/module/drawing/sheeter.py b/src/bonsai/bonsai/bim/module/drawing/sheeter.py index 47bf3181d4..f73b71b64f 100644 --- a/src/bonsai/bonsai/bim/module/drawing/sheeter.py +++ b/src/bonsai/bonsai/bim/module/drawing/sheeter.py @@ -66,7 +66,7 @@ class SheetBuilder: view = ET.SubElement(root, "g") view.attrib["data-type"] = "titleblock" titleblock = ET.SubElement(view, "image") - titleblock.attrib["xlink:href"] = os.path.relpath(titleblock_path, sheet_dir) + titleblock.attrib["xlink:href"] = Path(os.path.relpath(titleblock_path, sheet_dir)).as_posix() titleblock.attrib["x"] = "0" titleblock.attrib["y"] = "0" titleblock.attrib["width"] = str(view_width) diff --git a/src/bonsai/test/bim/feature/drawing.feature b/src/bonsai/test/bim/feature/drawing.feature index a5bcf7e75d..ea7126cb54 100644 --- a/src/bonsai/test/bim/feature/drawing.feature +++ b/src/bonsai/test/bim/feature/drawing.feature @@ -247,8 +247,8 @@ Scenario: Add sheet And I look at the "Sheets" panel And I click "IMPORT" When I click "ADD" - Then the file "{ifc_dir}/layouts/A00 - UNTITLED.svg" should contain "titleblocks/A1.svg" - And the file "{ifc_dir}/layouts/A00 - UNTITLED.svg" should not contain "GRID NORTH" + Then the file "{ifc_dir}/layouts/A01 - UNTITLED.svg" should contain "titleblocks/A1.svg" + And the file "{ifc_dir}/layouts/A01 - UNTITLED.svg" should not contain "GRID NORTH" Scenario: Create sheet Given an empty IFC project @@ -258,8 +258,8 @@ Scenario: Create sheet And I click "ADD" And I select the "UNTITLED" item in the "BIM_UL_sheets" list When I click "OUTPUT" - Then the file "{ifc_dir}/sheets/A00 - UNTITLED.svg" should not contain "titleblocks/A1.svg" - And the file "{ifc_dir}/sheets/A00 - UNTITLED.svg" should contain "GRID NORTH" + Then the file "{ifc_dir}/sheets/A01 - UNTITLED.svg" should not contain "titleblocks/A1.svg" + And the file "{ifc_dir}/sheets/A01 - UNTITLED.svg" should contain "GRID NORTH" Scenario: Add drawing to sheet Given an empty IFC project @@ -310,4 +310,4 @@ Scenario: Create sheet - with a drawing added to it And I press "bim.expand_sheet(sheet={sheet})" And I click "IMAGE_PLANE" When I click "OUTPUT" - Then the file "{ifc_dir}/sheets/A00 - UNTITLED.svg" should contain "IfcWall" + Then the file "{ifc_dir}/sheets/A01 - UNTITLED.svg" should contain "IfcWall" diff --git a/src/bonsai/test/tool/test_drawing.py b/src/bonsai/test/tool/test_drawing.py index cc1b73aa0e..f006e5ce2c 100644 --- a/src/bonsai/test/tool/test_drawing.py +++ b/src/bonsai/test/tool/test_drawing.py @@ -724,7 +724,7 @@ class TestDrawingMaintainingSheetPosition(NewFile): props = tool.Drawing.get_document_props() bpy.ops.bim.create_project() ifc = tool.Ifc.get() - sheet_path = Path.cwd() / "layouts" / "A00 - UNTITLED.svg" + sheet_path = Path.cwd() / "layouts" / "A01 - UNTITLED.svg" bpy.ops.mesh.primitive_cube_add(size=10, location=(0, 0, 4)) obj = bpy.data.objects["Cube"]