Commit Graph

44 Commits

Author SHA1 Message Date
Vojtech Bubnik
8d0950ce12 Convincing ClipperLib to use Slic3r's own Point type internally. 2021-04-21 20:15:49 +02:00
Vojtech Bubnik
8fd731f7a0 New FDM support sparse infill zig-zag algorithm.
Fixed some old support and infill issues.

Fixes support problem #4295
Fixes Parts of interface layer extends beyond supports and cannot be printed
Fixes support missing under horizontal overhang #6058
Fixes Slicer double-traces small sections of Rectilinear Supports, causes
Fixes plastic buildup and nozzle crashes #4951
Fixes Add "Angle Interface layers" #2969
2021-04-08 15:29:40 +02:00
Vojtech Bubnik
05a6cfeaea Some more reduction of compiler warnings on MSVC 2021-02-10 18:04:16 +01:00
Vojtech Bubnik
db2d78ff21 Reduction on compiler warnings, mainly on MSVC.
Fix of the new gap_fill_enable flag: Take it into account when comparing
regions.
2021-02-10 17:29:07 +01:00
Lukas Matena
b85de89751 Fixing Clang warnings 2 2021-02-08 17:52:29 +01:00
Lukáš Hejl
f0616b0736 Fixed return value of liang_barsky_line_clipping 2020-12-01 14:28:27 +01:00
Vojtech Bubnik
84693a5810 New get_extents(const std::vector<Points> &pts),
refactored Lian Barsky line clipping
2020-11-16 10:20:47 +01:00
Vojtech Bubnik
239d588c5d 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
37c5fe9923 Refactoring of adaptive cubic / support cubic:
1) Octree is built directly from the triangle mesh by checking
   overlap of a triangle with an octree cell. This shall produce
   a tighter octree with less dense cells.
2) The same method is used for both the adaptive / support cubic infill,
   where for the support cubic infill the non-overhang triangles are
   ignored.
The AABB tree is no more used.
3) Optimized extraction of continuous infill lines in O(1) instead of O(n^2)
2020-09-17 18:39:28 +02:00
Vojtech Bubnik
b101a8e266 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
Vojtech Bubnik
6f4d24ab95 WIP: Generating offset curves with properly rounded corners from
a Voronoi diagram. Curve extraction is based on the OpenVoronoi implementation.
2020-06-04 13:50:09 +02:00
Vojtech Bubnik
6f92538c20 BoundingBox support for Lines,
BoundingBox constructor will no more throw for empty vector of points.

GMP allowed for Vojtech's fork of boost::polygon Voronoi implementation.

Added libslic3r tests for boost::polygon Voronoi. All Voronoi issues
ever reported on the Internet are captured by the tests. Two issues
reported (the two test cases) are real issues which may influence
PrusaSlicer negatively, namely

https://github.com/boostorg/polygon/issues/43
2020-05-28 15:53:53 +02:00
bubnikv
26b7dbd6f5 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
9c4dc80057 Fix of the new gyroid infill path planning. Fixes #3226 2019-11-22 18:22:44 +01:00
bubnikv
cf94482731 Fix of Voronoi debug output. 2019-10-23 15:07:41 +02:00
bubnikv
42a858b999 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
835ee148e5 Fixed conflicts after merging with master 2019-10-09 11:17:48 +02:00
tamasmeszaros
e4247f9856 libslic3r core enhancements
* ClipperUtils extended with ExPolygon to clipper paths conversion and improved PolyTree traversal
* Added ExPolygon constructor with Polygon argument
* Removed BoundingBox warnings on clang
* Removed Geometry warnings on clang
2019-10-01 14:58:37 +02:00
bubnikv
d06831076d 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
2dc9949a4c ENABLE_ENHANCED_RELOAD_FROM_DISK set as default 2019-09-23 15:35:49 +02:00
Enrico Turri
74747226f7 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
bubnikv
dc3a0a0ab3 Refactoring of EdgeGrid to accept an segment to segment visitor.
WIP: PolygonTrimmer to trim skirt & brim with polygons stored in EdgeGrid.
2019-08-21 14:52:22 +02:00
bubnikv
9fd0c55eb8 Simplified the "cereal" includes to not clash with Perl includes 2019-07-04 22:09:14 +02:00
bubnikv
3a24fb2f47 Yet another compilation fix. 2019-07-04 20:25:52 +02:00
bubnikv
3e5f9b5a22 Removed some junk templates, which pass compilation on Windows
even if they are invalid.
2019-07-04 19:59:45 +02:00
bubnikv
70c6558a4c Fix of compilation on Linux 2019-07-04 19:48:00 +02:00
bubnikv
d99e932ee8 WIP Undo / Redo: Serialization of the Model / ModelObject / Model instance
using the cereal framework.
2019-06-26 16:29:12 +02:00
Enrico Turri
6b0d75127b #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
975ccc4ac1 Tech ENABLE_VOLUMES_CENTERING_FIXES set as default 2019-05-21 09:42:59 +02:00
bubnikv
6526a8fcaf WIP: Transformation of instances in world coordinate space:
Ulocking the "anisotropic" scaling checkbox will bake the transformation
into meshes to allow for scaling in world axes.

