mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
SLAPrint concept under its way.
This commit is contained in:
parent
22c9c5ae95
commit
19b1aa081d
11 changed files with 225 additions and 618 deletions
|
@ -10,37 +10,6 @@
|
|||
namespace Slic3r {
|
||||
namespace sla {
|
||||
|
||||
EigenMesh3D to_eigenmesh(const TriangleMesh& tmesh) {
|
||||
|
||||
const stl_file& stl = tmesh.stl;
|
||||
|
||||
EigenMesh3D outmesh;
|
||||
auto& V = outmesh.V;
|
||||
auto& F = outmesh.F;
|
||||
|
||||
V.resize(3*stl.stats.number_of_facets, 3);
|
||||
F.resize(stl.stats.number_of_facets, 3);
|
||||
for (unsigned int i=0; i<stl.stats.number_of_facets; ++i) {
|
||||
const stl_facet* facet = stl.facet_start+i;
|
||||
V(3*i+0, 0) = facet->vertex[0](0); V(3*i+0, 1) =
|
||||
facet->vertex[0](1); V(3*i+0, 2) = facet->vertex[0](2);
|
||||
V(3*i+1, 0) = facet->vertex[1](0); V(3*i+1, 1) =
|
||||
facet->vertex[1](1); V(3*i+1, 2) = facet->vertex[1](2);
|
||||
V(3*i+2, 0) = facet->vertex[2](0); V(3*i+2, 1) =
|
||||
facet->vertex[2](1); V(3*i+2, 2) = facet->vertex[2](2);
|
||||
|
||||
F(i, 0) = 3*i+0;
|
||||
F(i, 1) = 3*i+1;
|
||||
F(i, 2) = 3*i+2;
|
||||
}
|
||||
|
||||
return outmesh;
|
||||
}
|
||||
|
||||
inline EigenMesh3D to_eigenmesh(const ModelObject& modelobj) {
|
||||
return to_eigenmesh(modelobj.raw_mesh());
|
||||
}
|
||||
|
||||
std::array<double, 3> find_best_rotation(const ModelObject& modelobj,
|
||||
float accuracy,
|
||||
std::function<void(unsigned)> statuscb,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue