Skip to content

Commit

Permalink
fix OctreeBase: add abstractmethod annotations
Browse files Browse the repository at this point in the history
fix Octree: do not unsubdivide after filter
  • Loading branch information
true-real-michael committed Nov 16, 2023
1 parent c3914c1 commit a4fd195
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions octreelib/octree/octree.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def filter(self, filtering_criteria: List[Callable[[PointCloud], bool]]):
if self._has_children:
for child in self._children:
child.filter(filtering_criteria)
if all([child.n_points == 0 for child in self._children]):
self._children = []
self._has_children = False
elif not all([criterion(self._points) for criterion in filtering_criteria]):
self._points = np.empty((0, 3), dtype=float)

Expand Down
2 changes: 2 additions & 0 deletions octreelib/octree/octree_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def subdivide(self, subdivision_criteria: List[Callable[[PointCloud], bool]]):
"""
pass

@abstractmethod
def subdivide_as(self, other: "OctreeNodeBase"):
"""
Subdivide octree node using the subdivision scheme of a different octree node.
Expand Down Expand Up @@ -189,6 +190,7 @@ def subdivide(self, subdivision_criteria: List[Callable[[PointCloud], bool]]):
"""
pass

@abstractmethod
def subdivide_as(self, other: "OctreeBase"):
"""
Subdivide octree using the subdivision scheme of a different octree.
Expand Down

0 comments on commit a4fd195

Please sign in to comment.