Enabled the C++ fillers for all infills, not just the supports.

Made sure the C++ fillers are instantiated at the worker threads,
where there are being released.
Extended the FillRectilinear2 to calculate the contour / line intersection
with exact arithmetics, improved robustness and added error handling
and error reporting, if the contours to be filled are not correct.
This commit is contained in:
bubnikv 2016-10-20 17:44:46 +02:00
parent f788f50b5a
commit 9e4edcd8ec
11 changed files with 314 additions and 172 deletions

View file

@ -36,7 +36,9 @@ sub make_fill {
foreach my $layerm (@{$self->regions}) {
$layerm->fills->clear;
$layerm->fills->append($_) for $self->object->fill_maker->make_fill($layerm);
# Fearlessly enable the C++ fillers.
$layerm->fills->append($_) for $self->object->fill_maker2->make_fill($layerm);
# $layerm->fills->append($_) for $self->object->fill_maker->make_fill($layerm);
}
}

View file

@ -647,11 +647,6 @@ sub generate_toolpaths {
$pattern = 'honeycomb';
}
my %fillers = (
interface => $object->fill_maker2->filler('rectilinear'),
support => $object->fill_maker2->filler($pattern),
);
my $interface_angle = $self->object_config->support_material_angle + 90;
my $interface_spacing = $self->object_config->support_material_interface_spacing + $interface_flow->spacing;
my $interface_density = $interface_spacing == 0 ? 1 : $interface_flow->spacing / $interface_spacing;
@ -762,6 +757,13 @@ sub generate_toolpaths {
$layer->support_interface_fills->append(@loops);
}
# Allocate the fillers exclusively in the worker threads! Don't allocate them at the main thread,
# as Perl copies the C++ pointers by default, so then the C++ objects are shared between threads!
my %fillers = (
interface => $object->fill_maker2->filler('rectilinear'),
support => $object->fill_maker2->filler($pattern),
);
# interface and contact infill
if (@$interface || @$contact_infill) {