Fix: the generation of the skirt does not take the wipe_tower into account.
jira: STUDIO-10381 Change-Id: I523d366d6d569696de48f872be827d73710cb526
This commit is contained in:
parent
4e3ee050db
commit
939b405c35
|
@ -583,9 +583,9 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
// We want to rotate and shift all extrusions (gcode postprocessing) and starting and ending position
|
// We want to rotate and shift all extrusions (gcode postprocessing) and starting and ending position
|
||||||
float alpha = m_wipe_tower_rotation / 180.f * float(M_PI);
|
float alpha = m_wipe_tower_rotation / 180.f * float(M_PI);
|
||||||
|
|
||||||
auto transform_wt_pt = [&alpha, this](const Vec2f& pt) -> Vec2f {
|
auto transform_wt_pt = [&alpha, this](const Vec2f& pt,bool rib_offset=true) -> Vec2f {
|
||||||
Vec2f out = Eigen::Rotation2Df(alpha) * pt;
|
Vec2f out = Eigen::Rotation2Df(alpha) * pt;
|
||||||
out += m_wipe_tower_pos + m_rib_offset;
|
out += m_wipe_tower_pos + (rib_offset? m_rib_offset:Vec2f(0.f,0.f));
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -824,7 +824,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
avoid_bbx = scaled(m_wipe_tower_bbx);
|
avoid_bbx = scaled(m_wipe_tower_bbx);
|
||||||
Polygon avoid_points = avoid_bbx.polygon();
|
Polygon avoid_points = avoid_bbx.polygon();
|
||||||
for (auto& p : avoid_points.points) {
|
for (auto& p : avoid_points.points) {
|
||||||
Vec2f pp = transform_wt_pt(unscale(p).cast<float>());
|
Vec2f pp = transform_wt_pt(unscale(p).cast<float>(),false);
|
||||||
p = wipe_tower_point_to_object_point(gcodegen, pp + plate_origin_2d);
|
p = wipe_tower_point_to_object_point(gcodegen, pp + plate_origin_2d);
|
||||||
}
|
}
|
||||||
avoid_bbx = BoundingBox(avoid_points.points);
|
avoid_bbx = BoundingBox(avoid_points.points);
|
||||||
|
|
|
@ -190,6 +190,7 @@ public:
|
||||||
BoundingBoxf get_bbx() const {
|
BoundingBoxf get_bbx() const {
|
||||||
BoundingBox box = get_extents(m_outer_wall.front());
|
BoundingBox box = get_extents(m_outer_wall.front());
|
||||||
BoundingBoxf res = BoundingBoxf(unscale(box.min), unscale(box.max));
|
BoundingBoxf res = BoundingBoxf(unscale(box.min), unscale(box.max));
|
||||||
|
res.translate(m_rib_offset.cast<double>());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
Polylines get_outer_wall() const {
|
Polylines get_outer_wall() const {
|
||||||
|
|
|
@ -2287,9 +2287,9 @@ std::vector<Point> Print::first_layer_wipe_tower_corners(bool check_wipe_tower_e
|
||||||
if (check_wipe_tower_existance && (!has_wipe_tower() || m_wipe_tower_data.tool_changes.empty()))
|
if (check_wipe_tower_existance && (!has_wipe_tower() || m_wipe_tower_data.tool_changes.empty()))
|
||||||
return corners;
|
return corners;
|
||||||
{
|
{
|
||||||
double width = m_config.prime_tower_width + 2*m_wipe_tower_data.brim_width;
|
double width = m_wipe_tower_data.bbx.max.x() - m_wipe_tower_data.bbx.min.x();
|
||||||
double depth = m_wipe_tower_data.depth + 2*m_wipe_tower_data.brim_width;
|
double depth = m_wipe_tower_data.bbx.max.y() -m_wipe_tower_data.bbx.min.y();
|
||||||
Vec2d pt0(-m_wipe_tower_data.brim_width, -m_wipe_tower_data.brim_width);
|
Vec2d pt0 = m_wipe_tower_data.bbx.min;
|
||||||
for (Vec2d pt : {
|
for (Vec2d pt : {
|
||||||
pt0,
|
pt0,
|
||||||
Vec2d(pt0.x()+width, pt0.y() ),
|
Vec2d(pt0.x()+width, pt0.y() ),
|
||||||
|
|
Loading…
Reference in New Issue