8000 [BUG] - PCB Exposure Option Fails loading gerber file (It is a Killer feature need help to fix it) · Issue #580 · sn4k3/UVtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BUG] - PCB Exposure Option Fails loading gerber file (It is a Killer feature need help to fix it) #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
draj1234 opened this issue Oct 12, 2022 · 8 comments
Assignees

Comments

@draj1234
Copy link
draj1234 commented Oct 12, 2022

System

  • OS: Windows X64 - 22H2(OS Build 22621.674
  • Slicer: Not gone yet there
  • Printer: Not gone yet there
  • UVtools version: 3.7.0
1. Go to "UVtools -> Help -> About"
2. Right click on "Copy information" -> "Copy the essential information"
3. Paste that infomation bellow this line:
---------------------------------------------------
UVtools v3.7.0 X64
Operative system: Microsoft Windows 10.0.22621 X64
Processor: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx  
Processor cores: 8
Memory RAM: 6.17 / 9.94 GB
Runtime: win10-x64
Framework: .NET 6.0.10
AvaloniaUI: 0.10.18
OpenCV: 4.5.4-235

Sreens, resolution, working area, usable area:
1: 1920 x 1080 @ 100% (Primary) (On this)
    WA: 1920 x 1032    UA: 1920 x 1032

Path:       C:\Program Files\UVtools\
Executable: C:\Program Files\UVtools\UVtools.exe
Loaded file: UVtools_demo_file.sl1 [Version: 0] [Class: SL1File]

Describe the bug

The Fantastic Feature of " PCB Exposure" in UVtools - throws error as below when we load a gerber file.
I am telling you thsi feature is a killer feature for Electronics enthusiast - Pleas ehelp to fix these issues , so it is very usefull for the community.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'PCB Exposure in Tools menu'
  2. Click on 'Add the Gerber file' and add the attached gerber file
  3. Press the PCB exposure (all other settings on that page is left as default)
  4. While converting it throws error consistently as below

Error Thrown:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at UVtools.Core.Gerber.Primitives.OutlinePrimitive.DrawFlashD3(Mat mat, PointF at, MCvScalar color, LineType lineType) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Gerber\Primitives\OutlinePrimitive.cs:line 90
   at UVtools.Core.Gerber.Apertures.MacroAperture.DrawFlashD3(Mat mat, PointF at, MCvScalar color, LineType lineType) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Gerber\Apertures\MacroAperture.cs:line 34
   at UVtools.Core.Gerber.GerberDocument.ParseAndDraw(String filePath, Mat mat, SizeF xyPpmm, GerberMidpointRounding sizeMidpointRounding, Boolean enableAntialiasing) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Gerber\GerberDocument.cs:line 416
   at UVtools.Core.Operations.OperationPCBExposure.GetMat(String file) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Operations\OperationPCBExposure.cs:line 259
   at UVtools.Core.Operations.OperationPCBExposure.ExecuteInternally(OperationProgress progress) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Operations\OperationPCBExposure.cs:line 267
   at UVtools.Core.Operations.Operation.Execute(OperationProgress progress) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\Operations\Operation.cs:line 732
   at UVtools.WPF.MainWindow.<>c__DisplayClass119_0.<RunOperation>b__0() in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.WPF\MainWindow.axaml.cs:line 2162

Expected behavior

Want a succesfull convertion of the File to feed to the CREALITY HALOT Printer to expose PCB with photo resist.

Files

OB2.0_BT_MODULE-F_Cu.zip
Gerber file used in this case is attached above

@github-actions
Copy link

This is your first time submitting an issue with UVtools 🥳Please review your issue and ensure that the submit template was followed, the information is complete, and not related to any other open issue. It will be reviewed shortly. Debugging is very important and make the program better. Thanks for contributing and making the software better! 🙌

@draj1234
Copy link
Author

This Gerber was generated using Kicad - Application: KiCad (64-bit)
Version: (6.0.7), release build
Libraries:
wxWidgets 3.1.7
libcurl/7.83.1-DEV Schannel zlib/1.2.12
Platform: Windows 11 (build 22621), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Jul 26 2022 02:49:38
wxWidgets: 3.1.7 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.83.1-DEV
ngspice: 37
Compiler: Visual C++ 1929 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

@draj1234 draj1234 changed the title [BUG] - [BUG] - PCB Exposure Option Fails loading gerber file (It is a Killer feature need help to fix it) Oct 12, 2022
@draj1234
Copy link
Author

OB2.0_BT_MODULE-F_Cu.zip

@sn4k3
Copy link
Owner
sn4k3 commented Oct 12, 2022

Found the problem - Bad check on duplicate points (if any) is causing out of range index. Will be fixed on the next patch.

image

sn4k3 added a commit that referenced this issue Oct 12, 2022
sn4k3 added a commit that referenced this issue Oct 17, 2022
- (Add) PrusaSlicer printer: Elegoo Saturn 2
- (Fix) PCB Exposure: Possible error when drawing outline primitive macros that contains duplicate points (#580)
@sn4k3
Copy link
Owner
sn4k3 commented Oct 17, 2022

Fixed

@sn4k3 sn4k3 closed this as completed Oct 17, 2022
@draj1234
Copy link
Author

Super ! thanks - now I tested the same gerber file (which I had posted earlier which refused to open) and now with this new version V3.7.1 of UVtools it is converting it correctly ! thanks once again for fixing the same.

@74HC14
Copy link
74HC14 commented Oct 26, 2022

Just in case anyone else has this problem, I'll note that I was having difficulties getting my gerbers to show up in UVtools. They'd just be fully black, zero pixels of white. The solution was to move them up close to coordinates 0,0 in KiCAD, apparently they were out of the bounds of UVtools.

@sn4k3
Copy link
Owner
sn4k3 commented Oct 26, 2022

Just in case anyone else has this problem, I'll note that I was having difficulties getting my gerbers to show up in UVtools. They'd just be fully black, zero pixels of white. The solution was to move them up close to coordinates 0,0 in KiCAD, apparently they were out of the bounds of UVtools.

UVtools place Gerber on it exact drawn coordinates. If is out of LCD range it will not show.
It can crop the board but you need to include the outline gerber and still it will draw on original coordinates first before crop and move

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0