90 Commits

Author SHA1 Message Date
Jeff Young
1e756dbdd8 Save cursor positions in sim workbook. 2023-02-12 20:40:23 +00:00
Jeff Young
83dd06e5d1 Allow opening of workbook when simulation frame is opened.
This involved splitting creation of traces from setting of trace
data.

Also renamed SIM_WORKBOOK to SIM_NOTEBOOK.  This class is a subclass
of wxAiuNotebook and represents the collection of simulation plot tabs.
It is NOT the same thing as a simulation workbook, which contains other
stuff such as measurements, plotted signals, colours, etc.

This also removes a bunch of "friend" declarations.
2023-02-12 20:40:23 +00:00
Jeff Young
e5176ff4d6 ADDED power dissipation plotting and cursors.
Also fixes a bug so that voltages, currents and power dissipations are
only probed if the flag is set -- this keeps ngspice from throwing an
error if you probe something twice (for instance, if you have .probe
commands in text and turn off the auto-probing).
2023-02-11 21:11:07 +00:00
Jeff Young
2a5bb71fbd ADDED operating point text variables for labels and symbols.
ADDED formatting for cursors and operationg points

Also fixes a bunch of bugs to make the new cursors work with .ac sims.

Fixes https://gitlab.com/kicad/code/kicad/issues/11253

Fixes https://gitlab.com/kicad/code/kicad/issues/6965
2023-02-11 21:11:07 +00:00
Jeff Young
39d35a8bec Better cursor feedback for plot window. 2023-02-11 21:11:07 +00:00
Jeff Young
f0bd25b397 ADDED use-settable simulation trace colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/2536
2023-02-11 21:11:07 +00:00
Jeff Young
09822c7f18 ADDED direct access to signals & cursors.
ADDED differential cursors.

Fixes https://gitlab.com/kicad/code/kicad/issues/4447

Fixes https://gitlab.com/kicad/code/kicad/issues/6221
2023-02-11 21:11:07 +00:00
Jeff Young
a1a1a49729 On-the-fly language updates for simulator window.
Fixes https://gitlab.com/kicad/code/kicad/issues/13357
2023-02-11 21:11:07 +00:00
Jeff Young
b000d68def Move simulator to tool framework. 2023-02-11 21:11:07 +00:00
Jeff Young
098d2b30a2 Support for simulation options in workbook and simulation command dlg.
Fixes https://gitlab.com/kicad/code/kicad/issues/13524

Fixes https://gitlab.com/kicad/code/kicad/issues/13523

Fixes https://gitlab.com/kicad/code/kicad/issues/13431
2023-01-14 00:21:45 +00:00
Jeff Young
b2498f5673 Coding standards & formatting. 2022-12-11 23:12:55 +00:00
Ian McInerney
fdb97a46c1 Don't copy items in for loops when not needed 2022-09-24 03:46:06 +01:00
Mikolaj Wielgus
6450ec6b85 Sim: Spice netlist exporter rewrite
Rewrite the spice exporter to work with the new simulation model
architecture and data model, with many bugfixes related to the latter
two along the way.
2022-07-30 02:25:34 +00:00
Seth Hillbrand
9b4c293f14 Ensure that any excess spaces removed
The sim command may have additional whitespace between the type and
first char
2021-10-18 10:12:53 -07:00
Seth Hillbrand
82ba456567 Remove unnecessary RegEx
This broke for signals using underscores.  More critically, RegEx is
fragile and should not be used with user input if at all possible

Fixes https://gitlab.com/kicad/code/kicad/issues/9421
2021-10-18 10:08:29 -07:00
Sylwester Kocjan
f9c5c97f74 eeschema, sim: fix wrong names of the signals
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9062
2021-09-08 23:15:29 +02:00
Wayne Stambaugh
37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh
cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
Wayne Stambaugh
dffe2661e6 Fix SPICE simulator plot bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1944
2021-07-09 16:20:35 -04:00
Mikolaj Wielgus
28531a982d Simulator: Use SIM_WORKBOOK in place of wxAuiNotebook
SIM_WORKBOOK is now a subclass of wxAuiNotebook, removing the problem of
having to maintain two separate workbook states.
2021-07-04 14:04:03 +00:00
Sylwester Kocjan
b0e6bbb39c eeschema: remove m_simCommand from SIM_WORKBOOK 2021-06-07 20:00:48 +00:00
Sylwester Kocjan
917e329bdf eeschema: remove TRACE_DESC from SIM_WORKBOOK 2021-06-07 20:00:48 +00:00
Sylwester Kocjan
959ae73a01 Eeschema,sim: extract plot colors to new class 2021-03-01 18:50:37 +00:00
Marek Roszko
b80fdad511 Don't generate a format specifier length of ":"
It's ambiguous, are we talking the length of a human colon or a pigs?

