Commit Graph

51 Commits

Author SHA1 Message Date
Vojtech Bubnik
73c10c6ddb fix of OSX build: workaround of non-standard std::optional 2020-11-16 13:44:15 +01:00
Vojtech Bubnik
6ac40c470b Fixing compilation issues. 2020-11-16 13:11:58 +01:00
Vojtech Bubnik
9c07db8ee0 Fills:
1) New algorithm for connecting along the perimeters is now applied
   to Honeycomb, Hilbert and similar planar filling curves.
2) The old expensive path chaining is not applied if the new algorithm
   to connect along the perimeter lines is called afterwards.
2020-11-16 12:51:51 +01:00
Vojtech Bubnik
dc25f3900f Reworked connection of infill lines to perimeter lines.
Added a new "infill_anchor" parameter.
2020-11-16 10:54:00 +01:00
Vojtech Bubnik
7d7620353e FillAdaptive:
1) More accurate trimming of an anchor with another infill line
   or by another anchor line.
2) Trimming of very short infill lines, which are not anchored,
   by another infill lines.
2020-11-11 16:49:11 +01:00
Vojtech Bubnik
be37aaf95b FillAdaptive: Handling of a special case when the infill lines
touch at their ends.
2020-11-11 11:51:26 +01:00
Vojtech Bubnik
d4bd54c416 AdaptiveInfill:
1) Shortening the anchor lines when touching another infill line
   to avoid over extrusion.
2) Reduction of the Intersection structure complexity by referencing
   the source lines.
2020-11-10 15:54:32 +01:00
Vojtech Bubnik
4aba12499c Improvement of AdaptiveFill:
1) Merging of collinear infill lines separated by a thin gap created
   by trimming with the boundary polygon.
2) Sorting of the T-joints separately to the left / right of the common
   line.
3) Trimming self intersections of the anchor lines.
4) Dropping of very short segments, not anchoring short segments.
2020-11-10 13:56:12 +01:00
Vojtech Bubnik
4976ef1194 Fix of the previous Adaptive Cubic infill refactoring
plus couple of fixes of the old logic.
2020-11-06 16:24:15 +01:00
Vojtech Bubnik
66601320b8 Adaptive Cubic infill with anchors: Trimming anchors with not only
with a neighbor T-joint line, but also with other crossing lines.
2020-11-06 08:56:53 +01:00
Vojtech Bubnik
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
Vojtech Bubnik
9ec5a13381 Merge remote-tracking branch 'remotes/origin/master' into lh_adaptive_infill_hooks 2020-11-03 15:07:38 +01:00
Vojtech Bubnik
c1d72c89c6 Optimized for reduced memory allocation and clarity. 2020-10-29 11:37:28 +01:00
Vojtech Bubnik
3252f3cdc6 Renamed Line::offset to extend
Don't use unscaled constants! What if the scaling constant changes
in the future?
2020-10-20 09:17:26 +02:00
Lukáš Hejl
5b3d1139e2 Fix another compiler warnings 2020-10-12 00:17:17 +02:00
Lukáš Hejl
9f83aa4dac Fix compiler warning and fix a bug in connecting infill using hooks 2020-10-11 23:31:59 +02:00
Lukáš Hejl
a84ce15326 Refactoring of the adaptive infill using hooks 2020-10-11 03:46:11 +02:00
Lukáš Hejl
d1355d0f8d Orient hooks in the direction of the adjacent extrusion line 2020-10-10 22:38:22 +02:00
Lukáš Hejl
caecc9283e Rework of hooks adding 2020-10-10 22:25:51 +02:00
Lukáš Hejl
fe181fef03 The length of the hook is derived from spacing 2020-10-10 21:34:04 +02:00
Vojtech Bubnik
05d388483c Renamed monotonous infill to monotonic. 2020-10-05 16:38:28 +02:00
Lukáš Hejl
bc857cbc76 Connect infill with perimeters using hooks 2020-10-02 11:15:55 +02:00
Lukáš Hejl
6394055ace Connect lines in the adaptive infill using hooks 2020-10-02 04:18:44 +02:00
Lukáš Hejl
4b02e888ee Fix crash in adaptive infill when an extrusion line width is zero.
When an extrusion line width is set to zero, then an extrusion line width is calculated from nozzle diameter.
2020-09-25 09:54:27 +02:00
Vojtech Bubnik
56e6d10a86 Adaptive Cubic infill:
1) Fixed a wrong offset when extracting infill lines from the octree.
2) Added a variant for testing triangle in a bounding sphere
   when buildind the octree. Currently not used as the box test
   is more tight.
