Commit Graph

38 Commits

Author SHA1 Message Date
92fe017fc8 New get_extents(const std::vector<Points> &pts),
refactored Lian Barsky line clipping
2020-11-16 10:20:47 +01:00
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
b3e936bda3 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
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
961839b75e 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
eb246f1815 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
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
30bce02593 Fix of the new gyroid infill path planning. Fixes #3226 2019-11-22 18:22:44 +01:00
3444be4171 Fix of Voronoi debug output. 2019-10-23 15:07:41 +02:00
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
d3c337b69a Fixed conflicts after merging with master 2019-10-09 11:17:48 +02:00
78d40b85eb 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
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
03507f9b7d ENABLE_ENHANCED_RELOAD_FROM_DISK set as default 2019-09-23 15:35:49 +02:00
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
1184d50179 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
1f3b546dbb Simplified the "cereal" includes to not clash with Perl includes 2019-07-04 22:09:14 +02:00
3d046c1380 Yet another compilation fix. 2019-07-04 20:25:52 +02:00
13936a4c33 Removed some junk templates, which pass compilation on Windows
even if they are invalid.
2019-07-04 19:59:45 +02:00
f49a107dfb Fix of compilation on Linux 2019-07-04 19:48:00 +02:00
3d84bd20a3 WIP Undo / Redo: Serialization of the Model / ModelObject / Model instance
using the cereal framework.
2019-06-26 16:29:12 +02:00
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
91fd56429c Tech ENABLE_VOLUMES_CENTERING_FIXES set as default 2019-05-21 09:42:59 +02:00
b0830d062b 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
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
99f0207578 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
b06c2598d4 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
8bf692a640 WIP synchronization of Z rotation of the instances 2019-01-28 08:52:22 +01:00
05b6ed498a Code cleanup 2019-01-21 11:29:45 +01:00
5eb66728bb 1st installment of volumes centering fixes (WIP) 2019-01-18 12:52:09 +01:00
31986660a1 Model's volume transform set as default 2019-01-02 10:49:13 +01:00
97fdd96b2f Added extended functionality to Geometry::Transformation class 2018-11-01 13:42:07 +01:00
108110940c Mirror component of transformations set as default 2018-11-01 08:46:44 +01:00
e348d471e5 Added Geometry::Transformation class. Use it into ModelInstance, ModelVolume and GLVolume 2018-10-31 14:56:51 +01:00
1d2b29bc5c Mirror transform components in ModelInstance and GLvolume - WIP and disabled 2018-10-18 15:50:51 +02:00
36c9ec289b Added helper functions to extract euler angles from 3d transforms 2018-10-12 12:19:57 +02:00
167d63c98b Added helper functions to generate 3d transforms 2018-10-12 10:09:16 +02:00
1260b8deb3 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