mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Fixed one more case where only_retract_when_crossing_perimeters didn't apply. #2498
This commit is contained in:
parent
0f7933c4f9
commit
7e82159620
6 changed files with 30 additions and 1 deletions
|
@ -352,7 +352,8 @@ sub travel_to {
|
||||||
&& $self->config->fill_density > 0
|
&& $self->config->fill_density > 0
|
||||||
&& defined($self->layer)
|
&& defined($self->layer)
|
||||||
&& ($self->layer->any_internal_region_slice_contains_line($travel)
|
&& ($self->layer->any_internal_region_slice_contains_line($travel)
|
||||||
|| $self->layer->any_internal_region_fill_surface_contains_line($travel)))
|
|| ($self->layer->any_bottom_region_slice_contains_line($travel)
|
||||||
|
&& (!defined $self->layer->upper_layer || $self->layer->upper_layer->slices->contains_line($travel)))))
|
||||||
|| (defined $role && $role == EXTR_ROLE_SUPPORTMATERIAL && $self->layer->support_islands->contains_line($travel))
|
|| (defined $role && $role == EXTR_ROLE_SUPPORTMATERIAL && $self->layer->support_islands->contains_line($travel))
|
||||||
) {
|
) {
|
||||||
# Just perform a straight travel move without any retraction.
|
# Just perform a straight travel move without any retraction.
|
||||||
|
|
|
@ -131,6 +131,17 @@ Layer::any_internal_region_slice_contains(const T &item) const
|
||||||
}
|
}
|
||||||
template bool Layer::any_internal_region_slice_contains<Line>(const Line &item) const;
|
template bool Layer::any_internal_region_slice_contains<Line>(const Line &item) const;
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
bool
|
||||||
|
Layer::any_bottom_region_slice_contains(const T &item) const
|
||||||
|
{
|
||||||
|
FOREACH_LAYERREGION(this, layerm) {
|
||||||
|
if ((*layerm)->slices.any_bottom_contains(item)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
template bool Layer::any_bottom_region_slice_contains<Line>(const Line &item) const;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
bool
|
bool
|
||||||
Layer::any_internal_region_fill_surface_contains(const T &item) const
|
Layer::any_internal_region_fill_surface_contains(const T &item) const
|
||||||
|
|
|
@ -94,6 +94,7 @@ class Layer {
|
||||||
|
|
||||||
void make_slices();
|
void make_slices();
|
||||||
template <class T> bool any_internal_region_slice_contains(const T &item) const;
|
template <class T> bool any_internal_region_slice_contains(const T &item) const;
|
||||||
|
template <class T> bool any_bottom_region_slice_contains(const T &item) const;
|
||||||
template <class T> bool any_internal_region_fill_surface_contains(const T &item) const;
|
template <class T> bool any_internal_region_fill_surface_contains(const T &item) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -80,6 +80,17 @@ SurfaceCollection::any_internal_contains(const T &item) const
|
||||||
template bool SurfaceCollection::any_internal_contains<Line>(const Line &item) const;
|
template bool SurfaceCollection::any_internal_contains<Line>(const Line &item) const;
|
||||||
template bool SurfaceCollection::any_internal_contains<Polyline>(const Polyline &item) const;
|
template bool SurfaceCollection::any_internal_contains<Polyline>(const Polyline &item) const;
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
bool
|
||||||
|
SurfaceCollection::any_bottom_contains(const T &item) const
|
||||||
|
{
|
||||||
|
for (Surfaces::const_iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) {
|
||||||
|
if (surface->is_bottom() && surface->expolygon.contains(item)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
template bool SurfaceCollection::any_bottom_contains<Line>(const Line &item) const;
|
||||||
|
|
||||||
SurfacesPtr
|
SurfacesPtr
|
||||||
SurfaceCollection::filter_by_type(SurfaceType type)
|
SurfaceCollection::filter_by_type(SurfaceType type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@ class SurfaceCollection
|
||||||
void simplify(double tolerance);
|
void simplify(double tolerance);
|
||||||
void group(std::vector<SurfacesPtr> *retval);
|
void group(std::vector<SurfacesPtr> *retval);
|
||||||
template <class T> bool any_internal_contains(const T &item) const;
|
template <class T> bool any_internal_contains(const T &item) const;
|
||||||
|
template <class T> bool any_bottom_contains(const T &item) const;
|
||||||
SurfacesPtr filter_by_type(SurfaceType type);
|
SurfacesPtr filter_by_type(SurfaceType type);
|
||||||
void filter_by_type(SurfaceType type, Polygons* polygons);
|
void filter_by_type(SurfaceType type, Polygons* polygons);
|
||||||
};
|
};
|
||||||
|
|
|
@ -71,6 +71,8 @@
|
||||||
void make_slices();
|
void make_slices();
|
||||||
bool any_internal_region_slice_contains_line(Line* line)
|
bool any_internal_region_slice_contains_line(Line* line)
|
||||||
%code%{ RETVAL = THIS->any_internal_region_slice_contains(*line); %};
|
%code%{ RETVAL = THIS->any_internal_region_slice_contains(*line); %};
|
||||||
|
bool any_bottom_region_slice_contains_line(Line* line)
|
||||||
|
%code%{ RETVAL = THIS->any_bottom_region_slice_contains(*line); %};
|
||||||
bool any_internal_region_fill_surface_contains_line(Line* line)
|
bool any_internal_region_fill_surface_contains_line(Line* line)
|
||||||
%code%{ RETVAL = THIS->any_internal_region_fill_surface_contains(*line); %};
|
%code%{ RETVAL = THIS->any_internal_region_fill_surface_contains(*line); %};
|
||||||
bool any_internal_region_fill_surface_contains_polyline(Polyline* polyline)
|
bool any_internal_region_fill_surface_contains_polyline(Polyline* polyline)
|
||||||
|
@ -123,6 +125,8 @@
|
||||||
|
|
||||||
bool any_internal_region_slice_contains_line(Line* line)
|
bool any_internal_region_slice_contains_line(Line* line)
|
||||||
%code%{ RETVAL = THIS->any_internal_region_slice_contains(*line); %};
|
%code%{ RETVAL = THIS->any_internal_region_slice_contains(*line); %};
|
||||||
|
bool any_bottom_region_slice_contains_line(Line* line)
|
||||||
|
%code%{ RETVAL = THIS->any_bottom_region_slice_contains(*line); %};
|
||||||
bool any_internal_region_fill_surface_contains_line(Line* line)
|
bool any_internal_region_fill_surface_contains_line(Line* line)
|
||||||
%code%{ RETVAL = THIS->any_internal_region_fill_surface_contains(*line); %};
|
%code%{ RETVAL = THIS->any_internal_region_fill_surface_contains(*line); %};
|
||||||
bool any_internal_region_fill_surface_contains_polyline(Polyline* polyline)
|
bool any_internal_region_fill_surface_contains_polyline(Polyline* polyline)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue