Commit Graph

63 Commits

Author SHA1 Message Date
Vojtech Bubnik
08bc063f66 Extracted MedialAxis code from Geometry.cpp/hpp, moved to its own
files to Geometry/
Moved other Voronoi files to Geometry/
2021-10-27 16:03:04 +02:00
Vojtech Bubnik
0292826482 New code for minimum enclosing circle by randomized Welzl algorithm.
Split the circle code from Geometry.cpp/hpp to Geometry/Circle.cpp,hpp
2021-10-27 15:12:29 +02:00
Vojtech Bubnik
2cc52fa9fb Renamed Geometry::intersect() to Geometry::convex_polygons_intersect()
to convey its true meaning.
2021-10-23 15:29:18 +02:00
enricoturri1966
a7ea88befb Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-05 15:33:37 +02:00
tamasmeszaros
9cec27da12 Minor performance optimization for convex intersection algo 2021-10-05 13:31:09 +02:00
enricoturri1966
1f3f0363d2 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-04 15:04:34 +02:00
tamasmeszaros
30aa248234 Don't report intersection if two polygons are only touching. 2021-10-04 14:16:13 +02:00
enricoturri1966
bdbadca1ec Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-04 13:07:53 +02:00
tamasmeszaros
476ff563c5 Fix compile issues and overlapping polygon fails 2021-10-01 18:27:37 +02:00
Lukas Matena
59c982c5ea Revert "Merge branch 'tm_convex_intersect_rotcalip'"
This reverts commit 627d8bcaef, reversing
changes made to 66d4462724.

The change breaks build on mac
2021-09-30 16:49:00 +02:00
tamasmeszaros
e1ea6fcd5c Fast convex polygon intersection test with rotating calipers 2021-09-30 15:49:12 +02:00
enricoturri1966
d383c0ccf4 Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Out of bed detection for circular printbeds 2021-09-21 13:51:57 +02:00
Lukas Matena
55658979b7 Fixed two more locales-related issues
One warning was also fixed
2021-06-07 12:31:41 +02:00
Vojtech Bubnik
8ac1d7f263 Fixing some compiler warnings 2021-05-25 20:46:31 +02:00
Vojtech Bubnik
3b388024f1 Factored out convex hull calculation from ModelObject::convex_hull_2d()
to Geometry::convex_hull().
Update Geometry::convex_hull() to handle duplicate points.
2021-05-19 13:23:19 +02:00
Vojtech Bubnik
23b9a66197 Removing offset2 from Perl bindings and other minor cleanup. 2021-05-06 14:29:20 +02:00
Vojtech Bubnik
1b6534d5ac Clipper / ClipperUtils:
1) Let Clipper use int32_t for representing its coordinates. This
   reduces memory and allows to skip conversion between Slic3r Polygon
   and Clipper polygon.
2) Disable additional offset before executing the Clipper Offset algorithm.
   We don't see any reason for that and it required 64bit Clipper coordinates,
   which were disabled with 1).
2021-04-13 11:31:54 +02:00
Vojtech Bubnik
3a0f9b7b99 Bumping up wxWidgets to 3.1.4-patched on all platforms. 2021-03-01 11:36:11 +01:00
Vojtech Bubnik
ac88edc636 Fix of Place on face:
1) Decreased "gimbal lock" epsilon 10x
2) Got rid of unnecessary back and forth conversions which led to numerical inacurracies

This should fix issues #5172, #5011 and #5398
2020-12-09 06:20:41 +01:00
Vojtech Bubnik
e87e859baa 1) Implemented anchoring of infill lines to perimeters with length
limited anchors, while before a full perimeter segment was always
   taken if possible.
2) Adapted the line infills (grid, stars, triangles, cubic) to 1).
   This also solves a long standing issue of these infills producing
   anchors for each sweep direction independently, thus possibly
   overlapping and overextruding, which was quite detrimental
   in narrow areas.
3) Refactored cubic adaptive infill anchroing algorithm
   for performance and clarity.
