Missing attributes collides and collides_entity of BoundingBoxTree object
Dear Fenics community,
It seems that the methods BoundingBoxTree.collides(point) and BoundingBoxTree.collides_entity(point) are no longer provided in fenics docker version 2018.1.0.
Is there a reason why these methods are no longer provided within the dolfin python interface through pybind11? At least, I assume both methods are still present in the C++ class of BoundingBoxTree.
A minimal example to reproduce the error "AttributeError: 'dolfin.cpp.geometry.BoundingBoxTree' object has no attribute 'collides' " is:
from dolfin import * mesh = UnitSquareMesh(10, 10) point = Point([ 3.5, 0.5]) tree = mesh.bounding_box_tree()
print(tree.compute_collisions(point)) print(tree.compute_closest_entity(point)) print(tree.compute_first_entity_collision(point)) print(tree.collides(point)) print(tree.collides_entity(point))
Kind regards,
Geert
I have the same problem!
I see that in the newest version dolfin.cpp.geometry.BoundingBoxTree only has these attributes: 'compute_collisions', 'compute_entity_collisions', 'compute_first_collision', 'compute_first_entity_collision', 'compute_closest_entity'
Is there a way I can get a bool value like 'collides_entity' from these methods in python?
will this be right:
box = mesh.bounding_box_tree()
isValid = (box.compute_first_entity_collision(point) != box.compute_first_collision(point))