Merge cuts by CGAL model -- Not Working
This commit is contained in:
parent
a865fbf3b1
commit
b059d3a57c
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,10 @@ using SurfaceCuts = std::vector<SurfaceCut>;
|
||||
/// <param name="sc_add">Surface cut to consume</param>
|
||||
void append(SurfaceCut &sc, SurfaceCut &&sc_add);
|
||||
|
||||
// call private function with same name to test it
|
||||
bool merge_intersection(SurfaceCut &sc1, const SurfaceCut &sc2);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Merge surface cuts int one
|
||||
/// </summary>
|
||||
|
@ -104,7 +104,7 @@ static Emboss::OrthoProject create_projection_for_cut(
|
||||
return Emboss::OrthoProject(tr, project_direction);
|
||||
}
|
||||
|
||||
TEST_CASE("CutSurface in 3mf", "[]")
|
||||
TEST_CASE("CutSurface in 3mf", "[Emboss]")
|
||||
{
|
||||
std::string path_to_3mf = "C:/Users/filip/Downloads/MultiObj.3mf";
|
||||
|
||||
@ -154,6 +154,11 @@ TEST_CASE("CutSurface in 3mf", "[]")
|
||||
cut_projection_tr, shape_scale, get_extents(shapes), z_range);
|
||||
|
||||
float projection_ratio = -z_range.first / (z_range.second - z_range.first);
|
||||
cut_surface(its, shapes, projection, projection_ratio);
|
||||
SurfaceCut cut = cut_surface(its, shapes, projection, projection_ratio);
|
||||
its_write_obj(cut, "C:/data/temp/cutSurface/result_cut.obj");
|
||||
}
|
||||
|
||||
TEST_CASE("Merge Cuts", "[Emboss]") {
|
||||
Slic3r::merge_intersection();
|
||||
}
|
||||
#endif // DEBUG_3MF
|
||||
|
@ -2,6 +2,7 @@ get_filename_component(_TEST_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
|
||||
add_executable(${_TEST_NAME}_tests
|
||||
${_TEST_NAME}_tests_main.cpp
|
||||
slic3r_jobs_tests.cpp
|
||||
test_cutSurfaceJob.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${_TEST_NAME}_tests test_common libslic3r_gui libslic3r)
|
||||
|
Loading…
Reference in New Issue
Block a user