IPCB_Fill interface
A fill on a PCB document, a rectangular object defined by two corners and a rotation.
public interface IPCB_Fill : IPCB_RectangularPrimitive
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive → IPCB_RectangularPrimitive
Remarks
A fill is a rectangular primitive (IPCB_RectangularPrimitive): its corners are (X1Location, Y1Location) and (X2Location, Y2Location) and its rotation is Rotation. Length, Width, LocationX and LocationY are not stored separately; they are calculated from the corners and assigning them changes the corners.
Example
Create a new PCB document and place a rotated fill on its bottom layer.
using DXP;
using PCB;
// Create a new PCB document.
IDXPWorkSpace workspace = DXP.GlobalVars.Client.GetDXPWorkspace();
if (workspace == null)
return;
workspace.DM_CreateNewDocument("PCB");
IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
IPCB_Board board = pcbServer.GetCurrentPCBBoard();
if (board == null)
return;
// Create a fill object.
var fill = pcbServer.PCBObjectFactory(TObjectId.eFillObject, TDimensionKind.eNoDimension, TObjectCreationMode.eCreate_Default) as IPCB_Fill;
fill.SetState_X1Location(EDP.Utils.MilsToCoord(2000));
fill.SetState_Y1Location(EDP.Utils.MilsToCoord(2000));
fill.SetState_X2Location(EDP.Utils.MilsToCoord(2500));
fill.SetState_Y2Location(EDP.Utils.MilsToCoord(2500));
fill.SetState_Layer(TV6_Layer.eV6_BottomLayer);
fill.SetState_Rotation(45);
// Add the new fill to the PCB design database.
board.AddPCBObject(fill);
// Refresh the PCB document.
DXP.Utils.RunCommand("PCB:Zoom", "Action=All");
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| Length | int | get; set | The extent of the fill in X, X2Location minus X1Location, in internal units (10,000 per mil). |
| LocationX | int | get; set | The X coordinate of the center of the fill, midway between X1Location and X2Location, in internal units (10,000 per mil). |
| LocationY | int | get; set | The Y coordinate of the center of the fill, midway between Y1Location and Y2Location, in internal units (10,000 per mil). |
| Width | int | get; set | The extent of the fill in Y, Y2Location minus Y1Location, in internal units (10,000 per mil). |
Length
The extent of the fill in X, X2Location minus X1Location, in internal units (10,000 per mil).
int GetState_Length();
void SetState_Length(int argNewValue);
Type: int · Access: read/write
Assigning a value sets X2Location to X1Location plus the value; X1Location does not change.
LocationX
The X coordinate of the center of the fill, midway between X1Location and X2Location, in internal units (10,000 per mil).
int GetState_LocationX();
void SetState_LocationX(int argNewValue);
Type: int · Access: read/write
Assigning a value moves the fill in X so that its center is at the new coordinate and keeps its extent in X, rounded down to an even number of internal units; afterwards X1Location is the smaller of the two X coordinates.
LocationY
The Y coordinate of the center of the fill, midway between Y1Location and Y2Location, in internal units (10,000 per mil).
int GetState_LocationY();
void SetState_LocationY(int argNewValue);
Type: int · Access: read/write
Assigning a value moves the fill in Y so that its center is at the new coordinate and keeps its extent in Y, rounded down to an even number of internal units; afterwards Y1Location is the smaller of the two Y coordinates.
Width
The extent of the fill in Y, Y2Location minus Y1Location, in internal units (10,000 per mil).
int GetState_Width();
void SetState_Width(int argNewValue);
Type: int · Access: read/write
Assigning a value sets Y2Location to Y1Location plus the value; Y1Location does not change.
Inherited members
- From IPCB_RectangularPrimitive: IsRedundant, RotateAroundXY, Rotation, SetState_XSizeYSize, X1Location, X2Location, XLocation, Y1Location, Y2Location, YLocation
- From IPCB_Primitive: AllowGlobalEdit, BeginModify, Board, BoundingRectangle, BoundingRectangleChildren, BoundingRectangleForPainting, BoundingRectangleForSelection, CancelModify, Component, Coordinate, DescriptorString, DetailString, Dimension, DrawAsPreview, DRCError, Enabled, Enabled_Direct, Enabled_vComponent, Enabled_vCoordinate, Enabled_vDimension, Enabled_vNet, Enabled_vPolygon, EnableDraw, EndModify, Export_ToParameters, FlipXY, GraphicallyInvalidate, Handle, Identifier, InBoard, InComponent, InCoordinate, Index, InDimension, InNet, InPolygon, InSelectionMemory, IsAssyTestPoint_Bottom, IsAssyTestPoint_Top, IsElectricalPrim, IsFreePrimitive, IsHidden, IsKeepout, IsPreRoute, IsSaveable, IsTenting, IsTenting_Bottom, IsTenting_Top, IsTestPoint_Bottom, IsTestPoint_Top, Layer, MiscFlag1, MiscFlag2, MiscFlag3, Moveable, MoveByXY, MoveToXY, Net, ObjectID, ObjectIDString, PadCacheRobotFlag, PasteMaskExpansion, Polygon, PolygonOutline, PowerPlaneClearance, PowerPlaneConnectStyle, PowerPlaneReliefExpansion, Preview, ReliefAirGap, ReliefConductorWidth, ReliefEntries, Replicate, RequiredParamterSpace, RotateBy, Selected, SolderMaskExpansion, SwapLayerPairs, TearDrop, UnionIndex, UniqueId, UniqueID, Used, UserRouted, V7Layer, ViewableObjectID
Accepted by
IPCB_ContourMaker.MakeContour_3, IPCB_ContourMaker2.MakeContour_13