mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
typing
This commit is contained in:
@@ -38,17 +38,12 @@ def add_application(
|
||||
:param application_developer: The IfcOrganization responsible for
|
||||
creating the application. Defaults to generating an IfcOpenShell
|
||||
organisation if none is provided.
|
||||
:type application_developer: ifcopenshell.entity_instance, optional
|
||||
:param version: The version of the application. Defaults to the
|
||||
ifcopenshell.version data if not specified.
|
||||
:type version: str, optional
|
||||
:param application_full_name: The name of the application
|
||||
:type application_full_name: str, optional
|
||||
:param application_identifier: An identification string for the
|
||||
application intended for computers to read.
|
||||
:type application_identifier: str, optional
|
||||
:return: The newly created IfcApplication
|
||||
:rtype: ifcopenshell.entity_instance
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ class Element:
|
||||
@property
|
||||
def guid(self): ...
|
||||
@property
|
||||
def id(self): ...
|
||||
def id(self) -> int: ...
|
||||
@property
|
||||
def name(self): ...
|
||||
@property
|
||||
@@ -227,9 +227,9 @@ class Element:
|
||||
@property
|
||||
def product(self): ...
|
||||
@property
|
||||
def transformation(self): ...
|
||||
def transformation(self) -> Transformation: ...
|
||||
@property
|
||||
def transformation_buffer(self): ...
|
||||
def transformation_buffer(self) -> bytes: ...
|
||||
@property
|
||||
def type(self): ...
|
||||
@property
|
||||
@@ -342,7 +342,13 @@ class OpaqueNumber:
|
||||
class Representation:
|
||||
def entity(self): ...
|
||||
@property
|
||||
def id(self): ...
|
||||
def id(self) -> str:
|
||||
"""
|
||||
Example: `2432-openings-2468`, where
|
||||
- 2432 - mapped representation id
|
||||
- 2468 - IfcRelVoidsElement
|
||||
"""
|
||||
|
||||
def settings(self): ...
|
||||
|
||||
class Serialization(Representation):
|
||||
@@ -458,34 +464,34 @@ class Triangulation(Representation):
|
||||
@property
|
||||
def colors_buffer(self): ...
|
||||
@property
|
||||
def edges(self): ...
|
||||
def edges(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def edges_buffer(self): ...
|
||||
def edges_item_ids(self): ...
|
||||
def edges_buffer(self) -> bytes: ...
|
||||
def edges_item_ids(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def edges_item_ids_buffer(self): ...
|
||||
def edges_item_ids_buffer(self) -> bytes: ...
|
||||
@staticmethod
|
||||
def empty(settings): ...
|
||||
@property
|
||||
def faces(self): ...
|
||||
def faces(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def faces_buffer(self): ...
|
||||
def faces_buffer(self) -> bytes: ...
|
||||
@property
|
||||
def faces_tri(self): ...
|
||||
def faces_tri(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def item_ids(self): ...
|
||||
def item_ids(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def item_ids_buffer(self): ...
|
||||
def item_ids_buffer(self) -> bytes: ...
|
||||
@property
|
||||
def material_ids(self): ...
|
||||
def material_ids(self) -> tuple[int, ...]: ...
|
||||
@property
|
||||
def material_ids_buffer(self): ...
|
||||
def material_ids_buffer(self) -> bytes: ...
|
||||
@property
|
||||
def materials(self): ...
|
||||
def materials(self) -> tuple[style, ...]: ...
|
||||
@property
|
||||
def normals(self): ...
|
||||
@property
|
||||
def normals_buffer(self): ...
|
||||
def normals_buffer(self) -> bytes: ...
|
||||
@property
|
||||
def polyhedral_faces_with_holes(self): ...
|
||||
@property
|
||||
@@ -497,13 +503,13 @@ class Triangulation(Representation):
|
||||
def uvs(self): ...
|
||||
def uvs_ref(self): ...
|
||||
@property
|
||||
def verts(self): ...
|
||||
def verts(self) -> tuple[float, ...]: ...
|
||||
@property
|
||||
def verts_buffer(self): ...
|
||||
def verts_buffer(self) -> bytes: ...
|
||||
|
||||
class TriangulationElement(Element):
|
||||
@property
|
||||
def geometry(self): ...
|
||||
def geometry(self) -> Triangulation: ...
|
||||
def geometry_pointer(self): ...
|
||||
|
||||
class TriangulationType:
|
||||
@@ -1183,7 +1189,19 @@ class style(item):
|
||||
def get_color(self): ...
|
||||
def has_specularity(self): ...
|
||||
def has_transparency(self): ...
|
||||
def instance_id(self): ...
|
||||
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): ...
|
||||
|
||||
class surface(geom_item): ...
|
||||
|
||||
@@ -277,17 +277,7 @@ def get_normals(geometry: ShapeType) -> npt.NDArray[np.float64]:
|
||||
|
||||
|
||||
def get_shape_material_styles(geometry: ShapeType) -> tuple[W.style, ...]:
|
||||
"""Get list of material styles.
|
||||
|
||||
Possible values for `style.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.
|
||||
"""
|
||||
"""Get list of material styles."""
|
||||
return geometry.materials
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user