Lukáš Hejl
3d87904e66
Fixed the bottom layer of multi-material painted objects sunken below the print bed ( #7107 ).
2021-10-25 14:59:05 +02:00
Lukáš Hejl
10f24119d0
Fixed the propagation of painted top and bottom layers for mirrored objects in multi-material segmentation.
2021-10-25 08:43:30 +02:00
Lukáš Hejl
0f9a9de745
Fixed darker colors of objects inside multi-material gizmo when objects are mirrored.
2021-10-25 08:41:41 +02:00
Lukáš Hejl
0791a2b3ed
Fix of #7104 (dimples in perimeters after multi-material segmentation)
2021-10-22 11:58:46 +02:00
Lukáš Hejl
978fff1d31
Merge branch 'lh_clipping_plane_painting'
2021-10-21 08:51:19 +02:00
Lukáš Hejl
d8a0d0523f
Allowed painting in the FDM supports, seam, and multi-material gizmo to only triangles not clipped by a clipping plane.
2021-10-21 08:49:24 +02:00
Lukáš Hejl
5a1809579e
Fixed unintended space after ImGui::SliderFloat in the hollow and sla supports gizmos.
2021-10-19 12:54:46 +02:00
Lukáš Hejl
aa47729c47
Added a missing include (GCC 11.1).
2021-10-19 11:53:21 +02:00
Lukáš Hejl
25a3ab255b
Merge branch 'lh_avoid_crossing_perimeters_offset'
2021-10-18 12:55:06 +02:00
Lukáš Hejl
4d47e9a184
Allow travels processed by the avoid crossing perimeters move further away from the outer perimeter.
2021-10-18 12:51:20 +02:00
Lukáš Hejl
c660091bfa
Merge branch 'lh_fdm_supports_smart_fill'
2021-10-18 11:35:39 +02:00
Lukáš Hejl
0c2d9f01a6
Fixed z-fighting between contour around the area selected by smart fill and painted triangles inside the FDM support painting gizmo.
2021-10-18 11:35:13 +02:00
Lukáš Hejl
b45675b4e1
Follow-up of 6194e67e68 - Separated the part that computed triangles normals and lighting inside the fragment shader into a separate shader mm_gouraud, which is only used for the multi-material painting gizmo.
2021-10-18 11:35:13 +02:00
Lukáš Hejl
912f73d79c
Fixed the positioning of the supports painting gizmo.
2021-10-18 11:33:47 +02:00
Lukáš Hejl
552c42d466
Merge branch 'lh_fdm_supports_gizmo'
2021-10-18 11:10:54 +02:00
Lukáš Hejl
6f3baf9262
Added tooltips to the support painting gizmo. Used multi-line text for the label "Highlight overhang by angle".
2021-10-18 10:57:57 +02:00
Lukáš Hejl
b2fc50c9d9
Small refactoring of showing tooltips in gizmos.
2021-10-18 10:56:50 +02:00
Lukáš Hejl
6f6f6de506
Added an option to limit painting to triangles only highlighted by "Highlight by angle" in the support painting gizmo.
2021-10-18 10:54:31 +02:00
Lukáš Hejl
2f9ce6bedb
Fixed incorrect color assignment in multi-material segmentation caused by intersecting edges due to post-processing of Voronoi diagram.
...
This issue was occurring mainly on the cylinder objects.
2021-10-14 09:39:23 +02:00
Lukáš Hejl
b99be85187
Fixed a warning.
2021-10-07 13:36:06 +02:00
Lukáš Hejl
82bf9c158a
Optimized multi-material segmentation to construct Voronoi diagrams only for layers that have more than one color. If the whole layer is painted using the same color, it is not needed to construct a Voronoi diagram.
2021-10-07 13:16:21 +02:00
Lukáš Hejl
d2cd14ba7d
Merge branch 'lh_fdm_supports_smart_fill'
2021-10-07 13:14:40 +02:00
Lukáš Hejl
d6d575f607
Renamed the brush "Pointer" to "Triangles" in the multi-material painting gizmo, and in the FDM supports painting gizmo.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
ebdc69bdc9
Fixed the positioning of the painting gizmos.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
542ba1bb9a
Added rendering of smart fill and contour around selected areas for the FDM supports painting gizmo.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
2b59a16dc7
Refactored rendering of the contour around areas selected by smart fill to prepare it for the FDM supports painting gizmo.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
8c9c8a9cc4
Prepared the FDM support gizmo for smart fill.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
99edfd22ce
Improved the alignment of tool type and brush type in the multi-material gizmo.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
dfb4ccdb13
Reworked seam painting gizmo to the same layout as multi-material painting gizmo.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
925d3fad1f
Fixed the wrong calculation of caption text size in all painting gizmos, which could lead to showing unintended space after ImGui::SliderFloat.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
6012bf1e03
Removed unintended space after ImGui::SliderFloat in all painting gizmos.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
992a279bef
Removed the vertical space in the below information about how to use gizmo for all painting gizmos.
2021-10-07 13:12:36 +02:00
Lukáš Hejl
30d13c99b7
Added a missing include (GCC 11.1).
2021-09-21 22:41:55 +02:00
Lukáš Hejl
40e4116d9a
Added a missing include (GCC 11.1).
2021-09-21 10:45:57 +02:00
Lukáš Hejl
1c6ecd9c1a
Replaced atof and atoi inside 3MF attribute parsing with fast_float::from_chars and boost::spirit that are faster.
2021-09-14 11:09:43 +02:00
Lukáš Hejl
4f5dddbf11
Merge branch 'lh_gcode_export'
2021-09-11 00:56:34 +02:00
Lukáš Hejl
e520454c3e
Fixed unit tests after the previous commit.
2021-09-11 00:54:30 +02:00
Lukáš Hejl
d2a185ddb6
Optimized export of floating-point value inside emit_axis.
...
Change the behavior of generated G-code commands. Now all redundancy padding zeros are removed, which makes G-code a little bit smaller.
2021-09-11 00:54:30 +02:00
Lukáš Hejl
ad65366ac7
Added fast_float library as a replacement for std::from_chars and strtod.
2021-09-11 00:54:30 +02:00
Lukáš Hejl
e3ac2a9e45
Fixed Perl unit tests after 34c4b74af4.
2021-09-11 00:53:45 +02:00
Lukáš Hejl
0bc77cef3e
Fixed build on Linux and macOS that was failing because of using std::to_chars and std::from_chars with floating-point values.
...
The old version of GCC and Clang support only integers to be passed to std::to_chars and std::from_chars. macOS older version of Clang doesn't support std::from_chars at all. So for Linux and macOS, it was replaced std::from_chars with strtod and temporarily was replace std::to_chars with snprintf.
2021-09-07 07:43:17 +02:00
Lukáš Hejl
3b4d10656c
Renamed 'Seed fill' to 'Smart fill'.
2021-09-01 14:32:34 +02:00
Lukáš Hejl
8ad109235b
Added a missing include (GCC 11.1).
2021-09-01 14:28:42 +02:00
Lukáš Hejl
ccf671dcc9
Added versioning of the structure of stored data for all three painting gizmos (fdm supports, seam and multi-material).
2021-08-31 15:05:11 +02:00
Lukáš Hejl
1835dae296
Fixed a bug that the skirt was generated too far from the brim for some objects.
2021-08-31 14:54:37 +02:00
Lukáš Hejl
57f7b49223
Corrected undo/redo snapshot name when entering or leaving multi-material painting gizmo.
2021-08-30 10:41:41 +02:00
Lukáš Hejl
95e4ab9460
Fixed the issue that an object disappeared in a multi-material painting gizmo when the object was almost completely sunk under the bed.
...
Object disappearance was caused by calling glPolygonOffset for rendered triangles in the multi-material painting gizmo to resolve z-fighting between painted triangles and contours around selected areas using seed/bucket fill.
2021-08-26 12:08:21 +02:00
Lukáš Hejl
1c25078bc3
Added a missing include (GCC 11.1).
2021-08-26 08:43:47 +02:00
Lukáš Hejl
731ac9287e
Added a missing include (GCC 11.1)
2021-08-13 12:00:55 +02:00
Lukáš Hejl
2ab0ea4c47
Merge branch 'lh_mm_segmentation'
2021-08-10 22:30:45 +02:00
Lukáš Hejl
18cff61bd2
Reworked visualization of selected triangles by seed fill and bucket fill inside the multi-material painting gizmo. Now is drawn boundary around a selected area, and also all triangles inside the selected area are drawn with a darker color.
2021-08-10 21:38:48 +02:00
Lukáš Hejl
e5ce748b10
Added missing includes (GCC 11.1)
2021-08-10 21:37:10 +02:00
Lukáš Hejl
58f83b5e6a
The offset is applied after the elephant food compensation. The value of the brim offset is now also measured from the object after the elephant foot compensation. Thus, the brim offset set to zero means that the brim will touch the object even if elephant foot compensation is enabled.
2021-08-10 09:44:39 +02:00
Lukáš Hejl
b174dacc85
Added a missing include (GCC 11.1)
2021-08-07 08:29:32 +02:00
Lukáš Hejl
dc4afb5bfc
Merge branch 'lh_mm_segmentation'
2021-08-06 16:47:13 +02:00
Lukáš Hejl
dd55b55853
Swapped the position of seed fill and bucket fill inside the multi-material gizmo. Changed the default value for the seed fill angle.
2021-08-06 16:46:48 +02:00
Lukáš Hejl
56d4ba7a29
Fixed the issue when the object was selected by seed fill or bucket fill could stay selected when the painting tool was switched to brush.
2021-08-06 16:46:48 +02:00
Lukáš Hejl
666cdeecd9
Forced recomputation of seed fill selected areas when the seed fill angle is changed by ALT+mouse wheel.
2021-08-06 16:46:48 +02:00
Lukáš Hejl
cf2a7f4dfa
Fixed the possibility of changing brush size in the multi-material gizmo by ALT+mouse wheel when brush for painting single triangles is selected.
2021-08-06 16:46:48 +02:00
Lukáš Hejl
9b19060334
Merge branch 'lh_mm_segmentation'
2021-08-03 13:07:00 +02:00
Lukáš Hejl
9e5fc2e713
XY size compensation is ignored when the object is also painted using the multi-material painting gizmo. A user is also notified about it.
2021-08-03 13:03:06 +02:00
Lukáš Hejl
742a373c1f
Added invalidation of the sliced object when gap-fill enabled/disabled if the object is painted using the multi-material painting gizmo.
...
Filtering of unprintable regions in multi-material segmentation depends on if gap-fill is enabled or not. So sliced object is invalidated when gap-fill was enabled/disabled by option "gap_fill_enabled" or by changing "gap_fill_speed" to force recomputation of the multi-material segmentation.
2021-08-03 13:03:06 +02:00
Lukáš Hejl
b16aada962
Added clipping of finite Voronoi edges that have coordinates that don't fit inside type coord_t.
2021-08-03 13:03:06 +02:00
Lukáš Hejl
93b86da770
Fixed the wrong threshold in the multi-material segmentation.
2021-08-03 13:03:06 +02:00
Lukáš Hejl
d13c08837c
Fixed an issue that some triangles weren't selected when bucket fill was used in the multi-material painting gizmo.
2021-08-03 13:03:06 +02:00
Lukáš Hejl
5bd14cf83a
Fixed the compiler warning.
2021-08-03 10:16:52 +02:00
Lukáš Hejl
bad51cdb52
OSX specific: Fixed darker colors of objects inside multi-material gizmo on macOS running on Arm64 CPU.
...
For Apple's on Arm CPU computed triangle normals inside fragment shader using dFdx and dFdy has the opposite direction. Because of this, objects had darker colors inside the multi-material gizmo.
Based on https://stackoverflow.com/a/66206648 , the similar behavior was also spotted on some other devices with Arm CPU.
2021-08-02 14:59:03 +02:00
Lukáš Hejl
5229acc693
Fixed compilation on Linux and macOS.
2021-07-31 12:10:38 +02:00
Lukáš Hejl
9f0c6576f6
Added missing includes (GCC 11.1)
2021-07-29 13:38:10 +02:00
Lukáš Hejl
bfad83e796
Merge branch 'lh_mm_segmentation'
2021-07-29 11:46:41 +02:00
Lukáš Hejl
da3a0c6332
Fixed a crash in the multi-material segmentation when projected lines are outside of the BoundingBox used for EdgeGrid.
2021-07-29 11:45:02 +02:00
Lukáš Hejl
f577350f1f
Reworked bucket fill so that all neighboring triangles are computed based on information about triangle neighbors.
2021-07-29 11:45:02 +02:00
Lukáš Hejl
6d0e5d3b9c
Enabled to set "Maximum width of a segmented region" per object.
2021-07-29 11:45:02 +02:00
Lukáš Hejl
37f5f12f52
Replaced unnecessary double storing of edges in a graph for the multi-material segmentation by storing indices into a shared array of arcs.
2021-07-29 11:45:02 +02:00
Lukáš Hejl
216589fdb1
Get rid of unnecessary double storage of processed input polygons in the multi-material segmentation as ExPolygons and also as Polygons. All processed input polygons are now stored as ExPolygons.
2021-07-29 11:45:02 +02:00
Lukáš Hejl
38866b65b0
Get rid of unnecessary double calling of TriangleSelector::reset() in some cases when TriangleSelector::deserialize() is called.
2021-07-29 11:45:01 +02:00
Lukáš Hejl
2569da95d5
Parallelized the projection of painted regions in multi-material segmentation.
2021-07-29 11:45:01 +02:00
Lukáš Hejl
7a60f1793c
Fixed a possible overflowing of a painted area to an unpainted area in multi-material segmentation.
...
It was reworked graph generation for multi-material segmentation. Now only oriented arcs in one direction are added to the graph for input polygons. This direction matches the direction of the lines in the input polygons.
2021-07-29 11:45:01 +02:00
Lukáš Hejl
4d2bee36e5
Fixed some compiler warnings.
2021-07-21 12:54:28 +02:00
Lukáš Hejl
5405ab1986
Optimized seed fill and bucket fill selection to recompute selection only in case the cursor is pointing on a non-selected triangle.
2021-07-19 11:30:40 +02:00
Lukáš Hejl
5b67fafb75
Fixed a crash in the multi-material gizmo when bucket fill is selected.
2021-07-19 11:30:35 +02:00
Lukáš Hejl
b6b52fee73
Fixed an issue when the object in the multi-material gizmo had the wrong default color when the multi-material gizmo was first time opened after loading a painted 3MF file with different extruders colors than in the printer profile in Slicer.
2021-07-16 11:39:50 +02:00
Lukáš Hejl
ab7c758881
Merge branch 'lh_mm_gizmo_bucket_fill'
2021-07-16 09:27:18 +02:00
Lukáš Hejl
51b94f4747
Added the bucket fill tool into the multi-material gizmo. Also, the multi-material gizmo was reworked to show only options applicable for a chosen painting tool.
2021-07-16 09:19:40 +02:00
Lukáš Hejl
389ccf6d92
Fixed compilation in debug mode by removing the forgotten assert.
2021-07-13 12:56:01 +02:00
Lukáš Hejl
ce59e68be1
Merge branch 'lh_mm_gizmo_rendering'
2021-07-13 11:36:42 +02:00
Lukáš Hejl
6194e67e68
Triangle normals and lighting are computed inside the fragment shader for the multi-material painting gizmo.
...
It results in a six-fold reduction of the amount of data transferred into GPU because there is no need to duplicate vertices for every triangle. Also, normals aren't needed to be transferred to GPU.
2021-07-13 11:23:36 +02:00
Lukáš Hejl
a467d0e30e
Default object color is shown in the multi-material painting gizmo when the user switches to a printer with fewer extruders than the number of extruders used to paint the object.
2021-07-13 11:23:36 +02:00
Lukáš Hejl
c0092a7b0a
Speed up the rendering of triangles in painting gizmos by only copying triangle data to the GPU when triangles were changed by painting.
2021-07-13 11:23:36 +02:00
Lukáš Hejl
569b7d7dab
Removed unnecessary backward compatibility with old multi-material painted 3MF from the early stage of development.
2021-07-12 13:37:33 +02:00
Lukáš Hejl
f78efa99fe
Fixed an issue where seed fill selection stuck displayed when the mouse was moving inside multi-material gizmo when the gizmo was overlapping the model.
2021-07-12 13:21:10 +02:00
Lukáš Hejl
8da083b702
Fixed compilation on Linux
2021-06-30 08:56:35 +02:00
Lukáš Hejl
f10ec4d21c
Merge branch 'lh_multi_material_segmentation_fix'
2021-06-28 08:11:17 +02:00
Lukáš Hejl
cb93c8ce99
Used function smooth_outward in multi-material segmentation to get rid of artifacts arisen after merging multi-volume objects.
2021-06-28 08:09:06 +02:00
Lukáš Hejl
a426093f12
Replaced boost::rtree in multi-material segmentation with much faster ClosestPointInRadiusLookup.
2021-06-28 08:09:06 +02:00
Lukáš Hejl
ce738102c6
Optimized the projection of painted triangles in multi-material segmentation. Added heuristics to skip most of the expensive calculations in cases where it is certain that performing these calculations would be useless.
2021-06-28 08:09:06 +02:00
Lukáš Hejl
48789e5ae1
Added a limitation on the number of usable extruders in the multi-material gizmo. If a printer has more extruders than this limit, a notification about it is shown.
2021-06-28 08:09:06 +02:00
Lukáš Hejl
23b26cb3f3
Fixed the issue where the object wasn't displayed after pressing the ESC key in the multi-material painting gizmo.
...
key in the multi-material painting gizmo.
Fixed also a similar issue in support and seam gizmos where an object was displayed with the wrong color after pressing the ESC key.
2021-06-28 08:09:06 +02:00
Lukáš Hejl
684b66125e
Fixed an issue where multi-material segmentation ignored the last extruder.
2021-06-17 19:26:40 +02:00
Lukáš Hejl
2e54648b97
Fixed a multi-material painting gizmo crash when extruders colors aren't initialized, which happens when switching between SLA and FDM printer.
2021-06-16 17:05:24 +02:00