@@ -157,7 +157,7 @@ bool inline ps_is_cutmesh_face(const fd_t& ps_fd, const int sm_face_count)
157157 return ((int)ps_fd) >= sm_face_count;
158158}
159159
160- void dump_mesh(const hmesh_t& mesh, const char* fbasename)
160+ void dump_mesh(const hmesh_t& mesh, const char* fbasename, const double multiplier )
161161{
162162 const std::string name = std::string(fbasename) + ".off";
163163
@@ -184,7 +184,7 @@ void dump_mesh(const hmesh_t& mesh, const char* fbasename)
184184 }
185185 }
186186
187- write_off(name.c_str(), mesh);
187+ write_off(name.c_str(), mesh, multiplier );
188188}
189189
190190#if 0
@@ -1576,8 +1576,8 @@ void dispatch(output_t& output, const input_t& input)
15761576 const hmesh_t& cs = (*input.cut_mesh);
15771577
15781578 if (input.verbose) {
1579- dump_mesh(sm, "src-mesh");
1580- dump_mesh(cs, "cut-mesh");
1579+ dump_mesh(sm, "src-mesh", input.multiplier );
1580+ dump_mesh(cs, "cut-mesh", input.multiplier );
15811581 }
15821582
15831583 const int sm_vtx_cnt = sm.number_of_vertices();
@@ -1736,7 +1736,7 @@ void dispatch(output_t& output, const input_t& input)
17361736 // cs_to_ps_vtx.clear();
17371737
17381738 if (input.verbose) {
1739- dump_mesh(ps, "polygon-soup");
1739+ dump_mesh(ps, "polygon-soup", input.multiplier );
17401740 }
17411741
17421742 const int ps_vtx_cnt = ps.number_of_vertices();
@@ -3236,7 +3236,11 @@ void dispatch(output_t& output, const input_t& input)
32363236 }
32373237
32383238 if (input.verbose) {
3239- dump_mesh(m0, "m0.v"); // containing only vertices (polygon soup vertices and newly computed intersection points)
3239+ dump_mesh(
3240+ m0,
3241+ "m0.v",
3242+ input
3243+ .multiplier); // containing only vertices (polygon soup vertices and newly computed intersection points)
32403244 }
32413245
32423246 if (partial_cut_detected) {
@@ -3594,7 +3598,7 @@ void dispatch(output_t& output, const input_t& input)
35943598 // intersecting faces in the polygon-soup ("ps").
35953599
35963600 if (input.verbose) {
3597- dump_mesh(m0, "m0.v.e"); // containing only vertices & edges
3601+ dump_mesh(m0, "m0.v.e", input.multiplier ); // containing only vertices & edges
35983602 }
35993603
36003604 const uint32_t m0_num_cutpath_edges = (uint32_t)m0_cutpath_edges.size();
@@ -6332,7 +6336,9 @@ void dispatch(output_t& output, const input_t& input)
63326336 output.seamed_src_mesh->data_maps = std::move(separated_src_mesh_fragments.begin()->second.front().second.data_maps);
63336337
63346338 if (input.verbose) {
6335- dump_mesh(output.seamed_src_mesh->mesh.get()[0], "src-mesh-traced-poly");
6339+ dump_mesh(output.seamed_src_mesh->mesh.get()[0],
6340+ "src-mesh-traced-poly",
6341+ input.multiplier);
63366342 }
63376343 }
63386344 } // if (input.include_seam_srcmesh) {
@@ -6382,7 +6388,8 @@ void dispatch(output_t& output, const input_t& input)
63826388 output.seamed_cut_mesh->data_maps = std::move(separated_cut_mesh_fragments.begin()->second.front().second.data_maps);
63836389
63846390 if (input.verbose) {
6385- dump_mesh(output.seamed_cut_mesh->mesh.get()[0], "cut-mesh-traced-poly");
6391+ dump_mesh(
6392+ output.seamed_cut_mesh->mesh.get()[0], "cut-mesh-traced-poly", input.multiplier);
63866393 }
63876394 }
63886395 }
@@ -7755,7 +7762,11 @@ void dispatch(output_t& output, const input_t& input)
77557762 // is empty before calling "extract_connected_components"
77567763 MCUT_ASSERT(mesh_data.size() == 1);
77577764 if (input.verbose) {
7758- dump_mesh(mesh_data.front().first.get()[0], ("fragment.unsealed." + std::to_string(cc_id) + "." + to_string(mesh_data.front().second.location)).c_str());
7765+ dump_mesh(mesh_data.front().first.get()[0],
7766+ ("fragment.unsealed." + std::to_string(cc_id) + "." +
7767+ to_string(mesh_data.front().second.location))
7768+ .c_str(),
7769+ input.multiplier);
77597770 }
77607771 std::pair<std::shared_ptr<hmesh_t>, connected_component_info_t>& md = mesh_data.front();
77617772 std::shared_ptr<output_mesh_info_t> omi = std::shared_ptr<output_mesh_info_t>(new output_mesh_info_t);
@@ -9167,7 +9178,11 @@ void dispatch(output_t& output, const input_t& input)
91679178#endif // #if defined(MCUT_WITH_COMPUTE_HELPER_THREADPOOL)
91689179
91699180 if (input.verbose) {
9170- dump_mesh(patch_mesh.get()[0], ("patch" + std::to_string(cur_patch_idx) + "." + to_string(patch_location) + "." + cs_patch_descriptor_str).c_str());
9181+ dump_mesh(patch_mesh.get()[0],
9182+ ("patch" + std::to_string(cur_patch_idx) + "." +
9183+ to_string(patch_location) + "." + cs_patch_descriptor_str)
9184+ .c_str(),
9185+ input.multiplier);
91719186 }
91729187
91739188 std::shared_ptr<output_mesh_info_t> omi = std::shared_ptr<output_mesh_info_t>(new output_mesh_info_t);
@@ -10700,7 +10715,12 @@ void dispatch(output_t& output, const input_t& input)
1070010715
1070110716 if (input.verbose) {
1070210717 // const int idx = (int)std::distance(cc_instances.begin(), cc_instance_iter);
10703- dump_mesh(cc_instance.first.get()[0], (std::string("cc") + std::to_string(idx++) + "." + to_string(cc_instance.second.location) + "." + to_string(patchLocation)).c_str());
10718+ dump_mesh(cc_instance.first.get()[0],
10719+ (std::string("cc") + std::to_string(idx++) + "." +
10720+ to_string(cc_instance.second.location) + "." +
10721+ to_string(patchLocation))
10722+ .c_str(),
10723+ input.multiplier);
1070410724 }
1070510725
1070610726 std::shared_ptr<output_mesh_info_t> omi = std::shared_ptr<output_mesh_info_t>(new output_mesh_info_t);
0 commit comments