Commit Graph

549 Commits

Author SHA1 Message Date
Vojtech Bubnik
fb85baf889 Ported shells.t unit tests from Perl. 2022-12-23 16:07:09 +01:00
Filip Sykala - NTB T15p
1896dd5761 Disable italic font check for RaspberryPi(aka linux) 2022-12-21 09:02:10 +01:00
Vojtech Bubnik
11c0e567a6 WIP "ensure verticall wall thickness" rework:
1) New region expansion code to propagate wave from a boundary
   of a region inside of it.
2) get_extents() extended with a template attribute to work with
   zero area data sets.
3) ClipperZUtils.hpp for handling Clipper operation with Z coordinate
   (for source contour identification)
2022-12-20 09:09:10 +01:00
Filip Sykala - NTB T15p
043c4c5e90 Fix for RPI build 2022-12-15 13:20:28 +01:00
PavelMikus
f71f8e0472 fix perimeters tests after merge of overhang slowdowns 2022-12-14 16:40:50 +01:00
Pavel Mikus
f730fd21d4 refactoring overhang speed 2022-12-14 14:49:20 +01:00
PavelMikus
dd7777f648 fix tests 2022-12-14 14:49:20 +01:00
tamasmeszaros
b67fe277fc Ease up tolerance for failing SLA test 2022-12-13 10:40:35 +01:00
Lukas Matena
f81382f604 Generic sphere shape is now created by recursive division of an icosahedron 2022-12-08 14:55:32 +01:00
Filip Sykala - NTB T15p
47ca06e53e Merge branch 'master' into fs_emboss 2022-12-05 15:21:04 +01:00
enricoturri1966
8eb12cbaf0 Fixed conflicts after merge with master 2022-12-05 13:29:28 +01:00
enricoturri1966
6f18f8f784 Tech ENABLE_RAYCAST_PICKING set as default 2022-12-05 10:24:30 +01:00
Filip Sykala - NTB T15p
d5fedd928c Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Point.hpp
2022-11-29 15:11:53 +01:00
Filip Sykala - NTB T15p
b1f9d50aad Rename function: collect_duplications -> collect_duplicates
more english correct name
2022-11-29 13:52:47 +01:00
tamasmeszaros
2144f81bf1 Useful backend improvements from sla volumes branch 2022-11-29 11:10:52 +01:00
Vojtech Bubnik
9a682a10cb Merge remote-tracking branch 'remotes/origin/fs_emboss' 2022-11-28 17:46:12 +01:00
Vojtech Bubnik
a98467f661 Merge remote-tracking branch 'remotes/origin/master' into vb_treesupports 2022-11-18 13:26:48 +01:00
Vojtech Bubnik
fe51f77839 Improvements in performance of Medial Axis algorithm.
Fixes Slicing slows or hangs on "Generating Permiters 20%" cpu load is at 100% #8164
Fixes Slicing hangs on generating perimeters with thing:3565827 (30g) #3259
2022-11-16 12:03:31 +01:00
Vojtech Bubnik
db3f696888 Fixed ExPolygon::overlaps(), which was not commutative.
Wrote unit tests for Clipper polyline clipping operations.
Rewrote ExPolygon unit tests from Perl to C++.
2022-11-15 15:32:16 +01:00
Vojtech Bubnik
9dca8403fe ClipperLib: Optimized PointInPolygon() to calculate cross products
with int64s instead of doubles.
Polygon / ExPolygon: contains() reworked to use ClipperLib::PointInPolygon().
	The Slic3r own implementation was not robust.
Fixed test_perimeters after recent refactoring (sorting of extrusions
	into LayerIslands)
2022-11-14 15:17:04 +01:00
Filip Sykala - NTB T15p
c052ff403a Merge branch 'master' into fs_emboss 2022-11-09 14:07:26 +01:00
Pavel Mikuš
633ce8aa21
Pm jps path finding (#8)
New step - estimation of curling on both the model and the support extrusions.
Improvements in curled filament estimation algortihm
Implementation of Jump Point Search algorithm 
Use of JPS algorithm to avoid curled extrusions during travel moves in Gcode export
2022-11-09 13:33:58 +01:00
Filip Sykala - NTB T15p
c77f8373bd Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Technologies.hpp
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/Selection.hpp
2022-11-07 15:44:33 +01:00
Vojtech Bubnik
8858651bf4 WIP Refactoring of Layers: Reworked G-code export to make use
of Layer->LayerSlice->LayerIsland hierarchy. This should improve
tool path ordering of multiple parts within the same object #5511.

Some shells tests rewritten from Perl to C++.

FIXME: Gap fill extrusions are currently not handled by the initial
G-code preview!
2022-11-07 14:47:43 +01:00
Vojtech Bubnik
6e653d9070 Merge remote-tracking branch 'remotes/origin/master' into vb_treesupports 2022-11-02 17:21:36 +01:00
Vojtech Bubnik
409fae6183 WIP Refactoring of Layers: LayerIslands filled in with perimeter
extrusions, gap fill extrusions and fill regions.
2022-11-02 12:59:31 +01:00
Vojtech Bubnik
d041fa6c0c Refactored PerimeterGenerator to output out_fill_surfaces as ExPolygons,
not SurfaceCollection.

Reworked combineinfill.t, 07_extrusionpath.t, 08_extrusionloop.t to c++.
Removed Layer / ExtrusionPath / ExtrusionLoop / ExtrusionEntityCollection
from Perl bindings.
2022-10-27 19:08:43 +02:00
Vojtech Bubnik
237e56c7ce Follow-up to ee626eb65a
Refactored PerimeterGenerator for functional style, better constness
with the goal of calling PerimeterGenerator::process_xxx()
for each surface at once to collect its fill expolygons.
2022-10-27 13:04:52 +02:00
Vojtech Bubnik
ee626eb65a WIP: Layers split into islands, islands overlapping in Z interconnected
into a graph with links to the layer above / below.

In addition:
Members of LayerRegion were made private, public interface const only.
this->m_xxx replaced with just m_xxx
SurfacesPtr was made a vector of const pointers.
2022-10-26 18:41:39 +02:00
enricoturri1966
7ae4472827 Merge branch 'master' of https://github.com/Prusa-Development/PrusaSlicerPrivate into et_surface 2022-10-24 12:57:39 +02:00
Filip Sykala - NTB T15p
a752ccb420 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Technologies.hpp
#	src/slic3r/GUI/GLCanvas3D.cpp
#	src/slic3r/GUI/Selection.cpp
2022-10-19 19:35:31 +02:00
Vojtech Bubnik
2ced762948 Integrating a C++20 like span library
https://github.com/tcbrindle/span

Replacing a homebrew const pointer wrapper const correctness helper
with the C++20 like span library.

One day when we switch to C++20 we will just use the C++20 spans instead.
2022-10-19 16:27:15 +02:00
Filip Sykala - NTB T15p
8343e81053 Fix test
+ Comment debug output
+ Add was_canceled in cut surface
2022-10-12 19:26:45 +02:00
Filip Sykala - NTB T15p
3fa3ea0bb4 Projection text for cut surface is made with double preccission 2022-10-12 16:17:38 +02:00
Lukas Matena
05e2a831f4 Added some unit tests (SurfaceMesh) 2022-10-12 08:40:34 +02:00
Filip Sykala - NTB T15p
8511b280bf Heal shape with points close to line
(after conversion to floating point it is on the other side of line)
ExPolygons indexing (fixed)
2022-10-11 13:35:52 +02:00
Filip Sykala - NTB T15p
e340fa6abe Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/AABBTreeLines.hpp
#	src/libslic3r/ExPolygon.hpp
#	tests/libslic3r/test_aabbindirect.cpp
2022-10-05 15:14:54 +02:00
Pavel Mikus
e02aed31d2 Added new query to AABBTree: all primitives (triangles/lines) within radius 2022-10-05 14:51:32 +02:00
Filip Sykala - NTB T15p
65f8b09876 Merge branch 'master' into fs_emboss 2022-09-30 18:29:57 +02:00
Lukas Matena
49c817c40b Resurrected an old test case for parsing and comparing config version numbers 2022-09-30 13:51:56 +02:00
Filip Sykala - NTB T15p
0e3b7cae12 Merge branch 'master' into fs_emboss
# Conflicts:
#	src/libslic3r/Technologies.hpp
#	src/slic3r/GUI/GLCanvas3D.cpp
2022-09-29 18:47:21 +02:00
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
tamasmeszaros
b8c3905e82 Fix crashing SLA tests on Win 2022-08-04 15:47:50 +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
tamasmeszaros
b45bb84fa6 Another fix to find_merge_pt 2022-07-29 13:05:39 +02:00
tamasmeszaros
a55be29568 Fix failing tests for merge point search
Improvements and comments to find_merge_pt
2022-07-29 13:05:39 +02:00
tamasmeszaros
f3d4a90721 Fixes to compile on MSVC 2022-07-29 13:05:39 +02:00
tamasmeszaros
1a30c0aaa0 Extend mergept tests 2022-07-29 13:05:39 +02:00
tamasmeszaros
8a78428d10 Add tests to find_merge_pt and make them pass 2022-07-29 13:05:39 +02:00
tamasmeszaros
6523bfdf99 Enable ground facing only option for branching tree
Essentially discards mesh nodes
2022-07-29 13:05:39 +02:00
tamasmeszaros
0a3b17f940 Fix failing sla tree tests
Try to increase number of rays in Beam to prevent colisions


Put back threshold for intersections with model in sla tree tests 


Increase safety distance for branching tree instead of increasing rays
2022-07-29 13:05:39 +02:00
tamasmeszaros
8723e421b3 Add new branching tree algorithm 2022-07-29 13:05:39 +02:00
tamasmeszaros
b1317be78a Selectable support tree type 2022-07-29 13:05: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
Lukáš Hejl
bea962b6fe Fixed unit tests after merge. 2022-06-30 00:30:22 +02:00
Lukas Matena
62e59a4526 Fixing conflicts part 1:
fixed simple conflicts
2022-06-29 16:43:29 +02:00
Filip Sykala
043accbc00 detection of intersection source 2022-06-29 15:34:33 +02:00
Lukas Matena
b61714bb3e Merge branch 'master_250' (NO CONFLICTS FIXED):
CONFLICT (content): Merge conflict in resources/profiles/PrusaResearch.idx
CONFLICT (content): Merge conflict in resources/profiles/PrusaResearch.ini
CONFLICT (content): Merge conflict in src/libslic3r/CMakeLists.txt
CONFLICT (content): Merge conflict in src/libslic3r/Fill/Fill.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode.hpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/GCodeProcessor.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/GCodeProcessor.hpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/SeamPlacer.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/SeamPlacer.hpp
CONFLICT (add/add): Merge conflict in src/libslic3r/Geometry/Curves.hpp
CONFLICT (content): Merge conflict in src/libslic3r/PerimeterGenerator.cpp
CONFLICT (content): Merge conflict in src/libslic3r/Point.hpp
CONFLICT (content): Merge conflict in src/libslic3r/PrintConfig.hpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/ConfigWizard.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GCodeViewer.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GLCanvas3D.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GUI_App.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
CONFLICT (content): Merge conflict in src/slic3r/Utils/FixModelByWin10.cpp
CONFLICT (modify/delete): t/perimeters.t deleted in HEAD and modified in master_250.  Version master_250 of t/perimeters.t left in tree.
CONFLICT (content): Merge conflict in tests/fff_print/CMakeLists.txt
CONFLICT (content): Merge conflict in tests/fff_print/test_fill.cpp
CONFLICT (content): Merge conflict in version.inc
CONFLICT (modify/delete): xs/xsp/PerimeterGenerator.xsp deleted in HEAD and modified in master_250.  Version master_250 of xs/xsp/PerimeterGenerator.xsp left in tree.
2022-06-29 14:37:14 +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
tamasmeszaros
d23f9d7674 Refactoring and performance optimization for support trees in SLA 2022-06-29 10:43:46 +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
Lukáš Hejl
ce038fd7f0 Reenabled some of the previously disabled tests after the computation of bridging perimeters was added. One test was disabled for Arachne because Arachne is causing issues with seam alignment. 2022-06-09 11:23:41 +02:00
Lukáš Hejl
f460c53d86 Backported a fix from Clipper 6.4.2 for the issue that Clipper Z coordinated has incorrect value because ZFillFunction wasn't called in all cases (https://sourceforge.net/p/polyclipping/bugs/160/). Also, this issue led to duplicity vertices with the same XY coordinates but differ in Z coordinates. 2022-06-09 11:05:05 +02:00
Lukáš Hejl
89f467a488 Fixed undefined symbols when mold linker was used for linking libnest2d_tests and sla_print_tests. 2022-06-09 10:57:30 +02:00
Lukáš Hejl
46ade54937 Backported a fix from Clipper 6.4.2 for the issue that Clipper Z coordinated has incorrect value because ZFillFunction wasn't called in all cases (https://sourceforge.net/p/polyclipping/bugs/160/). Also, this issue led to duplicity vertices with the same XY coordinates but differ in Z coordinates. 2022-06-09 09:22:40 +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
Lukáš Hejl
df552a9226 Fixed an undefined symbol when mold linker was used for linking slic3rutils_tests. 2022-06-02 13:47:51 +02:00