Skip to content

Commit

Permalink
Merge pull request #426 from gumyr/joint-fix2
Browse files Browse the repository at this point in the history
ensure parents of joints are handled properly during deep copy
  • Loading branch information
gumyr authored Dec 9, 2023
2 parents 4f79ce7 + 376a165 commit 3a66d8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3a66d8c

Please sign in to comment.