This commit is contained in:
Andrej730
2025-07-23 17:34:42 +05:00
parent 3dde609519
commit c82191f40b
3 changed files with 49 additions and 36 deletions
@@ -17,7 +17,7 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell
from typing import Any, Union, Literal
from typing import Any, Union, Literal, Self
# `std::vector<xxx>` usually translated to `tuple[xxx, ...]`.
@@ -731,14 +731,17 @@ class collection:
def matrix(self): ...
class colour(item):
def b(self): ...
def calc_hash(self): ...
def clone_(self): ...
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): ...
def g(self): ...
def kind(self): ...
def r(self): ...
def components(self) -> tuple[float, float, float]:
"""RGB tuple."""
...
def kind(self) -> int: ...
class context:
def add(self, segments): ...
@@ -1087,11 +1090,14 @@ class item:
instance: Any
orientation: Any
def calc_hash(self): ...
def clone_(self): ...
# TODO: hide from the wrapper?
def clone_(self) -> Self: ...
def hash(self): ...
def identity(self): ...
def kind(self): ...
def reverse(self): ...
# TODO: hide from the wrapper?
def kind(self):
"""Internal enum item index."""
class less_functor: ...
@@ -1329,18 +1335,25 @@ class sphere(surface):
def matrix(self): ...
class style(item):
diffuse: Any
name: Any
specular: Any
specularity: Any
surface: Any
transparency: Any
use_surface_color: Any
def calc_hash(self): ...
def clone_(self): ...
def get_color(self): ...
def has_specularity(self): ...
def has_transparency(self): ...
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`:
@@ -1354,7 +1367,7 @@ class style(item):
"""
...
def kind(self): ...
def kind(self) -> int: ...
class surface(geom_item): ...