Commit Graph

428 Commits

Author SHA1 Message Date
tamasmeszaros
bf1303b9cf Fix double parallelization 2022-07-29 13:05:39 +02:00
tamasmeszaros
e6d49b75de Make branching tree algorithm cancellable 2022-07-29 13:05:39 +02:00
tamasmeszaros
d7c5243300 Further increase widening scale 2022-07-29 13:05:39 +02:00
tamasmeszaros
63a58ce1ad Require higher values for widening factor to have the same effect 2022-07-29 13:05:39 +02:00
tamasmeszaros
95374f9ed4 Fix some crashes
Fix minor bugs
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
5d6d1f5234 Apply branch length setting from UI for branching tree 2022-07-29 13:05:39 +02:00
tamasmeszaros
4c3ba3f6bf Fix tree struts piercing model body
Free path between the anchor and the last bridge was not verified
2022-07-29 13:05:39 +02:00
tamasmeszaros
7705ecd5aa Fix indexing of heads after duplicate removal 2022-07-29 13:05:39 +02:00
tamasmeszaros
792779f2de Fix creation of unchecked diffbridge in branching tree 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
fd8fd77077 Improvements to widening strategy and branch length limitations
Also some refactoring
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
tamasmeszaros
a7e50b7a98 Generalize BoostAdapter for all Vec<> types and move out of SLA 2022-06-29 10:54:04 +02:00
tamasmeszaros
f90d62c771 Fix crash with a single support point 2022-06-29 10:52:48 +02:00
tamasmeszaros
d23f9d7674 Refactoring and performance optimization for support trees in SLA 2022-06-29 10:43:46 +02:00
tamasmeszaros
78124689c5 Fix excessive uptates to UI in sla rotation optimization 2022-05-30 11:17:34 +02:00
tamasmeszaros
fed317f27b Change std::nan("") to proper nan constants 2022-05-11 10:35:12 +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
tamasmeszaros
610e971373 Fix Fix triangle removal issues when using full narrow band of interior 2022-04-26 14:50:50 +02:00
tamasmeszaros
39a47e91f7 Fix failing test for hollowing 2022-04-26 14:50:50 +02:00
tamasmeszaros
d1b161b281 Hollowing voxel_scale now considers input model volume 2022-04-26 14:50:50 +02:00
tamasmeszaros
e405b0ef4a Cleanup 2022-04-26 14:50:50 +02:00
tamasmeszaros
1a6a2a0b9a 2.5x speedup of hollowing.
Triangle removal is slightly broken
2022-04-26 14:50:50 +02:00
PavelMikus
5c23d471de BSplines, Polynomial fitting 2022-04-25 12:42:51 +02:00
tamasmeszaros
b407540f26 Downgrade log message from sla support tree creation 2022-02-17 13:44:53 +01:00
tamasmeszaros
b6fe41d5ab Fixes for pwmx format PR 2022-02-14 14:42:47 +01:00
ole00
7685e70743 SLA: added pwmx format exporter
Pwmx format is used by Anycubic Photon Mono X printers.
File format structure and rle encoding implemented according to:
https://github.com/sn4k3/UVtools
https://github.com/ole00/pwmx_info
2022-02-12 12:55:22 +00:00
tamasmeszaros
72da90d28f WIP
wip
2022-02-03 16:10:03 +01:00
YuSanka
ced6d26917 Merge remote-tracking branch 'origin/master' into dev 2022-01-12 15:05:31 +01:00
tamasmeszaros
cac2a9f117 clean up obsolete includes 2022-01-07 14:27:43 +01:00
tamasmeszaros
ac6611e374 Performance optimization for SLA rasterization step
Do not use a gamma function (a pow call for every pixel) if exponent is near 1.0
2022-01-07 10:18:39 +01:00
tamasmeszaros
ce81c02049 Fixing corrupted SLA pad
fixes SPE-1157
2022-01-07 10:09:20 +01:00
Filip Sykala
f9bdde5603 Remove SimplifyMesh 2021-11-02 14:23:49 +01:00
tamasmeszaros
dc588e2db5 Pass previously set arc tolerance to concave hull 2021-10-21 12:22:15 +02:00
tamasmeszaros
39a6c13c81 Use proper morphological closing for pad creation. 2021-10-20 14:34:22 +02:00
Vojtech Bubnik
7ff76d0768 New ClipperUtils functions: opening(), closing() as an alternative
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.
2021-10-14 09:11:31 +02:00
Vojtech Bubnik
e185bf58b7 Replaced "Simple shorthands for smart pointers" shptr, uqptr, wkptr
with their original names. Using weird shorthands makes the code
unreadable for anyone but the original author.

template<class T> using shptr = std::shared_ptr<T>;
template<class T> using uqptr = std::unique_ptr<T>;
template<class T> using wkptr = std::weak_ptr<T>;
2021-10-04 16:56:26 +02:00
Lukas Matena
6a5feb818f Revert "Fixed volume transformations in SLA:":
The fix is not complete, it is better not to break it more than it was.

This reverts commit 6b25a9c836.
2021-09-24 13:03:56 +02:00
Lukas Matena
6b25a9c836 Fixed volume transformations in SLA:
Volume transformations were ignored in SLA mode. This did not matter for plain STLs
and PS own 3MF, because in those cases, the volume trafo was identity. Importing
a 3rd party 3MF leads to issues with support/holes placement and generation.
Fixes #6100 and #6744.
2021-09-24 12:14:44 +02:00
Vojtech Bubnik
8a2a9dba2f Eradicated admesh from TriangleMesh:
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.
2021-09-20 17:12:22 +02:00
Vojtech Bubnik
cab71073a1 Some reduction of unnecessary conversions when calling ClipperUtils. 2021-09-13 15:13:10 +02:00
Vojtech Bubnik
1c76df89ea Fix of paint on supports don't work for object that has been scaled up #6718
The triangle-ray intersection function used a hard coded epsilon,
which did not work for triangle meshes, that were either too small
or too large. Newly the epsilon may be provided to the AABBTreeIndirect
search functions externally and IndexedMesh calculates a suitable
epsilon on demand from an average triangle mesh edge length.
2021-08-27 21:04:18 +02:00
tamasmeszaros
a3b089eceb Remove misleading comment 2021-08-18 16:51:14 +02:00
tamasmeszaros
1672130d45 Remove code duplication, clarify naming of orientation searches 2021-08-18 16:48:51 +02:00
tamasmeszaros
74edeb147b Add min z height orientation search 2021-08-18 16:48:51 +02:00
tamasmeszaros
5e0cbbef83 Fix SLA support strut piercing into model 2021-08-18 09:36:01 +02:00
tamasmeszaros
24815381d2 Some improvements to "less supports" optimizer 2021-08-17 15:40:01 +02:00
tamasmeszaros
8b5a63eaf8 Make the input mesh transformation consistent.
Also add some comments
2021-08-16 11:29:48 +02:00