IPCB_ContourMaker interface
Builds the shapes of PCB design objects as geometric polygons, and adds the vertices of rectangles, slots and arcs to contours.
public interface IPCB_ContourMaker
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Derived: IPCB_ContourMaker2
Remarks
Get it with IPCB_ServerInterface.PCBContourMaker. Curved edges are approximated by straight segments; ArcResolution sets how closely.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| 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).
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 returns the same object on every call.
Methods
| Method | Returns | Description |
|---|---|---|
| AddArcToContour | void | Appends the vertices of a circular arc, approximated by straight segments, to the end of a contour. |
| MakeContour | IPCB_GeometricPolygon | Returns the shape of a design object on a layer, grown or shrunk by a given amount, as a new geometric polygon. |
| MakeContour_1 | IPCB_GeometricPolygon | Returns the shape of a track, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour. |
| MakeContour_2 | IPCB_GeometricPolygon | 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_3 | IPCB_GeometricPolygon | Returns the shape of a fill, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour. |
| MakeContour_4 | IPCB_GeometricPolygon | 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_5 | IPCB_GeometricPolygon | Returns the shape of an arc, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour. |
| MakeContour_6 | IPCB_GeometricPolygon | Returns the shape of a region, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour. |
| MakeContour_7 | IPCB_GeometricPolygon | Returns a rectangle around a text, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour. |
| MakeContour_8 | IPCB_GeometricPolygon | 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_9 | IPCB_GeometricPolygon | 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_AddSlot | void | Appends the vertices of a slot, a rectangle with semicircular ends, to the end of a contour. |
| 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.
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 | 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 away from the circle. The smaller 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.
IPCB_GeometricPolygon MakeContour(IPCB_Primitive argPrim, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argPrim | IPCB_Primitive | 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 | value | The layer whose shape is returned. Only pads and vias use it; the other objects ignore it. |
Returns: IPCB_GeometricPolygon
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.
MakeContour_1
Returns the shape of a track, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
IPCB_GeometricPolygon MakeContour_1(IPCB_Track argTrack, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argTrack | IPCB_Track | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_2(IPCB_Pad argPad, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argPad | IPCB_Pad | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_3(IPCB_Fill argFill, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argFill | IPCB_Fill | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_4(IPCB_Via argVia, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argVia | IPCB_Via | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_5(IPCB_Arc argArc, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argArc | IPCB_Arc | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_6(IPCB_Region argRegion, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argRegion | IPCB_Region | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_7(IPCB_Text argText, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argText | IPCB_Text | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_8(IPCB_Polygon argPoly, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argPoly | IPCB_Polygon | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
IPCB_GeometricPolygon MakeContour_9(IPCB_SplitPlane argSplitPlane, int argExpansion, TV6_Layer argLayer);
| Parameter | Type | Passing |
|---|---|---|
argSplitPlane | IPCB_SplitPlane | value |
argExpansion | int | value |
argLayer | TV6_Layer | value |
Returns: IPCB_GeometricPolygon
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.
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 | 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.
MakeContour_AddSquare
Appends the four corners of an axis-aligned rectangle to the end of a contour.
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 | 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.