I'm trying to get both the associated hole tolerance from a padstack definition and the defined "DEFAULT INTERNAL" pad(s) using the Allegro SKILL api.
I am able to extract all other portions of the padstack definition except for these two pieces of information. I have tried iterating over the "pads" property of the padstack but the "DEFAULT INTERNAL" pads are mysteriously absent. Similarly, axlDBGetPad is not able to retrieve the pads (as far as I can tell). There are definitely default internal pads defined for the padstacks.
For the drill tolerance I can't seem to find anything about how to retrieve the tolerance values in the documentation. All other drill properties (drillOffset, drillDiameter, etc.) are associated with the padstack definition object and are perfectly readable, but the hole tolerance is mysteriously missing.
I've scoured the Allegro SKILL documentation but can't seem to find any information on these issues.
Any help or advice would be appreciated. Thank you.
I'm using Allegro 16.3
Unfortunately you will have to use an extract routine to get the tolerance values. Look for DRILL_HOLE_POSTOL and DRILL_HOLE_NEGTOL in ncdrill_view.txt. You mmight like to raise an enhancement request to get these added as attributes.
By loading a padstack you should be able to determine the default internal pad:
padstack = axlLoadPadstack(padName)
internalPad = car(setof(pad, padstack ->pads, pad ->type == "REGULAR" && car(parseString(pad ->layer, "/")) == "ETCH" && !member(cadr(parseString(pad ->layer, "/")), '("TOP", "BOTTOM"))))
Thanks for your reply Dave.
Ah, I feared the drill tolerances might not be accessible as simple properties.
The method you outlined for the default internal pads does not seem to work in my case. Specifically, I'm attempting to read the default internal pads in the context of a package symbol loaded in the symbol editor. When accessing the padstack pads (padstack->pads) through the SKILL console it only retrieves pads for following layers:
I feel your pain!
Again, I think you have to use extracta. Look for PAD_STACK_INNER_LAYER
Assuming you are using 16.5 although these might work in earlier releases...
- You can get the internal definition (DEFAULT INTERNAL) by doing using the 'internal symbol as the 2nd arg to GetPad
pad = axlDBGetPad(pin 'internal "REGULAR")
- For toleranace you need to access the padstack. For example if you have a pin dbid assigned to variable "pin". Then you would:
def = pin->definition ; get padstack
; tolerance is represented as a list of (+tol -tol) in design units (float)
printf("tol %L\n" def->holeTolerance)