Skip to content

Commit

Permalink
v0.4.2.1
Browse files Browse the repository at this point in the history
* (Add) PrusaSlicer Printer "AnyCubic Photon"
* (Add) PrusaSlicer Printer "Elegoo Mars Saturn"
* (Add) PrusaSlicer Printer "Elegoo Mars"
* (Add) PrusaSlicer Printer "EPAX X10"
* (Add) PrusaSlicer Printer "EPAX X133 4K Mono"
* (Add) PrusaSlicer Printer "EPAX X156 4K Color"
* (Add) PrusaSlicer Printer "Peopoly Phenom L"
* (Add) PrusaSlicer Printer "Peopoly Phenom Noir"
* (Add) PrusaSlicer Printer "Peopoly Phenom"
* (Add) PrusaSlicer Printer "Phrozen Shuffle 4K"
* (Add) PrusaSlicer Printer "Phrozen Shuffle Lite"
* (Add) PrusaSlicer Printer "Phrozen Shuffle XL"
* (Add) PrusaSlicer Printer "Phrozen Shuffle"
* (Add) PrusaSlicer Printer "Phrozen Sonic"
* (Add) PrusaSlicer Printer "Phrozen Transform"
* (Add) PrusaSlicer Printer "QIDI Shadow5.5"
* (Add) PrusaSlicer Printer "QIDI Shadow6.0 Pro"
* (Add) "Detect" text to compute layers button
* (Add) "Repair" islands button on Islands tab
* (Add) "Highlight islands" button on layer toolbar
* (Add) Possible error cath on island computation
* (Add) After load new file layer is rotated or not based on it width, landscape will not rotate while portrait will
* (Improvement) Highlighted islands now also show AA pixels as a darker yellow
* (Improvement) Island detection now need a certain number of touching pixels to consider a island or not, ie: i can't lay on only one pixel
* (Fix) Island detection now don't consider dark fadded AA pixels as safe land
* (Fix) Epax X1 printer properties
  • Loading branch information
sn4k3 committed Jun 4, 2020
1 parent 6a2939b commit 7e18243
Show file tree
Hide file tree
Showing 30 changed files with 946 additions and 184 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## 04/06/2020 - v0.4.2.1 - Beta

* (Add) PrusaSlicer Printer "AnyCubic Photon"
* (Add) PrusaSlicer Printer "Elegoo Mars Saturn"
* (Add) PrusaSlicer Printer "Elegoo Mars"
* (Add) PrusaSlicer Printer "EPAX X10"
* (Add) PrusaSlicer Printer "EPAX X133 4K Mono"
* (Add) PrusaSlicer Printer "EPAX X156 4K Color"
* (Add) PrusaSlicer Printer "Peopoly Phenom L"
* (Add) PrusaSlicer Printer "Peopoly Phenom Noir"
* (Add) PrusaSlicer Printer "Peopoly Phenom"
* (Add) PrusaSlicer Printer "Phrozen Shuffle 4K"
* (Add) PrusaSlicer Printer "Phrozen Shuffle Lite"
* (Add) PrusaSlicer Printer "Phrozen Shuffle XL"
* (Add) PrusaSlicer Printer "Phrozen Shuffle"
* (Add) PrusaSlicer Printer "Phrozen Sonic"
* (Add) PrusaSlicer Printer "Phrozen Transform"
* (Add) PrusaSlicer Printer "QIDI Shadow5.5"
* (Add) PrusaSlicer Printer "QIDI Shadow6.0 Pro"
* (Add) "Detect" text to compute layers button
* (Add) "Repair" islands button on Islands tab
* (Add) "Highlight islands" button on layer toolbar
* (Add) Possible error cath on island computation
* (Add) After load new file layer is rotated or not based on it width, landscape will not rotate while portrait will
* (Improvement) Highlighted islands now also show AA pixels as a darker yellow
* (Improvement) Island detection now need a certain number of touching pixels to consider a island or not, ie: i can't lay on only one pixel
* (Fix) Island detection now don't consider dark fadded AA pixels as safe land
* (Fix) Epax X1 printer properties

## 03/06/2020 - v0.4.2 - Beta

* (Add) Zoom times information
Expand Down
17 changes: 17 additions & 0 deletions ImportPrinters.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ SET files[0]=EPAX X1.ini
SET files[1]=Phrozen Sonic Mini.ini
SET files[2]=Zortrax Inkspire.ini
SET files[3]=Nova3D Elfin.ini
SET files[4]=AnyCubic Photon.ini
SET files[5]=Elegoo Mars.ini
SET files[6]=Elegoo Mars Saturn.ini
SET files[7]=EPAX X10.ini
SET files[8]=EPAX X133 4K Mono.ini
SET files[9]=EPAX X156 4K Color.ini
SET files[10]=Peopoly Phenom.ini
SET files[11]=Peopoly Phenom L.ini
SET files[12]=Peopoly Phenom Noir.ini
SET files[13]=QIDI Shadow5.5.ini
SET files[14]=QIDI Shadow6.0 Pro.ini
SET files[15]=Phrozen Shuffle.ini
SET files[16]=Phrozen Shuffle Lite.ini
SET files[17]=Phrozen Shuffle XL.ini
SET files[18]=Phrozen Shuffle 4K.ini
SET files[19]=Phrozen Sonic.ini
SET files[20]=Phrozen Transform.ini

echo PrusaSlicer Printers Instalation
echo This will replace printers, all changes will be discarded
Expand Down
34 changes: 17 additions & 17 deletions PrusaSL1Reader/LayerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,24 +244,27 @@ public Layer NextLayer()

/// <summary>
/// Gets all islands start pixel location for this layer
/// https://www.geeksforgeeks.org/find-number-of-islands/
/// </summary>
/// <returns><see cref="List{T}"/> holding all islands coordinates</returns>
public List<LayerIsland> GetIslandsLocation()
public List<LayerIsland> GetIslandsLocation(uint requiredPixelsToSupportIsland = 5)
{
// https://www.geeksforgeeks.org/find-number-of-islands/
if (requiredPixelsToSupportIsland == 0)
requiredPixelsToSupportIsland = 1;

// These arrays are used to
// get row and column numbers
// of 8 neighbors of a given cell
List<LayerIsland> result = new List<LayerIsland>();
List<System.Drawing.Point> pixels = new List<System.Drawing.Point>();
List<Point> pixels = new List<Point>();
if (Index == 0) return result;

sbyte[] rowNbr = { -1, -1, -1, 0, 0, 1, 1, 1 };
sbyte[] colNbr = { -1, 0, 1, -1, 1, -1, 0, 1 };
const uint minPixel = 10;
bool presetOnPrevious;
const uint minPixelForSupportIsland = 200;
int pixelIndex;
uint islandSupportingPixels;

var image = Image;
byte[] bytes = null;
Expand Down Expand Up @@ -322,14 +325,15 @@ void DFS(int y2, int x2)
!visited[tempy2, tempx2])
{
visited[tempy2, tempx2] = true;
point = new System.Drawing.Point(tempx2, tempy2);
point = new Point(tempx2, tempy2);
pixels.Add(point);
queue.Enqueue(point);

if (!presetOnPrevious && !ReferenceEquals(previousBytes, null))
islandSupportingPixels += previousBytes[pixelIndex] >= minPixelForSupportIsland ? 1u : 0;
/*if (!presetOnPrevious)
{
if (previousBytes[pixelIndex] >= minPixel) presetOnPrevious = true;
}
if (previousBytes[pixelIndex] >= minPixelForSupportIsland) presetOnPrevious = true;
}*/
}
}
}
Expand All @@ -351,18 +355,14 @@ void DFS(int y2, int x2)
// found, Visit all cells in this
// island and increment island count
pixels.Clear();
pixels.Add(new System.Drawing.Point(x, y));
presetOnPrevious = previousBytes[pixelIndex] >= minPixel;
pixels.Add(new Point(x, y));
islandSupportingPixels = previousBytes[pixelIndex] >= minPixelForSupportIsland ? 1u : 0;
DFS(y, x);
//count++;

if (!presetOnPrevious)
{
result.Add(new LayerIsland(this, pixels.ToArray()));
//count++;
}

presetOnPrevious = false;
if (islandSupportingPixels >= requiredPixelsToSupportIsland) continue; // Not a island, bounding is strong
if (islandSupportingPixels > 0 && pixels.Count < requiredPixelsToSupportIsland && islandSupportingPixels >= Math.Max(1, pixels.Count / 2)) continue; // Not a island
result.Add(new LayerIsland(this, pixels.ToArray()));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions PrusaSL1Reader/PrusaSL1Reader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<PackageProjectUrl>https://github.com/sn4k3/PrusaSL1Viewer</PackageProjectUrl>
<PackageIcon></PackageIcon>
<RepositoryUrl>https://github.com/sn4k3/PrusaSL1Viewer</RepositoryUrl>
<AssemblyVersion>0.4.2.0</AssemblyVersion>
<FileVersion>0.4.2.0</FileVersion>
<Version>0.4.2</Version>
<AssemblyVersion>0.4.2.1</AssemblyVersion>
<FileVersion>0.4.2.1</FileVersion>
<Version>0.4.2.1</Version>
<Description>Open, view, edit, extract and convert DLP/SLA files generated from Slicers</Description>
</PropertyGroup>

Expand Down
Loading

0 comments on commit 7e18243

Please sign in to comment.