Commit Graph

101 Commits

Author SHA1 Message Date
Vojtech Bubnik
b7ebee01aa Refactoring of adaptive cubic infill:
Don't create an octree for the infill if it is not needed.
2020-09-09 15:55:06 +02:00
Lukáš Hejl
9883850bc6 Enable changing adaptive infill density for different objects 2020-09-03 23:15:46 +02:00
Lukáš Hejl
bd95963b64 Change to using raw_mesh instead of mesh 2020-09-03 16:08:40 +02:00
Lukáš Hejl
fb7cf3dc48 Octree's first cube depends on model size. 2020-09-03 08:04:05 +02:00
Lukáš Hejl
f43b8b1c0f Change in passing octree struct 2020-09-02 22:53:10 +02:00
Lukáš Hejl
1f2d71fac3 Fix wrong data type 2020-08-31 08:49:17 +02:00
Lukáš Hejl
7363156063 Fix crash on inconsistent input 2020-08-30 20:38:07 +02:00
Lukáš Hejl
e4aea124cf Building octree based on distance from mesh 2020-08-26 18:15:59 +02:00
Lukas Matena
a56e5da6f9 Fix of custom supports: object offset for Clipper was incorrectly accounted for 2020-08-12 11:28:30 +02:00
Lukas Matena
99cbfb7545 Fixes of two crashes in paint-on supports 2020-08-12 11:08:10 +02:00
Lukas Matena
12d98572e5 TriangleSelector: bugfix - backend did not correctly account for mirrorring 2020-07-24 17:47:16 +02:00
Lukas Matena
abe1cf6c61 TriangleSelector: backend is aware of divided triangles 2020-07-24 17:47:16 +02:00
enricoturri1966
5e3f097d5b Attempt to fix crash on Mac when rotating an object while layer editing is active 2020-07-13 13:16:18 +02:00
Vojtech Bubnik
9b7e2216e0 Fixes of the offset curves from Voronoi diagram.
The offset curve extractor is already quite usable,
though singular cases are still not covered yet
when the offset curve intersects or nearly intersects
a Voronoi vertex.

Removal of the PRINTF_ZU "%zu" Visual Studio printf compatibility macro.
Fixes of a contours self intersection test for collinear segments.
SVG exporter now exports white background, so that the GNOME Eye viewer is usable.
2020-06-16 13:15:48 +02:00
Lukas Matena
ae8772b90d Few more include chains broken 2020-05-26 13:46:59 +02:00
bubnikv
41d69e546b Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2020-04-28 19:31:18 +02:00
Lukas Matena
9ac1bfd9be Custom support blockers are now working 2020-04-27 17:45:55 +02:00
Lukas Matena
ea8724a3ad Fixing debug build broken after recent merge 2020-04-27 12:15:45 +02:00
bubnikv
805cc03894 Introduction of Monotonous infill type. Fill no-sort only for monotonous
and ironing infills.
2020-04-25 08:15:04 +02:00
Lukas Matena
b13efbcc81 Optimization of the custom support projection algorithm
- transformation matrix is precalculated for each volume
- number of heap allocations was reduced
2020-04-24 01:26:13 +02:00
Lukas Matena
399d017bb0 Custom supports projection now runs in parallel 2020-04-22 16:08:36 +02:00
Lukas Matena
2277954737 Custom support generation now ignores triangles with upward-pointing normal 2020-04-22 14:01:29 +02:00
Lukas Matena
49504ea169 Fixed a logic error in the algorithm
The error created extremely large projections of triangles that were close to horizontal
2020-04-22 10:11:42 +02:00
Lukas Matena
455a0f42ed Moved the projection function into PrintObject.cpp 2020-04-21 13:50:47 +02:00
bubnikv
9db59a3cd7 WIP: Ironing over top surfaces. 2020-04-14 11:53:28 +02:00
bubnikv
0841ef6ee8 Fix of infill type update with vase mode enabled after change
of the number of bottom layers.
related to [2.2.1-RC] Vase mode prints base no matter what #3823
2020-03-14 11:59:50 +01:00
bubnikv
be53c95dee Fixed a bug, where the top or bottom solid layers were created even
if the number of top / bottom solid layers was set to zero while
the top / bottom minimum shell thickess was set nonzero.

