The Draw page: arbitrary shapes drawn over the board, in plan and in 3D, for a
run to add to it (kicad2ems.core.shapes: the drawing as data, and what it does
to the board; core.shapeops: edits of many shapes, snapping, measuring;
core.view3d: the 3D view's numbers).
Plan the board's copper on the layer drawn on (the other layers faint),
and the shapes. Tools: Select, Rectangle and Circle (two clicks),
Polygon and Trace (a click per point; double-click, right-click or
Enter ends, Esc drops), Port (a click), Measure (a click per
point: two give the distance and its angle, a third the angle
between the legs; Esc clears). Points snap to the board's pads,
vias, track ends and edges and to the shapes' corners, midpoints
and centres (a marker shows where; `objects`), else to the grid.
Select a click picks a shape, Shift or Ctrl + click adds it or takes it
off; a drag from a shape moves the selection (X / Y while
dragging: along that axis only; Esc puts it back), from a handle
reshapes the one selected; a drag on nothing draws a box (left to
right: what is wholly inside; right to left: what it touches;
Shift: added). Ctrl + drag, or the middle button, pans; the wheel
and the right button zoom.
3D the same shapes extruded: copper and cuts as slabs on their layer,
metal, dielectric, air, ferrite (charcoal) and magnets as solids
between their two heights (a magnet in two halves, its poles: N
red, S blue, so the one on top says which way it is magnetised),
over the board's substrate and copper. A click picks a shape
(Shift or Ctrl: adds or takes it off; on nothing: none), a drag
moves the selection on its level (X / Y / Z while dragging: along
that axis), a drag on the gizmo's arrows along that one, Shift +
drag on a solid's top or bottom face stretches it, on its side
lifts it; Shift + drag on nothing draws a box (as the plan's); a
drag on nothing orbits, Ctrl + drag pans. The camera's presets
(Top 7, Front 1, Side 3: orthographic; Iso 5: perspective; Fit
F), a clip plane (Clip), what is drawn (Show: the board's layers,
each material), the working level's grid. (gui.draw3d)
Shapes the list in the order they are applied (a cut takes out what is
drawn before it), each shown or hidden (hidden: not drawn or
picked, still applied) and locked or not (locked: not moved,
turned or deleted); the selected one's properties (with several
selected a change applies to them all: a ferrite's er, tan d,
4 pi Ms and FMR linewidth, a magnet's remanence and which way it
is magnetised, and for either the bias the drawn magnets give the
ferrite (core.magnets: the internal field, how much of it is
saturated, f0 and fm; worked out a moment after, never while
dragging); a solid made a ferrite with a laminate's er 4.3 takes
a ferrite's 15); Arrange (move by, rotate
by any angle about a point, mirror, align, distribute) and Array
(a row, a grid, a circle). The list has an icon a shape (its
kind's glyph in its material's colour), the form its fields in
groups (Shape, Size, Heights, Material, Bias, Points).
Menus Drawing (new, open, save; Use in runs, Region from shape, Ports
to settings), Edit (undo, the clipboard, select all, none or
alike: the same material, layer, net or kind; lock, hide, the
order), Modify (rotate, to polygon; union, subtract, intersect:
core.shapeops.combined; fillet and chamfer the corners),
Templates (core.templates: a can, a DR, a circulator, an SMA, an
absorber, a via fence; a dialog of its numbers, then a click
places its shapes, drawn under the mouse till then), View (fit,
the camera, orthographic, a ferrite's bias map in plan: H0 in
colour over it, drawmagnets.bias_map, the plan and 3D side by
side).
Copy, cut and paste go through the clipboard as kicad2ems-shapes text (into
another drawing, or another session). Use in runs saves the drawing and names
it in the settings (`shapes`); Region from shape and Ports to settings write
those settings (KiCad coordinates: y negated). The status bar has the cursor
(model and KiCad mm), the size being drawn and what it snapped to.
Keys while the page has the focus: S R C P T O M the tools, Delete, Esc,
Enter, Ctrl+Z / Ctrl+Y undo and redo (the settings keep theirs elsewhere),
Ctrl+A all, Ctrl+C / Ctrl+X / Ctrl+V the clipboard, Ctrl+D duplicate, F fit
the selection in both views, 7 1 3 5 the 3D camera, X / Y / Z while dragging,
the arrows a nudge of a grid step (Shift: ten; one undo step while they go
on).
tab = DrawTab(win) # win: the main window, or None (on its own)
tab.set_board(layout) # core.layout.board_layout's dict, or None
tab.add(Shape(...)); tab.drawing; tab.save(path); tab.load(path)
tab.bias_text() # the selected ferrite's (or magnet's) bias
tab.select(i, 'only' | 'toggle' | 'add'); tab.selected; tab.sel
tab.move_by(dx, dy); tab.rotate_by(30, about); tab.mirror('x')
tab.align('left'); tab.distribute('x'); tab.make_array('row', n=5, dx=1)
tab.combine('union'); tab.round_corners(0.5, 'fillet'); tab.nudge(dx, dy)
tab.select_alike('material'); tab.place_template('can', (x, y), values)
tab.start_placing('circulator', values) # the next click places it