Commit Graph

37164 Commits

Author SHA1 Message Date
Jeff Young 222cd4d009 Handle underscore in parameter names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14308
2023-03-16 23:40:52 +00:00
Roberto Fernandez Bautista 4bbd9731a1 Disable cadstar parts parser qa test for now 2023-03-16 23:03:54 +01:00
Roberto Fernandez Bautista a05333541c Try to fix cadstar build #3: add operator<< for std::optional 2023-03-16 22:44:29 +01:00
Roberto Fernandez Bautista 55a379f61b Fix build: Add missing header include 2023-03-16 22:07:04 +01:00
Roberto Fernandez Bautista 3d661585dd Fix build errors and warnings from CADSTAR 2023-03-16 21:17:40 +01:00
Roberto Fernandez Bautista 5efec4cd51 CADSTAR PCB: Ensure pads have correct position and footprints at 0,0
Fixes a display issue in the footprint preview where all the pads
were displayed at 0,0
2023-03-16 21:07:09 +01:00
Roberto Fernandez Bautista 2cefabc99a CADSTAR PCB: Fix loading of filled circles (load as polygon for now)
todo: need to detect if what we are drawing is a circle.
2023-03-16 21:07:09 +01:00
Roberto Fernandez Bautista 6f5321c481 ADDED: CADSTAR .cpa footprint libraries 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista c5362c9b0a CADSTAR: Parse PINNOOFFSET and PINNOANGLE 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 9d5672464e CADSTAR Sch: Apply default text code to fields when none is specified 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista a5dc528c88 CADSTAR: Fix edge case in parts grammar (symbol name can be quoted) 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 7534c56723 CADSTAR: Improve loading performance (cache symdef name/alternates) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 59d88e1871 CADSTAR Parts: Add parsing of hierarchy tree 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista b70fe88145 CADSTAR Parts: Fix parsing of hidden pins (possible for several pins per net!) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 6ab2112135 ADDED: CADSTAR Parts Libraries (.lib) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 8f83f27336 CADSTAR SCH: Refactor loading of symbols out of loading part info 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista 5923d18cdd TRANSFORM doesn't need knowledge of wx 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista c34207b726 CADSTAR: Remove wxPoint + improve formatting 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista 738b36cf7d CADSTAR csa / cpa ignore Hierarchy
This node doesn't have any equivalent in KiCad so for now we ignore it. In future, we could parse it in detail, to obtain the tree-structure of symbols/footprints in a cadstar library
2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista e8ead30baf WIP: CADSTAR Parts now shows up in library tables and is handled correctly (todo: read cadstar header) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista 2da13a9e07 CADSTAR SCH: Separate out saving loaded lib symbols to library 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista 7a6b64d371 Special case cadstar libraries when error reporting. 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista f45ab30fa6 Add parsing for symbols and pins (Parser now complete) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista e2a4d58e8f Extract CADSTAR PIN_TYPE and PIN::POSITION into a separate header 2023-03-16 21:07:04 +01:00
Roberto Fernandez Bautista 379e3b2fbb Add CADSTAR Parts Library (.lib) parser and qa tests 2023-03-16 21:07:04 +01:00
Wayne Stambaugh e51594cdf5 Fix broken window Z order when editing a symbol from the schematic. 2023-03-16 15:18:41 -04:00
Jeff Young 6d296038f3 Improve simulation error reporting.
1) More REPORTER, less exception processing
2) Remove UI calls from SPICE_MODEL
3) Don't replace netlist with errors; show both
4) Don't bail out of netlist generation after single error

Fixes https://gitlab.com/kicad/code/kicad/issues/14295
2023-03-16 16:12:29 +00:00
jean-pierre charras 8b144539e8 DIALOG_LABEL_PROPERTIES, add global label: better filtering of candidates.
The list of candidates (names) must be restricted to existing global labels
and symbols creating a global net name: power symbols having only one power
input pin (a power output does not create net name).
Fixes #14319
https://gitlab.com/kicad/code/kicad/issues/14319
2023-03-16 15:31:39 +01:00
Alex fc6279a2ea Improve EC_CONVERGING behaviour when lines are almost collinear.
(somewhat)
2023-03-16 05:41:58 +03:00
Alex 98e635869f Improve anti-overflow in SEG::intersects.
Caused issues when testing against
A=( -INT_MAX, ... ), B=( INT_MAX, ... ) segments.

Fixes https://gitlab.com/kicad/code/kicad/issues/14293
2023-03-16 05:03:21 +03:00
Alex 8fe78101db Don't create 0-length tracks when placing via in the middle of a track. 2023-03-16 04:53:26 +03:00
jean-pierre charras 893a362d9e Minor Coverity and compil warnings fix. 2023-03-15 20:09:04 +01:00
jean-pierre charras 5ce22d9673 Symbol editor: fix incorrect position of fields when loading a symbol from schematic.
In symbol editor, symbols are always shown not mirrored, not rotated.
So if the loaded symbol from schematic was rotated/mirrored, the position
of fields must be recalculated for the rotation 0, no mirror.
2023-03-15 17:55:18 +01:00
jean-pierre charras 412368b7f9 PDF plotter: encode the letters ( and ) in strings with context CTX_JS_STR
They are separators and cannot be used in user strings.
Fixes #14302
https://gitlab.com/kicad/code/kicad/issues/14302
2023-03-15 09:31:49 +01:00
Jeff Young e60837ec95 Defenses in depth for ratsnest drawing. 2023-03-14 11:53:16 +00:00
Jeff Young c266913ec7 Swap pins for undo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14100
2023-03-14 11:52:23 +00:00
Jeff Young 37b0a5a504 Add quick DRC action for Diff Footprints.
Also makes the strings match the GUI better so people will know where
to find them later.

And fixes a couple of ERC items that referred to Board Setup (oops).
2023-03-14 11:52:23 +00:00
Seth Hillbrand 283770fc45 Check for dirtied items in the cluster
When drawing the ratsnest, we need to be careful to avoid accessing
CONN_ITEMs that have been changed by the underlying model.  Checking for
dirty items instead of valid items will prevent us looking at data that
are out of date

Fixes https://gitlab.com/kicad/code/kicad/issues/14265
2023-03-13 16:10:39 -07:00
Jeff Young 725834b554 Don't use ViewBBox for zoom-to-fit.
The ViewBBox can include the largest document clearance so that pad
clearance lines get included.  But the largest clearance can be, well,
large.

Fixes https://gitlab.com/kicad/code/kicad/issues/14276
2023-03-13 22:45:37 +00:00
Jeff Young 1058d36315 Unrotate/unflip board footprint to match library copy.
Fixes https://gitlab.com/kicad/code/kicad/issues/14276
2023-03-13 22:36:25 +00:00
Jeff Young a0adb59437 Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170
2023-03-13 20:26:11 +00:00
Seth Hillbrand 72ebe5a429 Avoid drawing null-arcs in 3d viewer
An arc with no radius or no angle is not visible and should be avoided

Fixes https://gitlab.com/kicad/code/kicad/issues/14271
2023-03-13 11:48:05 -07:00
Seth Hillbrand f0892598a4 Force initialization of board units
Unitialized variables are the devil's playground
2023-03-13 11:38:17 -07:00
Jeff Young b7a3b0967b Commenting. No functional changes. 2023-03-13 18:29:55 +00:00
Jeff Young 7b3e01ce52 Select correct face from a .ttc file.
Fixes https://gitlab.com/kicad/code/kicad/issues/13314
2023-03-13 18:29:55 +00:00
Jeff Young 0fb1ccff21 Commenting and formatting. No functional changes. 2023-03-13 18:29:55 +00:00
Wayne Stambaugh 664e5629f2 Document board change event listener code. 2023-03-13 13:59:01 -04:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young dc78797274 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233
2023-03-12 22:24:06 +00:00
Jeff Young 5427100539 Handle plotting of text on solder mask layer.
Admittedly this is an odd thing to do, but we should still be internally
consistent, and it has come up in customers' files.

Fixes https://gitlab.com/kicad/code/kicad/issues/14226
2023-03-12 21:21:15 +00:00