2020-11-05 17:32:40 +01:00
Vojtech Bubnik
f58ee46687 WIP Refactoring of exceptions:
1) All slicer's exceptions are now derived from Slic3r::Exception.
2) New exceptions are defined for slicing errors.
3) Exceptions are propagated to the Plater to show.
It remains to modify the slicing back-end to throw the new SlicingError
exceptions instead of std::runtime_error and to show the other exceptions
by a message dialog instead of a notification.
2020-09-14 18:03:22 +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
bubnikv
e9c9dc7ff8 Improved accuracy of ModelVolume matrix store / restore
into the 3MF / AMF.
Improved accuracy of ModelVolume's mesh transform back from Object's
coordinate space to its own coordinate space after reloading
from 3MF / AMF.
2019-12-19 12:27:49 +01:00
bubnikv
3444be4171 Fix of Voronoi debug output. 2019-10-23 15:07:41 +02:00
bubnikv
bb90be9e30 Added missing include (worked on MSVC) 2019-10-15 09:49:33 +02:00
bubnikv
1a51fb7ad8 Added test projects for libslic3r and fff_print.
Added test_geometry.cpp from upstream slic3r, thanks @lordofhyphens
Added circle_taubin_newton() for circle center calculation, thanks @lordofhyphens
2019-10-15 09:40:40 +02:00
Enrico Turri
d3c337b69a Fixed conflicts after merging with master 2019-10-09 11:17:48 +02:00
bubnikv
ce217b6222 Rest of the path chaining has been replaced with the new algorithm.
PolylineCollection.cpp/hpp was removed, use Polylines instead.
Various first_point() / last_point() now return references, not copies.
2019-09-27 18:17:21 +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
Enrico Turri
03507f9b7d ENABLE_ENHANCED_RELOAD_FROM_DISK set as default 2019-09-23 15:35:49 +02:00
Enrico Turri
5918bbf2b6 ENABLE_ENHANCED_RELOAD_FROM_DISK
1) Modified .zip.amf import/export to save/load volume matrices and source data

2) Incremented .zip.amf version to 3
2019-09-19 12:39:59 +02:00
Lukas Matena
9bbe65c53e Fixed warnings in libslic3r 2019-06-25 16:04:29 +02:00
Enrico Turri
6d37e444da #2428
1) Reworked logic for pasting volumes

2) Fixed paste of volumes into different objects

3) Do not apply offset when pasting into the copied object

4) Keep source transformation matrix and relative positions when copy/pasting volumes into another object
2019-06-24 12:26:11 +02:00
Enrico Turri
278f380fe7 Tech ENABLE_NEW_EULER_ANGLES set as default 2019-05-21 10:16:44 +02:00
Enrico Turri
91fd56429c Tech ENABLE_VOLUMES_CENTERING_FIXES set as default 2019-05-21 09:42:59 +02:00
bubnikv
9ab83d31bc Fixed rotation of SLA instances in case a rotation in X or Y was applied
to the instances.
2019-04-08 13:35:03 +02:00
Enrico Turri
ddc4092869 Fix of #1782 2019-02-07 09:22:04 +01:00
Enrico Turri
252861aa65 Fix of rotations using sidebar fields 2019-01-29 11:26:35 +01:00
bubnikv
3e7cec0ce5 Merge remote-tracking branch 'remotes/origin/objects_centering' 2019-01-28 10:25:41 +01:00
bubnikv
a4feec906d WIP: Optimization of the object's 2D convex silhouette for arrangement,
not working yet.
2019-01-28 10:10:23 +01:00
bubnikv
8bf692a640 WIP synchronization of Z rotation of the instances 2019-01-28 08:52:22 +01:00
Enrico Turri
de2fd21289 Fixed import of volumes from .amf 2019-01-25 12:58:55 +01:00
Enrico Turri
369391303b Tweak to euler angles euristic 2019-01-25 12:46:45 +01:00
Enrico Turri
98c34827f3 Another iteration on euler angles and instances synchronization 2019-01-24 10:04:39 +01:00
Enrico Turri
cb1f7e8aa6 Fixed unselected instance synchronization when rotating using rotate gizmo 2019-01-23 11:08:18 +01:00
Enrico Turri
6f489a0dc9 Euler angles calculated as described in http://www.gregslabaugh.net/publications/euler.pdf 2019-01-23 09:12:22 +01:00
Enrico Turri
05b6ed498a Code cleanup 2019-01-21 11:29:45 +01:00
Enrico Turri
5eb66728bb 1st installment of volumes centering fixes (WIP) 2019-01-18 12:52:09 +01:00
Enrico Turri
65d8b90473 Fixed rotation of single volumes inside a rotated instance using rotate gizmo 2019-01-15 12:24:32 +01:00
Enrico Turri
034bb6c186 Code cleanup 2019-01-14 08:56:01 +01:00