Commit Graph

317 Commits

Author SHA1 Message Date
eccab6a6d9 Don't use sla::EncodedRaster in SLAImport, revive opencsg sandbox 2020-08-27 23:14:42 +02:00
0f53146d4b Changed internal coordinates of drain holes
Drain holes reference position was saved slightly above the mesh to avoid problem when the hole is placed on flat or nearly flat surface
The depth of the hole was internally bigger than what the user has set to compensato for it
However, this leads to problem with scaling and makes reprojection of the holes on the mesh complicated

This commit changes the reference point to the point on the mesh and the extra elevation is handled when rendering and drilling the hole.
The change is reflected in 3MF drain holes versioning so that old 3MFs are loaded correctly.
Reprojection on the mesh after reload from disk/fix through netfabb has been enabled.
2020-08-24 08:11:12 +02:00
c875a3ab39 Add dedicated tests for support point generation 2020-08-18 11:41:14 +02:00
d4f32a3b4d Fix build on win and rpi 2020-08-13 15:09:22 +02:00
9d80f30fb5 Merge branch 'tm_minor_refactor' 2020-08-13 14:36:47 +02:00
bbffe7c52b replace ccr_::enumerate with flexible for_each
enumerate is unusual and would only work effectively with random access iterators

this for_each takes advantage of tbb blocked_range
replace ccr_::enumerate with flexible for_each

enumerate is unusual and would only work effectively with random access iterators

this for_each takes advantage of tbb blocked_range
2020-08-13 14:35:14 +02:00
159e12a611 finish optimizer interface and remove commented code 2020-08-03 19:06:57 +02:00
24bd73f9af Working small-to-normal support merging
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
2020-08-03 19:05:30 +02:00
4716d744ec Add possible manipulation of small support diameter. 2020-08-03 19:05:30 +02:00
f95c20de28 Fix junction made below ground level. 2020-08-03 19:05:30 +02:00
6a9eccf673 Rename EigenMesh3D to IndexedMesh and SupportConfig to SupportTreeConfig 2020-08-03 19:05:30 +02:00
7384a49fca Make compile time support tree conf params constexpr 2020-08-03 19:05:30 +02:00
8ec59a1d2c Id-s put in a base class for support tree primitives 2020-08-03 19:05:30 +02:00
0f34c14284 Fix bugs and non working tests
Fix failing tests


Try to fix build on windows


Try to fix failng tests on Mac
2020-08-03 19:05:30 +02:00
d46d86ba4b Separate support tree routing and meshing, remove Common.hpp/.cpp .
* Remove Common.hpp and Common.cpp, move things into their respective modules in sla.
2020-08-03 19:05:30 +02:00
0d383674d1 Bugfixes for support generator
* Fix support heads floating in air
* Fix failing tests for the bridge mesh intersection
* Fix failing assertions
WIP refactoring support tree gen, as its a mess.
2020-08-03 19:05:30 +02:00
9e89c764d0 Remove the headless step of support support tree gen 2020-08-03 19:05:30 +02:00
995ee43b51 Improvements on mini pillars 2020-08-03 19:05:30 +02:00
439de8536a Create smaller supports in problematic areas with established strategies
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
2020-08-03 19:05:30 +02:00
00cd2acf2d Fix remove_bottom_points function 2020-08-03 19:03:02 +02:00
54b29670c8 Fix support and hole point reprojection after reload and netfabb 2020-06-10 14:16:11 +02:00
d10286c978 Fix the tests after EigenMesh3D refactor 2020-06-02 17:15:08 +02:00
9f07cbaff0 Reenabled SLIC3R_HOLE_RAYCASTER before unit tests are updated properly
There are still tests of removing holes on slices and raycasting on unaltered mesh (which was eventually superseded by CGAL boolean operations)
2020-05-27 10:05:54 +02:00
27b3d906da EigenMesh3D does not store a copy of the mesh
Instead, it stores a pointer to extern TriangleMesh (which must not be destroyed before the EigenMesh3D object)
2020-05-27 00:51:11 +02:00
20aafec26e More code cleaning,...
optimizations regarding normals calculation
removed unused EigenMesh3D(const Contour3D &other) constructor
removed unused class si_result
2020-05-27 00:51:11 +02:00
8183e65071 EigenMesh3D now stores TriangleMesh inside, not a mesh in Eigen format
Rotfinder was apparently building the AABB tree needlessly
2020-05-27 00:51:11 +02:00
5de468a01a Removed some unused code
- removed define USE_AABB_INDIRECT (which switched between old and new AABB implementation)
- removed define SLIC3R_SLA_NEEDS_WINDTREE (relied on igl and was not used anyway)
- new define SLIC3R_HOLE_RAYCASTER (hides currently unused code)
- slight include cleanup
- removed obsolete source file SupportTreeIGL.cpp
2020-05-27 00:51:11 +02:00
972957995a Switched to new AABB tree implementation for raycasting 2020-05-27 00:13:38 +02:00
4fa702c570 Slight include cleanup 2020-05-26 13:45:36 +02:00
e117eb4780 Do reprojection also after netfabb repair 2020-05-13 14:53:20 +02:00
638e526f67 Reproject support and hole points after a reload from disk op. 2020-05-13 14:53:20 +02:00
3c5ddd30c9 Fix missing support mini sticks 2020-05-11 14:07:21 +02:00
f930587f43 SLA archive import with miniz, marching square bugfixes
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
2020-04-23 19:12:07 +02:00
4e4efeef31 Initial version of sl1 import with sla::Raster refactor. 2020-04-23 19:05:32 +02:00
c39bcd8afe Merge branch 'lm_gizmos' into lm_fdm_supports_gizmo 2020-04-07 17:16:48 +02:00
7769f9740b 64bit coord_t
Vec3i as a vertex index to TriangleMesh constructor
2020-03-25 14:35:41 +01:00
1ef8886391 WIP: First working implementation of the triangle selector for the FDM support gizmo 2020-03-19 11:15:17 +01:00
bcf0a6c5c9 Removed SLA unused code
Mostly the dead-ends that were tried when hollowing was being implemented
2020-03-03 15:53:26 +01:00
4a6c46529e Promote max_bridges_on_pillar to be a runtime parameter.
This way the user greater control over support tree branching and the amount of pillars created.
2020-03-02 12:43:00 +01:00
a394d821a6 Spiral vase improvements and bugfixes.
Fixes Connecting / expanding Bottom Layers to Vase Perimeter #253
Fixes Slicing error in vase mode #452
Fixes Slicing Issue (Vase Mode, 0.6mm dmr nozzle) #1887
Fixes Top fill pattern isn't used in spiral vase mode #2533
Fixes Cisar's vase doesn't slice correctly, creates artefacts #3595

