Skip to main content
View as Markdown

IPCB_Pad4 interface

Extends IPCB_Pad3 with the hole size on each layer, the pad's top and bottom layers, separate top and bottom paste mask settings, and queries and operations for custom pad shapes.

public interface IPCB_Pad4 : IPCB_Pad3

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive → IPCB_Pad → IPCB_Pad2 → IPCB_Pad3

Properties​

PropertyTypeAccessDescription
BottomLayerV7_LayerBasegetThe bottom layer of the pad's layer span.
HoleSizeOnLayerintgetThe diameter of the pad's hole on the given layer, in internal units (10,000 per mil).
IsBottomPasteEnabledboolget; setWhether the pad has a paste mask opening on the bottom side.
IsTopPasteEnabledboolget; setWhether the pad has a paste mask opening on the top side.
TopLayerV7_LayerBasegetThe top layer of the pad's layer span.

BottomLayer​

The bottom layer of the pad's layer span.

V7_LayerBase GetState_BottomLayer();

Type: V7_LayerBase · Access: read-only

The accessors are extension methods of IPCB_Pad4Helper (using PCB;).

For a pad on a signal layer or on TV6_Layer.eV6_MultiLayer, this is the bottom signal layer of the board's layer stack; for a pad on another layer, the bottom layer of the layer stack. For a pad that is not on a board, it is the bottom layer.

HoleSizeOnLayer​

The diameter of the pad's hole on the given layer, in internal units (10,000 per mil).

int GetProperty_HoleSizeOnLayer(V7_LayerBase argLayer);

Type: int · Access: read-only · Index: argLayer (V7_LayerBase): The layer to query.

The accessors are extension methods of IPCB_Pad4Helper (using PCB;).

Equals HoleSize on every layer unless the pad has counter holes (IsCounterHole). Then, on each electrical layer that a counter hole reaches, the value is the counter hole's diameter at that layer's depth when that diameter is larger.

IsBottomPasteEnabled​

Whether the pad has a paste mask opening on the bottom side.

bool GetState_IsBottomPasteEnabled();
void SetState_IsBottomPasteEnabled(bool argValue);

Type: bool · Access: read/write

When the pad's layer supports a paste mask for through-hole pads, the bottom setting is independent of IsTopPasteEnabled; otherwise both properties read and set the same paste mask setting of the pad.

IsTopPasteEnabled​

Whether the pad has a paste mask opening on the top side.

bool GetState_IsTopPasteEnabled();
void SetState_IsTopPasteEnabled(bool argValue);

Type: bool · Access: read/write

When the pad's layer supports a paste mask for through-hole pads, the top setting is independent of IsBottomPasteEnabled; otherwise both properties read and set the same paste mask setting of the pad.

TopLayer​

The top layer of the pad's layer span.

V7_LayerBase GetState_TopLayer();

Type: V7_LayerBase · Access: read-only

The accessors are extension methods of IPCB_Pad4Helper (using PCB;).

For a pad on a signal layer or on TV6_Layer.eV6_MultiLayer, this is the top signal layer of the board's layer stack; for a pad on another layer, the top layer of the layer stack. For a pad that is not on a board, it is the top layer.

Methods​

MethodReturnsDescription
GetSourceLayerAndExpansionboolReturns the layer whose shape the pad uses on the given layer, and the mask expansion applied to that shape.
HasCornerRadiusChamferboolReturns whether the pad has rounded or chamfered corners on any layer.
HasCustomChamferedRectangleboolReturns whether the pad has a custom shape of kind TShapeSubKind.eChamferedRectangle on any layer.
HasCustomDonutboolReturns whether the pad has a custom shape of kind TShapeSubKind.eDonut on any layer.
HasCustomMaskDonutShapesboolReturns whether the pad has a custom donut shape (TShapeSubKind.eDonut) on its top or bottom paste mask or solder mask layer.
HasCustomMaskShapesboolReturns whether the pad has its own shape on its top or bottom paste mask or solder mask layer.
HasCustomRoundedRectangleboolReturns whether the pad has a custom shape of kind TShapeSubKind.eRoundedRectangle on any layer.
HasCustomShapesboolReturns whether the pad has a custom shape (TShape.eCustomShape) on any layer of its stack.
LinkCustomShapevoidMakes a primitive the pad's custom shape on the primitive's layer.
SwapMaskLayersIfNeededvoidSwaps the pad's top and bottom custom mask shapes when the pad has moved to a signal layer on the other side of the board.
TransformFingerToCornervoidConverts a finger-shaped custom shape on the given layer into a rectangle with two rounded or chamfered corners.
UpdatePadStructureOnLayervoidRecreates the pad's default shape on the given layer and re-applies the layer's custom thermal reliefs to the new shape.
UpdateSizeForRoundedAndChamferedShapesvoidSets the pad's stack size on the given layer from its custom rounded or chamfered rectangle.

GetSourceLayerAndExpansion​

Returns the layer whose shape the pad uses on the given layer, and the mask expansion applied to that shape.

bool GetSourceLayerAndExpansion(V7_LayerBase argLayer, ref V7_LayerBase argSourceLayer, ref int argExpansion);
bool GetSourceLayerAndExpansion(IV7_Layer argLayer, ref IV7_Layer argSourceLayer, ref int argExpansion);
ParameterTypePassingDescription
argLayerV7_LayerBasevalueThe layer to query.
argSourceLayerV7_LayerBaserefReceives the layer whose shape the pad uses on argLayer.
argExpansionintrefReceives the mask expansion applied on argLayer, in internal units (10,000 per mil).

Returns: bool

The first overload is an extension method of IPCB_Pad4Helper (using PCB;) with typed parameters; the second is declared by the interface.

For a solder mask or paste mask layer other than the pad's own layer, the source layer of a pad on TV6_Layer.eV6_MultiLayer is the top or bottom signal layer (on the same side as the mask layer), and the source layer of any other pad is the pad's own layer; the expansion is the pad's solder mask or paste mask expansion for that layer, and the method returns false when the pad has no mask expansion on that layer.

For any other layer, the source layer is the given layer, the expansion is 0 and the method returns true.

HasCornerRadiusChamfer​

Returns whether the pad has rounded or chamfered corners on any layer.

bool HasCornerRadiusChamfer();

Returns: bool

Returns true when the pad has a rounded rectangular shape (TShape.eRoundedRectangular) on a layer of its stack, or when HasCustomRoundedRectangle or HasCustomChamferedRectangle returns true.

HasCustomChamferedRectangle​

Returns whether the pad has a custom shape of kind TShapeSubKind.eChamferedRectangle on any layer.

bool HasCustomChamferedRectangle();

Returns: bool

Only layers whose stack shape is TShape.eCustomShape count.

HasCustomDonut​

Returns whether the pad has a custom shape of kind TShapeSubKind.eDonut on any layer.

bool HasCustomDonut();

Returns: bool

Only layers whose stack shape is TShape.eCustomShape count.

HasCustomMaskDonutShapes​

Returns whether the pad has a custom donut shape (TShapeSubKind.eDonut) on its top or bottom paste mask or solder mask layer.

bool HasCustomMaskDonutShapes();

Returns: bool

A layer counts only when its stack shape is TShape.eCustomShape.

HasCustomMaskShapes​

Returns whether the pad has its own shape on its top or bottom paste mask or solder mask layer.

bool HasCustomMaskShapes();

Returns: bool

Returns true when StackShapeOnLayer is not TShape.eNoShape for at least one of these four layers. Returns false for a pad that is neither on a signal layer nor on TV6_Layer.eV6_MultiLayer.

HasCustomRoundedRectangle​

Returns whether the pad has a custom shape of kind TShapeSubKind.eRoundedRectangle on any layer.

