Fix warnings
../src/libslic3r/Emboss.cpp:135:24: warning: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Wsign-compare]
../src/libslic3r/Emboss.cpp:653:20: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:2057:12: warning: unused variable 'count_icons' [-Wunused-variable]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:2058:12: warning: unused variable 'count_states' [-Wunused-variable]
../tests/libslic3r/test_emboss.cpp:200:38: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
../tests/libslic3r/test_emboss.cpp:200:57: error: 'path' is unavailable: introduced in macOS 10.15
fix:
Un Itelic redraw
../src/slic3r/Utils/WxFontUtils.hpp:49:77: error: non-const lvalue reference to type 'shared_ptr<...>' cannot bind to a temporary of type 'shared_ptr<...>'
../src/slic3r/Utils/WxFontUtils.hpp:55:75: error: non-const lvalue reference to type 'shared_ptr<...>' cannot bind to a temporary of type 'shared_ptr<...>'
Follow-up to 7da4bebe7a
WIP GCode substitutions: Changed the format of gcode_substitutions by
adding an empty comment as a fourth parameter to each substitution.
In the future, we will provide a UI to show / edit the comment.
circular, convex, concave) and performs efficient collision detection agains these build
volumes. As of now, collision detection is performed against a convex
hull of a concave build volume for efficency.
GCodeProcessor::Result renamed out of GCodeProcessor to GCodeProcessorResult,
so it could be forward declared.
Plater newly exports BuildVolume, not Bed3D. Bed3D is a rendering class,
while BuildVolume is a purely geometric class.
Reduced usage of global wxGetApp, the Bed3D is passed as a parameter
to View3D/Preview/GLCanvas.
Convex hull code was extracted from Geometry.cpp/hpp to Geometry/ConvexHulll.cpp,hpp.
New test inside_convex_polygon().
New efficent point inside polygon test: Decompose convex hull
to bottom / top parts and use the decomposition to detect point inside
a convex polygon in O(log n). decompose_convex_polygon_top_bottom(),
inside_convex_polygon().
New Circle constructing functions: circle_ransac() and circle_taubin_newton().
New polygon_is_convex() test with unit tests.
round() rounds to an integer.
This is a popular request, for example #3472
digits(value, num_digits, num_decimals) rounds to num_digits and
num_decimals, left filled with spaces.
digits(value, num_digits) the same as digits(value, num_digits, 0)
Neither decimal separator nor any decimals after decimal separator
are emitted.
zdigits(...) is the same as digits(...) only left filled with zeros.
If the result does not fit num_digits, the result is never trimmed.
for offset2() with clear meaning.
New ClipperUtils functions: expand(), shrink() as an alternative
for offset() with clear meaning.
All offset values for the new functions are positive.
Various offsetting ClipperUtils (offset, offset2, offset2_ex) working
over Polygons were marked as unsafe, sometimes producing invalid output
if called for more than one polygon. These functions were reworked
to offset polygons one by one. The new functions working over Polygons
shall work the same way as the old safe ones working over ExPolygons,
but working with Polygons shall be computationally more efficient.
Improvements in FDM support generator:
1) For both grid and snug supports: Don't filter out supports for which
the contacts are completely reduced by support / object XY separation.
2) Rounding / merging of supports using the closing radius parameter is
now smoother, it does not produce sharp corners.
3) Snug supports: When calculating support interfaces, expand the projected
support contact areas to produce wider, printable and more stable interfaces.
4) Don't reduce support interfaces for snug supports for steep overhangs,
that would normally not need them. Snug supports often produce very
narrow support interface regions and turning them off makes the support
interfaces disappear.
TriangleMesh newly only holds indexed_triangle_set and
TriangleMeshStats. TriangleMeshStats contains an excerpt of stl_stats.
TriangleMeshStats are updated when initializing with indexed_triangle_set.
Admesh triangle mesh fixing is newly only used when loading an STL.
AMF / 3MF / OBJ file formats are already indexed triangle sets, thus
they are no more converted to admesh stl_file format, nor fixed
through admesh repair machinery. When importing AMF / 3MF / OBJ files,
volume is calculated and if negative, all faces are flipped. Also
a bounding box and number of open edges is calculated.
Implemented its_number_of_patches(), its_num_open_edges()
Optimized its_split(), its_is_splittable() using a visitor pattern.
Reworked QHull integration into TriangleMesh:
1) Face normals were not right.
2) Indexed triangle set is newly emitted instead of duplicating
vertices for each face.
Fixed cut_mesh(): Orient the triangulated faces correctly.
stl_stats are newly only accessed by TriangleMesh::stats(),
most of the direct access to TriangleMesh::stl is gone with the exception
of parsing input files (3MF, AMF, obj).
1) Slic3r::RuntimeError was replaced with ConfigurationError,
all exceptions thrown by the configuration layer are derived
from ConfigurationError.
2) When parsing configuration files, ConfigurationError is catched and
rethrown extended with the file name being parsed.
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.
When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.
Substitute enums and bools only. Allow booleans to be parsed as
true: "1", "enabled", "on" case insensitive
false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".
Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.
WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
WIP: MutablePolygon - linked list based polygon implementation
allowing rapid insertion and removal of points.
WIP: porting smooth_outward() from Cura.
Working contour offsetting,
skeleton_edges_rough() to detect "important" skeleton edges.
Radius of an inscribed circle along the "important" skeleton edges
changes slowly, therefore these "important" skeleton edges signify
oblong regions possibly needing a gap fill.
Replaced all "unsigned long long" types with uint64_t.
These "new" types better communicate their meaning and they are
guaranteed to behave the same on all platforms & compilers.
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.
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.
Fixed fatal bug with anchors for mini supports
Make the optimization cleaner in support generatior
Much better widening behaviour
Add an optimizer interface and the NLopt implementation into libslic3r
New optimizer based only on nlopt C interfase
Fix build and tests
Completely remove the concept of CompactBridge.
Replace it with Heads having the same back radius as front radius.
Try to apply the same rules for mini supports as in the route_to_model step.
Increased accuracy of bridge_mesh_intersect shot from support points
Refining mini support integration
boost::polygon Voronoi diagram generator by Vojtech.
Fixed Perl bindings on Windows after some "improvement" of the Windows 10
SDK headers, which fail if included from a C++ code using the
extern "C"
clause. Namely, the Windows 10 SDK include for sockets introduces C++ macros
if a "compiled with C++" symbol is provided even if included through
exetrn "C".
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.
Now the algorithm is very different from the OpenVoronoi implementation
and hopefully it is now correct (save numerical issues, which will be
a big PITA).
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
Fix compilation on Windows
Fix array subscript out of range error in MarchingSquares
Fix normals of mesh constructed from slices
Improve performance of mesh construction from slices
Refactored Arrange interface: remove the union based BedShapeHint, replace it with proper function overloads
WARN: this commit is only intermediate, it does not compile.
Compensated slices have negative orientation...
Move efc to common params
Fix elefant foot compensation reversed contours
Remove redundant assertions and don't apply absolute correction if zero
by the PlaceholderParser.
Namely, all the options with the "ratio_over" reference are now handled
correctly by the PlaceholderParser with the exception
of the "first_layer_extrusion_width", which overrides speed of extrusions
by their respective extrusion type.
Also the various extrusion widths (extrusion_width, first_layer_extrusion_width,
external_perimeter_extrusion_width etc.) produce the same numbers
as if ran through the back-end, with the assumption of not overriding
layer height by the variable layer height editing tool or layer height
modifiers.
SPE-1072
Working but flipped normals with the interior.
Testing on treefrog passed
Oversampling for hollowed mesh should not be less than 3x
Flip back normals after simplify and remove redundant test code.