Optimized and templated the stl_transform functions, now also available for 3x3 matrices.
The Canvas3D::reload_scene() now maintains selection even if all volumes of an instance changed their IDs.
2019-04-26 17:28:31 +02:00
bubnikv
ca6a5af1dc 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
bubnikv
086f11df98 Handling of left hand oriented coordinate systems:
is_left_handed() method on transformations and volumes
rendering of GLVolumes in left handed coordinate systems by glFrontFace(GL_CW);
SLA slicing on left hand oriented instances by flipping the mesh for SLAPrintObject in X.
rendering of the SLA cutting plane in left handed systems
resetting the SLA clipping planes on 3D preview invalidation
2019-04-02 13:47:49 +02:00
bubnikv
dc0c58a9c5 Improvement of the initial placement of modifier meshes:
Sphere and Cylinder are scaled to the same volume as Box
Newly entered modifier meshes are rotated parallell to the world coordinates.
If the instance coordinate system is rotated and scaled, it is not possible
to create an unskewed modifier to world transformation. In that case
the best possible transformation is found to minimize least squares error
of the 8 corners of the new modifier mesh bounding box using
Levenberg-Marquardt algorithm.

FIXME:
1) The Levenberg-Marquardt non-linear least squares does not converge
nicely, it may require some tuning.
2) Above all, if 1) is called, then often the skew of the modifier mesh
is so high, that it is likely more useful to display the modifier
with zero rotation and inverse scaling, so that the modifier will be
of correct size, but not parallel to the world coordinates.
2019-02-28 11:20:01 +01:00
bubnikv
bb0cf221bc WIP synchronization of Z rotation of the instances 2019-01-28 08:52:22 +01:00
Enrico Turri
25319113f1 Code cleanup 2019-01-21 11:29:45 +01:00
Enrico Turri
80bae6dd98 1st installment of volumes centering fixes (WIP) 2019-01-18 12:52:09 +01:00
Enrico Turri
611d9aa0d8 Model's volume transform set as default 2019-01-02 10:49:13 +01:00
Enrico Turri
26d373a2e2 Added extended functionality to Geometry::Transformation class 2018-11-01 13:42:07 +01:00
Enrico Turri
00222226ed Mirror component of transformations set as default 2018-11-01 08:46:44 +01:00
Enrico Turri
d6d632d4fc Added Geometry::Transformation class. Use it into ModelInstance, ModelVolume and GLVolume 2018-10-31 14:56:51 +01:00
Enrico Turri
fbbe1325b6 Mirror transform components in ModelInstance and GLvolume - WIP and disabled 2018-10-18 15:50:51 +02:00
Enrico Turri
9bb93cc4f4 Added helper functions to extract euler angles from 3d transforms 2018-10-12 12:19:57 +02:00
Enrico Turri
aa0c3bf2e3 Added helper functions to generate 3d transforms 2018-10-12 10:09:16 +02:00
bubnikv
0558b53493 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00