FIX: large unarrangable objects may overlap with bed boundary
large unarrangable objects may overlap with bed boundary in auto-arranging Change-Id: Ie98aa96fb26cc819d1bb38ad0fc316f99423393c (cherry picked from commit 3caf447a62e4dec5f56807c9f86a351db8fff5a7)
This commit is contained in:
parent
abddb1edc3
commit
c6d6784070
|
@ -3580,10 +3580,15 @@ void PartPlateList::postprocess_arrange_polygon(arrangement::ArrangePolygon& arr
|
||||||
{
|
{
|
||||||
if (arrange_polygon.bed_idx == -1)
|
if (arrange_polygon.bed_idx == -1)
|
||||||
{
|
{
|
||||||
//outarea for large object
|
// outarea for large object
|
||||||
arrange_polygon.bed_idx = m_plate_list.size();
|
arrange_polygon.bed_idx = m_plate_list.size();
|
||||||
arrange_polygon.translation(X) = scaled<double>(0.5 * plate_stride_x());
|
BoundingBox apbox(arrange_polygon.poly);
|
||||||
arrange_polygon.translation(Y) = scaled<double>(0.5 * plate_stride_y());
|
auto apbox_size = apbox.size();
|
||||||
|
|
||||||
|
//arrange_polygon.translation(X) = scaled<double>(0.5 * plate_stride_x());
|
||||||
|
//arrange_polygon.translation(Y) = scaled<double>(0.5 * plate_stride_y());
|
||||||
|
arrange_polygon.translation(X) = 0.5 * apbox_size[0];
|
||||||
|
arrange_polygon.translation(Y) = scaled<double>(static_cast<double>(m_plate_depth)) - 0.5 * apbox_size[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
arrange_polygon.row = arrange_polygon.bed_idx / m_plate_cols;
|
arrange_polygon.row = arrange_polygon.bed_idx / m_plate_cols;
|
||||||
|
|
Loading…
Reference in New Issue