Commit Graph

645 Commits

Author SHA1 Message Date
Tiago Conceição e76d0f2c01 Layer issue track bar: Use issue type color (Configurable) 2021-09-18 01:16:18 +01:00
Tiago Conceição e424d3b968 Material ml calculation was calculating a bad value for PhotonWorkshop files 2021-09-18 00:28:25 +01:00
Tiago Conceição fe663cb9ff Better NonZeroPixelCount calculation 2021-09-18 00:27:43 +01:00
Tiago Conceição c6a7489359 Add UI for repair suction cups 2021-09-17 23:28:39 +01:00
Tiago Conceição f66687cabc Merge pull request #296 from tslater2006/master
Additional features around Suction Cups
2021-09-17 21:50:28 +01:00
tslater2006 400f46202d Refactor suction cup grouping logic
This commit removes the Parent/Child issue structures that were added to Issue, and instead opts for a more lean approach to determining the layers affected by an operation. Instead of building out the entire parent/child tree for ever single suction cup issue, we know only calculate what we need when we need it.

During a repair operation, we calculate only the suction cup issues that have no overlapping suction cup issue below it. For "delete issue" behavior we only calculate the suction cup issues that overlap the selected on in both directions (following that direction until no more overlaps are found).
2021-09-16 22:40:36 -05:00
tslater2006 12222827b0 Address feedback on CheckContoursIntersect 2021-09-16 19:53:03 -05:00
tslater2006 914e454bf9 Ability to remove suction cup issues
You can now remove suction cups from the reported issues. It will remove the selected issue as well as any others that are connected. This will allow for users to remove suction cup issues they do not wish to be fixed via auto repair (when available).
2021-09-16 18:59:07 -05:00
tslater2006 1365a9da72 First pass at a suction cup repair operation
Currently disabled by default, this needs a corresponding UI component to toggle on/off, as well as a configuration setting for the size of the hole to drill.
2021-09-16 18:58:05 -05:00
tslater2006 447711575a Maintain Suction Cup layer heirarchy
This change makes each suction cup issue know its parent (if applicable) and its children (if applicable). This is useful to group connected suction cup issues for later use (possible repair)
2021-09-16 18:56:23 -05:00
tslater2006 802d7fa607 Add new Debug layer issue type for development purposes 2021-09-16 18:55:11 -05:00
tslater2006 78a10570a8 Add helper function to determine if contours intersect
This method determines a minimum bounding box that can contain both contours, it then draws each contour to its on Mat, offset appropriately for the determined bounding rectangle. A bitwise AND then checks to see if there is any overlap.
2021-09-16 18:54:37 -05:00
Tiago Conceição 459e7ca0fa v2.22.0
- **UI:**
   - (Add) Context menu for ROI button at status bar with the following:
      - Mask: Select layer positive areas
      - Mask: Select layer hollow areas
      - ROI: Select model volume
      - ROI: Select layer volume
      - Clear Mask
      - Clear ROI
   - (Add) Allow to choose custom locations for "Send to"
   - (Add) Network remote printers: Send files remotely directly to printer
   - (Add) Layer image shortcut: Right-click + ALT + CTRL on a specific object to select all it enclosing areas as a Mask
   - (Improvement) Redesign numerical input box with value labels into the box
   - (Improvement) Layer tracker highlight issues: Scale line stroke to make sequential layers with issues shows all togther as a group
   - (Fix) Outline - Hollow areas: Not outlining the second closing contour for contours with child
   - (Fix) Pixel editor - Eraser: It was selecting the whole blob even if have inner parents
   - (Fix) Setting window: When open it will change tabs quickly to fix the windows height/scroll problem
   - (Fix) Minor problems with autosizes on some input boxes
- **Tools:**
   - **Import layers:**
      - (Add) 'MergeMax' to import type (#289)
      - (Add) 'AbsDiff' to import type
      - (Add) Description of operations on the combo box
   - **Dynamic Lifts:**
      - (Add) Set methods: Traditional and FullRange (#291)
      - (Improvement) Rearrange the layout
      - (Fix) Normal pixels were being used to calculate bottom lift speed
   - (Improvement) Solidify: Area threshold are now calculated by the real area instead of rectangle area
   - (Improvement) Dynamic layer height: Perform the maximum of layer pixels instead of sum to improve files with AA and prevent glare
- **Resin traps & Suction cups:**
   - **By Timothy Slater [tslater2006] (#292):**
   - (Add) Suction cups detection: Air trapped inside hollow areas that create a suction force. Calculated during resin trap algorithm.
           This issues will not be auto fixed and require a vent hole as proper fix
   - (Improvement) New and improved algorithm for resin trap detection
- **Settings:**
   - (Add) Option: Loads the last recent file on startup if no file was specified
   - (Change) Resin trap hightlight default color
   - (Fix) Unable to set resin trap threshold to 0 (disabled)
- (Improvement) Better random generation for benchmark
- (Improvement) Allow to cancel the new version download
- (Improvement) Better version checker and file download methods
- (Fix) Disable Centroids by default on settings
- (Fix) Settings: Automations were not being cloned when required
- (Upgrade) .NET from 5.0.9 to 5.0.10
2021-09-16 21:50:35 +01:00
Tiago Conceição 23060e618b Update LayerManager.cs 2021-09-16 21:24:51 +01:00
Tiago Conceição f976001d43 Utilities 2021-09-16 20:57:47 +01:00
Tiago Conceição 5a96f4c2e9 Var names 2021-09-16 18:03:44 +01:00
Tiago Conceição e00cffffc2 Update UVtools.InstallerMM.wxs
.NET 5.0.10
2021-09-16 03:23:25 +01:00
Tiago Conceição 21d19da1bc Finish styling 2021-09-16 03:21:13 +01:00
Tiago Conceição 1e82c2290f Change title for resin traps 2021-09-15 06:58:55 +01:00
Tiago Conceição 38c8fa97ae Conservative default 2021-09-15 06:51:01 +01:00
Tiago Conceição 71e51b13b3 Add extra check for stroke 2021-09-15 06:36:16 +01:00
Tiago Conceição 2f9e432559 Fix first and last layer issue stroke 2021-09-15 06:34:32 +01:00
Tiago Conceição 50274aaa6c Layer tracker highlight issues: Scale line stroke to make sequential layers with issues shows all togther as a group 2021-09-15 06:30:17 +01:00
Tiago Conceição fe18398e11 Layout & Overlap resin trap 2021-09-15 06:13:54 +01:00
Tiago Conceição 90d2f911c1 Allow UMats 2021-09-14 20:05:05 +01:00
Tiago Conceição 60db062e70 Update UserSettings.cs 2021-09-14 18:13:28 +01:00
Tiago Conceição e3ad5a79fa Parallel improvements on Resin traps 2021-09-14 18:13:23 +01:00
Tiago Conceição b06a224236 Cache layers in parallel & dispose vectors 2021-09-14 07:11:16 +01:00
Tiago Conceição fe7068ad45 Merge pull request #294 from tslater2006/master
@tslater2006 Add missing null checks
2021-09-14 02:44:25 +01:00
tslater2006 72eafdf254 Merge branch 'master' of https://github.com/tslater2006/UVtools 2021-09-13 20:41:40 -05:00
tslater2006 9dc2df3a5f Add missing null checks
Some sliced files can contain a completely empty layer. In such cases there are no "externals" and no "hollows", so appropriate null checks are needed.
2021-09-13 20:40:34 -05:00
Tiago Conceição 67b4bff550 Better handling of issues render 2021-09-14 02:34:46 +01:00
Tiago Conceição e6ca8fb17f Better defaults 2021-09-14 02:34:33 +01:00
Tiago Conceição d1a02243a4 Merge pull request #293 from tslater2006/master
fix Airmap logic bug / suction cup bug
2021-09-14 02:20:21 +01:00
tslater2006 6f9c92808e fix Airmap logic bug / suction cup bug
Adjust airmap logic during 2nd pass to account for contours that were determined to be air-connected during first pass.

Always move resolved resin traps to suction traps, and only conditionally report them as issues if configured to do so. Suction traps are used during a cleanup stage for resin traps, so needs to be populated no matter what, there is no additional processing penalty for this.
2021-09-13 20:18:03 -05:00
Tiago Conceição 7e30663a96 Improvements on new algorithm #292
- Refactorings
- Cleanup
- Simplifications
- Improve overall performance
- Calculate the real area and pass them to the issue
2021-09-13 23:08:34 +01:00
Tiago Conceição ab0f5937c7 Merge pull request #292 from tslater2006/master
New Resin Trap/Suction Cup detection algorithm
2021-09-13 19:48:18 +01:00
tslater2006 522d3c6c64 Merge branch 'sn4k3:master' into master 2021-09-13 13:14:32 -05:00
tslater2006 59646b71dd New Resin Trap/Suction Cup detection algorithm
The following is a novel implementation of resin/suction trap detection for MSLA sliced images It largely consists of 2 passes through the layers.

The 1st pass processes the layers from the bottom to the top, keeping track of what areas in the previous layer are air (or connected to air in some way). The initial air map is derived from the starting layer, by inverting the layer and then filling all external contours black (not air) which results in an inital air map of everything that is not solid, or inside a solid, being considered air. While traversing the layers, the air map is updated to include any new air regions, or hollow areas that intersect with the air map (since while they are not air, they are connected to air). Any regions that do not overlap the air map are declared resin traps.

The 2nd pass processes the layers from the top to the bottom, the initial air map differs from the 1st pass. For the 2nd pass, anything that is not solid is considered to be air (a bitwise not of the top layer is used). The airmap is updated per layer just like it was in the 1st pass, however we do not test all contours of the layer, only those that were marked as resin traps by  the 1st pass. This is acceptable because in the event we did test all hollow areas, and one of those was *not* detected on 1st pass, it must be air-accessible from the bottom. In the even that a contour we are testing does overlap the air map during the 2nd pass, it is cleared from the "resin trap" list and instead added to the "suction trap" list. This is to indicate that while there is access to air from the top, there are regions that could be affected by vacuum/suction forces during the print
2021-09-13 12:57:50 -05:00
Tiago Conceição 7705d3d757 Remove unnecessary mat 2021-09-13 18:15:38 +01:00
Tiago Conceição 7b34ec5d73 Perform the maximum of layer pixels instead of sum to improve files with AA and prevent 2021-09-13 17:10:05 +01:00
Tiago Conceição 1e5f94f5a8 LayerIssue to support contours 2021-09-13 03:48:33 +01:00
Tiago Conceição 00e0d4c9ff Prepare UI for suction cup configuration 2021-09-13 02:01:40 +01:00
Tiago Conceição 43a3031af2 Import layers
- (Add) 'MergeMax' to import type (#289)
- (Add) 'AbsDiff' to import type
- (Add) Description of operations on comobo box
2021-09-13 01:38:12 +01:00
Tiago Conceição 553d74d920 More contour utility 2021-09-13 01:37:19 +01:00
Tiago Conceição a1009671b7 Merge pull request #289 from FinnNk/import-max
Add pixelwise max to import layer options
2021-09-13 00:56:28 +01:00
Finn Neuik 6f2598f80e Add pixelwise max to import layer options 2021-09-12 23:21:31 +01:00
Tiago Conceição 0aa5e18f4e Update EmguContours.cs 2021-09-12 20:53:34 +01:00
Tiago Conceição 7d1045ed56 Update EmguContours.cs 2021-09-12 20:51:56 +01:00
Tiago Conceição 0af27b1402 Refactorings 2021-09-12 20:38:07 +01:00