Fix #7556
2021-02-17 18:53:07 -05:00
Sylwester Kocjan
6a48e21eb2 simulator: update dialog to handle R, I & TEMP DC sweeps
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2370
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6195
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2386
2021-01-25 21:29:13 +00:00
Seth Hillbrand
67bd49b4a8 Fix order-of-ops issue in sim plot 2020-06-27 19:59:49 -07:00
Sylwester Kocjan
fdccdd5cb9 Eeschema: adding .op SPICE simulation support
ADDED new tab on simulation settings dialog, which allows to run .op analysis.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2368
2020-04-15 01:51:58 +00:00
jean-pierre charras
0e51ed32f9 ADDED: Sim plot panel: option to plot on a white background or a black background. 2020-02-01 18:20:18 +01:00
Ian McInerney
00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Jonatan Liljedahl
f433037dcd Eeschema: simulator: allow dotted traces for current and phase.
ADD: Allow drawing of current and phase traces with dotted style
for easier differentiation from voltage and magnitude. The option
is available in the View menu of the simulator.
2020-01-07 19:45:44 +00:00
Seth Hillbrand
c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
jean-pierre charras
c5290de6ec housekeeping:
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
2019-11-16 09:39:36 +01:00
Jonatan Liljedahl
fa14d5b9fa Eeschema: simulator: more trace colors, smarter color allocation
NEW: The simulator plot now avoids colors already in use, if possible.
The palette is replaced with a larger one with less saturated colors.

Fixes: lp:1851372
* https://bugs.launchpad.net/kicad/+bug/1851372
2019-11-11 17:20:56 +00:00
Jon Evans
5287ab6e4f Eeschema: improve simulator behavior for two-source DC analysis
Fixes: lp:1830478
* https://bugs.launchpad.net/kicad/+bug/1830478

(cherry picked from commit 356ccd0314a51d7c23751695a4eba444de979520)
2019-05-27 18:23:56 -04:00
Maciej Suminski
85ef058458 Spice simulator: change gain units to dBV 2018-09-22 19:05:04 +02:00
Maciej Suminski
61597db12d Make the Simulator dialog strings translatable 2018-05-25 11:24:25 +02:00
Maciej Suminski
9960416e32 Spice simulator: plot currents in DC sweep simulation
Fixes: lp:1767457
* https://bugs.launchpad.net/kicad/+bug/1767457
2018-04-28 01:14:00 +02:00
Maciej Suminski
2018d48946 Fixed removal order in SIM_PLOT_PANEL::DeleteTrace() 2017-06-16 23:17:34 +02:00
jean-pierre charras
673b094b2b Fix a few missing override qualifiers and shadowed vars. 2016-09-27 10:58:05 +02:00
Maciej Suminski
81e015036e Fixes for drawing color labels in simulator's signal list 2016-08-30 14:25:59 +02:00
jp-charras
26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
jean-pierre charras
dd395a6854 Fix deprecated and shadowed var compil warnings 2016-08-12 11:00:58 +02:00
Maciej Suminski
eeeb3e0a9a Simulator code formatting and clean up 2016-08-11 14:42:17 +02:00
Johannes Maibaum
c78462c4f5 sim: Modifications to compile the simulator on OSX. 2016-08-11 14:42:15 +02:00
Tomasz Wlostowski
1930cd4d66 sim: display labels on current scale when only currents are added to transient plot 2016-08-11 14:42:14 +02:00
Maciej Suminski
e452992a6c Cursor centering fix 2016-08-11 14:42:14 +02:00
Maciej Suminski
ca36f15fee Temporary disable cursor centering 2016-08-11 14:42:14 +02:00
Tomasz Wlostowski
b20f941bd0 sim: hopefully final version of plot axis unit/suffix handling. 2016-08-11 14:42:10 +02:00
Maciej Suminski
5772938a71 New cursor shows up in the center, can be dragged by its axis 2016-08-11 14:42:07 +02:00
Tomasz Wlostowski
e691565fe3 sim: updated label generation code to match changes in the mathplot api 2016-08-11 14:42:04 +02:00