Skip to content

Drawing geometry

The Edit tab is a 2D drafting canvas: draw copper and dielectric shapes on the active layer, then place vias and ports through the stack. This page covers the coordinate model, the draw tools, and every shape primitive.

Coordinate model

The scene is in scene millimetres with Y up, so a shape moved toward the top of the canvas gains Y. Every center-based shape stores x_mm and y_mm as the center of the shape, not a corner, and rotation is clockwise-positive degrees. The ruler and the property spins read and write these same scene millimetres.

Snap and the grid step sit on the toolbar. With Snap on (the default), a clicked point rounds to the nearest grid multiple in both X and Y. The grid step defaults to 1 mm. Typing directly in a shape's property fields bypasses the grid, so snap constrains the pointer, not the stored value. M starts the ruler: a two-click transient measurement that draws a line with a distance readout in mm and places nothing permanent.

Draw tools

Each tool arms a single drawing mode. Its shortcut fires only on the Edit tab and only when a text field does not have focus.

ToolKeyDraws
SelectEscPick, move, and edit existing shapes
RectangleRDrag a box, or click for a grid-sized default
CircleCDrag out a radius from the center
ArcA curved-trace band (unkeyed)
PolygonPClick vertices, close to finish
ViaFDrop a plated via through two conductor layers
Point PortQSingle-cell vertical feed
More PortsMenu: Area, Planar Line, Planar Bar port
RulerMMeasure a distance, transient
Import PNGRasterize a PNG image as copper
Script ShapeAuthor a Python-defined shape

Esc cancels the active tool and returns to Select. Import PNG and Script Shape open a dialog rather than arming a canvas mode. The area, line, and bar ports live under More Ports, with the rectangular Area port also on A.

Selecting a shape shows its handles: a rectangle gets corner and edge-midpoint handles that resize it, a circle gets outer and inner rim handles for its diameters, an arc gets rim and angle handles, and a polygon gets one handle per vertex. Drag the body to move. Space rotates the selection 90 degrees clockwise about its centroid, X mirrors it horizontally, and Y mirrors it vertically. Ctrl+C, Ctrl+X, and Ctrl+V copy, cut, and paste the selection, Delete removes it. Full key list on Keyboard shortcuts.

Shape primitives

The primitive kinds and their parameters, straight from the geometry registry:

`rect`

Axis-aligned rectangle (center-based) with optional rotation.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the rectangle center.
y_mmnumbermm0yesY of the rectangle center.
w_mmnumbermmnoneyesFull width (local X extent).
h_mmnumbermmnoneyesFull height (local Y extent).
rotationnumberdeg0Rotation, clockwise-positive.

Anchors: center, corner_ne, corner_nw, corner_sw, corner_se, edge_n, edge_s, edge_e, edge_w

`circle`

Filled disc, or an annular ring when inner_d_mm > 0.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the circle center.
y_mmnumbermm0yesY of the circle center.
d_mmnumbermmnoneyesOuter diameter.
inner_d_mmnumbermm0Inner diameter; 0 is a solid disc, >0 is a ring.

Anchors: center, quad_0, quad_90, quad_180, quad_270

`arc`

Curved trace as an annular band sector (centerline radius plus width).

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the arc center.
y_mmnumbermm0yesY of the arc center.
r_mmnumbermmnoneyesCenterline radius.
width_mmnumbermmnoneyesBand thickness (radial width).
a0_degnumberdeg0Start angle, counter-clockwise from +X.
a1_degnumberdegnoneyesEnd angle, counter-clockwise from +X.

Anchors: center, start, end, mid, start_outer, start_inner, end_outer, end_inner

`poly`

Polygon whose vertices are local offsets from (x_mm, y_mm); rotation is baked into the points.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX offset of the polygon frame.
y_mmnumbermm0yesY offset of the polygon frame.
pointsarray[]Vertices as [[lx, ly], ...] local offsets.

Anchors: center, vertex_<i>, edgemid_<i>

`via`

Plated via: annular conductor pad plus a drilled hole spanning two conductor layers.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the via center.
y_mmnumbermm0yesY of the via center.
d_mmnumbermmnoneyesPad outer diameter.
drill_mmnumbermm0.3Drill-hole diameter.
annular_mmnumbermm0.6Annular-ring diameter.
start_layerstringTop conductor layer name.
end_layerstringBottom conductor layer name.
plated_overboolfalsePlated-over-filled cap. False is drilled-through.
solidboolfalseRasterize the via as a solid PEC column, no drill or antipad. Removes the air core and clearance, which raises the via capacitance to nearby planes. For cross-checks against solid-cylinder via models.

Anchors: center

`port`

Excitation or measurement port. Set params['port_type'] to point, rect, line, or bar; see PORT_TYPES.

