Commit Graph

316 Commits

Author SHA1 Message Date
Vojtech Bubnik
a44a4505b7 Fixed unit tests. 2022-09-29 14:19:39 +02:00
Filip Sykala - NTB T15p
8f644f5e08 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/Selection.cpp
2022-09-23 14:11:47 +02:00
Lukas Matena
70be93d112 Fixed issue with Euler angles:
the function to extract Euler angles did not work reliably in some of the corner cases.
The bug was not present in 2.5.0 release.
2022-09-23 13:23:40 +02:00
Filip Sykala - NTB T15p
c549c6afbe Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/CMakeLists.txt
#	src/libslic3r/Format/3mf.cpp
#	src/libslic3r/Model.hpp
#	src/libslic3r/Point.hpp
#	src/libslic3r/Technologies.hpp
#	src/slic3r/CMakeLists.txt
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/GLSelectionRectangle.cpp
#	src/slic3r/GUI/GUI_Factories.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoBase.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoBase.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoMove.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoMove.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp
#	src/slic3r/GUI/MeshUtils.cpp
#	src/slic3r/GUI/MeshUtils.hpp
#	src/slic3r/GUI/ObjectDataViewModel.cpp
#	src/slic3r/GUI/ObjectDataViewModel.hpp
#	src/slic3r/GUI/Selection.cpp
2022-08-31 15:22:10 +02:00
Filip Sykala - NTB T15p
63121cee2e Better healing for Glyph shape - remove duplicit points + self intersections
Add search of intersecting points (compared with CGAL)
Triangulation can [optionaly] accept multi points
2022-08-25 13:28:10 +02:00
Vojtech Bubnik
3f69643516 Merge branch 'vb_treesupports' 2022-08-23 16:45:34 +02:00
Vojtech Bubnik
7949ea9544 Fixed some compiler warnings.
Removed some implicit type conversions of ExPolygon (to Points, Polylines, Polygons)
Fixed obsolete boost::spirit includes.
2022-08-22 15:14:54 +02:00
Vojtech Bubnik
55835aa050 Optimization of GCodeViewer vertex buffer generator:
Rounding by round_to_bin() is now 2x faster on MSVC.
2022-08-18 13:32:30 +02:00
Lukas Matena
bbadcf57b2 Fixed memory leaks in libslic3r_tests 2022-08-16 11:09:24 +02:00
Lukas Matena
deac513faa Fixed conflicts after merge 2022-08-15 15:23:59 +02:00
Lukas Matena
bce2b148f4 Merged 2.5.0-beta1 into master (NO CONFLICTS FIXED) 2022-08-15 13:41:40 +02:00
Lukáš Hejl
4fa76b2d8b Reconnected endpoints of closed polyline when PolylineStitcher produced an open polyline mark as closed. 2022-08-12 09:48:34 +02:00
Lukáš Hejl
f60b88ba3e Fix of #8597 - Assert on Windows about decrementing of std::vector::begin() in a specific case. 2022-08-12 09:48:34 +02:00
Lukáš Hejl
4d19eb9ace Added several test cases distilled from reported issues. 2022-08-12 09:48:33 +02:00
Lukáš Hejl
c9ddf7315e Replaced parameters wall_add_middle_threshold and wall_split_middle_threshold with automatic computation based on extrusion width.
That allows computed better values in cases when the extrusion width of the first layer or for the infill differs from the extrusion width for perimeters.

Parameters min_feature_size and wall_transition_length now can be set in percentages, and then they will be calculated based on nozzle size. Old profiles with default values are forced to replace old default values with new default values in percentages.
2022-08-08 10:21:55 +02:00
Filip Sykala - NTB T15p
003c7fc54f Rename FontItem to EmbossStyle 2022-08-03 10:29:05 +02:00
Lukáš Hejl
0161a59a93 Fix of #8472: The middle perimeter was missing for some specific configurations due to numeric rounding errors. 2022-08-02 13:21:39 +02:00
Lukáš Hejl
77f5973c25 Fix of #8446: Non-planar Voronoi diagram.
This is the follow-up to 63c66f4f18. Detection of non-planar (degenerated) Voronoi diagrams was rewritten to check if all neighboring edges of the Voronoi vertex are CCW ordered.
2022-07-26 13:47:40 +02:00
Filip Sykala - NTB T15p
20a94c015c fix warn:
../src/libslic3r/CutSurface.cpp:1798:12: warning: variable 'is_same' set but not used [-Wunused-but-set-variable]
../src/libslic3r/CutSurface.cpp:1837:12: warning: unused variable 'distance_sq' [-Wunused-variable]
../src/libslic3r/CutSurface.cpp:2795:22: warning: unused variable 'def_value' [-Wunused-variable]
../tests/libslic3r/test_aabbindirect.cpp:122:12: warning: variable 'distance_sq' set but not used [-Wunused-but-set-variable]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1336:17: warning: unused variable 'was_opened' [-Wunused-variable]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1336:17: warning: 'was_opened' defined but not used [-Wunused-variable]
../src/slic3r/GUI/Jobs/EmbossJob.cpp:398:12: warning: unused variable 'biggest_index' [-Wunused-variable]
../src/slic3r/GUI/Jobs/EmbossJob.cpp:352:43: warning: 'const Slic3r::GUI::UseSurfaceData::ModelSource* get_biggest(const ModelSources&)' defined but not used [-Wunused-function]
2022-07-25 10:31:29 +02:00
Filip Sykala - NTB T15p
a0eecb91c8 Using aabb tree for lines to detect closest expolygons 2022-07-22 15:34:12 +02:00
Lukáš Hejl
decfa80bfd Test case for issue when Arachne produce closed ExtrusionLine that have different the first and the last point. 2022-07-22 08:33:27 +02:00
enricoturri1966
ca34518bcc Fixed conflicts after merge with master 2022-07-21 08:55:52 +02:00
Lukáš Hejl
63c66f4f18 Fix of #8474 and #8514: Voronoi generator sometimes produced a non-planar Voronoi diagram.
We introduced detecting for those degeneration cases. When degenerated Voronoi diagram is detected, then the input polygons are rotated, and the Voronoi diagram is recomputed. Usually, rotation of input data solves issues like this.
2022-07-21 08:47:48 +02:00
Filip Sykala - NTB T15p
79a7f588b9 Merge branch 'et_world_coordinates' into fs_emboss
# Conflicts:
#	src/libslic3r/CMakeLists.txt
#	src/libslic3r/Format/3mf.cpp
#	src/libslic3r/Model.hpp
#	src/libslic3r/Technologies.hpp
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/GUI_App.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoBase.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoBase.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp
#	src/slic3r/GUI/Selection.cpp
#	src/slic3r/GUI/Selection.hpp
2022-07-20 13:02:07 +02:00
Filip Sykala - NTB T15p
aba094dcd8 Add closest unsorted 2022-07-18 15:30:29 +02:00
Filip Sykala - NTB T15p
8f66ba4bd5 Find closest point from points 2022-07-18 13:26:06 +02:00
Filip Sykala - NTB T15p
6f1bcd2469 Fix debug visualization 2022-07-14 08:45:46 +02:00
Filip Sykala - NTB T15p
4349e82d27 Clean up cut surface 2022-07-13 13:15:07 +02:00
Filip Sykala - NTB T15p
3e7b0506c3 Fix for release mode
PropertyMap can't be created into reference !!!
2022-07-13 08:32:46 +02:00
Filip Sykala - NTB T15p
84215eb136 Comment loading 3mf in test 2022-07-12 12:18:34 +02:00
tamasmeszaros
e44524f1cd Fix warnings in tests caused by integer conversions 2022-06-29 12:00:09 +02:00
Filip Sykala
ab3148538a Partial difference for multiple volume cuts 2022-06-29 11:55:55 +02:00
Filip Sykala
b059d3a57c Merge cuts by CGAL model -- Not Working 2022-06-24 15:55:11 +02:00
Filip Sykala
32fcbb6cb0 Comment debuging test 2022-06-21 16:14:40 +02:00
enricoturri1966
6d97de14d9 Tech ENABLE_RAYCAST_PICKING - Removal of all remaining code related to old OpenGL based picking 2022-06-21 09:16:36 +02:00
Filip Sykala
eea0ce9569 Calculation of projection distances 2022-06-09 15:07:44 +02:00
tamasmeszaros
4f8535d0d5 Move out invalid_id constant from MutablePriotityQueue template class
Enclose it into Slic3r namespace
2022-06-07 16:05:16 +02:00
tamasmeszaros
d9ed45be56 Apply remarks from code review with additional cosmethics 2022-06-03 10:08:11 +02:00
tamasmeszaros
f9fb7f947d Revamped A* algorithm
with extended test suite
2022-06-02 17:44:51 +02:00
Filip Sykala
37961c36e8 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Technologies.hpp
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/GUI_App.cpp
2022-05-18 14:35:48 +02:00
Vojtech Bubnik
f5ec76c230 Follow-up to dc3931ec1f:
Fix mutable priority queue being wiped when moving out of function
    Without move constructor, the clean() gets called when returning an instance from a function.
The above fix was applied also to MutableSkipHeapPriorityQueue.

Follow-up to 15a082b80b:
Fixed TEST_CASE("Mutable priority queue - first pop", "[MutableSkipHeapPriorityQueue]")
2022-05-16 17:27:10 +02:00
Vojtech Bubnik
15a082b80b Fix of libslic3r "Mutable priority queue - first pop" test failure #8276
Improved readability by introducing invalid_id() getter.
Made the ResetIndexWhenRemoved flag active in both debug and release mode,
it used to be made active by Vojtech for release mode only for unknown
reason.
2022-05-16 11:34:26 +02:00
tamasmeszaros
de84fbf23d Remove junk output to stdout from various tests 2022-05-16 10:28:43 +02:00
PavelMikus
d0c08ec5c1 Feature: AABB tree for lines
Small refactoring of AABB tree distance query function, to allow different primitives (apart from triangles)
Implemented Distancer and functions to create AABB tree from lines and use closest point query
Added test for the AABBTree with lines
Added Benchmark comparing EdgeGrid with AABBTree on line contours (Inside AABBTree test file, disabled under compilation flag)
2022-05-12 12:55:10 +02:00
Filip Sykala
9316cd2d54 Fix serialization
add test
2022-05-11 20:48:54 +02:00
Filip Sykala
34304a40bf Merge branch 'master' into fs_emboss 2022-05-11 16:05:40 +02:00
tamasmeszaros
6b23e90424 Add astar algorithm
Fix windows build
2022-05-11 12:06:07 +02:00
tamasmeszaros
12a54251c9 Extend kdtree with k-nearest and bounding box queries
Also add test to verify it
2022-05-11 10:35:01 +02:00
Filip Sykala
effad3a6f8 fix initialization type 2022-05-09 17:02:55 +02:00
Filip Sykala
6ab517187f Fix mismatch of data types.
Separate checks.
2022-05-06 13:37:35 +02:00
Filip Sykala
05354eda0c Merge branch 'master' into fs_emboss
# Conflicts:
#	src/slic3r/GUI/GLCanvas3D.cpp
2022-05-06 08:58:04 +02:00
Vojtech Bubnik
d4b8d4d0f3 Further Perl unit test porting to C++ and Perl interface reduction:
Ported cooling, gap fill, thin walls and polyline unit tests.
2022-05-05 17:57:57 +02:00
Filip Sykala
864d1e5830 Cut surface in backend job
Store flag about use surface(into 3mf and style)
GUI: Add checkbox to start using model surface
2022-05-04 19:42:39 +02:00
Vojtech Bubnik
576c167bd5 Ported "avoid crossing perimeters" and bridging unit tests from Perl
to C++.
Further reduced Perl bindings.
Got rid of the ExPolygonCollection wrapper, replaced with ExPolygons.
2022-05-04 18:21:08 +02:00
Vojtech Bubnik
a627614b58 Perl unit tests for perimeters and multi-material were rewritten to C++.
Perl binding was slimmed down, namely Clipper is no more linked by Perl.
2022-05-04 15:06:04 +02:00
Filip Sykala
e5bf946008 Fix filtering order of AOIs 2022-05-03 13:05:58 +02:00
Filip Sykala
51b103885c Fix of flood fill on edge 2022-05-02 17:29:56 +02:00
Vojtech Bubnik
3687bc28d5 Some reduction of Perl dependencies on ClipperLib,
ported some ClipperLib polyline clipping tests to C++.
2022-05-02 14:34:50 +02:00
Filip Sykala
3e9778b46b Merge branch 'et_world_coordinates' into fs_emboss 2022-05-02 10:11:47 +02:00
Filip Sykala
a1d7040902 WIP: cut surface of model
update emboss icons to not be soo huge - pixel preccisse
2022-04-26 17:43:38 +02:00
Vojtech Bubnik
42e802c1b8 Refactoring of Curves.hpp for better memory management and vectorization
(replaced vector of vectors with Eigen 2D matrices).
2022-04-25 12:42:51 +02:00
Vojtech Bubnik
7d02647ebf Removed various Point::ccw() and Point::ccw_angle() methods, they were
provided for Perl bindings and their semantic was confusing.
Implemented free function angle() to measure angle between two vectors.
Reworked Polygon::convex/concave_points(), changed the meaning of their
angle threshold parameter.
Removed some unused methods from Perl bindings and tests.
Reworked the "wipe inside at the external perimeter" function
after Point::ccw_angle() was removed.
2022-04-25 12:42:51 +02:00
PavelMikus
5c23d471de BSplines, Polynomial fitting 2022-04-25 12:42:51 +02:00
PavelMikus
bbcd6be250 Implemented piecewise data (curve) fitting with variable kernels 2022-04-25 12:42:51 +02:00
Filip Sykala
331d4d4557 Show user warning about unknown symbols by font inside of input text
Fix correct selection of collection ascent, descent, ...
Remove boost log from emboss --> not work properly on thread
2022-04-07 16:34:14 +02:00
Filip Sykala
d91d13c769 Fix of backslash ending line in comment
../tests/libslic3r/test_quadric_edge_collapse.cpp:162:5: warning: multi-line comment [-Wcomment]
../tests/libslic3r/test_quadric_edge_collapse.cpp:165:5: warning: multi-line comment [-Wcomment]
2022-04-05 16:28:34 +02:00
Filip Sykala
ee50af26c3 Fix Linux memory leaks 2022-03-25 15:50:13 +01:00
Filip Sykala
08c6e4faec Add emboss text test
(created mainly to profile conversion)
2022-03-25 11:06:58 +01:00
Filip Sykala
583babb3b4 Merge branch 'master' into fs_emboss 2022-03-24 11:48:09 +01:00
Lukáš Hejl
97a5aa9592 Added a new test case for a missing Voronoi vertex. 2022-03-24 11:30:32 +01:00
Filip Sykala
e6838f7e18 add new cgal as technology 2022-03-22 15:47:34 +01:00
Vojtech Bubnik
59e14cb752 Reworked constrained Delanay triangulation of polygons / expolygons
using CGAL CDT implementation:
Removed all the sets / maps, replaced with vectors and CDT vertex
intrusive indices.
Reworked the outside / inside classification using just the CDT
"constrained edge" attributes and a single queue.

Cherry pick commit 1648ae853d6c69a1118efbc694dadeb9965154ee
2022-03-17 13:09:10 +01:00
Filip Sykala
84bde2163d Partialy prepare surface cut 2022-03-16 16:58:36 +01:00
Filip Sykala
87f22765ba Separate functionality 2022-03-15 19:53:43 +01:00
Filip Sykala
41e6dba3df Fix fill on edge
change color to enum
2022-03-14 11:12:53 +01:00
Filip Sykala
572207e1c3 partial refactor 2022-03-11 16:54:53 +01:00
Filip Sykala
9e1ebcf4c6 revert auto formating 2022-03-09 13:41:41 +01:00
Filip Sykala
57c75395c6 fix test 2022-03-09 10:59:22 +01:00
Filip Sykala
4a399789f4 Add vojta test 2022-03-09 09:41:03 +01:00
Filip Sykala
a6834a1a82 WxUtils are using imap
Remove unused map utils
2022-03-08 09:22:56 +01:00
Filip Sykala
41a506688a Change 2 map to bimap in TextConfigurationSerialization 2022-03-08 08:35:26 +01:00
Filip Sykala
6fdaee3cfe Fix data type of collection
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]
2022-03-07 12:16:24 +01:00
Filip Sykala
0d724ad646 Fix test to be runable on other computers. 2022-03-07 11:40:23 +01:00
Filip Sykala
a000d12361 Change test to use font from resources 2022-03-02 14:31:56 +01:00
Filip Sykala
18d269506a add index of font inside of collection to FontProp(font property) + serialization/deserialization (3mf + appConfig)
separate glyph cache from FontFile
2022-02-28 18:32:50 +01:00
Filip Sykala
ca79932d30 Reduce test to use only STB calls 2022-02-23 13:55:27 +01:00
Filip Sykala
482e510d7f Add temporary test for win/mac 2022-02-23 13:29:26 +01:00
Filip Sykala
faa63f3182 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Format/3mf.cpp
2022-02-10 14:04:02 +01:00
tamasmeszaros
72da90d28f WIP
wip
2022-02-03 16:10:03 +01:00
Filip Sykala
3f58cf73af Fix for:
../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
2022-02-03 13:12:14 +01:00
Filip Sykala
546009a8e9 Fix Mac build 2022-02-03 12:45:39 +01:00
Filip Sykala
e783086689 Remove Simplify from tests 2022-02-03 10:25:06 +01:00
Filip Sykala
a50d93cd66 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Geometry.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoBase.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoMove.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoMove.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoScale.cpp
#	src/slic3r/GUI/Gizmos/GLGizmoScale.hpp
#	src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp
#	src/slic3r/GUI/ImGuiWrapper.cpp
#	src/slic3r/GUI/ImGuiWrapper.hpp
#	src/slic3r/GUI/Selection.cpp
#	tests/slic3rutils/slic3r_jobs_tests.cpp
2022-02-02 15:27:25 +01:00
Filip Sykala
af69a4f2de create emboss text mesh on same place as update
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<...>'
2022-01-31 13:17:24 +01:00
enricoturri1966
c07a848257 Follow-up of 6201dad245 - Fixed test_color.cpp 2022-01-14 08:26:13 +01:00
Filip Sykala
4ec4bafe19 Create Emboss::Font as unique ptr not optional
Reason: Job need pointer on font until finished
2022-01-06 16:12:15 +01:00
Filip Sykala
b1b8eee3c9 add is italic check for font file 2022-01-06 11:29:16 +01:00
enricoturri1966
ab99a7865f Fixed build of test_color.cpp on non-Windows OSs 2021-12-22 11:31:35 +01:00
enricoturri1966
cd4094743e Tech ENABLE_COLOR_CLASSES - 1st installment -> Introduction of classes ColorRGB and ColorRGBA to unify color data definition and manipulation 2021-12-22 10:45:35 +01:00
Filip Sykala
88523bceb6 Merge branch 'master' into fs_emboss 2021-12-13 10:52:04 +01:00