mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-19 03:59:07 -07:00
Method selection implemented
This commit is contained in:
@@ -92,9 +92,9 @@ Transform3f to_transform3f(const XYRotation &rot)
|
||||
|
||||
} // namespace
|
||||
|
||||
Vec2d find_best_rotation(const SLAPrintObject & po,
|
||||
float accuracy,
|
||||
std::function<bool(int)> statuscb)
|
||||
Vec2d find_best_misalignment_rotation(const SLAPrintObject & po,
|
||||
float accuracy,
|
||||
std::function<bool(int)> statuscb)
|
||||
{
|
||||
static const unsigned MAX_TRIES = 1000;
|
||||
|
||||
@@ -156,12 +156,4 @@ Vec2d find_best_rotation(const SLAPrintObject & po,
|
||||
return {rot[0], rot[1]};
|
||||
}
|
||||
|
||||
double get_model_supportedness(const SLAPrintObject &po, const Transform3f &tr)
|
||||
{
|
||||
TriangleMesh mesh = po.model_object()->raw_mesh();
|
||||
mesh.require_shared_vertices();
|
||||
|
||||
return get_model_supportedness(mesh, tr);
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::sla
|
||||
|
||||
@@ -9,9 +9,12 @@
|
||||
namespace Slic3r {
|
||||
|
||||
class SLAPrintObject;
|
||||
class TriangleMesh;
|
||||
|
||||
namespace sla {
|
||||
|
||||
using RotOptimizeStatusCB = std::function<bool(int)>;
|
||||
|
||||
/**
|
||||
* The function should find the best rotation for SLA upside down printing.
|
||||
*
|
||||
@@ -28,14 +31,13 @@ namespace sla {
|
||||
*
|
||||
* @return Returns the rotations around each axis (x, y, z)
|
||||
*/
|
||||
Vec2d find_best_rotation(
|
||||
Vec2d find_best_misalignment_rotation(
|
||||
const SLAPrintObject& modelobj,
|
||||
float accuracy = 1.0f,
|
||||
std::function<bool(int)> statuscb = [] (int) { return true; }
|
||||
RotOptimizeStatusCB statuscb = [] (int) { return true; }
|
||||
);
|
||||
|
||||
double get_model_supportedness(const SLAPrintObject &mesh,
|
||||
const Transform3f & tr);
|
||||
|
||||
|
||||
} // namespace sla
|
||||
} // namespace Slic3r
|
||||
|
||||
Reference in New Issue
Block a user