Author Topic: Yet another gerber viewer needs your feedback http://www.pcbxprt.com  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
I wanted to have a gerber viewer which works without having to install stuff: http://www.pcbxprt.com

This project is written in TypeScript and does all the work in your browser. Nothing to install, just go to the web site and open a zip file with your gerbers. You gerber data is processed on your machine, not sent to a remote server in a basement (or worse a datacenter).

I've tested it with the latest Firefox and Chrome. It uses the mouse wheel to scroll and Safary has some beef with the wheel events, other parts work. I'm not a Windows user, so Edge may or may not work. IE definitely does not work.

Screenshot:


Any feedback is welcome. Especially interested if you have a gerber that does not render correctly.
« Last Edit: May 29, 2018, 02:31:08 pm by ghent360 »
 
The following users thanked this post: dekra54

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 1951
  • Country: de
Nice; thank you for making this available! I gave it a quick try on the current Firefox for Win10, with a few small (on the order of 160*100 mm²) two-layer boards. A few comments in no particular order:

Rendering was certainly correct with everything I tried. The only exception was a somewhat pathological design with a big bitmap in the silkscreen layer, where I lost patience after a few minutes.

It would be nice if it could respond a bit faster. Panning, zooming out, enabling/disabling layers. (This refers to the non-pathological boards I tried. Despite the small size, there was always a lag of a second or two -- enough to make you wonder whether the software had got your command, especially when selecting layers.)

The TypeScript implementation probably limits what you can do on that front; maybe you could a least give a preliminary indication that something is happening? E.g. when toggling layers on/off, toggle the checkbox immediately, then redraw. Or when panning or zooming, draw an outline immediately, the render the actual PCB? Zooming in is nice in this repsect, first shows the magnified low-res version, then adds high res when ready.

For the "pathological" bitmap mentioned above, I noticed that the rendering attempt slowed down the whole browser (other tabs), to the point of making it unusable. Probably due to the way Firefox implements TypeScript, hence not something you can influence? But it was really annoying and a bit worrying. (I didn't want to lose what I had typed here, for example.) So if you can work around this, it would be worth a try.

The actual rendered colors change in non-obvious ways. Copper layer alone is shown in red; when I add (white) silkscreen, the copper color changes to a strange, low contrast light brown or gold. Other common combinations, e.g. copper plus soldermask, also result in unexpected color changes.

The default choice of layer colors doesn't work for me. Top and bottom copper both show in the same color -- can't see much, with just those two layers enabled.

That's what struck my eye in the first test. Again, the rendering is nice, and the handling is straightforward -- I like your work! If you could tweak some of the aspects above, this could very well become my preferred Gerber viewer.

EDIT: Typos... I like your work!
« Last Edit: May 31, 2018, 05:33:00 pm by ebastler »
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Thank you. All good points.

Re: speed
I booted my box in Windows, and tried it there - it was noticeably slow, compared to Ubuntu. Same HW just different OS. For some reason Chrome, FF and Edge on Windows were much slower. I'll dig some more to figure out why. In general Windows has much better graphics drivers, so browsers should be faster not slower. Pure speculation: maybe it is some enhanced security sandbox thing.

Bitmaps tent to generate lots of drawing commands. Long running JavaScript dies have the effect of "freezing" the browser. I can add a limit on how many polygons I draw before making the browser take a breath.

Re: crazy colors
Yes. I realize my default layer color scheme is quite confusing. I'll try to explain what I was going for, not to dismiss your point - just to make it less "crazy":

If you select a single layer it would render it in dark red on white background, which I think gives decent contrast.

If you select more than one layer it would try to do "natural color rendering". For example select an "outline" layer and copper layer - it tries to mimic the copper color on FR4 natural color board; add a "solder mask" layer and it tries to mimic the oshpark themed "purple" PCB; all the silk screen and it would look even better. All this works when you select layers from the same side. It is mildly confusing if you only select copper and silk screen layers - it should mimic what your board would look like without a solder mask. It goes horribly wrong if you try to select two copper layers for example.

All that said, I'll change the default layer color scheme to something reasonable (suggestions are welcome) and leave the "natural" colors as something to experiment on in my own time.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Pretty neat.

Doesn't display longer filenames properly -cuts off the end (see image)

Would be useful to be able to show individual files as well as .zips

Needs an option to invert layers for planes, also set transparency

Speed is mostly OK even on my craziest 6L complex PCB (W10,Firefox), only file it struggled with was a huge panel of 1.5 metre long strips which stalled the browser for about a minute after I gave up and closed the tab - probably a memory  issue


Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Also needs an option to flip, to check bottom-side idents etc.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
What about the drill data? - didn't show it for any of my designs. Kinda important....
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 585
  • Country: gb
Nice effort, cross-platform and local processing are excellent features.

As Mike says, drill data is essential but that sounds easy compared to the work you have done already.

Adjustable transparency would be nice, layers can get hard to see. Solder mask seems opaque over pads but that hides any text in copper which has soldermask opened (say, for ENIG gold text).

Saw a couple of errors in console log:
Quote
Error, what to do with 'M48;Layer_Color=9474304;FILE_FORMAT=4:4METRIC,LZ;TYPE=NON_PLATEDT8F00S00C1.0000?'
Error, what to do with 'M48;Layer_Color=9474304;FILE_FORMAT=4:4METRIC,LZ;TYPE=PLATEDT1F00S00C0.4000T2F00S00C0.7000T3F00S00C0.8000T4F00S00C0.9000T5F00S00C2.4000T6F00S00C2.5000T7F00S00C3.0000?'

Nice work so far  :-+
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #7 on: June 01, 2018, 09:01:50 am »
Thank you all for the feedback:

You can adjust the transparency: When the layer is selected there is a gray bar in the "Status" column, click on it to adjust the layer transparency.
Yes drill data is coming...just need time to write the code.

Re long file names:
The table with the file names is resizable, you can drag the header separation line to increase the column width.

For large files I'll have to batch the drawing commands, otherwise it overwhelms the browser.

@Mike, Can you describe a bit more what do you mean by "Needs an option to invert layers for planes". You want to "invert" - like black becomes white or something else?
 
The following users thanked this post: voltsandjolts

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #8 on: June 01, 2018, 09:55:58 am »
Quote
@Mike, Can you describe a bit more what do you mean by "Needs an option to invert layers for planes". You want to "invert" - like black becomes white or something else?
Yes - inner layers might be planes ( negative copper) or normal signal layers
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #9 on: June 01, 2018, 05:19:19 pm »
Would be good to be able to drag files to it
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 585
  • Country: gb
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #10 on: June 02, 2018, 06:40:18 am »
@Mike, Can you describe a bit more what do you mean by "Needs an option to invert layers for planes". You want to "invert" - like black becomes white or something else?

http://docs.oshpark.com/troubleshooting/inverted-gerbers/
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #11 on: June 02, 2018, 07:50:56 pm »
@Mike, Can you describe a bit more what do you mean by "Needs an option to invert layers for planes". You want to "invert" - like black becomes white or something else?

http://docs.oshpark.com/troubleshooting/inverted-gerbers/
Seroiusly? after all this time OSHPark can't accept inner-layer files in the industry standard format?
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #12 on: July 09, 2018, 08:49:17 am »
Greetings,

I added some minimal support for Excellon drill files - I'm able to display files produced by KiCad. Let me know how it works for you.

~V
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #13 on: July 09, 2018, 02:12:28 pm »
Also added drag&drop support.
You can drop a single zip file with a bunch of gerbers, or a set of gerber files.
 
The following users thanked this post: ubbut

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11484
  • Country: gb
    • Mike's Electric Stuff
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #14 on: July 09, 2018, 05:40:30 pm »
It would be useful to have a button to mirror, so you can check bottom-layer silkscreen, underside parts etc.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: ghent360

Offline ubbut

  • Contributor
  • Posts: 35
  • Country: de
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #15 on: July 10, 2018, 06:41:09 am »
Greetings,

I added some minimal support for Excellon drill files - I'm able to display files produced by KiCad. Let me know how it works for you.

~V

Thanks ! Keep up the grat work!

Does not work correctly with my metric 4:4 drill file. The drills are scaled by 1/10th. I am having the same issue in GERBV, but here you can manually select the file format.

File in question starts like so:
Code: [Select]
M48
;Layer_Color=9474304
;FILE_FORMAT=4:4
METRIC,LZ
;TYPE=PLATED
T1F00S00C0.3000
T3F00S00C1.0160
%
T01
X00015Y00005
.
.
.
 
The following users thanked this post: ghent360

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 1367
  • Country: fi
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #16 on: July 13, 2018, 01:03:01 am »
Seroiusly? after all this time OSHPark can't accept inner-layer files in the industry standard format?

This is the same OSHPark that went publicly shaming a customer on social media by publicly showing their drill file, which had a completely normal number of holes for any design, claiming it takes "hours" to drill, implying their CNC drill is slower than anything on the market ever, or that they are drilling by hand(!)

With these kind of problems in very basic PCB manufacturing and communication, I'm surprised they are able to deliver anything, and similarly I'm surprised anybody uses them.

I have never had any issue with any fab when providing them the normal industry standard gerber file which uses negative features for inner planes. It's considered one of the most basic features and gets implemented very quickly in any gerber processing frontend or viewer. This being said, I don't use OSHPark.
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #17 on: July 15, 2018, 07:04:47 pm »
I added 'f' hotkey to flip the image horizontally - it should do the trick for bottom layer silk screen.
I'll add proper button in a week or so.
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #18 on: July 15, 2018, 07:42:47 pm »
@ubbut
Thank you for the bug. I believe I added a fix for that. Let me know if it works for your file.
 

Offline anishkgt

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: qa
    • George Hobby
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #19 on: July 15, 2018, 11:15:19 pm »
Does not seem to have detect anything from Firefox on Windows10. I use the https://gerber-viewer.easyeda.com/
https://georgehobby.wordpress.com/
Test Gear: Rigol DS1054z, Hakko Fx88D, Brymen BM869s, Brymen 235
 
The following users thanked this post: ghent360

Offline ubbut

  • Contributor
  • Posts: 35
  • Country: de
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #20 on: July 16, 2018, 12:44:18 am »
@ubbut
Thank you for the bug. I believe I added a fix for that. Let me know if it works for your file.

Yes, works perfectly now, thanks. 'f' also works well for me
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #21 on: July 16, 2018, 08:09:45 am »
@anishkgt

Can you tell me what extension corresponds to what layer? I'm not familiar with this naming scheme.
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #22 on: July 16, 2018, 09:12:29 am »
@anishkgt

I found it and I added these file extensions to the code. Can you give it a try?
 

Offline ghent360

  • Contributor
  • Posts: 13
  • Country: us
Re: Yet another gerber viewer needs your feedback http://www.pcbxprt.com
« Reply #23 on: July 16, 2018, 09:55:17 am »
@ubbut

Also added 'v' for vertical flip.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf