@@ -157,7 +157,7 @@ bool inline ps_is_cutmesh_face(const fd_t& ps_fd, const int sm_face_count)
157
157
return ((int)ps_fd) >= sm_face_count;
158
158
}
159
159
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 )
161
161
{
162
162
const std::string name = std::string(fbasename) + ".off";
163
163
@@ -184,7 +184,7 @@ void dump_mesh(const hmesh_t& mesh, const char* fbasename)
184
184
}
185
185
}
186
186
187
- write_off(name.c_str(), mesh);
187
+ write_off(name.c_str(), mesh, multiplier );
188
188
}
189
189
190
190
#if 0
@@ -1576,8 +1576,8 @@ void dispatch(output_t& output, const input_t& input)
1576
1576
const hmesh_t& cs = (*input.cut_mesh);
1577
1577
1578
1578
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 );
1581
1581
}
1582
1582
1583
1583
const int sm_vtx_cnt = sm.number_of_vertices();
@@ -1736,7 +1736,7 @@ void dispatch(output_t& output, const input_t& input)
1736
1736
// cs_to_ps_vtx.clear();
1737
1737
1738
1738
if (input.verbose) {
1739
- dump_mesh(ps, "polygon-soup");
1739
+ dump_mesh(ps, "polygon-soup", input.multiplier );
1740
1740
}
1741
1741
1742
1742
const int ps_vtx_cnt = ps.number_of_vertices();
@@ -3236,7 +3236,11 @@ void dispatch(output_t& output, const input_t& input)
3236
3236
}
3237
3237
3238
3238
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)
3240
3244
}
3241
3245
3242
3246
if (partial_cut_detected) {
@@ -3594,7 +3598,7 @@ void dispatch(output_t& output, const input_t& input)
3594
3598
// intersecting faces in the polygon-soup ("ps").
3595
3599
3596
3600
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
3598
3602
}
3599
3603
3600
3604
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)
6332
6336
output.seamed_src_mesh->data_maps = std::move(separated_src_mesh_fragments.begin()->second.front().second.data_maps);
6333
6337
6334
6338
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);
6336
6342
}
6337
6343
}
6338
6344
} // if (input.include_seam_srcmesh) {
@@ -6382,7 +6388,8 @@ void dispatch(output_t& output, const input_t& input)
6382
6388
output.seamed_cut_mesh->data_maps = std::move(separated_cut_mesh_fragments.begin()->second.front().second.data_maps);
6383
6389
6384
6390
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);
6386
6393
}
6387
6394
}
6388
6395
}
@@ -7755,7 +7762,11 @@ void dispatch(output_t& output, const input_t& input)
7755
7762
// is empty before calling "extract_connected_components"
7756
7763
MCUT_ASSERT(mesh_data.size() == 1);
7757
7764
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);
7759
7770
}
7760
7771
std::pair<std::shared_ptr<hmesh_t>, connected_component_info_t>& md = mesh_data.front();
7761
7772
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)
9167
9178
#endif // #if defined(MCUT_WITH_COMPUTE_HELPER_THREADPOOL)
9168
9179
9169
9180
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);
9171
9186
}
9172
9187
9173
9188
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)
10700
10715
10701
10716
if (input.verbose) {
10702
10717
// 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);
10704
10724
}
10705
10725
10706
10726
std::shared_ptr<output_mesh_info_t> omi = std::shared_ptr<output_mesh_info_t>(new output_mesh_info_t);
0 commit comments