
# IPCB_ContourMaker interface

Builds the shapes of PCB design objects as geometric polygons, and adds the vertices of rectangles, slots and arcs to contours.

```csharp
public interface IPCB_ContourMaker
```

**Namespace:** PCB · **Assembly:** Altium.SDK.Interfaces

**Derived:** [IPCB_ContourMaker2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ContourMaker2.md)

## Remarks

Get it with [`IPCB_ServerInterface.PCBContourMaker`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ServerInterface.md#pcbcontourmaker). Curved edges are approximated by straight segments; [`ArcResolution`](#arcresolution) sets how closely.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [ArcResolution](#arcresolution) | `int` | get; set | How closely curved edges are approximated by straight segments: the largest distance between a vertex and the curve, in internal units (10,000 per mil). |

### ArcResolution

How closely curved edges are approximated by straight segments: the largest distance between a vertex and the curve, in internal units (10,000 per mil).

```csharp
int GetState_ArcResolution();
void SetState_ArcResolution(int argValue);
```

**Type:** `int` · **Access:** read/write

A smaller value gives more and shorter segments. The default is 5,000 (0.5 mil); assigning 0 restores the default. The value belongs to the object, and [`IPCB_ServerInterface.PCBContourMaker`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ServerInterface.md#pcbcontourmaker) returns the same object on every call.

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [AddArcToContour](#addarctocontour) | `void` | Appends the vertices of a circular arc, approximated by straight segments, to the end of a contour. |
| [MakeContour](#makecontour) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a design object on a layer, grown or shrunk by a given amount, as a new geometric polygon. |
| [MakeContour_1](#makecontour_1) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a track, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_2](#makecontour_2) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a pad on a layer, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_3](#makecontour_3) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a fill, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_4](#makecontour_4) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a via on a layer, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_5](#makecontour_5) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of an arc, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_6](#makecontour_6) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the shape of a region, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_7](#makecontour_7) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns a rectangle around a text, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_8](#makecontour_8) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the area inside the outline of a polygon, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_9](#makecontour_9) | [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md) | Returns the area inside the outline of a split plane, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour). |
| [MakeContour_AddSlot](#makecontour_addslot) | `void` | Appends the vertices of a slot, a rectangle with semicircular ends, to the end of a contour. |
| [MakeContour_AddSquare](#makecontour_addsquare) | `void` | Appends the four corners of an axis-aligned rectangle to the end of a contour. |

### AddArcToContour

Appends the vertices of a circular arc, approximated by straight segments, to the end of a contour.

```csharp
void AddArcToContour(IPCB_Contour argContour, double argStartAngle, double argEndAngle, int argcx, int argcy, int argRadius, bool argClockwise);
void AddArcToContour(object argContour, double argStartAngle, double argEndAngle, int argcx, int argcy, int argRadius, bool argClockwise);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argContour` | [IPCB_Contour](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Contour.md) | value | The contour that receives the vertices. |
| `argStartAngle` | `double` | value | The angle at which the arc starts, in degrees, measured counterclockwise from the positive X axis. |
| `argEndAngle` | `double` | value | The angle at which the arc ends, in degrees, measured counterclockwise from the positive X axis. |
| `argcx` | `int` | value | The X coordinate of the center of the arc, in internal units (10,000 per mil). |
| `argcy` | `int` | value | The Y coordinate of the center of the arc, in internal units (10,000 per mil). |
| `argRadius` | `int` | value | The radius of the arc, in internal units (10,000 per mil). |
| `argClockwise` | `bool` | value | True to run clockwise from the start angle to the end angle, false to run counterclockwise. Either way the arc passes through 0 degrees when it has to, for example from 270 to 90 degrees counterclockwise. |

**Returns:** nothing (`void`)

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

The vertices lie on or outside the circle, so that the straight segments between them do not cut into the arc; no vertex is more than [`ArcResolution`](#arcresolution) away from the circle. The smaller [`ArcResolution`](#arcresolution) is compared with the radius, the more vertices are added.

### MakeContour

Returns the shape of a design object on a layer, grown or shrunk by a given amount, as a new geometric polygon.

```csharp
IPCB_GeometricPolygon MakeContour(IPCB_Primitive argPrim, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argPrim` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | value | The design object. |
| `argExpansion` | `int` | value | The distance by which the shape is grown on every side, in internal units (10,000 per mil): 0 for the object's own shape, a negative value to shrink it. |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value | The layer whose shape is returned. Only pads and vias use it; the other objects ignore it. |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

Tracks, arcs, fills, pads, vias, regions, texts, polygons and split planes are supported. For a text the shape is a rectangle around the text; for a polygon or a split plane it is the area inside its outline. For a pad on an internal plane layer the shape is that of its connection to the plane. The curved edges of tracks, arcs, pads and vias are approximated according to [`ArcResolution`](#arcresolution).

### MakeContour_1

Returns the shape of a track, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_1(IPCB_Track argTrack, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argTrack` | [IPCB_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Track.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_2

Returns the shape of a pad on a layer, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_2(IPCB_Pad argPad, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argPad` | [IPCB_Pad](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Pad.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_3

Returns the shape of a fill, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_3(IPCB_Fill argFill, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFill` | [IPCB_Fill](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Fill.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_4

Returns the shape of a via on a layer, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_4(IPCB_Via argVia, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argVia` | [IPCB_Via](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Via.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_5

Returns the shape of an arc, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_5(IPCB_Arc argArc, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argArc` | [IPCB_Arc](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Arc.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_6

Returns the shape of a region, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_6(IPCB_Region argRegion, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argRegion` | [IPCB_Region](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Region.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_7

Returns a rectangle around a text, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_7(IPCB_Text argText, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argText` | [IPCB_Text](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Text.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_8

Returns the area inside the outline of a polygon, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_8(IPCB_Polygon argPoly, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argPoly` | [IPCB_Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Polygon.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_9

Returns the area inside the outline of a split plane, grown or shrunk by a given amount, as a new geometric polygon; the same as [`MakeContour`](#makecontour).

```csharp
IPCB_GeometricPolygon MakeContour_9(IPCB_SplitPlane argSplitPlane, int argExpansion, TV6_Layer argLayer);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSplitPlane` | [IPCB_SplitPlane](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_SplitPlane.md) | value |
| `argExpansion` | `int` | value |
| `argLayer` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value |

**Returns:** [IPCB_GeometricPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_GeometricPolygon.md)

Extension method of `IPCB_ContourMakerHelper` (`using PCB;`).

### MakeContour_AddSlot

Appends the vertices of a slot, a rectangle with semicircular ends, to the end of a contour.

```csharp
void MakeContour_AddSlot(IPCB_Contour argContour, int argXc, int argYc, int argxSize, int argySize, int argExpansion);
void MakeContour_AddSlot(object argContour, int argXc, int argYc, int argxSize, int argySize, int argExpansion);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argContour` | [IPCB_Contour](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Contour.md) | value | The contour that receives the vertices. |
| `argXc` | `int` | value | The X coordinate of the center of the slot, in internal units (10,000 per mil). |
| `argYc` | `int` | value | The Y coordinate of the center of the slot, in internal units (10,000 per mil). |
| `argxSize` | `int` | value | The overall width of the slot, in internal units (10,000 per mil). |
| `argySize` | `int` | value | The overall height of the slot, in internal units (10,000 per mil). |
| `argExpansion` | `int` | value | The distance by which the slot is grown on every side, in internal units (10,000 per mil); negative to shrink it. |

**Returns:** nothing (`void`)

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

The slot runs along the longer of the two sizes, and the radius of its ends is half the shorter size plus `argExpansion`; with equal sizes the result is a circle. Nothing is added when that radius is not positive. The ends are approximated according to [`ArcResolution`](#arcresolution).

### MakeContour_AddSquare

Appends the four corners of an axis-aligned rectangle to the end of a contour.

```csharp
void MakeContour_AddSquare(IPCB_Contour argContour, int argXc, int argYc, int argxSize, int argySize, int argExpansion);
void MakeContour_AddSquare(object argContour, int argXc, int argYc, int argxSize, int argySize, int argExpansion);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argContour` | [IPCB_Contour](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Contour.md) | value | The contour that receives the vertices. |
| `argXc` | `int` | value | The X coordinate of the center of the rectangle, in internal units (10,000 per mil). |
| `argYc` | `int` | value | The Y coordinate of the center of the rectangle, in internal units (10,000 per mil). |
| `argxSize` | `int` | value | The width of the rectangle, in internal units (10,000 per mil). |
| `argySize` | `int` | value | The height of the rectangle, in internal units (10,000 per mil). |
| `argExpansion` | `int` | value | The distance by which the rectangle is grown on every side, in internal units (10,000 per mil); negative to shrink it. |

**Returns:** nothing (`void`)

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

The corners are added counterclockwise, starting at the lower left corner. Nothing is added when half the width or half the height plus `argExpansion` is not positive.

## Returned by

[IPCB_ServerInterface.PCBContourMaker](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ServerInterface.md#pcbcontourmaker)
