delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/11/04/09:34:31

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 4 Nov 2017 14:42:12 +0100 (CET)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] [pcb-rnd] [dev] padstacks - boring implementation
details
In-Reply-To: <alpine.DEB.2.00.1711041332510.27212@igor2priv>
Message-ID: <alpine.DEB.2.00.1711041431060.27212@igor2priv>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1711041332510 DOT 27212 AT igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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

(... padstack announcement continued)

a padstack put on a board is really just a reference to a padstack 
prototype, sort of "copy that prototype to this x;y location, with this 
rotation angle and mirror it". The prototypes are kept in a 
transparent cache.

Since prototypes have to be retrieved during drawing, the above process 
shall be fast. It would be suboptimal to perform the rotation and 
mirroring on each draw. Instead, each rotated/mirrored ("transformed") 
version ever referenced are kept in the cache and are referenced directly 
by the padstack reference. These tranformed variants are not saved in 
files but are always generated runtime, upon the first request. If the 
shape needs to be changed, e.g. bloat or shrink, all the cached tranformed 
variants need to go under the same operation.

The non-transformed version of each prototype is called the "canonical 
form" and is saved/loaded on file IO. (Padstacks are obviously accessible 
only in our native format at the moment; later on alien formats that also 
support some sort of pad stacks will catch up; we are not going to change 
the .pcb format, tho, so padstacks will not be available there)

A low level of the padstack code uses a hash algorithm for being able to 
rapidly detect if the canonical variant of a prototype to be added already 
presents in the cache - if so the, duplicate is not added, but the 
existing item is referenced.


Regards,

Igor2

- Raw text -


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