Skip to content

Commit

Permalink
forgotten in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 29, 2024
1 parent 1e8676f commit 42430ee
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/compas_model/elements/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

if not compas.IPY:
from typing import TYPE_CHECKING
from typing import Union # noqa: F401

if TYPE_CHECKING:
from compas_model.models import ElementNode # noqa: F401
Expand Down Expand Up @@ -83,8 +84,14 @@ class Element(Data):
The collision geometry of the element.
features : list[:class:`Feature`]
A list of features that define the detailed geometry of the element.
include_features : bool
Include the features in the element geometry.
inflate_aabb : float
Scaling factor to inflate the AABB with.
inflate_obb : float
Scaling factor to inflate the OBB with.
""" # noqa: E501
"""

@property
def __data__(self):
Expand Down Expand Up @@ -178,12 +185,14 @@ def parent(self):

@property
def worldtransformation(self):
# type: () -> compas.geometry.Transformation
if self._worldtransformation is None:
self._worldtransformation = self.compute_worldtransformation()
return self._worldtransformation

@property
def geometry(self):
# type: () -> ...
if self._geometry is None:
self._geometry = self.compute_geometry()
return self._geometry
Expand Down Expand Up @@ -214,10 +223,6 @@ def collision_mesh(self):
self._collision_mesh = self.compute_collision_mesh()
return self._collision_mesh

# other attributes might be useful
# - interaction_mesh
# - ...

# ==========================================================================
# Abstract methods
# ==========================================================================
Expand Down Expand Up @@ -266,7 +271,7 @@ def compute_geometry(self):
"""Compute the geometry of the element.
Implementations of this method should transform the geometry to world coordinates,
using `self.worltransformation`.
using `self.worldtransformation`.
Returns
-------
Expand Down

0 comments on commit 42430ee

Please sign in to comment.