Commit Graph

9336 Commits

Author SHA1 Message Date
Jeff Young 8e4cd1e1a6 Check for sheet directive changes when running simulations.
Fixes https://gitlab.com/kicad/code/kicad/issues/10486
2022-12-05 20:03:42 +00:00
Jeff Young 7e1fecaf2e Formatting. 2022-12-05 20:03:42 +00:00
Fabien Corona e861606871 sim: string change 2022-12-05 19:45:57 +00:00
Jeff Young b7d41e0e56 Update simulator with NUMERIC_EVAL, decimal separator processing, etc.
Also includes fixes for instance data and resolving of textvar
references.

Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.

Fixes https://gitlab.com/kicad/code/kicad/issues/12357
2022-12-05 12:40:29 +00:00
Jeff Young f50b9799a6 Remove old code that was only needed when we auto-added netclasses...
... to netclass flags.  They're now directive labels and the netclass
field isn't auto-added anymore.  However, we *do* auto-add an intersheet
refs field, and that's required.
2022-12-04 21:06:35 +00:00
Jeff Young 1855885d1e Gracefully handle spice models not recognized by KiCad.
Fixes https://gitlab.com/kicad/code/kicad/issues/12689
2022-12-04 21:06:35 +00:00
Jeff Young f29f0c5c0a Don't push a model that didn't load.
Fixes https://gitlab.com/kicad/code/kicad/issues/12689
2022-12-04 21:06:35 +00:00
Jeff Young 672927e183 Clearer error message. 2022-12-04 21:06:35 +00:00
Jeff Young bed22272e5 Supply default values for random uniform voltage sources.
Fixes https://gitlab.com/kicad/code/kicad/issues/12861
2022-12-04 21:06:35 +00:00
Jeff Young 49abd2682a Simulation model properties dialog improvements.
1) Fix <TAB> processing
2) Don't hide/show controls where possible
3) Use a more concrete reference to primary parameter in Save to Value
checkbox
4) Move Save to Value checkbox into model section
2022-12-04 21:06:35 +00:00
jean-pierre charras 6b9c82c975 eeschema: fix a crash when converting a old .sch file containing global labels. 2022-12-04 21:06:16 +01:00
jean-pierre charras 0562eaa7b1 Eeschema plot: fix some (minor) issues with page size option set to a fixed page-size
Fixes #13062
Fixes #13056
Fixes #13057
However, DXF and HPGL is not perfect, but OTOH this is not an usual format for schematic.
PS format is not tested for now.
2022-12-04 16:55:20 +01:00
Graham Keeth ef83d01455 Minor string changes: "eeschema" / "pcbnew" in tooltips, and power port terminology 2022-12-04 14:29:57 +00:00
Jeff Young adc5c9eb20 OpenGL render order appears to be the inverse of the drawing order.
Fixes https://gitlab.com/kicad/code/kicad/issues/13070
2022-12-04 11:51:44 +00:00
Jeff Young 294a4804ed Minor dialog layout adjustments. 2022-12-04 11:51:44 +00:00
Jeff Young f805fd267f Divorce UNIT_BINDER from wxFrame.
This allows us to supply Pcbnew or Eeschema as the unitsProvider when
called from the main frame.

Fixes https://gitlab.com/kicad/code/kicad/issues/13066
2022-12-04 11:51:44 +00:00
Jeff Young f9b3f14dfa Bring intersheet refs in line with schematic setting when changing sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/13061
2022-12-04 11:51:44 +00:00
Jeff Young 96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
jean-pierre charras 8ab8a48657 fix order of includes to avoid conflicts with a Windows header. 2022-12-03 10:59:46 +01:00
Fabien Corona bd235048f9 sim GUI: remove "Adjust value" checkbox.
We had a change in notation and this checkbox became useless.
2022-12-03 08:28:43 +00:00
Seth Hillbrand f9a36b9c91 Update thread_pool to 3.3
Fixes an issue with `wait_for_tasks()` and adds a lower-overhead
`push_loop` helper.  We replace our usage of `parallelize_loop` with
`push_loop` as we didn't use the multi-future vector return and don't
need the extra overhead.
2022-12-02 12:01:34 -08:00
Fabien Corona 6e45987005 fix build warning 2022-12-01 20:33:51 +00:00
Mike Williams 8f646fa9fb Schematic: fix XOR unselecting one end of fully selected line 2022-12-01 15:00:06 -05:00
Mike Williams 5b2020daf5 Schematic: only delete dangling lines not created directly by the user 2022-12-01 13:13:45 -05:00
Mikolaj Wielgus f38c5d8cd0 Sim: Add virtual destructor to SIM_SERDE 2022-12-01 17:18:55 +01:00
Mikolaj Wielgus 4ec7ea376e Sim Ibis: Minor code style changes 2022-12-01 17:13:37 +01:00
kliment 0f09172902 Eeschema: ibis_parser - Fix undefined behavior due to pointer aliasing in isNumberNA 2022-12-01 15:44:38 +00:00
Mikolaj Wielgus d2adcdfde0 Sim: Add "number of bits" parameter to KIBIS PRBS model and some more fixes
The other fixes:

- PRBS's `m_bits` should be an integer.
- Fix some references to outdated parameter names.
2022-12-01 09:19:41 +01:00
Marek Roszko bae8cb55c0 Rename the bom cli to pythonbom since we'll have a real bom system later 2022-11-30 19:56:59 -05:00
Seth Hillbrand d23f285f8c Avoid ngspice segfault
When simulating an empty netlist, calling the `.save all` and `.probe
alli` commands gives a segfault in ngspice.  We can avoid this by
skipping these commands in KiCad.

Fixes https://gitlab.com/kicad/code/kicad/issues/12938
2022-11-30 15:22:17 -08:00
Seth Hillbrand 01cf6d76d8 Remove newly dangling lines when dragging
These lines are remnants from drag operations that should be cleaned
after commiting the new line positions

Fixes https://gitlab.com/kicad/code/kicad/issues/12870
2022-11-30 13:46:38 -08:00
Wayne Stambaugh e517cad12b Fix broken hierarchical sheet file paths when adding nest sheets.
The file path for each sheet must always be relative to it's parent sheet
or absolute if using a relative path is not possible.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10868
2022-11-30 15:44:59 -05:00
Seth Hillbrand ce63c37bfd Handle possible null in dynamic_cast 2022-11-30 12:30:49 -08:00
Wayne Stambaugh 0a62c17040 Remove schematic symbol value and footprint field instance data.
https://gitlab.com/kicad/code/kicad/-/issues/12933
2022-11-30 11:47:13 -05:00
Mikolaj Wielgus 7d207c5d2f Sim Ibis: Change some strings for consistency 2022-11-30 17:38:09 +01:00
Mikolaj Wielgus e39c0b20ea Sim: Universally initialize enum parameters with their default values 2022-11-30 12:45:59 +01:00
Mikolaj Wielgus 39cd9f8980 Sim: Fix Sim.Params field generation logic
Don't generate the first parameter (e.g. for KIBIS it was 'vcc=""') when
it is empty in models without primary value.
2022-11-30 12:45:58 +01:00
Seth Hillbrand 09cc6decaf ADDED: ERC for missing units
Reports a warning (by default) for missing units
Reports an error for missing units with power input pins
Reports a warning for missing units with input pins
Reports a warning for missing units with bidi pins

Fixes https://gitlab.com/kicad/code/kicad/issues/1922
2022-11-29 23:49:55 +00:00
Seth Hillbrand 4f4e355ce5 Reset existingRefs on cancel
When placing, we need to keep our static pointer map valid.  If we
cancel the placement after annotation, we need to remove the annotated
symbol.  The safer way is to just recreate the map

Fixes https://gitlab.com/kicad/code/kicad/issues/12983
2022-11-29 13:37:23 -08:00
Jeff Young 193e8715f9 Replace wxASSERT with wxCHECK2. 2022-11-29 21:12:53 +00:00
jean-pierre charras f3aff63726 Fix minor compil warnings 2022-11-29 20:05:58 +01:00
Jeff Young b2177718a1 Tighten up refresh logic for net & netclass references.
Also tightens it up a bit for text variables which can reference things
like netnames and netclasses, but also board settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/13032
2022-11-29 15:18:36 +00:00
Jeff Young a105f6c297 Add asserting checking. 2022-11-29 14:24:20 +00:00
Mikolaj Wielgus ab6caca384 Sim: Remove duplicate parameters 2022-11-29 15:02:45 +01:00
Mikolaj Wielgus b025b103de Sim Model Editor: Make the VBIC model the first BJT model to select 2022-11-29 10:13:20 +01:00
Mikolaj Wielgus 8143522371 Sim: Fix VDMOS model parsing 2022-11-29 09:48:01 +01:00
Marek Roszko 21fed9fc8c Hotglue a symbol upgrade function in cli 2022-11-29 00:00:45 -05:00
Fabien Corona 6510afe699 Ibis: Show the parser log if the parser fails 2022-11-28 17:46:42 +00:00
jean-pierre charras ef6348606a altium schematic import: convert ports to hierarchical labels instead of global labels 2022-11-28 17:56:46 +01:00
jean-pierre charras 149ddf9ddb PANEL_SETUP_BUSES: make delete a bus member working.
the member list was not updated when deleting a member.
Fixes #13024
https://gitlab.com/kicad/code/kicad/issues/13024
2022-11-28 17:55:04 +01:00
Jeff Young 9a25464337 Prevent nullptr dereference.
Fixes https://gitlab.com/kicad/code/kicad/issues/12516
2022-11-28 13:38:41 +00:00
Mikolaj Wielgus 20ea191f66 Sim: Fix model param vs. instance param duplicates in diode model 2022-11-28 08:00:49 +01:00
Mikolaj Wielgus 7b1a460649 Sim: Fix unhandled MODEL_TYPE in SIM_MODEL_NGSPICE 2022-11-28 07:59:24 +01:00
Mikolaj Wielgus d836fbaaaa Sim: Add VBIC model support
Update generate_sim_model_ngspice_data.bash a little, but it's still
outdated.
2022-11-28 04:45:36 +01:00
Wayne Stambaugh ef624199cd Fix Altium schematic import bug. 2022-11-27 19:34:46 -05:00
Mikolaj Wielgus bbcb0c04fc Sim: Don't crash when parsing unknown model in a Spice file 2022-11-27 08:59:54 +01:00
Mikolaj Wielgus 71d194071b Sim: Allow Numparam expressions in models inside subckts
Global-level numparam expressions are not properly supported yet.

Fixes https://gitlab.com/kicad/code/kicad/issues/12953
2022-11-27 06:32:17 +01:00
Seth Hillbrand f1556ed801 Prevent mirror of text elements
While we never allow the creation of mirrored text elements in the
schematic and symbol library editors, external generation of symbols may
cause the property to be set, which can then never be changed.  This
leaves the property unset for all elements

Fixes https://gitlab.com/kicad/code/kicad/issues/13007
2022-11-26 10:48:44 -08:00
Alex 754e82535a Symbol Fields Table: Highlight the first unit in multi-unit symbols. 2022-11-26 17:30:30 +05:00
Mikolaj Wielgus 0b5814f98f Sim: Allow .subckt parameter lists without "params:"
And fix .subckt parameter list parsing, because it was broken.

Fixes https://gitlab.com/kicad/code/kicad/issues/12779
2022-11-26 10:24:11 +01:00
Mikolaj Wielgus 6f630f7054 Sim: Make library path textbox editable
Load the library from the path if enter is pressed or focus is lost if
the library exists. If a library under the same path as previously is
to be loaded this way, don't do anything.

Fixes https://gitlab.com/kicad/code/kicad/issues/12970
2022-11-26 03:55:20 +01:00
Wayne Stambaugh a89102fdfc Fix Altium schematic import library symbol bug. 2022-11-25 19:38:13 -05:00
Mikolaj Wielgus acc760dc25 Sim: Fix generation of Sim.Pins field in multipart models
Fixes https://gitlab.com/kicad/code/kicad/issues/12372
2022-11-26 01:34:10 +01:00
Mikolaj Wielgus 6d5cc9e606 Sim: Sort the generated Sim.Pins by symbol pin numbers
They were sorted by model pin numbers, which weren't the keys in the
key=value pairs generated into Sim.Pins.
2022-11-26 01:34:10 +01:00
jean-pierre charras a48d06c40d Better fix than commit f2efb9c6 for issue #13003. 2022-11-25 17:29:03 +01:00
jean-pierre charras f2efb9c601 Make symbol highlighting from Symbol Fields Table working again.
Fixes #13003
https://gitlab.com/kicad/code/kicad/issues/13003
2022-11-25 16:17:34 +01:00
Jeff Young 7e0ba42f0e Bug fixes for dragging labels attached to wires in orthogonal mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/12677
2022-11-25 15:05:15 +00:00
Simon Richter 6d1ab81261 Mark unused parameter 2022-11-25 14:10:30 +01:00
jean-pierre charras 6f438b6cad altium export: add messages about skipped items (IEEE_SYMBOL and PIECHART) 2022-11-25 09:51:13 +01:00
jean-pierre charras e5877e0840 netlist_exporter_xml: ensure the list of parts is included in netlist.
This is obviously mandatory to build a BOM
DIALOG_BOM: generate a full xml netlis. We don't know what is needed by scripts
Fixes #12918
https://gitlab.com/kicad/code/kicad/issues/12918
2022-11-25 08:55:21 +01:00
Mikolaj Wielgus a65b35107d Sim: Make Sim.Pins have key-value pairs instead of a sequence
Moreover, upgrade models on schematic load instead of on model load
2022-11-25 05:38:21 +01:00
Mikolaj Wielgus f5ebd6fb47 Remove unused SCH_SYMBOL::GetAllPins() 2022-11-25 05:38:21 +01:00
jean-pierre charras a71c669543 Altium importer: try to import elliptical arcs rather to skip them.
Some schematics use elliptical arcs to describe usual arcs.
2022-11-24 19:43:00 +01:00
jean-pierre charras 199743e8b0 altium/sch_altium_plugin: do not initialize unit to -1 for common to units items.
-1 as unit id is illegal and breaks the lib file. So ensure id >= 0
(id = 0 for common to units items)
2022-11-23 14:47:55 +01:00
jean-pierre charras b1ec694905 Add string change (see commit 7aac53c6) to dialogs/dialog_sim_model_base.fbp 2022-11-23 14:46:18 +01:00
Jeff Young 651b3f1349 SCH_FIELDs are in parent's coord system.
Fixes https://gitlab.com/kicad/code/kicad/issues/12979
2022-11-23 13:22:50 +00:00
Wayne Stambaugh f5707eeca7 Fix assertion in schematic copy formatter. 2022-11-22 16:45:38 -05:00
Wayne Stambaugh 4a27d856f7 Move schematic sheet instance information into file sheet definition.
This will make it possible to maintain sheet instance information when
copying and pasting from any sheet other that the root sheet of a
project.

Setting and getting sheet page numbers must now be performed using a
sheet path.  This was done to ensure that the instance paths were not
getting changed unexpectedly from different code paths.
2022-11-22 16:45:38 -05:00
Fabien Corona 226dc9de78 Ibis: Don't create unnecessary B source 2022-11-22 21:09:08 +00:00
Fabien Corona 5d4b323009 Ibis : correct net name for device generation 2022-11-22 21:08:26 +00:00
Fabien Corona 7aac53c611 String change: add *.ibs to spice model editor 2022-11-22 21:07:40 +00:00
Mike Williams 60d42a7b1e Spelling: fix various suppress misspellings 2022-11-22 13:47:10 -05:00
Simon Schaak bd74489b00 Clean up autosave file handling edge cases 2022-11-22 15:21:26 +00:00
Seth Hillbrand 6625afabb7 Restore subgraph removal behavior
Commit 938645b29d had lines commented out
for debugging purposes.  This commit restores the original lines

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12814
2022-11-22 05:43:53 -08:00
jean-pierre charras b0b8a8dd67 Fix the order of some includes to avoid a conflict with a Windows header 2022-11-22 07:33:14 +01:00
Mikolaj Wielgus 23480cdee3 Sim: Make empty Sim.Params mean storing primary value in Value 2022-11-22 07:09:52 +01:00
Mikolaj Wielgus 1550a1e3a4 Sim Model Editor: Add "Save {} in Value field as "{}"" checkbox 2022-11-22 07:09:52 +01:00
Seth Hillbrand 938645b29d Add terrible hack to get subgraph netname
In certain cases, the subgraph does not receive the proper netname,
preventing us from checking for correct pin counts.  This is a backwards
iteration of the net name <-> subgraph map to extract the proper name
and sibling subgraphs

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12814
2022-11-21 15:19:45 -08:00
Seth Hillbrand e3cc0a5bc7 Prevent crashes when pasting symbols
When pasting a symbol that originates in a non-standard library, the
symbol may _only_ have an instance in the sheet and so adding it to the
sheet updates the instance data and needs to be refreshed before
annotating
2022-11-21 13:30:06 -08:00
Mikolaj Wielgus d63eac9778 Sim: s/SIM_MODEL_MUTUAL_INDUCTOR/SIM_MODEL_L_MUTUAL/ 2022-11-21 05:01:12 +01:00
Mikolaj Wielgus e9fe59a28c Sim: Rename the missed Sim_* fields to Sim.* 2022-11-21 03:33:11 +01:00
Mikolaj Wielgus 48f97bfec3 Sim Model Editor: Enable type dropdown on load when it should be 2022-11-20 22:56:01 +01:00
Mikolaj Wielgus 6969362813 Sim Model Editor: Don't provide library-only models as builtins 2022-11-20 22:07:39 +01:00
Wayne Stambaugh 6f90a63381 Fix legacy schematic symbol instance data bug. 2022-11-20 14:57:37 -05:00
Alex 12a55f20d3 Fix a mistake in grip margin.
Fixes https://gitlab.com/kicad/code/kicad/issues/12952
2022-11-21 00:25:19 +05:00
Fabien Corona 8498630876 Ibis: correctly load QA files up to v2.1 2022-11-20 19:10:46 +00:00
Jeff Young 2919490e92 Use hash (not page no) to determine when we've found the current sheet.
Also enforces strict ordering in another page number sorter, although
this has nothing to do with the bug below.

