60 :
Base(cfg.collection,
"ObjSpacePointWriter", level), m_cfg(cfg) {
62 throw std::invalid_argument(
"Missing input collection");
73 std::ofstream os(path, std::ofstream::out | std::ofstream::trunc);
75 throw std::ios_base::failure(
"Could not open '" + path +
"' to write");
78 os << std::setprecision(m_cfg.outputPrecision);
82 for (
auto& volumeData : spacePoints) {
83 for (
auto& layerData : volumeData.second) {
84 for (
auto& moduleData : layerData.second) {
85 for (
auto&
data : moduleData.second) {
87 os <<
"v " << m_cfg.outputScalor *
data.x() <<
" "
88 << m_cfg.outputScalor *
data.y() <<
" "
89 << m_cfg.outputScalor *
data.z() <<
'\n';
90 os <<
"p " << ++vertex <<
'\n';