Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

* Changed `compas_model.elements.Element.compute_modeltransformation` to use only the stack of transformations of its ancestors. Each transformation in the stack defines the change from local to world coordinates of the corresponding element.
* Changed: `compas_model.models.Model.transformation` was incorrectly pointing to `_frame` instead of `transformation`.
* Changed: `compas_model.datastructures.kdtree` constructor was incorrectly pointing to aabb point instead of element point.

### Removed

Expand Down
2 changes: 1 addition & 1 deletion src/compas_model/datastructures/kdtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class KDTree:

def __init__(self, elements: list["Element"]):
self.elements = elements
self.root = self._build([(element.aabb.frame.point, index) for index, element in enumerate(elements)])
self.root = self._build([(element.point, index) for index, element in enumerate(elements)])

def _build(self, objects: list[tuple["Element", int]], axis: int = 0) -> Node:
if not objects:
Expand Down
2 changes: 1 addition & 1 deletion src/compas_model/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def kdtree(self) -> KDTree:

@property
def transformation(self) -> Transformation:
return self._frame
return self._transformation

@transformation.setter
def transformation(self, transformation: Transformation) -> None:
Expand Down
Loading