Fixes https://gitlab.com/kicad/code/kicad/issues/12043
2022-11-20 13:12:44 +00:00
Jeff Young 3747cae7dc Reinstate marker searching. 2022-11-20 13:12:44 +00:00
Kevin Lannen 9e5d96b9d3 Pin Table Dialog: Set the pin parent when creating pins
Removes the possibility of a pin getting created without a parent.
This fixes a bug where the first pin is created without a parent and then trying to reference the parent later causes a segfault.
2022-11-20 11:13:27 +00:00
Kevin Lannen 83ecd466ae Pin Table Dialog: Rename m_part to m_symbol to match LIB_SYMBOL naming
LIB_PART was previously renamed to LIB_SYMBOL, this renames the member
variable on DIALOG_LIB_EDIT_PIN_TABLE
2022-11-20 11:13:27 +00:00
Mikolaj Wielgus 59501dfa15 Sim: Rename Ibis_* fields to Sim.Ibis.* 2022-11-20 03:53:10 +01:00
Mikolaj Wielgus 059ca8fc48 Sim: Rename Sim_* fields to Sim.* 2022-11-20 03:37:54 +01:00
Mikolaj Wielgus 0bdb601d8e Sim Model Editor: Make IBIS widgets hidden by default 2022-11-20 00:37:17 +01:00
Jeff Young b84066610e Use drag origin instead of current mouse pos for drag checking. 2022-11-19 21:01:45 +00:00
Mikolaj Wielgus 9b6f7d5db7 Sim Model Editor: Use SIM_LIB_MGR class to manage library models 2022-11-19 01:55:38 +01:00
Mikolaj Wielgus 21ae2dd1c0 Sim Model Editor: Initialize all IBIS models as IBIS devices 2022-11-19 01:55:38 +01:00
Jeff Young bc271a8d15 Protect move tool from re-entrancy.
m_dragInProgress is usually sufficient, except when we haven't started
one yet.  In any case, conflating the two is probably a bad idea.

Fixes https://gitlab.com/kicad/code/kicad/issues/12936
2022-11-18 17:08:38 +00:00
Jeff Young e09e521162 Remove GUI calls from netlisting. 2022-11-18 15:29:16 +00:00
Wayne Stambaugh 3c6f1cd0f9 Fix broken legacy schematic file save.
Manual cherry-pick from commit a22c466639.
2022-11-18 03:08:33 -05:00
Mikolaj Wielgus 0f4cc2450d Sim Model Editor: Don't throw an error on opening a NONE model 2022-11-18 09:06:55 +01:00
Mikolaj Wielgus 28e978ccc9 Sim Model Editor: Fix switching to NONE model in the SME 2022-11-18 09:03:41 +01:00
Mikolaj Wielgus e7c43ca20a Sim: Remove inference from Reference and Value 2022-11-18 08:39:15 +01:00
Wayne Stambaugh db993bc8cc Fix broken Eagle schematic import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12893
2022-11-17 09:35:10 -05:00
Jeff Young a61ac363c2 Excise the remaining occurrences of "Alias" for derived symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/12895
2022-11-16 18:37:40 +00:00
Jeff Young bb446c8d01 Set fields into instance data.
Fixes https://gitlab.com/kicad/code/kicad/issues/12915
2022-11-16 13:33:55 +00:00
Jeff Young 1b3f03a800 Don't feed wxWidgets negative column widths. 2022-11-16 13:33:55 +00:00
jean-pierre charras b9ac486000 simulator: remove unused includes, and reorder a few includes to fix conflicts
Conflicts happen only on msys2 with wxWidgets 3.0. But this minor reorder
allows me to test Kicad compilation with "old" wxWidgets, used on Linux.
2022-11-16 10:09:54 +01:00
Jon Evans 120dd654ef Apply inherit_properties to built-in fields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12904
2022-11-15 21:27:43 -05:00
Jeff Young 13f5c78e89 More tightening of group parent lifecycles.
Fixes https://gitlab.com/kicad/code/kicad/issues/12908
2022-11-16 00:42:38 +00:00
Jeff Young 93c6d99a6d Move saving preferences out of the destructor.
For other reasons we wrap the adapters in a wxDataObject, which has
delayed destruction semantics, but that means the settings stuff may
no longer be around when the d'tor executes.

Fixes https://gitlab.com/kicad/code/kicad/issues/12371
2022-11-14 20:01:37 +00:00
Jeff Young bc0a753238 Slight improvement to overly-wide checkbox columns. 2022-11-14 20:01:37 +00:00
Marek Roszko 5fc860b357 Add schematic loading null check to cli 2022-11-13 18:47:00 -05:00
Jeff Young 9d8fdd8d53 Fire selection events from SelectAll().
Fixes https://gitlab.com/kicad/code/kicad/issues/12896
2022-11-13 22:59:21 +00:00
Marek Roszko 39d5cc31d4 Add schematic xml bom output 2022-11-12 21:51:32 -05:00
Marek Roszko e109b5883f Replace string with extension variable 2022-11-12 21:27:10 -05:00
Mikolaj Wielgus b288e162d2 Sim Model Editor: Remove Override checkbox 2022-11-13 02:13:44 +01:00
Mikolaj Wielgus ce3362ee12 Sim: Don't write inherited model params to symbol fields 2022-11-12 23:50:11 +01:00
Mikolaj Wielgus d66d810edc Sim Model Editor: Use SIM_LIB_MGR to store instance models 2022-11-12 23:27:22 +01:00
jean-pierre charras 7c9f3981ef Revert "Reorder includes is some simulator files to fix issues on msys2 (no code change)"
This reverts commit 78e45fa1b9.
Looks like it creates a compil issue on MSVC
2022-11-12 20:47:36 +01:00
jean-pierre charras 7e3964e5cb Missing fix in previous commit 2022-11-12 20:01:47 +01:00
jean-pierre charras 78e45fa1b9 Reorder includes is some simulator files to fix issues on msys2 (no code change)
Due to pegtl.hpp included in some files, reordering include fix some conflicts:
wxWidgets files must be included before pegtl.hpp, to compile with wxWidgets 3.0
I sometimes use wxWidgets 3.0 for debugging purposes.
2022-11-12 19:54:26 +01:00
Mikolaj Wielgus 0d42003247 Sim: Create missing SIM_MODEL factories in SIM_LIB_MGR 2022-11-12 18:20:56 +01:00
Fabien Corona 0d78ca8b1a Ibis: GUI fixes 2022-11-12 14:39:36 +00:00
Mikolaj Wielgus 4caa65d100 Sim Model Editor: Don't use shared_ptr 2022-11-12 04:29:07 +01:00
Mikolaj Wielgus fef6eaa8ba Sim Model Editor: Don't use shared_ptr to hack around lifetimes 2022-11-12 03:15:27 +01:00
Mikolaj Wielgus 95b6cc80f5 Sim: PULSE source y2 param is "Pulsed value", not "Initial value" 2022-11-11 05:19:53 +01:00
Mikolaj Wielgus f33cd3e383 Sim: Remove vestiges of (de)serialization from SIM_MODEL 2022-11-11 05:17:26 +01:00
Mikolaj Wielgus 490069c5e6 Move (de)serialization of models into fields to new SIM_SERDE class 2022-11-11 03:08:32 +01:00
Marek Roszko 43f039ef5f Add netlist export cli 2022-11-09 22:37:55 -05:00
Jon Evans 108d5b5433 Add new properties to fields grid table 2022-11-09 21:43:37 -05:00
Jon Evans d9d3ccd6eb DbLib: Allow inheriting field properties from source symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12856
2022-11-09 21:24:31 -05:00
Jon Evans dbd498f451 Re-add keyword mapping 2022-11-09 20:50:01 -05:00
Marek Roszko 8832c5239e Add missing connectiongraph recalculate for the cli schematic load 2022-11-08 23:09:50 -05:00
Jon Evans 7c71f65869 Add new field attributes to Update from Libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12839
2022-11-08 22:32:47 -05:00
Jon Evans c07477b94c Move to explicit symbol properties mapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12845
2022-11-08 22:19:08 -05:00
jean-pierre charras ffd578ef70 Ibis parser: fix a collision name with a windows header (msys2 specific)
This is recurrent conflict. (fixed by changing INPUT to INPUT_SDT).
2022-11-08 17:35:57 +01:00
Jeff Young ece752d5a2 Move annotation error reporting to preflight before simulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/9220
2022-11-08 12:13:15 +00:00
Jeff Young 5af506777c Formatting and wxT 2022-11-08 12:13:15 +00:00
jean-pierre charras 9501f4303d Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
2022-11-08 12:31:07 +01:00
jean-pierre charras 05336798ac try to fix a wx3.0/wx3.1 compatibility 2022-11-07 20:28:00 +01:00
Mikolaj Wielgus e8762da4f4 Revert "Support for variable references in SPICE models."
This reverts commit 95ebfeeed1.
This reverts commit 672ce650a9.
2022-11-07 19:37:40 +01:00
Jeff Young 095f02e6ef Fix encoding issues in Simulation Model dialog's property grid. 2022-11-07 15:03:18 +00:00
Jeff Young 672ce650a9 Basic ERC for simulation models. 2022-11-07 13:33:00 +00:00
Jeff Young 8fc08b9185 Erc for simulation models. 2022-11-07 12:28:11 +00:00
Jeff Young 95ebfeeed1 Support for variable references in SPICE models.
Also fixes a couple of bugs where sheet instance data wasn't being
handled correctly.
2022-11-07 10:57:34 +00:00
Jon Evans 311741a9a3 Symbol library browser needs an infobar too
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12843
2022-11-06 18:50:29 -05:00
Jon Evans dd94b2d3a7 Rename PROPERTIES to STRING_UTF8_MAP for clarity
This class has nothing to do with the properties system
2022-11-06 11:51:52 -05:00
Jeff Young 2899ee1eb4 Restore labelling and layout changes lost in revert. 2022-11-05 16:50:54 +00:00
Jeff Young 5366fa8cee Add mapping for -rescue.lib in project Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/12503
2022-11-05 16:50:54 +00:00
Jeff Young 5aa8f9880e Honour aQuitOnDraw flag when cancelling a segment.
Fixes https://gitlab.com/kicad/code/kicad/issues/12832
2022-11-05 10:23:12 +00:00
Jeff Young ae9405a4d3 Handle string escaping for Find/Replace in labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/12789
2022-11-05 10:23:12 +00:00
Bevan Weiss 8444339681 Prevent Pin Properties Alternate Pin pane closing on subsequent dialog open 2022-11-04 12:04:32 +00:00
Graham Keeth 6f3e969529 Update BOM dialog help 2022-11-03 22:49:20 +00:00
Jeff Young 2dac73e421 Remove dangerous SCH_FIELD::IsVoid() call.
This call didn't differentiate between GetText() and GetShownText() and
was used in instances where the difference matters.
2022-11-03 17:19:59 +00:00
Jeff Young f33b158696 Honour 0-size pin names & numbers when printing and plotting. 2022-11-03 17:19:59 +00:00
Alex cc825ebafe ADDED: bom_csv_grouped_extra.py BOM generator. 2022-11-03 17:09:55 +00:00
jean-pierre charras 504adb3467 Eeschema Back annotation: fix broken handling of full sheet paths of symbols.
Fixes #12767
https://gitlab.com/kicad/code/kicad/issues/12767
2022-11-03 11:15:23 +01:00
Marek Roszko 55ca6145ea Stuff RecomputeIntersheetRefs into SCHEMATIC for reuse 2022-11-03 00:12:53 -04:00
Marek Roszko 0190606886 Kick SetSheetNumberAndCount to SCHEMATIC 2022-11-02 23:38:02 -04:00
Jon Evans 0e454054f1 Also include resolved name when checking for bus membership 2022-11-02 17:37:34 -04:00
Sylwester Kocjan a234d5a2c8 common,eeschema,pcbnew: path cleanup 2022-11-02 13:29:52 +00:00
Wayne Stambaugh e62f764678 Update Eagle schematic importer to handle recent instance data changes. 2022-11-02 08:25:58 -04:00
Alex c279a2e696 Hotfix build when KICAD_SPICE=OFF 2022-11-02 11:03:09 +05:00
Marek Roszko b60c42ea41 Add schematic cli plotting 2022-11-01 23:34:49 -04:00
Jeff Young 9eef638f0b Don't validate on keystrokes.
KiCad policy is to validate on focus-loss so that you can make changes
which have intermediate states that are not valid.
2022-10-31 14:09:30 +00:00
Jeff Young 1737a3b94e Fix bugs where values didn't get commited to param grid.
This would happen if you click on another grid cell after changing
a value, or clicking OK in the dialog.  The old value would get
saved and the new value lost.
2022-10-31 14:09:30 +00:00
Jeff Young 6390c28737 Don't conflate instance and ibis widgets. 2022-10-31 14:09:30 +00:00
Jeff Young 20a4d76635 Reduce line-breaking. 2022-10-31 14:09:30 +00:00
Wayne Stambaugh 349de90bb0 Fix Altium schematic importer bug(s).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11412
2022-10-31 10:03:35 -04:00
Mikolaj Wielgus 355d5014f5 Revert changing inference checkbox to radio button
Reverts 5e1561fc22
and 6c84e0c2f0.
2022-10-31 07:29:38 +01:00
Jon Evans 5689c4b625 Include overridden drivers when checking bus membership
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10945
2022-10-30 19:17:04 -04:00
Mikolaj Wielgus 5eca8dd8de Undo hardcoding swapping of diode pins
Revert commits d1e2acd3 70b4d1aa cff508fb
2022-10-30 11:01:59 +01:00
Jeff Young 5e1561fc22 Some bug fixes for inferred models. 2022-10-29 18:44:49 +01:00
Jeff Young 6c84e0c2f0 Dialog changes for inferred models. 2022-10-29 17:08:06 +01:00
Jon Evans 3f68b7c5c1 Don't consider sheet pins as connections in ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9828
2022-10-29 09:06:31 -04:00
jean-pierre charras 50d2237f06 command_export_pcb_dxf.cpp: switch to "C" locale before exporting the file
Fix also a minor Coverity warning
2022-10-29 09:45:45 +02:00
Jeff Young fb8493d0bc Move model pin editor to GRID_CELL_ICON_TEXT_POPUP.
wxChoice is hopeless on Mac (it still doesn't highlight on rollover),
and using a char for the "assigned" graphic isn't great.
2022-10-28 15:27:00 +01:00
Jeff Young a42c60d493 Less repetition in pin numbers. 2022-10-28 15:27:00 +01:00
Mikolaj Wielgus d1e2acd3d8 Sim: Reverse Cathode and Anode strings in diode model data 2022-10-28 15:16:34 +02:00
Mikolaj Wielgus 70b4d1aac8 Commit sim_model_diode.{cpp,h} 2022-10-28 14:29:32 +02:00
Mikolaj Wielgus cff508fb3b Sim: Reverse diode model pin order to match diode symbols 2022-10-28 14:01:09 +02:00
Jon Evans 3a9ed47bf0 Prioritize power symbols over hidden power pins on regular symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8400
2022-10-27 22:54:36 -04:00
Jon Evans 141c1f020e ERC: Include power connections in multiple driver test
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12138
2022-10-27 22:36:40 -04:00
Jeff Young f3ba10ac67 Usability improvements to Pin Assignments in Sim Model dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/12720

Fixes https://gitlab.com/kicad/code/kicad/issues/12721
2022-10-28 00:34:24 +01:00
Sylwester Kocjan c0191e589e eeschema: use instance-specific unit in xml exporter 2022-10-27 14:33:24 +00:00
Sylwester Kocjan d18d2eed51 eeschema: don't save and restore schematic sheet in exporter
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11488
2022-10-27 14:33:24 +00:00
Mikolaj Wielgus 20ffb7d334 Sim: Don't throw exception for certain garbage characters in Value field 2022-10-27 06:42:43 +02:00
Jeff Young a9a2cc3e84 Enhance readability of Simulation Model dialog. 2022-10-27 00:01:38 +01:00
Wayne Stambaugh 6a0db3e7e2 Fix Coverity warnings. 2022-10-26 14:39:44 -04:00
Mikolaj Wielgus aa0e3666d1 Sim: Skip param name when writing primary param in model's Value field 2022-10-26 09:03:02 +02:00
Mikolaj Wielgus 01c69f1066 Sim: Swap pins instead of inverting position variable in potentiometers 2022-10-26 03:57:53 +02:00
Jeff Young 1240a3dd9f Minor dialog layout improvements. 2022-10-26 00:49:18 +01:00
Jeff Young 445657022b Don't attempt to read simulation model if symbol isn't included.
Also collect up all errors for one dialog when preparing simulation.
Also translate error messages.

Fixes https://gitlab.com/kicad/code/kicad/issues/12686
2022-10-26 00:41:31 +01:00
Jeff Young 7f0ebf9e3b Outline font adjustment is only for SCH_TEXT, not labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/12746
2022-10-25 16:51:21 +01:00
Jeff Young 5f3d440ce3 Fix compile error. 2022-10-25 13:29:38 +01:00
Fabien Corona 20b63f305e Sim: Ibis improvements and fixes
Follow-up after the KIBIS and KIBIS GUI merge requests.

- Move KIBIS from Pcbnew to Eeschema space,
- Make KIBIS obtain the Ku/Kd coefficients via the `SPICE_SIMULATOR` class instead of calling the `ngspice` executable via `system()`,
- Allow to toggle between differential and single-ended model in the GUI,
- Various GUI fixes and improvements.
2022-10-25 09:45:40 +00:00
jean-pierre charras 6794b0f4f9 EEschema, arcs in library: fix incorrect data after conversion of some old
libraries to the new arc format using startPoint, midPoint, endPoint.
Now, arc angles are constrained to < 180 deg.
Fixes #12514
https://gitlab.com/kicad/code/kicad/issues/12514
2022-10-25 09:07:30 +02:00
Mikolaj Wielgus 3e0f4a47b0 Sim: Remove pins field in all inferred models with linear pin mapping 2022-10-25 08:52:12 +02:00
Mikolaj Wielgus 80c426f577 Sim: Fix writing inferred model for tlines 2022-10-25 08:52:12 +02:00
Mikolaj Wielgus d10fd7bb09 Sim: Remove tuner (log) scale choice button
We probably won't be using it for now.
2022-10-25 04:38:09 +02:00
Jeff Young 6c9d8f1ae7 GUI improvements to hierarchy navigator.
(1) and (3) from the linked issue.

Fixes https://gitlab.com/kicad/code/kicad/issues/11762
2022-10-24 23:00:44 +01:00
Jeff Young d0d354872b Formatting. 2022-10-24 22:38:53 +01:00
Jeff Young 3cb6a80954 Don't delete pin out from under selection & move tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/12610
2022-10-24 20:49:34 +01:00
Jeff Young 4a489a5d16 Respect CTRL key when resizing rects and textboxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12732
2022-10-24 11:36:20 +01:00
Jeff Young a072c22b74 Show pin hidden state in menu text.
Fixes https://gitlab.com/kicad/code/kicad/issues/5625
2022-10-24 11:35:45 +01:00
Mikolaj Wielgus 0399d08aaa Sim: Fix potentiometers 2022-10-24 11:04:47 +02:00
Mikolaj Wielgus 9b6cc6c505 Sim: Fix tuners 2022-10-24 11:04:47 +02:00
Mikolaj Wielgus 78b193af5f Sim: Add tuner param virtual getter 2022-10-24 11:04:47 +02:00
Mikolaj Wielgus d14de1ce78 Sim: Rename Value field's "principal value" to "primary value" 2022-10-24 11:04:47 +02:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
jean-pierre charras 75a3209e55 Eeschema plot: fix incorrect background color used to generate dimmed color.
This is for a LIB_TEXT and a SCH_FIELD.
Fixes #12709
https://gitlab.com/kicad/code/kicad/issues/12709
2022-10-22 17:03:11 +02:00
jean-pierre charras 63002cec57 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 12:50:26 +02:00
Mikolaj Wielgus 958bd1897d Sim: Add potentiometer model 2022-10-22 04:33:52 +02:00
Mikolaj Wielgus 2a5bc9f87e Sim: Don't accept lone '.' as Value principal value 2022-10-22 04:33:52 +02:00
Jon Evans 014d536954 Ignore lastDriver in connectivity
Using the last driver in driver sorting breaks the stability/reproducibility
of the netlisting algorithm.  The last driver still needs to be tracked for
efficient redraw dirty detection.

Partially reverts 81e1bc9
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10757
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11393
2022-10-21 22:29:25 -04:00
Jeff Young 34742b386d Honour dimming when printing fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/12708
2022-10-21 22:55:31 +01:00
Jeff Young 0de540594a Used dimmed setting for pin texts and textbox borders.
Fixes https://gitlab.com/kicad/code/kicad/issues/12705
2022-10-21 22:42:44 +01:00
Jeff Young c9ce8da10a Dim DNP textbox borders.
Fixes https://gitlab.com/kicad/code/kicad/issues/12709
2022-10-21 22:28:49 +01:00
Jeff Young bad410948d Don't assume text is on LAYER_DEVICE.
Fixes https://gitlab.com/kicad/code/kicad/issues/12707
2022-10-21 22:03:54 +01:00
Mikolaj Wielgus 209ff933e7 Sim: Ignore everything between principal value and parameter-value pairs 2022-10-21 18:55:40 +02:00
Mikolaj Wielgus f95e77499b Sim: Make exception messages slightly more verbose 2022-10-21 08:15:29 +02:00
Mikolaj Wielgus 9819fa43dd Sim: Allow principal value in Value field to be followed by regular params 2022-10-21 08:14:13 +02:00
Mikolaj Wielgus d01dcc1c51 Sim: Interpret anything starting with .inc as .include 2022-10-20 05:13:32 +02:00
Mikolaj Wielgus 662f6c7d83 Sim: Don't match newlines in model names
This caused errors in AKO models with no overrides.
2022-10-20 04:00:33 +02:00
Mikolaj Wielgus 7ad927671d Sim Ltspice compat: Narrow ignoring undocumented parameters 2022-10-20 04:00:33 +02:00
Mikolaj Wielgus 5878749ed2 Sim LTspice compat: Ignore undocumented LTspice diode parameters 2022-10-20 04:00:33 +02:00
Wayne Stambaugh 85805bdad7 Fix broken legacy file format symbol instance data import. 2022-10-19 12:23:28 -04:00
jean-pierre charras c4db7337d0 NETLIST_EXPORTER_SPICE: add missing switch to "C" locale (missing LOCALE_IO).
It breaks spice netlist in countries using a comma as floating number separator.
2022-10-19 11:50:35 +02:00
Mikolaj Wielgus 7378aaae9d Sim: Ignore the "mfg" parameter in all models 2022-10-19 06:53:39 +02:00
Mikolaj Wielgus 952f3da53f Sim: Only set sim command if the sheet sim command is different 2022-10-19 03:02:32 +02:00
Mikolaj Wielgus f68df09696 Sim: Fix analysis set from GUI 2022-10-19 02:32:50 +02:00
Mikolaj Wielgus 1965411bf5 Sim: Remove the parsing exception for LTspice compat
Silently ignoring this may be a cure worse than disease.
2022-10-18 23:19:48 +02:00
Wayne Stambaugh 2a13c0af2e Revert commented out code. 2022-10-18 16:07:14 -04:00
Jeff Young 1964087960 Fix some instance-data issues in netlist exporters.
Also removes the final requirements for setting the current sheet so
that we no longer need to do a save/restore.
2022-10-18 17:26:34 +01:00
Mikolaj Wielgus 6e874f4c1e Ngspice: Preload a basically empty circuit to avoid error messages
Fixes https://gitlab.com/kicad/code/kicad/issues/12481
2022-10-18 05:48:01 +02:00
Wayne Stambaugh 598b09821a Coverity fixes. 2022-10-17 15:30:20 -04:00
jean-pierre charras aa36e15d66 Eeschema, Print preview: fix a incorrect initial size on wx 3.1.7 (and later)
Due to internal changes in wxWidgets, the initial size of the frame was not taken in account.
2022-10-17 10:49:28 +02:00
Mikolaj Wielgus 2475a703d6 Sim Model Editor: Checkbox for toggling inference 2022-10-16 05:10:57 +02:00
Mikolaj Wielgus c8e13813d9 Sim: Rename Sim_Disabled field to Sim_Enable 2022-10-16 00:49:44 +02:00
Wayne Stambaugh b109136c5c Fix complex hierarchy instance data when loading legacy schematic. 2022-10-15 14:50:06 -04:00
Wayne Stambaugh f782323960 Fix yet another symbol instance issue when loading legacy schematics. 2022-10-15 14:16:03 -04:00
Jeff Young 254dff2813 Add do_not_autoplace to schematic parser and printer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12657
2022-10-15 19:09:25 +01:00
Mikolaj Wielgus c3d5b3b3e5 Sim: Only store device type in reference, not full model type
Instead of Reference="VSIN1", Value="dc=1 ampl=2 f=3", it's now
Reference="V1", Value="SIN dc=1 ampl=2 f=3".
2022-10-15 19:36:26 +02:00
Marek Roszko 6ce714d537 Use wxCHECK instead of wxCHECK2 2022-10-15 11:25:15 -04:00
Marek Roszko ce2d091588 wxCHECK2 needs an actual "op", in this case return 2022-10-14 21:01:49 -04:00
Seth Hillbrand 5c974f8cd0 Don't arbitrarily close tags that are not open
Fixes https://gitlab.com/kicad/code/kicad/issues/12647
2022-10-14 15:30:51 -07:00
Jeff Young 668180f96a Add "show field names" to Global Edit Text & Graphics Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/12641
2022-10-14 23:04:09 +01:00
Jeff Young 7ffdfb1067 Clear Scintilla undo history after setting initial text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12650
2022-10-14 22:01:20 +01:00
Wayne Stambaugh 41461f7a69 Improve symbol rescue dialog.
* Fix some minor layout issues on Linux.
* Use button labels to clarify rescue actions.
2022-10-13 10:37:04 -04:00
Jeff Young f9a791e2b0 Copy font across when changing text type.
Fixes https://gitlab.com/kicad/code/kicad/issues/12629
2022-10-12 23:49:40 +01:00
Wayne Stambaugh 430098791e Another attempt to fix schematic symbol rescue issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12624
2022-10-12 16:57:09 -04:00
Jeff Young 8dea227da7 Special cases for sheet-pin dragging.
Fixes https://gitlab.com/kicad/code/kicad/issues/11949
2022-10-12 16:36:54 +01:00
Jeff Young 3231bc5be3 Formatting and cleanup. 2022-10-12 16:36:54 +01:00
Jeff Young 5507748fa9 Make sure bounding box is not degenerate. 2022-10-12 16:36:54 +01:00
jean-pierre charras 806b5fab0e SYMBOL_LIBRARY_MANAGER::SaveLibrary(): Add missing code.
It fixes an issue after deleting a symbol and trying to save the library:
The library, although saved, was always flagged as modified.
2022-10-12 15:56:41 +02:00
Mikolaj Wielgus c857e533a9 Sim: Fix crash when a field tries to set an inexistent parameter
Refactored SetParamValue() and friends to use exceptions instead of
return values.
2022-10-12 04:27:48 +02:00
Mikolaj Wielgus 6ae333a116 Sim Model Editor: Fix crash when opening sources 2022-10-12 04:27:48 +02:00
Jeff Young bd1114d94d Move footprint properties dialogs to symbol properties grid resizing strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/9883
2022-10-12 00:38:44 +01:00
Jeff Young e02c05d38f Add unit and eval support to WX_GRIDs.
Fixes https://gitlab.com/kicad/code/kicad/issues/1871

Fixes https://gitlab.com/kicad/code/kicad/issues/4285
2022-10-11 23:40:58 +01:00
Jeff Young ad5df7f4cc More busy cursor tightening.
Fixes https://gitlab.com/kicad/code/kicad/issues/11648
2022-10-11 23:40:58 +01:00
Wayne Stambaugh 148467d2a1 Fix schematic symbol rescue issues.
This fix makes some fundamental changes to the way symbols are rescued:

* The new symbol library file format is used when rescuing symbols defined
  in the symbol library table.
* The original library nickname is appended to the symbol name rather than
  the rescue library nickname when rescuing symbol defined in the symbol
  library table.
* Escaping strings has been removed from legacy library rescues since the
  legacy library file format never supported it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12525

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12624
2022-10-11 16:18:59 -04:00
Jeff Young 8206283a20 Code clarity. 2022-10-11 11:22:26 +01:00
Jeff Young 3967435f94 Tighter control of busy cursor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11648
2022-10-11 11:22:26 +01:00
Jeff Young d3797dd183 Code clarity. (No functional changes.)
Also some more error message cleanup for consistency.
2022-10-11 11:22:26 +01:00
Jeff Young 8a9e92bc01 More consistency in error messages. 2022-10-11 11:22:26 +01:00
Mikolaj Wielgus d47752ad75 Sim Model Editor: Fix displaying Ibis pin list 2022-10-11 02:22:59 +02:00
Mikolaj Wielgus d9eb76eae0 Sim: Refactor SPICE_GENERATOR methods to accept a single SPICE_ITEM 2022-10-11 02:22:59 +02:00
Jeff Young 1825905011 Replace more-than-half-line algorithm with greedy/stingy check.
Fixes https://gitlab.com/kicad/code/kicad/issues/10860
2022-10-10 20:23:48 +01:00
Jeff Young cb20a39693 Always select whole lines with greedy selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/10869
2022-10-10 20:17:15 +01:00
Jeff Young 3221877fe8 Push autosave-require down in to EDA_BASE_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11790
2022-10-10 14:03:52 +01:00
Jeff Young be6f08deca Code clarity. (No functional changes.) 2022-10-10 14:03:52 +01:00
Mikolaj Wielgus 6d958c5a3b Sim: Remove some superfluous class members 2022-10-10 13:49:43 +02:00
Mikolaj Wielgus 4931b80066 Sim: Resolve name collisions for generated model names 2022-10-10 13:38:35 +02:00
Mikolaj Wielgus 72402cf687 Sim: Override base model type if there's a Sim_Type field 2022-10-09 20:46:05 +02:00
jean-pierre charras 79c301800a Eeschema printing: fix some issues.
The offset setting was incorrect when using wxAffineMatrix2D.
It was especially visible when printing more than one sheet.
Note also when not using wxAffineMatrix2D, all pages must have the same orientation
(PORTRAIT/LANDSCAPE is not managed)
Fixes #12211
https://gitlab.com/kicad/code/kicad/issues/12211
2022-10-09 18:20:19 +02:00
jean-pierre charras f5fd12c002 Symbol Editor: Fix reverting changes on a root symbol: derived symbols are displayed wrong
Reverting changes broke links between derived symbols and the root symbol.
Now fixed by do not delete and recreate reverted symbol.
Fixes #10792
https://gitlab.com/kicad/code/kicad/issues/10792
2022-10-08 15:56:24 +02:00
Mikolaj Wielgus 994274fe9f Move IBIS model Spice code generation to SIM_MODEL_KIBIS
IBIS drivers are temporarily broken. Will fix is subsequent commits.
2022-10-08 03:01:52 +02:00
Seth Hillbrand a5da46459c Be sure to update UUID when placing new elements
Fixes https://gitlab.com/kicad/code/kicad/issues/12588
2022-10-07 16:32:41 -07:00
jean-pierre charras 8c19bf4815 eeschema: fix arc orientation issue when reading old symbol libs (version 20210619).
Fixes #12514
https://gitlab.com/kicad/code/kicad/issues/12514
2022-10-07 16:57:45 +02:00
jean-pierre charras 01a1d148e6 Make a sentence understandable and translatable.
Fix a minor compil warning
2022-10-07 10:11:02 +02:00
Seth Hillbrand b4c18dd22a Correct error message when unit counts differ
Testing if the symbol associated with unit X has a different number of
total units than the symbol associated with unit Y should report the
actual error to the user.

This cleans the various display of these error messages

Fixes https://gitlab.com/kicad/code/kicad/issues/10237
2022-10-06 15:41:16 -07:00
Seth Hillbrand f369cc23a9 Handle arbitrary unit counts 2022-10-06 15:41:16 -07:00
Jeff Young 19d270fe74 Text size sanity checking for TEXT_ITEMS_GRID.
Oh dear, there was a bunch going on here.  Firstly the move from int
to long long int for ValueFromString() means that we were no longer
catching overflows (as we were C-style casting it back to int in many
places).  But even when the overflow is caught, it would run in to
wxWidgets' empty string bug while trying to log it.

Fixes https://gitlab.com/kicad/code/kicad/issues/12577
2022-10-06 13:19:08 +01:00
Mikolaj Wielgus 6f2b2d7e19 Sim: Minor SIM_LIBRARY cleanup 2022-10-06 14:08:01 +02:00
Mikolaj Wielgus b95f4ec6bb Sim: Use the new library manager class in Spice netlist exporter
Temporarily comment out IBIS processing.
2022-10-06 09:49:29 +02:00
Alex c019ae3b89 Add missing include 2022-10-05 20:21:38 +03:00
Seth Hillbrand a0aff2dc70 Set the proper symbol parent when duplicating
We need to handle both the case where the new symbol is an alias as well
as free the proper memory after loading symbols in the duplicate

Fixes https://gitlab.com/kicad/code/kicad/issues/12578
2022-10-05 09:46:13 -07:00
Mikolaj Wielgus 6df774a62f Commit missing sin_lib_mgr.{cpp,h} 2022-10-05 18:08:25 +02:00
Mikolaj Wielgus 44799c830d Sim: Create a class to manage sim libs and inherited models 2022-10-05 17:19:28 +02:00
Wayne Stambaugh 0336cff8d6 Allow schematic symbol value and footprint fields to be instantiated. 2022-10-05 11:12:21 -04:00
Mikolaj Wielgus 8e34dae347 Sim Model Editor: Fix exclude symbol checkbox
Fixes https://gitlab.com/kicad/code/kicad/issues/12344
2022-10-05 11:24:46 +02:00
Wayne Stambaugh 03d847118a Fix crash when copying symbol in schematic editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12574
2022-10-04 17:51:58 -04:00
Mikolaj Wielgus 2f756d9d23 Sim Model Editor: Fix Model panel sizing 2022-10-04 23:47:52 +02:00
Mikolaj Wielgus e99d531c88 Sim: LTspice model compat: Ignore spurious values
Also fix parsing type in ako models
2022-10-04 22:44:26 +02:00
Wayne Stambaugh a11c40197f Expunge default symbol instance from schematic file format.
Now that importing hierarchical sheets "properly" imports instance data,
the default symbol instance setting doesn't have any meaning.
2022-10-04 15:42:41 -04:00
Mikolaj Wielgus 120b569048 Sim: Support ako models 2022-10-04 17:48:10 +02:00
Mikolaj Wielgus c2765f40ca Sim Model Dialog: Fix nullptr dereference 2022-10-04 17:48:10 +02:00
jean-pierre charras 4611817f25 Eeschema: fix a crash when invoking eeschema.exe with 2 filenames to open
Fix also a minor compil warning
2022-10-04 16:56:13 +02:00
Seth Hillbrand f5f6d44a48 Correctly increment field IDs
Setting to -1 is no longer valid despite the previous comment as this
will pick out a single non-mandatory field to save

Fixes https://gitlab.com/kicad/code/kicad/issues/12567
2022-10-03 21:50:29 -07:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Jeff Young c5f8587898 Use closest point for duplicate anchor rather than top-left.
Fixes https://gitlab.com/kicad/code/kicad/issues/10004
2022-10-03 23:28:58 +01:00
Jeff Young 7bb0275d3c Fix incompatibility with old rubber-band wire algo and new ortho wire drag alog.
Fixes https://gitlab.com/kicad/code/kicad/issues/11948
2022-10-03 22:12:23 +01:00
Jeff Young c6284f4835 Formatting. 2022-10-03 22:12:23 +01:00
Mikolaj Wielgus c464c5b87b Sim: cleanup: use unique_ptr for PARAM::value 2022-10-03 22:15:14 +02:00
Seth Hillbrand 9186be600b Fix resource leak 2022-10-02 21:10:27 -07:00
Jeff Young e335c1c612 Fix for LIB_TREE hotkeys over canvas and possible fix for over LIB_TREE itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-10-02 22:22:21 +01:00
Seth Hillbrand e055302a3c Allow printing backgrounds prior to foreground
Eeschema shows background fills on a different z-level than the rest of
the symbols/elements.  Print the backgrounds prior to the foregrounds in
order to preserve this view for print output

Fixes https://gitlab.com/kicad/code/kicad/issues/12559
2022-10-02 13:23:54 -07:00
Wayne Stambaugh 2b387ae9c3 Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Added project name to instance data to improve the readability of the
schematic file format.  It also creates an opportunity to remove orphaned
instance data by project name rather than cryptic UUIDs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-10-02 15:06:42 -04:00
Jeff Young 27296b5043 Quote all bus members when writing to file.
Fixes https://gitlab.com/kicad/code/kicad/issues/12447
2022-10-02 17:43:47 +01:00
Jeff Young eea8c7a8fd Handle netclasses assigned to bus labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/12546
2022-10-02 15:01:16 +01:00
Jeff Young c089afb408 Improve default net pattern to be all members of bus instead of first member.
Fixes https://gitlab.com/kicad/code/kicad/issues/12546
2022-10-01 22:58:11 +01:00
Seth Hillbrand 9adae0e8ba Avoid double-processing SCH_ITEMs
Elements such as zero-length lines might get into the connection map,
causing the system to process them twice.  This can cause allocation
errors when both are performed at the same time

Fixes https://gitlab.com/kicad/code/kicad/issues/12278
2022-10-01 12:28:39 -07:00
jean-pierre charras efdb67aa64 Minor fixes. 2022-10-01 18:42:02 +02:00
Seth Hillbrand 93239516d9 Remove ID from property fields
ID was not maintained or used other than to ensure unique fields.
Instead of saving, we assign the known IDs to specific field names and
sequentially create new IDs on load

Fixes https://gitlab.com/kicad/code/kicad/issues/12390
2022-09-30 17:19:53 -07:00
Jeff Young c0a666507c Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552
2022-09-30 20:56:25 +01:00
Mikolaj Wielgus 0d369f700f Sim: Basic cleanup after KIBIS merge
- Some preliminary refactoring,
- Use multiple types for IBIS drivers instead of a wftype variable,
- Remove the m_requiresUIUpdate variable and its accessors.
2022-09-30 16:17:00 +02:00
Mikolaj Wielgus 62f89ba0d6 Sim GUI: Remove irrelevant references to Spice 2022-09-30 14:32:57 +02:00
Jeff Young 67caebe4c4 When the sash button is right next to the fp dropdown they look related. 2022-09-30 13:02:08 +01:00
Mike Williams c1da59b560 Swap: disallow swapping tracks / wires
Also fix missed shortcut change for S -> Shift-S

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12538
2022-09-29 17:04:43 -04:00
Wayne Stambaugh 979b4a4eb7 Revert "Move schematic symbol instance data back into symbol definition."
This reverts commit 7984e114db.
2022-09-29 15:33:23 -04:00
Wayne Stambaugh a60ed99510 Revert "Add project name to symbol instance data."
This reverts commit 4b276b339a.
2022-09-29 15:33:23 -04:00
Wayne Stambaugh 4b276b339a Add project name to symbol instance data.
This improves the readability of the schematic file format and creates
an opportunity to remove orphaned instance data by project name rather
than cryptic UUIDs.
2022-09-29 17:47:57 +00:00
Wayne Stambaugh 7984e114db Move schematic symbol instance data back into symbol definition.
This change reverts the storage of all symbol instance data in the root
schematic.  This was done because it's not possible to reuse instance
data when importing from sub-sheets.

There has been a fundamental change in how sheet paths are store in the
instance data.  The root schematic UUID is always used when saving the
instance data.  To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project.  This provides a way
to determine the project that stored the instance data.  All uses of paths
without root sheet have been expunged from the code.

The sheet instance data is still saved only in the root sheet for the
time being.  New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number.  Sheet page
numbers will not be imported.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
2022-09-29 17:47:57 +00:00
jean-pierre charras 46b0c116cd fix a compil warning. 2022-09-29 13:06:50 +02:00
Fabien Corona 7e486327d9 Ibis differential and PRBS models 2022-09-29 08:35:01 +00:00
jean-pierre charras dcc325b3b2 More about fix compil issues and warnings, especially in ibis code.
A few are msys2 specific and due to include files order.
2022-09-28 11:26:07 +02:00
Mikolaj Wielgus b3b2b8b3f0 Sim: Don't hold KIBIS in MODEL_TYPE enum
Fixes pipeline error.
2022-09-28 11:14:50 +02:00
Mikolaj Wielgus b7c8570b2a Sim: Fix infinite recursion 2022-09-28 11:14:50 +02:00
Alex df59f6cfdb Update connectivity for net highlighting on demand. 2022-09-27 21:24:01 +00:00
Fabien Corona 528fe4d371 Add Ibis to spice model editor
ADDED: IBIS models are now supported in Sim Model Editor
2022-09-27 20:47:00 +00:00
Alex dc07ab9df1 Replace PROF_COUNTER with PROF_TIMER in some conditional places. 2022-09-27 14:07:47 +00:00
Jeff Young 83a7ab2449 Initialize resolved status of newly created wires during drag operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/12522
2022-09-27 14:12:06 +01:00
Jeff Young 7f63c70702 Add include for Linux builds. 2022-09-27 12:31:47 +01:00
Jeff Young fb80f83335 Formatting. 2022-09-27 11:12:58 +01:00
Jeff Young 9ce4f0a0b5 ADDED setting page number from hierarchy tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/8352
2022-09-26 21:58:04 +01:00
Jeff Young ce0affedb1 Coding conventions. 2022-09-26 21:58:04 +01:00
Jeff Young 838bd7292c Default intersheet ref field visibility to off, and show warning
when user tries to edit via Symbol Properties or Field Propeties.
2022-09-26 21:00:46 +01:00
Jeff Young 10d8db482e Init intersheet refs field pos to local {0,0}, not global {0,0}
Fixes https://gitlab.com/kicad/code/kicad/issues/12517
2022-09-26 21:00:46 +01:00
jean-pierre charras 7584ccc758 Fix duplicate variable member m_userUnits, creating issues depending on
the way it was acceded (by name or by accessor).
2022-09-26 19:47:28 +02:00
Jeff Young d0ff90eb6e Support mirroring of multiple SCH_FIELDs at once.
Fixes https://gitlab.com/kicad/code/kicad/issues/12512
2022-09-26 17:44:52 +01:00
Jeff Young 58874a591b Improve tooltips.
Fixes https://gitlab.com/kicad/code/kicad/issues/12510
2022-09-26 17:44:52 +01:00
Marek Roszko 59d62f7df1 Untangle some includes 2022-09-25 11:37:06 -04:00
Ian McInerney 40ff7cb9bd Fix some UI element spacing in settings panels 2022-09-25 15:41:39 +01:00
Ian McInerney b363e0f300 Simplify lib shape properties dialog code
Since 34e706bcbc it is assumed that the
shape passed in exists, so testing for a null pointer is pointless
(it will always be non-null). Also hardcode the assumption the shape is
non-null in the constructor using an assert.
2022-09-25 15:41:39 +01:00
Marek Roszko 2646be730d Don't place bookmarks for power symbols (like GND) 2022-09-25 08:50:48 -04:00
Marek Roszko 209e1b2086 Add naming of the outline page entries 2022-09-24 22:54:38 -04:00
Marek Roszko f2377b447d Add hierarchical label group in pdf outline 2022-09-24 22:36:06 -04:00
Marek Roszko a381a0acb2 Generalize bookmarks to support additional groups and names 2022-09-24 22:35:20 -04:00
Marek Roszko 6f8205235f ADDED: Add outline support to schematic PDF and PCB plot 2022-09-24 21:45:48 -04:00
Ian McInerney 44c2782d39 Fix more for loops making copies of iterates 2022-09-25 00:48:38 +01:00
Ian McInerney 1683e552f7 Add/fix some variable initializations 2022-09-25 00:48:38 +01:00
Jeff Young 5fc02a63a3 Use netclass colours for label graphics, text and fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/4984
2022-09-24 23:51:40 +01:00
Jeff Young 659a6e5b04 Replace macHack as its requirement sadly never went away. 2022-09-24 23:50:45 +01:00
jean-pierre charras a9d31348b1 Eeschema, print and plot: fix arc issue for lib arcs == 180 deg
Fixes #12502
https://gitlab.com/kicad/code/kicad/issues/12502
2022-09-24 10:00:21 +02:00
Ian McInerney d9846a006a Get lib shape fill color from settings if not specified by shape 2022-09-24 03:46:06 +01:00
Ian McInerney fdb97a46c1 Don't copy items in for loops when not needed 2022-09-24 03:46:06 +01:00
Jon Evans 35520c78e4 Fix missing virtual dtor 2022-09-23 21:44:15 -04:00
Jon Evans 2089374f53 ADDED: Export symbols from schematic to library
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11433
2022-09-23 21:23:01 -04:00
Ian McInerney c71c192372 Fix warning generated by sim string changes 2022-09-24 01:37:57 +01:00
jean-pierre charras bd28bd7a00 fix a few compil warnings 2022-09-23 18:30:42 +02:00
qu1ck 6ebb3baa3b PCM: autoload libs from installed packages to global lib tables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9713
2022-09-23 16:16:13 +00:00
Alex 58b03b0a1c Small optimizations. 2022-09-22 17:22:04 +00:00
Alex f75266d130 Keep selection order in SCH->PCB cross-selection. 2022-09-22 11:43:37 +00:00
Mikolaj Wielgus e27969217c Add missing virtual destructor in SPICE_GENERATOR 2022-09-22 11:17:07 +02:00
Mikolaj Wielgus e4865ce543 Excise wxString from simulation 2022-09-22 07:41:52 +02:00
Jeff Young fc10db25ba Netclass directive and label conversion improvements.
1) Copy label fields when converting.
2) Don't assume netclass directive should be net name -- this is very
unlikely.
3) Don't show font controls in Netclass Directive Properties dialog --
there's no basic text associated witha  Directive Label.
2022-09-22 01:22:19 +01:00
jean-pierre charras b6663a1c41 minor fixes. 2022-09-21 15:49:50 +02:00
Jeff Young 8eb68ee472 Add pin/unpin context menu to Symbol Chooser and Footprint Chooser.
Also moves some more code down into common so it can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/12384
2022-09-21 14:45:12 +01:00
jean-pierre charras 78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
Mikolaj Wielgus 0e0c4df4da Fix build with -DKICAD_SPICE=OFF 2022-09-20 20:31:14 +02:00
jean-pierre charras f851526c67 Plotters: make virtual void PLOTTER::Arc() using arc angles protected.
Using arc angles to plot an arc is really error prone due to different
options between plotters, and angles defined in Kicad, using this version of
arc plotting from Kicad is no longer allowed in Kicad code.
2022-09-20 18:55:20 +02:00
jean-pierre charras fd4cd17f4f fix a compil warning 2022-09-20 18:55:20 +02:00
Jeff Young 7f34586c7e Allow text variable resolution through properties in drawing sheet text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12473
2022-09-20 15:28:05 +01:00
jean-pierre charras bbaf5a21c2 Eeschema: fix a plot issue with arcs.
Arcs are really error prone, due to different Y axis orientation, and geometry transforms.
Probably we should remove plot and print functions using arc angles as parameters
that are a can of worms.
Fixes #12465
https://gitlab.com/kicad/code/kicad/issues/12465
2022-09-20 16:04:17 +02:00
Mikolaj Wielgus 2bf6791352 Sim: Move SIM_LIBRARY_SPICE parsing facilities to a new class
This leaves SIM_LIBRARY_SPICE very small, but it will grow larger later.
2022-09-20 08:17:51 +02:00
Jeff Young 30a4d3d2de Coverity fixes. 2022-09-20 00:19:15 +01:00
Seth Hillbrand 4b20eb9cb0 Remove debugging code 2022-09-19 15:25:06 -07:00
Seth Hillbrand e0f7c3b057 Properly handle non-connected labels in ERC
All labels need to be attached to a net that has at least 2 pins in
order for this to be a valid net.  To check for the existing pins, we
need to interate over all subgraphs in the net, counting pins
2022-09-19 15:18:32 -07:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
jean-pierre charras 5990595619 When adding a bitmap, do not clone it during moving.
Cloning is not necessary, and is memory consuming.
2022-09-19 17:41:47 +02:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mikolaj Wielgus 8599323dce Sim: Move Spice model parsing to a separate class hierarchy
Roughly analogous to the SPICE_GENERATOR hierarchy.
2022-09-19 07:24:46 +02:00
Mikolaj Wielgus 0efc1149af Sim: Create a common base class for models sourced from Spice libs 2022-09-18 21:25:28 +02:00
Marek Roszko 63295cfb9e Remove unused vars 2022-09-18 08:49:07 -04:00
Mikolaj Wielgus 3b94624e90 Commit forgotten files
I must stop forgetting to commit new and renamed files.
2022-09-18 07:27:47 +02:00
Mikolaj Wielgus a8d7a845b6 Sim: Rename SIM_MODEL_SPICE to SIM_MODEL_RAW_SPICE 2022-09-18 07:25:56 +02:00
Mikolaj Wielgus 4128a5533f Sim LTspice compat: Ignore mfg, icrating, vceo, type params 2022-09-18 04:14:57 +02:00
Mikolaj Wielgus dcb3f16fbc Sim: Don't use long type in SIM_VALUE 2022-09-18 02:25:40 +02:00
Jeff Young e6c8cf0f03 Don't escape spaces in bus groups and transfer hyperlinks.
Fixes https://gitlab.com/kicad/code/kicad/issues/12451

Fixes https://gitlab.com/kicad/code/kicad/issues/12452
2022-09-17 20:56:50 +01:00