Please try the GetActualMinClearance method which the Clearance object has.
I am already using a=clr.GetActualMinClearance(viaPadstack,bga_pin_padstack,epcbUnitCurrent) method as i mentioned in earlier post.
Here i have passed 1st argument as viaObject and 2nd argument as pin_padstack_object. It is giving me clearacne between via to bga pad.
I want clearance between via to bga pad(with solderpastemask) .
I have one idea.
Can you copy the Solder Paste/Mask to user layer and take a gap by the GetActualMinClearance method?
Can you please explain in details how can we do it. Which property/function is used to copy the Solder Paste/Mask to user layer
Does anyone have idea on it?
Both vias and pins have FabricationPads.
FabricationPads have geometries. Geometries have pointsarrays. You can use a pointsarray to create a shape on a userlayer.
Here's a basic example:
fpads = via.FabricationPads
For Each fpad In fpads
If fpad.Type = 1 Then 'type 1 is solderpaste pad
fpad_geoms = fpad.Geometries 'pad geometries collection
For Each fpad_geom In fpad_geoms 'iterate through the geometries collection
ptary = fpad_geom.pointsarray
pts = ubound(ptary, 2) + 1
userlayergfx = doc.putuserlayergfx(userlayer, 0, pts, ptary, false, nothing, 0)