ENH: optimize speed of exporting gcode
Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I70caed8664a647a98a0434dd62d329977e0feaaa
This commit is contained in:
parent
4e43ad8c2a
commit
58bed3e60d
|
@ -92,6 +92,12 @@ bool ExPolygon::contains(const Line &line) const
|
||||||
|
|
||||||
bool ExPolygon::contains(const Polyline &polyline) const
|
bool ExPolygon::contains(const Polyline &polyline) const
|
||||||
{
|
{
|
||||||
|
BoundingBox bbox1 = get_extents(*this);
|
||||||
|
BoundingBox bbox2 = get_extents(polyline);
|
||||||
|
bbox2.inflated(1);
|
||||||
|
if (!bbox1.overlap(bbox2))
|
||||||
|
return false;
|
||||||
|
|
||||||
return diff_pl(polyline, *this).empty();
|
return diff_pl(polyline, *this).empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue