ThisIsNotRocketScience / GerberTools

Tools to load/edit/create/panelizer sets of gerber files
MIT License
716 stars 139 forks source link

Feature request: Crop board according to outline #40

Open ah01 opened 6 years ago

ah01 commented 6 years ago

If I try panelize board with some layers exceed board outline (typically silk screen) it can overflow to next instance.

Example single board:

pcb

Example panel:

panel

It would be nice to have some options to automatically crop/delete exceeding paths.

TheNitek commented 6 years ago

thats a duplicate: https://github.com/ThisIsNotRocketScience/GerberTools/issues/28

ah01 commented 6 years ago

My bad. I was trying this in last release not in master.

FYI - Eaxmple with enabled clip to outline:

panel2

PS: It's working only for silk screen, but i guess that's fine.

TheNitek commented 6 years ago

Had the same problem. You need to compile the source yourself to get a version which supports it. Let's hope for a new release soon

geocine commented 3 years ago

I just came across this issue, aside from clipping the Silk Layer , I also needed to clip the Solder Mask and Copper Layers

You can modify these lines and compile from source https://github.com/ThisIsNotRocketScience/GerberTools/blob/master/GerberLibrary/Core/GerberPanel.cs#L2402

So in my case I changed it from

if (Layer == BoardLayer.Silk){
 //...
}

to

if (Layer == BoardLayer.Silk || Layer == BoardLayer.Copper || Layer == BoardLayer.SolderMask){
 //...
}