ParamTypeUnitsDefaultRequiredMeaning
port_typestringpointPort subtype: point, rect, line, or bar.
port_numberint1Port index used to name the S-matrix column.
impedance_ohmnumberOhm50Reference impedance.
activeboolfalseTrue drives the port; False makes it a passive load/measurement.

Anchors: center

`bitmap`

Embedded raster image rasterized as a conductor pattern.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the image center.
y_mmnumbermm0yesY of the image center.

Anchors: center

`dxf`

Imported DXF outline rasterized as a conductor pattern.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX of the import center.
y_mmnumbermm0yesY of the import center.

Anchors: center

`script`

Python-defined shape: the source draws geometry and declares named point anchors.

ParamTypeUnitsDefaultRequiredMeaning
x_mmnumbermm0yesX origin offset for the script frame.
y_mmnumbermm0yesY origin offset for the script frame.
sourcestringPython source using the shape DSL (path, point, ...).

Anchors: center, point:<name>

A few points the table does not state:

  • A circle with inner_d_mm greater than zero is a ring, not a disc. Use it for annular pads and washers.
  • An arc is a curved trace: a band of width_mm swept along a centerline of radius r_mm between two angles. Angles are counter-clockwise from +X, which is the drafting convention and independent of the clockwise-positive rotation used by the box-based shapes.
  • A poly bakes its rotation into the point list, so it has no rotation parameter. Its vertices are local offsets from the frame origin.
  • A bitmap carries an imported raster rasterized as a conductor pattern. See Importing artwork.
  • A script is drawn by Python source using the shape DSL and can declare named point anchors. Author it in the Script Shape dialog below.

Vias

A via is a plated barrel spanning from start_layer to end_layer, two conductor layers in the stack. The via dialog sets the drill and annular-ring diameters and picks the two layers. Two flags change how the barrel rasterizes. Plated-over (POFV) caps the drill with copper on the outer faces while the hole stays air through the dielectric, for filled HDI microvias. Solid rasterizes the via as a plain PEC column with no drilled core and no clearance antipad, which raises the via capacitance to nearby planes and is meant for cross-checks against solid-cylinder via models. Solid wins over the cap type. The annular ring must be at least the drill diameter.

Script shapes

A script shape is a small Python program that draws a 2D shape, for the geometry a rectangle or polygon cannot express: a spiral, a taper, a mathematically swept curve. The Script Shape dialog is a code editor over the drawing calls with a live preview and a status line that shows the current lint or runtime error and its line number. A new shape opens on a spiral template that runs as is.

The program draws in a local millimetre frame whose origin is the shape's x_mm/y_mm, so you author around (0, 0) and move the shape on the canvas afterward. Four calls are available:

CallDraws
path(points, width=0.2)a stroked open polyline, width in mm
polygon(points)a filled polygon, three or more points
disc(cx, cy, r)a filled circle
point(name, x, y)a named anchor, not geometry

points is a list of (x, y) pairs in local mm. A point call declares a named anchor that appears on the shape for constraints and dimensions to attach to, the same way a rectangle exposes its corners.

The program runs with a math environment and ordinary Python control flow, and no imports. Available names include pi, e, tau, the trig and sqrt/exp/log family, hypot, atan2, floor, ceil, degrees, radians, and linspace, plus the plain builtins range, len, min, max, sum, enumerate, zip, and the list, dict, and set constructors. Trig here works in RADIANS, unlike the expression fields elsewhere in the editor, which use degrees: write cos(2 * pi * t), not cos(360 * t).

A bare name that matches a Variable Studio variable is injected as its current value, so a script shape is parametric: reference turns or pad_w in the source and the shape redraws when that variable changes. Assigning a name inside the script uses the local value instead. The starter template sets its inputs as local assignments and notes which line to delete to drive one from a variable.

Local-mm bounds clip the drawn geometry, and Auto-fit from geometry sets the bounds to the current extent. The output is capped at tens of thousands of points, and a lint blocks imports and attribute escapes before the code runs. A script that raises reports the error and its line in the status bar rather than writing a partial shape into the project.

Anchors

Every shape exposes named anchors derived from its parameters: a rectangle's corners and edge midpoints, a circle's quadrant points, an arc's ends and rim points, a script shape's declared points. Anchors are computed from the shape, never stored, so they move with it. Constraints and dimensions attach to anchors to lock geometry together. See Parametric constraints.

Layer targeting

A new shape lands on the active layer, the row selected in the stack panel. Digits 1 through 9 select a layer by position, and drawing with no layer selected is refused with a prompt to add one. Vias are the exception: they name their own two layers and span the stack.

The active layer's type decides what a shape paints. On a conductor layer, a shape is copper, and vias carve their holes and antipads out of it. On a dielectric layer, the same shape paints that dielectric region using the same renderer, so a dielectric accepts every shape kind. A dielectric layer left unpainted renders as air and is flagged before a run rather than filled with a guessed slab. Build and order the layers first on Stackup and layers.