Is there a script available to measure/calculate the total amount of pad surface area on Card?
I have a function for calculating Paste-Area. You may change it for your needances...
Public Function GetPasteArea(ByVal Side) As Double
GetPasteArea = 0.0 Dim Array1 = 0.0 Dim ArrayGesamt = 0.0
'epcbPadstackObjectAll 'epcbPadstackObjectPin Dim PadstackObjs = pcbdoc.PadstackObjects(MGCPCB.EPcbPadstackObjectType.epcbPadstackObjectPin, MGCPCB.EPcbSelectionType.epcbSelectPlaced) For Each PadstackObj In PadstackObjs Dim FabPads = PadstackObj.FabricationPads For Each FabPad In FabPads If FabPad.Type = MGCPCB.EPcbFabricationPadType.epcbFabPadSolderpaste Then If FabPad.Side = Side Then Dim PadstackGmtrs = FabPad.Geometries For Each PadstackGmtr In PadstackGmtrs
If PadstackGmtr.IsCircle Then 'Call pcbapp.Gui.ProcessKeyin("fc " & PadstackGmtr.CircleX & "," & PadstackGmtr.CircleY) ArrayGesamt = ArrayGesamt + (Math.PI * PadstackGmtr.CircleR * PadstackGmtr.CircleR) ElseIf PadstackGmtr.IsRect Then ArrayGesamt = ArrayGesamt + ((PadstackGmtr.RectMaxX - PadstackGmtr.RectMinX) * (PadstackGmtr.RectMaxY - PadstackGmtr.RectMinY)) Else Dim Arr = PadstackGmtr.PointsArray Array1 = 0.0 '½·((x1-x2)(y1+y2) + (x2-x3)(y2+y3) + ... + (xn-x1)(yn+y1)) If UBound(Arr, 2) > 1 Then For i = 0 To UBound(Arr, 2) - 1 Array1 = Array1 + ((Arr(0, i) - Arr(0, i + 1)) * (Arr(1, i) + Arr(1, i + 1))) Next Array1 = 0.5 * Math.Abs(Array1) ArrayGesamt = ArrayGesamt + Array1 End If End If pcbapp.Gui.StatusBarText("Area = " & ArrayGesamt.ToString & " mm2 ...", MGCPCB.EPcbStatusField.epcbStatusField1) Next End If End If Next Next GetPasteArea = Math.Round(ArrayGesamt, 0) Return GetPasteArea End Function
There is also an example in AATK (found here Mentor Graphics Userware Toolbox - AATK) in the FlipChip\Reports\Calculate_Area.efm file.
Hi - I had the same need (estimate of sum of Paste Mask Area in order to determine Solder Paste usage for PCBs). So I took Michaels (thanks, Michael) example and turned it into a runable vbscript (attached).
The benefit of Michaels approach is that it does not use the MaskEngine (the one in AATK does) - use of the Engines requires you to have the AutomationPro license.
Charl - let us know if you need more help to get this to work for the pads...
Thanks for all the help. Peter - I have tested your script and it works well.
I have asked for feedback from my customer to see if this suites their need.
Will provide feedback as soon as I hear from them.
You are welcome, Charl - keep in mind that the script I uploaded ONLY looks at Solder Paste ! So it may not do what you originally asked for. But I believe we (or your customer) can modify it to calculate ALL pads...
Noted. Yes they were a bit vague about their initial requirement but have now asked them to define what information they need exactly. Will keep you posted.
Retrieving data ...