If the component is known to Lcapy (see lcapy.schemcpts.py
):
-
Create a file in
lcapygui/components
and add new component class. For example, addFoo
infoo.py
. If it is a bipole useresistor.py
as a template. -
Add component to component_map in
lcapygui/ui/uimodelbase.py
-
Add component to cpts in
lcapgui/cpt_maker.py
and import class -
Create an SVG file by importing make from makesvg and calling it with the component type, e.g.,
make('R')
-
Add the new SVG file in
lcapygui/data/svg/
to git -
Install
lcapy-gui
(to copy new SVG file to correct location) -
Run
sketchview
to view the SVG file, e.g.,sketchview Q-npn'. Use the
--pinsoption to show the pins. Note, the origin should be the centre of the component (if not update
lcapygui/components/sketch.py`). -
Define the pin locations in
foo.py
; zoom in to the displayed SVG file to find the exact locations. Note, the x-y position of the mouse is shown in the top right corner. -
Update the menu in
lcapygui/ui/tk/uimodelmph.py
If Circuitikz has changed how components are drawn:
- Run python or ipython
from makesvg import make_all make_all()