From 376a165e5dae95d2f2104dd8724c8123ef70bdb5 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Fri, 8 Dec 2023 20:58:51 +0100 Subject: [PATCH] ensure parents of joints are handled properly during deep copy --- src/build123d/topology.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build123d/topology.py b/src/build123d/topology.py index 1ce4d8a2..50f5e4ae 100644 --- a/src/build123d/topology.py +++ b/src/build123d/topology.py @@ -2312,6 +2312,9 @@ def __deepcopy__(self, memo) -> Self: memo[id(self.wrapped)] = downcast(BRepBuilderAPI_Copy(self.wrapped).Shape()) for key, value in self.__dict__.items(): setattr(result, key, copy.deepcopy(value, memo)) + if key == "joints": + for joint in result.joints.values(): + joint.parent = result return result def __copy__(self) -> Self: