Skip to content

Issue: Incorrect Pad Shape and Size Values in PcbPad Class #30

@balagithubaccount

Description

@balagithubaccount

Description:

I've encountered an issue with the PcbPad class in the AltiumSharp library. When using this class to retrieve pad shapes and sizes for a multilayer pad, the properties ShapeTop, ShapeMiddle, ShapeBottom, SizeTop, SizeMiddle, and SizeBottom all return the bottom shape and size, rather than the correct shape and size for each layer.

Expected Behavior:

PcbPad.ShapeTop should return the shape of the top layer (e.g., Rectangle).
PcbPad.ShapeMiddle should return the shape of the middle layer (e.g., Round).
PcbPad.ShapeBottom should return the shape of the bottom layer (e.g., Octagon).
PcbPad.SizeTop should return the size of the top layer.
PcbPad.SizeMiddle should return the size of the middle layer.
PcbPad.SizeBottom should return the size of the bottom layer.

Actual Behavior:

PcbPad.ShapeTop, PcbPad.ShapeMiddle, and PcbPad.ShapeBottom all return the shape of the bottom layer.
PcbPad.SizeTop, PcbPad.SizeMiddle, and PcbPad.SizeBottom all return the size of the bottom layer.

This behavior does not correctly reflect the properties of a multilayer pad where different layers have different shapes and sizes.

Steps to Reproduce:

Create a multilayer pad in Altium Designer with different shapes for the top, middle, and bottom layers (e.g., top is rectangular, middle is round, bottom is octagonal).
Use the PcbPad class in the AltiumSharp library to retrieve the ShapeTop, ShapeMiddle, ShapeBottom, SizeTop, SizeMiddle, and SizeBottom properties.
Observe that all these properties return the shape and size of the bottom layer, rather than the respective layer's properties.

Example Code:

var pcbPad = new PcbPad();
// Assume pcbPad is initialized and linked to a multilayer pad in the design

Console.WriteLine($"Top Shape: {pcbPad.ShapeTop}");
Console.WriteLine($"Middle Shape: {pcbPad.ShapeMiddle}");
Console.WriteLine($"Bottom Shape: {pcbPad.ShapeBottom}");

Console.WriteLine($"Top Size: {pcbPad.SizeTop}");
Console.WriteLine($"Middle Size: {pcbPad.SizeMiddle}");
Console.WriteLine($"Bottom Size: {pcbPad.SizeBottom}");

Additional Information:

This issue impacts designs where multilayer pads have different shapes and sizes across layers, as the current implementation does not reflect the correct design properties. A fix for this would be greatly appreciated.

Thank you for your attention to this matter.

Image Reference

image

WhatsApp Image 2024-08-01 at 11 38 13_1cc15c4c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions