Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 38f18d6365ff08caa11a0935b4f3aedc8de95ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# UVtools

[![License](https://img.shields.io/github/license/sn4k3/UVtools?style=flat-square)](https://github.com/sn4k3/UVtools/blob/master/LICENSE)
[![GitHub repo size](https://img.shields.io/github/repo-size/sn4k3/UVtools?style=flat-square)](#)
[![Code size](https://img.shields.io/github/languages/code-size/sn4k3/UVtools?style=flat-square)](#)
[![Total code](https://img.shields.io/tokei/lines/github/sn4k3/UVtools?style=flat-square)](#)
[![Nuget](https://img.shields.io/nuget/v/UVtools.Core?style=flat-square)](https://www.nuget.org/packages/UVtools.Core)
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/sn4k3/UVtools?include_prereleases&style=flat-square)](https://github.com/sn4k3/UVtools/releases)
[![Downloads](https://img.shields.io/github/downloads/sn4k3/UVtools/total?style=flat-square)](https://github.com/sn4k3/UVtools/releases)
[![Chocolatey](https://img.shields.io/chocolatey/dt/uvtools?color=brown&label=Chocolatey&style=flat-square)](https://community.chocolatey.org/packages/uvtools)

## Download the latest version at:
https://github.com/sn4k3/UVtools/releases/latest  

## To auto install on Windows via a package manager:
- **Winget:** `winget install -e --id PTRTECH.UVtools`
- **Chocolatey:** `choco install -y uvtools`

**Note:** Winget is included on Windows 11 by default.

## To auto install on MacOS via homebrew:
`brew install --cask uvtools`

# MSLA/DLP, file analysis, calibration, repair, conversion and manipulation

This simple tool can give you insight of supports and find some failures. Did you forget what resin or other settings you used on a project? This can also save you, check every setting that were used with or simply change them!

- Facebook group: https://www.facebook.com/groups/uvtools

![GUI Screenshot](https://raw.githubusercontent.com/sn4k3/UVtools/master/wiki/UI1.png)
![GUI Screenshot Islands](https://raw.githubusercontent.com/sn4k3/UVtools/master/wiki/UI2.png)
![Convertion Screenshot](https://raw.githubusercontent.com/sn4k3/UVtools/master/UVtools.GUI/Images/Screenshots/SL1ToCbddlp.png)

# Why this project?
I don't own a Prusa SL1 or any other resin printer, for now I’m only a FDM user with 
Prusa MK3 and a Ender3.
PrusaSlicer is my only choose, why? Because I think it's the best and feature more, 
at least for me, simple but powerful. 

So why this project? Well in fact I’m looking for a resin printer and i like to study 
and learn first before buy, get good and don't regret, and while inspecting i found that 
resin printers firmwares are not as universal as FDM, too many file formats and there 
before each printer can use their own property file, this of course limit the software selection,
for example, only PrusaSlicer can slice SL1 files. So with that in mind i'm preparing when I got
some resin printer in future I can use PrusaSlicer instead of others. 
I've explored the other slicers and again, no one give me joy, and i feel them unstable,
many users slice model on PrusaSlicer just to get those supports and export stl to load in another,
that means again PrusaSlicer is on the win side, the problem is they can't slice directly on PrusaSlicer,
so, in the end, my project aims to do almost that, configure a printer on PrusaSlicer, eg: EPAX X1,
slice, export file, convert SL1 to native printer file and print.

Please note i don't have any resin printer! All my work is virtual and calculated, 
so, use experimental functions with care! Once things got confirmed a list will show. 
But also, i need victims for test subject. Proceed at your own risk!

# Features

- View image layer by layer
- View and extract thumbnails
- View all used settings
- Edit print properties and save file
- Mutate and filter layers
- Check islands, overhangs, resin traps, empty layers and repair/remove them as other issues
- Export file to a folder
- Convert format to another format
- Calibration tests
- Portable (No installation needed)

# Known File Formats

- SL1 (PrusaSlicer)
- SL1S (PrusaSlicer)
- Zip (Chitubox)
- Photon (Chitubox)
- Photons (Chitubox)
- CBDDLP (Chitubox)
- CBT (Chitubox)
- PHZ (Chitubox)
- FDG (Voxelab)
- PWS (Photon Workshop)
- PW0 (Photon Workshop)
- PWX (Photon Workshop)
- PWMO (Photon Workshop)
- PWMA (Photon Workshop)
- PWMS (Photon Workshop)
- PWMX (Photon Workshop)
- PWMB (Photon Workshop)
- PWSQ (Photon Workshop)
- ZCode (UnizMaker)
- ZCodex (Z-Suite)
- CWS (NovaMaker)
- RGB.CWS (Nova Bene4 Mono / Elfin2 Mono SE)
- XML.CWS (Wanhao Workshop)
- MDLP (Makerbase MKS-DLP v1)
- GR1 (GR1 Workshop)
- CXDLP (Creality Box)
- LGS (Longer Orange 10)
- LGS30 (Longer Orange 30)
- LGS120 (Longer Orange 120)
- LGS4K (Longer Orange 4K & mono)
- Flashforge SVGX
- ZIP (Generic / Phrozen Zip)
- VDA.ZIP (Voxeldance Additive)
- VDT (Voxeldance Tango)
- UVJ (Zip file format for manual manipulation)
- Image files (png, jpg, jpeg, gif, bmp)

# Available printers for PrusaSlicer

See at: https://github.com/sn4k3/UVtools/tree/master/PrusaSlicer/printer

# Available profiles for PrusaSlicer

* From 0.01mm to 0.20mm
* Light, Medium and Heavy Supports

# Install and configure profiles under PrusaSlicer

Complete guide: https://github.com/sn4k3/UVtools/wiki/Setup-PrusaSlicer

## Custom "Material Notes" and "Printer Notes" keywords for PrusaSlicer

Note that some variables will only work if the target format supports them, otherwise they will be ignored.
Replace the "xxx" by your desired value in the correct units

- **BottomLightOffDelay_xxx:** Sets the bottom light off delay time in seconds
- **LightOffDelay_xxx:** Sets the light off delay time in seconds
- **BottomWaitTimeBeforeCure_xxx:** Sets the bottom wait time before cure in seconds
- **WaitTimeBeforeCure_xxx:** Sets the wait time before cure in seconds
- **BottomWaitTimeAfterCure_xxx:** Sets the bottom wait time after cure in seconds
- **WaitTimeAfterCure_xxx:** Sets the wait time after cure in seconds
- **BottomLiftHeight_xxx:** Sets the bottom lift height in millimeters
- **BottomLiftSpeed_xxx:** Sets the bottom lift speed in millimeters/minute
- **LiftHeight_xxx:** Sets the lift height in millimeters
- **LiftSpeed_xxx:** Sets the lift speed in millimeters/minute
- **BottomWaitTimeAfterLift_xxx:** Sets the bottom wait time after lift in seconds
- **WaitTimeAfterLift_xxx:** Sets the wait time after lift in seconds
- **RetractSpeed_xxx:** Sets the retract speed in millimeters/minute
- **BottomLightPWM_xxx:** Sets the bottom LED light power (0-255)
- **LightPWM_xxx:** Sets the LED light power (0-255)
- **FILEVERSION_n:** Sets the output file format version/revision
- **FILEFORMAT_xxx:** Sets the output file format extension to be auto converted once open on UVtools

# File Convertion

https://github.com/sn4k3/UVtools/wiki/Sliced-File-Conversion

# Command-line arguments

The UVtools executable allow to set some arguments to do special functions:

- **Open file(s):**
   - **Syntax:** UVtools \<file1\> [file2] [file3] ...
   - **Example 1:** UVtools C:\model.osla
   - **Example 2:** UVtools C:\model.zip D:\other_model.osla
   - **Note:** When a invalid file is pass, the program will open as default.
- **Convert a file into another type(s)**
   - **Syntax:** UVtools -c/--convert \<input_file\> \<output_file1_or_ext\> [output_file2_or_ext] ...
   - **Example 1:** UVtools -c model.zip osla
   - **Example 2:** UVtools -c model.zip model_converted.osla
   - **Example 3:** UVtools --convert model.zip model_converted.osla model_converted.zcode
   - **Note:** Nothing happen when providing wrong files, will quit.
- **Extract a file to a folder**
   - **Syntax:** UVtools -e/--extract \<input_file\> [output_folder]
   - **Example 1:** UVtools -e model.zip
   - **Example 2:** UVtools -e model.zip mymodel
   - **Example 3:** UVtools --extract model.zip .
   - **Note:** Nothing happen when providing wrong files/folder, will quit.
- **Export a file to a 3D mesh**
   - **Syntax:** UVtools --export-mesh \<input_file\> [output_mesh_file]
   - **Example 1:** UVtools --export-mesh model.zip
   - **Example 2:** UVtools --export-mesh model.zip model_exported.stl
   - **Note:** Nothing happen when providing wrong files, will quit.
- **Run a operation and save the file**
   - **Syntax:** UVtools --run-operation \<input_file\> \<operation_file.uvtop\>
   - **Example 1:** UVtools --run-operation model.zip MyMorph.uvtop
   - **Note:** Nothing happen when providing wrong files, will quit.
- **Run a script and save the file**
   - **Syntax:** UVtools --run-script \<input_file\> \<script_file.cs\>
   - **Example 1:** UVtools --run-script model.zip myScript.cs
   - **Note:** Nothing happen when providing wrong files, will quit.
- **Copy print parameters from one file to another**
   - **Syntax:** UVtools --copy-parameters \<from_file\> \<to_file\>
   - **Example 1:** UVtools --copy-parameters model.zip otherfile.zip
   - **Note:** Nothing happen when providing wrong files, will quit.

# Requirements

## Windows

1. Windows 7 SP1 or greater
   1. If on Windows 10/11 N or NK:
      - [Media Feature Pack](https://www.microsoft.com/download/details.aspx?id=48231) must be installed
      - Press Windows + R
      - Type: appwiz.cpl (and press Enter key)
      - Click on: Turn Windows features on or off
      - Check the "Media Extensions" and click Ok
<!-- 1. [.NET 5.0](https://dotnet.microsoft.com/download/dotnet/5.0) installed (Comes pre-installed on Windows 10 with last updates)!-->
1. 4GB RAM or higher
1. 1920 x 1080 @ 100% scale as minimum resolution


## Linux

1. 4GB RAM or higher
2. 64 bit System
1. 1920 x 1080 @ 100% scale as minimum resolution

### Ubuntu/Mint/Debian/Similars

<!--
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y apt-transport-https
dotnet-runtime-5.0
!-->

```bash
sudo apt-get update
sudo apt-get install -y libjpeg-dev libpng-dev libgeotiff-dev libdc1394-22 libavcodec-dev libavformat-dev libswscale-dev libopenexr24 libtbb-dev libgl1-mesa-dev libgdiplus
```

**Ubuntu 21.xx extra requirement:**

```bash
sudo ln -s /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so
```


### Compile libcvextern.so:

**After this if you run UVtools and got a error like:**
> System.DllNotFoundException: unable to load shared library 'cvextern' or one of its dependencies

This means you haven't the required dependencies to run the cvextern library, 
that may due system version and included libraries version, they must match the compiled version of libcvextern.

To know what is missing you can open a terminal on UVtools folder and run the following command: `ldd libcvextern.so |grep not` 
That will return the missing dependencies from libcvextern, you can try install them by other means if you can, 
but most of the time you will need compile the EmguCV to compile the dependencies and correct link them, 
this process is very slow but only need to run once. Open a terminal on any folder of your preference and run the following commands:

```bash
sudo apt-get install -y git build-essential cmake
git clone https://github.com/emgucv/emgucv emgucv 
cd emgucv
git submodule update --init --recursive
cd platforms/ubuntu/20.04
./apt_install_dependency
./cmake_configure
```

Make sure all commands run with success.
After run these commands you can try run UVtools again,
if it runs then nothing more is needed and you can remove the emgucv folder, 
this means you only need the dependencies on your system.
 
Otherwise you need to copy the output 'emgucv/libs/x64/libcvextern.so' file created by this compilation to the UVtools folder and replace the original. 
Keep a copy of file somewhere safe, you will need to replace it everytime you update UVtools.
Additionally you can share your libcvextern.so on UVtools GitHub with your system information (Name Version) to help others with same problem, 
anyone with same system version can make use of it without the need of the compilation process.

**Note:** You need to repeat this process everytime UVtools upgrades OpenCV version, keep a eye on changelog.


### Arch/Manjaro/Similars

```bash
sudo pacman -Syu
sudo pacman -S openjpeg2 libjpeg-turbo libpng libgeotiff libdc1394 libdc1394 ffmpeg openexr tbb libgdiplus
```

To run UVtools open it folder on a terminal and call one of:

* Double-click UVtools file
* `./UVtools`
* `sh UVtools.sh`
* `dotnet UVtools.dll` [For universal package only, requires dotnet-runtime]
* As a pratical alternative you can create a shortcut on Desktop

### Compile libcvextern.so:

**After this if you run UVtools and got a error like:**
> System.DllNotFoundException: unable to load shared library 'cvextern' or one of its dependencies

This means you haven't the required dependencies to run the cvextern library, 
that may due system version and included libraries version, they must match the compiled version of libcvextern.

To know what is missing you can open a terminal on UVtools folder and run the following command: `ldd libcvextern.so |grep not` 
That will return the missing dependencies from libcvextern, you can try install them by other means if you can, 
but most of the time you will need compile the EmguCV to compile the dependencies and correct link them, 
this process is very slow but only need to run once. Open a terminal on any folder of your preference and run the following commands:

```bash
sudo pacman -Syu
sudo pacman -S base-devel git cmake msbuild gtk3 gstreamer ffmpeg libdc1394 v4l-utils ocl-icd freeglut libgeotiff libusb
git clone https://github.com/emgucv/emgucv emgucv 
cd emgucv
git submodule update --init --recursive
cd platforms/ubuntu/20.04
./cmake_configure
```

Make sure all commands run with success.
After run these commands you can try run UVtools again,
if it runs then nothing more is needed and you can remove the emgucv folder, 
this means you only need the dependencies on your system.
 
Otherwise you need to copy the output 'emgucv/libs/x64/libcvextern.so' file created by this compilation to the UVtools folder and replace the original. 
Keep a copy of file somewhere safe, you will need to replace it everytime you update UVtools.
Additionally you can share your libcvextern.so on UVtools GitHub with your system information (Name Version) to help others with same problem, 
anyone with same system version can make use of it without the need of the compilation process.

**Note:** You need to repeat this process everytime UVtools upgrades OpenCV version, keep a eye on changelog.

### RHEL/Fedora/CentOS


```bash
sudo yum update -y
sudo yum install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo yum install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo yum install -y libjpeg-devel libjpeg-turbo-devel libpng-devel libgeotiff-devel libdc1394-devel ffmpeg-devel tbb-devel mesa-libGL
```

**Fedora 35 extra requirement:**

```bash
sudo ln -s /usr/lib64/libdl.so.2 /usr/lib64/libdl.so
```

### Compile libcvextern.so:

**After this if you run UVtools and got a error like:**
> System.DllNotFoundException: unable to load shared library 'cvextern' or one of its dependencies

This means you haven't the required dependencies to run the cvextern library, 
that may due system version and included libraries version, they must match the compiled version of libcvextern.

To know what is missing you can open a terminal on UVtools folder and run the following command: `ldd libcvextern.so |grep not` 
That will return the missing dependencies from libcvextern, you can try install them by other means if you can, 
but most of the time you will need compile the EmguCV to compile the dependencies and correct link them, 
this process is very slow but only need to run once. Open a terminal on any folder of your preference and run the following commands:

```bash
sudo yum update -y
sudo yum groupinstall -y "Development Tools" "Development Libraries"
sudo yum install -y cmake gcc-c++ dotnet-sdk-5.0 gtk3-devel gstreamer1-devel ffmpeg ffmpeg-devel libdc1394 libv4l-devel cmake-gui ocl-icd-devel freeglut libgeotiff libusb
git clone https://github.com/emgucv/emgucv emgucv 
cd emgucv
git submodule update --init --recursive
cd platforms/ubuntu/20.04
./cmake_configure
```

Make sure all commands run with success.
After run these commands you can try run UVtools again,
if it runs then nothing more is needed and you can remove the emgucv folder, 
this means you only need the dependencies on your system.
 
Otherwise you need to copy the output 'emgucv/libs/x64/libcvextern.so' file created by this compilation to the UVtools folder and replace the original. 
Keep a copy of file somewhere safe, you will need to replace it everytime you update UVtools.
Additionally you can share your libcvextern.so on UVtools GitHub with your system information (Name Version) to help others with same problem, 
anyone with same system version can make use of it without the need of the compilation process.

**Note:** You need to repeat this process everytime UVtools upgrades OpenCV version, keep a eye on changelog.

## Mac

1. macOS 10.13 High Sierra
1. 4GB RAM or higher

<!--- 
* Donwload and install: https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.101-macos-x64-installer
brew install libjpeg libpng libgeotiff libdc1394 ffmpeg openexr tbb
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew analytics off
brew cask install dotnet
brew install --cask dotnet-sdk
brew install git cmake libjpeg libpng libgeotiff libdc1394 ffmpeg openexr tbb mono mono-libgdiplus libusb
```
-->

To run UVtools open it folder on a terminal and call one of:

* Double-click UVtools file
* `./UVtools`
* `sh UVtools.sh`
* `dotnet UVtools.dll` [For universal package only, requires dotnet-runtime]
* As a pratical alternative you can create a shortcut on Desktop


### Compile libcvextern.dylib: 

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew analytics off
brew install git cmake mono mono-libgdiplus
brew install --cask dotnet
git clone https://github.com/emgucv/emgucv emgucv 
cd emgucv
git submodule update --init --recursive
cd platforms/macos
./configure
```

# How to use

There are multiple ways to open your file:

1. Open UVtools and load your file (CTRL + O) (File -> Open)
2. Open UVtools and drag and drop your file inside window
3. Drag and drop file into UVtools.exe
4. Set UVtools the default program to open your files

# Library -> Developers

Are you a developer? 
This project include a .NET 5.0 library (UVtools.Core) that can be referenced in your application to make use of my work. 
Easy to use calls that allow you work with the formats. For more information navigate main code to see some calls.

Nuget package: https://www.nuget.org/packages/UVtools.Core

[![Nuget](https://img.shields.io/nuget/v/UVtools.Core?style=flat-square)](https://www.nuget.org/packages/UVtools.Core)

```powershell
dotnet add package UVtools.Core
```


## Develop and build from Source

The fastest way to compile the project is by run the `build/CompileWindows.bat`, however if you wish to develop with visual studio follow the following steps:

1. Install Visual Studio and include .NET development support
1. Install the .NET 5.0 SDK if not included on previous instalation
   - https://dotnet.microsoft.com/download/dotnet/5.0
1. Install the Avalonia for Visual Sutdio:
   - https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio
1. Install the Wix Toolset: (Required only for MSI build, **optional**)
   1. https://wixtoolset.org/releases
   1. https://marketplace.visualstudio.com/items?itemName=WixToolset.WiXToolset
1. Open UVtools.sln
1. Build


# TODO
- More file formats
- Clean up & performance (always)
- See features request under Github

# Support my work / Donate

All my work here is given for free (OpenSource), it took some hours to build, test and polish the program.
If you're happy to contribute for a better program and for my work i will appreciate the tip.

- Sponsor: https://github.com/sponsors/sn4k3
- PayPal: https://paypal.me/SkillTournament