BIM Controller
convert_exchange_objects(elements)
Convert exchange objects to cadwork elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements |
List[int] |
element IDs |
required |
Returns:
Type | Description |
---|---|
List[int] |
converted elements |
Source code in bim_controller/__init__.py
def convert_exchange_objects(elements: List[int]) -> List[int]:
"""Convert exchange objects to cadwork elements
Args:
elements (List[int]): element IDs
Returns:
List[int]: converted elements
"""
export_bcf(file)
Export bcf file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
str |
Destination path |
required |
Source code in bim_controller/__init__.py
def export_bcf(file: str) -> None:
"""Export bcf file.
Args:
file (str): Destination path
"""
export_ifc(elements, file)
Export an ifc file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements |
List[int] |
element IDs |
required |
file |
str |
Destination path |
required |
Source code in bim_controller/__init__.py
def export_ifc(elements: List[int], file: str) -> None:
"""Export an ifc file.
Args:
elements (List[int]): element IDs
file (str): Destination path
"""
get_all_buildings()
Get all, in 3D, existing buildings
Available for script filled attributes
Returns:
Type | Description |
---|---|
List[str] |
building names |
Source code in bim_controller/__init__.py
def get_all_buildings() -> List[str]:
"""Get all, in 3D, existing buildings
[:information_source: Available for script filled attributes](#){.mark-text}
Returns:
List[str]: building names
"""
get_all_storeys(building_name)
Get all Storeys from a building.
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
building_name |
str |
building name |
required |
Returns:
Type | Description |
---|---|
List[str] |
storey names |
Source code in bim_controller/__init__.py
def get_all_storeys(building_name:str) -> List[str]:
"""Get all Storeys from a building.
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
building_name (str): building name
Returns:
List[str]: storey names
"""
get_building(element)
Get building name
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element |
int |
element ID |
required |
Returns:
Type | Description |
---|---|
str |
building name |
Source code in bim_controller/__init__.py
def get_building(element: int) -> str:
"""Get building name
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
element (int): element ID
Returns:
str: building name
"""
get_ifc2x3_element_type(element)
Get IFC element type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element |
int |
element ID |
required |
Returns:
Type | Description |
---|---|
ifc_2x3_element_type |
ifc type |
Source code in bim_controller/__init__.py
def get_ifc2x3_element_type(element: int) -> ifc_2x3_element_type:
"""Get IFC element type.
Args:
element (int): element ID
Returns:
ifc_2x3_element_type: ifc type
"""
get_ifc2x3_element_type_display_string(ifc_2x3_element_type)
Get ifc tpye display string
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ifc_2x3_element_type |
ifc_2x3_element_type |
cadwork ifc element type |
required |
Returns:
Type | Description |
---|---|
str |
entity name |
Source code in bim_controller/__init__.py
def get_ifc2x3_element_type_display_string(ifc_2x3_element_type: ifc_2x3_element_type) -> str:
"""Get ifc tpye display string
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
ifc_2x3_element_type (ifc_2x3_element_type): cadwork ifc element type
Returns:
str: entity name
"""
get_ifc2x3_element_type_string(ifc_2x3_element_type)
Get ifc tpye as a string
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ifc_2x3_element_type |
ifc_2x3_element_type |
cadwork ifc element type |
required |
Returns:
Type | Description |
---|---|
str |
entity name |
Source code in bim_controller/__init__.py
def get_ifc2x3_element_type_string(ifc_2x3_element_type: ifc_2x3_element_type) -> str:
"""Get ifc tpye as a string
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
ifc_2x3_element_type (ifc_2x3_element_type): cadwork ifc element type
Returns:
str: entity name
"""
get_ifc_guid(element)
Get readable ifc guid. Convert readable guid to IfcGuid, see -> https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/guid.py
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element |
int |
element ID |
required |
Returns:
Type | Description |
---|---|
str |
readable guid |
Source code in bim_controller/__init__.py
def get_ifc_guid(element: int) -> str:
"""Get readable ifc guid. Convert readable guid to IfcGuid, see -> https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/guid.py
Args:
element (int): element ID
Returns:
str: readable guid
"""
get_storey(element)
Get Storey
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element |
int |
element ID |
required |
Returns:
Type | Description |
---|---|
str |
storey name |
Source code in bim_controller/__init__.py
def get_storey(element: int) -> str:
"""Get Storey
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
element (int): element ID
Returns:
str: storey name
"""
get_storey_height(building_name, storey_name)
Get the storey height.
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
building_name |
str |
building name |
required |
storey_name |
str |
storey name |
required |
Returns:
Type | Description |
---|---|
float |
storey elevation height |
Source code in bim_controller/__init__.py
def get_storey_height(building_name:str, storey_name:str) -> float:
"""Get the storey height.
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
building_name (str): building name
storey_name (str): storey name
Returns:
float: storey elevation height
"""
import_bcf(file)
Import bcf file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
str |
path to bcf file |
required |
Source code in bim_controller/__init__.py
def import_bcf(file: str) -> None:
"""Import bcf file.
Args:
file (str): path to bcf file
"""
import_ifc_as_graphical_object(file)
Import ifc as graphical object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
str |
path to ifc file |
required |
Source code in bim_controller/__init__.py
def import_ifc_as_graphical_object(file: str) -> None:
"""Import ifc as graphical object
Args:
file (str): path to ifc file
"""
import_ifc_return_exchange_objects(file_path)
Import ifc as exchange objects
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
str |
file path |
required |
Source code in bim_controller/__init__.py
def import_ifc_return_exchange_objects(file_path:str) -> None:
"""Import ifc as exchange objects
Args:
file_path (str): file path
"""
set_building_and_storey(elements, building, storey)
Set bulding and storey
Available for script filled attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements |
List[int] |
element IDs |
required |
building |
str |
building name |
required |
storey |
str |
storey name |
required |
Source code in bim_controller/__init__.py
def set_building_and_storey(elements: List[int], building: str, storey: str) -> None:
"""Set bulding and storey
[:information_source: Available for script filled attributes](#){.mark-text}
Args:
elements (List[int]): element IDs
building (str): building name
storey (str): storey name
"""
set_ifc2x3_element_type(elements, ifc_2x3_element_type)
Set IFC element type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements |
List[int] |
element IDs |
required |
ifc_2x3_element_type |
ifc_2x3_element_type |
cadwork ifc element type |
required |
Source code in bim_controller/__init__.py
def set_ifc2x3_element_type(elements: List[int], ifc_2x3_element_type: ifc_2x3_element_type) -> None:
"""Set IFC element type.
Args:
elements (List[int]): element IDs
ifc_2x3_element_type (ifc_2x3_element_type): cadwork ifc element type
"""
set_storey_height(building_name, storey_name, height)
Set the storey elevation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
building_name |
str |
building name |
required |
storey_name |
str |
storey name |
required |
height |
float |
storey elevation |
required |
Source code in bim_controller/__init__.py
def set_storey_height(building_name:str, storey_name:str, height:float) -> None:
"""Set the storey elevation.
Args:
building_name (str): building name
storey_name (str): storey name
height (float): storey elevation
"""