Skip to main content
View as Markdown

IPCB_BoardOutline interface

The board outline of a PCB document, the closed polygon that defines the extents or boundary of the board.

public interface IPCB_BoardOutline : IPCB_Polygon

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive → IPCB_Group → IPCB_Polygon

Remarks​

The board outline shape determines the extents of the power planes for plane edge pull-back, and the board edge when design data is exported.

The outline's shape is given by its segments (PointCount, Segments). Its child objects are the pull-back tracks and arcs on the internal plane layers. Assigning most of the inherited pour settings, such as RemoveDead, UseOctagons, Grid, TrackSize, MinTrack, BorderWidth, PolyHatchStyle, Name, PourIndex, IgnoreViolations and the neck and island settings, does nothing on a board outline; ArcApproximation is the exception and applies to the board outline too.

IPCB_BoardOutline inherits from IPCB_Polygon, which in turn inherits from IPCB_Group. Besides the inherited polygon members, it provides members that rebuild the outline's derived data after its shape has changed, return the outline as an IPCB_GeometricPolygon, and manage the bending lines and split lines that divide the board into board regions.

Iterate the child objects with a group iterator (IPCB_Group.GroupIterator_Create).

The board outline of a board is returned by the IPCB_Board.BoardOutline property.

Each new PCB document in Altium Designer is created with a board outline, so if you wish to update a board outline of a PCB document, you modify the vertices of the existing board outline and then update the board outline.

Example​

Show the width and height of the board outline of the current board.

using PCB;

IPCB_Board pcbBoard = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (pcbBoard == null)
return;
pcbBoard.GetState_BoardOutline().Invalidate();
pcbBoard.GetState_BoardOutline().Rebuild();
pcbBoard.GetState_BoardOutline().Validate();
// The BoundingRectangle method is defined in IPCB_Primitive interface
CoordRect br = pcbBoard.GetState_BoardOutline().BoundingRectangle();
DXP.Utils.ShowMessage(
"Board Outline Width : " + EDP.Utils.CoordUnitToString(br.Right - br.Left, pcbBoard.GetState_DisplayUnit()) + "\r" +
"Board Outline Height : " + EDP.Utils.CoordUnitToString(br.Top - br.Bottom, pcbBoard.GetState_DisplayUnit()));

Properties​

PropertyTypeAccessDescription
BendingLineIPCB_BendingLinegetReturns the bending line at the given index.
BendingLinesCountintgetThe number of bending lines defined on the board outline.
HitPrimitive_1boolgetWhether the given primitive touches the board outline or lies inside it.
SplitLineIPCB_SplitBoardRegionLinegetReturns the split line at the given index.
SplitLineCountintgetThe number of split lines defined on the board outline.

BendingLine​

Returns the bending line at the given index.

IPCB_BendingLine GetState_BendingLine(int argIndex);

Type: IPCB_BendingLine · Access: read-only · Index: argIndex (int): The zero-based index of the bending line, from 0 to BendingLinesCount - 1.

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

BendingLinesCount​

The number of bending lines defined on the board outline.

int GetState_BendingLinesCount();

Type: int · Access: read-only

HitPrimitive_1​

Whether the given primitive touches the board outline or lies inside it.

bool GetState_HitPrimitive_1(IPCB_Primitive argPrimitive);

Type: bool · Access: read-only · Index: argPrimitive (IPCB_Primitive)

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

The primitive's layer is ignored; the primitive is tested as if it were on the multi-layer.

SplitLine​

Returns the split line at the given index.

IPCB_SplitBoardRegionLine GetState_SplitLine(int argIndex);

Type: IPCB_SplitBoardRegionLine · Access: read-only · Index: argIndex (int): The zero-based index of the split line, from 0 to SplitLineCount - 1.

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

SplitLineCount​

The number of split lines defined on the board outline.

int GetState_SplitLineCount();

Type: int · Access: read-only

Methods​

MethodReturnsDescription
BoardOutline_GeometricPolygonIPCB_GeometricPolygonReturns the shape of the board outline as an IPCB_GeometricPolygon.
BuildFromObjects_ReturnGeometricPolygonIPCB_GeometricPolygonBuilds a board outline shape from the tracks and arcs on the given layer and returns it as an IPCB_GeometricPolygon.
ClipWithPolyRegShapesIPCB_PolyRegShapesClipResultSubtracts the board cutouts, and optionally pad and via holes and the cutouts of embedded boards, from the board outline and returns the resulting shapes as an IPCB_PolyRegShapesClipResult.
CreateBendingLineIPCB_BendingLineCreates a bending line on the board outline and returns it.
CreateSplitLineIPCB_SplitBoardRegionLineCreates a split line on the board outline, which divides the board into separate board regions, and returns it.
DeleteBendingLinevoidRemoves the given bending line from the board outline.
DeleteSplitLinevoidRemoves the given split line from the board outline.
InvalidatevoidMarks the cached data that the board outline derives from its shape, for all layers, as out of date.
InvalidatePlanevoidMarks the cached data of the board outline for one layer as out of date, because the outline has been modified and this layer needs to be rebuilt.
Rebuild_1voidRebuilds the board outline after its shape has been changed, which potentially affects the internal and split planes that are connected to the outline.
RebuildRegionvoidRebuilds the regions of the board outline, optionally with the board cutouts subtracted, and then rebuilds the board outline as Rebuild_1 does.
Set3DLockvoidSets which board region stays fixed when the board is folded in 3D.
ValidatevoidRefreshes the board outline and its connections to the internal and split planes after the outline has been altered programmatically.

BoardOutline_GeometricPolygon​

Returns the shape of the board outline as an IPCB_GeometricPolygon.

IPCB_GeometricPolygon BoardOutline_GeometricPolygon();

Returns: IPCB_GeometricPolygon

Extension method of IPCB_BoardOutlineHelper (using PCB;).

Arcs of the outline are approximated with the outline's ArcApproximation.

BuildFromObjects_ReturnGeometricPolygon​

Builds a board outline shape from the tracks and arcs on the given layer and returns it as an IPCB_GeometricPolygon.

IPCB_GeometricPolygon BuildFromObjects_ReturnGeometricPolygon(V7_LayerBase argLayer);
ParameterTypePassingDescription
argLayerV7_LayerBasevalueThe keep-out or mechanical layer whose tracks and arcs define the shape.

Returns: IPCB_GeometricPolygon

Extension method of IPCB_BoardOutlineHelper (using PCB;).

Returns null unless the layer is a keep-out or mechanical layer. When the tracks and arcs do not form one closed shape, the largest region they enclose is returned; null is returned when no region is found. The stored shape of the board outline is not changed.

ClipWithPolyRegShapes​

Subtracts the board cutouts, and optionally pad and via holes and the cutouts of embedded boards, from the board outline and returns the resulting shapes as an IPCB_PolyRegShapesClipResult.

IPCB_PolyRegShapesClipResult ClipWithPolyRegShapes(bool argUseHolesFromViaPad, bool argUseEmbedded);
ParameterTypePassingDescription
argUseHolesFromViaPadboolvalueWhether the holes of pads and vias are subtracted too.
argUseEmbeddedboolvalueWhether the cutouts of the boards placed as embedded boards are subtracted too, repeated for each row and column of the embedded board array.

Returns: IPCB_PolyRegShapesClipResult

Extension method of IPCB_BoardOutlineHelper (using PCB;).

Returns null when the board outline has no shape. When there is nothing to subtract, the result contains one new polygon with the shape of the board outline.

CreateBendingLine​

Creates a bending line on the board outline and returns it.

IPCB_BendingLine CreateBendingLine(CoordPoint argFromPoint, CoordPoint argToPoint, int argFoldIndex, int argRadius, double argAngle);
ParameterTypePassingDescription
argFromPointCoordPointvalueThe start point of the bending line, in internal units (10,000 per mil).
argToPointCoordPointvalueThe end point of the bending line, in internal units (10,000 per mil).
argFoldIndexintvalueThe fold index of the bending line (IPCB_BendingLine.FoldIndex).
argRadiusintvalueThe bend radius, in internal units (10,000 per mil).
argAngledoublevalueThe bend angle, in degrees.

Returns: IPCB_BendingLine

Extension method of IPCB_BoardOutlineHelper (using PCB;).

Returns null unless rigid-flex is enabled for the board. The bending line is given a generated name.

CreateSplitLine​

Creates a split line on the board outline, which divides the board into separate board regions, and returns it.

IPCB_SplitBoardRegionLine CreateSplitLine(CoordPoint argFromPoint, CoordPoint argToPoint);
ParameterTypePassingDescription
argFromPointCoordPointvalueThe start point of the split line, in internal units (10,000 per mil).
argToPointCoordPointvalueThe end point of the split line, in internal units (10,000 per mil).

Returns: IPCB_SplitBoardRegionLine

Extension method of IPCB_BoardOutlineHelper (using PCB;).

DeleteBendingLine​

Removes the given bending line from the board outline.

void DeleteBendingLine(IPCB_BendingLine argBendingLine);
void DeleteBendingLine(object argBendingLine);
ParameterTypePassing
argBendingLineIPCB_BendingLinevalue

Returns: nothing (void)

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

Does nothing when the bending line does not belong to the board outline.

DeleteSplitLine​

Removes the given split line from the board outline.

void DeleteSplitLine(IPCB_SplitBoardRegionLine argSplitLine);
void DeleteSplitLine(object argSplitLine);
ParameterTypePassing
argSplitLineIPCB_SplitBoardRegionLinevalue

Returns: nothing (void)

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

Does nothing when the split line does not belong to the board outline.

Invalidate​

Marks the cached data that the board outline derives from its shape, for all layers, as out of date.

void Invalidate();

Returns: nothing (void)

It only discards the cached data; Validate rebuilds it.

See also: IPCB_BoardOutline.Validate

InvalidatePlane​

Marks the cached data of the board outline for one layer as out of date, because the outline has been modified and this layer needs to be rebuilt.

void InvalidatePlane(TV6_Layer argLayer);
void InvalidatePlane(int argLayer);
ParameterTypePassingDescription
argLayerTV6_LayervalueThe layer whose cached data is discarded.

Returns: nothing (void)

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

The cached data of other layers is kept.

Rebuild_1​

Rebuilds the board outline after its shape has been changed, which potentially affects the internal and split planes that are connected to the outline.

void Rebuild_1();

Returns: nothing (void)

It rebuilds the outline's region with the board cutouts as holes, the board's default board region and the pull back primitives on the internal plane layers. It also deletes all bending lines of the board outline.

RebuildRegion​

Rebuilds the regions of the board outline, optionally with the board cutouts subtracted, and then rebuilds the board outline as Rebuild_1 does.

void RebuildRegion(bool argUseCutouts, bool argUseEmbeddedBoardCutouts, bool argUseRouteToolLayer);
ParameterTypePassingDescription
argUseCutoutsboolvalueWhether the board cutouts of the board are subtracted.
argUseEmbeddedBoardCutoutsboolvalueWhether the cutouts of embedded boards are subtracted too; applies only when argUseCutouts is true.
argUseRouteToolLayerboolvalueWhether the primitives on the board's route tool path layer are subtracted as well.

Returns: nothing (void)

The existing regions of the board outline are deleted first; new regions are created only when there is at least one cutout to subtract. Like Rebuild_1, it deletes all bending lines of the board outline.

Set3DLock​

Sets which board region stays fixed when the board is folded in 3D.

void Set3DLock(bool argValue, IPCB_BoardRegion argPrefferedRegion);
void Set3DLock(bool argValue, object argPrefferedRegion);
ParameterTypePassingDescription
argValueboolvalueWhether to lock the given region.
argPrefferedRegionIPCB_BoardRegionvalueThe board region to lock; may be null.

Returns: nothing (void)

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

When argValue is true and a region is given, that region is locked and all other board regions are unlocked. Otherwise the lock is reassigned automatically: a single board region is locked, or else the largest board region whose layer stack is not flexible.

Validate​

Refreshes the board outline and its connections to the internal and split planes after the outline has been altered programmatically.

void Validate();

Returns: nothing (void)

Validate rebuilds the board's default board region and the pull back primitives on the internal plane layers itself, so calling Invalidate and then Validate is sufficient after the vertices of a board outline have been modified programmatically. Unlike Rebuild_1, it keeps the bending lines of the board outline.

Inherited members​

Returned by​

IPCB_Board.BoardOutline, IPCB_Board.CreateBoardOutline