3) "Bridging infill" regions are now triangulated and used to densify
   the octree as well to support the bridging infill correctly.
2020-09-22 08:53:45 +02:00
Vojtech Bubnik
876e5bc897 Fixed crash in Adaptive Cubic infill if just a single line was extracted.
New function to chain lines, however not used by the Adaptive Cubic infill.
2020-09-21 11:10:57 +02:00
Lukas Matena
2992c71798 Fix build on Linux 2020-09-18 13:37:37 +02:00
Vojtech Bubnik
0d4308538b Adaptive infill:
Fixing compilation on Linux,
WIP: Better chainining of infill lines.
2020-09-18 13:35:35 +02:00
Vojtech Bubnik
1e9a3cab55 Adaptive infill: Reshuffled the namespaces. 2020-09-18 10:53:50 +02:00
Vojtech Bubnik
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
Lukáš Hejl
693aac1f3f Fix compiler warnings and failing compilation on macOS 2020-09-10 22:57:58 +02:00
Lukáš Hejl
bfe47c1af0 Fix rotation in support cubic infill 2020-09-10 22:30:49 +02:00
Lukáš Hejl
dc698c2bb1 Move support cubic infill to separate class.
Support infill is enabled in the GUI.
2020-09-10 16:53:08 +02:00
Lukáš Hejl
dfd1351c9a A prototype of adaptive support infill 2020-09-10 14:55:48 +02:00
Lukáš Hejl
dd2fe22f05 Construct octree based on inserted points 2020-09-10 14:52:26 +02:00
Lukáš Hejl
bddca650a9 Move rotation from building octree to infill generating 2020-09-10 14:52:21 +02:00
Vojtech Bubnik
b7ebee01aa Refactoring of adaptive cubic infill:
Don't create an octree for the infill if it is not needed.
2020-09-09 15:55:06 +02:00
Lukáš Hejl
3ddeac598a Check if exist any boundary polyline 2020-09-07 09:14:06 +02:00
Lukáš Hejl
1c0a4aaa9b Octree representation rework 2020-09-03 19:21:55 +02:00
Lukáš Hejl
1e73ab0202 Fix bug in lines merging 2020-09-03 14:28:25 +02:00
Lukáš Hejl
e245c7e787 Connect infill to perimeters 2020-09-03 13:05:28 +02:00
Lukáš Hejl
f0a8f736e3 Code cleanup 2020-09-03 11:56:41 +02:00
Lukáš Hejl
fb7cf3dc48 Octree's first cube depends on model size. 2020-09-03 08:04:05 +02:00
Lukáš Hejl
7363156063 Fix crash on inconsistent input 2020-08-30 20:38:07 +02:00
Lukáš Hejl
49830f2212 Fix discontinuous extrusion lines for adaptive infill 2020-08-27 13:04:53 +02:00
Lukáš Hejl
87244c6b81 Switch to smart pointers 2020-08-27 07:28:43 +02:00
Lukáš Hejl
f014afb08c Polylines merging 2020-08-27 01:59:35 +02:00
Lukáš Hejl
0b6841264c Add function for check existence of triangle in define radius 2020-08-26 23:28:52 +02:00
Lukáš Hejl
923687e06f Generating polylines from octree 2020-08-26 22:18:51 +02:00
Lukáš Hejl
e4aea124cf Building octree based on distance from mesh 2020-08-26 18:15:59 +02:00