X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Message-ID: <1405876046.394.19.camel@pcjc2lap> Subject: Re: [geda-user] Octagon flag on Pad[] From: Peter Clifton To: geda-user AT delorie DOT com Date: Sun, 20 Jul 2014 18:07:26 +0100 In-Reply-To: <53C70464.9090306@sonic.net> References: <53C69EB6 DOT 6030003 AT sonic DOT net> <53C6B815 DOT 10108 AT sonic DOT net> <201407161832 DOT s6GIWTDV006574 AT envy DOT delorie DOT com> <53C70464 DOT 9090306 AT sonic DOT net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 2014-07-16 at 16:01 -0700, Dave Curtis wrote: > On 07/16/2014 11:32 AM, DJ Delorie wrote: > >> I guess I don't understand the logic of not allowing the octagon flag on > >> Pad[]'s, since they are allowed on Pin[]'s. It seems to me that all the > >> logic should be there to draw them -- wouldn't they be handled the same > >> as a square aperture, even when the pad is parallel to the X/Y axes? > > > > Most pads are not squares, just rectangles. > > Doesn't really address my question. A rectangle is drawn by > interpolating a square aperture. Not in PCB's gerber output it isn't. It COULD be done that way, but we don't. Just skimming the code: Round pads are emitted as a filled circle (flashed I think), truly square pads are emitted as a filled rectangle (processed as a filled polygon by the gerber exporter). Non-square pads are emitted as lines, and the gerber exporter for lines handles Square capped lines as polygons. Round-ended lines are stroked. Admittedly, we don't match up well with UCamco's recommendations that pads should be flashed with apertures! The right answer I think, is to model everything as polygons / polycurves, and define aperture macros for pads using these primitives. Each unique combination of rotation and pad shape would probably have its own macro. It is easier to work out which pads are the same shape (and thus get the same aperture) if we define pads by reference to a pad-stack. If we define geometry for each pad individually, we then need to produce a cache / hash of each pad shape, to avoid duplicate apertures at gerber emission. -- Peter Clifton Clifton Electronics