openvdb icon indicating copy to clipboard operation
openvdb copied to clipboard

[BUG] createLevelSetCapsule results in C2672, 'parallel_reduce': no matching overloaded function found

Open tbwilkinson opened this issue 4 months ago • 2 comments

Environment

Operating System: Windows 11 Version / Commit SHA: 12.1.0 Other: MSVC

Describe the bug

When trying to build a function using the "createLevelSetCapsule" tool, C2672 is thrown at "ConvexVoxelizer.h", line 888.

To Reproduce

Steps to reproduce the behavior:

MWE

#include <openvdb/tools/LevelSetTubes.h>
#include <openvdb/tools/LevelSetSphere.h>

// Start and end points
openvdb::math::Vec3<float> start(0.0f, 0.0f, 0.0f);
openvdb::math::Vec3<float> end(0.0f, 0.0f, 1.0f);

float radius = 0.5f;
float voxelsize = 0.1f;
float bandwidth = 1.0f;

// The capsule throws the error
auto grid = openvdb::tools::createLevelSetCapsule<openvdb::FloatGrid>(start, end, radius, voxelSize, bandwidth);

// The equivalent for the sphere tool does not throw any error
auto sphere = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(radius, start, voxelSize, bandwidth); 

Expected behavior

I expect the code to compile and the capsule function to return a valid grid.

Additional context

(Add any other context about the problem here.)

tbwilkinson avatar Aug 19 '25 16:08 tbwilkinson

Hi @tbwilkinson,

Would you mind confirming the versions of both msvc and tbb that you're using?

Thanks

Idclip avatar Sep 07 '25 02:09 Idclip

Sure, MSVC 19.44.35215.0, TBB 2022.0.

tbwilkinson avatar Sep 16 '25 08:09 tbwilkinson