mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
ifcopenshell_wrapper.pyi
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
# `std::vector<xxx>` usually translated to `tuple[xxx, ...]`.
|
||||||
|
|
||||||
ON_SLABS_AND_WALLS: Any
|
ON_SLABS_AND_WALLS: Any
|
||||||
ON_SLABS_AT_FLOORPLANS: Any
|
ON_SLABS_AT_FLOORPLANS: Any
|
||||||
ALWAYS: Any
|
ALWAYS: Any
|
||||||
@@ -564,9 +566,9 @@ class aggregation_type(parameter_type):
|
|||||||
def type_of_element(self): ...
|
def type_of_element(self): ...
|
||||||
|
|
||||||
class attribute:
|
class attribute:
|
||||||
def name(self): ...
|
def name(self) -> str: ...
|
||||||
def optional(self): ...
|
def optional(self) -> bool: ...
|
||||||
def type_of_attribute(self): ...
|
def type_of_attribute(self) -> parameter_type: ...
|
||||||
|
|
||||||
class attribute_value_derived: ...
|
class attribute_value_derived: ...
|
||||||
|
|
||||||
@@ -699,12 +701,13 @@ class cylinder(surface):
|
|||||||
def matrix(self): ...
|
def matrix(self): ...
|
||||||
|
|
||||||
class declaration:
|
class declaration:
|
||||||
|
def _is(self, *args: str) -> bool: ...
|
||||||
def as_entity(self): ...
|
def as_entity(self): ...
|
||||||
def as_enumeration_type(self): ...
|
def as_enumeration_type(self): ...
|
||||||
def as_select_type(self): ...
|
def as_select_type(self): ...
|
||||||
def as_type_declaration(self): ...
|
def as_type_declaration(self): ...
|
||||||
def index_in_schema(self): ...
|
def index_in_schema(self): ...
|
||||||
def name(self): ...
|
def name(self) -> str: ...
|
||||||
def name_uc(self): ...
|
def name_uc(self): ...
|
||||||
def schema(self): ...
|
def schema(self): ...
|
||||||
def type(self): ...
|
def type(self): ...
|
||||||
@@ -739,11 +742,14 @@ class entity(declaration):
|
|||||||
def all_inverse_attributes(self): ...
|
def all_inverse_attributes(self): ...
|
||||||
def argument_types(self): ...
|
def argument_types(self): ...
|
||||||
def as_entity(self): ...
|
def as_entity(self): ...
|
||||||
def attribute_by_index(self, index): ...
|
def attribute_by_index(self, index: int) -> attribute: ...
|
||||||
def attribute_count(self): ...
|
def attribute_count(self) -> int: ...
|
||||||
def attribute_index(self, *args): ...
|
def attribute_index(self, *args): ...
|
||||||
def attributes(self): ...
|
def attributes(self): ...
|
||||||
def derived(self): ...
|
def derived(self) -> tuple[bool, ...]:
|
||||||
|
"""Return a tuple of booleans indicating whether each direct attribute is derived."""
|
||||||
|
...
|
||||||
|
|
||||||
def is_abstract(self): ...
|
def is_abstract(self): ...
|
||||||
def set_attributes(self, attributes, derived): ...
|
def set_attributes(self, attributes, derived): ...
|
||||||
def set_inverse_attributes(self, inverse_attributes): ...
|
def set_inverse_attributes(self, inverse_attributes): ...
|
||||||
@@ -859,7 +865,13 @@ class file:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def traverse_breadth_first(instance, max_level): ...
|
def traverse_breadth_first(instance, max_level): ...
|
||||||
def try_read_semicolon(self): ...
|
def try_read_semicolon(self): ...
|
||||||
def types(self): ...
|
def types(self) -> tuple[str, ...]:
|
||||||
|
"""Return a tuple of classes present in the file.
|
||||||
|
|
||||||
|
E.g. `("IfcWallType", "IfcWall", "IfcArbitraryClosedProfileDef", ...)`.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
def types_begin(self): ...
|
def types_begin(self): ...
|
||||||
def types_end(self): ...
|
def types_end(self): ...
|
||||||
def unbatch(self): ...
|
def unbatch(self): ...
|
||||||
@@ -1000,6 +1012,7 @@ class matrix4(item):
|
|||||||
def translation_part(self): ...
|
def translation_part(self): ...
|
||||||
|
|
||||||
class named_type(parameter_type):
|
class named_type(parameter_type):
|
||||||
|
def _is(self, *args): ...
|
||||||
def as_named_type(self): ...
|
def as_named_type(self): ...
|
||||||
def declared_type(self): ...
|
def declared_type(self): ...
|
||||||
|
|
||||||
@@ -1026,6 +1039,7 @@ class offset_function(function_item):
|
|||||||
def start(self): ...
|
def start(self): ...
|
||||||
|
|
||||||
class parameter_type:
|
class parameter_type:
|
||||||
|
def _is(self, *args): ...
|
||||||
def as_aggregation_type(self): ...
|
def as_aggregation_type(self): ...
|
||||||
def as_named_type(self): ...
|
def as_named_type(self): ...
|
||||||
def as_simple_type(self): ...
|
def as_simple_type(self): ...
|
||||||
@@ -1105,8 +1119,8 @@ class revolve(sweep):
|
|||||||
def matrix(self): ...
|
def matrix(self): ...
|
||||||
|
|
||||||
class schema_definition:
|
class schema_definition:
|
||||||
def declaration_by_name(self, *args): ...
|
def declaration_by_name(self, *args: str) -> declaration: ...
|
||||||
def declarations(self): ...
|
def declarations(self) -> tuple[declaration, ...]: ...
|
||||||
def entities(self): ...
|
def entities(self): ...
|
||||||
def enumeration_types(self): ...
|
def enumeration_types(self): ...
|
||||||
def instantiate(self, decl, data): ...
|
def instantiate(self, decl, data): ...
|
||||||
@@ -1413,7 +1427,7 @@ def parse_ifcxml(filename): ...
|
|||||||
def polygons_to_svg(*args): ...
|
def polygons_to_svg(*args): ...
|
||||||
def read(data): ...
|
def read(data): ...
|
||||||
def register_schema(arg1): ...
|
def register_schema(arg1): ...
|
||||||
def schema_by_name(arg1): ...
|
def schema_by_name(arg1: str) -> schema_definition: ...
|
||||||
def schema_names(): ...
|
def schema_names(): ...
|
||||||
def serialise(schema_name, shape_str, advanced): ...
|
def serialise(schema_name, shape_str, advanced): ...
|
||||||
def set_feature(x, v): ...
|
def set_feature(x, v): ...
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def get_declaration(element: ifcopenshell.entity_instance):
|
|||||||
return element.wrapped_data.declaration().as_entity()
|
return element.wrapped_data.declaration().as_entity()
|
||||||
|
|
||||||
|
|
||||||
def is_a(declaration: ifcopenshell.ifcopenshell_wrapper.entity, ifc_class: str) -> bool:
|
def is_a(declaration: ifcopenshell.ifcopenshell_wrapper.declaration, ifc_class: str) -> bool:
|
||||||
"""Checks if a schema declaration is a class
|
"""Checks if a schema declaration is a class
|
||||||
|
|
||||||
:param declaration: The declaration from the schema.
|
:param declaration: The declaration from the schema.
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ def get_function_node_name(node: ast.FunctionDef) -> Union[SubnameType, None]:
|
|||||||
:return: Function node name as ``SubnameType`` or ``None``, if function wasn't processed and can be skipped.
|
:return: Function node name as ``SubnameType`` or ``None``, if function wasn't processed and can be skipped.
|
||||||
"""
|
"""
|
||||||
node_name = node.name
|
node_name = node.name
|
||||||
if node_name.startswith("_"):
|
if node_name.startswith("_") and node_name not in ("_is",):
|
||||||
return None
|
return None
|
||||||
args = [a.arg for a in node.args.args]
|
args = [a.arg for a in node.args.args]
|
||||||
if node.args.vararg:
|
if node.args.vararg:
|
||||||
|
|||||||
Reference in New Issue
Block a user