mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 07:49:59 +00:00
typing
This commit is contained in:
@@ -20,10 +20,11 @@ import ifcopenshell
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.selector
|
||||
from typing import Union
|
||||
from logging import Logger
|
||||
|
||||
|
||||
class Patcher:
|
||||
def __init__(self, src, file, logger, query: str = "IfcWall"):
|
||||
def __init__(self, src: str, file: ifcopenshell.file, logger: Logger, query: str = "IfcWall"):
|
||||
"""Extract certain elements into a new model
|
||||
|
||||
Extract a subset of elements from an existing IFC data set and save it
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
import ifcopenshell
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.element
|
||||
from logging import Logger
|
||||
|
||||
|
||||
class Patcher:
|
||||
def __init__(self, src, file, logger, attribute="Tag"):
|
||||
def __init__(self, src: str, file: ifcopenshell.file, logger: Logger, attribute: str = "Tag"):
|
||||
"""Merge duplicate element types via the Tag or another attribute
|
||||
|
||||
Revit is notorious for creating many duplicate element types. Element
|
||||
@@ -78,7 +79,9 @@ class Patcher:
|
||||
else:
|
||||
keys[getattr(element_type, key)] = element_type
|
||||
|
||||
def assign_type(self, related_object, relating_type):
|
||||
def assign_type(
|
||||
self, related_object: ifcopenshell.entity_instance, relating_type: ifcopenshell.entity_instance
|
||||
) -> None:
|
||||
# This is basically a portion of the type.assign_type API which only
|
||||
# affects the IfcRelDefinesByType relationship. To be conservative, we
|
||||
# don't use the API directly since that would do other things like
|
||||
|
||||
Reference in New Issue
Block a user