mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 08:56:34 +00:00
SheetBuilder - move references to local scope
Previously it was set as sheet builder attribute, but was never used as such.
This commit is contained in:
@@ -285,9 +285,7 @@ class SheetBuilder:
|
|||||||
title.attrib["width"] = str(self.convert_to_mm(title_root.attrib["width"]))
|
title.attrib["width"] = str(self.convert_to_mm(title_root.attrib["width"]))
|
||||||
title.attrib["height"] = str(self.convert_to_mm(title_root.attrib["height"]))
|
title.attrib["height"] = str(self.convert_to_mm(title_root.attrib["height"]))
|
||||||
|
|
||||||
def build(self, sheet: ifcopenshell.entity_instance) -> dict:
|
def build(self, sheet: ifcopenshell.entity_instance) -> dict[str, str]:
|
||||||
self.references = {"SHEET": None, "RASTER": []}
|
|
||||||
|
|
||||||
layout_path = tool.Drawing.get_document_uri(sheet, "LAYOUT")
|
layout_path = tool.Drawing.get_document_uri(sheet, "LAYOUT")
|
||||||
assert layout_path
|
assert layout_path
|
||||||
self.layout_dir = os.path.dirname(layout_path)
|
self.layout_dir = os.path.dirname(layout_path)
|
||||||
@@ -313,9 +311,7 @@ class SheetBuilder:
|
|||||||
with open(sheet_path, "wb") as output:
|
with open(sheet_path, "wb") as output:
|
||||||
tree.write(output)
|
tree.write(output)
|
||||||
|
|
||||||
self.references["SHEET"] = sheet_path
|
return {"SHEET": sheet_path}
|
||||||
|
|
||||||
return self.references
|
|
||||||
|
|
||||||
def build_titleblock(self, root: ET.Element, sheet: ifcopenshell.entity_instance) -> None:
|
def build_titleblock(self, root: ET.Element, sheet: ifcopenshell.entity_instance) -> None:
|
||||||
titleblock = root.findall(f'{SVG}g[@data-type="titleblock"]')[0]
|
titleblock = root.findall(f'{SVG}g[@data-type="titleblock"]')[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user