Skip to content

Commit

Permalink
Speedup BinaryTreeNode
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcapodi78 committed Dec 19, 2024
1 parent 2a6bef1 commit 89a230c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ansys/aedt/core/modeler/cad/elements_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,9 @@ def __init__(self, node, child_object, first_level=False, get_child_obj_arg=None
self._node = node

Check warning on line 1375 in src/ansys/aedt/core/modeler/cad/elements_3d.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modeler/cad/elements_3d.py#L1373-L1375

Added lines #L1373 - L1375 were not covered by tests
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()

Check warning on line 1381 in src/ansys/aedt/core/modeler/cad/elements_3d.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modeler/cad/elements_3d.py#L1378-L1381

Added lines #L1378 - L1381 were not covered by tests

def _update_children(self):
Expand Down Expand Up @@ -1412,7 +1412,7 @@ def _update_children(self):
self._children[name] = BinaryTreeNode(

Check warning on line 1412 in src/ansys/aedt/core/modeler/cad/elements_3d.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modeler/cad/elements_3d.py#L1412

Added line #L1412 was not covered by tests
name, self.child_object.GetChildObject(i).GetChildObject(name), root_name=self._saved_root_name
)
if self._first_level:
if self.__first_level:

Check warning on line 1415 in src/ansys/aedt/core/modeler/cad/elements_3d.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modeler/cad/elements_3d.py#L1415

Added line #L1415 was not covered by tests

self.child_object = self._children[name].child_object
self._props = self._children[name].properties

Check warning on line 1418 in src/ansys/aedt/core/modeler/cad/elements_3d.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modeler/cad/elements_3d.py#L1417-L1418

Added lines #L1417 - L1418 were not covered by tests
Expand Down

0 comments on commit 89a230c

Please sign in to comment.