mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 12:42:02 +08:00
Begin port of Slic3r::Test methods as part of the test harness (not linked into main application)
This commit is contained in:
parent
8255dc321b
commit
f29768ff8e
@ -195,6 +195,7 @@ set(UI_TEST_SOURCES
|
||||
)
|
||||
set(SLIC3R_TEST_SOURCES
|
||||
${TESTDIR}/test_harness.cpp
|
||||
${TESTDIR}/test_data.cpp
|
||||
${TESTDIR}/libslic3r/test_trianglemesh.cpp
|
||||
${TESTDIR}/libslic3r/test_config.cpp
|
||||
)
|
||||
|
160
src/test/test_data.cpp
Normal file
160
src/test/test_data.cpp
Normal file
File diff suppressed because one or more lines are too long
35
src/test/test_data.hpp
Normal file
35
src/test/test_data.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef SLIC3R_TEST_DATA_HPP
|
||||
#include "Point.hpp"
|
||||
#include "TriangleMesh.hpp"
|
||||
|
||||
namespace Slic3r { namespace Test {
|
||||
|
||||
enum class TestMesh {
|
||||
A,
|
||||
L,
|
||||
V,
|
||||
_40x10,
|
||||
bridge,
|
||||
bridge_with_hole,
|
||||
cube_with_concave_hole,
|
||||
cube_with_hole,
|
||||
gt2_teeth,
|
||||
ipadstand,
|
||||
overhang,
|
||||
pyramid,
|
||||
sloping_hole,
|
||||
slopy_cube,
|
||||
small_dorito,
|
||||
step,
|
||||
two_hollow_squares
|
||||
};
|
||||
|
||||
/// Port of Slic3r::Test::Mesh
|
||||
/// Basic cubes/boxes should call TriangleMesh::make_cube() directly and rescale it
|
||||
TriangleMesh mesh(TestMesh m);
|
||||
|
||||
TriangleMesh mesh(TestMesh m, Pointf3 translate, Pointf3 scale = Pointf3(1.0, 1.0, 1.0));
|
||||
|
||||
} } // namespace Slic3r::Test
|
||||
|
||||
#endif // SLIC3R_TEST_DATA_HPP
|
Loading…
x
Reference in New Issue
Block a user