With this commit, if the top / bottom solid layers is set to zero,
there are no top / bottom solid layers generated independent from
the minimum top / bottom shell thickness.
2020-02-18 15:44:01 +01:00
bubnikv
987ed01f56 Fixed a bug in the update of the backend when the Spiral Vase option
is enabled / disabled.

Spiral Vase forces different kind of slicing than the normal model:
In Spiral Vase mode, holes are closed and only the largest area contour is kept at each layer.
Therefore toggling the Spiral Vase on / off requires complete reslicing.

This commit moves the update to the correct location.
2020-02-09 13:56:42 +01:00
bubnikv
a18443cca5 Fixed unit tests broken with the previous commit (Spiral Vase fix).
Fixed a crash in the previous commit.
2020-02-09 09:43:15 +01:00
bubnikv
a394d821a6 Spiral vase improvements and bugfixes.
Fixes Connecting / expanding Bottom Layers to Vase Perimeter #253
Fixes Slicing error in vase mode #452
Fixes Slicing Issue (Vase Mode, 0.6mm dmr nozzle) #1887
Fixes Top fill pattern isn't used in spiral vase mode #2533
Fixes Cisar's vase doesn't slice correctly, creates artefacts #3595

When the model is sliced, all the contours are newly oriented
counter-clockwise (even holes), merged and then only the largest area
contour is retained. In perimeter generator, if the largest contour
splits into multiple perimeters, newly only the largest area perimeter
is retained in spiral vase mode. These two changes solve #3595 and similar.

The infill is newly calculated only for the bottom solid layers
if the spiral vase mode is active (removes various unwanted infill
along the vase walls), and the last bottom solid layer is switched
to a top solid pattern (solves #2533).

The thin walls are newly enforced to be disabled in spiral vase mode,
and the "ensure vertical shell wall" is enforced in spiral vase mode
to extend the bottom of the vase to the vase hull (fixes #253).
2020-02-08 21:36:43 +01:00
bubnikv
0e97237dcd Fixed a bug in validation of the FDM Print to check for extruder
collisions against already printed objects: Rotation of an object
was not being taken into account.
Fixes #2450 PrusaSlicer 2.0 Sequential printing vs rotate object
Fixes #3585 Always Sequential Printing Error (Regardless of setting, placement or object size)

Fixed some collisions in sequential print just after arrangement by
making the validation using a slightly lower extruder radius value
than the arrangement.

Refactored PrintObject coordinate system so that the PrintObject's
coordinate system is always centered in respect to its ModelObject's
geometries. This refactoring may improve path planning a bit and
it may lower the requirements on bits representing Clipper coordinates
by 1 bit.
2020-02-07 14:10:27 +01:00
bubnikv
aeaa0913c8 Implemented top_solid_min_thickness / bottom_solid_min_thickness.
The two new config keys define a minimum vertical shell thickness.
The top shell thickness is calculated as a maximum of sum over
top_solid_layers * layer heights and top_solid_min_thickness,
the bottom shell thickness is calculated as a maximum of sum over
bottom_solid_layers * layer heights and bottom_solid_min_thickness.

The results of the formula above are shown at the Print parameter page
below the two new values to hint the user about the interaction
of the old versus new config values.

top_solid_min_thickness has no meaning if top_solid_layers is zero,
bottom_solid_min_thickness has no meaning if bottom_solid_layers is zero.
2020-02-05 16:53:48 +01:00
bubnikv
6687c029e8 Fixed regression of 71fa411100
where the PrintObject bounding box was not invalidated correctly
when the transformation matrices of instances changed.

Also refactored PrintObject::size() for const correctness.
2020-01-30 12:22:30 +01:00
bubnikv
d6baece45b Fix of 2.2.0-A3: Sequential Printing: Wrong location after slicing #3570
This is a regression from 71fa411
2020-01-24 17:11:14 +01:00
bubnikv
ec31ef90e9 Refactored PrintObject::m_copies to PrintInstances,
so that the ordering code at G-code export may work directly with
pointers to PrintInstances instead of with pair of <PrintObject, copy idx>.
Also the PrintInstance knows its source ModelInstance, which allows
sorting of PrintInstances for sequential printing in the order
they appear in Plater's object list.
2020-01-23 09:53:06 +01:00
bubnikv
744f1721f6 Fix of "Don't use bridging perimeters on top of elephant-foot compensation #3011"
If the Elephant foot compensation is applied to the 1st object's layer,
the uncompensated 1st object's slice is newly used for calculation
of bridges, overhans, skirt, brim, raft and supports.

Layer::slices were renamed to Layer::lslices to simplify reading
of the code, to differentiate from LayerRegion::slices.
2020-01-03 14:07:31 +01:00
Enrico Turri
57fa4193f6 Adaptive layer height profile -> Added Adaptive button to imgui dialog 2019-11-12 14:18:43 +01:00
Enrico Turri
efc7453656 1) Added new tech ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE
2) Imgui dialog replaces texture for reset button and tooltip when layer editing is active
2019-11-07 15:55:45 +01:00
bubnikv
28d7ab2e90 Only enable Elphant foot compensation if printing directly
on the print bed (raft is disabled).
2019-11-04 11:34:33 +01:00
bubnikv
8567edf464 Bugfixes of the new adaptive elephant foot compensation. 2019-11-04 11:26:36 +01:00
bubnikv
36d0f8acc8 adaptive elpehant foot compensation, fixing
GH issues #1757 #2085 #2132 #2423 #2502 #2156 #2773 #2828 #2998 #3001
2019-11-01 19:59:09 +01:00
bubnikv
d72d96a1fe FDM Print refactoring:
Layer newly remembers bounding boxes of slices,
the bounding boxes are used by G-code generator & newly the support
generator.
Slices are stored as ExPolygons, not ExPolygonCollection.
2019-10-01 17:17:08 +02:00
bubnikv
07c1cafe26 Fixed a crash with a layer range modifier containing no slicing layer. 2019-10-01 13:41:22 +02:00
bubnikv
30f0e9b4d3 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-09-27 09:52:57 +02:00
bubnikv
5e0e360e07 WIP: Consolidation of shortest path calculations,
various chaining algorithms are replaced with the improved TSP
algorithm.
2019-09-26 17:30:03 +02:00
Lukas Matena
a34a1341c5 Whitespace changes to supress misleading indentation warnings
These appear in newer gcc when spaces and tabs are mixed
2019-09-24 16:01:01 +02:00
bubnikv
58d12a680e Fix of "Bridge flow ratio doesn't trigger reslicing of support" #2359 2019-09-09 18:09:40 +02:00
bubnikv
ccb4584be7 Fix of "Strange behavior on bridge detection" #1482
The very first slicing step needs to be invalidated if support is
enabled or disabled while the soluble supports are configured,
as the bridging is disabled for soluble supports, while the bridging
is enabled with supports disabled.
2019-09-09 17:47:29 +02:00
bubnikv
6987c081e4 Replaced Perl style infill type enums with C++ enums in comments. 2019-09-09 16:47:15 +02:00
bubnikv
d42505d374 Fix of "excess infill below bridges with 0% infill" #442
Fix of "Bridging infill not connecting with infill set to 0%" #1301

Top, bottom and bridging areas are extended into infill as long
as the infill is not zero. If the infill is zero,
top, bottom and bridging areas wound not expand into these "void" areas.

With this commit, the top, bottom and bridging areas are allowed to expand
into the "void" areas as long as these "void" areas are supported below
with perimeters or some other non-empty infill, and slightly beyond
these supporting areas into the voids (currently hard coded to 1mm).
2019-09-06 15:03:49 +02:00