Merged support_fills with support_interface_fills.

When extruding supports, the support is interleaved with interface
if possible (when extruded with the same extruder).
Otherwise the base is extruded first.
This commit is contained in:
bubnikv 2017-04-07 17:37:30 +02:00
parent c40de7e424
commit ed2ee2f6f3
22 changed files with 177 additions and 154 deletions

View file

@ -12,15 +12,15 @@
%code{% RETVAL = THIS->clone(); %};
void reverse();
void clear();
ExtrusionEntityCollection* chained_path(bool no_reverse)
ExtrusionEntityCollection* chained_path(bool no_reverse, ExtrusionRole role = erMixed)
%code{%
RETVAL = new ExtrusionEntityCollection();
THIS->chained_path(RETVAL, no_reverse);
THIS->chained_path(RETVAL, no_reverse, role);
%};
ExtrusionEntityCollection* chained_path_from(Point* start_near, bool no_reverse)
ExtrusionEntityCollection* chained_path_from(Point* start_near, bool no_reverse, ExtrusionRole role = erMixed)
%code{%
RETVAL = new ExtrusionEntityCollection();
THIS->chained_path_from(*start_near, RETVAL, no_reverse);
THIS->chained_path_from(*start_near, RETVAL, no_reverse, role);
%};
Clone<Point> first_point();
Clone<Point> last_point();
@ -100,13 +100,5 @@ ExtrusionEntityCollection::no_sort(...)
OUTPUT:
RETVAL
ExtrusionEntityCollection*
ExtrusionEntityCollection::chained_path_indices(bool no_reverse)
CODE:
RETVAL = new ExtrusionEntityCollection();
THIS->chained_path(RETVAL, no_reverse, &RETVAL->orig_indices);
OUTPUT:
RETVAL
%}
};

View file

@ -27,6 +27,8 @@
%code{% THIS->clip_end(distance, &RETVAL); %};
bool has_overhang_point(Point* point)
%code{% RETVAL = THIS->has_overhang_point(*point); %};
ExtrusionRole role() const;
ExtrusionLoopRole loop_role() const;
bool is_perimeter();
bool is_infill();
bool is_solid_infill();
@ -46,16 +48,6 @@ ExtrusionLoop::arrayref()
OUTPUT:
RETVAL
ExtrusionLoopRole
ExtrusionLoop::role(...)
CODE:
if (items > 1) {
THIS->role = (ExtrusionLoopRole)SvUV(ST(1));
}
RETVAL = THIS->role;
OUTPUT:
RETVAL
%}
};

View file

@ -22,6 +22,7 @@
void clip_end(double distance);
void simplify(double tolerance);
double length();
ExtrusionRole role() const;
bool is_perimeter();
bool is_infill();
bool is_solid_infill();
@ -57,16 +58,6 @@ ExtrusionPath::polyline(...)
OUTPUT:
RETVAL
ExtrusionRole
ExtrusionPath::role(...)
CODE:
if (items > 1) {
THIS->role = (ExtrusionRole)SvUV(ST(1));
}
RETVAL = THIS->role;
OUTPUT:
RETVAL
double
ExtrusionPath::mm3_per_mm(...)
CODE:
@ -143,6 +134,7 @@ _constant()
EXTR_ROLE_SKIRT = erSkirt
EXTR_ROLE_SUPPORTMATERIAL = erSupportMaterial
EXTR_ROLE_SUPPORTMATERIAL_INTERFACE = erSupportMaterialInterface
EXTR_ROLE_MIXED = erMixed
PROTOTYPE:
CODE:
RETVAL = ix;

View file

@ -181,6 +181,7 @@
%code{% RETVAL = THIS->extrude(*multipath, description, speed); %};
%name{extrude_path} std::string extrude(ExtrusionPath* path, std::string description = "", double speed = -1)
%code{% RETVAL = THIS->extrude(*path, description, speed); %};
std::string extrude_support(ExtrusionEntityCollection *support_fills, unsigned int extruder_id);
std::string travel_to(Point* point, ExtrusionRole role, std::string comment)
%code{% RETVAL = THIS->travel_to(*point, role, comment); %};
bool needs_retraction(Polyline* travel, ExtrusionRole role = erNone)

View file

@ -110,9 +110,6 @@
%code%{ RETVAL = &THIS->support_islands; %};
Ref<ExtrusionEntityCollection> support_fills()
%code%{ RETVAL = &THIS->support_fills; %};
Ref<ExtrusionEntityCollection> support_interface_fills()
%code%{ RETVAL = &THIS->support_interface_fills; %};
// copies of some Layer methods, because the parameter wrapper code
// gets confused about getting a Layer::Support instead of a Layer