From a90784357e457da649b3d96b717a22dfea37c4c1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 22:06:57 +0000 Subject: [PATCH 1/2] Initial plan From 8135dde580a5883982a92f0413769246c9c6f0e6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 22:12:13 +0000 Subject: [PATCH 2/2] Fix inconsistent copying in BoneMesh.copy() for meniscal attributes Co-authored-by: gattia <10676083+gattia@users.noreply.github.com> --- pymskt/mesh/meshes.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pymskt/mesh/meshes.py b/pymskt/mesh/meshes.py index 9488021..de77380 100644 --- a/pymskt/mesh/meshes.py +++ b/pymskt/mesh/meshes.py @@ -1399,9 +1399,15 @@ def copy(self, deep=True): self.dict_cartilage_labels.copy() if self.dict_cartilage_labels else None ) copy_.list_articular_surfaces = self.list_articular_surfaces - copy_._meniscus_meshes = self._meniscus_meshes.copy() - copy_._meniscal_outcomes = self._meniscal_outcomes - copy_._meniscal_cart_labels = self._meniscal_cart_labels + copy_._meniscus_meshes = ( + self._meniscus_meshes.copy() if self._meniscus_meshes else {} + ) + copy_._meniscal_outcomes = ( + self._meniscal_outcomes.copy() if self._meniscal_outcomes else None + ) + copy_._meniscal_cart_labels = ( + self._meniscal_cart_labels.copy() if self._meniscal_cart_labels else None + ) return copy_ def create_mesh(