Draft: Fix handling of coin nodes

Fixes #18523.
This commit is contained in:
Roy-043
2024-12-16 18:24:36 +01:00
parent bc6183eb81
commit 01952e77ca
4 changed files with 36 additions and 25 deletions

View File

@@ -896,6 +896,14 @@ def get_bbox(obj, debug=False):
return App.BoundBox(xmin, ymin, zmin, xmax, ymax, zmax)
# Code by Yorik van Havre.
def find_coin_node(parent, nodetype):
for i in range(parent.getNumChildren()):
if isinstance(parent.getChild(i), nodetype):
return parent.getChild(i)
return None
# Code by Chris Hennes (chennes).
# See https://forum.freecadweb.org/viewtopic.php?p=656362#p656362.
# Used to fix https://github.com/FreeCAD/FreeCAD/issues/10469.