bool HasCustomRoundedRectangle();

Returns: bool

Only layers whose stack shape is TShape.eCustomShape count.

HasCustomShapes​

Returns whether the pad has a custom shape (TShape.eCustomShape) on any layer of its stack.

bool HasCustomShapes();

Returns: bool

LinkCustomShape​

Makes a primitive the pad's custom shape on the primitive's layer.

void LinkCustomShape(IPCB_Primitive argPrimitive);
void LinkCustomShape(object argPrimitive);
ParameterTypePassingDescription
argPrimitiveIPCB_PrimitivevalueThe primitive that becomes the custom shape. Passing null does nothing.

Returns: nothing (void)

The first overload is an extension method of IPCB_Pad4Helper (using PCB;) with typed parameters; the second is declared by the interface.

Does nothing when the primitive is on TV6_Layer.eV6_MultiLayer or when the pad already has a custom shape on the primitive's layer.

The shape is stored for the layer of the pad stack that the primitive's layer maps to: the top layer for a simple pad (TPadMode.ePadMode_Simple), mid layer 1 for any mid layer of a local stack (TPadMode.ePadMode_LocalStack), and the primitive's own layer otherwise. The stack shape on that layer becomes TShape.eCustomShape.

SwapMaskLayersIfNeeded​

Swaps the pad's top and bottom custom mask shapes when the pad has moved to a signal layer on the other side of the board.

void SwapMaskLayersIfNeeded();

Returns: nothing (void)

Does nothing for a pad that is not on a board, or when the pad's previous and current layers are not both signal layers.

TransformFingerToCorner​

Converts a finger-shaped custom shape on the given layer into a rectangle with two rounded or chamfered corners.

void TransformFingerToCorner(V7_LayerBase argLayer);
void TransformFingerToCorner(IV7_Layer argLayer);
ParameterTypePassingDescription
argLayerV7_LayerBasevalueThe layer whose custom shape is converted.

Returns: nothing (void)

The first overload is an extension method of IPCB_Pad4Helper (using PCB;) with typed parameters; the second is declared by the interface.

A rounded finger (TShapeSubKind.eRoundedFinger) becomes a rounded rectangle (TShapeSubKind.eRoundedRectangle) with a corner radius of 100%, and an octagonal finger (TShapeSubKind.eOctagonalFinger) becomes a chamfered rectangle (TShapeSubKind.eChamferedRectangle) with a corner size of 50%. Only the top right and bottom right corners are rounded or chamfered. Does nothing for other shapes.

UpdatePadStructureOnLayer​

Recreates the pad's default shape on the given layer and re-applies the layer's custom thermal reliefs to the new shape.

void UpdatePadStructureOnLayer(V7_LayerBase argLayer);
void UpdatePadStructureOnLayer(IV7_Layer argLayer);
ParameterTypePassingDescription
argLayerV7_LayerBasevalueThe layer to update.

Returns: nothing (void)

The first overload is an extension method of IPCB_Pad4Helper (using PCB;) with typed parameters; the second is declared by the interface.

UpdateSizeForRoundedAndChamferedShapes​

Sets the pad's stack size on the given layer from its custom rounded or chamfered rectangle.

void UpdateSizeForRoundedAndChamferedShapes(V7_LayerBase argLayer);
void UpdateSizeForRoundedAndChamferedShapes(IV7_Layer argLayer);
ParameterTypePassingDescription
argLayerV7_LayerBasevalueThe layer to update.

Returns: nothing (void)

The first overload is an extension method of IPCB_Pad4Helper (using PCB;) with typed parameters; the second is declared by the interface.

When the custom shape on the layer is a TShapeSubKind.eRoundedRectangle or TShapeSubKind.eChamferedRectangle, XStackSizeOnLayer and YStackSizeOnLayer for that layer are set to the width and height of the shape's bounding rectangle. Does nothing for other shapes.

Inherited members​