Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sla_print/sla_test_utils.hpp')
-rw-r--r--tests/sla_print/sla_test_utils.hpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/tests/sla_print/sla_test_utils.hpp b/tests/sla_print/sla_test_utils.hpp
index f3727bd39..d10a85b25 100644
--- a/tests/sla_print/sla_test_utils.hpp
+++ b/tests/sla_print/sla_test_utils.hpp
@@ -16,7 +16,7 @@
#include "libslic3r/SLA/SupportTreeBuilder.hpp"
#include "libslic3r/SLA/SupportTreeBuildsteps.hpp"
#include "libslic3r/SLA/SupportPointGenerator.hpp"
-#include "libslic3r/SLA/Raster.hpp"
+#include "libslic3r/SLA/AGGRaster.hpp"
#include "libslic3r/SLA/ConcaveHull.hpp"
#include "libslic3r/MTUtils.hpp"
@@ -67,16 +67,16 @@ struct SupportByproducts
const constexpr float CLOSING_RADIUS = 0.005f;
void check_support_tree_integrity(const sla::SupportTreeBuilder &stree,
- const sla::SupportConfig &cfg);
+ const sla::SupportTreeConfig &cfg);
void test_supports(const std::string &obj_filename,
- const sla::SupportConfig &supportcfg,
+ const sla::SupportTreeConfig &supportcfg,
const sla::HollowingConfig &hollowingcfg,
const sla::DrainHoles &drainholes,
SupportByproducts &out);
inline void test_supports(const std::string &obj_filename,
- const sla::SupportConfig &supportcfg,
+ const sla::SupportTreeConfig &supportcfg,
SupportByproducts &out)
{
sla::HollowingConfig hcfg;
@@ -85,7 +85,7 @@ inline void test_supports(const std::string &obj_filename,
}
inline void test_supports(const std::string &obj_filename,
- const sla::SupportConfig &supportcfg = {})
+ const sla::SupportTreeConfig &supportcfg = {})
{
SupportByproducts byproducts;
test_supports(obj_filename, supportcfg, byproducts);
@@ -97,13 +97,13 @@ void export_failed_case(const std::vector<ExPolygons> &support_slices,
void test_support_model_collision(
const std::string &obj_filename,
- const sla::SupportConfig &input_supportcfg,
+ const sla::SupportTreeConfig &input_supportcfg,
const sla::HollowingConfig &hollowingcfg,
const sla::DrainHoles &drainholes);
inline void test_support_model_collision(
const std::string &obj_filename,
- const sla::SupportConfig &input_supportcfg = {})
+ const sla::SupportTreeConfig &input_supportcfg = {})
{
sla::HollowingConfig hcfg;
hcfg.enabled = false;
@@ -170,18 +170,28 @@ static constexpr const TPixel FullBlack = 0;
template <class A, int N> constexpr int arraysize(const A (&)[N]) { return N; }
-void check_raster_transformations(sla::Raster::Orientation o,
- sla::Raster::TMirroring mirroring);
+void check_raster_transformations(sla::RasterBase::Orientation o,
+ sla::RasterBase::TMirroring mirroring);
ExPolygon square_with_hole(double v);
-inline double pixel_area(TPixel px, const sla::Raster::PixelDim &pxdim)
+inline double pixel_area(TPixel px, const sla::RasterBase::PixelDim &pxdim)
{
return (pxdim.h_mm * pxdim.w_mm) * px * 1. / (FullWhite - FullBlack);
}
-double raster_white_area(const sla::Raster &raster);
+double raster_white_area(const sla::RasterGrayscaleAA &raster);
+long raster_pxsum(const sla::RasterGrayscaleAA &raster);
-double predict_error(const ExPolygon &p, const sla::Raster::PixelDim &pd);
+double predict_error(const ExPolygon &p, const sla::RasterBase::PixelDim &pd);
+
+// Make a 3D pyramid
+TriangleMesh make_pyramid(float base, float height);
+
+TriangleMesh make_prism(double width, double length, double height);
+
+sla::SupportPoints calc_support_pts(
+ const TriangleMesh & mesh,
+ const sla::SupportPointGenerator::Config &cfg = {});
#endif // SLA_TEST_UTILS_HPP