Skip to main content
View as Markdown

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​

PropertyTypeAccessDescription
ArcResolutionintget; setHow 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​

MethodReturnsDescription
AddArcToContourvoidAppends the vertices of a circular arc, approximated by straight segments, to the end of a contour.
MakeContourIPCB_GeometricPolygonReturns the shape of a design object on a layer, grown or shrunk by a given amount, as a new geometric polygon.
MakeContour_1IPCB_GeometricPolygonReturns the shape of a track, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
MakeContour_2IPCB_GeometricPolygonReturns 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_3IPCB_GeometricPolygonReturns the shape of a fill, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
MakeContour_4IPCB_GeometricPolygonReturns 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_5IPCB_GeometricPolygonReturns the shape of an arc, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
MakeContour_6IPCB_GeometricPolygonReturns the shape of a region, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
MakeContour_7IPCB_GeometricPolygonReturns a rectangle around a text, grown or shrunk by a given amount, as a new geometric polygon; the same as MakeContour.
MakeContour_8IPCB_GeometricPolygonReturns 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_9IPCB_GeometricPolygonReturns 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_AddSlotvoidAppends the vertices of a slot, a rectangle with semicircular ends, to the end of a contour.
MakeContour_AddSquarevoidAppends 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);
ParameterTypePassingDescription
argContourIPCB_ContourvalueThe contour that receives the vertices.
argStartAngledoublevalueThe angle at which the arc starts, in degrees, measured counterclockwise from the positive X axis.
argEndAngledoublevalueThe angle at which the arc ends, in degrees, measured counterclockwise from the positive X axis.
argcxintvalueThe X coordinate of the center of the arc, in internal units (10,000 per mil).
argcyintvalueThe Y coordinate of the center of the arc, in internal units (10,000 per mil).
argRadiusintvalueThe radius of the arc, in internal units (10,000 per mil).
argClockwiseboolvalueTrue 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);
ParameterTypePassingDescription
argPrimIPCB_PrimitivevalueThe design object.
argExpansionintvalueThe 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.
argLayerTV6_LayervalueThe 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);
ParameterTypePassing
argTrackIPCB_Trackvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argPadIPCB_Padvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argFillIPCB_Fillvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argViaIPCB_Viavalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argArcIPCB_Arcvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argRegionIPCB_Regionvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argTextIPCB_Textvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argPolyIPCB_Polygonvalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassing
argSplitPlaneIPCB_SplitPlanevalue
argExpansionintvalue
argLayerTV6_Layervalue

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);
ParameterTypePassingDescription
argContourIPCB_ContourvalueThe contour that receives the vertices.
argXcintvalueThe X coordinate of the center of the slot, in internal units (10,000 per mil).
argYcintvalueThe Y coordinate of the center of the slot, in internal units (10,000 per mil).
argxSizeintvalueThe overall width of the slot, in internal units (10,000 per mil).
argySizeintvalueThe overall height of the slot, in internal units (10,000 per mil).
argExpansionintvalueThe 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);
ParameterTypePassingDescription
argContourIPCB_ContourvalueThe contour that receives the vertices.
argXcintvalueThe X coordinate of the center of the rectangle, in internal units (10,000 per mil).
argYcintvalueThe Y coordinate of the center of the rectangle, in internal units (10,000 per mil).
argxSizeintvalueThe width of the rectangle, in internal units (10,000 per mil).
argySizeintvalueThe height of the rectangle, in internal units (10,000 per mil).
argExpansionintvalueThe 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