python-fcl icon indicating copy to clipboard operation
python-fcl copied to clipboard

the time to create BVHModel

Open ZERO-EAST opened this issue 2 years ago • 0 comments

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();

ZERO-EAST avatar Jan 09 '23 06:01 ZERO-EAST