When the model is sliced, all the contours are newly oriented
counter-clockwise (even holes), merged and then only the largest area
contour is retained. In perimeter generator, if the largest contour
splits into multiple perimeters, newly only the largest area perimeter
is retained in spiral vase mode. These two changes solve #3595 and similar.

The infill is newly calculated only for the bottom solid layers
if the spiral vase mode is active (removes various unwanted infill
along the vase walls), and the last bottom solid layer is switched
to a top solid pattern (solves #2533).

The thin walls are newly enforced to be disabled in spiral vase mode,
and the "ensure vertical shell wall" is enforced in spiral vase mode
to extend the bottom of the vase to the vase hull (fixes #253).
2020-02-08 21:36:43 +01:00
b3f8aed1d6 Hollowing: allow to place drain holes on the inner surface of a hollowed cavity
Drain holes are not allowed to be placed on its own inner surface. This was recently (0e3ebb3)
done by forcing invalidation of the slaposDrillHoles, which also invalidates and therefore
hides the drilled mesh. However, that also hides the hollowed mesh and it is not possible
to place holes inside the cavity.

This change does not dump the drilled mesh, but checks that no raycast hit ends up in a hole.
2020-02-06 17:58:26 +01:00
fe8673a699 Add prusaslicer.ini to sl1 output zip 2020-01-24 15:23:59 +01:00
66e1b856c3 append full config to sla zipped ini
SPE-1081
2020-01-24 14:31:31 +01:00
1702008db1 Bugfixes and refactoring for SLA backend
remove duplicate code


Mark conversion constructors of EigenMesh3D `explicit`


Working on mesh simplification for hollowed interior


Fix bug SPE-1074: crash with empty supports and disabled pad.


fix regression after refactor


Remove unfinished code


Fix missing includes and dumb comments
2020-01-24 14:26:19 +01:00
1bc1ba5a1b Use mesh boolean in the backend to drill holes. 2020-01-24 10:53:40 +01:00
7b9a62321d add mesh simplification.
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.
2020-01-23 10:58:18 +01:00
7e7420e43f Fixed a bug in the hole-aware raycaster 2020-01-17 16:02:23 +01:00
0ba462a0a2 Remove wrapper around std::mt19937 2020-01-15 17:44:15 +01:00
5b87763619 Eliminate use of uninitialized variable. 2020-01-14 10:48:22 +01:00
4183f9b29a Test sla support point generation determinism with seed parameter 2020-01-14 10:48:22 +01:00