Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the time to create BVHModel #591

Closed
ZERO-EAST opened this issue Jan 9, 2023 · 1 comment
Closed

the time to create BVHModel #591

ZERO-EAST opened this issue Jan 9, 2023 · 1 comment

Comments

@ZERO-EAST
Copy link

For large amounts of data, Why does it take more than ten times longer to create BVHModels based on Python than C++?

e.g.
the number of points is 176223, the number of triangles is 343688,

Python

m = fcl.BVHModel()
m.beginModel(len(points), len(triangles))
m.addSubModel(points, triangles)
m.endModel()

C++

std::shared_ptr<BVHModel<AABBd>> mesh_model;
mesh_model = std::make_shared<BVHModel<AABBd>>();
mesh_model->beginModel();
mesh_model->addSubModel(points, triangles);
mesh_model->endModel();
@SeanCurtis-TRI
Copy link
Contributor

I suspect this is more a question for https://github.com/BerkeleyAutomation/python-fcl. The most likely possibility is that the points and triangles are being iterated through as python objects so you're paying the python loop cost instead of the C++ cost. But as this belongs to the bindings more than it does to this repo,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants