delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/22/14:31:22

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <55AFE14E.5040704@buffalo.edu>
Date: Wed, 22 Jul 2015 14:30:38 -0400
From: Stephen Besch <sbesch AT buffalo DOT edu>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: [geda-user] Component Cut-outs in PCB
X-PM-EL-Spam-Prob: : 8%
Reply-To: geda-user AT delorie DOT com

Several years back there was a lot of discussion about the occasional 
need for odd shaped cut-outs. Even though several suggestions were made 
none worked - in some cases at all, or even when they did the results 
were marginal.  This is still a problem today. The only work around is 
to draw them directly on some unused layer - for example "Spare" works 
for me. This is however not a really good solution. Nevertheless it's 
better than drawing them on the outline layer. First off, every board 
shop that I deal with want cut-outs in a separate gerber file. If you 
use the outline layer then you can't have a separate board layout - 
unless of course you put the outline on some other unused layer.

However, this solves only part of the problem. As long as the cutout is 
only straight lines it's simple. If you need arcs - or worse, full 
circles or linked arcs it gets really hard. This is largely due to 
problems with the ARC tool in PCB:  1) you can't control/change Radius; 
2) you can't control degrees of arc, and 4) you can't control start 
angle. This is really weird because the arc[...] item in PCB allows 
control of all of these items.

I have found only one way to get this to work. First select the target 
layer. Then let's say you have a cutout consisting of a closed loop that 
requires 6 linked arcs and 2 lines. Just draw them on the selected layer 
(Spare for example) more or less where you think that they will need to 
be. The arcs will have to be in more or less random locations owing to 
the severe limitations of the Arc tool.

With this as a starting point, save the PCB file (but leave PCB open) 
then open the pcb file with your favorite text editor (AND KEEP A 
BACKUP). Just make sure that whatever you use does not add junk 
characters or muck around with end of line characters - Gedit is a good 
choice.

Once the file is open, search for the name of the layer you are using. 
Once found, you will see a parenthetically bounded list of the line and 
arc definitions for the stuff you put on the layer. Here's an example of 
each:

Line[1525.00mil 1565.00mil 1525.00mil 1450.00mil 1.00mil 1.00mil 
"clearline"]
  Arc[1425.00mil 2005.00mil 450.00mil 450.00mil 1.00mil 1.00mil 305 290 
"clearline"]
Line arguments are: Xstart Ystart Xend Yend Width Clearance Flags
Arc arguments are: Xcenter Ycenter Radius1 Radius2 Width Clearance 
StartAngle AngleofArc Flags

The 2 radii are supposed to let you draw ovals, though I haven't tried 
it. Also, for cutouts the clearline flag makes no sense and can be 
omitted (just have to leave the "". Clearance makes no sense either but 
it has to be there anyway or PCB will throw an error. In fact you must 
be extremely careful when editing these parameters since PCB is very 
intolerant of formatting errors.

The rest of the process amounts to entering your own values for the 
various parameters until you get the shape you need. The coordinate 
crosshair is very useful here. I stongly suggest saving the file after 
every few changes (maybe even after every change) and reloading. PCB 
will detect the change and prompt you to reload. Do this every time to 
verify that your changes actually show up and incidentally did not 
corrupt the entire file (the message log window helps a lot here). 
During this editing process you may be able to do some of the 
positioning by dragging stuff around directly in PCB. Just be forewarned 
that you will need to save using PCB and reload the text editor after 
every such change made in PCB. In other words: Never edit in one tool 
anything that has not been saved in the other.

This is extremely tedious and annoying but when you are desperate for a 
cutout I'm afraid that it's the only way.

Stephen R. Besch

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019