14 #include <openvdb/openvdb.h> 15 #include <openvdb/tools/MeshToVolume.h> 16 #include <openvdb/tools/ChangeBackground.h> 17 #include <openvdb/tools/LevelSetUtil.h> 18 #include <openvdb/tools/Composite.h> 32 static std::shared_ptr<MF::GB::StlMesher>
New(
const std::string &fileName,
const double voxelSize,
const bool verbose =
false) {
33 auto StlMesher_Ptr = std::make_shared<MF::GB::StlMesher>();
34 StlMesher_Ptr->m_VDBGridPtr = StlMesher_Ptr->readSTLGrid(fileName, voxelSize, verbose);
38 openvdb::FloatGrid::Ptr
readSTLGrid(
const std::string &fileName,
double voxelSize,
bool verbose =
false);
43 openvdb::FloatGrid::Ptr m_VDBGridPtr;
openvdb::FloatGrid::Ptr readSTLGrid(const std::string &fileName, double voxelSize, bool verbose=false)
Reads .stl file with tyti stl reader.
static std::shared_ptr< MF::GB::StlMesher > New(const std::string &fileName, const double voxelSize, const bool verbose=false)
openvdb::FloatGrid::Ptr getVDBGrid_Ptr()
Returns VDBGrid shared Ptr.
Converts surface mesh to volumetric grid with constant voxelSize spacing.