LayoutHost Shape Creation Methods
These methods create virtual shapes in the footprint.
While these shapes mirror actual primitives, they are drawn only and
are not selectable or editable. All length values are in the current
units of the footprint.
NewArc(layer, cx, cy, r, ang1, ang2, lw)
Creates an arc in the footprint, returns a geometry object.
Parameters:
Layer: In integer id retrieved from GetLayerID
Cx: Center x coordinate
Cy: Center y coordinate
R: Radius of arc centerline
Ang1: Start angle of arc (in degrees)
Ang2: Stop angle of arc going CCW
Lw: Line width of arc
Example:
var geom = LayoutHost.NewArc(layerID, 0, 0, r, 0, 90,
w);
NewArcLine(layer, cx, cy, r, ang1, ang2, lw, end)
Creates an arc line in the footprint, returns a geometry
object.
Parameters:
Layer: In integer id retrieved from GetLayerID
Cx: Center x coordinate
Cy: Center y coordinate
R: Radius of arc centerline
Ang1: Start angle of arc (in radians)
Ang2: Stop angle of arc going CCW
Lw: Line width of arc
End: End style. Possible end styles are: flat,
extended, round.
Example:
var geom = LayoutHost.NewArcLine(layerID, 0, 0, r,
0, 90, w, “flat”);
NewCircle(layer, cx, cy, r)
Creates a circle in the footprint, returns a geometry
object.
Parameters:
Layer: In integer id retrieved from GetLayerID
Cx: Center x coordinate
Cy: Center y coordinate
R: Radius of circle
Example:
var geom = LayoutHost.NewCircle(layerID, 0, 0, r);
NewLine(layer, points, lw, join, end)
Creates a polyline in the footprint, returns a geometry
object.
Parameters:
Layer: In integer id retrieved from GetLayerID
Points: A PointsObject populated with the points
appropriate
Lw: Linewidth
Join: Join style. Possible join styles are:
corner, miter, round.
End: End style. Possible end styles are: flat,
extended, round.
(Passing an empty string defaults to round for
Join or End style.)
Example:
var geom = LayoutHost.NewLine(layerID, pts, w, “corner”,
“flat”);
NewPoly(layer, points)
Creates a polygon in the footprint, returns a geometry
object.
Parameters:
Layer: In integer id retrieved from GetLayerID.
Points: A PointsObject populated with the points
appropriate
Example:
var geom = LayoutHost.NewPoly(layerID, pts);
NewRect(layer, cx, cy, width, height, angle)
Creates a rectangle in the footprint, returns a geometry
object.
Parameters:
Layer: In integer id retrieved from GetLayerID
Cx: Center x coordinate
Cy: Center y coordinate
Width: Width of rect
Height: Height of rect
Angle: Rotation angle to draw rect (in radians)
Example:
var geom = LayoutHost.NewRect(layerID, 0, 0, w, h,
0);
NewText(layer, text, x, y, font, size, angle, just)
Creates text in the footprint, returns a geometry object.
Parameters:
Layer: An integer id retrieved from GetLayerID
Text: The text string
X: Text x placement position
Y: Text y placement position
Font: Text font; may be left blank. On system
layers, a system font must be used. Otherwise, specify a plotter
font (e.g., "RomanDuplex").
Size: Text height (in length units for a plotter
font; in points for a system font)
Angle: The text angle (in radians)
Just: Text justification relative to the placement
position: "LeftTop", "LeftBase", "LeftBottom", "CenterTop", "CenterBase",
"CenterBottom", "RightTop", "RightBase", "RightBottom"
Example:
var text = LayoutHost.NewText(layer, "Text", 2, -1,
"", 1, 0, "LeftBase");