mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix sheets related tests
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user