IPCB_ClearanceConstraint interface
A clearance rule (TRuleKind.eRule_Clearance) that defines the minimum clearance between any two objects on the copper layers.
public interface IPCB_ClearanceConstraint : IPCB_Rule
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive → IPCB_Rule
Remarks
The rule has one clearance for all pairs of object kinds (Gap) and can have a clearance of its own for individual pairs of object kinds, such as arcs and tracks (Clearance, Clearance_1). Mode tells whether any pair has a clearance of its own. A new rule has a gap of 10 mil.
PrimitivesViolate checks whether two objects violate the rule.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| Clearance | int | get; set | The clearance that the rule requires between two objects, in internal units (10,000 per mil). |
| Clearance_1 | int | get; set | The clearance that the rule requires between two kinds of objects, in internal units (10,000 per mil). |
| Gap | int | get; set | The clearance that the rule requires between pairs of object kinds that have no clearance of their own, in internal units (10,000 per mil). |
| Mode | TClearanceConstraintMode | get | Whether the rule has one clearance for all pairs of object kinds or clearances of their own for individual pairs. |
Clearance
The clearance that the rule requires between two objects, in internal units (10,000 per mil).
int GetClearance(IPCB_Primitive argP1, IPCB_Primitive argP2);
void SetClearance(IPCB_Primitive argP1, IPCB_Primitive argP2, int argValue);
Type: int · Access: read/write · Index: argP1 (IPCB_Primitive): The first object., argP2 (IPCB_Primitive): The second object.
The accessors are extension methods of IPCB_ClearanceConstraintHelper (using PCB;).
The kinds of the two objects select the clearance, as in Clearance_1: arcs, tracks, pads (through-hole pads on the multi-layer, surface-mount pads on other layers), vias, fills, polygons, regions and text. When reading, a track, arc or region that is part of a polygon uses the clearance of polygons. Reading returns Gap for an object of another kind, and 0 when an argument is null. Assigning does nothing when an argument is null or an object of another kind.
Clearance_1
The clearance that the rule requires between two kinds of objects, in internal units (10,000 per mil).
int GetClearance_1(TObjectClearanceId argP1, TObjectClearanceId argP2);
void SetClearance_1(TObjectClearanceId argObj1, TObjectClearanceId argObj2, int argValue);
Type: int · Access: read/write · Index: argP1 (TObjectClearanceId): The first object kind., argP2 (TObjectClearanceId): The second object kind.
The accessors are extension methods of IPCB_ClearanceConstraintHelper (using PCB;).
The order of the two kinds does not matter. Reading a pair that has no clearance of its own returns Gap; assigning the value of Gap to a pair removes its own clearance. Each assignment can also change Gap: the clearance shared by the largest number of pairs of object kinds becomes the gap.
Gap
The clearance that the rule requires between pairs of object kinds that have no clearance of their own, in internal units (10,000 per mil).
int GetState_Gap();
void SetState_Gap(int argValue);
Type: int · Access: read/write
A new rule has 10 mil. Assigning a gap removes the clearances of individual pairs of object kinds (Clearance, Clearance_1), so that the new gap applies to every pair.
Mode
Whether the rule has one clearance for all pairs of object kinds or clearances of their own for individual pairs.
TClearanceConstraintMode GetState_Mode();
Type: TClearanceConstraintMode · Access: read-only
The accessors are extension methods of IPCB_ClearanceConstraintHelper (using PCB;).
It is TClearanceConstraintMode.eClearanceConstraintMode_ObjectsClearance while at least one pair of object kinds has a clearance that differs from Gap, and TClearanceConstraintMode.eClearanceConstraintMode_SingleClearance otherwise. Assigning Gap makes it TClearanceConstraintMode.eClearanceConstraintMode_SingleClearance.
Methods
| Method | Returns | Description |
|---|---|---|
| PrimitivesViolate | bool | Returns whether two objects violate the rule, that is, they are closer together than the clearance that the rule requires for them. |
PrimitivesViolate
Returns whether two objects violate the rule, that is, they are closer together than the clearance that the rule requires for them.
bool PrimitivesViolate(IPCB_Primitive argP1, IPCB_Primitive argP2);
bool PrimitivesViolate(object argP1, object argP2);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP1 | IPCB_Primitive | value | The first object. |
argP2 | IPCB_Primitive | value | The second object. |
Returns: bool
The first overload is an extension method of IPCB_ClearanceConstraintHelper (using PCB;) with typed parameters; the second is declared by the interface.
Returns false when both arguments are the same object, when an object is not on a signal layer, an internal plane layer, the multi-layer or the keep-out layer, when the objects have no layer in common, or when they do not have the net relationship that NetScope requires; keepout objects are checked whatever their nets. A clearance of 0 is not checked. When an object has a hole, the hole is also checked against the other object, with the clearance between TObjectClearanceId.eObjectClearanceID_Hole and the kind of the other object.
Inherited members
- From IPCB_Rule: ActualCheck, ActualCheck_1, CheckBinaryScope, CheckUnaryScope, CollisionExpansion, Comment, DataSummaryString, DefinedByLogicalDocument, DRCEnabled, Export_ToParameters_1, GetWhatsThisHelpString, IsUnary, LayerKind, Name, NetScope, NetScopeMatches, Priority, RuleKind, Scope1Expression, Scope1Includes, Scope2Expression, Scope2Includes, ScopeDescriptorString, ScopeKindIsValid, ShortDescriptorString, ViolationDescriptorString
- 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