|
2 | 2 |
|
3 | 3 | if not compas.IPY: |
4 | 4 | from typing import TYPE_CHECKING |
| 5 | + from typing import Union # noqa: F401 |
5 | 6 |
|
6 | 7 | if TYPE_CHECKING: |
7 | 8 | from compas_model.models import ElementNode # noqa: F401 |
@@ -83,8 +84,14 @@ class Element(Data): |
83 | 84 | The collision geometry of the element. |
84 | 85 | features : list[:class:`Feature`] |
85 | 86 | A list of features that define the detailed geometry of the element. |
| 87 | + include_features : bool |
| 88 | + Include the features in the element geometry. |
| 89 | + inflate_aabb : float |
| 90 | + Scaling factor to inflate the AABB with. |
| 91 | + inflate_obb : float |
| 92 | + Scaling factor to inflate the OBB with. |
86 | 93 |
|
87 | | - """ # noqa: E501 |
| 94 | + """ |
88 | 95 |
|
89 | 96 | @property |
90 | 97 | def __data__(self): |
@@ -178,12 +185,14 @@ def parent(self): |
178 | 185 |
|
179 | 186 | @property |
180 | 187 | def worldtransformation(self): |
| 188 | + # type: () -> compas.geometry.Transformation |
181 | 189 | if self._worldtransformation is None: |
182 | 190 | self._worldtransformation = self.compute_worldtransformation() |
183 | 191 | return self._worldtransformation |
184 | 192 |
|
185 | 193 | @property |
186 | 194 | def geometry(self): |
| 195 | + # type: () -> ... |
187 | 196 | if self._geometry is None: |
188 | 197 | self._geometry = self.compute_geometry() |
189 | 198 | return self._geometry |
@@ -214,10 +223,6 @@ def collision_mesh(self): |
214 | 223 | self._collision_mesh = self.compute_collision_mesh() |
215 | 224 | return self._collision_mesh |
216 | 225 |
|
217 | | - # other attributes might be useful |
218 | | - # - interaction_mesh |
219 | | - # - ... |
220 | | - |
221 | 226 | # ========================================================================== |
222 | 227 | # Abstract methods |
223 | 228 | # ========================================================================== |
@@ -266,7 +271,7 @@ def compute_geometry(self): |
266 | 271 | """Compute the geometry of the element. |
267 | 272 |
|
268 | 273 | Implementations of this method should transform the geometry to world coordinates, |
269 | | - using `self.worltransformation`. |
| 274 | + using `self.worldtransformation`. |
270 | 275 |
|
271 | 276 | Returns |
272 | 277 | ------- |
|
0 commit comments