# IfcOpenShell - IFC toolkit and geometry engine # Copyright (C) 2021 Thomas Krijnen # # This file is part of IfcOpenShell. # # IfcOpenShell is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # IfcOpenShell is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . from collections.abc import Sequence from typing import Any, Literal, Union from typing_extensions import Self, Unpack import ifcopenshell.util.schema from ifcopenshell.entity_instance import entity_instance_mixin from ifcopenshell.file import file_mixin # `std::vector` usually translated to `tuple[xxx, ...]`. # `*args` means either multiple overloaded signatures or a default value that couldn't be # represented in Python (e.g. `logger_or_root()`). ATPATH: Any ATSTART: Any ATEND: Any NOTDEFINED: Any MATRIX4: Any POINT3: Any DIRECTION3: Any LINE: Any CIRCLE: Any ELLIPSE: Any BSPLINE_CURVE: Any OFFSET_CURVE: Any PLANE: Any CYLINDER: Any SPHERE: Any TORUS: Any BSPLINE_SURFACE: Any EDGE: Any LOOP: Any FACE: Any SHELL: Any SOLID: Any LOFT: Any EXTRUSION: Any REVOLVE: Any SWEEP_ALONG_CURVE: Any NODE: Any COLLECTION: Any BOOLEAN_RESULT: Any FUNCTION_ITEM: Any FUNCTOR_ITEM: Any PIECEWISE_FUNCTION: Any GRADIENT_FUNCTION: Any CANT_FUNCTION: Any OFFSET_FUNCTION: Any COLOUR: Any STYLE: Any CARTESIAN_DOUBLE: Any CARTESIAN_QUOTIENT: Any FILTERED_CARTESIAN_QUOTIENT: Any EXACT_PREDICATES: Any EXACT_CONSTRUCTIONS: Any CURVES: Any SURFACES_AND_SOLIDS: Any CURVES_SURFACES_AND_SOLIDS: Any TRIANGULATED: Any NATIVE: Any SERIALIZED: Any MAXSTEPSIZE: Any MINSTEPS: Any TRIANGLE_MESH: Any POLYHEDRON_WITHOUT_HOLES: Any POLYHEDRON_WITH_HOLES: Any SHARED_PTR_DISOWN: Any cvar: Any class spf_header: """ IFC Header definition: https://standards.buildingsmart.org/documents/Implementation/ImplementationGuide_IFCHeaderData_Version_1.0.2.pdf """ def __init__(self, file: file | None = None, logger: logger | None = None): ... @property def file_description(self) -> entity_instance: ... @property def file_name(self) -> entity_instance: ... @property def file_schema(self) -> entity_instance: ... class native(representation): def __init__(self, settings, entity, id, shapes): ... def as_compound(self, force_meters=False): ... def begin(self): ... def calculate_projected_surface_area(self, ax, along_x, along_y, along_z): ... def calculate_surface_area(self, arg2): ... def calculate_volume(self, arg2): ... def end(self): ... def item(self, i): ... def item_id(self, i): ... def shapes(self): ... def size(self): ... class native_element(element): def __init__( self, *args: Unpack[tuple[int, int, str, str, str, str, matrix4, native, entity_instance]], ): ... def calculate_projected_surface_area(self, along_x, along_y, along_z): ... @property def geometry(self) -> native: ... @property def surface_area(self): ... @property def volume(self): ... class conversion_result: def ItemId(self): ... def __init__(self, *args): ... def append(self, trsf): ... def apply_transform(self, unit_scale=1.0): ... def hasStyle(self): ... def placement(self): ... def prepend(self, trsf): ... def setStyle(self, newStyle): ... def shape(self) -> conversion_result_shape: ... def style(self): ... def style_ptr(self): ... class conversion_result_shape: def serialize(self, *args: matrix4 | str) -> str | None: ... def triangulate(self, *args): ... def __init__(self, *args, **kwargs): ... def add(self, arg2): ... def area(self): ... def axis(self): ... def backend_id(self) -> str: ... def bounding_box(self, *args): ... def box(self): ... def concat(self, arg2): ... def convex_decomposition(self): ... def convex_tag(self, b): ... def edges(self): ... def facets(self): ... def halfspaces(self): ... def intersect(self, arg2): ... def is_manifold(self): ... def length(self): ... def map(self, *args): ... def moved(self, arg2): ... def num_edges(self): ... def num_faces(self): ... def num_vertices(self): ... def plane_equation(self): ... def position(self): ... def serialize_obj(self): ... def set_box(self, b): ... def solid(self): ... def solid_mt(self): ... def subtract(self, arg2): ... def surface_area_along_direction(self, tol, arg3, along_x, along_y, along_z): ... def surface_genus(self): ... def vertices(self): ... def volume(self): ... def wrap_in_compound(self): ... class DoubleArray3: def __init__(self, *args): ... def back(self): ... def begin(self): ... def empty(self): ... def end(self): ... def fill(self, u): ... def front(self): ... def iterator(self): ... def rbegin(self): ... def rend(self): ... def size(self): ... def swap(self, v): ... class element: def __init__(self, settings, id, parent_id, name, type, guid, context, trsf, product): ... # TODO: Remove from the wrapper? def SetParents(self, newparents): ... # TODO: could it be None? @property def context(self) -> str: """Element's geometry context. E.g 'Body': """ ... @property def guid(self) -> str: """Mirroring IfcRoot.GlobalId.""" ... @property def id(self) -> int: """Element's STEP ID.""" ... # TODO: could it be None? @property def name(self) -> str: """Mirroring IfcRoot.Name.""" ... @property def parent_id(self) -> int: """Parent object STEP id. E.g. IfcBuildingStorey that element's in. """ ... # TODO: Returns SwigPyObject. Should we just remove it from the wrapper? def parents(self): ... @property def product(self) -> entity_instance: ... @property def transformation(self) -> transformation: ... @property def transformation_buffer(self) -> bytes: ... @property def type(self) -> str: """Element's IFC Class. E.g. 'IfcWall'. """ ... @property def unique_id(self) -> str: """Interal unique id for the element. E.g. 'product-186f8dc2-070c-46e1-a65b-a435a043ba3e-body'. """ ... class geometry_serializer: READ_BREP: Any READ_TRIANGULATION: Any def __init__(self, *args, **kwargs): ... def finalize(self): ... def isTesselated(self): ... def is_streaming(self) -> bool: ... def object_id(self, o): ... def read(self, *args): ... def ready(self): ... def setFile(self, file: file) -> None: ... def setUnitNameAndMagnitude(self, name, magnitude): ... def settings(self, *args) -> settings: ... def write(self, *args): ... def writeHeader(self): ... class instance_streamer: def __init__(self, *args): ... def bypass_types(self, type_names): ... def bypassed_instances(self): ... coerce_attribute_count: bool def has_semicolon(self): ... def header(self): ... def inverses(self, *args): ... def push_page(self, page_data): ... def read_instance_py(self, type_as_declaration_instance=False): ... def references(self, *args): ... def schema(self): ... def semicolon_count(self): ... def status(self): ... def yield_header_instances(self, enabled): ... class iterator: def __init__(self, *args): ... initialization_outcome_: Any processed_: Any def bounds_max(self): ... def bounds_min(self): ... def compute_bounds(self, with_geometry): ... def create(self): ... def file(self): ... def filters(self, *args): ... def get(self) -> element: """Get last processed element.""" ... def getLog(self): ... def get_native(self): ... def get_object(self, id): ... def get_task_items(self): ... def get_task_products(self): ... def had_error_processing_elements(self): ... def initialize(self) -> bool: """Return true if the iterator is initialized with any elements, false otherwise.""" ... def next(self) -> Union[entity_instance, None]: """Process next shape representation. :return: Processed ``entity_instance`` or ``None`` if nothing is left to process. """ ... def process_concurrently(self): ... def process_finished_rep(self, rep, kernel=None): ... def progress(self) -> int: """Return current progress (0-100). Updated after processing each representation. """ ... def unit_magnitude(self): ... def unit_name(self): ... class OpaqueCoordinate_3: def __init__(self, *args): ... def get(self, i): ... def get_double(self, i): ... def set(self, i, n): ... def size(self): ... def to_double(self): ... class OpaqueCoordinate_4: def __init__(self, *args): ... def get(self, i): ... def get_double(self, i): ... def set(self, i, n): ... def size(self): ... def to_double(self): ... class opaque_number: def abs(self): ... def add(self, other): ... def divide(self, other): ... def empty(self): ... def equals(self, other): ... def less_than(self, other): ... def multiply(self, other): ... def negated(self): ... def same_type(self, *args): ... def subtract(self, other): ... def to_double(self): ... def to_string(self): ... class representation: def __init__(self, settings, entity, id): ... def entity(self): ... @property def id(self) -> str: """ Example: `2432-openings-2468`, where - 2432 - mapped representation id - 2468 - IfcRelVoidsElement """ def settings(self) -> settings: ... class RocksDBPrefixIterator: def __init__(self, storage, prefix): ... def key(self): ... def next(self): ... def valid(self): ... def value(self): ... class RocksDbSerializer: def __init__(self, *args): ... def finalize(self) -> None: ... def is_streaming(self) -> bool: ... def ready(self) -> bool: ... def setFile(self, arg2) -> None: ... def writeHeader(self) -> None: ... class serialization(representation): def __init__(self, native_geometry: native): ... @property def brep_data(self): ... @property def surface_style_ids(self): ... @property def surface_styles(self): ... class serialized_element(element): def __init__(self, *args: Unpack[tuple[native_element]]): ... @property def geometry(self) -> serialization: ... class settings: CURVES: Literal[0] SURFACES_AND_SOLIDS: Literal[1] CURVES_SURFACES_AND_SOLIDS: Literal[2] TRIANGULATED: Literal[0] NATIVE: Literal[1] SERIALIZED: Literal[2] MAXSTEPSIZE: Literal[0] MINSTEPS: Literal[1] TRIANGLE_MESH: Literal[0] POLYHEDRON_WITHOUT_HOLES: Literal[1] POLYHEDRON_WITH_HOLES: Literal[2] def get_(self, name): ... def get_type(self, name): ... def set_(self, *args): ... def setting_names(self): ... class SwigPyIterator: def __init__(self, *args, **kwargs): ... def advance(self, n): ... def copy(self): ... def decr(self, n=1): ... def distance(self, x): ... def equal(self, x): ... def incr(self, n=1): ... def next(self): ... def previous(self): ... def value(self): ... class transformation: def __init__(self, settings, matrix): ... def data(self): ... @property def matrix(self): ... class triangulation(representation): def __init__(self, *args): ... def addEdge(self, item_id, style, i0, i1): ... def addFace(self, *args): ... def addNormal(self, X, Y, Z): ... def addVertex(self, item_index, material_index, X, Y, Z): ... @staticmethod def box_project_uvs(vertices, normals): ... @property def colors_buffer(self): ... @property def edges(self) -> tuple[int, ...]: ... @property def edges_buffer(self) -> bytes: ... @property def edges_item_ids(self) -> tuple[int, ...]: ... @property def edges_item_ids_buffer(self) -> bytes: ... @staticmethod def empty(settings): ... @property def faces(self) -> tuple[int, ...]: ... @property def faces_buffer(self) -> bytes: ... @property def faces_tri(self) -> tuple[int, ...]: ... @property def item_ids(self) -> tuple[int, ...]: ... @property def item_ids_buffer(self) -> bytes: ... @property def material_ids(self) -> tuple[int, ...]: ... @property def material_ids_buffer(self) -> bytes: ... @property def materials(self) -> tuple[style, ...]: ... @property def normals(self): ... @property def normals_buffer(self) -> bytes: ... @property def polyhedral_faces_with_holes(self): ... @property def polyhedral_faces_without_holes(self): ... def registerEdge(self, item_id, i0, i1): ... def registerEdgeCount(self, n1, n2, edgecount): ... def resetWelds(self): ... @property def uvs(self): ... def uvs_ref(self): ... @property def verts(self) -> tuple[float, ...]: ... @property def verts_buffer(self) -> bytes: ... class triangulation_element(element): def __init__(self, *args): ... @property def geometry(self) -> triangulation: ... class write_only_geometry_serializer(geometry_serializer): def __init__(self, *args, **kwargs): ... def read(self, *args): ... class _SwigNonDynamicMeta(type): ... class aggregation_type(parameter_type): def __init__(self, type_of_aggregation, bound1, bound2, type_of_element): ... array_type: Any bag_type: Any list_type: Any set_type: Any def as_aggregation_type(self) -> aggregation_type: ... def bound1(self): ... def bound2(self): ... def type_of_aggregation(self): ... def type_of_aggregation_string(self): ... def type_of_element(self) -> parameter_type: ... class arrange_polygon_settings: debug_output: bool line_cleaning_algo: int outer_perimiter_algo: int perform_cleanup: bool polygon_offset_distance: float subdivision_factor: float topology_reconstruction_algo: int class attribute: def __init__(self, name, type_of_attribute, optional): ... def name(self) -> str: ... def optional(self) -> bool: ... def type_of_attribute(self) -> parameter_type: ... class boolean_result: INTERSECTION: Any SUBTRACTION: Any UNION: Any operation: Any def calc_hash(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... @staticmethod def operation_str(op): ... class bspline_curve(curve): control_points: Any degree: Any knots: Any multiplicities: Any weights: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... class bspline_surface(surface): control_points: Any degree: Any knots: Any multiplicities: Any weights: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... class buffer: def __init__(self, *args): ... def filename(self): ... def get_value(self): ... def is_ready(self): ... class cant_function(function_item): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def end(self): ... def get_cant(self): ... def get_gradient(self): ... def kind(self): ... def start(self): ... class circle(curve): radius: Any def calc_hash(self): ... def clone_(self): ... @staticmethod def from_3_points(p1, p2, p3): ... def kind(self): ... @property def matrix(self): ... class clash: a: Any b: Any clash_type: Any distance: Any p1: Any p2: Any class clashes: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class collection: def calc_hash(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class colour(item): def __init__(self, *args): ... def r(self) -> float: ... def g(self) -> float: ... def b(self) -> float: ... def calc_hash(self) -> int: ... def clone_(self) -> Self: ... @property def components(self) -> tuple[float, float, float]: """RGB tuple.""" ... def kind(self) -> int: ... class context: def __init__(self, *args): ... def add(self, segments): ... def build(self): ... def get_face_pairs(self): ... def merge(self, edge_indices): ... def num_edges(self): ... def num_faces(self): ... def write(self, arg2): ... class curve(geom_item): def __init__(self, *args, **kwargs): ... def print_impl(self, o, classname, indent=0): ... class cylinder(surface): radius: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class declaration: def __init__(self, name, index_in_schema): ... def _is(self, *args: Union[str, declaration]) -> bool: ... def as_entity(self) -> Union[entity, None]: ... def as_enumeration_type(self) -> Union[enumeration_type, None]: ... def as_select_type(self) -> Union[select_type, None]: ... def as_type_declaration(self) -> Union[type_declaration, None]: ... def index_in_schema(self) -> int: ... def name(self) -> str: ... def name_uc(self) -> str: """Get name in upper case.""" ... def schema(self) -> schema_definition: ... def type(self): ... class direction3: def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... @property def components(self): ... def kind(self): ... class edge(trimmed_curve): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def kind(self): ... class ellipse(curve): radius: Any radius2: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class entity(declaration): def __init__(self, name, is_abstract, index_in_schema, supertype): ... def all_attributes(self) -> tuple[attribute, ...]: """Get a tuple of attributes, including those inherited from supertypes.""" ... def attributes(self) -> tuple[attribute, ...]: """Get a tuple of direct attributes.""" ... def all_inverse_attributes(self) -> tuple[inverse_attribute, ...]: """Get a tuple of inverse attributes, including those inherited from supertypes.""" ... def inverse_attributes(self) -> tuple[inverse_attribute, ...]: """Get a tuple of direct inverse attributes.""" ... def argument_types(self) -> tuple[str, ...]: """Get a tuple of types for each attribute in ``all_attributes()``.""" ... def as_entity(self) -> entity: ... def attribute_by_index(self, index: int) -> attribute: ... def attribute_count(self) -> int: ... def attribute_index(self, *args: Union[str, attribute]) -> int: """ :param args: A single attribute name / attribute. """ ... def derived(self) -> tuple[bool, ...]: """Return a tuple of booleans indicating whether each direct attribute is derived.""" ... def inverse_attributes(self) -> tuple[inverse_attribute, ...]: ... def is_abstract(self) -> bool: ... def set_attributes(self, attributes, derived): ... def set_inverse_attributes(self, inverse_attributes): ... def set_subtypes(self, subtypes): ... def subtypes(self) -> tuple[entity, ...]: ... def supertype(self) -> Union[entity, None]: ... class entity_instance(entity_instance_mixin): def __init__(self, *args): ... @property def declaration(self) -> declaration: ... @property def file(self) -> ifcopenshell.file: ... def file_pointer(self) -> int: ... def get_argument(self, *args: int | str) -> Any: ... def get_argument_index(self, a: str) -> int: ... def attribute_name(self, i: int) -> str: ... def attribute_type(self, *args: int | str) -> Literal[ "NULL", "DERIVED", "INT", "BOOL", "LOGICAL", "DOUBLE", "STRING", "BINARY", "ENUMERATION", "ENTITY INSTANCE", "EMPTY AGGREGATE", "AGGREGATE OF INT", "AGGREGATE OF DOUBLE", "AGGREGATE OF STRING", "AGGREGATE OF BINARY", "AGGREGATE OF ENTITY INSTANCE", "AGGREGATE OF EMPTY AGGREGATE", "AGGREGATE OF AGGREGATE OF INT", "AGGREGATE OF AGGREGATE OF DOUBLE", "AGGREGATE OF AGGREGATE OF ENTITY INSTANCE", "UNKNOWN", ]: ... def get_attribute_category(self, name: str) -> Literal[0, 1, 2]: """Get attribute category id. Available categories: - `0` - invalid attribute - `1` - forward attribute - `2` - inverse attributes """ ... def get_attribute_names(self) -> tuple[str, ...]: ... def get_attribute_value(self, attribute_index: int) -> Any: ... def _get_inverse(self, *args: entity_instance | str) -> tuple[entity_instance, ...]: ... def get_inverse_attribute_names(self) -> tuple[str, ...]: ... def id(self) -> int: ... def identity(self) -> int: """Entity instance identity, unique across all opened IFC files during current session.""" ... def is_a(self, *args): ... def set_attribute_value(self, *args): ... def set_attribute_value_py(self, i: int, value: Any) -> None: ... def to_string(self, *args) -> str | None: ... def unset_attribute_value(self, attribute_index: int) -> None: ... class enumeration_type(declaration): def __init__(self, name, index_in_schema, enumeration_items): ... def argument_types(self) -> tuple[str, ...]: ... def as_enumeration_type(self) -> enumeration_type: ... def enumeration_items(self) -> tuple[str, ...]: ... def lookup_enum_offset(self, value_name: str) -> int: """Get index of the string in enum.""" ... def lookup_enum_value(self, i: int) -> str: """Get a string for the index in enum.""" ... class extrusion(sweep): def __init__(self, m, basis, dir, d): ... depth: Any direction: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class face: basis: Any def calc_hash(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... def print_impl(self, o, indent): ... class file(file_mixin): def file_pointer(self) -> int: ... def fresh_id(self) -> int: ... def __init__( self, schema: ifcopenshell.util.schema.IFC_SCHEMA | None = None, schema_identifier: str | None = None, schema_version: tuple[int, int, int, int] | None = None, ): ... @staticmethod def create_uninitialized(logger: logger | None = None) -> file: """Construct a file with no schema/data yet, to be populated by a later call to ``initialize()``. When file is uninitialized, the only two available methods during this state are ``bypass_type()`` and ``initialize()``. """ ... def bypass_type(self, type_name: str) -> None: """Skip loading instances of ``type_name``.""" ... # NOTE: inaccurate `*args` - not all args are `str`. def initialize(self, *args: str) -> bool: """Parse a file on a ``create_uninitialized()`` instance. :param args: ``args[0]`` is a string path to the IFC file. :return: Whether the file was read and parsed successfully. On failure, check ``good()`` for the specific reason. """ ... def _add(self, entity: entity_instance, id: int = -1) -> entity_instance: ... def add_type_ref(self, new_entity): ... def batch(self) -> None: """Enable batch mode. Batch mode: 1. Calling ``remove(entity)`` does not immediately remove the entity; it marks it for deletion instead. 2. When you call ``unbatch()``, all marked entities are deleted in a single operation. Difference from usual removal: - In normal mode, removing an entity immediately traverses and removes all inverse references to it. - In batch mode, inverse references are not updated per entity. Instead, the entire inverse reference map is scanned during ``unbatch()`` to remove references to all deleted entities. Batch deletion may be slower than immediate deletion, depending on the size of the inverse reference map. """ ... def unbatch(self) -> None: """Exit batch mode.""" ... def by_guid(self, global_id: str) -> entity_instance: ... def by_id(self, instance_id: int) -> entity_instance: ... def _by_type(self, *args: declaration | str) -> tuple[entity_instance, ...]: ... def _by_type_excl_subtypes(self, *args: declaration | str) -> tuple[entity_instance, ...]: ... def create(self, *args) -> entity_instance: ... @staticmethod def create_timestamp() -> str: ... def entity_names(self) -> tuple[int, ...]: """Get a tuple of step ids present in the file.""" ... @staticmethod def from_string(s: str) -> file: ... def get_inverses_by_declaration( self, instance_id: int, declaration: declaration, attribute_index: int ) -> tuple[entity_instance, ...]: """Get instance inverses of the particular type defined by ``declaration``. :param declaration: Type of inverses to find. Supertypes are also supported - e.g. 'IfcRoot' will also include all 'IfcRelationship' inverses. :param attribute_index: Find references only from the provided attribute index. Could be set to ``-1`` to consider all attributes. """ ... def get_max_id(self) -> int: ... def get_inverse_indices_by_id(self, instance_id: int) -> tuple[int, ...]: ... def _get_inverse(self, e: entity_instance) -> tuple[entity_instance, ...]: ... def _get_inverse_indices(self, *args: Union[entity_instance, int]) -> tuple[int, ...]: """Get the attribute indices for each inverse from `get_inverse`, that reference the provided entity.. :param args: entity or it's id. Maximum 1 entity at the time. """ ... def get_total_inverses(self, *args: entity_instance | int) -> int: ... def good(self) -> file_open_status: ... @property def header(self) -> spf_header: ... def ifcroot_type(self) -> entity: ... def key_value_store_iter(self, prefix): ... def key_value_store_query(self, key): ... def recalculate_id_counter(self): ... def _remove(self, entity: entity_instance) -> None: ... def remove_type_ref(self, new_entity): ... def reset_identity_cache(self): ... @property def schema_identifier(self) -> str: ... def storage_mode(self): ... def to_string(self): ... @staticmethod def _traverse(instance: entity_instance, max_level: int = -1) -> tuple[entity_instance, ...]: ... @staticmethod def _traverse_breadth_first(instance: entity_instance, max_level: int = -1) -> tuple[entity_instance, ...]: ... def types(self) -> tuple[str, ...]: """Return a tuple of classes present in the file. E.g. `("IfcWallType", "IfcWall", "IfcArbitraryClosedProfileDef", ...)`. """ ... def _write(self, fn: str) -> None: ... class file_open_status: SUCCESS: int READ_ERROR: int NO_HEADER: int UNSUPPORTED_SCHEMA: int INVALID_SYNTAX: int UNKNOWN: int """Only set on a file created via ``create_uninitialized()`` that hasn't had ``initialize()`` called yet.""" def __init__(self, *args): ... def value(self) -> int: ... class fn_evaluator: def __init__(self, *args, **kwargs): ... settings_: Any def clone(self): ... def end(self): ... def evaluate(self, u): ... def length(self): ... def start(self): ... class function_item(implicit_item): def __init__(self, *args, **kwargs): ... def calc_hash(self): ... def end(self): ... def kind(self): ... def length(self): ... def start(self): ... class function_item_evaluator: def __init__(self, *args): ... def evaluate(self, *args): ... def evaluation_points(self, *args): ... class functor_item(function_item): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def end(self): ... def kind(self): ... def start(self): ... class geom_item(item): def __init__(self, *args, **kwargs): ... matrix: Any surface_style: Any class geometry_conversion_result: def __init__(self, *args: Self): ... index: Any item: Any products: Any products_2: Any representation: Any def is_parallel(self) -> bool: ... class gradient_function(function_item): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def end(self): ... def get_horizontal(self): ... def get_vertical(self): ... def kind(self): ... def start(self): ... class equal_functor: ... class hash_functor: ... class implicit_item(geom_item): def __init__(self, *args, **kwargs): ... class inverse_attribute: def __init__(self, name, type_of_aggregation, bound1, bound2, entity_reference, attribute_reference): ... bag_type: Any set_type: Any unspecified_type: Any def attribute_reference(self): ... def bound1(self): ... def bound2(self): ... def entity_reference(self): ... def name(self): ... def type_of_aggregation(self): ... def type_of_aggregation_string(self): ... class item: def __init__(self, *args, **kwargs): ... instance: Any orientation: Any def calc_hash(self): ... # TODO: hide from the wrapper? def clone_(self) -> Self: ... def hash(self): ... def identity(self): ... def reverse(self): ... # TODO: hide from the wrapper? def kind(self): """Internal enum item index.""" class less_functor: ... class line(curve): def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class line_segment: def __init__(self, *args): ... def back(self): ... def begin(self): ... def empty(self): ... def end(self): ... def fill(self, u): ... def front(self): ... def iterator(self): ... def rbegin(self): ... def rend(self): ... def size(self): ... def swap(self, v): ... class log_message: code: Any instance: Any message: Any product: Any severity: Any timestamp: Any def __init__(self, *args): ... @property def severity_string(self): ... def to_dict(self): ... def to_tuple(self): ... class logger: FMT_PLAIN: Literal[0] FMT_JSON: Literal[1] FMT_INMEMORY: Literal[2] LOG_PERF: Literal[0] LOG_DEBUG: Literal[1] LOG_NOTICE: Literal[2] LOG_WARNING: Literal[3] LOG_ERROR: Literal[4] @staticmethod def root() -> logger: ... def append(self, other): ... def count(self, code): ... def clear(self): ... def error(self, *args): ... def get_log(self): ... def max_severity(self): ... def message(self, *args): ... def notice(self, *args): ... def output_format(self, *args): ... def print_performance_stats(self): ... def print_performance_stats_on_element(self, *args): ... def progress_bar(self, progress): ... def set_output(self, *args): ... def set_product(self, *args): ... def status(self, message, new_line=True): ... def verbosity(self, *args): ... def warning(self, *args): ... def log_messages(self) -> tuple[log_message, ...]: ... class loft: axis: Any def calc_hash(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... def print_impl(self, o, indent): ... class loop: closed: Any external: Any fi: Any tags: Any def calc_hash(self): ... def calculate_linear_edge_curves(self): ... def centroid(self): ... @property def children(self): ... def clone_(self): ... def is_polyhedron(self): ... def kind(self): ... def remove_linear_edge_curves(self): ... class matrix4(item): IDENTITY: Any AFFINE_WO_SCALE: Any AFFINE_W_UNIFORM_SCALE: Any AFFINE_W_NONUNIFORM_SCALE: Any OTHER: Any def __init__(self, *args): ... tag: Any def calc_hash(self): ... def clone_(self): ... @property def components(self): ... def is_identity(self): ... def kind(self): ... def translation_part(self): ... def post_multiply_scale(self, s): ... def pre_multiply_scale(self, s): ... class named_type(parameter_type): def __init__(self, declared_type): ... def _is(self, *args): ... def as_named_type(self) -> named_type: ... def declared_type(self) -> declaration: ... class node(item): def calc_hash(self): ... def clone_(self): ... def kind(self): ... class offset_curve(curve): basis: Any offset: Any reference: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... class offset_function(function_item): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def end(self): ... def get_basis(self): ... def get_offset(self): ... def kind(self): ... def start(self): ... class parameter_type: def _is(self, *args: Union[str, declaration]) -> bool: """ :param args: IFC class name or declaration to check. Argument accepts only 1 value. """ ... def as_aggregation_type(self) -> Union[aggregation_type, None]: ... def as_named_type(self) -> Union[named_type, None]: ... def as_simple_type(self) -> Union[simple_type, None]: ... class piecewise_function(function_item): def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... def end(self): ... def is_empty(self): ... def kind(self): ... def length(self): ... def span_count(self): ... def span_fn(self, i): ... def spans(self): ... def start(self): ... class plane(surface): def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class point3: def __init__(self, *args): ... def calc_hash(self): ... def clone_(self): ... @property def components(self): ... def kind(self): ... class polygon_2: boundary: Any inner_boundaries: Any point_inside: Any class ray_intersection_result: distance: Any dot_product: Any instance: Any normal: Any position: Any ray_distance: Any style_index: Any class ray_intersection_results: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class revolve(sweep): def __init__(self, m, basis, pnt, dir, a): ... angle: Any axis_origin: Any direction: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class schema_definition: def __init__(self, name: str, declarations: Sequence[declaration]): ... def declaration_by_name(self, *args: str) -> declaration: """ :return: ``declaration`` but upcasted to the most advanced available type (e.g. ``entity``, ``type_declaration``, etc). """ ... def declarations(self) -> tuple[declaration, ...]: """ :return: returned declarations are also upcasted, see ``declaration_by_name``. """ ... def entities(self) -> tuple[entity, ...]: ... def enumeration_types(self) -> tuple[enumeration_type, ...]: ... def select_types(self) -> tuple[select_type, ...]: ... def type_declarations(self) -> tuple[type_declaration, ...]: ... def name(self) -> str: ... class select_type(declaration): def __init__(self, name, index_in_schema, select_list): ... def as_select_type(self) -> select_type: ... def select_list(self) -> tuple[declaration, ...]: ... class shell: closed: Any def calc_hash(self): ... def centroid(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... def print_impl(self, o, indent): ... class simple_type(parameter_type): def __init__(self, declared_type): ... binary_type: Any boolean_type: Any integer_type: Any logical_type: Any number_type: Any real_type: Any string_type: Any datatype_COUNT: Any def as_simple_type(self) -> simple_type: ... def declared_type(self): ... class solid: def calc_hash(self): ... @property def children(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class sphere(surface): radius: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class style(item): def __init__(self, *args): ... diffuse: colour name: str """E.g. 'IfcSurfaceStyleShading-218', where 218 is style's STEP id.""" specular: colour specularity: float """Can be `float('nan')`""" surface: colour transparency: float """Can be `float('nan')`""" use_surface_color: bool def calc_hash(self) -> int: ... def clone_(self) -> Self: ... def get_color(self) -> colour: """ "Return surface color if it's used, otherwise return diffuse color.""" ... def has_specularity(self) -> bool: ... def has_transparency(self) -> bool: ... def instance_id(self) -> int: """ Possible values for `instance_id`: - IFC style id if style assigned to the representation items directly or through material with a style; - IFC material id if both true: - element has a material without a style; - there are parts of the geometry that has no other style assigned to them; - -1 in case if there is no material; - 0 in case if there are default materials used. """ ... def kind(self) -> int: ... class surface(geom_item): def __init__(self, *args, **kwargs): ... class svg_groups_of_line_segments: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class svg_groups_of_polygons: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class svg_line_segments: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class svg_loop: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class svg_loops: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class svg_point: def __init__(self, *args): ... def back(self): ... def begin(self): ... def empty(self): ... def end(self): ... def fill(self, u): ... def front(self): ... def iterator(self): ... def rbegin(self): ... def rend(self): ... def size(self): ... def swap(self, v): ... class svg_polygons: def __init__(self, *args): ... def append(self, x): ... def assign(self, n, x): ... def back(self): ... def begin(self): ... def capacity(self): ... def clear(self): ... def empty(self): ... def end(self): ... def erase(self, *args): ... def front(self): ... def get_allocator(self): ... def insert(self, *args): ... def iterator(self): ... def pop(self): ... def pop_back(self): ... def push_back(self, x): ... def rbegin(self): ... def rend(self): ... def reserve(self, n): ... def resize(self, *args): ... def size(self): ... def swap(self, v): ... class sweep(geom_item): def __init__(self, *args, **kwargs): ... basis: Any class sweep_along_curve(sweep): def __init__(self, *args): ... curve: Any surface: Any direction: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... class torus(surface): radius1: Any radius2: Any def calc_hash(self): ... def clone_(self): ... def kind(self): ... @property def matrix(self): ... class tree: def __init__(self, *args): ... def add_element(self, element: element | None) -> None: ... def add_file(self, *args) -> None: ... def clash_clearance_many( self, set_a: Sequence[entity_instance], set_b: Sequence[entity_instance], clearance: float = 0.05, check_all: bool = False, ) -> clashes: ... def clash_collision_many( self, set_a: Sequence[entity_instance], set_b: Sequence[entity_instance], allow_touching: bool = False ) -> clashes: ... def clash_intersection_many( self, set_a: Sequence[entity_instance], set_b: Sequence[entity_instance], tolerance: float = 0.002, check_all: bool = True, ) -> clashes: ... def distances(self) -> tuple[float, ...]: ... def enable_face_styles(self, *args) -> bool | None: ... @staticmethod def is_manifold(faces: Sequence[int]) -> bool: ... def protrusion_distances(self) -> tuple[float, ...]: ... def select(self, *args) -> tuple[entity_instance, ...]: ... def select_box(self, *args) -> tuple[entity_instance, ...]: ... def select_ray(self, *args) -> ray_intersection_results: ... def styles(self) -> Sequence[style]: ... class trimmed_curve(geom_item): def __init__(self, *args, **kwargs): ... basis: Any curve_sense: Any start: Any end: Any def reverse(self): ... class type_by_kind: max: Any class type_declaration(declaration): def __init__(self, name, index_in_schema, declared_type): ... def argument_types(self): ... def as_type_declaration(self) -> type_declaration: ... def declared_type(self): ... class uninitialized_tag: ... def arrange_polygons( settings: arrange_polygon_settings, polygons: Sequence[polygon_2], logger: logger | None = None ) -> tuple[polygon_2, ...]: ... def get_plugin_search_paths() -> tuple[str, ...]: ... def set_plugin_search_paths(paths: Sequence[str]) -> None: ... def clear_plugin_search_paths() -> None: ... def has_geometry_library(geometry_library: str) -> bool: ... def clear_schemas(): ... def construct_iterator(geometry_library, settings, file, num_threads, logger=None): ... def construct_iterator_with_include_exclude( geometry_library, settings, file, elems, include, num_threads, logger=None ): ... def construct_iterator_with_include_exclude_globalid( geometry_library, settings, file, elems, include, num_threads, logger=None ): ... def construct_iterator_with_include_exclude_id( geometry_library, settings, file, elems, include, num_threads, logger=None ): ... def convert_loop_to_function_item(loop): ... class attribute_value_derived: ... def get_feature(x: Literal["use_attribute_value_derived"]) -> bool: """Get the current value of a named feature flag.""" def set_feature(x: Literal["use_attribute_value_derived"], v: bool) -> None: """Set a named feature flag. ``use_attribute_value_derived``: when enabled, attribute values supplied as derived (``*``) are returned as instances of ``attribute_value_derived`` instead of being indistinguishable from NIL (``$``) values. """ def create_box(*args): ... def create_epeck(*args): ... def create_geometry_serializer(*args) -> geometry_serializer: ... def create_shape(*args): ... def flatten(deep): ... def get_info_cpp(v: entity_instance, recursive: bool, include_identifier: bool) -> dict[str, Any]: ... def get_log(): ... def helmert_curve_point(A0, A1, A2, s): ... def kind_to_string(k): ... def less(arg1, arg2): ... def line_segments_to_polygons(s, eps, segments): ... def map_shape(settings, instance): ... def logger_or_root(logger: logger | None) -> logger: ... def nary_union(sequence): ... def new_IfcBaseClass(file: file, name: str) -> entity_instance: ... def open(fn: str, readonly: bool = False, logger=None) -> file: ... def polygons_to_svg(*args): ... def read(data: str) -> file: ... def register_schema(schema: schema_definition) -> None: ... def schema_by_name(schema_name: str) -> schema_definition: ... def schema_names() -> tuple[str, ...]: ... def set_log_format_json(): ... def set_log_format_text(): ... def stream_from_string(data): ... def svg_to_line_segments(data, class_name): ... def svg_to_polygons(data, class_name): ... def taxonomy_item_repr(i): ... def turn_off_detailed_logging() -> None: ... def turn_on_detailed_logging() -> None: ... def version() -> str: ...