mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 02:01:12 -06:00
Importing the SLA computing module into the native source tree.
This commit is contained in:
parent
93ef2de667
commit
48bc166d6d
20 changed files with 3274 additions and 1 deletions
38
src/libslic3r/SLA/SLARotfinder.hpp
Normal file
38
src/libslic3r/SLA/SLARotfinder.hpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef SLAROTFINDER_HPP
|
||||
#define SLAROTFINDER_HPP
|
||||
|
||||
#include <functional>
|
||||
#include <array>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class ModelObject;
|
||||
|
||||
namespace sla {
|
||||
|
||||
/**
|
||||
* The function should find the best rotation for SLA upside down printing.
|
||||
*
|
||||
* @param modelobj The model object representing the 3d mesh.
|
||||
* @param accuracy The optimization accuracy from 0.0f to 1.0f. Currently,
|
||||
* the nlopt genetic optimizer is used and the number of iterations is
|
||||
* accuracy * 100000. This can change in the future.
|
||||
* @param statuscb A status indicator callback called with the unsigned
|
||||
* argument spanning from 0 to 100. May not reach 100 if the optimization finds
|
||||
* an optimum before max iterations are reached.
|
||||
* @param stopcond A function that if returns true, the search process will be
|
||||
* terminated and the best solution found will be returned.
|
||||
*
|
||||
* @return Returns the rotations around each axis (x, y, z)
|
||||
*/
|
||||
std::array<double, 3> find_best_rotation(
|
||||
const ModelObject& modelobj,
|
||||
float accuracy = .0f,
|
||||
std::function<void(unsigned)> statuscb = [] (unsigned) {},
|
||||
std::function<bool()> stopcond = [] () { return false; }
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SLAROTFINDER_HPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue