public void Execute(IPCBIWindow parentPCBI) { if (parentPCBI == null) { MessageBox.Show("No license!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } if (!parentPCBI.JobIsLoaded) { return; } IStep curStep = parentPCBI.GetCurrentStep(); if (curStep == null) { return; //no step -> no job -> break; } IFilter filter = new IFilter(parentPCBI); foreach (ILayer layer in curStep.GetActiveLayerList()) { IODBLayer newLayer = filter.CreateEmptyODBLayer("newLayerWithCutting_" + layer.GetLayerName(), curStep.Name, false); IPolyClass outlinePoly = curStep.GetPCBOutlinePoly(); if ((!(layer is IODBLayer)) || !CutRectangle(outlinePoly, (IODBLayer)layer, newLayer, filter, parentPCBI)) { MessageBox.Show("Something is wrong, cutting has not worked!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } parentPCBI.UpdateView(); IMatrix matrix = parentPCBI.GetMatrix(); matrix.UpdateDataAndList(); }
public void Execute(IPCBIWindow parent) { this.parent = parent; IStep step = parent.GetCurrentStep(); if (step == null) { return; } List <string> columsStrings = new List <string>(); columsStrings.Add("Analyse Resource"); columsStrings.Add("Reference"); columsStrings.Add("Distance"); columsStrings.Add("Rule"); columsStrings.Add("Start"); columsStrings.Add("End"); PCB_Investigator.PCBIWindows.PCBIResultDialog resultDLG = new PCB_Investigator.PCBIWindows.PCBIResultDialog(columsStrings); double unit = 1; double distance = PCBI.MathUtils.IMath.MM2Mils(1.0f); if (parent.GetUnit()) { unit = 25.4; //MessageBox.Show("Component to Outline distance: " + PCBI.MathUtils.IMath.Mils2MM(distance).ToString("N3") + " micron", "DRC Component to Board Outline"); } else { //MessageBox.Show("Component to Outline distance: " + distance.ToString("N3") + " mils", "DRC Component to Board Outline"); unit = 1; } foreach (ICMPObject cmp in step.GetAllCMPObjects()) { PCBI.MathUtils.IPolyClass CMP_Poly = cmp.GetPolygonOutline(false); IODBObject boardOutline = parent.GetCurrentStep().GetPCBOutlineAsODBObject(); IPolyClass polyOutline = boardOutline.GetPolygonOutline(); PointD start = new PointD(0, 0); PointD end = new PointD(0, 0); double measuredDistance = cmp.GetPolygonOutline().DistanceTo(polyOutline, ref start, ref end); if (measuredDistance < distance) { ListViewItem lvi = new ListViewItem("Cpmp2Outline"); lvi.SubItems.Add(cmp.Ref); lvi.SubItems.Add((measuredDistance * unit).ToString()); lvi.SubItems.Add((distance * unit).ToString()); lvi.SubItems.Add((start * unit).ToString()); lvi.SubItems.Add((end * unit).ToString()); lvi.Tag = cmp; resultDLG.AddListViewItem(lvi); } } resultDLG.ItemSelectionChanged += ResultDLG_ItemSelectionChanged1;; resultDLG.Size = new Size(500, 350); resultDLG.Show(); }
public void Execute(IPCBIWindow parent) { if (parent.GetCurrentStep() == null) { return; } IStep step = parent.GetCurrentStep(); IFilter filter = new IFilter(parent); if (parent.GetCurrentStep() == null) { return; } if (step.GetCMPLayer(true) != null) { step.GetCMPLayer(true).EnableLayer(true); } if (step.GetCMPLayer(false) != null) { step.GetCMPLayer(false).EnableLayer(true); } double distance = PCBI.MathUtils.IMath.MM2Mils(0.5f); if (parent.GetUnit()) { MessageBox.Show("Component to Outline distance: " + PCBI.MathUtils.IMath.Mils2MM(distance).ToString("N3") + " micron", "DRC Component to Board Outline"); } else { MessageBox.Show("Component to Outline distance: " + distance.ToString("N3") + " mils", "DRC Component to Board Outline"); } foreach (ICMPObject cmp in step.GetAllCMPObjects()) { PCBI.MathUtils.IPolyClass CMP_Poly = cmp.GetPolygonOutline(false); IODBObject boardOutline = parent.GetCurrentStep().GetPCBOutlineAsODBObject(); IPolyClass polyOutline = boardOutline.GetPolygonOutline(); PointD start = new PointD(0, 0); PointD end = new PointD(0, 0); if (cmp.GetPolygonOutline().DistanceTo(polyOutline, ref start, ref end) < distance) { cmp.Select(true); } } parent.UpdateView(); }
public void Execute(IPCBIWindow parent) { //your code here foreach (ICMPObject cmp in parent.GetCurrentStep().GetSelectedCMPs()) { if (!packageListClassifier.ContainsKey(cmp.UsedPackageName)) { packageListClassifier.Add(cmp.UsedPackageName, cmp.UsedPackageName); IPackageSpecificsD pack = cmp.GetPackageSpecificsD(); ISurfaceSpecificsD ps = pack.GetPackageSurfaceSpecificsD(); IPolyClass packPoly = ps.GetIPolyClass(); packPoly.AddOversize(IMath.MM2Mils(0.2)); // Oversize can also be negative pack.SetOutline(packPoly); } } parent.UpdateView(); }
private void CheckTestpoints(ICMPLayer layer, ref PCB_Investigator.PCBIWindows.PCBIReportDialog reportDlg) { if (layer == null) { MessageBox.Show("Layer is null referenced."); return; } reportDlg.AppendLog("Analyzing " + layer.GetLayerName()); PointD fromPoint = PointD.Empty, toPoint = PointD.Empty; List <IObject> allComponents = layer.GetAllLayerObjects(); double maxDistance = Math.Max(MinDistanceTP2TP, MinDistanceTP2CMP) * 1.01; int tpCountOK = 0; foreach (IObject element in allComponents) { if (element is ICMPObject) { ICMPObject tpCmp = (ICMPObject)element; if (tpCmp.Ref.StartsWith(tpReferencePrexix)) //cmp is a Testpoint... { tpCountTotal++; bool hasWrongDistance = false; RectangleD checkRect = tpCmp.GetBoundsD(); checkRect.Inflate(maxDistance, maxDistance); IPolyClass tpPoly = tpCmp.GetPolygonOutline(false); foreach (IObject nearElement in layer.GetAllObjectInRectangle(checkRect)) { if (nearElement is ICMPObject) { ICMPObject nearCmp = (ICMPObject)nearElement; if (tpCmp.Ref == nearCmp.Ref) { continue; } if (!nearCmp.Ref.StartsWith(tpReferencePrexix) && nearCmp.CompHEIGHT < PCBI.MathUtils.IMath.MM2Mils(5)) { continue; // Abfrage ob Bauteil kleiner 5 mm, dann ignorieren ausser Testpunkte } IPolyClass nearCmpPoly = nearCmp.GetPolygonOutline(false); if (tpPoly != null && nearCmpPoly != null) { double distance = tpPoly.DistanceTo(nearCmpPoly, ref fromPoint, ref toPoint); double distanceC2C = IMath.DistancePointToPoint(nearCmp.Position, tpCmp.Position); if (nearCmp.Ref.StartsWith(tpReferencePrexix)) //nearCmpPoly is also a Testpoint... { if (distance < MinDistanceTP2TP) { if (hasWrongDistance == false) { tpCmp.ObjectColor = Color.Orange; hasWrongDistance = true; } reportDlg.AppendLog(" -> " + tpCmp.Ref + " too close to " + nearCmp.Ref + " (" + PCBI.MathUtils.IMath.Mils2MM(distance).ToString("F3") + "mm)", PCB_Investigator.PCBIWindows.PCBIReportDialog.LogType.Warning); } if (distanceC2C < MinDistanceCenterTP2TP) { if (hasWrongDistance == false) { tpCmp.ObjectColor = Color.Orange; hasWrongDistance = true; } reportDlg.AppendLog(" -> " + tpCmp.Ref + " Center to Center" + nearCmp.Ref + " (" + PCBI.MathUtils.IMath.Mils2MM(distanceC2C).ToString("F3") + "mm)", PCB_Investigator.PCBIWindows.PCBIReportDialog.LogType.Error); } } else { if (distance < MinDistanceTP2CMP) { if (hasWrongDistance) { tpCmp.ObjectColor = Color.Red; hasWrongDistance = true; } reportDlg.AppendLog(" -> " + tpCmp.Ref + " too close to " + nearCmp.Ref + " (" + PCBI.MathUtils.IMath.Mils2MM(distance).ToString("F3") + "mm)", PCB_Investigator.PCBIWindows.PCBIReportDialog.LogType.Warning); } } } } } if (!hasWrongDistance) { tpCountOK++; tpCmp.ObjectColor = Color.Green; reportDlg.AppendLog(" -> " + tpCmp.Ref + " is OK"); } } } } reportDlg.AppendLog("=> " + tpCountOK + " of " + tpCountTotal + " Testpoints are OK"); }
internal static bool CutRectangle(IPolyClass rectanglePoly, IODBLayer layer, IODBLayer NewlayerToAddElements, IFilter filter, IPCBIWindow parentPCBI) { if (layer == null) { return(false); //no layer } if (NewlayerToAddElements == null) { return(false); //no layer for new elements } //use bounds to get relevant objects //cut intersecting objects //helper for Symbols Dictionary <int, int> symbolUsed = new Dictionary <int, int>(); //Performance RectangleD relevantRectangle = rectanglePoly.GetBounds(); foreach (IODBObject obj in layer.GetAllLayerObjects()) { if (relevantRectangle.IntersectsWith(obj.GetBoundsD())) { #region cut elements //cutting IPolyClass polygon = obj.GetPolygonOutline(); IPolyClass cuttingPolygon; if (rectanglePoly.GetBounds().Contains(polygon.GetBounds())) { cuttingPolygon = polygon; } else { cuttingPolygon = polygon.Intersect(rectanglePoly); } if (cuttingPolygon.GetEdgeCount() == 0) { continue; //bounds cutting but not of any interest } List <ISurfaceSpecificsD> subPolygons = cuttingPolygon.SplitInIsleAndHoles(parentPCBI, NewlayerToAddElements); foreach (ISurfaceSpecificsD subPolygon in subPolygons) //create part surfaces { IODBObject surface = filter.CreatePolygon(NewlayerToAddElements); subPolygon.Positive = obj.Positive; surface.SetSpecifics(subPolygon); Dictionary <string, string> attributes = obj.GetAttributesDictionaryStringKeys(); foreach (string attribute in attributes.Keys) { surface.SetAttribute(attributes[attribute], attribute); //copy attributes } } #endregion } else { //not relevant -> ignore } } return(true); //finish }
public IPolyClass ThtPolyDrill; // and a polygon of each the drill below the pins public ThtPin(ICMPObject cmp, IPin pin, IODBObject drill, IPolyClass thtPoly) // constructor definition { this.Cmp = cmp; this.Pin = pin; this.Drill = drill; this.ThtPolyDrill = thtPoly; }
internal bool checkPinLaysOverHole(IStep step, List <IODBObject> listOfAllDrillObjects, out List <ThtPin> topTHTPinList, out List <ThtPin> botTHTPinList, IMatrix matrix) { // this method tries to find THT components and return a list with these components topTHTPinList = new List <ThtPin>(); botTHTPinList = new List <ThtPin>(); List <ThtPin> topTemporaryTHTPinList = new List <ThtPin>(); // thats a list of the ThtPin class of the Top component pins that are relevant to be checked List <ThtPin> botTemporaryTHTPinList = new List <ThtPin>(); // thats a list of the ThtPin class of the Bot component pins that are relevant to be checked if (step == null) { MessageBox.Show("No job loaded!"); return(false); } else { List <ICMPObject> allComponents = step.GetAllCMPObjects(); // thats how you get all components and filling a list with it try { foreach (ICMPObject cmpObj in allComponents) // now iterating through the list with all components { List <IPin> pinList = cmpObj.GetPinList(); // now creating a list with all of pins of the currently checked component of the foreach loop which is iterating components if (pinList.Count == 1) { continue; } //TODO Sollte wegen Fiducials geändert werden wenn benötigt foreach (IPin pin in pinList) { int counterTop = 0; int counterBot = 0; IPolyClass pinPoly = pin.GetPolygonOutline(cmpObj); // this method is creating a new polygon of the polygon outline of the checked component RectangleD pinRect = pin.GetBoundsD(cmpObj); // creating a new rectangle by getting the bounds of the current checked component foreach (IODBObject holeObj in listOfAllDrillObjects) // finally the list with all relevant holes is going be checked { if (!pinRect.IntersectsWith(holeObj.GetBoundsD())) { continue; // first the pins rectangle is checked if it is intersecting with a hole. If this condition is true this pin can not be a THT component pin } IPolyClass holePoly = holeObj.GetPolygonOutline(); if (holePoly.DoesIntersect(pinPoly) || holePoly.IsPointOfSecondObjectIncluded(pinPoly) || pinPoly.IsPointOfSecondObjectIncluded(holePoly)) // this condition is a further check if this pin could be a THT component pin { RectangleD holeRect = holePoly.GetBounds(); //additional checks can be implemented here double pinRectArea = pinRect.GetArea(); double holeRectArea = holeRect.GetArea(); if (holeRectArea <= pinRectArea) // if the hole area is to small this loop iteration will be skipped { continue; } else { if (cmpObj.PlacedTop == true) // placed on the top component layer { counterTop++; // this variable is counting how many holes are below the current checked pin topTemporaryTHTPinList.Add(new ThtPin(cmpObj, pin, holeObj, holePoly)); // add the current component to a temporary list. } else { counterBot++; // this variable is counting how many holes are below the current checked pin botTemporaryTHTPinList.Add(new ThtPin(cmpObj, pin, holeObj, holePoly)); // add the current component to a temporary list. } } } else { continue; } } if (counterTop == 1 && pinList.Count == 1) // for the top THT components { // if the component, which has been added to the temporary list before, do has only one hole (counterTop == 1) below one pin // do not add to list // and the component do only posses one pin, this component can't be a THT component. } else { topTHTPinList.AddRange(topTemporaryTHTPinList); // else the temporary list can be added to the permanent list topTemporaryTHTPinList.Clear(); } if (counterBot == 1 && pinList.Count == 1) { } // for the bot THT components else { botTHTPinList.AddRange(botTemporaryTHTPinList); botTemporaryTHTPinList.Clear(); } } } return(true); } catch (Exception ex) // if something goes wrong and a exception have to be catched { PCB_Investigator.Localization.PCBILocalization.ShowMsgBox(ex.Message, "Error in checkPinLaysOverHole method", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } } }
private void fillNODDataList(IPCBIWindow parent, IStep step, IMatrix matrix, List <ICMPObject> lstAllCMPList, List <ThtPin> topTHTPinList, List <ThtPin> botTHTPinList, out List <string> dataList, List <INet> lstINetINetList, List <IODBObject> lstListOfAllDrillObjects, ref List <string> errorLogFile) { int inCounter4NONENetName = 0; dataList = new List <string>(); string strTopSigLay = matrix.GetTopSignalLayer(); string strBotSigLay = matrix.GetBotSignalLayer(); IODBLayer iodblayTopSig, iodblayBotSig, iodblayCurrSigLay; string strPosition = string.Empty; string strTecn = string.Empty; string strNetName = string.Empty; string strCmpRef = string.Empty; string strInfo = string.Empty; ICMPObject iCmOCMPObject; char chrWhiteSpa = ' '; int minAbstand = 15; int maxAbstand = 52; int dist = betterToRead; if (lstAllCMPList == null) { errorLogFile.Add("Method: fillNODDataList + lstAllCMPList is null"); return; } // to get the maximum name length /*if (lstAllCMPList.Count > 0) * { * foreach (ICMPObject cmp in lstAllCMPList) * { * if (cmp != null && !string.IsNullOrEmpty(cmp.PartName)) * { * if (maxAbstand < cmp.PartName.Length) * { * maxAbstand = cmp.PartName.Length; * } * } * else * { * errorLogFile.Add("Method: fillNODDataList + lstAllCMPList is null"); * return; * } * } * } * else * { * MessageBox.Show("No componentens could be found"); * return; * } * * * * if (lstINetINetList.Count > 0) * { * foreach (INet tempNet in lstINetINetList) * { * if (tempNet != null && !string.IsNullOrEmpty(tempNet.NetName)) * { * if (maxAbstand < tempNet.NetName.Length) * { * maxAbstand = tempNet.NetName.Length; * } * } * else * { * errorLogFile.Add("Method: fillNODDataList + lstINetInetList is null"); * return; * } * } * } * else * { * MessageBox.Show("No componentens could be found"); * return; * }*/ maxAbstand = maxAbstand + 2; if (!string.IsNullOrEmpty(strTopSigLay)) { iodblayTopSig = (IODBLayer)step.GetLayer(strTopSigLay); } else { errorLogFile.Add("Method: fillNODDataList + strTopSigLay is null"); iodblayTopSig = null; } if (!string.IsNullOrEmpty(strBotSigLay)) { iodblayBotSig = (IODBLayer)step.GetLayer(strBotSigLay); } else { errorLogFile.Add("Method: fillNODDataList + strBotSigLay is null"); iodblayBotSig = null; } dataList.Add("* " + "NetName".PadRight(minAbstand, chrWhiteSpa) + "CMP-Ref".PadRight(minAbstand, chrWhiteSpa) + "PinNr.".PadRight(minAbstand, chrWhiteSpa) + "X".PadRight(minAbstand, chrWhiteSpa) + "Y".PadRight(minAbstand, chrWhiteSpa) + "PadSize".PadRight(minAbstand, chrWhiteSpa) + "Pinposition".PadRight(minAbstand, chrWhiteSpa) + "CMP-Typ".PadRight(minAbstand, chrWhiteSpa) + "TEST".PadRight(minAbstand, chrWhiteSpa) + "CHANNEL".PadRight(minAbstand, chrWhiteSpa) + "USER"); dataList.Add("* "); foreach (INet net in lstINetINetList) { if (net == null) { errorLogFile.Add("Method: fillNODDataList + net is null"); return; } List <INetObject> lstNetComponentList = net.ComponentList; if (lstNetComponentList == null) { errorLogFile.Add("Method: fillNODDataList + lstNetComponentList is null"); return; } foreach (INetObject inetObj in lstNetComponentList) { iCmOCMPObject = inetObj.ICMP; if (iCmOCMPObject == null) { errorLogFile.Add("Method: fillNODDataList + iCmOCMPObject is null"); continue; } strTecn = string.Empty; bool boPinIsTopSoldered = true; bool boPinIsPartOfTHT = false; if (!useTHTSearch) { boPinIsTopSoldered = iCmOCMPObject.PlacedTop; } else { if (iCmOCMPObject.PlacedTop) // true is top layer { boPinIsTopSoldered = true; foreach (var entry in topTHTPinList) { if (entry == null) { errorLogFile.Add("Method: fillNODDataList + entry is null"); return; } if (entry.Cmp.Ref == iCmOCMPObject.Ref) { boPinIsPartOfTHT = true; boPinIsTopSoldered = false; break; } } } else { boPinIsTopSoldered = false; foreach (var entry in botTHTPinList) { if (entry == null) { errorLogFile.Add("Method: fillNODDataList + entry is null"); return; } if (entry.Cmp.Ref == iCmOCMPObject.Ref) { boPinIsPartOfTHT = true; boPinIsTopSoldered = true; break; } } } } if (boPinIsPartOfTHT == true) { strTecn = "T"; } else { strTecn = "S"; } if (boPinIsTopSoldered) { strPosition = "T"; if (iodblayTopSig != null) { iodblayCurrSigLay = iodblayTopSig; } else { errorLogFile.Add("Method: fillNODDataList + iodblayTopSig is null"); return; } } else { strPosition = "B"; if (iodblayBotSig != null) { iodblayCurrSigLay = iodblayBotSig; } else { errorLogFile.Add("Method: fillNODDataList + iodblayBotSig is null"); return; } } IPin pin = inetObj.GetIPin(); { if (pin == null) { errorLogFile.Add("Method: fillNODDataList + pin is null"); continue; } IODBObject iodbobPinPad = null; if (iodblayCurrSigLay != null) { iodbobPinPad = pin.GetIPinPad(iodblayCurrSigLay, iCmOCMPObject); } if (net.NetName == null) { errorLogFile.Add("Method: fillNODDataList + net.NetName is null"); return; } if (net.NetName == "$NONE$") { strNetName = '"' + net.NetName + inCounter4NONENetName.ToString(System.Globalization.CultureInfo.InvariantCulture) + '"'; inCounter4NONENetName++; } else { strNetName = '"' + net.NetName + '"'; } strCmpRef = '"' + iCmOCMPObject.Ref + '"'; string strPadString = string.Empty; double holeDiameter = 0; bool rotationExists = false; bool holeExists = false; double doWidth = 0, doHeight = 0, doDegree = 0; if (iodbobPinPad != null) { IObjectSpecificsD spec = iodbobPinPad.GetSpecificsD(); if (spec == null) { errorLogFile.Add("Method: fillNODDataList + spec is null"); return; } if (spec is IPadSpecificsD) { IPadSpecificsD pSpec = (IPadSpecificsD)spec; //pSpec.ShapeIndex if (pSpec == null) { errorLogFile.Add("Method: fillNODDataList + pSpec is null"); return; } IFilter filter = new IFilter(parent); if (filter == null) { errorLogFile.Add("Method: fillNODDataList + filter is null"); return; } IFilter.ToolDefinition toolDef = filter.GetSymbolByShapeIndex(pSpec.ShapeIndex, iodblayCurrSigLay); if (toolDef == null) { errorLogFile.Add("Method: fillNODDataList + toolDef is null"); return; } switch (toolDef.Type) { case PCBI.Symbol_Type.r: //round foreach (IODBObject drill in lstListOfAllDrillObjects) { if (drill == null) { errorLogFile.Add("Method: fillNODDataList + drill is null"); return; } if (drill.IsPointOfSecondObjectIncluded(iodbobPinPad)) { holeExists = true; holeDiameter = drill.GetDiameter(); } } if (holeExists) { strPadString = "R" + Math.Round(toolDef.Diameter, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "H" + Math.Round(holeDiameter, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); } else { strPadString = "R" + Math.Round(toolDef.Diameter, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); } break; case PCBI.Symbol_Type.s: // square //toolDef.Diameter; RectangleD bounds = iodbobPinPad.GetBoundsD(); if (bounds == null) { errorLogFile.Add("Method: fillNODDataList + bounds are null"); return; } if (pSpec.Rotation != 0) { IPolyClass padPoly = iodbobPinPad.GetPolygonOutline(); if (padPoly == null) { errorLogFile.Add("Method: fillNODDataList + padPoly is null"); return; } padPoly.Rotate(-pSpec.Rotation); padPoly.UpdateBounds(); bounds = padPoly.GetBounds(); } strPadString = "X" + Math.Round(bounds.Height, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); break; case PCBI.Symbol_Type.rect: default: RectangleD rectBounds = iodbobPinPad.GetBoundsD(); if (rectBounds == null) { errorLogFile.Add("Method: fillNODDataList + bounds are null"); return; } if (pSpec.Rotation != 0) { doDegree = pSpec.Rotation; rotationExists = true; IPolyClass padPoly = iodbobPinPad.GetPolygonOutline(); if (padPoly == null) { errorLogFile.Add("Method: fillNODDataList + padPoly is null"); return; } padPoly.Rotate(-pSpec.Rotation); padPoly.UpdateBounds(); rectBounds = padPoly.GetBounds(); } doWidth = rectBounds.Width; doHeight = rectBounds.Height; if (rotationExists) { strPadString = "X" + Math.Round(doWidth, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "Y" + Math.Round(doHeight, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "A" + Math.Round(doDegree, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); } else { foreach (IODBObject drill in lstListOfAllDrillObjects) { if (drill == null) { errorLogFile.Add("Method: fillNODDataList + drill is null"); return; } if (drill.IsPointOfSecondObjectIncluded(iodbobPinPad)) { holeExists = true; holeDiameter = drill.GetDiameter(); } } if (holeExists) { strPadString = "X" + Math.Round(doWidth, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "Y" + Math.Round(doHeight, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "H" + Math.Round(holeDiameter, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); } else { strPadString = "X" + Math.Round(doWidth, 0).ToString(System.Globalization.CultureInfo.InvariantCulture) + "Y" + Math.Round(doHeight, 0).ToString(System.Globalization.CultureInfo.InvariantCulture); } } break; } } } else { strPadString = "0"; errorLogFile.Add("Method: fillNODDataList + iodbobPinPad is null"); return; } string strXValue = (Math.Round(IMath.Mils2MM(pin.GetIPinPositionD(iCmOCMPObject).X), digits)).ToString(System.Globalization.CultureInfo.InvariantCulture); string strYValue = (Math.Round(IMath.Mils2MM(pin.GetIPinPositionD(iCmOCMPObject).Y), digits)).ToString(System.Globalization.CultureInfo.InvariantCulture); strInfo = string.Concat(strNetName.PadRight(strNetName.Length + dist, chrWhiteSpa), strCmpRef.PadRight(strCmpRef.Length + dist, chrWhiteSpa), pin.PinNumber.PadRight(pin.PinNumber.Length + dist, chrWhiteSpa), strXValue.PadRight(strXValue.Length + dist, chrWhiteSpa), strYValue.PadRight(strYValue.Length + dist, chrWhiteSpa), strPadString.PadRight(strPadString.Length + dist, chrWhiteSpa), strPosition.PadRight(strPosition.Length + dist, chrWhiteSpa), strTecn.PadRight(strTecn.Length + dist, chrWhiteSpa), "Y".PadRight(2, chrWhiteSpa), "0".PadRight(2, chrWhiteSpa), " "); if (!dataList.Contains(strInfo)) { dataList.Add(strInfo); } } } } }