mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue