mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Suggestion for Z offset correction
This commit is contained in:
parent
c6b5fe05e4
commit
ecdd4b6e7a
1 changed files with 160 additions and 149 deletions
|
@ -108,7 +108,18 @@ static Transform3d sla_trafo(const ModelObject &model_object, const SLAPrinterCo
|
|||
offset(0) = 0.;
|
||||
offset(1) = 0.;
|
||||
rotation(2) = 0.;
|
||||
Transform3d trafo = Geometry::assemble_transform(offset, rotation, model_instance.get_scaling_factor().cwiseProduct(corr), model_instance.get_mirror());
|
||||
|
||||
offset(Z) *= corr(Z);
|
||||
|
||||
auto trafo = Transform3d::Identity();
|
||||
trafo.translate(offset);
|
||||
trafo.scale(corr);
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(2), Vec3d::UnitZ()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(1), Vec3d::UnitY()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(0), Vec3d::UnitX()));
|
||||
trafo.scale(model_instance.get_scaling_factor());
|
||||
trafo.scale(model_instance.get_mirror());
|
||||
|
||||
if (model_instance.is_left_handed())
|
||||
trafo = Eigen::Scaling(Vec3d(-1., 1., 1.)) * trafo;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue