From 89a230c7aa3fa02967754afdc4474297a1876851 Mon Sep 17 00:00:00 2001 From: mcapodif Date: Thu, 19 Dec 2024 23:07:18 +0100 Subject: [PATCH] Speedup BinaryTreeNode --- src/ansys/aedt/core/modeler/cad/elements_3d.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansys/aedt/core/modeler/cad/elements_3d.py b/src/ansys/aedt/core/modeler/cad/elements_3d.py index 68a9da74c44..bcc07872cae 100644 --- a/src/ansys/aedt/core/modeler/cad/elements_3d.py +++ b/src/ansys/aedt/core/modeler/cad/elements_3d.py @@ -1375,9 +1375,9 @@ def __init__(self, node, child_object, first_level=False, get_child_obj_arg=None self._node = node self.child_object = child_object self.auto_update = True - self._first_level = first_level self._children = {} - if self._first_level: + self.__first_level = first_level + if first_level: self._update_children() def _update_children(self): @@ -1412,7 +1412,7 @@ def _update_children(self): self._children[name] = BinaryTreeNode( name, self.child_object.GetChildObject(i).GetChildObject(name), root_name=self._saved_root_name ) - if self._first_level: + if self.__first_level: self.child_object = self._children[name].child_object self._props = self._children[name].properties