mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
typing
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
import bpy
|
||||
import mathutils
|
||||
import numpy as np
|
||||
from functools import reduce
|
||||
import ifcopenshell
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.system
|
||||
|
||||
@@ -76,7 +76,7 @@ def disable_editing_sheets(drawing: tool.Drawing) -> None:
|
||||
drawing.disable_editing_sheets()
|
||||
|
||||
|
||||
def add_sheet(ifc: tool.Ifc, drawing, titleblock: ifcopenshell.entity_instance) -> None:
|
||||
def add_sheet(ifc: tool.Ifc, drawing: tool.Drawing, titleblock: ifcopenshell.entity_instance) -> None:
|
||||
sheet = ifc.run("document.add_information")
|
||||
layout = ifc.run("document.add_reference", information=sheet)
|
||||
titleblock_reference = ifc.run("document.add_reference", information=sheet)
|
||||
@@ -127,7 +127,9 @@ def remove_sheet(ifc: tool.Ifc, drawing: tool.Drawing, sheet: ifcopenshell.entit
|
||||
drawing.import_sheets()
|
||||
|
||||
|
||||
def rename_sheet(ifc: tool.Ifc, drawing, sheet: ifcopenshell.entity_instance, identification: str, name: str) -> None:
|
||||
def rename_sheet(
|
||||
ifc: tool.Ifc, drawing: tool.Drawing, sheet: ifcopenshell.entity_instance, identification: str, name: str
|
||||
) -> None:
|
||||
if ifc.get_schema() == "IFC2X3":
|
||||
attributes = {"DocumentId": identification, "Name": name}
|
||||
else:
|
||||
|
||||
@@ -22,6 +22,7 @@ import numpy as np
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.util.schema
|
||||
import bonsai.core.tool
|
||||
import bonsai.bim.handler
|
||||
import bonsai.tool as tool
|
||||
@@ -60,7 +61,7 @@ class Ifc(bonsai.core.tool.Ifc):
|
||||
return IfcStore.path
|
||||
|
||||
@classmethod
|
||||
def get_schema(cls) -> str:
|
||||
def get_schema(cls) -> ifcopenshell.util.schema.IFC_SCHEMA:
|
||||
if IfcStore.get_file():
|
||||
return IfcStore.get_file().schema
|
||||
|
||||
|
||||
Reference in New Issue
Block a user