diff options
author | supermerill <merill@free.fr> | 2022-09-07 01:52:33 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2022-09-16 17:25:57 +0300 |
commit | 5efbb72f6c39a1272d3559a1b91be40e9c4f2810 (patch) | |
tree | 3bcc48549c5e2810c152949f63ab3d643e0c058f | |
parent | 4792683e3eb006f78f95359240be531838ec39ea (diff) |
undo 7e3fc96, not needed anymore
supermerill/SuperSlicer#3153
-rw-r--r-- | src/libslic3r/GCode/SeamPlacer.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libslic3r/GCode/SeamPlacer.cpp b/src/libslic3r/GCode/SeamPlacer.cpp index 8847bc40f..50e2a993e 100644 --- a/src/libslic3r/GCode/SeamPlacer.cpp +++ b/src/libslic3r/GCode/SeamPlacer.cpp @@ -567,11 +567,16 @@ Point SeamPlacer::calculate_seam(const Layer& layer, SeamPosition seam_position, for (ModelVolume* v : po->model_object()->volumes) { if (v->is_seam_position()) { //xy in object coordinates, z in plater coordinates - // created/moved shpere have offset in their transformation, and loaded ones have their loaded transformation in the source transformation. - Vec3d test_lambda_pos = model_instance->transform_vector((v->get_transformation() * v->source.transform).get_offset(), false); - // remove shift, as we used the transform_vector(.., FALSE). that way, we have a correct z vs the layer height, and same for the x and y vs polygon. - test_lambda_pos.x() -= unscaled(po->instances()[print_object_instance_idx].shift.x()); - test_lambda_pos.y() -= unscaled(po->instances()[print_object_instance_idx].shift.y()); + // seems like it's now in the base transformation, no more need to go via the source.transform + Vec3d test_lambda_pos = model_instance->transform_vector(v->get_offset(), true); + // OLD: created/moved shpere have offset in their transformation, and loaded ones have their loaded transformation in the source transformation. + if (v->source.transform.get_offset().x() != 0 && std::abs(v->get_offset().x() - v->source.transform.get_offset().x()) > 0.001) { + test_lambda_pos = model_instance->transform_vector((v->get_transformation() * v->source.transform).get_offset(), false); + // remove shift, as we used the transform_vector(.., FALSE). that way, we have a correct z vs the layer height, and same for the x and y vs polygon. + test_lambda_pos.x() -= unscaled(po->instances()[print_object_instance_idx].shift.x()); + test_lambda_pos.y() -= unscaled(po->instances()[print_object_instance_idx].shift.y()); + assert(false); + } double test_lambda_z = std::abs(layer.print_z - test_lambda_pos.z()); Point xy_lambda(scale_(test_lambda_pos.x()), scale_(test_lambda_pos.y())); |