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"))))
Dave Elder, Tait Communications
In reply to eDave:
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:
In reply to stburton:
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)
In reply to fxffxf:
I'm on 16.3 but both methods you suggested seem to work in 16.3.
How did you know to use the 'internal symbol to retrieve the internal pads for axlDBGetPad? I couldn't seem to find it documented anywhere.
I don't know how I missed the "holeTolerance" property on the padstack definition, could have sworn it was missing the other day.
Thanks again to everyone who replied.
could be a couple of reasons:
- the functionality was added in a hotfix
- it was missed in the offical doc
Seeing that the 16.5 offical doc (cdnshelp) has it then it might have been added to 16.3 via a hotfix. The unoffical doc can sometimes have info not in the real doc. This is @ <cdsroot>/share/pcb/examples/skill/DOC/FUNCS
Being on UNIX, I find it is easier to use the unoffical doc since I can search by using 'grep'. The unoffical doc doesn't contain drawings but the axl Reference manual doesn't have many of them.