From 042627cc63cfae32b723fb041dfe4f141d85ccb5 Mon Sep 17 00:00:00 2001 From: Petras Vestartas Date: Fri, 31 Jan 2025 20:06:15 +0100 Subject: [PATCH 1/2] LINT --- CHANGELOG.md | 2 ++ src/compas_model/datastructures/kdtree.py | 2 +- src/compas_model/models/model.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e09d983..5da1da62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 point to frame instead of transformation. +* Changed `compas_model.datastructures.kdtree` constructor was pointing to aabb point instead of element point. ### Removed diff --git a/src/compas_model/datastructures/kdtree.py b/src/compas_model/datastructures/kdtree.py index 8efa3503..e966e60b 100644 --- a/src/compas_model/datastructures/kdtree.py +++ b/src/compas_model/datastructures/kdtree.py @@ -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: diff --git a/src/compas_model/models/model.py b/src/compas_model/models/model.py index a43cb755..4c1bfe37 100644 --- a/src/compas_model/models/model.py +++ b/src/compas_model/models/model.py @@ -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: From 790272967fbbdfb498a11525fe504bac5e46fe84 Mon Sep 17 00:00:00 2001 From: Petras Vestartas Date: Fri, 31 Jan 2025 20:09:39 +0100 Subject: [PATCH 2/2] FIX typo in changelog. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5da1da62..4dcd653f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,8 +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 point to frame instead of transformation. -* Changed `compas_model.datastructures.kdtree` constructor was pointing to aabb point instead of element point. +* 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