LayoutHost Via and Padstack Methods
NewVia(name, start_layer, end_layer, cx, cy, padstack,
diameter)
Creates a via in the footprint and returns it as a via
object.
Parameters:
Name: Name of the via
Start_layer: Integer id retrieved from GetLayerID
End_layer: Integer id retrieved from GetLayerID
Cx: Center x coordinate
Cy: Center y coordinate
Padstack: Name of the padstack to use. Passing
an empty string (“”) results in “No Pad SMT East” by default.
Diameter: Diameter of the via
Example:
var via = LayoutHost.NewVia(“via_name”, layerID1, layerID2,
x, y, “Planar EMVia”, diameter);
SnapVia(via, to_edge, to_edge_pos, x_off, y_off, rel_angle);
Moves a via to the specified edge position. The target
snap point is specified by an edge position with an offset and angle.
Associated with the target edge position is a normal (perpendicular to
the edge and pointing outwards, or to the right in poly-lines) and a
tangent vector (pointing in the direction of the edge). These two vectors
define the local coordinate system in which x_off, y_off, and angle are
specified.
Parameters:
Via: Specifies the via object to be moved
To_edge: Specifies the target object and edge
To_edge_pos: The target snap point. The via
position is snapped to this location, specified as LayoutHost.START,
MID, or END (or a value < 0, 0, or > 0).
X_off: An offset along the normal vector for
the target edge.
Y_off: An offset along the tangent vector for
the target edge.
Rel_angle: An additional rotation (specified
as a counter-clockwise rotation in radians) relative to the normal vector
for the target edge.
Example:
// Place ‘via’ 1 unit inside edge 2 of ‘rect’
LayoutHost.SnapVia(via, rect.Edge(2), LayoutHost.MID,
-1, 0, 0);