Compare commits

...

6329 Commits

Author SHA1 Message Date
Wayne Stambaugh ad43570ec0 Tag stable version 8.0.7. 2024-12-02 16:04:30 -05:00
Seth Hillbrand 5dd4718db0 Update translations 2024-12-01 17:25:35 -08:00
dsa-t ea70d8cf4c Translated using Weblate (Russian)
Currently translated at 100.0% (9198 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-12-02 02:25:06 +01:00
ZbeeGin cd2879880a Translated using Weblate (Polish)
Currently translated at 100.0% (9198 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-12-02 02:25:06 +01:00
Pferd O b51c8c1b3d Translated using Weblate (German)
Currently translated at 100.0% (9198 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-12-02 02:25:06 +01:00
Wellington Terumi Uemura 5db1ee930f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9198 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-12-02 02:25:06 +01:00
2tama3 695dd57477 Translated using Weblate (Japanese)
Currently translated at 100.0% (9198 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-12-02 02:25:06 +01:00
Ettore Atalan 224c989072 Translated using Weblate (German)
Currently translated at 99.9% (9192 of 9198 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-12-02 02:25:05 +01:00
John Beard 80db7ff8cf Pcbnew: update DRC exclusions from DRC dialog
When excluding/re-including DRC violations, update the
BDS list immediately rather than waiting for the
BOARD::RecordDRCExclusions() to be called.

This was implemented in 8.99 in 0598ca0f90
(along with DRC exclusion comments).

Follow that commit's updates of the m_DrcExclusions
structures in an analogous way.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19113
2024-11-29 03:04:43 +08:00
jean-pierre charras 6e6d3e9b03 Revert "Try to fix a link issue in Gerbview" and try another fix 2024-11-25 16:55:28 +01:00
jean-pierre charras c08dd172d6 Try to fix a link issue in Gerbview 2024-11-25 16:38:55 +01:00
Wayne Stambaugh 7972805d07 Tag stable version 8.0.7 release candidate 1. 2024-11-24 19:06:04 -05:00
Alex Shvartzkop a86147b4b1 Optimize ConvertImageToLibShapes for EasyEDA/LCEDA schematic import.
Don't sort all symbol draw items after adding each draw item.

-75% CPU usage on typical schematic imports.

(cherry picked from commit 5323c8587a)
2024-11-24 20:54:24 +03:00
Dhineshkumar S 335bb8792f Fix switching bold option on and off alters text thickness
Currently, unselecting the bold option resets the thickness to the
standard size instead of reverting to the original thickness.
To address this, the original thickness should be preserved so it
can be restored when bold is turned off.

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

(cherry picked from commit 43b1bc52db)
2024-11-24 07:46:40 -05:00
jean-pierre charras c8f7887cf8 Simulator: fix crash when deselecting the Probe Tool in some cases.
If a schematic item was selected, when activating the probe tool from the
simulator, and deactivating from the Select Item sch editor tool, a crash
happened.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18547
2024-11-24 10:34:22 +01:00
John Beard 2fe5c28787 Fabmaster: catch illegal parses up front
Parsing an empty string as double/int produces uninitialised data.
That is likely to cause an undefined amout of chaos later on,
so catch it explicitly with a wxCHECK.

It's still something that shouldn't happen, and could still cause
chaos, but it's at least deterministic. It also avoids putting
gigantic numbers into things that don't expect them. For example
normalising an angle of 1e303 is functionally an infinite loop.

This happens at least in files with missing fields in rows,
like in #19174's file, line 4:

S!U2306!IC!!!!!!SOT_23_5!!!!!SGM2576/TT9107!!!

The file is still broken, but now it loads.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/19174
(cherry picked from commit 4d2d70ce22)
2024-11-24 14:04:57 +08:00
John Beard 64365de9de Update font when needed on italic/bold change
When the italic or bold nature is changed, text using outline fonts may
need to change its font. Add this to the SetItalic/SetBold functions.

Also add a counterpart SetItalicFlag function (following SetBoldFlag)
when you only need to set the flag (e.g. when importing or changing
everything in the text properties dialog).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18592
(cherry picked from commit b043f334de)
2024-11-24 09:51:54 +08:00
Alex Shvartzkop a950d55cb2 Show empty field for unconstrained length in length tuning properties.
Because it's confusing when the dialog shows last target value, but it
doesn't apply when you start tuning.

Also the last values are remembered in DRAWING_TOOL::PlaceTuningPattern
now, instead of global variables.

Related: https://gitlab.com/kicad/code/kicad/-/issues/18979
2024-11-23 18:11:25 +03:00
Alex Shvartzkop 3748a10ed5 Length tuning workflow improvements:
-Allow changing length tuning settings before tuning has been started
-Do not exit out of the length tuning tool after each placement
-Keep specified settings between pattern placements

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

(cherry picked from commit 78b2e53777)
2024-11-23 17:27:27 +03:00
Alex Shvartzkop 227bb76909 Don't modify m_selection while iterating over it in PCB editor.
This caused a fatal assert when selecting connected tracks with tuning patterns.

(cherry picked from commit fee8560079)
2024-11-23 17:27:16 +03:00
jean-pierre charras a20a6bb2a3 French translation update 2024-11-23 10:16:03 +01:00
jean-pierre charras 7c17aa5974 EEschema: fix crash when repeat an item (ins key), due to a null parent
A recent change set the parent member of a item put in the repeat list to
nullptr (this is OK) but the code to copy an item from this list did not
update this parent member.
From master branch, commit 8f348820
2024-11-23 10:07:38 +01:00
Dhineshkumar S 59795c81c5 Fix copy-paste issue for grids with checkboxes
Handle boolean value parsing during paste operation. The boolean value
was not being handled correctly in grid_tricks, which prevented the
boolean value from being pasted into the target row

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

(cherry picked from commit 07f96b83b7)
2024-11-21 11:37:47 -08:00
Mike Williams 84d00a7887 cli: accept multiple gerber layers for single layer plotting
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19089
(cherry picked from commit 325d6ff064)
2024-11-21 12:55:13 -05:00
John Beard 3774e31db8 Pcbnew: convert to lines should take the width of polygons if it can
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18713
(cherry picked from commit 81c1cd9af1)
2024-11-21 12:32:56 -05:00
Seth Hillbrand 69ac570658 Update translations 2024-11-21 09:29:00 -08:00
Pablo Bianchi 46ecb22ef5 Translated using Weblate (Spanish)
Currently translated at 98.5% (9055 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es/
2024-11-21 18:27:21 +01:00
Jan Straka ff7ea6eae0 Translated using Weblate (Czech)
Currently translated at 84.1% (7735 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-11-21 18:27:21 +01:00
Marco Ciampa 2f70ac171f Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-11-21 18:27:20 +01:00
Marco Ciampa 360011e563 Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-11-21 18:27:20 +01:00
CloverGit 2a0785d188 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-11-21 18:27:20 +01:00
Toni Laiho a480b1a5ba Translated using Weblate (Finnish)
Currently translated at 99.7% (9172 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-11-21 18:27:20 +01:00
Marco Ciampa 6f31e306a1 Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-11-21 18:27:20 +01:00
Pferd O 5983815415 Translated using Weblate (German)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-21 18:27:20 +01:00
Marco Ciampa 288050b6ec Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-11-21 18:27:20 +01:00
co8 j 6d36363403 Translated using Weblate (Japanese)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-11-21 18:27:20 +01:00
Marco Ciampa 720c7d9fc4 Translated using Weblate (Italian)
Currently translated at 99.5% (9152 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-11-21 18:27:20 +01:00
Wellington Terumi Uemura e009afd4a1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-11-21 18:27:20 +01:00
ZbeeGin 9e13ff25d0 Translated using Weblate (Polish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-11-21 18:27:20 +01:00
Pferd O af1899ddc3 Translated using Weblate (German)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-21 18:27:20 +01:00
Ian McInerney beb30dd881 Use appropriate tunning pattern icon in menus for tunning pattern generators
(cherry picked from commit 2190c37cd6)
2024-11-21 12:22:38 -05:00
Alex Shvartzkop 6d09293b11 DXF import: scale text size too inside scaled blocks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18525

(cherry picked from commit 37fb792411)
2024-11-21 12:19:31 -05:00
Alex Shvartzkop ca7378924c Make color picker dialog usable on hidpi monitors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17860

(cherry picked from commit 894bf45480)
2024-11-21 11:55:54 -05:00
Ian McInerney 74316a62d3 Always use black text in PCB calculator E-series table
The white text in dark mode is too washed out on the cell colors to be
visible. Since we already purposely subdue the colors in dark mode, the
easiest fix is to just always use black text.

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

(cherry picked from commit c7d280dfa1)
2024-11-21 11:34:06 -05:00
Dhineshkumar S 3150f467bb Fix Courtyard layers disappeared
Currently, the used layers passed from parseLayers() do not include
mandatory layers if they are missing in the loaded board file.
To fix this, we can manually add the mandatory layers to ensure they
are always enabled.

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

(cherry picked from commit 6e2ed5666d)
2024-11-21 11:28:37 -05:00
Dhineshkumar S c033c364d4 Fixing Paste Issue in Library Table
Previously, when attempting to paste an entire row copied from the global
table into a project table, the value would be pasted from the cell where
the cursor was focused, rather than from the first cell. This issue
occurred because the first cell, a checkbox column, was not selectable.
To resolve this, the checkbox column should be enabled for selection
when the Left Mouse Button event is triggered

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

(cherry picked from commit 1fc8e65f7a)
2024-11-21 11:15:17 -05:00
Mike Williams 37c14a65ed net navigator: add sheet changes to navigation history
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18616
(cherry picked from commit 284c52845d)
2024-11-21 11:07:22 -05:00
Mathieu Pilato dbf64ac0cf Fix missing current scale in AC simulation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18313

(cherry picked from commit 10d23ada48)
2024-11-21 09:40:12 -05:00
jean-pierre charras 0eda576189 Gerbview: fix a link issue on msys2: round 2
Reverts commit 6ee9fb4027
Make fix only for mingw/msys2
2024-11-20 18:29:32 +01:00
jean-pierre charras 6ee9fb4027 Gerbview: fix a link issue on msys2
mingw/msys2 is picky about order of files to link.
2024-11-20 18:06:21 +01:00
Kamil Galik 64134cee92 ADDED: 3D Mouse support in places
Gerber Viewer, Drawing Sheet Editor and Footprint Properties 3D Model tab

Fixed https://gitlab.com/kicad/code/kicad/-/issues/14002
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13306
2024-11-20 15:56:19 +00:00
Jeff Young fead0eb33b Manual cherry-pick of ee8d86390e. 2024-11-18 22:44:41 +00:00
jean-pierre charras ff71b324a1 EEschema: fix an issue in sheet cross-references of global labels.
Commit 5ca34147 (a cherry pick from master branch) broke these cross-references.
If was fixed later in master branch, but these changes cannot be cherry picked.
So the old code is reused in 2 functions to fix the issue.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18534
2024-11-17 13:11:23 +01:00
Seth Hillbrand b10ab478bd Fix 3D viewer omission of STEP models with relative path assignment
The project was not assigned to the board in the 3D viewer frame,
resulting in a failure to locate the relative path for STEP models.
To fix this, the current project should be assigned to the board in
the 3D viewer frame.

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


(cherry picked from commit d2e51fdb5f)

c824484c Fix 3D viewer omission of STEP models with relative path assignment

Co-authored-by: Dhineshkumar S <dhineshkumar@cgvakindia.com>
2024-11-17 07:21:14 +00:00
Wayne Stambaugh 710b6adb8c Warn user when template field names contain trailing/leading white space.
When loading a schematic that contains fields with trailing/leading white
space, show an infobar message.  When editing the template field names,
prompt the user to keep or remove any trailing or leading white space
characters from field names.

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

(cherry picked from commit d9d984d2c8)
2024-11-16 20:51:03 -06:00
Mark Roszko 6a01bdbabd Drop the first point of an arc when building an outline when there's a previous point that's being changed
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18125


(cherry picked from commit 8b4253cda4)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-11-16 08:53:01 +00:00
Jeff Young 76e19c6dcf Import PCB into existing project.
Or, to be more direct: don't pull the project rug
out from under EESchema when importing in non-
stand-alone mode.

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

(cherry picked from commit a2f7edde2e)
2024-11-16 02:43:13 -06:00
Seth Hillbrand 8af289c33e Fix error in PointInside
If we are checking a point that is inline with multiple segments, we
were counting both the entry and exit as crossings, leading to points
inside a polygon being registered as outside.  Changing the conditional
to only catch one crossing as required.

Adds a QA check to ensure that this remains fixed

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

(cherry picked from commit 7916b1ddb8)
2024-11-16 02:38:49 -06:00
JamesJCode 35fa7db5c7 Don't reset sheet / screen file names if cancelling repeat insert
in recursive state

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

(cherry picked from commit c05dd18613)
2024-11-16 02:36:23 -06:00
Seth Hillbrand 67739ee3d1 Convert courtyards with error allowance
We convert arcs/circles to polygons with an allowable error.  This means
that the segments might end up being closer than we expect and we should
allow for this deviation when checking courtyards

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

(cherry picked from commit 3a8a5bb378)
2024-11-16 02:34:53 -06:00
Seth Hillbrand d8ba7284a8 Correct pad connections for 45° circular
When calculating the pad bbox, we need to only account for deflation of
zone min width.  Additionally, when calculating spokes for roughly
circular elements, we don't need to go to the bbox corners, so special
case it to rotate after the fact

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18329
2024-11-16 02:34:25 -06:00
Seth Hillbrand fdc0309592 Simplify spoke generation
Sin/Cos are pre-caclulated for all multiples of 45° so we don't need to
short circuit them here.  Calculating the bbox intersection point allows
us to pick spoke sizes that are not overly large so as to miss the hit
point testing in the associated fill areas.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18329
2024-11-16 02:34:25 -06:00
Mike Williams 55d77f0dbb pcb: fix crash on routing many traces
Further improvements could be made to the behavior of the autoroute
functionality in this case, but not crashing is a good start.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18328
(cherry picked from commit 04ff715945)
2024-11-16 02:32:33 -06:00
Seth Hillbrand 14fafebbc7 Handled unconnected nets
These nets may have only a single element in them (no connections), so
be sure to leave the node even without Features

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

(cherry picked from commit 14ccadd2a9)
2024-11-16 02:31:06 -06:00
Seth Hillbrand 7ca472deb8 Handle error when we don't have Eagle Board
This can also occur in libraries, so ensure we're not dereferencing a
null board pointer

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

(cherry picked from commit 89b9b13e21)
2024-11-16 02:30:36 -06:00
Seth Hillbrand fdb3612565 Some fixes for DXF import
In order to find elements, we need to have bbox correctly set.  ::min()
for doubles, just gives the smallest positive value.  So negative placed
graphics don't trigger the right bbox and they get nopped out of
existence.

Similarly, following the advice from @msteinbeck, we elevate the degree
of the spline before converting it to beziers in order to properly
represent in KiCad

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

(cherry picked from commit e0fc7b2b88)
2024-11-16 02:30:03 -06:00
Seth Hillbrand bf59a6305a Handle DXF files with out of bounds values
First, ensure that we calculate the bbox of the imported elements.

If the total BBOX is outside our allowed value, refused to import.  This
needs to be scaled or addressed in an external editor

If the bbox fits, then make sure that we clamp it such that the largest
element is still within our bounds

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

(cherry picked from commit a724b3d8b1)
2024-11-16 02:29:19 -06:00
Dhineshkumar S 17db770d92 Fix copy and paste issue in bus alias definition
Previously, creating a new member row by pasting text from the clipboard
did not trigger a cell value change which prevented the correct
association of the member value with the alias. To ensure this, we force
the member to be updated with the current alias before closing the dialog,
as well as with the previous alias when adding a new one

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

(cherry picked from commit cd40c6bbbf)
2024-11-16 02:27:26 -06:00
Dhineshkumar S b3004c9d96 Disable custom color selection when Fill Mode is Body Background Color
Currently, the system allows custom color selection for the Fill Color
property in the Properties toolbar even when Fill Mode is set to Body
Background Color via the Properties window. However, this does not update
the color to match the Body Background color. To fix this, custom color
selection for Fill Color will be disabled when Body Background Color is
chosen.

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

(cherry picked from commit cb41f39045)
2024-11-16 02:09:46 -06:00
Dhinesh c54ebdecd2 Fix missing text and graphics in PDFs generated by "Plot to PDF"
The "Plot to PDF" function was producing PDF files that lacked text and
graphic items in viewers like Adobe and Foxit. This issue was caused by
the use of the %g format specifier for floating-point numbers defined in
the PDF specification when writing text and drawing shapes in the PDF.
This incorrect format led to a "Too Few Operands" error during rendering.
To resolve this issue, all floating-point numbers must be specified in
fixed-point format according to the PDF specification wherever the issue
was generated.

Fixes #16465

(cherry picked from commit 8851cd77ab)
2024-11-16 02:08:50 -06:00
Ian McInerney 6fc15ed8df Make instance checker path globally writable
On Linux, this directory is shared between users, so a multi-user
machine needs to let the other users have access to the directory to
create their own lockfiles.

(cherry picked from commit 921358b096)
2024-11-16 01:43:18 -06:00
John Beard e7779d9b91 Exclude letter hotkeys from Shift fallback
From master branch

There is a fallback mechanism here designed to catch cases
where a hotkey is bound to a key that needs Shift to be
input (e.g. ? requires Shift on many non-US keyboards,
but the hotkey for that should be '?', not 'Shift+/'). For any key
where the two options are equally-valid "main" key (e.g. '6' and '^'
or '?' and '/' or ':' amd ';'), this is correct, as it allows
the hotkey to be simply the character in question.

Letters don't require this treatment - using this fallback
in the letter case means that a hotkey bound to 'B' will
also fire when 'Shift+B' is pressed, even when Shift+B is
bound to something else. In fact, it could even preempt the
real Shift+B hotkey.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19093
2024-11-13 19:50:48 +01:00
jean-pierre charras 06a91637a7 3D viewer: Ensure the 3D display view is not modified after left clicking.
After opening a context menu and left clicking on the 3D canvas, the view
was modified because a drag event was generated, probably a wxWidgets bug.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17422
2024-11-11 17:11:07 +01:00
Alex Shvartzkop 08e9ce2828 Fix an "unreferenced local variable" warning, 2024-11-11 00:03:34 +03:00
Wayne Stambaugh 24f82ab87d Another attempt to fix Windows file URLs for PDF links.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14250

(cherry picked from commit 6cc5d89838)
2024-11-10 10:17:27 -05:00
Wayne Stambaugh bcf069699d Fix PDF plotter URI issues.
Add 'file:' URI JavaScript handlers.

Properly convert Windows file paths to valid URI syntax.

Use expanded variables for URI menu names.

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

(cherry picked from commit 930407fac8)
2024-11-08 14:55:40 -05:00
Wayne Stambaugh f8d694e4d0 Substitute variables in PDF plotter URI links and add file:// URI handler.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14250

(cherry picked from commit 43c3cd57eb)
2024-11-08 14:55:19 -05:00
John Beard b80334baa1 Libgit2: the const git_commit* saga continues
The change wasn't re-reverted in 1.8.3, it was just not
included. It was than _also_ reverted in 1.8.4, as it was for
1.8.2 (those two tags are on different branches - main and maint/v1.8).

Hopefully, this means that we're done here, and v1.8.5 will also be
const-y, whether it is based on main or maint/v1.8.

The current state of play:

* 1.7.0 and older: const
* 1.8.0, 1.8.1:    no const
* 1.8.2:           const
* 1.8.3:           no const
* 1.8.4:           const
Future:
* 1.8.5/1.9.0:     presumably/hopefully, const

This is currently breaking at least Arch and Fedora Rawhide

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19062
(cherry picked from commit 9f579f787b)
2024-11-08 08:24:59 +08:00
Jan Wichmann 6c359e2f06 Fix: Clear drill holes table before loading board file
From master branch
2024-11-07 16:56:18 +01:00
Jeff Young a3eff548b7 Even the orphaned net must obey the min board clearance.
(And other Default netclass constraints.)

(cherry picked from commit 5d656e3c8d)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19051
2024-11-05 21:02:23 +08:00
Mark Roszko e33a732371 Bump vcpkg and wxwidgets for aui patch 2024-11-02 19:23:47 +00:00
Jon Evans 95d3200a3a Clear unknown keys from environment variable maps on save
Also fix the previous code for clearing unknown keys to use
a JSON pointer so that it functions correctly when the JSON path
is more than one level deep.

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


(cherry picked from commit 09652efec5)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-11-02 18:54:12 +00:00
Jon Evans 5ee7ae4a45 Make sure to set modified bit when releasing nested settings
(cherry picked from commit 826794469d)
2024-11-02 10:26:03 -04:00
Jon Evans b13a9e231b Use a persistent flag to track JSON modifications
(cherry picked from commit eb6d85bacf)
2024-11-02 10:25:59 -04:00
Seth Hillbrand 1011f361fd Update translations 2024-11-01 16:27:28 -07:00
David Chorváth 288a08b9c2 Translated using Weblate (Slovak)
Currently translated at 65.0% (5974 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-11-02 00:26:56 +01:00
ZbeeGin cac1979f61 Translated using Weblate (Polish)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-11-02 00:26:56 +01:00
Pferd O 38a9477423 Translated using Weblate (German)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-02 00:26:56 +01:00
David Chorváth 072446e79d Translated using Weblate (Slovak)
Currently translated at 64.8% (5961 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-11-02 00:26:56 +01:00
Pferd O 4fc528819d Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-02 00:26:56 +01:00
CloverGit d5f52000ce Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-11-02 00:26:56 +01:00
Henrik Kauhanen 8e4d7da4ea Translated using Weblate (Swedish)
Currently translated at 99.9% (9189 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-11-02 00:26:55 +01:00
Henrik Kauhanen ea3f0bada4 Translated using Weblate (Swedish)
Currently translated at 99.9% (9189 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-11-02 00:26:55 +01:00
co8 j 3b33ce8bcc Translated using Weblate (Japanese)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-11-02 00:26:55 +01:00
Pferd O 74b42f1bb2 Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-02 00:26:55 +01:00
Pferd O b455a4cd54 Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-02 00:26:55 +01:00
co8 j 5021f6ee26 Translated using Weblate (Japanese)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-11-02 00:26:55 +01:00
sergio 0be2b88f5a Translated using Weblate (Russian)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-11-02 00:26:55 +01:00
Wellington Terumi Uemura f3a57cf763 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-11-02 00:26:55 +01:00
Pferd O ddd69019bc Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-11-02 00:26:55 +01:00
109247019824 94e34cb1eb Translated using Weblate (Bulgarian)
Currently translated at 7.6% (706 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/bg/
2024-11-02 00:26:55 +01:00
JamesJCode 6470212edd Fix missed rows when pasting to WX_GRID on macOS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18916

(cherry picked from commit 816af9562b)
2024-11-01 23:10:26 +00:00
Mike Williams 8c3bcade1c schematic: fix missing actions strings and hotkey conflict
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17694
(cherry picked from commit 5ed80a08b8)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18748
2024-11-01 13:37:53 -07:00
jean-pierre charras 70e99acce6 FP editor: fix possible crash when saving a footprint due to a null pointer
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19018
2024-11-01 20:56:42 +01:00
jean-pierre charras 25be138ac1 eeschema, DIALOG_SHEET_PROPERTIES: add test for valid sheet filename
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18981
2024-11-01 20:24:50 +01:00
Alex Shvartzkop 9f196d2e64 EasyEDA/LCEDA: import bezier curves in symbols.
See https://gitlab.com/kicad/code/kicad/-/issues/19034
2024-11-01 16:36:45 +03:00
Alex Shvartzkop b51fed4118 EasyEDA/LCEDA Pro: don't import empty but visible netlabels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19034
2024-11-01 16:10:15 +03:00
JamesJCode a914f361d3 Fix libgit integration for version >= 1.8.3
The API continues to change...

(cherry picked from commit 75c2f17b42)
2024-10-31 18:48:10 +00:00
Alex Shvartzkop 846b634e0e EasyEDA/LCEDA import: take symbol/netport Name from device entry if empty in schematic.
Also fixes netport orientation if it's symbol is non-default.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19021
2024-10-30 18:33:42 +03:00
Alex Shvartzkop 08b54e205d Show failing strings in HTMLEscape test.
(cherry picked from commit 0581423d50)
2024-10-30 10:37:01 +03:00
Alex Shvartzkop 7cba1e1a55 Update field order in PCB_TUNING_PATTERN.
(cherry picked from commit d2c33e186e)
2024-10-30 10:36:53 +03:00
Alex Shvartzkop 6ae334a751 Fix/improve HTML unescape function.
Also adds some tests.
2024-10-30 08:22:38 +03:00
Alex Shvartzkop 61687e8499 QA: do not pass negative char values to isdigit in NUMERIC_EVALUATOR.
This causes an assert failure on MSVC when running qa_common.
2024-10-30 08:22:38 +03:00
Seth Hillbrand e014f2274f Fix display of broken fonts
TTF fonts are supposed to obey a specific winding.  But sometimes they
don't, especially with garbage windows font editing programs.  If the
outline with hole winding doesn't have an outline, it is probably an
outline itself

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

(cherry picked from commit a6b25d1ee1)
2024-10-29 11:02:26 -07:00
Jeff Young 7e0f05f991 Must check for implicit min separately from opt/max.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19012

(cherry picked from commit 7074c31374)
2024-10-29 17:01:45 +00:00
Jeff Young 1e21b41be5 Centralize ref-des error checking.
(cherry picked from commit 905eaa79a9)
2024-10-28 19:03:50 +00:00
Mark Roszko 4a7dcfdd1f Update vcpkg.json 2024-10-27 23:43:15 +00:00
Alex Shvartzkop d1684b8a72 Fix compatibility with LCEDA/EasyEDA v2.2.32
Now device attributes can contain numbers.

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

(cherry picked from commit 840b9aebba)
2024-10-27 04:30:59 +03:00
Troy Denton 8da026baff Fix URI environment variable expansion issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18918

(cherry picked from commit 0f33aebe48)
2024-10-24 11:53:41 -04:00
jean-pierre charras 89a3ead51e Pcbnew: fix text position when drawing PCB_TEXTs on non paired layers
For these texts, and when the view was "flip board view" option, these text
positions were incorrectly calculated for texts having a text rotation not 0.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18980
2024-10-24 15:20:33 +02:00
jean-pierre charras 5064834716 French translation update 2024-10-24 14:09:49 +02:00
Seth Hillbrand 51a3859d7e Preserve pin numbering when duplicating
We renumber duplicated pins but the previous order was essentially
random.  This keeps the numeric order of the pins on the screen, falling
back to position if they are not numbered

(cherry picked from commit f4bec843d4)
2024-10-21 14:00:18 -07:00
Seth Hillbrand bf37bd8ed5 Fix DRC error with arcs
When two arcs only barely overlapped, we cannot predict the actual point
ends as they exist in the error margins.  Since arc tracks have
different radii by definition, rounding errors in calculating the
overlap angle led to some mistaken identification of parallel segments.

This adds an advanced config flag to set the preferred cutoff point
(currently 0.001°) for whether two arcs actually overlap in shared angle
space

(cherry picked from commit 6be6680d8c)
2024-10-21 13:41:25 -07:00
Dhineshkumar S 283fed83c3 Fix Focus Issue in Parent Window After Hiding the Search Panel
Previously, when the search panel was hidden, the focused search control
did not lose focus, causing an inability to focus on any items in the
parent window when using shortcut keys. This forces correct focus back to the edit window

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

(cherry picked from commit 2bee6f2549)
2024-10-21 13:36:29 -07:00
jean-pierre charras 48983dd31d Python script: Ensure image handlers are loaded before loading a board,.
because a board can include bitmap images using various formats, all
available image handlers must be loaded.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18959
2024-10-21 17:33:14 +02:00
jean-pierre charras ccd4b0cf05 pagelayout_editor: lock panel update during widgets rebuild.
The rebuild is much faster.
From master branch
2024-10-21 17:21:04 +02:00
aris-kimi 154c755a1b Fix non working Esc when init Polyline Properties dialog.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18850
(cherry picked from commit 36bac3f467)
2024-10-20 12:53:34 +01:00
Jeff Young 4157d3350e Limit fix to MacOS.
GTK definitely doesn't need it.  It's unlikely that
MSW needs it either.
2024-10-19 16:49:21 +01:00
Jeff Young 08ba185003 Make sure Paste can't leak through modal dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18912

(cherry picked from commit f1ff75f969)
2024-10-19 16:49:21 +01:00
Jeff Young 7b0e5cd080 DRCEpsilon will appear on *both* sides of a zone neck.
Also don't hide modification of minWidth as a side-effect
of an if-statement.

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

(cherry picked from commit b342126ff3)
2024-10-19 16:49:21 +01:00
Jeff Young 66f50d0c0b A neck in a zone fill will be DRCEpsilon smaller on each side.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18921

(cherry picked from commit 4089735c28)
2024-10-19 16:49:21 +01:00
Jeff Young 973d2d6c03 Even the orphaned net must obey the min board clearance.
(And other Default netclass constraints.)

(cherry picked from commit 4601503660)
2024-10-19 16:49:21 +01:00
Jeff Young fa854b80da Don't ask about locking twice.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18679

(cherry picked from commit a9f79093be)
2024-10-19 16:49:21 +01:00
Jeff Young 05f8bc05ec Fix broken logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18580

(cherry picked from commit e5321f7401)
2024-10-19 16:49:21 +01:00
Jeff Young d9af68b910 Report implicit rule minimums as being from the board setup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18642

(cherry picked from commit ed268c5701)
2024-10-19 16:49:21 +01:00
Seth Hillbrand 0c8172880f Prevent soldermask bridge DRC error with mask pad
We checked logical pad matching when looking at pad-based mask but we
should also do the same for aperture masks
2024-10-18 15:24:21 -07:00
Seth Hillbrand 45559cb809 Update translations 2024-10-16 15:32:27 -07:00
Ivan Chuba d3e1d94046 Translated using Weblate (Ukrainian)
Currently translated at 87.0% (7998 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/uk/
2024-10-17 00:31:56 +02:00
Jan Straka 2c75396b80 Translated using Weblate (Czech)
Currently translated at 84.1% (7735 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-10-17 00:31:56 +02:00
Arnau Llovet Vidal 7aae0a9f65 Translated using Weblate (Catalan)
Currently translated at 47.4% (4365 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ca/
2024-10-17 00:31:56 +02:00
Flórián Fuszkó bfd6d96ffc Translated using Weblate (Hungarian)
Currently translated at 3.4% (320 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/hu/
2024-10-17 00:31:56 +02:00
Pferd O f4efa47fe7 Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-10-17 00:31:56 +02:00
co8 j d1fd8b18ad Translated using Weblate (Japanese)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-10-17 00:31:56 +02:00
Karl SCHUH 5ee1c0ab42 Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-10-17 00:31:56 +02:00
co8 j 8d53326021 Translated using Weblate (Japanese)
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-10-17 00:31:55 +02:00
CloverGit 246afee56e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-10-17 00:31:55 +02:00
taotieren 352faf526f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-10-17 00:31:55 +02:00
Wellington Terumi Uemura c183a63c50 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9190 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-10-17 00:31:55 +02:00
Pferd O 9c34432b99 Translated using Weblate (German)
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-10-17 00:31:55 +02:00
CloverGit 76bc0e27fc Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (9187 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-10-17 00:31:55 +02:00
Petr Pazourek b2f6d341dd Translated using Weblate (Czech)
Currently translated at 84.1% (7735 of 9190 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-10-17 00:31:55 +02:00
JamesJCode 7b5afe805e Drag NC markers attached to SCH_SHEET pins when SCH_SHEET is dragged
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18854

(Cherry-picked from commit d726097a3f)
2024-10-14 00:02:05 +01:00
Wayne Stambaugh b77a591c45 Begin version 8.0.7 development. 2024-10-13 18:20:51 -04:00
Wayne Stambaugh 3adec39b0c Tag stable version 8.0.6. 2024-10-13 15:12:40 -04:00
jean-pierre charras a0ad6add34 DIALOG_BOARD_STATISTICS: do not take in account edge.Cuts items thickness
To define the physical board size, graphic items thickness has no matter.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18470
2024-10-12 19:06:45 +00:00
jean-pierre charras 80079c16e8 Pcbnew: ensure all local settings are saved on close the board editor.
From master branch.
2024-10-12 14:05:58 +02:00
jean-pierre charras 632ae136d8 Gerbview: make buffer to read a line of Gerber file bigger.
Currently, the Gerber file is parsed line by line, This is most of time OK.
But warning: in rare cases some files can have *very long* lines (in fact
have only one line),  so the buffer must be very large.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18890
2024-10-10 18:36:20 +02:00
jean-pierre charras 88b11ef065 PCB_DRAW_PANEL_GAL: Ensure LAYER_CONFLICTS_SHADOW is on top of displayed layers.
The visibility of conflicts is better.
2024-10-10 14:27:30 +02:00
Alex Shvartzkop 63b89688df Support libgit2 v1.8.2+
In v1.8.2-rc1, the type change introduced in v1.8.0 was reverted.

See https://github.com/libgit2/libgit2/commit/49d3fadfca4ce8e7a643525eb301a2d45956641e

(cherry picked from commits 74e15a3fc2 and 4c196e1486)
2024-10-07 17:25:58 +03:00
Wayne Stambaugh ab9a4295a0 Tag stable version 8.0.6 release candidate 1. 2024-10-06 15:39:47 -04:00
Alex Shvartzkop e6ce4eb73e Altium PCB: convert small arcs in line chain to segments to avoid overflow issues.
Can be seen on "mb1932-bdp", for example.
2024-10-06 13:43:16 +03:00
Alex Shvartzkop 86f122416b Altium PCB: improve default textbox alignment when isJustificationValid flag is not set.
While there is an example where the default text frame justification is center-center,
in other cases it should be left-bottom, but we don't know what controls this yet.

An example where text frames should be imported with center-center justification:
https://github.com/FpgaDigital/RK3328/blob/830d51b80c77aba6c7570d273521770dfeeee0f9/RK3328.PcbDoc

But in "mb1897-bdp.zip" from https://gitlab.com/kicad/code/kicad/-/issues/18784
text frames should use left-bottom justification.
2024-10-06 13:31:22 +03:00
Alex Shvartzkop be91576758 Altium PCB: support having 103 remaining bytes in ATEXT6 subrecord.
This improves text justification. For example, in:
https://github.com/peng-zhihui/Project-Quantum/blob/71654ca4e4d309e45997a75821f18d0186a08c00/1.Hardware/Electron-Aduino/Electron.PcbDoc
2024-10-06 12:58:26 +03:00
Alex Shvartzkop 784c2cda5a Decode UTF-8 for component field values in backannotation parser.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18406
2024-10-06 12:03:33 +03:00
Mark Roszko 836de8d233 Bump kicad-vcpkg for wx
(cherry picked from commit 04cc05645f)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-10-05 11:39:24 +00:00
Wayne Stambaugh ac01d1986f Remove debugging output from last commit.
(cherry picked from commit 90ed4bae99)
2024-10-04 12:24:17 -04:00
Wayne Stambaugh 8a0693d328 Show schematic parity tab in DRC dialog when parity marker is selected.
(cherry picked from commit 7228321b5d)
2024-10-04 12:23:14 -04:00
Wayne Stambaugh 2a62ffe32d Update hierarchy navigator when sheet schematic file is changed. 2024-10-03 12:29:00 -04:00
Wayne Stambaugh cb895c9710 Fix schematic hierarchy navigator refresh issues.
The hierarchy navigator was failing to update properly on undo/redo and
when the referenced schematic file of a sheet was changed.

(cherry picked from commit a871311b6f)
2024-10-03 10:14:58 -04:00
John Beard 52a73986bc Pcbnew: Fix aligned dimension flipping
https://gitlab.com/kicad/code/kicad/-/issues/16317
(cherry picked from commit 304d9e0006)
2024-10-03 14:31:21 +01:00
Mark Roszko 15582773bd Update our vcpkg ports 2024-10-02 22:03:28 +00:00
Wayne Stambaugh fc3435113d Fix annotation issue loading legacy schematics.
Commit 83de056de9 broke loading legacy schematics that are not shared.
Legacy schematics do not contain instance data "AR Path=" entries when
the schematic file was not shared.  The reference and unit information
was only stored in the symbol reference field and unit entries in the
symbol definition.

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

(cherry picked from commit 21dd41eeb2)
2024-10-02 11:16:09 -04:00
jean-pierre charras 801492b708 Add forgotten fix in commit 8c25e5b6 2024-09-30 20:45:31 +02:00
jean-pierre charras 8c25e5b68e kicad-cli: ensure plotted layers in gerber export are restricted to enabled layers
From branch
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18811
2024-09-30 19:37:28 +02:00
Seth Hillbrand 1525da154f Update translations 2024-09-30 08:42:37 -07:00
Pferd O f2199eebf5 Translated using Weblate (German)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-09-30 17:42:06 +02:00
boonchai k 1a761bf6ce Translated using Weblate (Thai)
Currently translated at 71.7% (6593 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/th/
2024-09-30 17:42:06 +02:00
CloverGit 21f8b23ade Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-30 17:42:06 +02:00
Pferd O 4fc82b97cf Translated using Weblate (German)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-09-30 17:42:06 +02:00
ssantos 721e7359b3 Translated using Weblate (Portuguese)
Currently translated at 99.9% (9182 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt/
2024-09-30 17:42:06 +02:00
co8 j 7e0c822451 Translated using Weblate (Japanese)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-30 17:42:06 +02:00
co8 j 6d9160ea31 Translated using Weblate (Japanese)
Currently translated at 99.9% (9189 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-30 17:42:06 +02:00
co8 j 31cc51fe42 Translated using Weblate (Japanese)
Currently translated at 99.9% (9189 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-30 17:42:06 +02:00
Pferd O c85ef81e6b Translated using Weblate (German)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-09-30 17:42:06 +02:00
CloverGit ddb29d6ab8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-30 17:42:06 +02:00
Toni Laiho d666021572 Translated using Weblate (Finnish)
Currently translated at 99.8% (9175 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-09-30 17:42:05 +02:00
Frank Sonnenberg 360d6d87a4 Translated using Weblate (German)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-09-30 17:42:05 +02:00
CloverGit 97d3b369d5 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-30 17:42:05 +02:00
Trần Phi Hải 7936df3e1e Translated using Weblate (Vietnamese)
Currently translated at 26.1% (2408 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-09-30 17:42:05 +02:00
Trần Phi Hải eca370792a Translated using Weblate (Vietnamese)
Currently translated at 25.4% (2339 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-09-30 17:42:05 +02:00
Henrik Kauhanen af68514acd Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-30 17:42:05 +02:00
ZbeeGin a0e0f05977 Translated using Weblate (Polish)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-09-30 17:42:05 +02:00
co8 j 78c09b1e2f Translated using Weblate (Japanese)
Currently translated at 99.9% (9188 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-30 17:42:05 +02:00
Trần Phi Hải a2051132b5 Translated using Weblate (Vietnamese)
Currently translated at 23.7% (2187 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-09-30 17:42:05 +02:00
CloverGit a67bf40def Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-30 17:42:05 +02:00
Wellington Terumi Uemura 9b47650b4a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-09-30 17:42:05 +02:00
Tokita, Hiroshi 748dd4f02c Translated using Weblate (Japanese)
Currently translated at 99.5% (9153 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-30 17:42:05 +02:00
Henrik Kauhanen 530167cf69 Translated using Weblate (Swedish)
Currently translated at 99.9% (9189 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-30 17:42:04 +02:00
jeong-sangwon 7d6e8853db Translated using Weblate (Korean)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-09-30 17:42:04 +02:00
Jon Evans 9f3631f0e9 Revert "Add ERROR_LOC to exports"
This reverts commit c8253a5018
2024-09-29 14:31:26 +00:00
Jon Evans c8253a5018 Add ERROR_LOC to exports
(cherry picked from commit 330150a6a6)

Co-authored-by: i404788 <404788@student.fontys.nl>
2024-09-29 13:36:26 +00:00
jean-pierre charras 3aaae7405d Pcbnew, Flip rectangle shape: Keep its anchor position after flipping.
Previously, it was flipped using the shape anchor position. But for this
shape, the anchor (top left corner)) is reinitialized after flipping, so
flipping twice moves the shape.
Now the rectangle center is used as reference position to flip the shape
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18797
2024-09-28 18:17:00 +02:00
jean-pierre charras f2e012119a Pcbnew: Fix issue when flipping a graphic segment (SHAPE_T::SEGMENT).
PCB_SHAPE::Normalize() normalized a graphic segment by (sometimes) swapping
start and end points. But it creates an issue when flipping a segment: the
reference point can be changed.
This normalization was made for DRC purpose when comparing 2 footprints.
Now, PCB_SHAPE::Normalize() does not change end points of a segment, and a
specific PCB_SHAPE::NormalizeForCompare() normalize fct is used for DRC compare.
2024-09-28 17:55:00 +02:00
JamesJCode 48b9027842 Fix deep cloning and RunOnDescendants for groups containing generators
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17710

(Cherry-picked from 903c743a60)
2024-09-26 19:03:32 +01:00
John Beard 0511926a4c Pcbnew: handle connected copper circle points
V8 inline implementation of aea42a5cdf,
since no KIGEOM helper functions.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18774
2024-09-25 18:43:29 +01:00
jean-pierre charras 1ac1a5bb3b Symbol Editor, align items on grid: do not modify shape of arcs and circles.
Previously, start and end points were moved, and therefore the shape itself was
modified. It was probably unexpected.
Now just align the arc start point or the circle center point on grid.
2024-09-21 18:09:48 +02:00
jean-pierre charras 6cfe4482f7 Simulator, TUNER_SLIDER: fix (minor) issues
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18746
2024-09-21 18:09:48 +02:00
jean-pierre charras 61680eacd4 PANEL_SETUP_LAYERS: fix issues for VIAs when reducing the copper layer count.
From master branch.
2024-09-21 18:09:48 +02:00
Wayne Stambaugh 3aef3818cd Fix broken library symbol links when importing CADSTAR schematics.
Under certain circumstances, the library symbol links were missing
the library nickname causing the schematic symbols to appear as if
the library symbol was missing.

Added a helper function to create the symbol library name to avoid
code duplication.

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

(cherry picked from commit 7acd057c86)
2024-09-21 11:51:03 -04:00
JamesJCode 355805756e Enable 'exclude_from_sim' property for DB libraries
(Cherry-picked from commit df869036e5)
2024-09-17 21:07:55 +01:00
jean-pierre charras 96acf00e81 fix incorrect code committed in commit 1dcd65ec 2024-09-17 15:27:31 +02:00
jean-pierre charras 1ad4fb2eea Convert graphic to polygon or zone: fix some issues:
- fix gap added twice
- add missing gap setting in DIALOG_COPPER_ZONE and DIALOG_NON_COPPER_ZONES_EDITOR

From master branch
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18724
2024-09-17 14:21:16 +02:00
jean-pierre charras 1dcd65ec71 3D viewer, minor fix: vias not fully displayed when the top layer was not shown.
From master branch.
2024-09-14 17:04:22 +02:00
jean-pierre charras 1109878da0 Pcbnew: Preferences/Fp editor/Default values: allow to remove defaut text items.
These texts/fields are not mandatory, so allow remove them from default texts list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18663
2024-09-14 16:31:03 +02:00
jean-pierre charras 7a0803f384 PCB_DRAW_PANEL_GAL: Use TARGET_OVERLAY for LAYER_CONFLICTS_SHADOW.
This is a better option than TARGET_NON_CACHED, and giving better look.
2024-09-14 16:31:03 +02:00
jean-pierre charras 8f56d0b38e DRC and flipped Fp: the sorting function used by DRC now normalize segments.
From master branch
2024-09-14 16:31:02 +02:00
Wayne Stambaugh 9309f612ef Fix incorrect warning coordinates when updating board from schematic.
Use the X and Y axis inversion preference settings in the "PCB Editor"
"Origin & Axes" panel to invert the internal coordinates to display to
the user.

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

(cherry picked from commit 64d4dbb2e8)
2024-09-11 12:06:08 -04:00
Alex Shvartzkop d2b13060fe Fix build error due to SIM_MODEL_IBIS.
SIM_MODEL_KIBIS was renamed to SIM_MODEL_IBIS in master in commit 4e133ae83b,
but not in 8.0.
2024-09-11 15:04:31 +03:00
Seth Hillbrand 393a72216e Limit where type overrides can happen
IBIS requires the ability to override types but this is explicitly
forbidden to SPICE subcircuits.

(cherry picked from commit e01246a9d3)
2024-09-10 15:56:19 -07:00
Seth Hillbrand 76e50881fb Handle field types missing
If we do not have both a device and type for the sim model, return none
because we cannot parse it.  This is handled by the calling routines.
Otherwise, we would return raw spice type erroneously.
2024-09-10 12:25:31 -07:00
John Beard 9779ee0fd3 Fix Boost 1.86 SHA1 one last time
There's a change in Boost 1.86 that breaks the SHA1 hashing
in 3D cache.

The master KiCad branch ditches SHA1 entirely here, but it's quite
an invasive change to backport. So apply a sticking plaster for
the remainder of v8.

Relates-To: https://gitlab.archlinux.org/archlinux/packaging/packages/kicad/-/issues/1
2024-09-10 12:10:33 +01:00
John Beard 9fdd825681 KIID: Use Boost uuids own hash function (fix Boost 1.86)
Not only is this simpler, but it should be compatible
with all Boost versions (the cast is a problem in 1.86)
and it was also 'improved' in 1.86 for better mixing.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18651
(cherry picked from commit 9a3ebfba40)
2024-09-08 22:49:53 +01:00
Ian McInerney f4f9513f80 Fix compilation with Boost 1.86
Boost 1.86 removed the boost::random dependency from boost::uuid, so
we need to include those headers on our own now to use the random
mersenne twister implementation.

(cherry picked from commit a9e115925a)
2024-09-07 20:05:00 +01:00
Jeff Young d35431c888 Drawing sheet can't share glyph cache entries with editors.
(They use different internal units.)

Also fixes a fialure of CAIRO_GAL to reset the fill
and stroke after drawing outline glyphs.

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

(cherry picked from commit b549c4feec)
2024-09-07 17:59:24 +01:00
Jeff Young bcb7acf5c2 Use ORIGIN_TRANSFORMS in Mover Corner To... dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18479

(cherry picked from commit e6a5669d02)
2024-09-07 17:01:42 +01:00
Jeff Young 1e82ed302d Fix some contrast and update issues with sim cursors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18390

(cherry picked from commit e3d4137521)
2024-09-07 17:01:11 +01:00
Jeff Young 1fde8ea6f5 Improve PIN_TRICKS to handle pins with no names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18535

(cherry picked from commit 528b74db7f)
2024-09-07 17:00:14 +01:00
John Beard dab3a38815 Satisfy Boost version polyfils in 8.0 2024-09-07 14:06:45 +01:00
John Beard c9db8f6bfc LSET doesn't have list ctor in 8.0 2024-09-07 13:08:29 +01:00
John Beard 3c655836df SEG: Correct sign in LineDistance
(cherry picked from commit 78cb6c1189)
2024-09-07 11:59:42 +01:00
Jon Evans 544b235910 Fix PNS log viewer after 03079a4f
(cherry picked from commit 0a816ce079)
2024-09-07 12:52:11 +03:00
Alex Shvartzkop bf34bf24ab Make simulation reporter warnings non-fatal.
Adds REPORTER::HasMessageOfSeverity for WX_STRING_REPORTER,
which allows us to show simulation warnings and fail only if there's errors.

Also fixes a crash when SPICE_GENERATOR_KIBIS throws an IO_ERROR.

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

(cherry picked from commit 36019314e9)
2024-09-07 12:38:27 +03:00
Alex Shvartzkop 6b199c52a1 Import POURED items as zone fills from EasyEDA/LCEDA Pro v2.2+ PCBs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18664
2024-09-07 12:23:05 +03:00
John Beard 94f667d87f Pcbnew: set mirrored when creating on back layer
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18643
(cherry picked from commit 9fac24fa0f)
2024-09-06 23:01:38 +01:00
John Beard 464c3815b9 Pcbnew: Ensure items are rescued to an enabled layer
(cherry picked from commit f78329e2af)

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18553
2024-09-06 21:59:12 +01:00
John Beard 53732e2276 Pcbnew: handle all zone layers when rescuing items
(cherry picked from commit 2befd31fd6)

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18553
2024-09-06 21:59:11 +01:00
John Beard bd554a5808 Pcbnew: don't assume zones are in the UiOrder list
This can be false, for example when zones are being rescued,
even if the LSET is non-zero-sized.

(cherry picked from commit 1662d7f546)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18553
2024-09-06 21:59:11 +01:00
JamesJCode b48051d52f PNS: Update track widths during routing
(Cherry-picked from commit 3f2b6f7ae0)
This allows routing through, for example, neck downs defined
based on courtyard DRC rules
2024-09-06 19:18:20 +01:00
JamesJCode 03079a4f4f PNS: Check for nearest segment anchor for initial track constraints
(Based on cherry-pick from commit c39551b032)
2024-09-06 19:18:20 +01:00
JamesJCode 6daa857c2d Mask PCB_TEXTBOX properties that are not supported
Masks EDA_SHAPE "Filled" property for PCB_TEXTBOX objects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18640
2024-09-06 19:18:20 +01:00
Wayne Stambaugh 5a1f60a7c6 Begin version 8.0.6 development. 2024-09-06 12:30:24 -04:00
Wayne Stambaugh e8553dcdf7 Tag stable version 8.0.5. 2024-09-06 12:28:40 -04:00
Alex Shvartzkop dc3012933a Restore a string in Altium parser. 2024-09-06 19:13:28 +03:00
Seth Hillbrand 291ff615bc Update translations 2024-09-06 09:03:13 -07:00
Hanna Breisand 26d1080e52 Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:20 +02:00
Oliver0804 c1452a24d2 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.3% (9127 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-09-06 18:02:20 +02:00
Hanna Breisand 34c833966f Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:20 +02:00
Julio Dias f0e1bc3562 Translated using Weblate (Portuguese)
Currently translated at 99.1% (9111 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt/
2024-09-06 18:02:20 +02:00
Allan Nordhøy 6da9034322 Translated using Weblate (Norwegian Bokmål)
Currently translated at 48.6% (4467 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nb_NO/
2024-09-06 18:02:20 +02:00
김랑기 6887e8cbe3 Translated using Weblate (Korean)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-09-06 18:02:20 +02:00
Hanna Breisand 89ef5986e7 Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:20 +02:00
김랑기 5572a72bb3 Translated using Weblate (Korean)
Currently translated at 99.5% (9152 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-09-06 18:02:20 +02:00
Tokita, Hiroshi b40e446149 Translated using Weblate (Japanese)
Currently translated at 99.5% (9150 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-09-06 18:02:20 +02:00
Toni Laiho 757bfd7b32 Translated using Weblate (Finnish)
Currently translated at 99.7% (9165 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-09-06 18:02:20 +02:00
Henrik Kauhanen c5e1c3db62 Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:20 +02:00
dsa-t b25ff44ff7 Translated using Weblate (Russian)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-09-06 18:02:20 +02:00
Jan Straka cad7a18fa0 Translated using Weblate (Czech)
Currently translated at 84.1% (7731 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-09-06 18:02:20 +02:00
CloverGit 1c3637cb33 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-06 18:02:20 +02:00
Hanna Breisand 3a5f84d1ec Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:20 +02:00
Henrik Kauhanen 44f8df592b Translated using Weblate (Swedish)
Currently translated at 99.9% (9190 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:19 +02:00
CloverGit 17e19f8652 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9188 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-06 18:02:19 +02:00
Hanna Breisand 34fe104431 Translated using Weblate (Swedish)
Currently translated at 99.9% (9189 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:19 +02:00
Henrik Kauhanen 2bdb155838 Translated using Weblate (Swedish)
Currently translated at 99.9% (9189 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:19 +02:00
Andrej Valek 22ebade907 Translated using Weblate (Slovak)
Currently translated at 64.7% (5955 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-09-06 18:02:19 +02:00
Dmitry Mikhirev 9d594214fe Translated using Weblate (Russian)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-09-06 18:02:19 +02:00
Peter B 2c89717c0a Translated using Weblate (Romanian)
Currently translated at 27.1% (2491 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-09-06 18:02:19 +02:00
Grzegorz Szymaszek 7574a46a19 Translated using Weblate (Polish)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-09-06 18:02:19 +02:00
ZbeeGin e5c4d75ce1 Translated using Weblate (Polish)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-09-06 18:02:19 +02:00
CJ van der Hoeven f038ee3083 Translated using Weblate (Dutch)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-09-06 18:02:19 +02:00
Pferd O e1ab2a0836 Translated using Weblate (German)
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-09-06 18:02:19 +02:00
CloverGit 9070d9ff22 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (9181 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-09-06 18:02:19 +02:00
Henrik Kauhanen 606c19780d Translated using Weblate (Swedish)
Currently translated at 99.7% (9172 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:19 +02:00
Hanna Breisand 8fecebb209 Translated using Weblate (Swedish)
Currently translated at 99.7% (9172 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-09-06 18:02:19 +02:00
Peter B da8e1be1c8 Translated using Weblate (Romanian)
Currently translated at 27.0% (2490 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-09-06 18:02:18 +02:00
Wellington Terumi Uemura e14a3caf18 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-09-06 18:02:18 +02:00
Marek 5afb3ad5cc Translated using Weblate (Polish)
Currently translated at 99.9% (9188 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-09-06 18:02:18 +02:00
Ulices b29ca47f25 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9191 of 9191 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-09-06 18:02:18 +02:00
Alex Shvartzkop 5d1737d654 Fix compatibility with EasyEDA/LCEDA Pro v2.2.26
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18620

(cherry picked from commit 16d9fa7f25)
2024-09-06 16:04:24 +03:00
Alex Shvartzkop bdc371f057 Altium PCB import: fix textbox and text placement.
Especially when rotated and/or mirrored.

It's not perfect but it's close enough to being correct.

See https://gitlab.com/kicad/code/kicad/-/issues/18417
2024-09-05 03:52:22 +03:00
Alex Shvartzkop dc2dd20ec7 Altium PCB import: don't add stroke width to text height.
For stroke fonts, KiCad's metrics are very similar to Altium's,
so there's no need to add more height.
2024-09-05 03:52:18 +03:00
Alex Shvartzkop 057174caa0 Altium PCB import: don't override text alignment in ConvertTexts6ToEdaTextSettings.
It is set already at callsite, no need to override.
2024-09-05 03:52:12 +03:00
Alex Shvartzkop 4b035d5b5c Altium PCB import: convert arcs with very small angle to segments.
See mb1791_bdp.zip for example.
2024-09-05 03:52:08 +03:00
jean-pierre charras b22948988f Fix a side effect of commit 513d659c (master) or 55fafe34 (8.0 branch)
This commit modify the order of end points of flipped graphic lines, and
create a DRC issue for flipped footprints (if flipped before this commit).
For segments inside a footprint, the "old" way to flip a segment is now
reused. Expecting this ugly fix is only temporary.
2024-09-03 16:17:31 +02:00
Seth Hillbrand 7a05d58b3e Fix some textbox imports
We still don't know why some Altiums seem to save 0s for the textbox
size when dealing with text strings and some still save values.  There
must be another flag to differentiate between text strings and text
boxes but we haven't found it yet.  But until then, we still need to
link the correct string with the textbox that we generate and suppress
the border

(cherry picked from commit 5332d44bad)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18502
2024-09-02 16:23:28 -07:00
Jon Evans 695ab290e6 Add swig4.2 for linux platforms find
(cherry picked from commit 723fa57b84)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-08-30 15:28:00 +00:00
Jeff Young 54a373a7e2 Push thickness handling down into EDA_TEXT::SetBold().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17077

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

(cherry picked from commit aef87b9796)
2024-08-28 13:47:29 +01:00
jean-pierre charras 637f331724 French translation update 2024-08-28 14:17:35 +02:00
Wayne Stambaugh 931a9697ca Tag stable version 8.0.5 release candidate 1. 2024-08-26 17:15:42 -04:00
Seth Hillbrand 5ffc58844f Update translations 2024-08-26 14:05:46 -07:00
Hanna Breisand 3ea2c6f1ff Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-08-26 23:03:53 +02:00
Balázs Meskó 2cba724659 Translated using Weblate (Hungarian)
Currently translated at 3.3% (312 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/hu/
2024-08-26 23:03:52 +02:00
Ulices 254260a616 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-08-26 23:03:52 +02:00
Pferd O 45b13d513b Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:52 +02:00
CloverGit ba86c3ac75 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
YÜKSEL AÇIKGÖZ 19d4c31fcc Translated using Weblate (Turkish)
Currently translated at 59.4% (5470 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:52 +02:00
CloverGit 160f69d720 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 4fa42960e9 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 9c4ca6da14 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
Jan Straka c113385016 Translated using Weblate (Czech)
Currently translated at 83.8% (7710 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-08-26 23:03:52 +02:00
Henrik Kauhanen 68e37a93ec Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-08-26 23:03:52 +02:00
109247019824 9b158e70f5 Translated using Weblate (Bulgarian)
Currently translated at 7.6% (704 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/bg/
2024-08-26 23:03:52 +02:00
Free_squire ab536192c3 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:52 +02:00
Tokita, Hiroshi bc87b0db60 Translated using Weblate (Japanese)
Currently translated at 99.4% (9140 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-08-26 23:03:52 +02:00
ivit VT 981f82db93 Translated using Weblate (Czech)
Currently translated at 82.9% (7624 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-08-26 23:03:52 +02:00
CloverGit b6f5aeba1e Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 4fa34677ea Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:51 +02:00
Ulices c67346991f Translated using Weblate (Spanish (Mexico))
Currently translated at 99.6% (9165 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-08-26 23:03:51 +02:00
Laurens Holst 811de6a462 Translated using Weblate (Dutch)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-08-26 23:03:51 +02:00
YÜKSEL AÇIKGÖZ cfe7992723 Translated using Weblate (Turkish)
Currently translated at 59.3% (5456 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:51 +02:00
Pferd O 8c84f2ac23 Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
YÜKSEL AÇIKGÖZ fb23d62b6b Translated using Weblate (Turkish)
Currently translated at 58.5% (5383 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:51 +02:00
dsa-t 84f182ef03 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:51 +02:00
Ignas Brašiškis 987d151977 Translated using Weblate (Lithuanian)
Currently translated at 50.7% (4670 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/lt/
2024-08-26 23:03:51 +02:00
Toni Laiho c622da5fbf Translated using Weblate (Finnish)
Currently translated at 99.8% (9182 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-08-26 23:03:51 +02:00
Pferd O 19f163b724 Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
ZbeeGin 3fcf207443 Translated using Weblate (Polish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-08-26 23:03:51 +02:00
Pferd O 4814f29fbd Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
Alex Life 39f4ea5ffa Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:51 +02:00
tct123 5d08531ecb Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
Pferd O 4a0fdfd2ab Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
CloverGit c88aab3a4f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:51 +02:00
Seth Hillbrand bf4aebff4d Update Altium importer to use textbox flag
Textboxes in Altium might have intrinsic borders that don't count in
their text width, so we need to buffer this in KiCad

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

(cherry picked from commit ecd27883b6)
2024-08-26 14:02:35 -07:00
Alex Shvartzkop 39627bfcfa Parse more Altium data related to Text6.
(cherry picked from commit 881d0184bb)
2024-08-26 13:22:23 -07:00
jean-pierre charras 55fafe3401 Fix incorrect flip for graphic segments.
For some obscure reason, the end points of segments were swapped.
Note graphic RECTANGLE shapes have still an issue when flipped, but this
is a very different issue.
From master branch
2024-08-26 19:50:39 +02:00
jean-pierre charras dd870deec5 RENDER_SETTINGS: try a slightly modified dot calculation. 2024-08-25 17:18:30 +02:00
jean-pierre charras 7ecf18ba80 EEschema, print: fix incorrect sheet order and uninitialized sheet number
The displayed sheet number was not updated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18594
2024-08-25 16:14:43 +02:00
jean-pierre charras 68e4ccf196 RENDER_SETTINGS: fix issue when using dotted lines.
At some levels, these lines (drawn as dots) were not visible.
They are now drawn as short lines.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16757
2024-08-24 20:48:02 +02:00
jean-pierre charras 0a28398944 Gerbview: fix arc to segment approximation when drawing Regions (polygons)
The approx was 36 segments per 360 deg. But this is not good for arcs having
a small arc angle and a large radius.
The fix uses a max error (currently 5 microns) to calculate the approximation.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18587
2024-08-23 10:47:55 +02:00
jean-pierre charras 27002f568b BOARD::GetBoardPolygonOutlines(): Protect against malformed NPTH pads
In some cases, when modifying a pad (SMD -> NPTH from properties panel, one
can generate a NPTH pad with a zero sized hole. Pcbnew can crash with such a pad,
especially if the 3D viewer is shown during modification.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18585
2024-08-22 11:12:47 +02:00
Maciej Suminski 9b5840b7ee Text variable resolving in footprint text boxes
Mostly a code copy from PCB_TEXT::GetShownText() to
PCB_TEXTBOX::GetShownText().

Cherry-picked 5ad5be09 (sans m_ResolveTextRecursionDepth advanced
config, not present in 8.0).
2024-08-17 00:08:14 +00:00
Mark Roszko 5a3f8b4235 Disconnect events in ~ACTION_TOOLBAR 2024-08-16 07:13:39 -04:00
Mark Roszko 7be78d50a4 Unbind events in KISTATUSBAR destructor 2024-08-16 07:04:40 -04:00
Mark Roszko b1f861137e Add missing unbinds to STD_BITMAP_BUTTON 2024-08-16 07:04:35 -04:00
Mark Roszko 3e3a958d4f Add missing unbind to PANEL_KICAD_LAUNCHER 2024-08-16 07:04:30 -04:00
Mark Roszko cc5a3eb61f Disconnect events used in EDA_BASE_FRAME 2024-08-16 07:03:16 -04:00
Mark Roszko eabf2f57aa Don't see horizontal layout on the vertical toolbar
Wild glitching on arm64 Windows revealed this was set, lol.
2024-08-16 07:02:53 -04:00
Mark Roszko 1667b1312e Unbind the char events in KICAD_MANAGER_FRAME destructor 2024-08-16 07:02:15 -04:00
Mark Roszko 1123a25f04 unbind/disconnect in PROJECT_TREE_PANE destructor 2024-08-15 22:26:28 -04:00
Mark Roszko ef757ffd28 Unbind BITMAP_BUTTON events during destruct 2024-08-15 22:26:02 -04:00
JamesJCode f63d018f1c PNS: Use correct diff pair width / gap settings when starting route
(cherry picked from commit 364f6d4213)
2024-08-15 19:52:03 +01:00
Wayne Stambaugh 83de056de9 Fix missing schematic symbol instance data.
This fix adds missing symbol instance data that defaults the instance
data to no annotation which will will trigger a annotation request on
any operations that require a fully annotated schematic.

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

(cherry picked from commit 0cf1110367)
2024-08-15 07:31:25 -04:00
JamesJCode 015906d862 PNS: Include net when querying DRC for initial track width
(cherry picked from commit 67b9170146)
2024-08-15 09:09:06 +01:00
Jan Wichmann c288c469fb pcbnew: The checkbox 'Center on footprint' was not disabled when the actionButton was changed. 2024-08-14 21:40:18 +00:00
JamesJCode 7a8efc1d27 Report track clearance constraint from DRC rule if >= board minimum
(cherry picked from 013fa4824b)
2024-08-14 22:11:35 +01:00
JamesJCode aaaa8a8835 Use correct track width constraint when starting PNS from footprint
(cherry picked from a6a62b1be5)
2024-08-14 22:07:09 +01:00
JamesJCode 2891c580b1 Correctly handle track clearance constraints in router
(cherry picked from 72a0c41e3d)
2024-08-14 21:48:46 +01:00
Seth Hillbrand 97d75ae844 Remove last cherry-pick
Already existed in 8 branch.
2024-08-14 13:41:03 -07:00
Seth Hillbrand 7ccc89196b Avoid losing the last point when simplifying
line chains that are not closed should avoid simplifying between
beginning and end points.  Make sure that we keep the finishing point
for these chains

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

(cherry picked from commit b71eb1186f)
(cherry picked from commit 6ed537753c)
2024-08-14 13:05:40 -07:00
JamesJCode 7774145a8f Update message panel when placing a via with interactive router
(cherry picked from commit 41ff744f1e)
2024-08-14 17:40:19 +01:00
Kacper Słomiński 0bf2d2ca32 Fix build issue with experimental GCC version 15.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18539

(cherry picked from commit e6bcc6d0a6)
2024-08-14 07:48:02 -04:00
jean-pierre charras 6338a69f17 Pcbnew: fix 2 issues after removing a track, especially ending on a teardrop
- Message panel display not always correctly updated (shows an old data)
- Incorrect updated ratsnest is some cases when removing a track ending on
a teardrop.

From master branch.
2024-08-14 08:27:22 +02:00
Jeff Young 5f8ba6f9a1 Revert commit not meant for 8.0. 2024-08-13 21:30:20 -06:00
Jeff Young a53bbd92f5 Don't presume CreatePin/RepeatPin() return something.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18540

(cherry picked from commit 7c4fe35589)
2024-08-13 21:13:07 -06:00
Jeff Young aa71423d5f Fix missing parameter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18530

(cherry picked from commit 8a487c2c86)
2024-08-13 21:11:23 -06:00
Jeff Young f3ae7afec2 Set sheetpath for ERCE_MISSING_UNIT errors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18445

(cherry picked from commit 22d37f6c34)
2024-08-13 21:11:15 -06:00
Mark Roszko 29194761e5 Update vcpkg-configuration.json 2024-08-13 23:49:44 +00:00
Jon Evans f56c05ac3e Fix broken cherry-pick 2024-08-12 23:06:56 -04:00
Jon Evans 15256b379c Ensure constraints when changing pad hole properties
Also expose hole shape to properties system

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

(cherry picked from commit c9af2f318f)
2024-08-12 23:06:09 -04:00
Jon Evans b4113decc5 Fixes for snapping in free via placer
Support snapping to graphics at all
Don't skip snapping to pads with no net
Treat placing vias as placing tracks for magnetic settings

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


(cherry picked from commit 960a9ef7d5)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-08-13 02:49:34 +00:00
aris-kimi b249932888 Fixes cherry-pick for 2 previous commits 2024-08-11 21:54:18 +00:00
Jeff Young 6b6057b194 Clean up more exception processing in simulation GUI.
This allows us to more correctly report errors without
dialog issues, logs popping up, etc.

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

7f6ab7043b from master
2024-08-11 21:54:18 +00:00
aris-kimi b9623e9359 Fixes a crash when ctrl+x a kicad var from the field
and leave as a starting char '/'

Also fixes a typo and updates the wxFormBuilder file

e59417aff3 from master
2024-08-11 21:54:18 +00:00
Wayne Stambaugh 735b05ba30 Add '?' to list of forbidden file name characters.
(cherry picked from commit aace2271df)
2024-08-11 07:19:35 -04:00
jean-pierre charras 62724f9cb6 pcbnew, PCB_IO_ALTIUM_DESIGNER: fix issues when converting a lib to kicad format.
- add the patch from RigoLigoRLC
- fix issue with illegal chars in filename the char * was missing in list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18452
2024-08-11 09:30:22 +02:00
Wayne Stambaugh 2e4dd4bc3f Fix CLI PCB drill export when output path does not end with path separator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14438

(cherry picked from commit b6734c42f0)
2024-08-07 16:18:25 -04:00
jean-pierre charras 87139ce571 3E viewer: fix incorrect custom pad shape in some cases.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18495
2024-08-06 13:50:25 +02:00
jean-pierre charras 582d2e7bdb PCB_IO_GEDA: fix broken function GetEnumeratedFootprint().
The code was old and not updated to actual io code.
Just removed to use the generic code.
From master branch
2024-08-05 20:21:11 +02:00
Jeff Young 5c89937870 Make target length sticky within a session.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18109

(cherry picked from commit 937854c577)
2024-08-01 14:38:43 +01:00
Jeff Young 412e244d48 Text is a single-click-place.
Also, don't run normal undo code when in the middle of
placing an item.

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

(cherry picked from commit f6c723ba37)
2024-08-01 14:38:38 +01:00
jean-pierre charras 0940565025 DIALOG_SIM_MODEL: fix a focus issue (missing aEvent.Skip()).
From master branch.
2024-07-31 16:45:02 +02:00
jean-pierre charras c5b2e859c1 DRC test: Fix missing filter of DRCE_OVERLAPPING_FOOTPRINTS test.
When the DRCE_OVERLAPPING_FOOTPRINTS tests were disabled, the markers were
still created, because the code that created them did not test if the
DRCE_OVERLAPPING_FOOTPRINTS drc test is enabled or not.
From master branch
2024-07-30 14:21:36 +02:00
jean-pierre charras e06a8131c5 pcbnew: fix a bug when pasting a footprint (after a copy command)
The paste code removed items managed by the footprint when they are not on
an enabled layer.
This is a bug: all items must be kept in the parent footprint.
This is the only one command that tried to remove such items.
Other commands (Ctrl+D, load Footprint and read netlist) do not delete any item

Frm master branch
2024-07-28 20:08:18 +02:00
jean-pierre charras 16dee8608b DIALOG_FOOTPRINT_CHOOSER: fix some min sizes to avoid not visible widgets.
From master branch
2024-07-28 12:31:49 +02:00
Jeff Young 396e531e7c Cleanup. 2024-07-23 11:36:56 +01:00
Jeff Young 24c234fd93 Don't attempt to rename field more than once.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18330

(cherry picked from commit e9d376c912)
2024-07-23 11:36:56 +01:00
Jeff Young fdbe35e20c Give padstack warning violation a name.
Also regularises capitalisation & parens in some error
messages.

Also de-duplicates hole testing for PTH pads, and SMD
rationality testing.

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

(cherry picked from commit 8b948e7b9c)
2024-07-23 11:36:56 +01:00
Jeff Young cc3e3ee34c Clear fields when flag is set.
Also make sure we set aUpdated when deleting extra
text items or fields, and when updating fabrication
attributes or 3D models.

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

(cherry picked from commit dab3972165)
2024-07-23 11:36:56 +01:00
Jeff Young d0da1725ca Allow deleting text item out of parent footprint in PCB editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18425

(cherry picked from commit 87ee56b582)
2024-07-23 11:36:56 +01:00
Alex Shvartzkop 7e115249af Hide notification panel on focus loss.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17295
2024-07-22 13:33:08 +03:00
Jeff Young 07e8edfcdf Remove asserts for valid states.
(A pin won't have a connection until after the connection
graph has been rebuilt.)

KICAD-6S1

(cherry picked from commit c378e6f690)
2024-07-21 21:01:14 +01:00
Jeff Young cbb2c187bd Fix scoping of lock.
(cherry picked from commit d5c7ac5065)
2024-07-21 21:01:14 +01:00
Alex Shvartzkop 011018b002 Improve alignment of KiCad 16/24/32 px icons.
(cherry picked from commit 5b2ea411f8)
2024-07-21 21:29:42 +03:00
Alex Shvartzkop d3a44607e6 Generate hidpi variants for mid size (_24) application icons.
(cherry picked from commit 0e66adbca1)
2024-07-21 21:29:42 +03:00
Jeff Young 1ad3532740 Ooops. That commit wasn't for 8.0 (as the var doesn't exist there). 2024-07-21 13:40:14 +01:00
Jeff Young 26caad8b35 Tidy up string find API usages.
(cherry picked from commit bab97f91cc)
2024-07-21 13:40:14 +01:00
Alex Shvartzkop f1da2e90d7 Fix EasyEDA/JLCEDA Pro 2.2 footprint/symbol library import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18250

(cherry picked from commit 1613816e77)
2024-07-21 15:38:57 +03:00
Alex Shvartzkop 59492bd947 Add mutex include.
(cherry picked from commit cc96de29e6)
2024-07-21 15:26:58 +03:00
Jeff Young 7b96cc3d0c Hand-cherry-pick some fixes from master. 2024-07-21 13:22:01 +01:00
Jeff Young df873158bc Slight increase to round-off error tolerance.
(It's now 2nm, which is still significantly below the
clearance DRC epsilon of 500nm.  It's also what we
already use in EDA_SHAPE.)

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

(cherry picked from commit c8e8545e47)
2024-07-21 13:22:01 +01:00
Jeff Young f88e1aa279 Fix uninitialized variable.
(cherry picked from commit 1833330e5c)
2024-07-21 13:22:01 +01:00
Alex Shvartzkop a02f12c68a std::set::contains is C++20-only, use find instead. 2024-07-21 15:18:44 +03:00
Alex Shvartzkop cc141e346d Tweak GRID_CELL_STC_EDITOR offset on GTK.
(cherry picked from commit ab531a33d9)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop f5954b0d7d Fix some warnings.
(cherry picked from commit affcfed677)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop 6bb1e59e10 Improve grid cell editors appearance.
(cherry picked from commit 76b7cdd128)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop ced6b1cbb7 Improve custom grid cell editors' margins on MSW.
(cherry picked from commit 1516aaf163)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop d1d7d0eb05 Remove macOS size tweak in custom grid cell editors.
Since the text field now has the no-border flag, it shouldn't be needed.

(cherry picked from commit aa51cc5167)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop e1e196f1b1 Fix default cell alignment and FBP file for Configure Paths dialog.
(cherry picked from commit 49dcd5f4fc)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop b55d760cd5 Make grid cell editors with extra button consistent with normal text cell editors.
(cherry picked from commit 5d22c1adee)
2024-07-21 13:40:21 +03:00
Alex Shvartzkop b0a0408528 Create STATUS_TEXT_POPUP on demand when moving PCB items.
So we don't have to spend 115 ms destroying it.

(cherry picked from commit 8d7c60eb3e)
2024-07-21 13:31:45 +03:00
Alex Shvartzkop d238a149a6 Send data to correct sch port when changing selection in PCB editor.
Not that cross-probing works like this though.
But this prevents the UpdateAllLayersColor call.
(-356 ms in https://gitlab.com/kicad/code/kicad/-/issues/18148)

(cherry picked from commit e2b5f4559e)
2024-07-21 13:31:03 +03:00
Alex Shvartzkop 57d2f7209a Use std::set::contains instead of alg::contains in UpdateTeardrops.
(-356 ms on https://gitlab.com/kicad/code/kicad/-/issues/18148 when placing)

(cherry picked from commit 70296107b4)
2024-07-21 13:30:39 +03:00
Alex Shvartzkop 8d08992c24 Shut down curl operations before global cleanup.
Fixes KICAD-7DP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17103

(cherry picked from commit 0a53fc41a7)
2024-07-21 13:28:31 +03:00
Alex Shvartzkop 9938e7f723 Don't limit ngspice netlist lines to 1024 bytes.
Otherwise the loop just makes infinite 1-byte allocations
and keeps appending \n.

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

(cherry picked from commit a1b4e09cec)
2024-07-21 13:27:53 +03:00
Alex Shvartzkop 17ad578675 QA: add another test case for SHAPE_LINE_CHAIN::Slice.
This causes it to break on MSVC Release as well.

See https://gitlab.com/kicad/code/kicad/-/issues/18391

(cherry picked from commit 0e4ed5a032)
2024-07-21 13:25:57 +03:00
Alex Shvartzkop 044dd59c5c QA: add two more tests for SHAPE_LINE_CHAIN::Slice.
"Case 9: Start at middle of a 2nd arc, finish at end" should throw a fatal assert in Debug.

See https://gitlab.com/kicad/code/kicad/-/issues/18391

(cherry picked from commit 0b06ed987e)
2024-07-21 13:25:57 +03:00
Alex Shvartzkop 6ef90cfa18 Add bounds checking when slicing SHAPE_LINE_CHAIN from the middle of the last arc.
(and said arc is the last shape in the chain)

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

(cherry picked from commit 63eac0382c)
2024-07-21 13:24:17 +03:00
Jeff Young 7abf4c2d91 Save visible columns to correct settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18352

(cherry picked from commit 22321c93f0)
2024-07-21 11:16:57 +01:00
Jeff Young 896ff72019 Formatting.
(cherry picked from commit 8ae111bd82)
2024-07-21 11:16:57 +01:00
jean-pierre charras 9c2eeb54fc Ensure non handled text properties are never written in .kicad_pcb files
ctl_flags.h: fix two duplicate flag values.
From master branch
2024-07-21 08:46:44 +02:00
jean-pierre charras 69f583660f Move all CTL_OMIT_xxx flags definitions into a new file ctl_flags.h
Previously, they were defined in different files, and sometimes redefined.
This change should not create an actual code change.
However, this move shows there are the same value used for different flags,
so another fix should be made later.

From master branch
2024-07-21 08:46:44 +02:00
Mark Roszko 6334c733e1 Update 2 files
- /vcpkg-configuration.json
- /vcpkg.json
2024-07-21 01:19:06 +00:00
Mathieu Pilato a50144f889 Fix measurement format not saved when modified
Always update stored measurements name / format when updating measurement

(cherry picked from commit c8aa3f21aa)
2024-07-20 21:52:05 +01:00
Mathieu Pilato 1ed85d521d Move default format inside SPICE_VALUE_FORMAT
This ensures that the default format is the same, however the measurements are added

(cherry picked from commit 75141da53a)
2024-07-20 21:52:01 +01:00
Mathieu Pilato 793790b359 Fix spice errors when rerunning a simulation with measurements
Mark the simulation as not finished before starting it, preventing measurements from being requested
from spice right before simulation starts

(cherry picked from commit a5b7c65d7a)
2024-07-20 21:51:58 +01:00
Mathieu Pilato 154112d4cc Clear measurement grid while changing tab
Prevent a tab change while editing measurement from impacting measurements of target tab

(cherry picked from commit 98b4a58059)
2024-07-20 21:51:54 +01:00
Mathieu Pilato 97d8ddeb4f Fix measurements not being loaded with workbook
onPlotChanging() was overwriting loaded measurements. Do not read grid from onPlotChanging().

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

(cherry picked from commit c6e8838178)
2024-07-20 21:51:51 +01:00
Mathieu Pilato 4809b00206 Increase default measurement precision to 3 digits
(cherry picked from commit 414ac2b83c)
2024-07-20 21:51:47 +01:00
Jeff Young 5bc1040a8b Fix missing From_UTF8().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18406

(cherry picked from commit 756445dd19)
2024-07-20 21:26:52 +01:00
Jeff Young f6c8dbe81e Fix RecombinePad when pad is rotated.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18348

(cherry picked from commit 556efd836b)
2024-07-20 21:26:52 +01:00
Jeff Young 0280989920 Undo for Repeat Pin.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18261

(cherry picked from commit 0b4d0bcb6c)
2024-07-20 21:26:52 +01:00
Jeff Young 0b762fb804 Show footprint change/update immediately.
Also, don't deselect selected footprints.

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

(cherry picked from commit e450258c0f)
2024-07-20 21:26:52 +01:00
Seth Hillbrand b71eb1186f Avoid losing the last point when simplifying
line chains that are not closed should avoid simplifying between
beginning and end points.  Make sure that we keep the finishing point
for these chains

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18409
2024-07-20 13:02:01 -07:00
Seth Hillbrand c78273cb99 Avoid throwing spurious substitution warnings
If the original font is a bold singleton (not a mod on a face), then we
need to avoid the mismatch between the bold marker and the asked-for
boldness.

At the end, if the font name is the same within case differences, then
it is the same font and we should not warn

(cherry picked from commit 0f84ddaf39)
2024-07-20 11:41:44 -07:00
Seth Hillbrand 26b8978b3e Fix potentially incorrect libid when using save as
If you use save as into a different library and change the symbol name
while overwriting an existing symbol, the libid didn't get updated,
leading to an error message when trying to load the newly saved symbol.

(cherry picked from commit b38357a5ea)
2024-07-20 11:41:44 -07:00
Jon Evans 618bbfda8d Support SWIG 4.1
(cherry picked from commit 58a2159fa9)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-07-19 22:49:52 +00:00
JamesJCode ee573a1480 Remove unnecessary erase of netclasses from netclass map
We start from an empty map now, so no need to delete entries
individually

(Cherry-picked from 90304e0639)
2024-07-16 20:37:22 +01:00
JamesJCode 20efc3b6e6 Resolve netclasses on vector buses embedded in buses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16545

(Cherry-picked from 924b027503)
2024-07-16 19:57:54 +01:00
JamesJCode 8632e74c5c Update BOARD_LISTENERs after calculating connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18277
(For v8)
2024-07-16 19:57:54 +01:00
Wayne Stambaugh 6f35fd7058 Begin version 8.0.5 development. 2024-07-16 14:42:07 -04:00
Wayne Stambaugh 761bfcd291 Tag stable version 8.0.4. 2024-07-16 14:39:53 -04:00
Seth Hillbrand 7663928a66 Update translations 2024-07-16 11:00:39 -07:00
boromyr dd3c846f4a Translated using Weblate (Italian)
Currently translated at 99.9% (9191 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-16 20:00:06 +02:00
CloverGit 6877bc32bc Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
Jan Straka 64564825c7 Translated using Weblate (Czech)
Currently translated at 82.8% (7616 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-07-16 20:00:06 +02:00
CloverGit b1ec1011b6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
Toni Laiho 80539790c3 Translated using Weblate (Finnish)
Currently translated at 99.8% (9181 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-16 20:00:06 +02:00
CloverGit 981772887a Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
dsa-t 896b80652f Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-16 20:00:06 +02:00
Wellington Terumi Uemura 968cf4267a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-07-16 20:00:06 +02:00
jean-pierre charras f3567cda99 Pcbnew, Properties panel: mask 2 properties irrelevant for pcb fields.
Color and Hyperlink properties have no meaning for pcb fields, but if set
created unreadable .kicad_pcb files.

From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18368
2024-07-14 14:06:29 +02:00
Seth Hillbrand df372baff8 Update translations 2024-07-11 09:41:19 -07:00
dsa-t dec96e6a77 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
alevtina-karashokova 8a1de8c6f8 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
dsa-t 255975f5fd Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
Toni Laiho aa608ca147 Translated using Weblate (Finnish)
Currently translated at 99.8% (9181 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-10 23:46:07 +02:00
Seth Hillbrand 682b74f7d2 Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-10 23:46:06 +02:00
JamesJCode d662b2c34b Fix tuning pattern moves and undo / redo
(Cherry-picked from 230c297691)
2024-07-09 15:23:02 +01:00
Seth Hillbrand 7740c66479 Update translations 2024-07-08 09:55:01 -07:00
Seth Hillbrand 4d4f6a810c Properly count multiple Altium version settings
There is a fair amount of gradation in different Altium products

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

(cherry picked from commit 6aaaaad37f)
2024-07-08 09:54:46 -07:00
alevtina-karashokova d74dca3a7a Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:38 +02:00
Wellington Terumi Uemura 6513ca9168 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-07-08 18:53:37 +02:00
aris-kimi 6782bb73bd Translated using Weblate (Greek)
Currently translated at 99.8% (9177 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-07-08 18:53:37 +02:00
CloverGit 9c35689b04 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-08 18:53:37 +02:00
Ulices 8aff7cad17 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9154 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-07-08 18:53:37 +02:00
Henrik Kauhanen c2c6cad525 Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-07-08 18:53:37 +02:00
alevtina-karashokova 9b17ec5d2d Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:37 +02:00
CloverGit e971f90adc Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9158 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-08 18:53:37 +02:00
ZbeeGin 06c61a4831 Translated using Weblate (Polish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-07-08 18:53:37 +02:00
Laurens Holst 7977f0f745 Translated using Weblate (Dutch)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-07-08 18:53:37 +02:00
Seth Hillbrand 38a2b8eba7 Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-08 18:53:37 +02:00
Marco Ciampa 951f0065ed Translated using Weblate (Italian)
Currently translated at 99.9% (9191 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-08 18:53:37 +02:00
Bahtiyar Bayram 22c06c7ed8 Translated using Weblate (Turkish)
Currently translated at 57.3% (5269 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-07-08 18:53:37 +02:00
dsa-t 4f086271aa Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:37 +02:00
ZbeeGin 297999cb43 Translated using Weblate (Polish)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-07-08 18:53:37 +02:00
Arnau Llovet Vidal 91aec9ac7f Translated using Weblate (Catalan)
Currently translated at 47.3% (4354 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ca/
2024-07-08 18:53:37 +02:00
jean-pierre charras 9105b380c3 Fix compil issue created by my commit b2f8a43c (Windows only) 2024-07-07 15:39:42 +02:00
jean-pierre charras a285f86240 French translation update 2024-07-07 13:23:25 +02:00
jean-pierre charras b2f8a43c24 DIALOG_USER_DEFINED_SIGNALS: workaround to solve an issue on Windows.
See: https://gitlab.com/kicad/code/kicad/-/issues/15837
This is not a fix, but a workaround to make this dialog usable on Windows.
Without this workaround, it is barely possible to edit a user signal name.
The root cause needs to be fixed.
From master branch
2024-07-07 13:22:33 +02:00
Wayne Stambaugh 8383165269 Tag stable version 8.0.4 release candidate 2. 2024-07-01 16:20:03 -04:00
Seth Hillbrand bc8af77aba Fix docs redirect for v8 2024-07-01 12:57:57 -07:00
Seth Hillbrand 7d0e1670ee Update translations 2024-07-01 10:55:23 -07:00
jean-pierre charras 877f7daa2b do not flag an empty string as translatable.
(cherry picked from commit 1c9e96c89a)
2024-07-01 10:55:09 -07:00
Seth Hillbrand 4c563e5ef3 Update translations 2024-07-01 10:53:10 -07:00
Seth Hillbrand d6d6075a60 Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-01 19:21:15 +02:00
Pferd O 49c528f3ef Translated using Weblate (German)
Currently translated at 99.6% (9158 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-01 19:21:15 +02:00
Henrik Kauhanen ae1bccfb85 Translated using Weblate (Swedish)
Currently translated at 99.9% (9191 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-07-01 19:21:15 +02:00
dsa-t c2c13a5226 Translated using Weblate (Russian)
Currently translated at 100.0% (9193 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-01 19:21:15 +02:00
Toni Laiho 5b2e0d113a Translated using Weblate (Finnish)
Currently translated at 99.8% (9177 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-01 19:21:15 +02:00
dsa-t 7ee8f786f2 Don't try to clear empty bitmap cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18310


(cherry picked from commit e5a5b59ac1)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-07-01 15:23:55 +00:00
Alex Shvartzkop bd14224b42 QA: remove 8.99 files for issue17967. 2024-07-01 14:47:38 +03:00
Seth Hillbrand ccfec170b0 Modify some int32 ops to avoid potential overflow
(cherry picked from commit f48a105357)
2024-07-01 14:30:43 +03:00
Seth Hillbrand 9852b535e7 Fix nl.po from bad merge 2024-06-30 11:16:44 -07:00
jean-pierre charras 758ac90069 SIMULATOR_FRAME_UI: catch all nlohmann::json::xxx errors.
Previously, only nlohmann::json::type_error was captured, and other errors
were not handled, creating unhandled exception issue when reading broken
*.wks files.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18309
2024-06-30 18:51:31 +02:00
Alex Shvartzkop 697ff382f8 Fix edit point ordering for arcs in symbol editor.
Was fixed for SCH_SHAPE in f6994702aa
but 8.0 uses LIB_SHAPE for symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18307
2024-06-30 18:07:53 +03:00
jean-pierre charras 6b6aa84158 French translation update 2024-06-30 09:06:42 +02:00
Marco Ciampa a0d219c2d1 Updated Italian translation 2024-06-30 01:11:36 +02:00
Seth Hillbrand 8af1af7f76 Update translations 2024-06-29 12:41:36 -07:00
Jan Straka 991d5812e2 Translated using Weblate (Czech)
Currently translated at 82.8% (7605 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:37:14 -07:00
김랑기 b019ce4515 Translated using Weblate (Korean)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:14 -07:00
김랑기 168a1b3e75 Translated using Weblate (Korean)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:13 -07:00
김랑기 e8a6e579e4 Translated using Weblate (Korean)
Currently translated at 99.9% (9174 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:12 -07:00
aris-kimi f2b1422ed5 Translated using Weblate (Greek)
Currently translated at 99.9% (9176 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-06-29 12:37:00 -07:00
Jan Straka 63f4d45665 Translated using Weblate (Czech)
Currently translated at 82.1% (7543 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
ivit VT 96ab1e47c9 Translated using Weblate (Czech)
Currently translated at 81.5% (7490 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
ivit VT 4d69d966ee Translated using Weblate (Czech)
Currently translated at 81.4% (7481 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
pominglee e9294bee9e Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (9162 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-06-29 12:36:49 -07:00
CloverGit d2b052b12c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-06-29 12:36:37 -07:00
Pferd O 34f0a97cca Translated using Weblate (German)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-29 12:35:33 -07:00
Laurens Holst ad5ca38cc2 Translated using Weblate (Dutch)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-06-29 12:35:06 -07:00
Nguyễn Ngọc Khánh 58bd7f3b24 Translated using Weblate (Vietnamese)
Currently translated at 21.7% (2000 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-29 12:34:38 -07:00
Jan Straka 5b2b4832d4 Translated using Weblate (Czech)
Currently translated at 81.1% (7452 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:34:36 -07:00
Nguyen Van Dien a3618cbfeb Translated using Weblate (Vietnamese)
Currently translated at 21.7% (1994 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-29 12:34:10 -07:00
Seth Hillbrand 8c6edc0414 Fix via layer test for DXF plotting
Vias might have their primary layer set to a single layer but cross
multiple layers that should be included when plotting

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

(cherry picked from commit 64c36e8bda)
2024-06-29 12:25:15 -07:00
Seth Hillbrand 1308fd7c4a Altium import
- Handle intermediate Altium version with some fields but not others
- Ensure that we are properly moving text that is not a box and not a
  field

(cherry picked from commit 9aba808366)
2024-06-29 12:19:25 -07:00
Seth Hillbrand b241e09914 Don't knock out anti-text box
Knockout text should only prevent filling directly around the text
itself, not the larger anti-text fill around it.  This prevents minimum
width provisions from kicking in unneccesarily

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

(cherry picked from commit a12bc3a410)
2024-06-29 12:18:54 -07:00
Seth Hillbrand 0a29c0dea3 Fixup Altium import rectangle handling
Ensure we have positive sizes
Keep rectangles when rotating by multiples of 90

(cherry picked from commit d033f93d89)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 8832b22952 Fixup for Altium pad/fill importer
The previous commit merged pads with copper areas.  This was appealing
but broke when the pad and the area were meant to have different
size/shape technical layers.  Small pads = Small paste.  Instead, we do
not merge the pads but we assign them to have the appropriate nets in
KiCad, allowing the same effective result but keeping the technical
layers correct

(cherry picked from commit 51eb7aa5b5)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 33b93a3824 Altium import: handle polygons on copper
In Altium, copper polys will be connected automatically to their
associated pads.  In KiCad, we need to do the equivalent when parsing,
which is to combine the joining copper into the underlying pad.  We also
don't want to treat copper polys as proxy pads without the original
anymore.

(cherry picked from commit 7102d9f72a)
2024-06-29 12:17:53 -07:00
Seth Hillbrand b589da63d8 Cleanup Altium text import
Handle inverted text
Correct location for flags
Add mechanics to detect inverted_rect (like text boxes)

(cherry picked from commit b11e030f8f)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 48077d77c4 Altium: Handle textboxes
Also, corrects a minor issue with the text width calculation where
Altium calculates centerline to centerline but KiCad text heights are to
the edge of the stroke font.  Need to still do better adjustments for
the various altium stroke fonts

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

(cherry picked from commit 7e561acf53)
2024-06-29 12:17:53 -07:00
Alex Shvartzkop a605c4b6ff Disable hidpi cursors on GTK and OSX.
wxCursor scale factors won't be supported before wx 3.3.
MSW doesn't scale cursors, so it works as expected there.

(cherry picked from commit e3e63fb1b8)
2024-06-29 21:43:47 +03:00
Seth Hillbrand 092ce30b40 Altium: Handle footprint vias
These are treated as pads in KiCad

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

(cherry picked from commit 7ea013b96c)
2024-06-29 11:38:36 -07:00
Seth Hillbrand 28eb6dab97 Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

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

(cherry picked from commit 5f16c5892c)
2024-06-29 11:26:03 -07:00
Seth Hillbrand fb82130530 Fixup cherry-picks for v8 2024-06-29 11:22:11 -07:00
Seth Hillbrand a3d218ffbc Fixup arc check in dp coupled
Handle arcs starting at candidate end point.
Fix total arc size

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

(cherry picked from commit 015b93b474)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 471f72a340 Handle arcs dp coupling
Calculate coupled arcs and spacing

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

(cherry picked from commit 75ab3d9e8b)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 2abbc601a0 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

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

(cherry picked from commit ab0426d620)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 522f1c7bea Ensure nets are referenced to main board
We set new elements to the temporary board's netlist.  These need to be
updated when moving the fooprint to the main board

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

(cherry picked from commit 54efd32f7a)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 828f32649f Hookup footprint reload to redraw icon
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7195

(cherry picked from commit 6537f9fa15)
2024-06-29 11:22:11 -07:00
Seth Hillbrand b39b54a92e Fallback to scientific notation when fixed-point is long
Fixed point output can create arbitrarily long string representations of
floating points.  When this happens, we would like to just represent the
scientific notation to a limited precision

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

(cherry picked from commit 24f02e72d0)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 6a55a47276 Subtract all holes in board area calc
When we say "Subtract holes from board area", we should also subtract
those holes in pads and vias

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

(cherry picked from commit 91f6c534b9)
2024-06-29 11:22:11 -07:00
Wayne Stambaugh 648d463b32 Tag stable version 8.0.4 release candidate 1. 2024-06-29 11:58:56 -04:00
Seth Hillbrand 489f345fb2 ADDED: Handle PIECHART in Altium import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16895

(cherry picked from commit 5bd94f118d)
2024-06-29 08:05:04 -07:00
Seth Hillbrand e308d65108 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

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

(cherry picked from commit 416033e8e5)
2024-06-29 08:02:57 -07:00
Seth Hillbrand ee0be76fb4 Don't list IPC-2581 import
We don't currently support importing 2581 files.  We need to clear
IO_FILE_DESC to prevent this from accidentally showing

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

(cherry picked from commit eeee63186d)
2024-06-29 08:02:27 -07:00
Seth Hillbrand 813fce2d2d Fully expand all text variables in 3d output
We were doing half of the job but we need to get the board variables as
well

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

(cherry picked from commit 79166510e9)
2024-06-29 08:01:33 -07:00
Frank Muenstermann e0a27b430a kicad-cli: The --precision parameter was not recognized, if unit was inch, the export crashed
(Cherry-picked from 63d828d5ff)
2024-06-29 03:43:06 +01:00
Ian McInerney 73b2180c06 Take footprint edge cuts into account in the board statistics
Reported in https://gitlab.com/kicad/code/kicad/-/issues/18245

(Cherry-picked from 10988478da)
2024-06-29 03:27:42 +01:00
Ian McInerney b3f53ac862 Always include footprint edgecuts in board edge bounding box
The footprint edgecuts should always be part of the board edge bounding
box, even if the layer the footprint is on is hidden from view.

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

(Cherry-picked from 672d2c6af8)
2024-06-29 03:27:14 +01:00
Ian McInerney 9b49fc5a0d Display unit name in symbol context menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18285

(Cherry-picked from cc81ccf79a)
2024-06-29 02:16:26 +01:00
Jeff Young 03c71b22d5 Improve consistency of clearance line painting.
Showing the clearance area is not obvious as the clearance
extends from the pad on flashed copper layers and from the
hole on non-flashed copper layers.  Because of this, we
choose to not display clearance lines at all on non-copper
active layers as it's not clear which we'd be displaying.

We follow the same rule for tracks for consistency (even
though they don't have the same issue).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18287
2024-06-28 21:46:49 +01:00
Jeff Young 7d79bebcc6 Don't overload error dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18195

(cherry picked from commit 441da8dfb6)
2024-06-28 20:59:29 +01:00
Jeff Young 5c2300022b Don't flip alignment of non-side-specific text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18235

(cherry picked from commit 0040c290ed)
2024-06-28 20:58:47 +01:00
jean-pierre charras 91b042990f footprint selector in symbol properties: fix footprint selection issue.
When using the button to select a footprint using the footprint chooser
dialog, the new footprint was not always taken in account (perhaps MSW specific).
It was due to the code to update the footprint name was between Disable() and
Enable, thus creating a loss of some events in the complex grid edition stuff.
This is now replaced by a lock flag to protect this code to be executed when
it should not.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18270
2024-06-27 20:07:38 +02:00
Jeff Young 265e2d61be Clear timestamp when clearing cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913

(cherry picked from commit 5a9b681009)
2024-06-25 13:56:33 +01:00
Jeff Young df3924421d enclosedByArea test for zone needs to be outline-based.
(Otherwise it's order-specific when filling, which
is pretty unpredictable.)

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

(cherry picked from commit 5ba2896968)
2024-06-25 13:55:51 +01:00
Jeff Young 4ee2a007eb Hidden footprint libraries are not yet supported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18183

(cherry picked from commit b7161181e8)
2024-06-25 13:54:56 +01:00
Jeff Young b19a47fa2a Performance for large hierarchies: ERC
Share constructs between ERC tests.

Large SCH_SHEET_LISTs, in particular, can be very
expensive to construct.

(cherry picked from commit 68fbe98b1d)
2024-06-25 13:34:49 +01:00
jean-pierre charras 7f3ca3b889 Gerber plots: Ensure reserved chars are not used in Gerber field strings.
In gerber fields, reserved chars (,*%) must be replaced, because they are separators.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18275
2024-06-25 11:26:03 +02:00
Seth Hillbrand a3d64d604c Silence font replace warnings for libs
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive

(cherry picked from commit 11c6164934)
2024-06-24 12:01:30 -07:00
Alex Shvartzkop 006f0a95c1 Optimize testCourtyardClearances when moving footprints (33%->0.69%)
Check bounding boxes without hidden text first before trying to check courtyards.

See https://gitlab.com/kicad/code/kicad/-/issues/18148

(cherry picked from commit 4bf8ed32cd)
2024-06-24 06:44:28 +03:00
Alex Shvartzkop 6afd865259 Optimize testCourtyardClearances when moving a board.
CPU usage: 86% -> 33%

See https://gitlab.com/kicad/code/kicad/-/issues/18148

(cherry picked from commit dc56364cf2)
2024-06-24 02:03:33 +03:00
Alex Shvartzkop d319cd4b89 Improve error message when trying to Open non-KiCad schematic files.
See https://gitlab.com/kicad/code/kicad/-/issues/18241
2024-06-22 20:35:23 +03:00
Wayne Stambaugh 566fefafc5 Fix Eagle schematic importer incorrect symbol value field and visibility.
Also fix a crash if an XML_PARSER_ERROR exception is thrown when importing
Eagle symbol libraries.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18232
2024-06-22 12:22:03 -04:00
Seth Hillbrand 66bd0f850a Allow NIC pins to be stacked
Previously, we only allowed pins of the same time as well as passive
pins to be stacked.  This change allows NIC pins as well since they are
not internally connected, there is no reason that they cannot be tied to
another pin electrically

(cherry picked from commit 0e0ada8e4e)
2024-06-22 08:12:51 -07:00
Alex Shvartzkop 491bb6e57a Altium schematic import: fix power port styles.
Need to use the symbol name with style, like "VCC_CIRCLE", not "VCC".

Issue was introduced in d939004bbd

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18209
2024-06-22 06:58:41 +03:00
dsa-t 4fe74a9870 Fix arc edit points ordering in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18254


(cherry picked from commit f6994702aa)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-22 03:20:02 +00:00
Seth Hillbrand 8f03f7c367 Allow non-identical schematic/pcb nets
The schematic net names are fully unique but if we have multiple pads
that are mapped to a NC pin, they need to have unique net names so that
they do not get connected to each other in the ratsnest.  This breaks
the schematic parity check as we have modified the netname for some
pads.  To work around this, we first maintain the zero-th net without
suffix and then add an additional check in DRC to ensure that we allow
unconnected nets as long as the share a common prefix with the schematic
netname.

(cherry picked from commit f61d400d88)
2024-06-21 12:26:23 -07:00
Seth Hillbrand 7f690d596b Resolve worksheet variables in SCH_FIELD
Sheet fields should also resolve the worksheet of that sheet and not the
parent sheet

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

(cherry picked from commit 6540c3ec9f)
2024-06-21 10:31:11 -07:00
Mark Roszko be4c2715ab Don't use message as part of the assert dedup
kimath overflow can generate thousands of unique messages in one run lolol


(cherry picked from commit acec5552c0)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-06-21 11:20:17 +00:00
Seth Hillbrand 02f8260e18 Clean git conflict markers 2024-06-20 09:25:04 -07:00
Seth Hillbrand a8871fdda4 Fix cherry-pick for v8 2024-06-20 09:13:12 -07:00
Alex Shvartzkop d552ce00aa Optimize redrawNetnames.
Using RTree is slower in this case.

RTree: 25 ms when moving cursor
This method: 5 ms when panning/zooming

(cherry picked from commit 62fb5697b4)
2024-06-20 18:49:32 +03:00
Alex Shvartzkop 37dd7c6df9 Backport BOX2I_MINMAX. 2024-06-20 18:49:32 +03:00
Alex Shvartzkop a5cbcd4abe Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.

(cherry picked from commit f5be388acd)
2024-06-20 18:49:32 +03:00
Alex Shvartzkop 4ede6f61b2 Fix build errors introduced in 994c1c971a 2024-06-20 18:37:39 +03:00
Seth Hillbrand 994c1c971a Respect schematic settings for hidden pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17941

(cherry picked from commit b8ccaae403)
2024-06-19 18:07:52 -07:00
Alex Shvartzkop ebdfeb4c0a Fix crash in wxSocketBase when the event handler has been destroyed.
Fixes KICAD-37B
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18234
2024-06-19 00:49:53 +03:00
Jon Evans e1ffd956e6 Try harder to keep searchable text hidden in SVG exports 2024-06-18 11:59:46 -04:00
Jeff Young 3f4dc01d97 Don't report reasonable solder mask bridges in a net-tie footprint.
(cherry picked from commit eae85742cc)
2024-06-15 16:56:12 +01:00
Jeff Young be192d5df0 Check mask apertures on the mask layer.
(Otherwise testing A:B and B:A will add items to the
m_maskApertureNetMap cache on different layers.)

(cherry picked from commit 8cddd40fc9)
2024-06-15 16:47:41 +01:00
Jeff Young efc35dec74 Footprint Editor doesn't have nets.
(Copper shapes, on the other hand, can.  Since we use
GetItemDescription() to report DRC errors and the like,
it's better to have it report the net even when it's
<no net>.)

(cherry picked from commit b2588e0bbf)
2024-06-15 16:47:35 +01:00
jean-pierre charras 096566e857 Schematic editor: fix some issues that can crash the editor on closing.
- Add a test to be sure a SCHEMATIC exists before trying to use it
- Delete items in Repeat list and undo/redo list before deleting the schematic
- Delete also these items when loading a new schematic (the repeat list was
not cleaned previously)
( include qa compatibility from master )
Before these fixes I saw a use after delete issue due to dangling pointers
stored in Repeat list.
From master branch
2024-06-15 09:22:02 +02:00
Jeff Young 944ee4af7d Normalize phase angles. 2024-06-14 19:01:37 +01:00
Jeff Young 245894e8eb Pull netname bug fixes and performance improvements back from master. 2024-06-14 19:01:37 +01:00
Jeff Young 74abb40e84 Don't lose value of cursor checkboxes when running sim.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit c633ac26eb)
2024-06-14 19:01:37 +01:00
Jeff Young 1eb2983efe Don't assume AC gains will always be voltages.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 4eb048bba2)
2024-06-14 19:01:37 +01:00
Jeff Young 63b3e0cc4f Correctly write phase/gain signals to workbook.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 300313ce73)
2024-06-14 19:01:37 +01:00
Jeff Young a8b127019c Don't use SI prefixes with degrees when auto-ranging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 5a3bad51d0)
2024-06-14 19:01:37 +01:00
Jeff Young 4d0ca33b47 Current gain is the first Y axis, not the second.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 7b63429fe1)
2024-06-14 19:01:37 +01:00
JamesJCode e2c53df13b Fix shadowed variable warning 2024-06-12 08:13:40 +01:00
Wayne Stambaugh 03dd6c7a8e Clear parent symbol references when flattening derived library symbols.
Broken parent symbols could lead to invalid return values and flattened
library symbols cannot be derived from a parent symbol.

(cherry picked from commit 360d185e3b)
2024-06-10 16:14:54 -04:00
JamesJCode bdd5a752dc Don't re-add deleted netclass assignments in incremental connectivity
Ensures that if moving or deleting a netclass directive label, the
netclass on the previously-assigned net doesn't have the stale
netclass re-applied.

Cherry-picked from 0826c10a20

(Along with prior connectivity cherry-pick...)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18173
2024-06-10 20:40:20 +01:00
JamesJCode 8dbdc3717c Eeschema: Only assign nets with resolved netclasses to the label map
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.

Cherry-picked from 9e1a5eb1bd
2024-06-10 20:31:35 +01:00
Alex Shvartzkop f60b76696a Cairo GAL: improve alignment between arcs and segments and of odd-width lines. 2024-06-10 21:21:13 +03:00
dsa-t 695505fc71 Fix build error caused by commit 82c2bda52b.
(cherry picked from commit 012d3f098f)

Co-authored-by: Wayne Stambaugh <stambaughw@gmail.com>
2024-06-10 15:02:21 +00:00
Alex Shvartzkop b34dbf58c5 Altium PCB import: don't add thickness to Solid style fills. 2024-06-10 17:32:52 +03:00
Alex Shvartzkop 1fb19c0d81 Altium PCB import: make sure Polygon fill is contained within the outline. 2024-06-10 17:19:43 +03:00
Jeff Young d6162196ec Fix KeepUpright settings in Eagle gold files.
(cherry picked from commit aa1fb0604a)
2024-06-09 23:47:00 +01:00
Alex Shvartzkop 3ea314cb9f Altium PCB import: avoid integer overflows when rotating rectangular fills.
Fixes artifacts seen in https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-10 01:00:57 +03:00
Jeff Young 9d51fabe9b Don't default KeepUpright to true in Eagle importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18175
2024-06-09 22:17:39 +01:00
Alex Shvartzkop c6b483acb9 QA: update golden data for Altium "Tracks" PcbLib. 2024-06-09 23:01:26 +03:00
Alex Shvartzkop 96370f6665 Make sure to add start points to arcs in TransformOvalToPolygon.
Otherwise the long line segments can be non-parallel to the centerline.

This was the root cause of the slowdown in https://gitlab.com/kicad/code/kicad/-/issues/18156

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

(cherry picked from commit 76b2741a92)
2024-06-09 22:49:58 +03:00
Alex Shvartzkop ad7bd9b5f8 Revert "Pcbnew, Altium import: Fix issues with hatched zones."
This removed the hatch fill import functionality,
and is no longer needed now that the root cause was found.

This reverts commit 616510aca2.

(cherry picked from commit 80b7f5fcbf)
2024-06-09 22:49:58 +03:00
jean-pierre charras 2a1ef2d09d Pcbnew, Altium import: Fix issues with hatched zones.
- Filled zones using the hatch pattern cannot use the primitives from Altium.
the filled shapes must be rebuilt.
_ Filled zones using the hatch pattern with a very small gap are now converted
to a polygon pattern. Otherwise the calculation time can be very big.

From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-09 15:56:57 +02:00
Seth Hillbrand 9f9fa0dd8d Avoid referencing parents after deletion
We look at the parent when deleting EDA_ITEMs but when clearing the test
sheet, we delete the sheet before the pin, causing a use-after-free.
Avoid this by setting parents to null in this case

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

(cherry picked from commit b2e0c2606f)
2024-06-09 13:27:34 +01:00
Seth Hillbrand 6ecfa65c4c Free item memory when closing schematic window
This fires the dtor for each item on the screen, allowing us to properly
close and remove them from the connection graph

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

(cherry picked from commit 9fbda137cb)
2024-06-08 22:16:41 +01:00
Petri Hodju 831d438852 remove item from schematic's connection graph on destruction
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17961

(cherry picked from commit 4920c6b00b)
2024-06-08 22:14:39 +01:00
Jeff Young a9b5b1728a Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
2024-06-07 23:06:19 +01:00
Jeff Young d304a30155 Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.

(cherry picked from commit 758974f5aa)
2024-06-07 18:03:45 +01:00
Jeff Young 02ca96df48 No need to mapCoords when everything is in same coord system.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18172
2024-06-07 18:00:41 +01:00
Jeff Young 5ca3414707 Performance for large hierarchies: lookups
Don't bother to sort sheet lists when we're just looking
up a UUID, sheet count, other symbol units, etc.

(cherry picked from commit e543ff0578)
2024-06-07 18:00:41 +01:00
Seth Hillbrand 76a68b1f8d Add missing IsMandatory() fn 2024-06-07 09:58:54 -07:00
Seth Hillbrand 41ebd3c560 Do not allow trailing/leading whitespace in mandatory fields
Reference, Value, Footprint and Datasheet all reference elements that
should not use trailing/leading whitespace or similar hidden charaters.
Other fields may utilize leading/trailing whitespace for obscure
purposes but won't break functionality as they are display only

(cherry picked from commit 6dcb9bb664)
2024-06-07 08:13:34 -07:00
Mark Roszko fbc75656f4 Move vcpkg to wx 3.2.5
(cherry picked from commit ba65231f6b)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-06-07 00:34:00 +00:00
JamesJCode b882defb28 Update connectivity for SCH_LABELs if netclass field changed
Required for https://gitlab.com/kicad/code/kicad/-/issues/17797 fix
in 8.0. This was fixed in the rule area work in 8.99 but not
cherry-picked as it was wrapped up in the wider changes / bugfixes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17797
2024-06-06 08:16:15 +01:00
Seth Hillbrand 7d7decafd4 Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

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

Cherry-picked from 5f16c5892c
2024-06-06 07:59:30 +01:00
Mike Williams 8705bea9ab Symbol Fields Table: better handle variable fields with attributes
Attributes need to be checked first since we do some internally hackery
to make the checkboxes work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18005
2024-06-05 13:02:40 -04:00
Jon Evans 64da49f22e Remove extraneous cache fill per row
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18159
2024-06-05 12:08:08 -04:00
Jeff Young 0c9554a325 Hand cherry-pick fixes for #18042. 2024-06-05 13:00:36 +01:00
Jeff Young dc24d13fef Import child sheets relative to project, not parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17785

(cherry picked from commit 8e855156c8)
2024-06-05 12:03:39 +01:00
Jeff Young 78cbb8e994 PCB_GENERATOR_Ts are PCB_GROUP_Ts too.
Also, an item must already be in a commit to add it to a group.

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

(cherry picked from commit 9fb07d886e)
2024-06-05 12:03:39 +01:00
Sven Pauli ddd0ccbefd Implemented flip for tuning patterns.
(cherry picked from commit c7ad5efbed)
2024-06-05 12:03:39 +01:00
Marco Ciampa f5797d367f Updated Italian translation 2024-06-05 12:09:49 +02:00
JamesJCode 89dff6411b Clear all dirty connectivity flags on symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17984

When moving / deleting a power symbol, in some instances the
symbol is marked dirty, and sometimes the pin (depending on
whether the symbol is the primary edited item, or whether
the pin is identified through an edited item subgraph). If
the pin and the symbol are marked dirty, the pin dirty flag
was not being cleared.

Additionally, not all extracted items were being deleted
from subgraphs correctly.

Both resulted in dirty state and duplicated items in the
subgraphs during incremental connectivity, which resulted
in essentially corrupted subgraph states.
2024-06-04 21:01:50 +01:00
jean-pierre charras 093da7f73a Pcbnew, plot drill marks: fix incorrect plot drill mark in some cases.
If a non copper layers is added to a copper layer for plot with drill marks,
the drill mark was not visible (covered by shapes plotted from non copper layer).

Now copper layers are plotted after the non copper layers.
2024-06-04 18:28:15 +02:00
Mike Williams 2215e8906f SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 12:10:46 +00:00
Alex Shvartzkop d34df3e951 Don't construct an arc if we won't need it in pcbnew gfx importer. 2024-06-04 07:19:00 +03:00
Alex Shvartzkop 044a2305e3 Fix ellipse angles when importing DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18121
2024-06-04 07:16:42 +03:00
Jeff Young 05264424b3 Improve hole-to-hole error message. 2024-06-03 21:55:36 +01:00
jean-pierre charras 3e59c40283 symbol editor: allows rotation of fields in derived symbols.
Fields in derived symbols are editable, so the context menu must allow rotations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18003
2024-06-03 20:35:36 +02:00
Jeff Young 2a99464fc1 Don't attempt to plot rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18133

(cherry picked from commit dc8fd0996d)
2024-06-03 18:50:37 +01:00
Jeff Young 412da66cf6 Make sure ERC pin-to-pin checks are always in same order.
Comparing U1.pin1 : U2.pin1 will return the same
results as U2.pin1 : U1.pin1, but will result in a
different serialization of any exclusions.

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

(cherry picked from commit 11193d2cda)
2024-06-03 18:49:39 +01:00
Jeff Young c6215b08ed Use wxWidgets to track DPI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981

(cherry picked from commit 931de12072)
2024-06-03 18:47:43 +01:00
Jeff Young 769060c584 Setup 3D canvas for Footprint Chooser previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17910

(cherry picked from commit 3be6d5c5de)
2024-06-03 18:43:36 +01:00
Jeff Young 0b48a66cb0 Don't add things to the selection that aren't in the commit.
Don't process line-pairs when one has already been deleted.

Clean up created line segments when operation is cancelled.

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

(cherry picked from commit 6f0a1ade01)
2024-06-03 18:43:07 +01:00
Jeff Young 836b3219c1 Apply ExportPdf fix to remaining jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863

(cherry picked from commit c0635f222d)
2024-06-03 18:36:46 +01:00
Jeff Young 2c0010fbcb Make sure var overrides get synced to board properties.
Also allow the board properties to override title-block properties.

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

(cherry picked from commit 3cf424d929)
2024-06-03 18:36:06 +01:00
Jeff Young c1ed2506f9 Sorting is not implemented on LIB_TREE columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18101

(cherry picked from commit c828deee35)
2024-06-03 18:31:34 +01:00
Jeff Young 299495a0aa Repair merge errors. 2024-06-03 18:29:37 +01:00
Jeff Young 6f3b6e3ad8 Move pad checking to Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102

(cherry picked from commit 15d4e114e0)
2024-06-03 18:29:37 +01:00
jean-pierre charras cb9d78b46c FOOTPRINT::CheckPads(): better check for hole in PHT pad.
Hole not fully inside the pad copper area is now tested.

(cherry picked from commit 8165ec66e9)
2024-06-03 18:29:37 +01:00
Jeff Young 46b3dcba4f Trim punctuation from end of URLs.
(cherry picked from commit 513e68a04a)
2024-06-03 18:29:37 +01:00
Jeff Young 06150388d8 Trim trailing punctionation from doc URLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18089

(cherry picked from commit f3b57c20af)
2024-06-03 18:29:37 +01:00
Jeff Young b07de4f6af Trim covered region to bounding hull.
Otherwise a long track crossing a footprint will look
like it covers most of it.

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

(cherry picked from commit e400d49af6)
2024-06-03 18:29:37 +01:00
Jeff Young 6dd5422137 CmpNoCase() returns 0 for a match (which evals to false as a bool).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18087

(cherry picked from commit 26fe4c05e1)
2024-06-03 18:29:37 +01:00
Jeff Young 546ca18662 Delete tuning patterns in Unroute Selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18065

(cherry picked from commit a678d0d710)
2024-06-03 18:29:37 +01:00
Jeff Young de0f6ecf68 Fetch board finish before exporting stackup to clipboard.
Also fixes some backward logic in setting modified flag.

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

(cherry picked from commit 032b5a6d65)
2024-06-03 18:29:37 +01:00
Jeff Young 995c1a179e Honour shift-key for spin buttons in 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17541

(cherry picked from commit f7c7791b6c)
2024-06-03 18:29:37 +01:00
Jeff Young bee4856a7f Process clearance rules for plated holes in router.
Also makes sure the clearance is shown for a collision,
even if the preference for showing clearances is off.

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

(cherry picked from commit d5c3a4036c)
2024-06-03 18:29:37 +01:00
Jeff Young 9721559005 Push multi-sweep traces down into MathPlot.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17215

(cherry picked from commit edae328ca6)
2024-06-03 18:29:37 +01:00
Jeff Young 7a1ab44207 Rewrite Eagle rotated text algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019

(cherry picked from commit debc94ff49)
2024-06-03 18:29:37 +01:00
Jeff Young d269513857 Improve Eagle rotated text importing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019

(cherry picked from commit f4f3f52fd4)
2024-06-03 18:29:37 +01:00
Jeff Young b4928f20a6 We can only knockout a pad if we're plotting the pad shape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17166

(cherry picked from commit 0ff59bc60e)
2024-06-03 18:29:37 +01:00
Jeff Young 05d2893ac1 Don't suppress hole plotting for utility layers.
Also simplifies the handling of DXF outline plotting.

Also removes some comments which were no longer accurate.

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

(cherry picked from commit 826b72c499)
2024-06-03 18:29:37 +01:00
Mike Williams 7ea205222d pcb: grab unconnected needs to ignore same-footprint ratsnets items 2024-06-03 12:46:13 -04:00
Wayne Stambaugh e853b593b1 Begin version 8.0.4 development. 2024-06-03 07:40:36 -04:00
Wayne Stambaugh c2a41bad09 Tag stable version 8.0.3. 2024-06-03 07:37:50 -04:00
charrasjp 1a13bed1c1 French translation update 2024-06-02 17:32:18 +02:00
Seth Hillbrand 7b9c775cbd Update translations 2024-05-31 17:41:24 -07:00
Mark Hämmerling e9bf1daa5f Translated using Weblate (German)
Currently translated at 99.8% (9169 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-01 02:40:50 +02:00
Nguyễn Ngọc Khánh d6727934a5 Translated using Weblate (Vietnamese)
Currently translated at 21.6% (1987 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-01 02:40:50 +02:00
Wellington Terumi Uemura a8df90762d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-06-01 02:40:50 +02:00
Nguyễn Ngọc Khánh 7b4bb28307 Translated using Weblate (Vietnamese)
Currently translated at 21.4% (1972 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-01 02:40:50 +02:00
CloverGit ee8744770f Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9182 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen ace480d3f6 Translated using Weblate (Swedish)
Currently translated at 99.9% (9181 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen 154795d32a Translated using Weblate (Finnish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen ce20c6ec77 Translated using Weblate (Swedish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
dsa-t 6380f29214 Translated using Weblate (Russian)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-06-01 02:40:50 +02:00
Jan Straka 1aaf767c5d Translated using Weblate (Czech)
Currently translated at 81.0% (7441 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen bd4ffa493f Translated using Weblate (Swedish)
Currently translated at 99.9% (9178 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
Wellington Terumi Uemura cf26b12478 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-06-01 02:40:49 +02:00
ZbeeGin cdb26a9c97 Translated using Weblate (Polish)
Currently translated at 99.9% (9181 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-06-01 02:40:49 +02:00
Laurens Holst b5687b87bd Translated using Weblate (Dutch)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-06-01 02:40:49 +02:00
Henrik Kauhanen e581ba4c7b Translated using Weblate (Swedish)
Currently translated at 99.9% (9177 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:49 +02:00
Toni Laiho a2064f85b1 Translated using Weblate (Finnish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-06-01 02:40:49 +02:00
Pferd O 2dbe4485cc Translated using Weblate (German)
Currently translated at 99.8% (9167 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-01 02:40:49 +02:00
Mark Roszko 6b7b6fa3e3 Revert "Don't reset the view controls state just because we are setting the already active tool state again"
This reverts commit e914c0c1a0
2024-05-30 12:30:40 +00:00
Wayne Stambaugh be71f776ce Tag stable version 8.0.3 release candidate 1. 2024-05-25 07:26:08 -04:00
Mark Roszko 51ba4763f0 Don't let CaptureCursor fight modal dialog
(cherry picked from commit e9fde0051f)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-25 01:17:17 +00:00
Alex Shvartzkop f9a9db6503 Fix very tall Plot dialog on GTK.
Some scrollable controls need wxFIXED_MINSIZE, on some platforms, apparently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16926
2024-05-24 23:35:21 +03:00
Alex Shvartzkop 8d001a8031 Switch length tuner settings action scope to global to make the hotkey work. 2024-05-24 17:46:15 +03:00
jean-pierre charras 88115e1dd2 Gerbview: fix a minor issue.
When the option "always hide all layers but active" is set, the active layer
changed using hotkeys or Toolbar layer selector did not update the visible
selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18059
2024-05-24 08:29:49 +02:00
Mark Roszko e914c0c1a0 Don't reset the view controls state just because we are setting the already active tool state again
(cherry picked from commit 132ecee665)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-24 02:49:27 +00:00
Jon Evans a1cd73e730 Fix bad clearance logic in cecc1a2f 2024-05-23 11:21:18 -04:00
Jon Evans cecc1a2ff1 Use true arc collision for segment<>arc
Using an approximation here results in different collision
results for segment<>arc than point<>arc, which
can cause odd behavior in the router.


(cherry picked from commit 5b3b0ff836)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-23 12:58:01 +00:00
John Beard dc08cf3252 Eeschema: Also make 'note' backgrounds translucent on selection
For the same reason as device backgrounds - it obscures everything
else while moving a filled shape.

(cherry pick of commit 0bcd5e5795)
2024-05-23 16:52:30 +08:00
John Beard e20a11cbb3 Eeschema: Fix selection of items inside filled shapes
The selection heuristic broke down when one item was a filled
shape. Because all hit tests would succeed with distance 0 for
these shapes, they would always be considered the closest item
to the exclusion of all else, which made it very hard to
click on a graphic inside a filled shape.

Now, recognise when an item would be "dominating" and
decline to promote it to the "closet" spot. It will still
be selectable if there are no other items nearby, or if
there are multiple shapes.

(cherry picked from commit fd4c15517f)
2024-05-23 15:41:28 +08:00
Seth Hillbrand c27ca33a2e Ensure that the copper conn check re-adds epsilon
When checking if the particular rule is what is being checked, we rely
on the value of the minimum width.  Since we modified that to allow
width checking, this re-adds it for the comparison

(cherry picked from commit f74d1060d4)
2024-05-22 16:31:52 -07:00
Seth Hillbrand 1073ca0760 Include DRC Epsilon in connection width checker
Avoids rounding errors flagging connections too small by nanometers

(cherry picked from commit bce560d05f)
2024-05-22 16:31:52 -07:00
Jeff Young 4440fe0935 Fix keep-upright algo for footprint text.
Also removes PCB_FIELDs from rotation centre calc in
footprint editor if there is other stuff selected.

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

(cherry picked from commit 25bb3f77fa)
2024-05-22 14:47:26 -07:00
Seth Hillbrand d1cd859765 Re-enable moving of all footprint text in board
Seems like a lot of people really like to be able to modify the text
positions/content of their footprints

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

(cherry picked from commit 47e4ebb32a)
2024-05-22 10:36:42 -07:00
John Beard 36119b869c Pcbnew: Fix context menu when moving
The EDIT_TOOL is actually 'co-operating' with the SELECTION_TOOL
by putting its tools into the SELECTION_TOOL's menu. This means
the EDIT_TOOL::m_menu is sad and empty inside, and if you show it,
it either doesn't show at all, or a tiny stub is shown.

(cherry picked from commit af74d2a746)
2024-05-22 11:24:47 +08:00
Roberto Fernandez Bautista 3e5ceaa319 kicad-cli sym export svg: Ensure bounding box is correctly calculated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18062
2024-05-21 21:59:38 +02:00
Seth Hillbrand 78cd01038f Update translations 2024-05-21 09:38:08 -07:00
Ivan Chuba 7b4952df11 Translated using Weblate (Ukrainian)
Currently translated at 87.5% (8031 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/uk/
2024-05-21 18:35:36 +02:00
CloverGit 73acc80c1d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9171 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-05-21 18:35:36 +02:00
pominglee 8b41207351 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-05-21 18:35:36 +02:00
pominglee 5dbc1c7b18 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-05-21 18:35:36 +02:00
Toni Laiho 5780a15468 Translated using Weblate (Finnish)
Currently translated at 99.9% (9168 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-05-21 18:35:36 +02:00
Ulices 15f6d5ad73 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9171 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-05-21 18:35:36 +02:00
Nguyễn Ngọc Khánh 421bc27181 Translated using Weblate (Vietnamese)
Currently translated at 21.1% (1937 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-05-21 18:35:36 +02:00
Tokita, Hiroshi afe41498c4 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-05-21 18:35:36 +02:00
Tokita, Hiroshi 92c40f2761 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-05-21 18:35:36 +02:00
Toni Laiho bb82d99a76 Translated using Weblate (Finnish)
Currently translated at 99.9% (9168 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-05-21 18:35:36 +02:00
Andrew 1d0e118294 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: Andrew <yenchang.lin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
pominglee d40b12301d Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: pominglee <pominglee@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
Toni Laiho 138d22b26f Translated using Weblate (Finnish)
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: Toni Laiho <apelegeos@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
zly20129 9c69ea9df3 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: zly20129 <zly20129@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Laurens Holst 3395738e55 Translated using Weblate (Dutch)
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: Laurens Holst <laurens@grauw.nl>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Henrik Kauhanen 6afc2e727b Translated using Weblate (Finnish)
Currently translated at 99.7% (9148 of 9171 strings)

Translated using Weblate (Finnish)

Currently translated at 99.7% (9148 of 9171 strings)

Translated using Weblate (Swedish)

Currently translated at 99.9% (9168 of 9171 strings)

Co-authored-by: Henrik Kauhanen <henrik@kauhanen.se>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Wellington Terumi Uemura f10864b3a7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
ZbeeGin 892602c070 Translated using Weblate (Polish)
Currently translated at 99.9% (9169 of 9171 strings)

Co-authored-by: ZbeeGin <zbeegin@op.pl>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Jeff Young d8f2a455e0 Reset zone offsets when exporting footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17794

(cherry picked from commit af5ed5a118)
2024-05-21 11:41:07 +01:00
Jeff Young 561b2d490d Handle font when reading render cache.
(Also fixes a bug where the cache's triangulation wasn't
cached.)

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

(cherry picked from commit e332320108)
2024-05-21 11:36:36 +01:00
jean-pierre charras 1869da0e7d Dialog Export step: fix an issue when exporting a modified board file.
the DIALOG_EXPORT_STEP uses a auto saved copy of the current board to
create the step file (using kicad_cli).
But this file is not associated to a corresponding .kicad_pro file, and
this can create some issues (like the KIPRJMOD not defined)
So create a copy of the current board prj to export associated prj file
to the auto saved board file.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16973
2024-05-21 11:06:02 +02:00
dsa-t be2f317f6d Vertically center the color swatch in grid layer selector.
(cherry picked from commit 5f153eef7f)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-05-21 02:35:49 +00:00
Seth Hillbrand c248993a84 Avoid snapping to edge cuts when routing
Snapping happens to elements on copper layers but edge cuts is only
_virtually_ on copper layers.  We need to set its routable flag off to
ensure we don't force-snap to the snap points
2024-05-20 15:08:12 -07:00
Seth Hillbrand 0a227ea916 Avoid int overflow in collisions
When calculating arc collisions, avoid overflowing the integer distance,
which gives a false nearest point
2024-05-20 15:08:12 -07:00
Seth Hillbrand f75e6dae84 Reserve shift for grid modification 2024-05-20 15:08:12 -07:00
Seth Hillbrand 160a493885 Ensure that arc closest positions are matched
We switch from squared to absolute calcualtion when calling into the arc
collision so be sure to catch the new positions and distances
2024-05-20 15:08:12 -07:00
Seth Hillbrand 625d241adf Avoid case where whole line is new head
If the whole line shifts, we may have no points of the old tail in the
new line.  In this case, we may not only not find the split point but we
may also have fewer points in the new line than were in the old head.
Clamping to the maximum potential point count prevents creating invalid
lines

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

(cherry picked from commit 586fddeec1)
2024-05-20 15:08:12 -07:00
Alex Shvartzkop 1264230973 STEP export: reverse Wire when adding it to Face as a hole.
Better fix for https://gitlab.com/kicad/code/kicad/-/issues/17446
2024-05-19 03:51:53 +03:00
Alex Shvartzkop 6dfd417767 Make IBIS errors visible / more obvious.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18041
2024-05-19 01:44:16 +03:00
Jon Evans 585f11a01d Clear undo/redo lists when removing board layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17613


(cherry picked from commit 90ee5e097a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 22:16:28 +00:00
Jon Evans d6a121d617 Don't drag multiple coincident vias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17915


(cherry picked from commit 7a3db2d176)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 21:51:09 +00:00
Alex Shvartzkop dfd8aa402d Fix an assert in isCopperOutside. 2024-05-18 22:50:13 +03:00
Alex Shvartzkop 5b1c84b5dd STEP export: allow closing (and constructing) the wire with 1nm edges.
This is ok (and required) because we don't mess with BRepBuilderAPI::Precision nowadays.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18030
2024-05-18 22:50:13 +03:00
Jon Evans 11586863cf Fix broken hit test for arcs in via placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844


(cherry picked from commit aaf3142e9a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 17:12:34 +00:00
Jon Evans d52e50a97a Altium: avoid crash when imported zone has no fill
Fix https://gitlab.com/kicad/code/kicad/-/issues/18025


(cherry picked from commit 4f3117aea0)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 00:16:22 +00:00
Jon Evans fee0028ee9 Support LIB_ID queries in searchFootprints too
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18039
2024-05-17 13:57:17 -04:00
Jon Evans a762311733 The upcoming Fedora 41 will use python 3.13
The Fedora folks are currently working on updating python to version
3.13 in Fedora 41.


(cherry picked from commit f8c8dcde13)

Co-authored-by: Steven A. Falco <stevenfalco@gmail.com>
2024-05-17 14:50:03 +00:00
Jon Evans e0581370e1 Fix bogus value field in spice test source.
(cherry picked from commit a0a368f47b)

Co-authored-by: Jeff Young <jeff@rokeby.ie>
2024-05-17 14:30:23 +00:00
Jon Evans 2cd0139cbf Remove extra NeedRIGHT in textbox parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18033
2024-05-17 09:01:59 -04:00
Jeff Young 28cd2a203e Fix compiler version issues. 2024-05-17 12:59:30 +01:00
Jeff Young 33715143e3 Honour LAYER, SHEETNAME and SHEETPATH variable overrides on CLI.
Also allows the LAYER variable to work automatically
if you're plotting/exporting a single layer.

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

(cherry picked from commit 3e0c598500)
2024-05-17 11:38:56 +01:00
Jeff Young ba6fd2716e Lazily re-evaluate worst-clearance cache.
This prevents crashes when trying to re-evaluate
during destruction, etc. and is a cleaner solution
than trying to keep a flag updated.

It should also be a performance win for very large
documents.

Also implements proper threadlocking for the cache.

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

(cherry picked from commit 498d2c9db1)
2024-05-17 11:37:04 +01:00
Jeff Young 882ff06e24 More PEGTL tomfoolery.
(cherry picked from commit 8aaca0509c)
2024-05-17 11:25:26 +01:00
Jeff Young f52a51dce3 Reimplement bracedExpr and token lists for CPL models only.
This prevents the incompatibility between token lists
and single-token param-value pairs.

(cherry picked from commit 086e609c3d)
2024-05-17 11:25:22 +01:00
Jeff Young a96e16b766 Tighter control over braced-expression list separators.
(cherry picked from commit 2921d47fb3)
2024-05-17 11:25:19 +01:00
Jeff Young 81e51b00ca Remove support for multiple token values for CPL models.
It breaks param lists which contain single-token params
(ie: those without the "=<value>" part).

(cherry picked from commit 8bb807f170)
2024-05-17 11:25:15 +01:00
Jeff Young c01681a32e Repair variable resolution recursion guard.
(cherry picked from commit c8d1c1f1a4)
2024-05-17 11:24:37 +01:00
Jeff Young eeb9133588 Support multiple brace-expressions for CPL model lines.
(Nested brace-expressions, on the other hand, are *not*
an ngspice thing.)

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

(cherry picked from commit 0008991f02)
2024-05-17 11:24:21 +01:00
Jeff Young d45769e508 Allow .ends to be preceeded by whitespace.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16560

(cherry picked from commit b934914c59)
2024-05-17 11:21:47 +01:00
Jeff Young a499bc9f66 Contour cache must be sensitive to size.
(While we scale the contours afterwards, font hint
data is size-sensitive so the contours are already
size-specific.)

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

(cherry picked from commit 98f4e60b90)
2024-05-17 11:20:38 +01:00
Jeff Young 341f102d79 Fix PEGTL flagParam grammar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393

(cherry picked from commit c5162f5483)
2024-05-17 11:20:26 +01:00
Jeff Young 3e50a03ce7 Expose violation severity for co-located holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18028

(cherry picked from commit 26906f383c)
2024-05-17 11:20:21 +01:00
Jon Evans 1defa3872e Clear field listener when quitting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18016


(cherry picked from commit 2836025402)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-17 00:50:48 +00:00
jean-pierre charras e66d25b6e8 Eeschema, Pin helpers: fix wrong label orientation if the symbol is rotated
From Master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18012
2024-05-16 19:53:23 +02:00
jean-pierre charras 76f38600af Fix a 100% CPU core usage is some editing cases.
In commit 7cb754dd a call to wxMilliSleep(50) was removed (because it created
lag in editing) but this removal created a 100% CPU core usage.
Using a much small sleep time (1ms) fixes these issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17979
2024-05-16 17:40:06 +02:00
John Beard 44b0ef64e8 No longer auto-set the Footprint field when setting the FPID
This avoids forcing the field to the footprint name in the
library editor, which gets in the way. This doesn't specifically
inhibit the use of the field, and doesn't interfere with fields
users may have set manually (it can be cleared manually if
wished).

Removing the footprint field entirely either from all footprints
or from footprints in fpedit is quite a bit more invasive to
existing designs.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/17998
2024-05-16 21:42:18 +08:00
John Beard c3e7509823 Allow to set LIB_FIELD size through property manager
This can be useful when managing auxiliary fields.

This is only for the 8.0 branch, as LIB_FIELD is merged
with SCH_FIELD in 8.99, so this is already handled.
2024-05-16 20:45:26 +08:00
Jeff Young 3622a296be Use consistent sorting for footprint libs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17731

(cherry picked from commit 02bc093b55)
2024-05-15 11:25:41 +01:00
Jeff Young 0b48913876 Add mirrored column to fields grid table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17956

(cherry picked from commit 0f3d14df38)
2024-05-15 11:25:02 +01:00
Jeff Young 9000cfb9cd Use display titles for axes in CSV output.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17324

(cherry picked from commit d9a6b2aec2)
2024-05-15 11:23:52 +01:00
Jeff Young c748645334 Fix typo.
(cherry picked from commit 5ba4900170)
2024-05-15 11:23:07 +01:00
Jeff Young 79443b7e59 Update signals & measurements when netlist might have changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17616

(cherry picked from commit 55b2c4dbf4)
2024-05-15 11:22:08 +01:00
Mark Roszko 02925fdecc Update file doxygen.yml
(cherry picked from commit 3a2b960f62)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-12 02:53:57 +00:00
Mark Roszko ef1e054bb6 Use our docker runner for doxygen
docker tag for shared gitlab runners was removed by gitlab

(cherry picked from commit 03459723b3)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-12 01:09:42 +00:00
Mark Roszko bb13ab2963 Remove the kicad-vcpkg xz override
(cherry picked from commit 695493fc3d)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-10 01:44:39 +00:00
Jeff Young 9c7fb0697c Don't double up ac and ph params.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-09 23:36:32 +01:00
Jeff Young c92b11900b Don't add duplicate SIM fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-09 23:36:32 +01:00
Jeff Young cde18d7ae7 The user can cancel the opening of many editors.
Don't play dice with the devil.

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

(cherry picked from commit a99377c1ec)
2024-05-09 23:36:32 +01:00
Jeff Young 1a932cb13b Don't modify radius when editing center.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17192

(cherry picked from commit 1290228fbf)
2024-05-09 23:36:32 +01:00
Jeff Young cc75d8c0af Exercise more care when comparing doubles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17249

(cherry picked from commit 62d4bd7c1d)
2024-05-09 23:36:32 +01:00
Wayne Stambaugh cb93d2940c Fix QA DRC regression test issue.
(cherry picked from commit f1e8495dc9)
2024-05-09 10:38:47 -04:00
Wayne Stambaugh 88e0d373d1 Do not test for effective annular width when it's already within limits.
(cherry picked from commit 0402c03468)
2024-05-09 10:38:32 -04:00
Wayne Stambaugh c2d59c6103 Fix false annular ring width DRC test failure.
The DRC annular ring width test failed to take into account that a pad
could be contained inside another pad having the same number (thermal
vias for example) which changes the effective annular width of the pad
contained within another pad.  A test was added to calculate the effective
annular ring width in this case.

Added some PNS log viewer helper and test code to the PNS playground QA
utility for testing the effective pad annular width code.

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

(cherry picked from commit a508f2e716)
2024-05-09 10:38:17 -04:00
Seth Hillbrand f8f48f922e Show disambiguated netname when needed
When using subsheets with nets that end in the same netname, it can be
confusing in pcbnew to know which net you are dealing with.  In these
cases, we show the full netname including path to assist when routing

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

(cherry picked from commit b346cde30b)
2024-05-09 02:57:48 +02:00
Alex Shvartzkop eb7e781bec Send project path to ngspice for code model input files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16527
2024-05-08 23:39:34 +03:00
Alex Shvartzkop 378300c733 Don't hide symbol/footprint preview widgets on scroll.
(cherry picked from commit dc8822b421)
2024-05-08 19:44:59 +03:00
Jon Evans ddd7c35586 DbLib: Prevent uncaught exception creating statement
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.
2024-05-06 16:59:49 -04:00
Seth Hillbrand 6482a322da Optionally use electrical type when shown.
We also need to consider electrical type as an exact hit when we are
showing it.  Otherwise, we get the pin added to our consideration list
but not selected without hitting close neighbors

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

(cherry picked from commit 3620887a22)
2024-05-06 10:38:28 -07:00
Seth Hillbrand dc6d421fa2 Avoid arbitrary string limits
Placing a limit on the number of values that a field is allowed to hold
makes it blank when we set more than this number.  There's not a good
reason to limit the number of digits we allow at the field level (we
round to 4 decimal points in the backend)

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

(cherry picked from commit cb71f2f207)
2024-05-06 10:00:51 -07:00
Mike Williams 7b19fb0c8d Legacy Libraries: fix Description field clobbering user field
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17943
2024-05-06 12:15:14 -04:00
Mark Roszko f6480d67eb Fix help for kicad-cli pcb export pos --side
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15815


(cherry picked from commit 030a251090)

0b94c436 fix https://gitlab.com/kicad/code/kicad/-/issues/15815
8e6bb91b Update file command_pcb_export_pos.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
2024-05-06 13:37:03 +00:00
Alex Shvartzkop 35c788a332 Fix polygon fill flag in pcbnew graphics (SVG) importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17957
2024-05-06 14:16:49 +03:00
Seth Hillbrand a0cba3a9af Re-initialize conversion settings on failure
When the conversion fails, it may be the result of the settings values,
so reset them to their original values afterward

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

(cherry picked from commit 4c0fd6e791)
2024-05-06 11:42:54 +01:00
Jeff Young af6835e766 Improve bounding hull error message.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17886

(cherry picked from commit 651cc5c838)
2024-05-06 11:42:34 +01:00
Mike Williams 1f88d33c81 BOM Export: remember filename per project
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17704
(cherry picked from commit 9c058503d9)
2024-05-06 11:38:15 +01:00
Jeff Young 6aee6f857e Don't leak output file path between projects.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17846

(cherry picked from commit 0e9b547f94)
2024-05-06 11:37:52 +01:00
jean-pierre charras 6d69fee097 PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(): ensure texts are not mirrored
When not specified as mirrored, texts must be not mirrored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17955
2024-05-06 11:17:17 +02:00
Alex Shvartzkop c7dd993439 Add OpenGL info to About.
(cherry picked from commit 5e14ae9698)
2024-05-05 21:58:10 +03:00
Jeff Young 7e5dd02ef1 Don't abort on failure to backup file if it was never saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17810

(cherry picked from commit 0e0432d194)
2024-05-05 14:59:07 +01:00
Jon Evans ca16ff05df Altium pcbimport: handle various dimension items, fix dimension_kind enum
(cherry picked from commit ce32dfd077)

e627d587 handle various dimension items, fix dimension_kind enum, this doesn't parse...
e89d1826 fix formating
07686833 change to Reporter for logging
a535d13d remove old comments
554c9565 Update file altium_pcb.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
2024-05-04 16:38:32 +00:00
Jon Evans b8fa10ab2b Add optional reporting of non-KiCad design issues
Also add HTML reporter to PCB side to match schematic
2024-05-04 11:27:22 -04:00
Jon Evans 09736ebf2c Get rid of relative position in pad properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17246
2024-05-03 23:31:36 -04:00
Jeff Young 897b9fe6a1 Restore accidentally deleted text size constraint algo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17284

(cherry picked from commit c998234dec)
2024-05-03 22:16:16 +01:00
Jeff Young 48f14d6dea Handle orientation when pasting footprint items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17518

(cherry picked from commit 94223ca794)
2024-05-03 22:15:53 +01:00
Jeff Young 1ef916086d pruneItemLayers() is not the right place to filter refdes & value.
(And we already filter all mandatory fields in
pasteFootprintItemsToFootprintEditor() anyway.)

Also, don't nuke a footprint which contains only fields
during a paste.

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

(cherry picked from commit eb13dec265)
2024-05-03 22:15:05 +01:00
Jeff Young 0b44ba61d8 Improve consistency in free-via ambiguity tests.
Also removes a magic number.

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

(cherry picked from commit 58ddffe3dd)
2024-05-03 22:15:05 +01:00
Jon Evans 3c99a3797e DbLib: Fill entire table if cache is empty when loading one part
The "already placed parts" feature causes a situation where many
single-part queries are placed before the cache is even filled.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17940
2024-05-03 17:03:55 -04:00
Seth Hillbrand 76c98859bf Fix renaming sheet check
If we are renaming a sheet that exists only once in the schematic, then
we don't need to warn about case sensitivity.  If the sheet exists
multiple times, we do.  We can't check this using SCREENS because the
screens don't maintain full state information about where they are used.

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

(cherry picked from commit ba4974749c)
2024-05-03 13:23:51 -07:00
Seth Hillbrand 57c8fbc9fe Special-case copy/paste of footprint fields on board
When editing the board, footprint fields _look_ like text items, so copy
and paste of these items should logically result in a text item, not a
footprint copy.

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

(cherry picked from commit 71b020eb14)
2024-05-03 11:00:19 -07:00
Seth Hillbrand bbac5430cf DRC: special case circles for annular width check
Circles only use one dimension and we tend to ignore the other in our UI
but it is kept and reflects the previous second dimensional value.  When
checking DRC, we should only be concerned with the single value used
unless the pad has two dimensions

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

(cherry picked from commit e3d2f338de)
2024-05-03 10:07:29 -07:00
Seth Hillbrand 279ef4210d Use StandardPrimitive library for vias
Some 2581 parsers don't like to consider UserPrimitive even though they
are essentially the same thing and required by the standard.  ¯\_(ツ)_/¯

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

(cherry picked from commit 13735050da)
2024-05-03 09:12:43 -07:00
Jon Evans 2ef18ad4ca Fix deduplication of already-placed symbols
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.
2024-05-03 11:39:01 -04:00
Jon Evans 1a76fce255 Make sure database library has updated pointer to library table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17903
2024-05-03 11:39:01 -04:00
Mark Roszko ee75a50d84 Update vcpkg wxpython
(cherry picked from commit 1a1be2d542)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-03 02:17:30 +00:00
Mark Roszko 99d8d0bc63 Use the new kmb toolchain file for vars
(cherry picked from commit f00a1ab517)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-03 02:15:52 +00:00
Mark Roszko f859fe37ca Add updated tooltips on update dialog
(cherry picked from commit cb81de5a74)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-03 01:39:50 +00:00
Alex Shvartzkop 451cb7a194 Fix warnings. 2024-05-03 00:09:24 +03:00
Alex Shvartzkop 17175fe71e EasyEDA Std/Pro: import (some) component metadata for symbols.
Also fixes Reference numbering.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17806
2024-05-03 00:05:39 +03:00
Seth Hillbrand f8b02f99dd Keep FP chooser on top of KiCad but not system
We don't need to float the window over other programs, so setting to
parental floating keeps it focused just the right amount

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

(cherry picked from commit 60f59ae851)
2024-05-02 13:12:21 -07:00
Seth Hillbrand 69fb86322c Re-allow moving footprint text
This is a temporary solution until we modify loading to convert existing
text to fields

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

(cherry picked from commit b649932dbf)
2024-05-02 13:00:37 -07:00
Seth Hillbrand 4d683232b7 Remove faulty tooltip
Copy-pasta error

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

(cherry picked from commit b211625e53)
2024-05-02 12:46:26 -07:00
Jon Evans cb7e0e4383 Altium: apply power filter to symbol libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17922
2024-05-01 22:47:19 -04:00
Jon Evans 90b62762d3 Support ortho dragging labels off sheet pins 2024-05-01 22:10:18 -04:00
Jon Evans 787a9ae4e4 Pin helpers can help sheet pins also
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17923
2024-05-01 22:10:02 -04:00
Jon Evans 83be5ba63d Move ALTIUM_PCB to use REPORTER for logging
Change not-yet-supported messages to debug level

(cherry picked from commit e973c15087)
2024-05-01 19:17:09 -04:00
Jeff Young e1cad6189e Don't assume that a SMD pad has copper layers.
(cherry picked from commit 9a6efd43e1)
2024-05-01 18:29:36 +01:00
Mike Williams f29fc2a025 PCB Fields: fix v7 imported board hidden description field pos
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17684
2024-05-01 09:24:54 -04:00
Mark Roszko 43d4c8d801 Point BEGIN_EVENT_TABLE at the correct base class, fix current lang indication
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17825


(cherry picked from commit aaf776db9e)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-01 02:48:19 +00:00
Wayne Stambaugh c179f4d4f1 Use correct value field text when importing Eagle schematic symbols.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17130

(cherry picked from commit 865225fcca)
2024-04-30 13:02:29 -04:00
jean-pierre charras ac8b3989be DIALOG_EXPORT_2581:fix incorrect size of widgets when a very long field name exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17911
2024-04-30 18:22:22 +02:00
Mark Roszko 9a7b1a20dc Update sentry-native to 0.7.2
(cherry picked from commit 2f0ff4e557)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-30 11:39:47 +00:00
Alex Shvartzkop cff58bae7f Fix internal simulation errors when using some IBIS models.
Usage of GC_PWR0 looked like a copy/paste.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17701
2024-04-29 23:24:46 +03:00
Jeff Young 2ee2d7d5d9 Separate Compare Footprints from DRC.
(We want to ignore some of the flags for DRC.)

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

(cherry picked from commit 43e6006306)
2024-04-29 16:27:24 +01:00
Jeff Young 743759578d Use a lighter touch keeping internal data structures in sync.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17493

(cherry picked from commit d0df8df7c7)
2024-04-29 13:45:17 +01:00
Mark Roszko 9f1d1fc45e Delete m_locale in the pgm_base destructor instead of manual destroy method
We need the object in m_locale for a bit more things during program cleanup,
especially on macOS

The destructor of PGM_BASE is sufficient allowance of lifetime.

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


(cherry picked from commit 9ffa5db667)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-29 11:48:22 +00:00
Mark Roszko b4ea25dccb Bump kicad-vcpkg baseline 2024-04-29 11:10:29 +00:00
Alex Shvartzkop f15551a6b5 3D viewer: apply OCC colors in order: XCAFDoc_ColorSurf > XCAFDoc_ColorCurv > XCAFDoc_ColorGen
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14906
2024-04-29 01:25:31 +03:00
Jeff Young 5c0a654e1e Save project settings after Schematic Setup.
This prevents data from getting lost if we later crash.

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

(cherry picked from commit d8d816236c)
2024-04-28 21:54:16 +01:00
Jeff Young edace908fb Make sure color settings are saved when modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17864

(cherry picked from commit 3b3de58e5e)
2024-04-28 21:54:16 +01:00
Jeff Young ff966eaf62 Gracefully handle DNP & Excl-from-brd components in nets list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17146

(cherry picked from commit 9be60cb45d)
2024-04-28 21:54:16 +01:00
Jeff Young a39b9b8890 Support legacy Length Tuning Settings workflow.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17748

(cherry picked from commit 978ef352d0)
2024-04-28 21:54:16 +01:00
Jeff Young 9f39420808 Layer column should be shown by default, not italic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17758

(cherry picked from commit 9dab855f8d)
2024-04-28 21:54:16 +01:00
Jeff Young 67b5e86cc4 Default to target lib when no lib tree sel exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17808

(cherry picked from commit f51d227dc7)
2024-04-28 21:54:16 +01:00
Jeff Young baaa8b6537 Fix merge error. 2024-04-28 21:54:16 +01:00
Jeff Young 4f776050e6 Clean up selection logic.
Don't try to do too many things at once.  Separate
out fooptrint-children handling, visibility-handling,
and footprintEditor vs boardEditor differences.

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

(cherry picked from commit 3958d1bf14)
2024-04-28 21:54:16 +01:00
Jeff Young fa490644dd Allow selection promotion when editing wrong field type.
Also fixes a bug where a CHT_MODIFY on a parent symbol with a
selected child doesn't trigger a selection modified event.

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

(cherry picked from commit 1aa59b806c)
2024-04-28 21:54:16 +01:00
Jeff Young 0363806e7e Allow no-net teardrops on no-net pads with no-net tracks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17566

(cherry picked from commit 50567764b5)
2024-04-28 21:54:16 +01:00
Jeff Young c0a608bfdd Keep internal data consistent when changing pad type.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17493

(cherry picked from commit 859f553c91)
2024-04-28 21:54:16 +01:00
Jeff Young fe26628113 Internationalise pin info when language changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17224

(cherry picked from commit c5c65f23a4)
2024-04-28 21:54:16 +01:00
Alex Shvartzkop c7ead70e0f Fix orientations of some footprint STEP models.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17631

(cherry picked from commit 7d37cebfdf)
2024-04-28 23:19:34 +03:00
Wayne Stambaugh 31177be88f Property grid navigation improvements.
* Do not handle tab key event when committing property changes so the
  property grid tab navigation works correctly.
* Do not call commit property changes on tab key when no changes are
  pending.
* Skip event handling in the base object value change and changing event
  handlers in case they do not get overloaded in derived objects.
* Do not force focus to canvas on property change so arrow and tab key
  grid navigation work properly.  Forcing the user to click the property
  grid control to edit a single property doesn't make sense.
* Pass properties panel show event up the event stack.
* Do not set focus to canvas in tool dispatcher if it already has the
  focus.

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

manully cherry picked from commit 8a1347d2c8
2024-04-28 08:25:24 -04:00
Wayne Stambaugh 48fd6bab7b Symbol chooser dialog layout improvements.
(cherry picked from commit 33869dbb61)
2024-04-28 07:43:43 -04:00
Wayne Stambaugh 9fd2b32665 Do not show click to start wire cursor for hidden pins.
Selecting show hidden pins will allow users to connect to hidden pins.

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

(cherry picked from commit ca18dc8ec8)
2024-04-28 07:39:34 -04:00
Wayne Stambaugh 1ba05d4c9c Improve symbol instance data file save ordering.
Use the root schematic UUID to order projects and sort symbol instance
data by KIID_PATH.  This will ensure file changes to instance data are
more consistent by using a fixed ordering.

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

(cherry picked from commit a86a258f66)
2024-04-28 07:15:22 -04:00
Wayne Stambaugh bae3ccdfb5 Use correct project name when adding new symbol instances.
When adding a sheet using a schematic from another project, set the
project name for the new symbol instance data to the current project
rather than the project name from the copied instance data.

(cherry picked from commit 5d99aaf0a4)
2024-04-28 07:06:03 -04:00
Alex Shvartzkop dd2f15c96d QA: update Altium footprint library golden file. 2024-04-27 23:34:39 +03:00
Marek Roszko 7e04a1b8d3 Hackfix macOS to keep erc/drc on top
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14356
2024-04-27 13:38:41 -04:00
Mark Roszko aea70a14ff Fix win32 proxy parsing when the old IE options for scheme based configuration was set
If you uncheck in the old IE options "Use the same proxy server for all protocols", then it returns an annoying string
like http=blah:1232;https=blah:1232;ftp=blah:2321 which we have to parse.


(cherry picked from commit 60d5780c1c)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-27 17:30:03 +00:00
dsa-t 8edfc23679 Altium PCB import: pad thermal spoke angle is 90 deg by default.
(cherry picked from commit 11ba59b690)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 17:27:07 +00:00
dsa-t 87f3d45109 Require Wayland 1.20 libraries.
KiCad doesn't build with older versions due to missing definitions.


(cherry picked from commit e26778c599)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 17:26:57 +00:00
Wayne Stambaugh 2ca07b47af Begin version 8.0.3 development. 2024-04-27 13:10:22 -04:00
Wayne Stambaugh 61a17e4c8b Tag stable version 8.0.2. 2024-04-27 13:08:12 -04:00
Mark Roszko 67dda92437 Hackfix crash in configure paths using non-ascii chars in column headers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17743


(cherry picked from commit a565db58c5)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-27 14:17:22 +00:00
Seth Hillbrand 4dfe564243 Update translations 2024-04-26 19:52:18 -07:00
CloverGit 5b3c0028ea Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 53d219e9d5 Translated using Weblate (Japanese)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
2tama3 a4da356ac7 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
Ulices 2915a9d1a2 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.8% (9156 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 6778eb8352 Translated using Weblate (Japanese)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
CloverGit bdf8c04daf Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
Henrik Kauhanen a32ca5d0c4 Translated using Weblate (Swedish)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 992bee7ec9 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
Henrik Kauhanen 7216527224 Translated using Weblate (Finnish)
Currently translated at 99.7% (9148 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-04-27 04:50:46 +02:00
Jan Straka 09bbabeef3 Translated using Weblate (Czech)
Currently translated at 80.9% (7422 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-27 04:50:46 +02:00
CloverGit 3ee74e2966 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
dsa-t 312356c284 Translated using Weblate (Russian)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-27 04:50:46 +02:00
Nicoara Alex 6b9dba3d45 Translated using Weblate (Romanian)
Currently translated at 27.0% (2479 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-04-27 04:50:46 +02:00
ZbeeGin 02c03ba2b6 Translated using Weblate (Polish)
Currently translated at 99.9% (9169 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-27 04:50:45 +02:00
Laurens Holst c35ba8f4cd Translated using Weblate (Dutch)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-27 04:50:45 +02:00
taotieren c344e170b9 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9166 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-27 04:50:45 +02:00
taotieren 5b5253b6e2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
ZbeeGin 2954378f58 Translated using Weblate (Polish)
Currently translated at 99.9% (9165 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-27 04:50:45 +02:00
Pferd O eea71b9209 Translated using Weblate (German)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-27 04:50:45 +02:00
Hubert Hu 8eb98a2094 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
CloverGit 85d9feefff Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
Henrik Kauhanen c059cbce12 Translated using Weblate (Swedish)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-27 04:50:45 +02:00
dsa-t a84aa449b2 Translated using Weblate (Russian)
Currently translated at 99.9% (9169 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-27 04:50:45 +02:00
Tokita, Hiroshi a4a2ec07c4 Translated using Weblate (Japanese)
Currently translated at 99.8% (9154 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:45 +02:00
Pferd O d5557caa33 Translated using Weblate (German)
Currently translated at 99.9% (9164 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-27 04:50:45 +02:00
Wellington Terumi Uemura 47717ca779 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-04-27 04:50:45 +02:00
Tokita, Hiroshi d7f742f911 Translated using Weblate (Japanese)
Currently translated at 99.6% (9135 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:44 +02:00
Seth Hillbrand 86ebc85404 Avoid assert on unhandled properties call 2024-04-26 19:50:00 -07:00
jean-pierre charras 5d4ed4b21a French translation: fix a typo 2024-04-26 09:58:07 +02:00
Seth Hillbrand 1ca0737c34 Replace stale pin references with UNDO copy
When we replace a symbol with one that has fewer pins, the old pins
are released, which leaves points to them in the connection graph
dangling.  This updates the pointer to use the cloned copy in the undo
stack until the connection graph is rebuilt with the new data

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

(cherry picked from commit 315ad0e071)
2024-04-24 12:55:30 -07:00
Seth Hillbrand 3a29fa44e3 Ensure that missing pins are added to extraction
When changing from a larger part to a smaller part, the previously
existing pins may be removed from the screen but still linked to
elements in the connection graph because we don't set them dirty unless
the changed element overlaps

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

(cherry picked from commit 0cd3e17db7)
2024-04-23 19:37:59 -07:00
Wayne Stambaugh 3517d25aec Tag stable version 8.0.2 release candidate 2. 2024-04-18 16:21:19 -04:00
Wayne Stambaugh 8d62a5fd3f Fix missing instance data when reusing an already loaded schematic.
Remove duplicate sheet instance page numbering.  It's already done when
the sheet is loaded from an exiting file or an already loaded schematic.
Remove the unnecessary page update code from the drawing tool.

(cherry picked from commit 17bcc27ff6)
2024-04-18 16:07:36 -04:00
Seth Hillbrand 9e5876df5c Remember to set the root sheet before loading
This is done in the frame for GUI loading so we need to explicitly set
this when loading files in the cli

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

(cherry picked from commit f8a25d20f8)
2024-04-18 10:48:15 -07:00
Seth Hillbrand fdc3806ed1 Protect courtyard cache regen
The courtyards are referenced by multiple calls and will be rebuilt on
command.  If this happens during zone fill (because the board timestamp
has incremented since the start) multiple threads may generate the cache
at the same time, leaving one with an invalid pointer

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

(cherry picked from commit df5dd15c6f)
2024-04-18 08:41:43 -07:00
jean-pierre charras 798b827a12 Plot pads: Do not use pad offset twice when plotting chamfered rect pads
from Master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17793
2024-04-18 14:03:11 +02:00
Seth Hillbrand 4ade0ac73d Don't sort on lost references
The arraystring reference is lost when we don't keep the wxFileName
variable in scope.

This also adds removing invalid paths and checking for correct version
before sorting

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

(cherry picked from commit d2701323a8)
2024-04-17 12:24:17 -07:00
Seth Hillbrand 65fd8d22ed Mask aperture pads can have multiple layers
But as long as they don't have copper, we should treat them as mask
apertures

(cherry picked from commit 02cdb0c6b9)
2024-04-16 15:54:36 -07:00
Alex Shvartzkop 481c1592ae STEP export: don't fail when can't construct a wire.
This can happen with very small shapes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17774
2024-04-17 01:35:00 +03:00
Mark Roszko 9af12e60d2 Close bom file earlier
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17779

(cherry picked from commit 5d7e96841b)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-04-16 14:30:13 +00:00
Marco Ciampa 048448296d Updated Italian translation 2024-04-15 23:38:28 +02:00
Wayne Stambaugh e03308e5ca Tag stable version 8.0.2 release candidate 1. 2024-04-15 06:20:59 -04:00
Wayne Stambaugh 16691c8d03 Fix string so it gets translated properly. 2024-04-15 06:18:20 -04:00
jean-pierre charras dac0296e3a French translation update 2024-04-15 10:41:22 +02:00
Seth Hillbrand 52ce4c0313 Update translations 2024-04-14 14:22:32 -07:00
Henrik Kauhanen 1956204635 Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:57 +02:00
pominglee b4bd14ba10 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.6% (8583 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
pominglee 8f7f6739c3 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.6% (8583 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
pominglee 4eebd8ad6c Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8573 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
Marek 4b3d67ffda Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:57 +02:00
Ulices f3e3236a43 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:57 +02:00
Ulices 82ee4a81ed Translated using Weblate (Spanish)
Currently translated at 99.1% (9082 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es/
2024-04-14 23:19:57 +02:00
Alex Gellen 55fbdddbb7 Translated using Weblate (Romanian)
Currently translated at 27.0% (2477 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-04-14 23:19:57 +02:00
Henrik Kauhanen 7cce1901b2 Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:57 +02:00
김랑기 0f4f1c0d3b Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:57 +02:00
j.Kolod 78849ba5c0 Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:56 +02:00
김랑기 a066c57fcc Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:56 +02:00
CloverGit 8684c0f9be Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:56 +02:00
ssantos db94f8c8ef Translated using Weblate (Portuguese)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt/
2024-04-14 23:19:56 +02:00
co8 j db0f7ec457 Translated using Weblate (Japanese)
Currently translated at 99.6% (9128 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-14 23:19:56 +02:00
Jan Straka 2bf4cca58a Translated using Weblate (Czech)
Currently translated at 80.6% (7390 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-14 23:19:56 +02:00
Laurens Holst 4470f4e6d8 Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:56 +02:00
pondahai e516ab5114 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8572 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:56 +02:00
김랑기 0282b142b8 Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:56 +02:00
Ulices 676108952e Translated using Weblate (Spanish (Mexico))
Currently translated at 99.7% (9141 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:56 +02:00
aris-kimi 8470091a4b Translated using Weblate (Greek)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-04-14 23:19:56 +02:00
Jan Straka 3302ef537f Translated using Weblate (Czech)
Currently translated at 80.1% (7348 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-14 23:19:56 +02:00
CloverGit 366f7aea6b Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:56 +02:00
Dmitry Mikhirev eed2221651 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:56 +02:00
Laurens Holst 90093c0fdd Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
simmon 2adccce3b8 Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:55 +02:00
CloverGit 6bf9653bef Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:55 +02:00
dsa-t 04c083ac48 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:55 +02:00
Laurens Holst 9a236e5972 Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
pominglee 521e773f2c Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8572 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:55 +02:00
Andrej Valek e28aa6d16c Translated using Weblate (Slovak)
Currently translated at 65.0% (5956 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:55 +02:00
Andrej Valek 001c90c69f Translated using Weblate (Slovak)
Currently translated at 64.8% (5944 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:55 +02:00
Laurens Holst cba73e6cea Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
Ulices 5af4f3f9df Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9125 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:55 +02:00
pominglee e1b922ae19 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8568 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:55 +02:00
CloverGit f1d988788a Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:55 +02:00
dsa-t 8e6cb7b350 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:55 +02:00
Toni Laiho 6685eefc8e Translated using Weblate (Finnish)
Currently translated at 99.9% (9159 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-04-14 23:19:55 +02:00
aris-kimi 8d231b8c96 Translated using Weblate (Greek)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-04-14 23:19:54 +02:00
ZbeeGin 313e09cfd3 Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:54 +02:00
Laurens Holst 5a05a1337e Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:54 +02:00
Ulices a40929fa71 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9120 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:54 +02:00
CloverGit 37eb5f4a8d Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:54 +02:00
Henrik Kauhanen b7d1fb944c Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:54 +02:00
Marcel Hecko 9797d2d133 Translated using Weblate (Slovak)
Currently translated at 64.6% (5923 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:54 +02:00
dsa-t e34bb98ba1 Translated using Weblate (Russian)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:54 +02:00
Pedro Moreira 60440094ba Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-04-14 23:19:54 +02:00
Laurens Holst c198e5ee15 Translated using Weblate (Dutch)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:54 +02:00
김랑기 ceedfd9b7e Translated using Weblate (Korean)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:54 +02:00
Pedro Moreira a4fbbaaa0b Translated using Weblate (Korean)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:54 +02:00
Pferd O 6cbdac5bf1 Translated using Weblate (German)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-14 23:19:54 +02:00
Seth Hillbrand 26629928c3 Incremental updates should not clear globals
Netclass assignments are stored in the project level but
CONNECTION_GRAPH updates would clear the assignments.  This keeps
existing netname->netclass assignments but updates any netnames that
were changed by the incremental updates.  Absolute updates are not
affected and fully recreate the net name to netclass map

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

(cherry picked from commit e538b98286)
2024-04-14 14:14:38 -07:00
Seth Hillbrand 55c864ec45 Fix incremental connectivity
The connectivity routine would consider symbols, overwriting unused
subgraphs for pins that were not in the change list.  This is resolved
by updating the full connectivity to only use pins in the graph since
symbols are not connected independently.

In the process of adding QA tests for this change, additional issues
with the schematic QA were discovered.  Specifically, we were not
properly setting the root sheet UUID.  This was partially masked by a
const_cast setting of the RefDes in sch_symbol when called the RefDes
getter.  This exposed the fact that our QA ERC numbers did not match the
schematic editor stand alone ERC numbers.  So the test value for one
check needed to be updated

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

(cherry picked from commit a9f35ba42e)
2024-04-14 14:14:38 -07:00
Seth Hillbrand 07b5fd342a Ensure that we are not calculating self-collision
Ratsnest may have connections from a zone to two different items.  This
should be avoided as we never want to draw the ratsnest line with the
same element as start and finish

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

(cherry picked from commit 8760519a87)
2024-04-14 13:50:44 -07:00
Seth Hillbrand 4481fcc75e Check for valid shared pointer before locking
We don't neccesarily have a valid pointer to the parent lib symbol when
checking if it is a power symbol, so fall back to the local flag if this
is the case

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17182
2024-04-11 14:42:53 -07:00
Seth Hillbrand a155dd32e8 Do not set optional defaults
In the file format, the 'mirror' tag is optional (not written unless on)
so we cannot default the new text to 'mirror' on just because the
footprint is on the back layer as it won't be turned off by the
footprint loader.

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

(cherry picked from commit d0fe2e06aa)
2024-04-11 09:43:55 -07:00
Wayne Stambaugh c4c804edf7 Update hierarchy navigator when undoing or redoing sheet name changes.
Use new schematic commit object in the edit sheet properties dialog.

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

(cherry picked from commit ec310ac3ed)
2024-04-11 10:51:04 -04:00
Wayne Stambaugh b26ca0e21a Maintain hierarchy navigator expansion state between edits.
Prevent the hierarchy navigator from being rebuilt unless there are actual
sheet changes that would cause a change to the tree.

Save the tree expansion state before rebuilding the tree and then restore
the expansion state to the previous state sans edits.

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

(cherry picked from commit 797ab998cc)
2024-04-11 10:32:40 -04:00
Alex Shvartzkop 97b15a1708 Show actual IO_ERROR message at VRML import.
https://gitlab.com/kicad/code/kicad/-/issues/17727
2024-04-11 14:36:44 +03:00
Seth Hillbrand e808ab7409 Re-add routine to remove duplicate points
The router needs to elimitate duplicate points but keep colinear
segments.  This re-creates the partial routine from the old Simplify()
function

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

(cherry picked from commit 59f99d9a6a)
2024-04-11 14:20:50 +03:00
Huang Rui 7dc8527022 libgit2-1.8.0 compatibility: adjusted parent pointer type
- Adjusted parent pointer type in git_commit_create call for compatibility
  with libgit2 1.8.0 and above.
- Included preprocessor checks to maintain support for versions older than
  1.8.0.
- Ensures consistent function behavior across different libgit2 versions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536
Signed-off-by: Huang Rui <vowstar@gmail.com>


(cherry picked from commit 1cbf6a1872)
2024-04-11 08:45:19 +00:00
afkiwers f7765ea5b9 add support to update an already existing field
(cherry picked from commit d45911f54b)
2024-04-09 23:37:52 +00:00
Marco Ciampa f1d687cfdb Updated Italian translation 2024-04-08 23:17:23 +02:00
Marek Roszko 57468c29f9 Use kicad-vcpkg fork of liblzma to fix builds
(cherry picked from commit 6ac1f39e62)
2024-04-07 14:55:55 +00:00
Jon Evans 30df673ffa Check for bus no-connects in ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13285


(cherry picked from commit ce846f5c22)
2024-04-07 12:50:45 +00:00
Jon Evans 55b7852a65 Disable lazy-loading of 3D models on macOS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17198


(cherry picked from commit b36312ff24)
2024-04-07 12:21:11 +00:00
JamesJ 026685ee48 Check a SHAPE_POLY_SET outline exists before attempting to get it by index
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17687
2024-04-06 20:17:39 +02:00
Jon Evans 8b5c292397 Fix SWIG wrapper for AddPrimitive
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17676


(cherry picked from commit c1e7668d80)
2024-04-05 03:09:35 +00:00
Marek Roszko 941420abed Add missing gltf find in occ 7.8
(cherry picked from commit 58913a0616)
2024-04-03 01:07:18 +00:00
Jon Evans a042d1aab4 Show all library children if library name matches search 2024-04-02 18:51:19 -04:00
Jon Evans 53c2543474 Fix parsing of legacy text hide token 2024-04-02 18:26:30 -04:00
Alex Shvartzkop bac0820864 Improve moving, rendering and plotting of very small angle arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17110


(cherry picked from commit b905b4eac8)
2024-04-02 21:41:09 +00:00
Seth Hillbrand e0381f25f7 Prevent OOB access in polygon split
Check for vertex placement against original size.  Since we are
potentially adding vertices that are out of order with the original
polygon, we only want to check against the first set of vertices when
checking for polygon collision

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

(cherry picked from commit 8260c174e9)
2024-04-02 11:23:30 -07:00
Mike Williams ce2ea3f3ae PCB: update footprint field when changing footprints
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17598
2024-04-02 08:18:23 -04:00
Seth Hillbrand c0d38de280 Add some corrections to IPC2581 export syntax
Outline fonts need lineDesc
Padstack def need the location for the pad relative to the padstack

(cherry picked from commit 2123e2ca9c)
2024-04-01 22:59:40 -07:00
Marek Roszko 9a728c37df Use macro not function for the occ lib find
(cherry picked from commit 303bc19ce8)
2024-04-02 01:55:08 +00:00
Seth Hillbrand 6be6210b67 Recreate teardrop QA board for v8 2024-04-01 17:55:29 -07:00
Seth Hillbrand b21165722b Forward and reverse test for point in poly collisions
(cherry picked from commit 4e6cd0d293)
2024-04-01 17:55:29 -07:00
Seth Hillbrand fd5d68ca9b Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

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

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9f26cbb89a Add colored tab to fileicons
Allows differentiation when Windows badges the bottom left

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

(cherry picked from commit e11cc322fd)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 0dc894356b Check singular arcs connection
Even if there are no other segments in the line chain, we still should
check for arc connections in cases of individual arcs on a line chain

(cherry picked from commit 6b915049d1)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6b5acdea1f When dragging a via, we need to get all obstacles
The clearance epsilon should not be used to limit which force elements
we return in the query.  Otherwise, we can drag elements into a
DRC-violating space

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

(cherry picked from commit 5e850911c5)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 892c5726f5 Move logging message after vertex check
When creating the list, we may have fewer than needed vertices, which
prevents calculating the area

(cherry picked from commit 6c05f2c67c)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6c7261a223 Utilize hash_combine to avoid hash collision
Most of our pointers will share the top 32 or more bits of their pointer
addresses, making cache collisions highly likely.  This uses a hash
combiner to mix the bits more effectively

(cherry picked from commit e4756c811e)
2024-04-01 17:55:29 -07:00
Seth Hillbrand ae11213622 Handle small holes in DRC Connection width test
If there is a small hole (smaller than the conn width), we can loop
around in a circle checking all points and not move past the mimimum
distance.

To avoid this, if we detect a loop, we exit the substantial checker.
This should return with true because a large hole will return true and
we are only checking to see if there is a minimum amount of copper
between two open areas

(cherry picked from commit c841d0df6d)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 4bf35cbed8 Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

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

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 7916e56963 Avoid crashing on missing tracks in CADSTAR
We can't assume that the ignored connection exists when trying to set
the junction size.  We use int_max for the default instead of 0 so that
later, we don't try to create a minor track with 0 width in loadNets()

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

(cherry picked from commit 00d108498f)
2024-04-01 17:55:29 -07:00
StefanBruens b9b4ff6f5e Fix triangulationValid check race for zone fill
The m_triangulationValid flag is used in several places without holding
the mutex, thus it should only ever be set when the triangulation is
guaranteed to be valid.

This can either be done by protecting both data and flag by the same
mutex, or updating the flag only after the triangulation has finished.

Also fix the case when the triangulation actually fails, the flag should
not be set in this case.

While at it, simplify the recalculation check. Only if both the
triangulation is valid, and the data hash is unchanged the recalculation
can be skipped - this is typically the case when two threads try to
update the cache concurrently, the second one will block at the mutex,
and will see the valid data after the first thread has finished.

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

(cherry picked from commit e07b4ce8e4)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 734222bd88 Fix race condition in zone fill
When checking collisions, the SHAPE_POLY_SET::Collide() routine is not
const because it will regenerate the triangulation cache if it is out of
date (using a const_cast, grrr).  This sidesteps the issue by assigning
a mutex to the triangulation caching

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

(cherry picked from commit 81cb6d0c3f)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 01590385c7 Handle issue with alternate SHAPE_LINE_CHAIN
SHAPE_LINE_CHAIN_BASE can include things that are not SHAPE_LINE_CHAIN
like the triangle SHAPE_LINE primitive.  To check arcs, we need to avoid
these elements as they do not have the full SHAPE_LINE_CHAIN class
available.

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

(cherry picked from commit 347c50b26d)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9be4bf0d14 Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

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

(cherry picked from commit 3cc1617f5a)
2024-04-01 17:55:29 -07:00
Seth Hillbrand b1677d5f47 Clean and standardize cross-probing action
Between schematic and pcb editors, we want the following actions:

- Single click on ERC/DRC item should show the item in the ERC/DRC
  window.  But if the window is not visible, it should only update the
  status bar
- Double click on ERC/DRC item should show and raid the ERC/DRC window
  as well as select the line item

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

(cherry picked from commit 0f57d76ecd)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 1e13a7640e Tidy up some remaining triangulation cases
Found and fixed a few corner cases where triangulation point removal
could reset expected points

(cherry picked from commit 553e4a25bf)
2024-04-01 17:55:29 -07:00
Marek Roszko 804283877c Fix cmake find of opencascade libraries for occt 7.8
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17654


(cherry picked from commit c8e41dcfe8)
2024-04-02 00:50:12 +00:00
jean-pierre charras 65ace8d03d 3D viewer: Allow setting colors not in board stackup, when use board stackup option is set.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17632
2024-04-01 09:38:24 +02:00
Seth Hillbrand 890376d04f Do not use cache when we modify vertices
When we add vertices to the tesselation routines, we cannot reuse these
without the original vertex points.

It may be possible to copy and modify the vertices from the hint data so
that they are properly positioned but naive attempts (moving based on
first point) did not work, so for now, we disable the hint cache when
the vertex sizes do not match as this prevents OOB access

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

(cherry picked from commit 06b199fd41)
2024-03-31 15:01:16 -07:00
JamesJ 18990587b9 Only delete grouped / generated BOARD_ITEMS from the root item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527

This is required as during an undo / redo operation, rebuilding
the previous selection can result in a group / generator being
selected as well as all of their contained items. This prunes
the contained items to remove the possibility of a double-delete.

(cherry picked from commit 6c73f1feef28925bf26fcc3669cb6333aad5f1d3)
2024-03-30 14:20:58 +00:00
James J 75ef003747 Add option to preserve custom power flag values in Update Symbols from Library dialog
(cherry picked from commit bf7896a0e1)
2024-03-30 14:15:29 +00:00
Marek Roszko b9a6f47929 Fix DRC slowdown due to UI yields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17434


(cherry picked from commit fd501b4bc8)
2024-03-30 03:34:27 +00:00
Jeff Young 857219d70d Fix merge error. 2024-03-29 18:26:14 +00:00
Jeff Young 92275c41cc ADDED: Expose units and DeMorgan to properties system.
(Also fixes inheritance bug in LIB_PIN's properties.)

(cherry picked from commit 58df9c96f4)
2024-03-29 17:49:48 +00:00
Jeff Young 09985988e7 Fix footprint undo for new UUID caches.
The footprint's children get swapped by the parent's std::swap
call, so they need to get removed/added to their parent around
the swap.

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

(cherry picked from commit 2c21ef1ed0)
2024-03-29 17:48:12 +00:00
Jeff Young 524d431438 More defensive coding for KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit 2f2c42a06b)
2024-03-29 17:46:07 +00:00
Jeff Young ccd052cc99 Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit a53bc9e026)
2024-03-29 17:46:04 +00:00
Jeff Young 1f461c7508 Close active cell editor when showing/hiding columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17425

(cherry picked from commit f3ce3bc758)
2024-03-29 17:45:35 +00:00
Jeff Young 4bea619855 Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543

(cherry picked from commit fc572bfbc6)
2024-03-29 17:45:13 +00:00
Jeff Young f3621496fb Don't show hidden text in symbol previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17526

(cherry picked from commit 1e6eb652aa)
2024-03-29 17:44:47 +00:00
Jeff Young 1238c081c6 Expose groups to property manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17496

(cherry picked from commit 82c851a4a7)
2024-03-29 17:44:14 +00:00
jean-pierre charras 663e857df6 3D viewer: fix some graphic issues:
Avoid issue when a copper layers thickness is 0 (min value is now 1 micrometer)
Fix incorrect rendering of plated graphic items and vias (vertical walls not drawn)
From master branch
2024-03-29 07:39:49 +01:00
Seth Hillbrand 92ffd898f5 Update triangulation to handle poly-intersection
Polygon intersections happen against the original outline, not against
the currently remaining polygon.  This avoids pathalogical cases

Adds new simplification system to avoid duplicated points
Adds new edge-splitting algorithm to provide additional fall-back
Verifies that polygon cuts do not swap holes for outlines (negative
area)

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

(cherry picked from commit c3f6a84d66)
2024-03-28 13:55:06 -07:00
Céleste Wouters 76e0f94532 Improve SHAPE_POLY_SET fracture performance
Refactors `SHAPE_POLY_SET::fractureSingle()` to be more efficient, while
not changing the actual algorithm:

* increase cache locality by using contiguous arrays instead of what was
effectively a linked list
* reduce latency and jitter by replacing per-edge allocator calls with
ahead-of-time std::vector reserves
* increase cache efficiency by making the vertex struct smaller
* replace O(n^2) leftmost edge search with O(n log n) std::sort
* sort the polygons instead of the edges
* cut iteration count in half in the remaining O(polygons * edges) part

(cherry picked from commit e98c9f283f)
2024-03-28 13:10:43 -07:00
Seth Hillbrand ff2d0cfb10 Fix typo in triangulation return
(cherry picked from commit a793fa8b17)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 1cc10be443 Skip small triangles
The minor triangles cost the same amount of compute time as larger ones
but do not have a material effect on the zone display.  This skips these
minor triangles when earcutting

(cherry picked from commit a58e7b37ff)
2024-03-28 13:10:43 -07:00
Seth Hillbrand d2db96886d Add logging and area check to tesselation
Logging is useful when we find an area that cannot be triangulated.
This will be used to generated test cases.

Skipping minor untesselated areas means that the polygon will still be
considered fully tesselated (and not sent back again and again) even if
the tesselation misses an area less than the configured limit.
Currently, this is 31^2nm.

(cherry picked from commit 7e7fec69f6)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 3d4a7c7c3f Update triangulation
(cherry picked from commit 4f03bb2fb6)
2024-03-28 13:10:43 -07:00
arturo182 d46139d5e3 kicad_advanced: Make OCE tesselation deflection configurable
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17168

(cherry picked from commit 41147dc3b3)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 40f938dc75 Sort netnames in properties panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15590

(cherry picked from commit c3a5b92ed0)
2024-03-28 13:06:18 -07:00
JamesJ 30dbafaf7c Use bulk BOARD_LISTENER calls following undo or redo operations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17561
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17420

(cherry picked from commit f51e775f26)
2024-03-24 19:39:25 +00:00
Alex Shvartzkop 05dedbd892 Fix spelling mistake.
(cherry picked from commit bd59fb7768)
2024-03-23 18:43:47 +00:00
Alex Shvartzkop c0dba1e00d Don't print unnecessary digits after decimal point for imperial units.
1 nm = 0.00003937 mils = 0.00000003937 inches,
So there's no reason to print more decimal places than 5 for mils and 8 for inches.

Related: https://gitlab.com/kicad/code/kicad/-/issues/15539


(cherry picked from commit 93581607a8)
2024-03-23 18:40:11 +00:00
JamesJ cc3e57b52f Don't re-highlight nets on every bulk segment change in net inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17068
2024-03-23 15:35:21 +00:00
Alex Shvartzkop 70a6697c16 Fix warning due to unused angle in EasyEDA Pro schematic parser.
(cherry picked from commit 1c7e3871b5)
2024-03-23 14:52:05 +00:00
wh201906 869f30e291 Add toggleHV45Mode item to the measure tool's context menu
The behavior of the measure tool is influenced by the
horizontal/vertical/45-degree mode, but the context menu of the measure
tool lacks an option to toggle this mode. In contrast, the drawing
tools are also affected by this mode, and their context menu has the
item to toggle this mode.


(cherry picked from commit 806daecf85)
2024-03-23 13:33:32 +00:00
Jeff Young 4c78652690 Ignore graphic shapes that implement netties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit 88c1fa3e26)
2024-03-23 13:19:37 +00:00
jean-pierre charras afcda88ee3 GERBER_JOBFILE_WRITER: use UTF8 encoding according to current specif.
Since 2020, non ASCII7 chars are encoded using UTF8 encoding.
A old but incorrect encoding was previously used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17534
2024-03-22 10:09:47 +01:00
dsa-t 605fe4ce99 Disallow cross-probing when not on Symbol Fields Table Edit tab.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17531


(cherry picked from commit db12f2af49)

ce625541 Disallow cross-probing when not on Symbol Fields Table Edit tab.
2024-03-21 19:09:34 +00:00
Jeff Young a3ee317277 Fix copy/pasta in tooltips.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17515

(cherry picked from commit 913e6b47d7)
2024-03-21 18:19:48 +00:00
Jeff Young f7bce264bb Don't take too long worrying about very small exposed areas.
(And in particular, don't take forever if the min / 10 results
in step being 0.)

(cherry picked from commit b285545aee)
2024-03-21 18:19:48 +00:00
jean-pierre charras dfe6cb7afa Do not run DRAWING_TOOL::PlaceTuningPattern() inside the footprint editor
The footprint editor cannot run the router.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17522
2024-03-21 15:22:13 +01:00
jean-pierre charras 8bdc62c111 Avoid using a nullptr. 2024-03-20 18:35:26 +01:00
Alex Shvartzkop 350687f355 STEP export: add location info to edge add failures.
(cherry picked from commit 800ff9ffb1)
2024-03-19 23:11:20 +03:00
Alex Shvartzkop 3a5a911012 STEP export: handle small segments connecting two arcs better.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17499

(cherry picked from commit 75037dd1d1)
2024-03-19 22:55:17 +03:00
Roberto Fernandez Bautista b40d19eb79 nanodbc: Fix use after free
Cherry picked from upstream commit e24383436703c9151af1e22652e7d4dbbb52fc15

https://github.com/nanodbc/nanodbc/commit/e24383436703c9151af1e22652e7d4dbbb52fc15
(cherry picked from commit 69107816f1)
2024-03-19 18:56:43 +01:00
jean-pierre charras 3e4ca3a1c7 Step exporter: workaround to fix issue for boards with main round outline
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17446
2024-03-19 16:13:13 +01:00
Mark Roszko 663918107e Add missing text var override to cli gerbers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17283

(cherry picked from commit d904535a15)
2024-03-19 14:35:30 +00:00
Mike Williams 1ac1f0445f prettifier: add newlines to golden samples 2024-03-19 09:46:42 -04:00
Mike Williams bce982877c prettifier: add newline to end of file
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17480
2024-03-19 09:46:42 -04:00
Jeff Young 9704543b7a Don't assume all glyphs are outline with an outline font.
Underline and overbar may be stroke glyphs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17478
2024-03-18 22:20:44 +00:00
jean-pierre charras f90c3ef075 hotkey selector dialog: accept hotkey using Alt key modifier on Windows.
On Windows, Alt key is specific, and the dialog did not accept the modifier

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17453
2024-03-18 18:19:39 +01:00
wh201906 11177bf658 Fix selected item count in the properties panel
The code for updating selected item count is skipped if the properties
items don't change.


(cherry picked from commit 3f2e3d89e2)
2024-03-17 22:27:05 +00:00
Jeff Young 81f55dfc9c Fix layer swapping for multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17371

(cherry picked from commit 44c14b1935)
2024-03-17 12:40:58 +00:00
Roberto Fernandez Bautista c935ef890a Database library cache: fix memory leak
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17435

(cherry picked from commit 4851b0f1ac)
2024-03-17 11:41:46 +01:00
jean-pierre charras 71af5b106a Demos update 2024-03-16 14:55:47 +01:00
jean-pierre charras d24012bef5 Revert "Demos update."
This reverts commit b4131f2575.
Files from 8.99 were committed by mistake
2024-03-16 14:55:47 +01:00
Wayne Stambaugh e904731e28 Do not update schematic connectivity for irrelevant property changes.
Prior to this change, the schematic connectivity was updated any time a
change was made to a connectable object.  Now the connectivity is only
updated when an object change actually affects the connectivity.  Other
properties like line width, fill type, custom fonts, etc. will not cause
the connectivity graph to be rebuilt.

The SCH_COMMIT flag SKIP_CONNECTIVITY has been removed.  All schematic
objects can test if they are connectable and if there have been changes
to any connection properties that require a connectivity rebuild.

Remove duplicate rebuild connectivity calls from editor control tool.
This was causing the tangling end test to get called four times on every
undo and redo action because the dangling end test is already called in
the connectivity graph calculation code.

Update connectivity when changing label names which fixes an unreported
connectivity bug.

(cherry picked from commit c5a02fc266)
2024-03-16 09:36:56 -04:00
Mojca Miklavec dcd304c5d8 Change the platform detection order
Make sure that windows-specific getWindowsKiCadRoot() is only called on Windows


(cherry picked from commit 01cb1543bb)
2024-03-16 12:23:04 +00:00
Jeff Young 8275176792 Report location of FUTURE_FORMAT_ERRORs when reading footprints. 2024-03-15 22:47:00 +00:00
Jeff Young 8589bd3773 Correctly handle locked token for PCB_TEXTBOX and PCB_TABLECELL.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17439

(cherry picked from commit d17151ac1b)
2024-03-15 22:24:53 +00:00
Jeff Young c07604bb03 Add autocomplete accept & cancel to the hotkeys list.
(cherry picked from commit da2610b93b)
2024-03-15 22:24:53 +00:00
jean-pierre charras b4131f2575 Demos update. 2024-03-15 15:41:16 +01:00
jean-pierre charras b718c228fe Symbol Editor: do not allow to select fully invisible pins and fields
Of course, invisible pins or fields shown by using option Show invisible
pins or Show invisible fields can be selected.
From master branch
2024-03-15 15:03:38 +01:00
jean-pierre charras 3d04d78f76 Symbol Editor do not display bounding box of invisible pins and fields 2024-03-15 15:03:38 +01:00
Yon Uriarte 6ebccdecc6 Responsive: Avoid excessive repaints when toggling a netclass' rastnest visibility.
Toggling netclasses visibility toggles the member nets' visibility one by one. Defer redrawing until all toggling is done.

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

(cherry picked from commit 4e8e14ae3a)
2024-03-15 09:45:09 -04:00
Yon Uriarte 4e8d6de1de Responsive: OPENGL_GAL::DrawArc reserve linequads to reduce drawing time
(cherry picked from commit 77576e1a80)
2024-03-15 09:45:09 -04:00
Yon Uriarte 8b281b4d1c Performance: Cache BOARD::GetMaxClearanceValue
(cherry picked from commit fe1c73ed7c)

1b35a512  Performance
2024-03-15 13:34:19 +00:00
Wayne Stambaugh 8ce12fb1af Fix Eagle footprint library QA test failure.
Unfortunately the KiCad library I/O does not unescape file names so do not
escape them in the Eagle board plugin.

(cherry picked from commit cf97432833)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh 9e4efe5d72 Fix Eagle board import when footprint library versions exist.
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.

The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.

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

(cherry picked from commit 34ec57958d)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh ab6c64b49a Clean up debugging output accidentally left in previous commit.
(cherry picked from commit 33566f88a9)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh dd71173263 Fix broken paste special keep existing symbol annotations.
This was only broken for symbols on the sheet where the symbols were
copied from.  The symbol annotation for all sub-sheets was preserved.

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

(cherry picked from commit 0ff8d21459)
2024-03-15 07:59:20 -04:00
Alex Shvartzkop 89ed09744b Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351

(cherry picked from commit b56ee20e22)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop ddec1d5317 Disable infinite panning when using XWayland.
Cursor warping doesn't work properly in this scenario.

https://gitlab.com/kicad/code/kicad/-/issues/14109
(cherry picked from commit 463b609993)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 50dd6185bb Do not write alpha to the main framebuffer when performing antialiasing.
This allows correct background display when the main framebuffer has alpha.
Noticeable on Wayland with Mesa 24.0.2 Iris driver.

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

(cherry picked from commit bf6ff5b805)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 6df17bba99 Fix rendering/plotting of arcs with tiny angle and huge radius.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17343

(cherry picked from commit 4d66a8ebdb)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop ed89827908 Fix zone cross-probing from DRC dialog.
(cherry picked from commit aa68a3817a)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop b61f6c35c7 Fabmaster (CADENCE ASCII): import dimensions graphics.
See https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit a4da829ccc)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop f9253485da Fabmaster (CADENCE ASCII) import: fix position and orientation of footprint graphics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit cb4ace5561)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 7dc554ec34 EasyEDA Std: fix importing footprints from footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17264

(cherry picked from commit 30573beb48)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop c7608c4bad EasyEDA Std: support multiple schematic sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17219

(cherry picked from commit c056ef407a)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 10ca34e2a7 EasyEDA Std: support Dot and Clock symbol pin styles.
(cherry picked from commit cc181df916)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop e4fc918b11 EasyEDA Std: hide invisible text in symbols.
(cherry picked from commit 69b15e83c5)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop c1a21c9ab1 EasyEDA Pro schematic: place items on root sheet when it's the only sheet.
(cherry picked from commit 563278d0f6)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 4ac848f18a EasyEDA Std PCB: fix crash when Name/Prefix type text is not in a footprint.
(cherry picked from commit 951c550c1e)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop 46faa0f678 Fix assert in BOARD_ADAPTER::createLayers.
(cherry picked from commit f9ad0a434d)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop 4072bc05af Define __cplusplus according to C++ standard version on MSVC.
Otherwise, macros like KI_FALLTHROUGH are not defined properly.

(cherry picked from commit fa6dc95553)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop e196f71d58 Support Altium Schematic ASCII import
(cherry picked from commit defcb49ac8)
2024-03-15 01:17:49 +03:00
Jon Evans b9d3b571bc Allow specifying a minimum for a via_count constraint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17234


(cherry picked from commit 3a3ceb8ffc)
2024-03-14 21:01:30 +00:00
Jon Evans 816e3efbd5 Fix a few LIB_TREE search issues
Don't apply pruning to libraries that don't have
any children, since the point of the pruning is to
hide libraries that don't directly match a search
term if they don't have any children that match.

Fix searching for full LIB_IDs that got broken by
the implementation of "AND"

Fix searching for library names alone

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


(cherry picked from commit 0c2a084a47)
2024-03-14 21:01:13 +00:00
Jon Evans 8afbe544a3 Set description on Altium imported symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16943


(cherry picked from commit 4bc69183ab)
2024-03-14 21:00:58 +00:00
Jon Evans c7b7830495 Add environment variable for configuring stock data home
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15687


(cherry picked from commit 9b54537e38)
2024-03-14 21:00:40 +00:00
Jeff Young af3654d389 Reset penWidth before stroking.
(PlotPoly will have set it to "1".)

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

(cherry picked from commit f22f5f47cb)
2024-03-14 18:07:53 +00:00
Jeff Young 838cefaf48 Default is a valid netclass, even if it's not in m_NetClasses.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17388

(cherry picked from commit dac16a02cc)
2024-03-14 18:07:48 +00:00
Jeff Young 4dca966c5d Don't test non-overlapping non-through-hole vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17426

(cherry picked from commit a091767551)
2024-03-14 18:07:28 +00:00
Jeff Young 2609882346 Update m_LastLegendPosition after setting dirty bit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17411

(cherry picked from commit 7341d4bf37)
2024-03-14 18:07:07 +00:00
Jeff Young 36fc9191b9 Remove netclass/custom rule handling from Track & Via Properties.
(These should be done in Edit > Edit Track & Via Properties.)

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

(cherry picked from commit 4b6a1f4dbd)
2024-03-14 18:06:44 +00:00
Jeff Young 4583522ea2 Make Edit Track & Via Sizes "specified sizes" dropdowns clearer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17216

(cherry picked from commit 1844bf1708)
2024-03-14 18:06:41 +00:00
Jeff Young f0e2adc3df Don't allow selection of footprint text in board editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17271

(cherry picked from commit 25e181db5c)
2024-03-14 18:06:11 +00:00
Jeff Young 091b34c05f Don't show normal cut/copy/paste items in Signals grid.
(Do allow a copy of signal names though.)

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

(cherry picked from commit ed61c5593f)
2024-03-14 18:05:47 +00:00
Jeff Young 09bc9cd77a Grid properties for GerbView.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17372

(cherry picked from commit 1152b0462c)
2024-03-14 18:05:18 +00:00
Jeff Young e893ed4590 Pass symbol's netlist to footprint preview widget.
This allows us to show the pin functions on the corresponding
pads.

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

(cherry picked from commit 72ba31ba27)
2024-03-14 18:04:52 +00:00
Jeff Young c0ad519e53 Run Edge.Cuts & Margin clearance tests on zone layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17292

(cherry picked from commit d1d9636598)
2024-03-14 18:04:06 +00:00
Jeff Young 03af8dcc88 Convert OP text variables pin names/numbers to SPICE vectors.
Also fixes a wrap-around bug in SPICE_VALUE::Normalize() where
it would lose the run of itself if the value was already
normalized to either the largest or smallest UNIT_PREFIX.

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

(cherry picked from commit ff8ddae9bd)
2024-03-14 18:03:42 +00:00
Jeff Young 45e17307a1 Resolve double-indirection CURRENT_DATE in title blocks.
If ${COMMENT1} resolves to ${CURRENT_DATE} then we need to resolve again.

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

(cherry picked from commit da634a618f)
2024-03-14 18:02:50 +00:00
Wayne Stambaugh 357226eb71 Begin version 8.0.2 development. 2024-03-13 11:58:22 -04:00
Wayne Stambaugh ac408046cf Tag release version 8.0.1. 2024-03-13 11:55:00 -04:00
Jeff Young 1b3cf70eef Fix copy/pasta in GetLayerColors().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17374

(cherry picked from commit c8d897ed0f)
2024-03-11 17:48:32 +00:00
jean-pierre charras d295014a8c DIALOG_ERC: fix crash when set to ignore a an ERC violation.
If a ERC violation is set to ignore, all corresponding markers are deleted.
But if one of these markers is selected, a crash happens.
Now all selected objects are deselected before deleting markers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17375
2024-03-11 14:30:08 +01:00
jean-pierre charras c0fd138706 Pcbnew, pdf plotter: fixes and enhancements.
* To select a footprint info, Use the bbox with not text as selectable area
* Fix also incorrect position of footprint bbox when plotting with offset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17355
2024-03-10 13:09:41 +01:00
jean-pierre charras 2af35ac4f1 Gerbview: update view items after reordering/modifying view layers.
Previously, after updating the gerber layer order, displayed D_codes where
not always those corresponding to the active layer.
2024-03-09 18:15:17 +01:00
Wayne Stambaugh b7a193dc3a Tag stable version 8.0.1 release candidate 2. 2024-03-09 07:26:46 -05:00
jean-pierre charras 79e264249c GERBVIEW_FRAME::RemapLayers(), fix incorrect handling of layers visibility
When modifying the gerber layers visibility, other (non gerber) layers must
be not modified.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17282
2024-03-09 08:59:56 +01:00
Seth Hillbrand 51d335c0e8 Temporary fix to disable zone-zone clearance display
When selecting two objects, we display the measured clearance between
them.  This can be problematic with large zones as they have thousands
of triangles.

This is a temporary fix for 8.0.1 to disable the check until we have a
performant version

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

(cherry picked from commit 686a62cbe6)
2024-03-08 10:32:37 -08:00
Seth Hillbrand 2f010e77ea Update Translations 2024-03-07 23:59:22 +01:00
pominglee 848dbb4d43 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8568 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:16 +01:00
Pedro Moreira 6384e7aea5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:16 +01:00
김랑기 519e7bbfd4 Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:16 +01:00
Pedro Moreira 1ad15075f8 Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:16 +01:00
pominglee e21b4517d6 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.4% (8561 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:15 +01:00
CloverGit 31c756addb Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:15 +01:00
김랑기 4ea53e045b Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:15 +01:00
Tokita, Hiroshi 4ceb03a9ce Translated using Weblate (Japanese)
Currently translated at 99.6% (9125 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-03-07 23:56:15 +01:00
109247019824 d0b840697b Translated using Weblate (Bulgarian)
Currently translated at 7.6% (700 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/bg/
2024-03-07 23:56:15 +01:00
pominglee 57b6e5cb85 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.4% (8559 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:15 +01:00
Nguyễn Ngọc Khánh fb3790398d Translated using Weblate (Vietnamese)
Currently translated at 20.9% (1915 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-03-07 23:56:15 +01:00
YÜKSEL AÇIKGÖZ 2a3e2d8f9f Translated using Weblate (Turkish)
Currently translated at 57.4% (5267 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-03-07 23:56:15 +01:00
Wellington Terumi Uemura 0f260d51c5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:15 +01:00
Laurens Holst 28afbe37ec Translated using Weblate (Dutch)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-03-07 23:56:15 +01:00
CloverGit 13aafe828f Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:15 +01:00
ZbeeGin 1769b565f7 Translated using Weblate (Polish)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:15 +01:00
Ranforingus a4ecb998aa Translated using Weblate (Dutch)
Currently translated at 99.5% (9118 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-03-07 23:56:15 +01:00
김랑기 a54af04f4e Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:15 +01:00
aris-kimi 4a260f74fa Translated using Weblate (Greek)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-03-07 23:56:15 +01:00
Jan Straka 984c777286 Translated using Weblate (Czech)
Currently translated at 79.6% (7301 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-03-07 23:56:15 +01:00
CloverGit 33ced12295 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:14 +01:00
Andrej Valek be6d07e962 Translated using Weblate (Slovak)
Currently translated at 64.3% (5895 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
pedrolinharesmoreira d0de1723ed Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.5% (9122 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:14 +01:00
aris-kimi 39378fec87 Translated using Weblate (Greek)
Currently translated at 99.8% (9145 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-03-07 23:56:14 +01:00
CloverGit e8bf38fb24 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9120 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:14 +01:00
Andrej Valek d27f17cef8 Translated using Weblate (Slovak)
Currently translated at 63.3% (5808 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
ZbeeGin c43892814e Translated using Weblate (Polish)
Currently translated at 99.9% (9152 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:14 +01:00
김랑기 41b8e704b7 Translated using Weblate (Korean)
Currently translated at 99.9% (9157 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Pferd O b55c04ddfa Translated using Weblate (German)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-03-07 23:56:14 +01:00
김랑기 587c9f8a27 Translated using Weblate (Korean)
Currently translated at 97.6% (8948 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Henrik Kauhanen a8768b7a20 Translated using Weblate (Swedish)
Currently translated at 99.9% (9159 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-03-07 23:56:14 +01:00
Andrej Valek 10e8dfaca5 Translated using Weblate (Slovak)
Currently translated at 56.9% (5221 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
dsa-t f2d9df65ff Translated using Weblate (Russian)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-03-07 23:56:14 +01:00
ZbeeGin 749ada552e Translated using Weblate (Polish)
Currently translated at 99.7% (9142 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:14 +01:00
김랑기 044e7090be Translated using Weblate (Korean)
Currently translated at 96.9% (8886 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Toni Laiho 3a2b633e28 Translated using Weblate (Finnish)
Currently translated at 99.4% (9107 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-03-07 23:56:14 +01:00
Jeff Young 6ced4f72d0 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:02:16 +00:00
Armin Schoisswohl 0f8dac81cb add include <mutex> to fix compilation under linux 2024-03-07 12:13:42 +00:00
Armin Schoisswohl 1f1b97212b change m_CachesMutex to shared_mutex and do shared locking for read access in zone BBox calculations 2024-03-07 12:13:42 +00:00
Armin Schoisswohl aff3064187 fix deadlock in DRC "Checking keeopouts & disallow constraints" 2024-03-07 12:13:42 +00:00
Armin Schoisswohl d1867bd728 protect cache lookups in pcbnew/zone by locking the mutex before calling find, fix #17237 2024-03-07 12:13:42 +00:00
Mike Williams 1b5e18d95f schematic: legacy kicad schematic files don't have a default description field
Without this, we would parse a legacy schematic symbol field at the same
index as the new description field's index into description, instead of into
a user field.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17202
2024-03-06 11:03:00 -05:00
Jeff Young b57184efe0 Apply anti-walk algorithm only to textboxes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16481

(cherry picked from commit 20efeef5ae)
2024-03-06 13:53:09 +00:00
jean-pierre charras 8a66a7eab0 PROPERTIES_FRAME: fixes a focus issue (perhaps Windows specific).
From master branch
2024-03-06 13:09:28 +01:00
jean-pierre charras e769fdfab0 Pcbnew: do not select a PCB_REFERENCE_IMAGE if the LAYER_DRAW_BITMAPS is not visible.
LAYER_DRAW_BITMAPS layer controls transparency and visibility of images on the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2024-03-06 13:08:07 +01:00
Jon Evans 31ae825b9d Prevent use-after-free of symbol screens
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17204


(cherry picked from commit 1600d8bead)
2024-03-06 03:54:14 +00:00
Jon Evans 98d26e77c9 Update a few more list/tree views for macOS
(cherry picked from commit 1988aac2b3)
2024-03-05 13:39:39 +00:00
Jon Evans 03120161d3 Fix macOS tree icons
Now that we have backported HiDPI support,
we need to actually use it because the old
imagelist functions are explicitly not going
to work on HiDPI systems anymore

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


(cherry picked from commit 34a6e605de)
2024-03-05 13:03:42 +00:00
Marek Roszko ec7abb7bff Fix update notification to use majorminorpatch
(cherry picked from commit 7933dee274)
2024-03-05 01:13:41 +00:00
Wayne Stambaugh fa2ccdd083 Tag stable version 8.0.1 release candidate 1. 2024-03-03 17:08:06 -05:00
Alex Shvartzkop 4096c073b7 EasyEDA Pro import: make sure to use UTF-8 for project.json and device.json.
Also catch exceptions.

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

(cherry picked from commit 219d0c399d)
2024-03-03 21:51:32 +03:00
Alex Shvartzkop 2ad3ccc4d8 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.

(cherry picked from commit 85b1978408)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop 3bab589405 Do not reload window sizes when changing 3D viewer settings.
(cherry picked from commit 337489c77d)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop fab52bd95a Add add_choices accepting std::vector to argparse for convenience.
(cherry picked from commit 1126227206)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop 27e4b2276b Update argparse.
Otherwise .choices doesn't work properly.
See https://github.com/p-ranav/argparse/issues/307

(cherry picked from commit 991b4299d6)
2024-03-03 21:47:23 +03:00
Jan Wichmann 64f8310a94 Don't show hidden directories and files in the project tree browser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16207


(cherry picked from commit 5cdf9fe8a0)

4b9fffa3 Don't show hidden directories and hidden files in the Project tree browser
c433874c Changed file name conversation to utf16
aeba54ba Moved os-specific function to lib KIPLATFORM::IO
561709ac Implemented KIPLATFORM::IO::IsFileHidden for all plattforms
2024-03-03 16:47:38 +00:00
jean-pierre charras e765de6b3d PCB_PAINTER: do not draw PCB_SHAPEs on netname layer in FP editor.
Fixes #17250
https://gitlab.com/kicad/code/kicad/-/issues/17250
2024-03-03 17:02:19 +01:00
Wayne Stambaugh 742529da26 Update net navigator when cross probing from board editor net highlight.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16838

(cherry picked from commit 66925ec2a2)
2024-03-03 08:57:54 -05:00
jean-pierre charras b728eae651 plot_board_layers.cpp: when plotting pads, Save/restore corner radius ratio
instead of corner radius.
The corner radius comes from corner radius ratio, so saving/restoring the corner
radius can create rounding errors when trying to recalculate the ratio from the radius.
2024-03-03 11:58:11 +01:00
jean-pierre charras 676e70ec18 French translation update 2024-03-03 08:32:51 +01:00
Jon Evans 13fabb0564 Correctly handle footprint graphic knockouts for no-net case
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit ed18a9bcc2)
2024-03-02 20:39:56 +00:00
Jon Evans 4dc4b2bd51 Set schematic as default screenshot
(cherry picked from commit b8f4bef3f8)
2024-03-02 20:07:26 +00:00
Jon Evans 32e6f424ec Remove project manager from screenshots
It's not very important or visually appealing,
let's just use the editors as the way to represent
KiCad in software centers that show screenshots.


(cherry picked from commit fdc16fe60d)
2024-03-02 20:07:15 +00:00
Marek Roszko 3890278505 Make the update check cmake option default for all platforms
(cherry picked from commit 46f9a9a005)
2024-03-02 19:18:07 +00:00
Jeff Young 1664e02fa6 Don't draw the selection if it's not from the current screen.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17132
2024-03-02 18:56:57 +00:00
Roberto Fernandez Bautista 63ffca0173 Step exporter: handle circles correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17137
2024-03-02 19:11:14 +01:00
Roberto Fernandez Bautista ff4b59afeb kicad_cli fp ugrade: create directory with extension 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 64382a85fa SHAPE_LINE_CHAIN: Fix indices rotation after clipper
Also fix IsArcStart and IsArcEnd functions to work with chains that only
have arcs.
2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 4c51391cf6 SHAPE_LINE_CHAIN: Move .h definitions to .cpp
No functional changes, just allow faster rebuilds
2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 5add7a0ca0 SHAPE_LINE_CHAIN: Fix/unify constructors 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 8340779f5b SHAPE_LINE_CHAIN: Add test case of seg+large angle arc 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 01cc91850c Sanitise filename before saving footprint library 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 091f9c82e1 kicad_cli: Allow upgrade of legacy and non-kicad footprint libraries 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista f7ddd211d9 kicad_cli: Allow upgrade of legacy and non-kicad symbol libraries 2024-03-02 18:22:18 +01:00
Jeff Young 8dce6c0b67 Don't steal command-keys from a wxGrid.
It's unlikely to win you friends.

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

(cherry picked from commit 1082930c34)
2024-03-02 15:29:00 +00:00
jean-pierre charras 655cee523b Eeschema: fix crash when editing a old legacy schematic with missing libs,
and trying to edit a dummy symbol. (crash due to a null pointer due to missing lib)
From master branch
Fixes #17232
https://gitlab.com/kicad/code/kicad/-/issues/17232
2024-03-02 15:32:37 +01:00
Jeff Young fa4d759fcb First alt-pin menu item must be fetched from the LIB_PIN.
(The SCH_PIN will return any alt function already assigned.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17221
2024-03-02 12:16:33 +00:00
jean-pierre charras 25b033df2a FOOTPRINT_CHOOSER_FRAME: rework on bottom panel to allow a long string in
the check box for filter by FP names to be displayed without overlapping other
widgets.
2024-03-02 12:51:16 +01:00
Jeff Young a0905ac87d Check for NETINFO_ITEM before dereferencing it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17230

(cherry picked from commit bd1d449cd3)
2024-03-02 11:37:58 +00:00
Yon Uriarte 3d67ab72c6 Performance
Cache VIEW_ITEM's bbox in VIEW_TREE for faster removals.

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

(cherry picked from commit 464f185387)
2024-03-02 00:06:24 +00:00
Seth Hillbrand ecb0c9b5d4 Limit where the intersection of two lines can be
This avoids generating lines where we are unable to select them because
they get too close to the border

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

(cherry picked from commit 0129191ec0)
2024-03-01 15:57:45 -08:00
Jeff Young 53d8e2c8c3 Separate "use board stackup colors" into separate checkbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17085

(cherry picked from commit 8dddd9cc2c)
2024-03-01 23:45:37 +00:00
Seth Hillbrand 22f66fdf2f Don't wait for unused events
We only need the UI update and mouse/keyboard while updating our DRC
window.  Waiting for other events gets into a race condition with the
schematic editor that can cause a hang

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

(cherry picked from commit 14667e2033)
2024-03-01 15:22:48 -08:00
Seth Hillbrand a7c09964ba Update contributors
(cherry picked from commit e7d4127f99)
2024-03-01 13:46:14 -08:00
Seth Hillbrand 1e03266dfe Do not re-number aperture pads
Aperture pads do not have numbers, so reserving space for them will
cause the actual numbered pads to become out of order

(cherry picked from commit d3334ed9f0)
2024-03-01 13:04:47 -08:00
jean-pierre charras 09f32d8c86 FOOTPRINT_CHOOSER_FRAME: Fix a UI problem specific to Linux
On the bottom on the frame, some widgets were not correctly placed.
Fixes #17217
https://gitlab.com/kicad/code/kicad/-/issues/17217
2024-03-01 20:08:49 +01:00
Alex Shvartzkop 67208df602 Improve 3D appearance manager preset compare.
(cherry picked from commit 656821b282)
2024-02-29 19:13:12 +00:00
Jeff Young 8047eed6f8 The ruler tool is not part of InteractiveEdit.
(In particular, it should not return true to IsEditorTool().)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-29 17:56:25 +00:00
Jeff Young dafd62ddba Unflip when going to viewport which isn't flipped.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13773

(cherry picked from commit c23550dc0b)
2024-02-29 17:38:32 +00:00
Jeff Young 41f9baf9dc Cleanup. 2024-02-29 17:38:18 +00:00
Jeff Young 1cd5827078 _() -> _HKI() for group names.
(cherry picked from commit d08e0e9eaa)
2024-02-29 17:38:18 +00:00
Jeff Young b07d43a24a Expose text size for SCH_FIELDs.
(cherry picked from commit 2dce618f9f)
2024-02-29 17:38:18 +00:00
jean-pierre charras 985c3ad92a GERBER_PLOTTER, round-rect aperture: ensure primitives have non null size.
for round-rect pads with a radius = 50% of the smaller dim, one of primitives
used to create the shape can have a 0 size.
Ensure a min size >= 10 nm (It should not create a actual change)
2024-02-29 18:07:02 +01:00
Alex Shvartzkop 978fa63490 Allow .kicad_sym in Import Symbol filters.
(cherry picked from commit cd27f801f6)
2024-02-29 14:36:57 +00:00
Alex Shvartzkop c59fac4089 Use a version string without the extra packaging info in drawing sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17176
2024-02-29 04:24:16 +03:00
Alex Shvartzkop 0dab086f0c EasyEDA Std import: support multiline text on PCB.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17171
2024-02-29 03:54:01 +03:00
Seth Hillbrand 7d1adff071 Store group id rather than group
We only need the group storage id for lookup.  Storing the KIID instead
of a copy of the group avoids unneeded overhead

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17175
2024-02-28 13:27:08 -08:00
Seth Hillbrand 38df918993 Correct usage signature for PNS_NODE::Add()
When moving a unique_ptr, you are actually passing the object, not a
reference to the object.  So we either std::move with the bare
unique_ptr parameter or we pass a reference.  But we should never pass
an rvalue reference for this or we'll make a copy without holding the
tracking (because it was moved)

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

(cherry picked from commit b2a25cb59e)
2024-02-28 10:11:20 -08:00
Seth Hillbrand f45df48498 Fix memory leak in net inspector dialog
(cherry picked from commit a8880fb63e)
2024-02-28 10:11:13 -08:00
Seth Hillbrand 898b5bd992 Update translations 2024-02-28 09:53:46 -08:00
Andrej Valek 100023e36f Translated using Weblate (Slovak)
Currently translated at 55.3% (5078 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
Andrej Valek d8ca6eda7e Translated using Weblate (Slovak)
Currently translated at 55.1% (5060 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
Andrej Valek 4d02817415 Translated using Weblate (Czech)
Currently translated at 79.8% (7326 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-02-28 18:50:56 +01:00
CloverGit ef281317ee Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9143 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-02-28 18:50:56 +01:00
Ivan Chuba 16ea51fe5c Translated using Weblate (Ukrainian)
Currently translated at 88.1% (8088 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/uk/
2024-02-28 18:50:56 +01:00
Mahsum Aslan b70ff8a120 Translated using Weblate (Turkish)
Currently translated at 51.2% (4705 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-02-28 18:50:56 +01:00
Andrej Valek b3572c4ba2 Translated using Weblate (Slovak)
Currently translated at 53.6% (4921 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
김랑기 b8859df610 Translated using Weblate (Korean)
Currently translated at 96.3% (8838 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-02-28 18:50:56 +01:00
CloverGit a26ed45b55 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9142 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-02-28 18:50:56 +01:00
Jan Straka cd3c2899d8 Translated using Weblate (Czech)
Currently translated at 79.8% (7325 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-02-28 18:50:56 +01:00
Laurens Holst 74f1fadcf2 Translated using Weblate (Dutch)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-02-28 18:50:56 +01:00
Ulices 6de3859d2c Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-02-28 18:50:55 +01:00
Jeff Young 04440d8506 Check env vars when testing for unresolved variables.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17174
2024-02-28 17:16:20 +00:00
Wayne Stambaugh 9508b79cc3 Fix sheet pin align to grid issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16920

(cherry picked from commit 141d03c266)
2024-02-28 12:00:01 -05:00
Alex Shvartzkop bec068324e Keep schematic text upright (especially when opening v6 schematic).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17082
2024-02-28 18:25:08 +03:00
jean-pierre charras b4e993e6e8 French translation update 2024-02-28 15:03:17 +01:00
jean-pierre charras 57b9b1b6b6 Add option to Footprint Chooser to switch between the selected fp or its 3D view
Fixes #16173
https://gitlab.com/kicad/code/kicad/-/issues/16173
2024-02-28 14:42:17 +01:00
jean-pierre charras fce4ec6a9b Eeschema, DIALOG_CHANGE_SYMBOLS: fix incorrect initial lib link name when
changing symbols: the "old" displayed link was in fact the new link because
the link was updated before the report is created.
Fixes #17162
https://gitlab.com/kicad/code/kicad/-/issues/17162
2024-02-28 11:23:35 +01:00
Alex Shvartzkop c4a7af8a47 Cairo GAL: fix endianness check. 2024-02-28 04:11:02 +03:00
Alex Shvartzkop d359fb8ab9 Cairo GAL: reduce buffer allocation sizes.
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.
2024-02-28 03:50:17 +03:00
Alex Shvartzkop 5618a6925d Cairo GAL: improve empty canvas performance (-80% CPU) 2024-02-28 03:50:17 +03:00
Jon Evans e383c67e7f Avoid nullptr dereference when loading group info
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17154


(cherry picked from commit 9e7b4b7f89)
2024-02-28 00:43:49 +00:00
Jon Evans 12dcdc8bbe Trivial change to avoid crash on tool re-entry
See https://gitlab.com/kicad/code/kicad/-/issues/17164


(cherry picked from commit 299b548a41)
2024-02-28 00:31:37 +00:00
Jon Evans bbd4cfd3d4 Force lib tree row height on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16403


(cherry picked from commit c3af434741)
2024-02-28 00:25:28 +00:00
Jon Evans a9e6031ae6 Remove unnecessary assert
GetModifyHash can be called before a row is loaded


(cherry picked from commit 31fab831ad)
2024-02-28 00:03:37 +00:00
Jon Evans 0b5c0ef639 Expose grid origin action in more places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007


(cherry picked from commit 0df5cf7f75)
2024-02-27 23:52:17 +00:00
Jeff Young 60dbd0ce0d Add wxGrids to list of things that get arrow keys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17144

(cherry picked from commit f754410c7e)
2024-02-27 18:12:40 +00:00
Jeff Young 1fc79b9a46 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16991

(cherry picked from commit a5fda819eb)
2024-02-27 17:16:53 +00:00
Jeff Young aba24ec781 Eagle text anchor points and alignment aren't linked.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17135
2024-02-27 14:59:18 +00:00
Jeff Young 952c154422 Fix wrong rotation centre.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17135
2024-02-27 12:46:22 +00:00
Jon Evans ffa1d19216 Don't rely on dynamic_cast across DLLs
See https://gitlab.com/kicad/code/kicad/-/issues/16998


(cherry picked from commit e9456201a7)
2024-02-27 03:11:17 +00:00
Jeff Young 5b303b268f Cancel autocomplete when STC loses focus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17124

(cherry picked from commit 539bd62a7b)
2024-02-26 22:31:29 +00:00
Jeff Young 50c5b56781 Improve SNR.
(cherry picked from commit d23ee7db3d)
2024-02-26 22:31:29 +00:00
Alex Shvartzkop 35192f5bd4 Initialize git_remote_callbacks structure. 2024-02-27 00:35:52 +03:00
Alex Shvartzkop d84a5e6f03 Initialize git_repository_init_options structure. 2024-02-27 00:25:04 +03:00
Jeff Young d94b0771ca Only change pin assignments from user interaction.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16349
2024-02-26 19:01:07 +00:00
Jeff Young 2f8f7c11f1 Handle single-source DC analyses correctly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17119
2024-02-26 18:10:10 +00:00
Jeff Young 81c22542e4 Fix copy pasta.
(cherry picked from commit 43c45f3ee8)
2024-02-26 12:39:35 +00:00
jean-pierre charras c1755835eb Symbol editor: add option (view menu+toolbar) to show/hide invisible pins and fields
From master branch
Fixes #8020
https://gitlab.com/kicad/code/kicad/-/issues/8020
2024-02-25 17:40:40 +01:00
Jeff Young 11593a7c04 Revert IsAttached() fix as it doesn't handle hotkeys from the main menubar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17101

(cherry picked from commit 6ec51f6a69)
2024-02-25 15:48:19 +00:00
Jon Evans 46555ab975 Fix use-after-free in Altium importer
If the library already contains a symbol with the same name,
SaveSymbol will replace the existing symbol,
which will invalidate a cached pointer.


(cherry picked from commit d939004bbd)
2024-02-25 13:47:30 +00:00
Jeff Young 74339e9a9f Support pin count and footprint filters in symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17105
2024-02-25 13:13:54 +00:00
Jeff Young 2b09653abb Don't import invalid polygons.
If we *do* get a 2-point polygon in SVG, import it as a segment.

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

(cherry picked from commit dba2fdb6d3)
2024-02-25 12:29:02 +00:00
Alex Shvartzkop 1c639714f3 Fix update notice dialog padding. 2024-02-25 13:41:39 +03:00
Jeff Young 45910bc7c1 Don't double-add pads to commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17087
2024-02-24 23:25:23 +00:00
Jeff Young 87944e06ac Fix missing unit initialization.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17076
2024-02-24 22:35:05 +00:00
Jeff Young b37c7afa8a Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17086
2024-02-24 20:05:11 +00:00
Stefan 5713384f35 adding No Layers to apprearance manger presets, fix #15625
(cherry picked from commit ed6f900b70)

b650e80a adding No Layers to apprearance manger presets, fix #15625
6f8de6e3 fix codestyle
2024-02-24 15:44:53 +00:00
Jon Evans 99f9941067 Use deb_system Python sysconfig scheme on Debian 2024-02-24 10:38:55 -05:00
Alex Shvartzkop 339646a267 Remove 50ms delay seen in some actions, like duplicating schematic items. 2024-02-24 18:19:10 +03:00
Alex Shvartzkop 97ff48b426 Add bottom panel to have correct background in fp/sym chooser frames.
See https://gitlab.com/kicad/code/kicad/-/issues/15810
2024-02-24 15:17:28 +00:00
Alex Shvartzkop badc4e7411 Hide unused message panel in footprint/symbol chooser frames.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15810
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15889
2024-02-24 15:17:28 +00:00
Alex Shvartzkop 764de7257f Disable search ctrl cursor management on non-OSX.
Buggy at least on GTK and MSW.
2024-02-24 15:17:28 +00:00
Andrej Krpic 14d71c8ca6 Fix collecting of signals for S-Parameters analysis
(cherry picked from commit 006f93773c)
2024-02-23 20:35:36 +00:00
Yon Uriarte 7d5583f687 Performance UpdateDanglingState
Avoid O(N^2) by spatial sorting, don't run checks if the bounding boxes
don't overlap.
A second copy is ordered by type to help classes that only want to check
a few types having to walk the whole list.

(cherry picked from commit b7b64d959f)
2024-02-23 14:36:50 -05:00
Yon Uriarte ffd470d94d Performance SCH_EDIT_FRAME::SchematicCleanUp
Avoid O(N^2) comparisonis by spatial presorting. If bounding boxes don't
overlap there's no need to run expensive checks.

(cherry picked from commit f3c2083018)
2024-02-23 14:36:36 -05:00
Alex Shvartzkop 0184dfb625 Do not call MakeShapes in AddCopperPolygonShapes when polyset is empty.
Ease of debugging.
2024-02-23 22:14:03 +03:00
Alex Shvartzkop 711c6141a8 Highlight nets and show length tuning status when adding tuning patterns.
Also fixes length preview when hovering over joints.
Also prevents asserts when hovering over arcs.
Also prevents adding a tuning pattern on other tuning pattern.
2024-02-23 17:22:20 +00:00
Alex Shvartzkop fdf38256e8 Fix floating point rounding issues with scaled parameteres in settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17070
2024-02-23 17:22:20 +00:00
Alex Shvartzkop 7eeb1a19cf Fix net selector filter field focus on GTK. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop e68df8e1d1 Performance optimizations for database libraries. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop 3e26e7b646 Normalize SCH_PIN BBox to fix assert. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop a13e4e7d9f Eeschema: select graphical shapes based on effective shapes. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop 6feafedfbe Use correct text color in LIB_TREE selected items on non-OSX. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop ed115075ce Add size range check to BOX2::Inflate. 2024-02-23 17:22:20 +00:00
jean-pierre charras be51c2ba73 teardrops: calculate better points on track for track arc.
Previously, a reference point to calculate teardrop length was calculated
using a track segment. It can create significant position error with track arcs.
Now a arc is used to find this reference point.
From master branch
2024-02-23 17:52:08 +01:00
Jeff Young 78b38cc75f Fix merge conflict. 2024-02-23 16:21:28 +00:00
Jeff Young c8495d81bb Update VDMOS models to ngspice-41 (and later) defaults.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17073
2024-02-23 16:06:55 +00:00
Jeff Young 6aaf2411f6 Apply Pad Properties teardrop terminology to Via Properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17050
2024-02-23 15:52:47 +00:00
Roberto Fernandez Bautista 3f47e03317 Thread safety: replace ++m_modHash by IncrementModifyHash()
(cherry picked from commit d464d7995b)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista 9004f92689 Add cache to SCH_IO_DATABASE to improve loading performance
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17031

(cherry picked from commit 991ddfe6be)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista a928299ae0 Legacy libraries: De-duplicate field names on load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16902

(cherry picked from commit 07ab18a1e6)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista 1a7237f38b Altium: Don't create duplicate fields
(cherry picked from commit 420413969e)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista b3b6637b44 Altium: Don't load library parameters with an owner for now
In Altium many objects can have parameters (including pins). For now
we will drop library parameters belonging to any sub-components of a
symbol.

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

(cherry picked from commit 1a6e6a06eb)
2024-02-23 16:49:35 +01:00
Jon Evans ad311c33c6 Attempt to fix lib search again
The new bits will drop search results that
don't match all tokens in the search string,
which seems desirable.

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


(cherry picked from commit 589e21cd3b)
2024-02-23 14:37:20 +00:00
Jeff Young adae4de438 Don't use EQUALITY flag when doing a symbol diff with library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16944
2024-02-22 23:37:50 +00:00
Jeff Young c8b06d54cb Update Edit Teardrops dialog to match other teardrop terminology.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17050
2024-02-22 23:37:48 +00:00
Jeff Young 51848a0b43 Code cleanup and compiler warnings. 2024-02-22 23:37:45 +00:00
Jeff Young 2d7f4faf72 Set up default netclass wire & bus widths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17024
2024-02-22 23:37:42 +00:00
Jeff Young c75bb5d01a Formatting. 2024-02-22 23:37:39 +00:00
Jeff Young df8f043c16 Improve layout of schematic colors preview.
Also, set pin name/number sizes.  Don't use defaults (which
will get plucked out of the Symbol Editor's settings).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17043
2024-02-22 23:37:30 +00:00
Jeff Young 01d668c09d Rule areas should be allowed on user layers.
Non-board tech layers too.  We don't know how people will
write their custom DRC rules.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17034
2024-02-22 23:37:26 +00:00
Jeff Young f4a3613561 Make sure nets get reassigned when name is changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17025
2024-02-22 23:37:23 +00:00
Jeff Young 12922d9434 Report fp library loading errors with libName & fpName.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16975
2024-02-22 23:37:20 +00:00
Jeff Young b6036f368e When updating RefDes only update the prefix.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16991
2024-02-22 23:37:18 +00:00
Jeff Young 25291d6e3a Check known m_Desc field before m_Fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16971
2024-02-22 23:37:15 +00:00
Jeff Young f4a085575a Show friendly name in toolbar button tooltips.
(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17009
2024-02-22 23:37:13 +00:00
Jeff Young a34b242f4e Delete empty Netclass fields only if there are others.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16997
2024-02-22 23:37:08 +00:00
Jeff Young 8a3cbce8f8 Comments. 2024-02-22 23:37:05 +00:00
Jeff Young a9c4a17c38 Repair copy/paste of footprint fields.
Some of the code got lost in the move to PCB_FIELDs.
2024-02-22 23:37:02 +00:00
Jeff Young 1a7152d3eb Warp after context menu only if actively drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11080
2024-02-22 23:36:59 +00:00
Jeff Young 08da9a4494 Don't modify reference point if already moving.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16524
2024-02-22 23:36:56 +00:00
Jeff Young baaed8ed84 Formatting. 2024-02-22 23:36:54 +00:00
Jeff Young 7446fba70a Keep Mac debugger from crashing with breakpoints in .h files. 2024-02-22 23:36:50 +00:00
Jeff Young d36f189192 Add help text for DRC assertion clauses. 2024-02-22 23:36:47 +00:00
Jeff Young 152c458b9c Help documentation for "assertion" constraints. 2024-02-22 23:36:44 +00:00
Jeff Young 7ae14f9630 Update syntax help for memberOfFootprint. 2024-02-22 23:36:41 +00:00
Jeff Young a610542a19 Various string issues held over from 8.0 string freeze. 2024-02-22 23:36:37 +00:00
Jeff Young 2ab492474e Improve alignment tooltips. 2024-02-22 23:36:34 +00:00
Jeff Young 3caede3799 Ignore duplicate/repeat when drawing an existing item.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16885
2024-02-22 23:36:30 +00:00
Jeff Young 9d40374baf Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934
2024-02-22 23:36:27 +00:00
Jeff Young 0ead8a14a1 Handle holes in shapes when creating bounding hulls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16347
2024-02-22 23:36:24 +00:00
Jeff Young e8b16fc64f Kick PROPERTIES_PANEL a bit harder on language change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16589
2024-02-22 23:36:20 +00:00
Jeff Young 162e8962f7 Add a cache for TrueType contours and triangulation data.
Also returns minimumSegmentLength to its former value as
it doesn't appear to be required to fix
https://gitlab.com/kicad/code/kicad/-/issues/11463.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16568
2024-02-22 23:36:16 +00:00
Wayne Stambaugh fc66cb6805 Begin 8.0.1 development. 2024-02-22 18:13:58 -05:00
Wayne Stambaugh 942661fc10 Tag release version 8.0.0. 2024-02-22 17:58:13 -05:00
Alex Shvartzkop 6ceea747b2 Swap to capitalized strings (translated). 2024-02-22 11:54:52 +03:00
Steven A. Falco b352b1484f Patch clipper for gcc on Fedora 2024-02-21 19:23:49 +00:00
Seth Hillbrand af02650689 Correct length tuning graphics
Resolved the differences between light and dark modes.
Unified the style with the teardrops panel.
Reduced size to 156px tall
Added HiDPI version
Aligned the start/end tracks vertically
Radius is measured to centerline for single
Radius is measured to midpoint between diff pairs
Spacing is measured to interior track centerline
Amplitude is measured to interior track centerline
2024-02-20 12:06:12 -08:00
Alex Shvartzkop dd6213051d Pick DP coupled segment closest to start item and baseline. 2024-02-20 22:06:00 +03:00
jean-pierre charras 01327b24b4 PANEL_SETUP_LAYERS: when removing a layer, do not delete items owned by footprints.
Items owned by footprints are allowed to be on non existing layers on board.
Moreover, items owned by footprint cannot be deleted by the board editor.
Fixes #17038
https://gitlab.com/kicad/code/kicad/-/issues/17038
2024-02-20 18:38:48 +01:00
Jeff Young 012b32e989 Don't leave dangling net pointers on PCB_SHAPEs.
Also makes it harder for this type of error to occur in
future.
2024-02-20 17:36:54 +00:00
Alex Shvartzkop 2e97d5d7cc Add missing check in tuning pattern outline. 2024-02-20 20:32:07 +03:00
jean-pierre charras 0afac71b27 3D viewer: fix the case of circles having a thickness > radius/2
Fixes #17035
https://gitlab.com/kicad/code/kicad/-/issues/17035
2024-02-20 09:20:33 +01:00
Alex Shvartzkop cbfd757d28 Reduce amplitude snap value of tuning patterns. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 10e6ca8740 Show tuning pattern baselines when not editing them. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 59a0635b09 Disable local ratsnest when moving generators (tuning patterns).
They're not moving like normal objects, leaving ghost ratsnest.
2024-02-20 03:20:08 +00:00
Alex Shvartzkop ed712faf41 Disallow duplicating tuning patterns alone. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 5e5effaf3a Ensure minimum outline size in tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16847
2024-02-20 03:20:08 +00:00
Tomasz Wlostowski 82312a0fae router: SplitAdjacentSegments() should check if the end segment we are about to split is in the same net that the head segment
Otherwise, the router might add bogus segments to the node. The root of the problem is somewhere in the logic that delivers aEndItem to ROUTER::Move() though - as the end item (in line placement mode at least) should always be an item within the same net as the head and not belonging to the current head...
2024-02-20 03:20:08 +00:00
Alex Shvartzkop 8d76e4e171 Allow DP meanders to (mostly) fit on adjacent segments. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 943c5fea59 Fix length calculations in DP meander placer. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 29188bdc53 Fix some edge-cases in DP tuning pattern outline. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 4227b1add9 Improve tuning pattern robustness. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 1a65c0091f Tweak default meander settings. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 35e73d7dee Restore green router collision color. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop e9a881ed01 Reset placer when routing start fails to prevent crash on next usage.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17008
2024-02-20 03:20:08 +00:00
Seth Hillbrand 3ad0abae3f Move git fully behind advanced config 2024-02-19 17:19:44 -08:00
Seth Hillbrand 421b95d1fa Update teardrop graphics
Make sure that 'w' is on the minor axis of the pad attachment
Change track ends to "wave" denoting that they continue
Standardize size for each at 275x130px
Add 2x HiDPI version
2024-02-19 17:08:56 -08:00
Seth Hillbrand 89592d08bf Revise teardrop graphics sizes
Sizes were too large on many systems.  Revised panel uses 615px on Linux
instead of 742.  Adjusted line sizes to remain minimum visible width at
new height.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17018
2024-02-19 12:48:36 -08:00
Seth Hillbrand f8c9c1ee70 Update translations 2024-02-19 11:26:55 -08:00
Temuri Doghonadze 60dbfad31b Translated using Weblate (Georgian)
Currently translated at 10.9% (1003 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ka/
2024-02-19 20:25:31 +01:00
pondahai dd9b912d44 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.8% (8610 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-02-19 20:25:31 +01:00
CloverGit 4a577ebbff Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9142 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-19 20:25:31 +01:00
dsa-t 2f274a35e8 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9142 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-19 20:25:31 +01:00
Laurens Holst d9f11e8053 Translated using Weblate (Dutch)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-19 20:25:31 +01:00
Henrik Kauhanen 7c4d45d8b0 Translated using Weblate (Finnish)
Currently translated at 99.7% (9152 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-02-19 20:25:31 +01:00
Laurens Holst dbca19698f Translated using Weblate (Dutch)
Currently translated at 96.2% (8830 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-19 20:25:30 +01:00
SubaruArai a0d35451ee Translated using Weblate (Japanese)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-19 20:25:30 +01:00
Tokita, Hiroshi ae25a883e4 Translated using Weblate (Japanese)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-19 20:25:30 +01:00
Ulices 15e0351e60 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-19 20:25:30 +01:00
Wellington Terumi Uemura 9f204af0d3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-02-19 20:25:30 +01:00
Laurens Holst 5eda7e7a99 Translated using Weblate (Dutch)
Currently translated at 90.9% (8350 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-19 20:25:30 +01:00
Tokita, Hiroshi c6201a5939 Translated using Weblate (Japanese)
Currently translated at 99.9% (9173 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-19 20:25:30 +01:00
dsa-t 6e62835769 Translated using Weblate (Spanish (Mexico))
Currently translated at 98.9% (9082 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-19 20:25:30 +01:00
Ulices 210826534e Translated using Weblate (Spanish (Mexico))
Currently translated at 98.9% (9082 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-19 20:25:30 +01:00
Wellington Terumi Uemura d1de85a6e7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.8% (9163 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-02-19 20:25:30 +01:00
dsa-t cc2f2dfc4a Translated using Weblate (Thai)
Currently translated at 72.6% (6665 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2024-02-19 20:25:30 +01:00
dsa-t 08c4b9bb7d Translated using Weblate (Swedish)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-19 20:25:30 +01:00
dsa-t b7e5488907 Translated using Weblate (Russian)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-19 20:25:30 +01:00
dsa-t 2e076dacdd Translated using Weblate (Polish)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-02-19 20:25:30 +01:00
Laurens Holst 61a7a9b222 Translated using Weblate (Dutch)
Currently translated at 88.7% (8142 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-19 20:25:30 +01:00
dsa-t ef288b7151 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-19 20:25:30 +01:00
dsa-t c619beda1a Translated using Weblate (Finnish)
Currently translated at 99.6% (9148 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-02-19 20:25:30 +01:00
dsa-t 44c0978d7f Translated using Weblate (Greek)
Currently translated at 99.9% (9167 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-02-19 20:25:29 +01:00
Ulices 993b9ba547 Translated using Weblate (Spanish (Mexico))
Currently translated at 97.5% (8955 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-19 20:25:29 +01:00
CloverGit 33504565a7 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9142 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-19 20:25:29 +01:00
Henrik Kauhanen 71776bf93d Translated using Weblate (Swedish)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-19 20:25:29 +01:00
dsa-t d195a9307b Translated using Weblate (Russian)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-19 20:25:29 +01:00
ZbeeGin 7fbaf67956 Translated using Weblate (Polish)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-02-19 20:25:29 +01:00
Laurens Holst 40d7c3157c Translated using Weblate (Dutch)
Currently translated at 85.1% (7816 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-19 20:25:29 +01:00
Henrik Kauhanen 4224651426 Translated using Weblate (Finnish)
Currently translated at 99.6% (9148 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-02-19 20:25:29 +01:00
Pferd O bf2b9755de Translated using Weblate (German)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-02-19 20:25:29 +01:00
jean-pierre charras 9622918c31 3D view export to PNG/JPEG: ensure highlighted item under cursor is exoperted
not highlighted.
Fixes #14289
https://gitlab.com/kicad/code/kicad/-/issues/14289
2024-02-19 16:28:38 +01:00
Mike Williams 60fe87a73c PCB: always parse ki_fp_filters as a property, not a field 2024-02-19 09:41:27 -05:00
Wayne Stambaugh 27911d9b5a Fix crash when changing sheet file name that contains a highlighted net.
Performing a full connectivity rebuild after changing a sheet file name
ensures that there are no stale connectivity object pointers laying around.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17011
2024-02-17 08:50:22 -05:00
Marek Roszko 1717f39daf Use the semantic version for update checks 2024-02-16 21:42:43 -05:00
Jon Evans 835a82f0b9 Attempt to disable flaky tests for now
Issue8003 causes failures on some Ubuntu systems.
Disabling until we understand why.
2024-02-16 20:11:46 -05:00
Wayne Stambaugh afae6e2e9d Tag stable version 8.0.0 release candidate 3. 2024-02-16 08:59:24 -05:00
Ian McInerney d3befd8bb8 Remove dummy items from group before they are deleted
Board items should not be in a group when they are deleted, but these
are dummy ones, so their group membership doesn't matter.

Fixes KICAD-7P0
Fixes KICAD-6VX
Fixes KICAD-7KK
Fixes KICAD-6VH
2024-02-16 12:20:00 +00:00
Ian McInerney 206a631135 Ensure stream is valid before checking for Eagle XML tag
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16989
Fixes KICAD-7QQ
2024-02-16 11:14:10 +00:00
Marek Roszko f894a41dc2 LIB_SYMBOL::IsMulti() seems to be wrong, use the iterate conditional as the multi-unit check instead
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16932
2024-02-16 00:18:05 -05:00
Marek Roszko 9e08e6e4f1 USe setactive in cli in the LoadSchematic helper too 2024-02-16 00:08:10 -05:00
Marek Roszko b2c6e2de1f Fix file not found msg contents for step resolving 2024-02-15 23:10:57 -05:00
Marek Roszko 762c159b96 Fix KIPRJMOD by setting the project as active by modifying the board loading helper
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16973
2024-02-15 23:06:41 -05:00
Seth Hillbrand 08bdf1abae Avoid drawing netnames when not in board editor
Shouldn't be needed if we properly clear the netinfo but there's no
reason to keep netnames so better to avoid possible issues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16981
2024-02-15 17:17:22 -08:00
Marek Roszko c48fc7ebff Fix crash due to PCB_SHAPEs not being returned by BOARD::AllConnectedItems
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16981
2024-02-15 19:58:21 -05:00
Mike Williams 407bb10197 Default grid: set PCB to 0.5mm, Page Layout editor to 100 mil 2024-02-15 13:31:41 -05:00
Seth Hillbrand 01544cb010 Revert disambiguation menu delay to 0.5s 2024-02-15 09:17:51 -08:00
Ian McInerney ba3e1528dd Update doxygen excludes to remove extraneous .md files 2024-02-15 17:15:24 +00:00
Jon Evans 4ec390838b Re-enable non-KiCad board import when non-standalone
Partial revert of ec2cd99405

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16978
2024-02-15 12:14:32 -05:00
Jon Evans 944a3d7962 Transparently support old versioned env vars for symbol and footprint libs 2024-02-15 15:31:08 +00:00
Jon Evans 7b0bb59b37 Remove hard-coded versioned env vars in most places 2024-02-15 15:31:08 +00:00
Marco Ciampa 0cd59dc278 Updated Italian translation (WIP) 2024-02-15 11:31:35 +01:00
Seth Hillbrand 2c9c741895 Update translations 2024-02-14 10:30:10 -08:00
Ulices 689a962270 Translated using Weblate (Spanish (Mexico))
Currently translated at 96.9% (8887 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-14 19:23:42 +01:00
Hanna Breisand 8da8f22b16 Translated using Weblate (Swedish)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-14 19:23:42 +01:00
Laurens Holst a7f6eb6281 Translated using Weblate (Dutch)
Currently translated at 80.2% (7358 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-14 19:23:42 +01:00
김랑기 7691c2eaa1 Translated using Weblate (Korean)
Currently translated at 96.4% (8838 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-14 19:23:42 +01:00
SubaruArai 7b5b3397b4 Translated using Weblate (Japanese)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-14 19:23:42 +01:00
Ulices 3a25055e63 Translated using Weblate (Spanish (Mexico))
Currently translated at 95.6% (8767 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-14 19:23:42 +01:00
Laurens Holst 6bfda0ec19 Translated using Weblate (Dutch)
Currently translated at 77.9% (7143 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-14 19:23:42 +01:00
김랑기 3e4d869063 Translated using Weblate (Korean)
Currently translated at 96.4% (8838 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-14 19:23:42 +01:00
Henrik Kauhanen 707de29b06 Translated using Weblate (Finnish)
Currently translated at 99.7% (9145 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-02-14 19:23:42 +01:00
Henrik Kauhanen 63bd901fb8 Translated using Weblate (German)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-02-14 19:23:42 +01:00
Ulices 4db922846e Translated using Weblate (Spanish (Mexico))
Currently translated at 92.6% (8497 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-14 19:23:42 +01:00
Laurens Holst eaaccbc004 Translated using Weblate (Dutch)
Currently translated at 73.5% (6739 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-14 19:23:42 +01:00
Ulices d5d8c7a981 Translated using Weblate (Spanish (Mexico))
Currently translated at 91.6% (8405 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-14 19:23:42 +01:00
CloverGit b453a0c6c4 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9133 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-14 19:23:42 +01:00
Henrik Kauhanen 09e9590a7f Translated using Weblate (Swedish)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-14 19:23:42 +01:00
dsa-t 72bff16365 Translated using Weblate (Russian)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-14 19:23:42 +01:00
ZbeeGin 565ad44f42 Translated using Weblate (Polish)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-02-14 19:23:41 +01:00
Laurens Holst adc27142df Translated using Weblate (Dutch)
Currently translated at 69.1% (6339 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-02-14 19:23:41 +01:00
Tokita, Hiroshi bc9f1e2736 Translated using Weblate (Japanese)
Currently translated at 99.9% (9163 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-14 19:23:41 +01:00
aris-kimi 2dd00f9f65 Translated using Weblate (Greek)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-02-14 19:23:41 +01:00
Pferd O e830127267 Translated using Weblate (German)
Currently translated at 100.0% (9167 of 9167 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-02-14 19:23:41 +01:00
Mike Williams 6c1273ca12 PCB Parsing: only parse old properties before PCB fields addition 2024-02-14 09:35:10 -05:00
Marco Ciampa e0bdd956ac Updated Italian translation (WIP) 2024-02-14 14:06:38 +01:00
jean-pierre charras 8e6fe0eaf0 Gerbview settings: store option "Page Limits" in gerbview config.
Previously this appearance option in Layer Manager was not stored.
2024-02-14 11:21:55 +01:00
jean-pierre charras 0d1945def7 Gerber drill file: do not flash oblong holes: they must be routed.
Fixes #16962
https://gitlab.com/kicad/code/kicad/-/issues/16962
2024-02-14 09:22:49 +01:00
Seth Hillbrand 0775d1364a Add bezier icon
Fixes https://gitlab.com/kicad/code/kicad/issues/16830
2024-02-14 02:01:01 +01:00
Marek Roszko f73d45b0cf Add $schema prop to drc/erc 2024-02-13 19:08:55 -05:00
Marek Roszko 7e89d9dee2 Add missing parity arg to drc cli 2024-02-13 18:46:17 -05:00
Marek Roszko 6eaef41e51 Remove the ignore severity from json schema 2024-02-13 18:44:01 -05:00
Marek Roszko 6db6e85161 Set an excluded property in json reports for erc/drc 2024-02-13 18:38:26 -05:00
Ian McInerney b86bf19328 Make shape properties layer selection obey cancel command
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16735
2024-02-13 20:31:05 +00:00
Jeff Young f75c72ebb5 Use background color for checkerboard when not UNSPECIFIED.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16961
2024-02-13 18:21:51 +00:00
Mike Williams c92728715d Schematic: import schematic sheet content, allow move and undo
Otherwise, the schematic is just plopped on the screen, causing
connections and junctions to be missing that should be present.
2024-02-13 12:18:46 -05:00
Mike Williams 3cd61a2d39 PCB: appending boards should not select existing generators 2024-02-13 10:15:30 -05:00
Jeff Young 12c8f5b14d Update compatibility mode and save flags in ngspice.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16955
2024-02-13 14:50:15 +00:00
Jeff Young 0cf433b28e CONVERT_TOOL::CreateLines() doesn't use SKIP_STRUCT flag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16930
2024-02-12 23:59:33 +00:00
Marco Ciampa ce4ffd79d5 Updated Italian translation (WIP) 2024-02-13 00:51:04 +01:00
Seth Hillbrand 745c52c2b7 Update triangulation
Allow for overlapping points in input polygon.  This is relatively
common on a grid and should be used as potential split points to shave
additional ears

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16933
2024-02-12 15:20:08 -08:00
Roberto Fernandez Bautista ca148fb4d1 pns_debug_tool: Fix "save as" to save log file with new router state 2024-02-12 21:22:57 +01:00
Jeff Young 11f5908761 Revert the SHAPE_ARC::Collide() part.
The arc width appears to be handled elsewhere (at least in
the test suite).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16951
2024-02-12 17:51:14 +00:00
Seth Hillbrand c6c1dbb844 Don't skip caching triangulation for failure
Failed triangulation can have multiple causes but we don't have another
approach, so skipping the cache just causes the same issue to be raised
again and again

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16946
2024-02-12 09:39:22 -08:00
Jeff Young d5ac0ff768 Fix SHAPE_ARC::BBox() and Collide() to honour m_width.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16951
2024-02-12 16:59:57 +00:00
jean-pierre charras 7e4e80a2e5 DRC library parity attribute tests: disable DNP and EXCLUDE from BOM.
They are related to a design, not to a footprint, and are tested in
schematic parity tests.
2024-02-12 10:55:56 +01:00
Marek Roszko 2afe4db945 Add some missing newlines in cli output without changing strings 2024-02-11 21:12:21 -05:00
Marek Roszko 6a37f99e94 Fix crash if we exit lib table setup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16917
2024-02-11 21:05:23 -05:00
Marek Roszko d694bb5960 Use file name rather than path for erc/drc json and text reports 2024-02-11 20:16:22 -05:00
Jon Evans 622c2f1316 Make sure connectivity is updated in undo/redo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16945
2024-02-11 20:01:15 -05:00
Marek Roszko 51312ed407 Fix erc/drc severity args
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16924
2024-02-11 19:14:26 -05:00
Ian McInerney b588001b95 Don't remember the menu in the tool dispatcher
Remembering the menu in the tool dispatcher can lead to stale pointers
if we never receive the required menu open or close events. Since wx
3.1.3, we get a valid menu object for all three events, so just forward
the event to that menu unconditionally if the menu is one of our
ACTION_MENUs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16844
2024-02-11 23:24:18 +00:00
Marek Roszko e51ddc52b7 Fix crash writing json drc report 2024-02-11 17:36:56 -05:00
Alex b5982f7319 EasyEDA import: force close some line chains. 2024-02-11 23:52:56 +03:00
Alex bf9d085c15 EasyEDA schematic import: fix nan center for elliptic arcs. 2024-02-11 23:52:56 +03:00
jean-pierre charras fe1579ebbd BOARD_NETLIST_UPDATER: fix issue when reading net-lists having no FOOTPRINT_FIELD
they can be old net-lists or non Kicad net-lists.
Fixes #16931
https://gitlab.com/kicad/code/kicad/-/issues/16931
2024-02-11 21:03:00 +01:00
Jon Evans d6fb362bd1 Add attempted fix for Sonoma menu crashes
See https://gitlab.com/kicad/code/kicad/-/issues/16844#note_1767141019
2024-02-11 12:00:42 -05:00
Jon Evans 22669bcc4d Unselect saved image when reverting a commit if modified item is unselected
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16938
2024-02-11 11:55:02 -05:00
Jon Evans e9be95741b Deconflict hotkey for Route from Other End
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16415
2024-02-11 10:58:38 -05:00
Jon Evans ec2cd99405 Guard actions that change project against running in non-standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16942
2024-02-11 09:36:17 -05:00
Jon Evans ef0204a44b Remove debug output 2024-02-11 09:04:10 -05:00
Roberto Fernandez Bautista 3a6d74a3b3 Allow user to select location to save router event log
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16904

Note: no new strings added
"Unable to write '%s'." is from pagelayout_editor/files.cpp(182)
2024-02-11 13:43:55 +01:00
Jon Evans 4eba781013 Try harder to remove stale pins from connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16846
2024-02-10 23:26:37 -05:00
Graham Keeth 24cf0c0c62 use new align-to-grid icon 2024-02-11 01:30:47 +00:00
Laurens Holst 755d4ada6d Correct Dutch language name to "Nederlands".
"Nederlandse" is the adjective form which is not appropriate here;
only used stand-alone when referring to nationality.
2024-02-10 23:30:50 +01:00
Wayne Stambaugh e302261067 More issue #16846 invalid pointer checks.
This has now pushed the issue down to a broken RTree issue.  Skipping the
asserts in debug builds will still crash but now it's pushed down to the
RTree.
2024-02-10 15:41:10 -05:00
Yon Uriarte 5819ad274f Print traces on windows to stderr 2024-02-10 19:05:21 +00:00
Jan Wichmann 5a5cb218ea Let pl_editor launch in run from builddir env on windows 2024-02-10 17:28:39 +00:00
Marek Roszko 17f5a69214 Fix some file icons being shifted 2024-02-10 12:12:16 -05:00
Marek Roszko cdaea24335 Update copyright year in manifest 2024-02-10 12:12:16 -05:00
Roberto Fernandez Bautista 8e0489bc24 pns_debug_tool: goto line windows + add visual studio (half working)
Visual studio (full) doesn't seem to like  going to the line, but at
least it opens the file in the same instance...
2024-02-10 16:28:01 +01:00
Wayne Stambaugh b409aee28a Force schematic symbol pin update when reverting a commit.
Apparently somewhere in our schematic code base we are allowing pins
to be added to symbols without correct setting the parent symbol object.
This causes all kinds of issues when the pin's parent object need to be
accessed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16846
2024-02-10 08:49:41 -05:00
Wayne Stambaugh ae9175927b Fix broken schematic pin selection caused by commit 1ac5666164. 2024-02-10 08:26:52 -05:00
Alex Shvartzkop 2b295f85f5 Fix corner radius for 0 amplitude meanders. 2024-02-10 08:36:50 +03:00
Alex Shvartzkop ff17a22e31 Internationalize Image Properties dialogs. 2024-02-10 08:34:19 +03:00
Alex Shvartzkop c6b8b1cc9e Internationalize "Grid Settings" dialog. 2024-02-10 08:34:19 +03:00
Alex Shvartzkop 2fc68c2855 Internationalize PCB "Add Netclass Assignment" dialog. 2024-02-10 08:34:19 +03:00
Marek Roszko 6bc7bcffef Change app ico sets, add file icons to resources of each executable, rework resource ids 2024-02-09 23:53:10 -05:00
Seth Hillbrand 950ad39e39 Update metadata resource to v7 (just in time for v8) 2024-02-09 19:35:45 -08:00
Marek Roszko d3ca82b0b5 Fix another build error 2024-02-09 20:18:13 -05:00
Marek Roszko 24e58a31fa Add fileicon icos for windows 2024-02-09 19:57:43 -05:00
Seth Hillbrand 99dc68bbe0 Update translations 2024-02-09 15:57:22 -08:00
김랑기 8c3daea541 Translated using Weblate (Korean)
Currently translated at 96.6% (8845 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
Tokita, Hiroshi bfd1e40449 Translated using Weblate (Japanese)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-10 00:56:37 +01:00
Ulices 56b2ee9495 Translated using Weblate (Spanish (Mexico))
Currently translated at 91.8% (8399 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-10 00:56:37 +01:00
김랑기 59b66eec97 Translated using Weblate (Korean)
Currently translated at 96.6% (8845 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
CloverGit 1cf8d88032 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:37 +01:00
CloverGit 03a0ec9870 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:37 +01:00
CloverGit 0313e3cb04 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:37 +01:00
CloverGit bbd4f789ab Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:37 +01:00
김랑기 633e3deee7 Translated using Weblate (Korean)
Currently translated at 96.6% (8844 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
김랑기 18f73e4afd Translated using Weblate (Korean)
Currently translated at 96.6% (8844 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
김랑기 886aca8dd9 Translated using Weblate (Korean)
Currently translated at 96.6% (8844 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
김랑기 c03e76bbc1 Translated using Weblate (Korean)
Currently translated at 96.6% (8844 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
김랑기 e407e1ff71 Translated using Weblate (Korean)
Currently translated at 96.6% (8844 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:37 +01:00
Stanislav Kaliuk 7c3c2ab756 Translated using Weblate (Ukrainian)
Currently translated at 88.4% (8091 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-02-10 00:56:37 +01:00
Hanna Breisand b2b106f12a Translated using Weblate (Swedish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-10 00:56:37 +01:00
dsa-t f41f79a11f Translated using Weblate (Russian)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-10 00:56:37 +01:00
Tokita, Hiroshi 0bebfceab0 Translated using Weblate (Japanese)
Currently translated at 99.9% (9143 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-02-10 00:56:37 +01:00
CloverGit 32a8c13a90 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:37 +01:00
dsa-t 02e84168fa Translated using Weblate (Russian)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-10 00:56:37 +01:00
Toni Laiho 0f3d59b5e0 Translated using Weblate (Finnish)
Currently translated at 99.9% (9139 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-02-10 00:56:36 +01:00
CloverGit 00fb8bf772 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
CloverGit 1a7df18187 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
CloverGit 56d06f145c Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
CloverGit d882bb5639 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
CloverGit a1ff58ec31 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
CloverGit 7e8e82bc93 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
Henrik Kauhanen 79c1f82637 Translated using Weblate (Swedish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-10 00:56:36 +01:00
CloverGit ed169b9333 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
dsa-t 5ef2a84e55 Translated using Weblate (Russian)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-10 00:56:36 +01:00
Ulices 671eaf255e Translated using Weblate (Spanish (Mexico))
Currently translated at 91.6% (8381 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-10 00:56:36 +01:00
Wellington Terumi Uemura ba01bd6ca4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-02-10 00:56:36 +01:00
Nguyễn Ngọc Khánh 7df1beed43 Translated using Weblate (Vietnamese)
Currently translated at 20.8% (1906 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-02-10 00:56:36 +01:00
pondahai 26da7ed701 Translated using Weblate (Chinese (Traditional))
Currently translated at 92.3% (8448 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-02-10 00:56:36 +01:00
CloverGit 85953c05d8 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-02-10 00:56:36 +01:00
dsa-t 7a74c48f5e Translated using Weblate (Russian)
Currently translated at 99.9% (9139 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-02-10 00:56:35 +01:00
김랑기 5a6ac7288f Translated using Weblate (Korean)
Currently translated at 96.6% (8842 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-10 00:56:35 +01:00
Seth Hillbrand cd548e392a Add document type icons
Update Macos script to use doctype icons for icns builds

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14754
2024-02-09 15:55:57 -08:00
Seth Hillbrand 96130725ad Update the teardrop graphics
Clean and standardize teardrop graphics

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16195
2024-02-09 15:55:57 -08:00
Seth Hillbrand f303996f9c Add new icons for tools
Align elements to grid
Cleanup graphics
Cleanup tracks/vias
Drag

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16205
2024-02-09 15:55:57 -08:00
Seth Hillbrand cabbab9a5f Move pcbnew drag to move specific icon 2024-02-09 15:55:57 -08:00
Alex Shvartzkop fcdd34f58b Reserve strings for Tune Length 2024-02-10 02:44:05 +03:00
Wayne Stambaugh 04ccf7e885 Explicitly create wxStrings for assignment to make MSVC builds happy. 2024-02-09 17:37:36 -05:00
Wayne Stambaugh 9e9ee96181 Explicitly create wxString for return value. 2024-02-09 17:11:49 -05:00
Alex Shvartzkop 2121227194 Fix nullptr group assert in tracks cleaner. 2024-02-10 00:44:05 +03:00
Alex Shvartzkop d4e89543de Length-tuning fixes/improvements:
- Ensure correct amplitude values in tuning patterns.
- Support lower amplitudes in DP length tuning
- Ensure correct minimal inner radius in DP length tuning
2024-02-10 00:44:05 +03:00
Lucas Dumont 2933cdf636 Extend NETLIST lifetime for JobExportDrc
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16925
2024-02-09 22:14:36 +01:00
Jeff Young dc48af3e5c EDA_ITEM::SwapData() must not swap the parent pointer.
The image's parent pointer might have gone out of scope.
2024-02-09 20:10:12 +00:00
jean-pierre charras 53896105c0 Demos update 2024-02-09 20:31:32 +01:00
Wayne Stambaugh 302038fbfd Do not assume schematic child objects have a valid parent. 2024-02-09 13:16:07 -05:00
Alex Shvartzkop 453e185613 Increase unconstrained tuning length to 1km. 2024-02-09 19:25:46 +03:00
Wayne Stambaugh 1ac5666164 Do not de-reference null library pin object pointers in SCH_PIN object. 2024-02-09 11:07:04 -05:00
Wayne Stambaugh 3d690da305 Fix schematic editor crash when dragging symbols.
Do not set view items or update connectivity until after commit changes
are updated in the SCH_SREEN.  Updating the screen can force LIB_SYMBOL
changes which and lead to stale LIB_PIN object pointers stored in SCH_PIN
objects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16846
2024-02-09 10:38:29 -05:00
Jeff Young 63fc89cafd Import graphic items on copper layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16916
2024-02-09 13:56:01 +00:00
Jeff Young aef6b2a66e nullptr safety and a bit of wxT'ing. 2024-02-09 13:56:01 +00:00
Jon Evans 334b414826 Make sure SCH_PIN->LIB_PIN pointers get cleared 2024-02-09 08:09:19 -05:00
Jeff Young 33d93b79a3 Handle nested text variable references in title block.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16919
2024-02-09 12:37:13 +00:00
Jeff Young 91e15634fc Re-use ERC's delete-exclusions-query dialog for DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16914
2024-02-09 11:21:06 +00:00
jean-pierre charras 4c61a79e47 3D viewer: show "not covered by solder mask" graphic items with the right color.
Previously, only pads and tracks were using the gold color when not covered by
the solder mask layer.
Fixes #16892
https://gitlab.com/kicad/code/kicad/-/issues/16892
2024-02-09 11:35:38 +01:00
Jeff Young 3c45145401 Set move flags at beginning of move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16891
2024-02-09 10:19:39 +00:00
Jeff Young 4905c37712 Streamline explodePad undo.
Also fixes a bug where new shapes were added to the view
twice.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16888
2024-02-09 10:08:37 +00:00
Jon Evans 037f349585 Make expand connection work on generated tracks 2024-02-08 19:28:28 -05:00
Jeff Young 69a69cc624 Fix properties manager assert on zone layer property. 2024-02-09 00:15:45 +00:00
Jeff Young 53d048921a Fix merge conflicts. 2024-02-09 00:04:43 +00:00
Jon Evans e427099cff Disable flaky ngspice tests
These need to be re-done in a way that is more
tolerant of the inherent instability/noise in
the simulated circuits (or more ideally, changed
to test a particular thing that can be more
well-defined rather than just simulating a circuit
and seeing if the numbers come out a certain way)
2024-02-08 18:46:30 -05:00
Jon Evans febe759e49 Do not mess with KIPRJMOD when loading aux projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16810
2024-02-08 18:28:20 -05:00
Jon Evans ca6b40ef1c Make sure to create power axis when restoring state
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16912
2024-02-08 17:48:12 -05:00
Jon Evans 7929d7cda2 Fix build 2024-02-08 17:33:34 -05:00
Jeff Young ecbe1df7c1 Update target length/skew to std::optional.
Also fixes a bug in the router where the target length would
get trashed if set to maxLongLongInt.  (We'd add the default
tolerance to it sending it negative.)
2024-02-08 18:14:31 +00:00
Jeff Young e62b4f8ff4 Add nullable int and double to property system. 2024-02-08 18:14:31 +00:00
Alex Shvartzkop 876449b83d Set DP skew meanders max length to INT32_MAX instead of 100 mm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16860
2024-02-08 19:34:17 +03:00
Alex Shvartzkop f4cf23e5cf Length tuning: fix status popup display when unconstrained. 2024-02-08 18:55:42 +03:00
Mike Williams b979f52364 FP Editor: show hidden texts when we should
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16909
2024-02-08 10:28:23 -05:00
Jeff Young f8b8bc78bd Make m_originalColWidths impervious to init-order issues. 2024-02-08 15:09:07 +00:00
arturo182 abb1915114 Missed a checkbox for Select All in Import Settings 2024-02-08 15:01:23 +00:00
Alex Shvartzkop f1caa262a6 Separate actions for single track and differential pair length tuning. 2024-02-08 14:58:28 +00:00
Jeff Young b4c361f5cc Order matters in PEGTL grammar.
(Because a flagParam will also match "param", but not the
other way around.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16900
2024-02-08 14:54:54 +00:00
Mike Williams 1a91bb369c SCH<->PCB: fix pin cross probing
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16910
2024-02-08 09:02:03 -05:00
Alex Shvartzkop 9b11dfd4d4 Fix 3D viewer getting stuck or rendering twice when dragging, at least on GTK. 2024-02-08 15:19:54 +03:00
Jon Evans 4622738c93 Deconflict instance-checker dir with 7.0 2024-02-07 18:35:10 -05:00
Jon Evans 9d57637a1a Fix clobbering of common settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16905
2024-02-07 18:31:43 -05:00
Seth Hillbrand 6e0d97df76 Do not cache invisible text objects
In some cases, extremely long, invisible texts can fill and crash opengl
buffers
2024-02-07 15:26:41 -08:00
Jeff Young 8efd90e6e8 Allow reading of 0 text sizes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16902
2024-02-07 16:46:42 +00:00
Jeff Young bce372c8a3 Don't clear the undo/redo list when we're just trimming it.
We only allow a certain number of commands on the lists
and trim them when they overflow.  PCB_BASE_EDIT_FRAME and
PL_EDITOR_FRAME implemented this correctly; SCH_EDIT_FRAME
and SYMBOL_EDIT_FRAME did not.
2024-02-07 14:52:10 +00:00
Jeff Young 98bc03919d Nullptr safety. KICAD-7DM 2024-02-07 14:21:44 +00:00
Jeff Young 1e6986d2f5 Don't report starved thermals when connected only to isolated islands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16866
2024-02-07 14:09:03 +00:00
Mike Williams 6125a183b4 Settings: make sure file history size is at least 1 2024-02-07 09:00:13 -05:00
Jon Evans 169114fd07 Fix path from ba25f881c6 2024-02-07 08:55:03 -05:00
Wayne Stambaugh 36653c2064 Add new librarians to about dialog. 2024-02-07 08:27:43 -05:00
Wayne Stambaugh 105bcd4082 Use reference to strings in for loop rather than copy.
Closes Coverity ID 486180.
2024-02-07 07:58:57 -05:00
jean-pierre charras d91e744f0f Gerbview: fix incorrect layer visibility settings after removing the current layer 2024-02-07 10:49:24 +01:00
Jon Evans ba25f881c6 Save common settings if we just created them
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16775
2024-02-06 21:33:44 -05:00
Jon Evans 181100fe44 Allow launching standalone procs from build dir 2024-02-06 21:33:44 -05:00
Jon Evans 874be359e0 Use a more specific path for instance checker 2024-02-06 21:33:44 -05:00
Alex e55a803572 Altium schematic import: do not overwrite sheet name. 2024-02-07 05:06:49 +03:00
Alex a32d5174a1 Altium schematic import: clear harness port list after parsing Additional.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16894
2024-02-07 05:06:49 +03:00
Jan Wichmann 2a0a41f149 Better template handling of include/excluded files
Reject all hidden folders and files when copying the template files, only allow '.gitignore', '.gitattributes' files as these are likely intended.  Do not copy `.lck`, `autosave` or `backup` files
2024-02-07 01:36:34 +00:00
Alex Shvartzkop 65c0a0a629 ConvertImageToPolygons: fix images with no alpha.
Fixes KICAD-714
2024-02-06 21:38:00 +03:00
Marek Roszko 08b02f2a1a Add junction color property 2024-02-05 19:12:09 -05:00
Marek Roszko 899ed59f7b Add missing pin numbers/names properties 2024-02-05 19:08:56 -05:00
Alex Shvartzkop 0778a7d46d Fix Windows build. 2024-02-06 00:38:21 +03:00
Alex Shvartzkop be1bbda8ce Altium: Fix bug when symbol uses multiple display modes on one sheet. 2024-02-05 22:36:30 +03:00
Alex Shvartzkop d8c72e845c Altium schematic: support component's DISPLAYMODE being a string. 2024-02-05 22:36:25 +03:00
Jeff Young e6929b2184 Tooltip for "Prefer zone connections".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16587
2024-02-05 19:22:41 +00:00
Jeff Young d30361b425 Increase artificial via preference further.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16880
2024-02-05 19:20:33 +00:00
Jeff Young 82e353deb7 Notify property inspector after sheet properties dialog. 2024-02-05 19:10:22 +00:00
Jeff Young e98d1c968e Don't truncate mils properties in Property Inspector.
In fact, don't open-code yet another value-to-string impl.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16883
2024-02-05 16:53:00 +00:00
jean-pierre charras 608294171b Demos update 2024-02-05 16:53:10 +01:00
Jeff Young 1ff36f23b8 Clean up stale TODOs. 2024-02-05 15:49:57 +00:00
Jeff Young de634c6f3e Generate tofu if we fail to decompose outline font glyph. 2024-02-05 15:49:57 +00:00
Jeff Young a28f092b67 Don't cover STL types. 2024-02-05 15:49:57 +00:00
Jeff Young 7b3485fcb8 Remove atrophied terminology (logical -> nickname) 2024-02-05 15:49:57 +00:00
Jeff Young fef404352d Remove stale TODOs. 2024-02-05 15:49:57 +00:00
Jeff Young da46a96623 Update a few strings based on new string freeze policy. 2024-02-05 15:49:57 +00:00
Alex Shvartzkop 8cd0c5d574 Remove electric demo from install 2024-02-05 18:03:43 +03:00
Ian McInerney 7ea1568802 Fix selection tool behavior in footprint viewer
The footprint viewer isn't an edit frame, so we need to access the
settings through the base frame type instead. Also, double click makes
no sense in the footprint viewer, and just leads to weird results
sometimes.

Fixes Sentry KICAD-7A2
2024-02-05 14:50:17 +00:00
jean-pierre charras 3178bbfba0 Demo update. Remove also a useless demo 2024-02-05 15:05:25 +01:00
Mike Williams 6a9914bf89 Lib Symbol Properties: make exclude from BOM string same as symbol props
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16876
2024-02-05 09:02:46 -05:00
Andre Iwers a0c39715df HTTP LIB - Fine tuning 2024-02-05 12:11:01 +00:00
Marek Roszko 835500bf1c Hide the color prop from pcb editor 2024-02-05 01:13:16 -05:00
Marek Roszko 740c7a73a2 Add missing color prop for text 2024-02-05 01:09:42 -05:00
Marek Roszko c39e7b2225 Tweaks in eeschema for hidpi 2024-02-05 01:03:52 -05:00
Marek Roszko 002fb80c2a Fix string in cli for 2581
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16881
2024-02-05 00:52:57 -05:00
Marek Roszko 3960c53225 A few tweaks for hidpi 2024-02-05 00:52:11 -05:00
Marek Roszko 11f76c129e Use FromDIP in WX_GRID padding 2024-02-04 20:09:30 -05:00
Jeff Young 0370db43ae A footprint does it's own child hit testing.
We only need to add it for groups.
2024-02-04 23:16:43 +00:00
Jeff Young 77c19fa99a Fill in missing zone properties.
Also fixes some bugs with hatch properties being available
on rule areas.
2024-02-04 23:01:31 +00:00
Marek Roszko b08f1ee6bf Fix SPLIT_BUTTON at hidpi 2024-02-04 16:04:45 -05:00
Marek Roszko 387084d8b3 Fix default size of library tables dialog on hidpi 2024-02-04 15:53:15 -05:00
Marek Roszko 19124b685e Make STD_BITMAP_BUTTON always draw a sane button size regardless of bitmap size
We need higher resolution images for use with STD_BITMAP_BUTTONs as 4K 250% scaling Windows which is "normal".
2024-02-04 15:48:57 -05:00
Marek Roszko 5d0abd3b01 Use CallAfter instead of Idle event hack for drc dialog item selection 2024-02-04 12:37:56 -05:00
Jeff Young cab351d249 Don't do a sided-test on a footprint which has no side.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2024-02-04 15:18:23 +00:00
Marco Ciampa d9abaa23a4 Updated Italian translation (WIP) 2024-02-04 00:38:57 +01:00
Jeff Young 4e0b48a03a ZONE_SETTINGS init belongs in ZONE_SETTINGS's ctor.
(Not in ZONE's ctor.)
2024-02-03 20:17:31 +00:00
Jeff Young 5379a1d863 Nullptr protection. 2024-02-03 20:17:31 +00:00
Jeff Young 36275bcbc5 Make sure polygonization error is on correct side.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16869
2024-02-03 20:17:31 +00:00
Ian McInerney 2fc96c1d11 Ensure stackup material returned is correct after list item deletion 2024-02-03 18:06:40 +00:00
Alex 5c86247e21 Fix inactive cells being black in default settings panels on MSW. 2024-02-03 21:00:28 +03:00
Alex d4879e05ac Use semantic version in drawing sheets. 2024-02-03 20:24:26 +03:00
Ian McInerney dc6fb73b40 Fix mistake in 7edda82b where any key could delete the material 2024-02-03 17:01:57 +00:00
Ian McInerney 7edda82b2a Hook up delete key in stackup materials list box
Allow the delete key to delete a material from the stackup list, since
otherwise there is no way to delete materials from the list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16854
2024-02-03 16:39:56 +00:00
Alex 4146a74bb7 Make more strings translatable in PCB grid settings. 2024-02-03 19:31:59 +03:00
jean-pierre charras 31394e95d7 Demo update 2024-02-03 17:09:48 +01:00
Wayne Stambaugh 92c2ddf77a Do not parent dialogs to non top level windows in panels or widgets. 2024-02-03 10:40:28 -05:00
Jeff Young 4d49762714 Remove Export Settings to Other Similar Zones.
The UI for it is clunky (Cancel afterwards doesn't do what
you think it might), the undo code is all hand-rolled (and
possibly buggy?), and we have the Property Inspector now
for this type of stuff.
2024-02-03 13:22:16 +00:00
Jeff Young 0890ac57dd Improve clarity of default zone settings. 2024-02-03 13:22:16 +00:00
Subaru Arai d9737a39bf remove qr footprint generator min pixel size
The minimum pixel width should be left for the user to decide, since it
depends on the manufacturer and layer.
2024-02-03 09:37:29 +00:00
Emile Cormier b58f318d3f Add volume to IBIS cache path
Fixes #16655
2024-02-03 09:35:36 +00:00
Roberto Fernandez Bautista 86368abba2 pns_debug_tool: Add Emacs as IDE option for Wayne, maybe? 2024-02-03 10:34:47 +01:00
Marek Roszko 239cbb4637 Use Fit to size the layer box after sitting min size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16862
2024-02-02 23:43:05 -05:00
Mark Roszko b354b24182 Revert "Call Layout after calculating layer combobox size to ensure it takes effect"
This reverts commit cd8eb23c3e
2024-02-03 04:32:36 +00:00
Marek Roszko cd8eb23c3e Call Layout after calculating layer combobox size to ensure it takes effect
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16862
2024-02-02 23:11:48 -05:00
Marek Roszko ef06e95798 Add LTCG option for win32 2024-02-02 20:46:32 -05:00
Roberto Fernandez Bautista 366d8ecb73 pns_debug_tool: Add combobox to select IDE (CLion / VS Code) 2024-02-03 00:36:34 +01:00
Jeff Young 7cc663ad77 Schematic parity checking for CLI DRC. 2024-02-02 23:05:37 +00:00
Roberto Fernandez Bautista 3a95bd1bd1 pns_debug_tool: Add option to go to definition in vs code
Todo: add a way to add other IDEs and select them via GUI or
advanced config
2024-02-02 23:47:00 +01:00
Mark Roszko b89fefffb1 Update CMakeSettings.json.sample
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16867
2024-02-02 20:19:13 +00:00
Seth Hillbrand 42f17dfbef Add debugging info to vrml reader 2024-02-02 16:35:32 +01:00
Ian McInerney d44b04978a Allow enabling WXTRACE in release builds on all platforms
Setting the environment variable KICAD_ENABLE_WXTRACE now enables wx
trace logging on all platforms. MSW still requires its original
environment variables to be set to get the console displayed.
2024-02-02 14:21:33 +00:00
Wayne Stambaugh 2b1bf369f2 Do not parent file or directory dialogs to panels.
Parenting dialogs to child windows of top level windows is most likely
not defined behavior.  It's also likely that this behavior varies across
platforms so it' best not to risk doing it.  wxWidgets does not check if
the dialog parent is actually a top level window.  There may be other
places we are doing this with our message dialogs so we should do an
audit.
2024-02-02 09:20:36 -05:00
Roberto Fernandez Bautista 0113e7053d Remove unnecessary configurations from CMakeSettings.json.sample
These extra configurations are not really used by anyone and cause issues
for new comers as it defaults to launching msys2 build, which immediately
fails
2024-02-02 12:07:23 +00:00
Ian McInerney 85a2d6178a Add coroutine stack size to trace output 2024-02-02 11:00:08 +00:00
Alex Shvartzkop 4a1245e85a STEP: export copper plating for vias/pads (25 micrometers).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16694
2024-02-02 00:29:03 +03:00
Jeff Young a485a4815c Clear text before replacing in ImportSettingsFrom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16851
2024-02-01 17:37:27 +00:00
ecorm ff3288dab6 Add quotes around paths when KIBIS generates waveforms via ngspice
Fixes #16655
2024-02-01 17:20:16 +00:00
Seth Hillbrand 48b7e24695 Remove extraneous dupes 2024-02-01 14:56:47 +01:00
Ivan Chuba 85e055d959 Translated using Weblate (Ukrainian)
Currently translated at 86.9% (7952 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-02-01 14:54:28 +01:00
Henrik Kauhanen 7ecb8b379c Translated using Weblate (Swedish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-01 14:54:26 +01:00
ZbeeGin 7373352518 Translated using Weblate (Polish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-02-01 14:54:24 +01:00
김랑기 5e891d88bf Translated using Weblate (Korean)
Currently translated at 96.5% (8828 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-01 14:54:22 +01:00
VicSanRoPe 977417d64a Translated using Weblate (Spanish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-02-01 14:54:21 +01:00
Pferd O 604df2f5a1 Translated using Weblate (German)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-02-01 14:54:20 +01:00
jean-pierre charras e8f51b61a6 EEschema, net navigator: save settings when closing Eeschema.
Fixes #16845
https://gitlab.com/kicad/code/kicad/-/issues/16845
2024-02-01 12:53:33 +01:00
Alex 285067dad1 Altium PCB: support polygon id 65534 for keepout tracks on board outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16849
2024-02-01 12:15:06 +03:00
Seth Hillbrand 27112d7988 Update Translations 2024-02-01 10:07:56 +01:00
Ma Han 7c6ee16b22 removed the dots for several strings in the settings dialog
https://gitlab.com/kicad/code/kicad/-/issues/16651
2024-02-01 08:52:57 +00:00
김랑기 32a7a86382 Translated using Weblate (Korean)
Currently translated at 96.2% (8802 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-02-01 09:44:12 +01:00
Ulices f498b6e1fa Translated using Weblate (Spanish (Mexico))
Currently translated at 91.6% (8379 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-01 09:44:12 +01:00
pondahai 72e2af6ea7 Translated using Weblate (Chinese (Traditional))
Currently translated at 91.9% (8410 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-02-01 09:44:12 +01:00
VicSanRoPe d6bcdfbdd3 Translated using Weblate (Spanish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-02-01 09:44:12 +01:00
Ulices 8ba516f101 Translated using Weblate (Spanish (Mexico))
Currently translated at 91.3% (8357 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-01 09:44:12 +01:00
VicSanRoPe 3b94bf1334 Translated using Weblate (Spanish)
Currently translated at 99.8% (9131 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-02-01 09:44:12 +01:00
Ulices 1a18f8c638 Translated using Weblate (Spanish (Mexico))
Currently translated at 88.7% (8119 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-02-01 09:44:12 +01:00
Wellington Terumi Uemura 3ed70dceee Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-02-01 09:44:12 +01:00
YÜKSEL AÇIKGÖZ 6ef1c0e4d0 Translated using Weblate (Turkish)
Currently translated at 51.4% (4710 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2024-02-01 09:44:12 +01:00
VicSanRoPe a7db40fed2 Translated using Weblate (Spanish)
Currently translated at 99.8% (9130 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-02-01 09:44:11 +01:00
aris-kimi 59667b9a0d Translated using Weblate (Greek)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-02-01 09:44:11 +01:00
Ivan Chuba 1391c8690a Translated using Weblate (Ukrainian)
Currently translated at 86.8% (7947 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-02-01 09:44:11 +01:00
Henrik Kauhanen 7f72092ed0 Translated using Weblate (Swedish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-02-01 09:44:11 +01:00
ssantos 91a75587ae Translated using Weblate (Portuguese)
Currently translated at 99.8% (9137 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2024-02-01 09:44:11 +01:00
ZbeeGin 8ca57179d2 Translated using Weblate (Polish)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-02-01 09:44:11 +01:00
Pferd O 5757967fe2 Translated using Weblate (German)
Currently translated at 100.0% (9147 of 9147 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-02-01 09:44:11 +01:00
Seth Hillbrand 7664c345e2 Revert "Schematic performance enhancements"
This reverts commit df654ac12f.
2024-02-01 09:00:13 +01:00
Yon Uriarte df654ac12f Schematic performance enhancements 2024-02-01 02:28:09 +00:00
Alex Shvartzkop 1122d80388 Better support for arcs in tuning patterns. 2024-01-31 23:38:05 +03:00
Alex Shvartzkop 7d1888c756 Add parts of arcs to tuning patterns correctly. 2024-01-31 21:45:01 +03:00
Wayne Stambaugh 466c707e91 Check for invalid library pin object pointer. 2024-01-31 12:17:11 -05:00
Roberto Fernandez Bautista 7276486756 Finish fixing SHAPE_LINE_CHAIN::Slice 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 79aba50c23 Finish fixing SHAPE_LINE_CHAIN::NextShape and add tests 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista e950475bc3 Add assert to SHAPE_LINE_CHAIN::Segment + Deduplicate code
CSegment should have the exact same logic as Segment

Also, moving definition to .cpp file to reduce need to rebuild every time
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 70f14277d1 PNS Debug/regresions: Fix some memory leaks 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista effed5dfdf Fix SHAPE_LINE_CHAIN::Remove and SHAPE_LINE_CHAIN::RemoveShape 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 673e23c2e6 Fix and simplify SHAPE_LINE_CHAIN::Append( SHAPE_ARC ) + QA tests 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 34942290a2 SHAPE_LINE_CHAIN: Fix SetClosed() logic
SetClosed should unwrap the chain when there are coincident points at the
start.
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 7593863245 SHAPE_LINE_CHAIN: Fix and simplify ShapeCount()
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15754
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista c72ba189cf Fix SHAPE_LINE_CHAIN::Slice following NextShape() changes 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista e9fbb36538 SHAPE_LINE_CHAIN: Fix and simplify NextShape() + remove PrevShape()
NextShape() function was too complex (trying to go back and forwards).
We only used PrevShape() in one place, so removed that usage.

Added QA tests
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 079478f989 EDA_ANGLE: use constexpr for constant angles
Remove all statics in the class and instead use constexpr to
ensure correct ordering
2024-01-31 19:17:46 +03:00
Alex Shvartzkop 6ff3b0eb95 Altium schematic: remove border from symlib ellipse inner polygon. 2024-01-31 19:08:36 +03:00
Jeff Young 19560f0281 Fix pad edit mode undo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16835
2024-01-31 15:45:58 +00:00
Jeff Young 5d4b4f39ec Allow PARAM_WXSTRING_MAP to behave as an array.
In particular, overwrite file contents with current
contents of map rather than merging.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16801
2024-01-31 14:58:48 +00:00
Jeff Young 445ed380b8 Formatting. 2024-01-31 14:58:48 +00:00
Alex Shvartzkop 7f29ac39d8 Altium schematic: case-insensitive search for subsheet files.
Also fixes open polylines on sheet.
Also prevents adding polylines with less than 2 points.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16829
2024-01-31 17:57:10 +03:00
Marek Roszko f795c1168d Fix typo 2024-01-31 06:55:32 -05:00
jean-pierre charras d012a5cbe0 Eeschema menubar, view menu: group Show/Hide Net Navigator with other Show/hide menus 2024-01-31 12:40:21 +01:00
Alex Shvartzkop 1e5b68cb87 Altium schematic: add polygon inside filled ellipse. 2024-01-31 09:34:36 +03:00
Alex 6225ef69b6 Altium schematic import: fix power ports.
Use different symbol names for different port port styles.
Also fixes curved shapes construction.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16823
2024-01-31 08:22:27 +03:00
Alex c64b74918f Altium schematic import: put Template items on sheet.
So we can use variable resolution.
2024-01-31 07:00:02 +03:00
Marek Roszko 4b12534dbd Fix property editor for graphic circles 2024-01-30 22:00:09 -05:00
Marek Roszko c8d24b7613 Add missing IPC2581 cli support 2024-01-30 20:42:34 -05:00
Mark Roszko f07a0e0021 Alter windows ci cache compression 2024-01-31 01:12:41 +00:00
Alex 9ed735ef5d Fixes for Altium/CircuitStudio schematic import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16825
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16824

Adds support for Templates.
Also fixes symbols on schematic with multiple display modes.
2024-01-31 02:07:06 +03:00
Marco Ciampa 7f064b03a5 Updated Italian translation (WIP) 2024-01-30 17:32:05 +01:00
jean-pierre charras a3e6e08d92 Spice Simulator : update simulation after tuning cursor moved by arrow keys.
Fixes #16808
https://gitlab.com/kicad/code/kicad/-/issues/16808
2024-01-30 15:57:46 +01:00
Jeff Young 94cb00392e Repair connectivity if bus aliases changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16503
2024-01-30 14:16:55 +00:00
Jeff Young b77709bb4d Formatting. 2024-01-30 14:03:38 +00:00
Jeff Young 32d589a121 Don't rely on baselines for fetching DRC_RULE items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16816
2024-01-30 13:19:04 +00:00
Jeff Young 5b5c6f0474 Init tuning pattern settings from BOARD_DESIGN_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16819
2024-01-30 13:19:04 +00:00
Jeff Young 88cc029ad3 Enable meander radius for diff-pairs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16820
2024-01-30 13:19:04 +00:00
Jeff Young dc21defab7 Small performance improvement for DRC. 2024-01-30 13:19:04 +00:00
Marek Roszko 18692ea8e7 This is totally a debug aid for the search pane listview and not a feature 2024-01-29 20:39:48 -05:00
Jeff Young d7471d8c2f Remove tooltip of questionable value. 2024-01-29 23:24:49 +00:00
Marco Ciampa 975c195d69 Updated Italian translation (WIP) 2024-01-30 00:05:22 +01:00
Alex Shvartzkop 3ed196859f STEP export: build a segment from last point for segment case as well.
https://gitlab.com/kicad/code/kicad/-/issues/16807
2024-01-29 19:59:41 +03:00
Seth Hillbrand b12d0dfd67 Fix pad offset removal vs hole offset
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16767
2024-01-29 08:22:23 -08:00
Jeff Young ee5e2e56c0 Naming conventions; no functional changes. 2024-01-29 16:00:06 +00:00
Marco Ciampa 258929090e Updated Italian translation (WIP) 2024-01-29 12:14:27 +01:00
Seth Hillbrand 7e194d5f69 Update translations 2024-01-28 19:54:30 -08:00
Ivan Chuba 579ca508a6 Translated using Weblate (Ukrainian)
Currently translated at 86.8% (7948 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-01-29 04:52:01 +01:00
pondahai 38f61e509e Translated using Weblate (Chinese (Traditional))
Currently translated at 91.2% (8347 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:01 +01:00
ssantos 2d6fb1ea97 Translated using Weblate (Portuguese)
Currently translated at 99.9% (9147 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2024-01-29 04:52:01 +01:00
VicSanRoPe ca42637520 Translated using Weblate (Spanish)
Currently translated at 93.0% (8515 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-29 04:52:01 +01:00
Ivan Chuba 631ab29a5d Translated using Weblate (Ukrainian)
Currently translated at 86.6% (7927 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-01-29 04:52:01 +01:00
Stanislav Kaliuk 568d4b21f9 Translated using Weblate (Ukrainian)
Currently translated at 86.6% (7927 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-01-29 04:52:01 +01:00
pondahai 6ebe4d9a77 Translated using Weblate (Chinese (Traditional))
Currently translated at 91.1% (8334 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:01 +01:00
Oliver0804 3c94a75b59 Translated using Weblate (Chinese (Traditional))
Currently translated at 91.1% (8334 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:01 +01:00
CloverGit c61e030b03 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:01 +01:00
ZbeeGin a515b566d0 Translated using Weblate (Polish)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-01-29 04:52:01 +01:00
VicSanRoPe e87d196f27 Translated using Weblate (Spanish)
Currently translated at 86.4% (7907 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-29 04:52:01 +01:00
pondahai 283ad5a56f Translated using Weblate (Chinese (Traditional))
Currently translated at 90.4% (8274 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:01 +01:00
Oliver0804 62ffce44e0 Translated using Weblate (Chinese (Traditional))
Currently translated at 90.4% (8274 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit 4bfce3f2a4 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
Tokita, Hiroshi 3ac526434f Translated using Weblate (Japanese)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-29 04:52:00 +01:00
Oliver0804 3dd17db0db Translated using Weblate (Chinese (Traditional))
Currently translated at 87.3% (7990 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit 59c1ab17d7 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
gallegonovato 9a208baf1a Translated using Weblate (Spanish)
Currently translated at 83.7% (7661 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-29 04:52:00 +01:00
Ivan Chuba 3a01284785 Translated using Weblate (Ukrainian)
Currently translated at 83.4% (7632 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-01-29 04:52:00 +01:00
Oliver0804 fbc991f0b5 Translated using Weblate (Chinese (Traditional))
Currently translated at 86.0% (7869 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit 6757f19dcf Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
Ivan Chuba d7f1cc0455 Translated using Weblate (Ukrainian)
Currently translated at 83.3% (7627 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-01-29 04:52:00 +01:00
pondahai a2e6262bd6 Translated using Weblate (Chinese (Traditional))
Currently translated at 85.9% (7859 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
Oliver0804 f70ff76abb Translated using Weblate (Chinese (Traditional))
Currently translated at 85.9% (7859 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit cc464095cf Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
gallegonovato fc69a237d0 Translated using Weblate (Spanish)
Currently translated at 83.7% (7660 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-29 04:52:00 +01:00
pondahai 4340c0d3f0 Translated using Weblate (Chinese (Traditional))
Currently translated at 85.1% (7787 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
Oliver0804 6908ce1cda Translated using Weblate (Chinese (Traditional))
Currently translated at 85.1% (7787 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit fd3920e114 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
Oliver0804 98490e2714 Translated using Weblate (Chinese (Traditional))
Currently translated at 85.0% (7782 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit 0e14ee63ce Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9114 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
Oliver0804 d369ee946f Translated using Weblate (Chinese (Traditional))
Currently translated at 84.8% (7766 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
pondahai 0feffdec7e Translated using Weblate (Chinese (Traditional))
Currently translated at 84.8% (7766 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
CloverGit 63b7b978dd Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9113 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-29 04:52:00 +01:00
pondahai 26e56a03b5 Translated using Weblate (Chinese (Traditional))
Currently translated at 83.4% (7635 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
Oliver0804 afb0e92fe9 Translated using Weblate (Chinese (Traditional))
Currently translated at 83.4% (7635 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:52:00 +01:00
William Lin 334302e3ca Translated using Weblate (Chinese (Traditional))
Currently translated at 82.6% (7559 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
Oliver0804 7f3bdc3f1e Translated using Weblate (Chinese (Traditional))
Currently translated at 82.6% (7559 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
撒景賢 50fb9a21db Translated using Weblate (Chinese (Traditional))
Currently translated at 82.6% (7559 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
pondahai 2efa67db55 Translated using Weblate (Chinese (Traditional))
Currently translated at 82.6% (7559 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
撒景賢 5b3e0aa1af Translated using Weblate (Chinese (Traditional))
Currently translated at 81.7% (7479 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
pondahai 7d790c8e5a Translated using Weblate (Chinese (Traditional))
Currently translated at 81.7% (7479 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-01-29 04:51:59 +01:00
pedrolinharesmoreira 985348c423 Translated using Weblate (Korean)
Currently translated at 96.2% (8809 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-29 04:51:59 +01:00
VicSanRoPe 318e0febb4 Translated using Weblate (Spanish)
Currently translated at 83.7% (7657 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-29 04:51:59 +01:00
Mark Hämmerling 87e99146fc Translated using Weblate (German)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-29 04:51:59 +01:00
Seth Hillbrand a85f6799eb Revert "Update translations"
This reverts commit dee4e00059.
2024-01-28 19:50:42 -08:00
Marco Ciampa 73b95ac69f Updated Italian translation (WIP) 2024-01-29 00:31:52 +01:00
Marek Roszko 5c94e0287b Clean up tuning pattern if undo triggered during drag
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16718
2024-01-28 16:10:59 -05:00
Marek Roszko 93b9fb9124 Fix crash switching footprints with 3dviewer OPENGL
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16802
2024-01-28 16:04:24 -05:00
Marek Roszko 22288adb7d Reduce KICAD_VERSION in drawing sheets to something simple 2024-01-28 15:48:02 -05:00
Jeff Young 00aed2aa3e Don't attempt to test for recursion on unsaved file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16722
2024-01-28 15:37:08 +00:00
jean-pierre charras a5ffcd0a55 void Prettify(): fix a bug in a corner case, when a string ends with '\'
A '\' in a string is encoded as \\.
A '"' in a string is encoded as \".
But prettify parser did not take in account a string encoded as "xx\\" (for xx\)
So we need to verify if a sequence is xx\" or xx\\", i.e. if there are a odd
count of backslashes before a '"'
Fixes #16777
https://gitlab.com/kicad/code/kicad/-/issues/16777
2024-01-28 16:07:52 +01:00
Jeff Young 071d8af5d7 Don't include text in footprint preview widget's autozoom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16794
2024-01-28 14:35:01 +00:00
Wayne Stambaugh 92308698ba Coding policy fixes. 2024-01-28 09:26:46 -05:00
jean-pierre charras 06d63a2aa0 pcb_io_kicad_sexpr_parser.cpp: init a default board stackup only if no stackup
is defined, and only after the enabled layers are defined.
Fixes #16754
https://gitlab.com/kicad/code/kicad/-/issues/16754
2024-01-28 14:23:50 +01:00
Jeff Young dd022c44e7 Add missing on-the-fly translation handlers. 2024-01-28 11:42:27 +00:00
Jeff Young 995c4af51d Deleted items must have their ownership changed to undo/redo. 2024-01-28 11:13:48 +00:00
Jeff Young 9eb8ec7733 Comments and menu-capitalisation. 2024-01-28 11:13:48 +00:00
Jeff Young 27534074ac Fix errors resulting from FP fields being moved from m_drawings to m_fields. 2024-01-28 11:13:48 +00:00
Marco Ciampa f6128cd01e Updated Italian traslation (WIP) 2024-01-28 10:35:01 +01:00
Jeff Young ade987c101 Fix logic errors in undo while drawing rectangles.
Draw 2 rectangles.  Start drawing a third, but don't
complete.  Hit Ctrl-Z instead.  Boom.
2024-01-27 21:18:50 +00:00
Ian McInerney 9f66ddb27f Attempt to use IsAttached to identify if a menu is a menubar menu
We can't get a mouse position for a menubar menu's event, because the
mouse may be outside our canvas. The original hack to detect menubar
menus may not work fully, and there have been some crashes appearing on
macOS where menubar menus attempted to get mouse position information.

Instead of the hack, try using IsAttached() to detect if the menu is
attached to a menubar, and then gate mouse position access accordingly.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
2024-01-27 20:59:14 +00:00
Jeff Young eacebe63f1 We do undo on individual footprint children now.
Adding a commit record for the parent means we replace the
parent first on undo and then if a child was added we can't
find it to remove it.
2024-01-27 20:26:50 +00:00
Jeff Young 07cefa7883 More active tracking of undo/redo items. 2024-01-27 20:02:40 +00:00
Jeff Young 54b46c6968 Remove ineffective attempt to fix mac menubar crash. 2024-01-27 17:45:49 +00:00
Jeff Young f7752ce0a1 Cleanup dead code. 2024-01-27 17:45:48 +00:00
Wayne Stambaugh 2f0337974b Update schematic connectivity when redoing changes.
Apparently we forgot to handle schematic connectivity changes when redoing
undone changes.  The same connectivity update logic that was added to the
commit object is now used in SCH_EDIT_FRAME::PutDataInPreviousState().

Please note the granularity of connectivity rebuilds on schematic object
property changes is at the object level which is overly aggressive.  This
means that connectivity rebuilds will happen when connectivity changes
that have nothing to do with and objects connectivity are changed.  Until
objects can handle their own connectivity state, this will have to suffice.
2024-01-27 12:02:53 -05:00
jean-pierre charras 715a5ee47b array_creator: fix issues (crashes) in board editor and footprint editor:
- In fp editor, fields cannot be duplicated: each is unique.
duplicating fields created a crash and issues in undo/redo command
- In board editor after creating an array with footprints.
- crash when closing pcbnew
- error when undoing the array creation
The crash was due to call run this_item->RunOnDescendants() on footprints: it
must be run only on a PCB_GROUP.
2024-01-27 17:02:20 +01:00
Jeff Young c0cbaa4c53 Finish earlier commit that somehow escaped my notice.
(String is existing.)
2024-01-27 15:55:05 +00:00
Jeff Young d2f0acae6b Expose pin visibility to property manager.
Also re-orders properties in Pin Properties dialog order.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16785
2024-01-27 15:52:59 +00:00
Jeff Young a8f6329590 Remove stale comment. 2024-01-27 15:52:59 +00:00
jean-pierre charras c980371892 Update French translation 2024-01-27 09:41:19 +01:00
jean-pierre charras ad1a929404 Do not mark an empty string as translatable
It is not accepted by our tools
2024-01-27 09:06:03 +01:00
Jeff Young ceb8beb8c4 Move ChangeBodyStyle and CleanupSheetPins to SCH_COMMIT.
Also fixes a bug where showDeMorganAlternate didn't work
at all.
2024-01-26 22:29:51 +00:00
Seth Hillbrand dee4e00059 Update translations 2024-01-26 13:06:14 -08:00
CloverGit a0513bc468 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:46 +01:00
Henrik Kauhanen c279df642f Translated using Weblate (Swedish)
Currently translated at 99.9% (9147 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-26 22:05:46 +01:00
Ulices 258096bc16 Translated using Weblate (Spanish (Mexico))
Currently translated at 88.6% (8110 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-26 22:05:46 +01:00
Hubert Hu 4aa994d67e Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:46 +01:00
Henrik Kauhanen 12fedddba2 Translated using Weblate (Swedish)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-26 22:05:46 +01:00
Henrik Kauhanen 32c343ad18 Translated using Weblate (Finnish)
Currently translated at 99.9% (9140 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-26 22:05:46 +01:00
Ulices a92020424c Translated using Weblate (Spanish (Mexico))
Currently translated at 88.0% (8053 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-26 22:05:46 +01:00
Wellington Terumi Uemura a11e51fb6c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-01-26 22:05:46 +01:00
向阳阳 25e42f4de0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:46 +01:00
dsa-t d0d8eb97fa Translated using Weblate (Russian)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-01-26 22:05:46 +01:00
向阳阳 9b9876f4a0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:46 +01:00
Ulices 774ae500b0 Translated using Weblate (Spanish (Mexico))
Currently translated at 87.9% (8047 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-26 22:05:46 +01:00
Hubert Hu 1d56b7c153 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:46 +01:00
Pferd O 5dd19a6895 Translated using Weblate (German)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-26 22:05:45 +01:00
Hubert Hu 77a1aac56e Translated using Weblate (Chinese (Simplified))
Currently translated at 94.4% (8642 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:45 +01:00
Tokita, Hiroshi 2c8f7ecf88 Translated using Weblate (Japanese)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-26 22:05:45 +01:00
Hubert Hu 68673f63e0 Translated using Weblate (Chinese (Simplified))
Currently translated at 94.0% (8604 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:45 +01:00
Hubert Hu 8222a102fe Translated using Weblate (Chinese (Simplified))
Currently translated at 94.0% (8603 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:45 +01:00
Hubert Hu c1cbc8f1d8 Translated using Weblate (Chinese (Simplified))
Currently translated at 94.0% (8602 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-26 22:05:45 +01:00
Henrik Kauhanen ee5822b4dc Translated using Weblate (Swedish)
Currently translated at 99.9% (9147 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-26 22:05:45 +01:00
ZbeeGin 18438bbc2e Translated using Weblate (Polish)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-01-26 22:05:45 +01:00
김랑기 2d9af7ed0a Translated using Weblate (Korean)
Currently translated at 96.1% (8797 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-26 22:05:45 +01:00
aris-kimi 71ce2f7f67 Translated using Weblate (Greek)
Currently translated at 100.0% (9148 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-26 22:05:45 +01:00
Pferd O a3fa965225 Translated using Weblate (German)
Currently translated at 99.9% (9144 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-26 22:05:45 +01:00
Henrik Kauhanen d0a37964c1 Translated using Weblate (German)
Currently translated at 99.9% (9144 of 9148 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-26 22:05:45 +01:00
Ian McInerney 6ed71e1a1a Don't translate the label for traditional Chinese, it must be in its own language 2024-01-26 20:39:29 +00:00
Seth Hillbrand 96297b50a1 Remove padstack offset value
We encode the pad locations for the package in the pin, so we don't need
an additional offset from the pin location

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16767
2024-01-26 10:53:36 -08:00
Jeff Young 3fde08f711 Attempt to escape from MacOS menubar crashbug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
2024-01-26 18:33:25 +00:00
jean-pierre charras 89f8c5d918 PCB_SELECTION_TOOL::selectPoint() Remove items disabled by the selection filter
before using any other filter. This avoid to select an item from the candidate
list that cannot be selected and eliminate another candidate.
Fixes #16755
https://gitlab.com/kicad/code/kicad/-/issues/16755
2024-01-26 19:13:50 +01:00
Jeff Young fb8f05fb34 Correctly report body style in symbol checker.
Also fixes a bug where off-grid pin locations were truncated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16770
2024-01-26 18:11:23 +00:00
Jeff Young cc9f8f5b83 Fix a straggler from rename. 2024-01-26 18:01:22 +00:00
Seth Hillbrand 3cf8b718f3 Don't truncate if not needed 2024-01-26 09:11:11 -08:00
Seth Hillbrand bcad0761a4 Fix compile error 2024-01-26 08:35:11 -08:00
Jeff Young ae735d3eb4 Renaming: replace convert with body-style.
No functional changes.
2024-01-26 16:21:03 +00:00
Jeff Young c5bd62434b Zero out number of non-numberable pads in ImportSettingsFrom().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16769
2024-01-26 14:05:04 +00:00
Jeff Young 053a0aade7 Formatting & commenting. 2024-01-26 14:05:04 +00:00
Wayne Stambaugh 8975f26c26 Coding policy fixes. 2024-01-26 08:59:14 -05:00
Jon Evans c39bec4c08 SCH_FIELD.Visible can be unmasked
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16760
2024-01-26 08:54:04 -05:00
Jeff Young cc058a7927 Exit pad edit mode before closing footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16766
2024-01-26 13:49:17 +00:00
Jeff Young f4e123f57e !m_isBoardEditor != m_isFootprintEditor.
(There's also python, cli, etc.)
2024-01-26 12:47:01 +00:00
Jeff Young e99f758447 Revert b8a2b3b2bf. 2024-01-26 12:33:21 +00:00
Marek Roszko 991703ceee Add missing default init 2024-01-26 07:23:28 -05:00
jean-pierre charras 12357cfba6 symbol checker: do not forget to display error messages about pins not on grid.
Fixes #16759
https://gitlab.com/kicad/code/kicad/-/issues/16759
2024-01-26 10:19:58 +01:00
jean-pierre charras 74e02d7701 Eeschema, open CvPcb: ensure the netlist sent to CvPcb is up to date.
Fixes #16762
https://gitlab.com/kicad/code/kicad/-/issues/16762
2024-01-26 09:24:38 +01:00
Marek Roszko 7f5433f0f2 Realize why we sch parity wasnt included in cli drc
Need to add schematic loading...to the pcbnew jobs handler
2024-01-25 22:19:52 -05:00
Marek Roszko 465ccaef90 Add missing schematic parity drc test to cli 2024-01-25 22:14:49 -05:00
Marek Roszko a282762686 Fix pcb drc in cli due to awkward !m_isBoardEditor logic with more awkward logic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16744
2024-01-25 22:09:29 -05:00
Seth Hillbrand ec82a1b4e2 Fix duplicate pin check string
MessageTextFromValue returns text not floating point

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16758
2024-01-25 18:02:05 -08:00
Marek Roszko c2989132ac DeselectRow as we delete rows to avoid asserts 2024-01-25 20:37:00 -05:00
Marek Roszko 5d44e090dc Fix shadowed var 2024-01-25 19:55:02 -05:00
Seth Hillbrand bba0a8d038 Protect schematic undo list actions
The undo/redo lists can have non-SCH_ITEM elements such as worksheet
items.  When re-doing connectivity, we only need the schematic items, so
we pass on these

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16752
2024-01-25 16:47:14 -08:00
Jeff Young b8a2b3b2bf Take a stab at fixing #16752. 2024-01-25 23:46:35 +00:00
Wayne Stambaugh 4d6bbc8caa Fix symbol annotation when pasting nested hierarchical sheets. 2024-01-25 16:39:21 -05:00
Seth Hillbrand 9e9dfb38d1 IPC2581: Correct flipped pad handling
Board footprints have pads already flipped, so we don't need to adjust
layers when outputting

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16659
2024-01-25 13:06:59 -08:00
Alex Shvartzkop 6a69396070 Allow column auto-sizing in RC trees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16727
2024-01-25 20:51:54 +03:00
jean-pierre charras 2e760483b0 HIERARCHY_PANE: Update tree labels when editing a sheet name or number
Fixes #16650
https://gitlab.com/kicad/code/kicad/-/issues/16650
2024-01-25 18:22:41 +01:00
Jeff Young a2b204572d Don't assert when a sim returns no results.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16749
2024-01-25 15:40:12 +00:00
Jeff Young 70bca8bc4e Provide popups for inductor references.
Also fixes a long-standing bug deleting the last field of
a symbol in the Symbol Editor.
2024-01-25 15:30:25 +00:00
Jeff Young 340d1b7fad Guard against nullptr access. 2024-01-25 15:30:25 +00:00
Jeff Young b3f94ad46a Cleanup before exit.
Possibly KICAD-5TE.
2024-01-25 15:30:25 +00:00
Jeff Young d3bc59e0e7 SelectBlock() will assert for invalid selection modes.
KICAD-63D.
2024-01-25 15:30:25 +00:00
Jon Evans a377fa4201 Add some missing deep comparisions for BOARD_STACKUP 2024-01-25 09:08:27 -05:00
Marek Roszko fec57459f3 Use correct arg types in altium arc import error message
Fixes KICAD-6Q1
2024-01-25 07:50:13 -05:00
Jon Evans bfbf000f60 Add some safety around event-driven menubar recreation
Maybe addresses sentry KICAD-PC
2024-01-24 23:30:34 -05:00
Jon Evans 3ef16221fe Make sure default board thickness exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16733
2024-01-24 23:09:56 -05:00
Marek Roszko c816280c6d Move the current selection before deleting the row to avoid asserts
Fixes sentry KICAD-63D
2024-01-24 22:57:36 -05:00
Marek Roszko 5321c1c481 Create the import directory if it doesn't exist
Fixes sentry KICAD-6BC
2024-01-24 20:35:03 -05:00
Marek Roszko b8bbbcf410 Fix assert in SYMBOL_VIEWER_FRAME::onSelectNextSymbol due to bad current selection check
Fixes sentry KICAD-6KE
2024-01-24 20:15:23 -05:00
Marek Roszko 8f57a9bcf0 Fix spacemouse version check by pawning it off on wxWidgets
Version is a value not a key name. Also the registry returns things in wchars soooo lets just pawn off the encoding mess on wxWidgets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16730
2024-01-24 19:04:50 -05:00
Jon Evans 5d7eac7677 Allow for empty LIB_PART in certain symbol functions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16731
2024-01-24 12:18:10 -05:00
Alex Shvartzkop 13f8fd77ac wx 3.3 compatibility. 2024-01-24 19:58:12 +03:00
Jeff Young b8b4ea1a45 Comments. 2024-01-24 16:24:19 +00:00
Ian McInerney d04b21c6d6 Ensure parameter typeinfo matches the actual object's typeinfo
AppleClang seems to generate different typeinfo for forward declarations
of classes than the actual class object, so the any_cast for the pointer
parameter fails due to the types not matching (even when they look the
same when printed in the error).

Instead, we must always ensure we use the actual object when defining
the parameter type when placing the object into the event.
2024-01-24 16:14:32 +00:00
Jeff Young a5ee614ae8 Comments. 2024-01-24 14:51:41 +00:00
Jeff Young 65c75072ef Convert between refs and KIIDs in Footprint Properties.
Also fixes DIALOG_TEXT_PROPERTIES, which did it correctly
for multi-line texts, but not for single-line texts.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16721
2024-01-24 13:35:37 +00:00
Jeff Young 89850824d5 Naming & comments. 2024-01-24 13:35:37 +00:00
Jon Evans 64221b95c9 Don't skip highlighting selected NPTH/via holes 2024-01-24 08:23:26 -05:00
Jan Wichmann b6ddef7162 pcbnew: Added missing DRC checks for value and library-link between symbol and footprint 2024-01-24 12:35:51 +00:00
Jeff Young 7cf861a239 Use ARC_HIGH_DEF (not ARC_LOW_DEF) for courtyard generation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16695
2024-01-24 12:00:33 +00:00
Jeff Young 9d88a9f60a Fix typo causing OnItemsChanged() to get called too often.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16657
2024-01-24 11:36:56 +00:00
Jeff Young 6407576cb9 Convert between refs and KIIDs in Symbol Properties. 2024-01-24 11:02:56 +00:00
Jon Evans d50e0811fb Fix QA build 2024-01-23 22:50:53 -05:00
Marek Roszko a85478df97 Test the directory opened explicitly to silence assert
Fixes KICAD-6FY
2024-01-23 22:37:22 -05:00
Jon Evans c143be6279 Pads need to be included in collection for length checks
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16724
2024-01-23 22:08:08 -05:00
Alex ed00cb3304 Support arcs in Break Track.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16712
2024-01-24 05:47:50 +03:00
Jon Evans a46d409ec6 Make sure grouping commits follow board editor path 2024-01-23 21:22:23 -05:00
Jon Evans 256364aaa1 Parent property should not be accessible from the UI 2024-01-23 20:41:34 -05:00
Jon Evans 426aa76788 Add Andre Iwers to developers 2024-01-23 20:30:37 -05:00
Martin Berglund ddc2092dac Eeschema: Autoplace fields offset correction
No longer count fields without 'Allow automatic placement'
toward the Autoplace offset.

Fixes https://gitlab.com/kicad/code/kicad/issues/16588
2024-01-24 00:24:16 +00:00
Jeff Young ea7176d466 Don't attempt to update start item from a keyboard event. 2024-01-23 23:07:11 +00:00
afkiwers c871bcf6db removed unnecessary variables 2024-01-23 22:32:05 +00:00
afkiwers c7475a16c8 implemented better caching for categories and parts overview to reduce processing time 2024-01-23 22:32:05 +00:00
Wayne Stambaugh d96ebf5745 Remove paste sheet instance path debugging output. 2024-01-23 16:04:08 -05:00
jean-pierre charras 8d2784b822 Eeschema, hierarchy navigator: right click on an item must select the corresponding
sheet, not the currently opened sheet.
Fixes #16670
https://gitlab.com/kicad/code/kicad/-/issues/16670
2024-01-23 18:13:03 +01:00
Jeff Young 8410a5e685 Coding conventions and cleanup. 2024-01-23 16:03:25 +00:00
Jeff Young e549d7c0c6 Formatting and clearer variable names.
(No functional changes.)
2024-01-23 16:02:30 +00:00
Jeff Young a263b6d343 Mutual inductance statements have no model. 2024-01-23 15:14:09 +00:00
Jeff Young 1bd8da41a7 Mutual Inductor isn't an inductor.
It's a statement about two other inductors.
2024-01-23 15:07:29 +00:00
Jeff Young a836a66170 Update labels when editing field names.
This is yet another path for getting duplciate fields
when changing the case of an existing field name.
2024-01-23 14:58:56 +00:00
Jeff Young 9935a022cd Fix typo in OnRenameField() that can cause OOB access.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16625
2024-01-23 14:02:13 +00:00
Jeff Young 179ab1011f Don't use canonical name for user fields with an id of -1.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16715
2024-01-23 13:42:17 +00:00
Jeff Young 8b56b3d999 Formatting. 2024-01-23 13:42:17 +00:00
Wayne Stambaugh b3a36bd783 Fix overly aggressive sheet instance pruning. 2024-01-23 07:44:45 -05:00
Marek Roszko 5f063dd458 Change the migrate settings path box to proportion rather than fixed min width 2024-01-22 22:12:38 -05:00
Jeff Young d47a000564 Make sure group items get added to commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16705
2024-01-22 23:34:34 +00:00
Seth Hillbrand 92ed389ad2 Add cir file icon to treeview
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15777
2024-01-22 15:24:00 -08:00
Seth Hillbrand 224d8577bb Fix dark file_pos 2024-01-22 15:24:00 -08:00
Seth Hillbrand 71992b3637 Add new icons to build list 2024-01-22 15:24:00 -08:00
Seth Hillbrand 967885180e Add cir file icon type
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15777
2024-01-22 15:24:00 -08:00
Seth Hillbrand f5a64aea43 Add export gltf icon
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16203
2024-01-22 15:24:00 -08:00
Seth Hillbrand 497460f4aa Fix type on post_rpt icon 2024-01-22 15:24:00 -08:00
Seth Hillbrand 3e45e49784 Correct IDF file dark mode icon 2024-01-22 15:24:00 -08:00
Seth Hillbrand 02e46e690c Add missing dark mode icons
e-series icons
sim_command
sim_add_plot
2024-01-22 15:23:59 -08:00
Seth Hillbrand a98ff2bb9f Fix 3d Display on tiny_tapeout 2024-01-22 15:23:59 -08:00
Wayne Stambaugh 4cf22e428c Fix broken pasted sheet page numbering.
This change no longer sorts pasted sheets by page number.  This was done
because pasted sheets may not be numbered.  When sheets are not numbered
they are sorted by UUID path which results in some unexpected results.
Since the pasted sheet code uses recursion, pages will be numbered in the
order they are added.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16580
2024-01-22 16:55:43 -05:00
Roberto Fernandez Bautista 43a3ed2522 Don't hardcode symbol library stub when converting library
Also, make sure options column is set back to blank

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16706
2024-01-22 22:52:40 +01:00
Jeff Young 85f0dd279c Push fileFilter callback function down a level.
(The GRID_CELL_PATH_EDITOR is shared by the whole column.)

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13959
2024-01-22 18:27:31 +00:00
Jeff Young 236123c487 Allow FPID to be matched against in memberOfFootprint().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16662
2024-01-22 14:03:45 +00:00
jean-pierre charras 6efe44a12a French translation update. 2024-01-22 09:13:58 +01:00
Marek Roszko f63c7806fd More bitmap bundle comboboxes 2024-01-21 22:55:13 -05:00
Marek Roszko 059b043935 Try and walk from a real component pin rather than power symbol that will fail our later check 2024-01-21 21:12:14 -05:00
Marek Roszko caf463bbd2 Pass KiBitmapBundle instead of KiBitmap to the pin property comboboxes
Related https://gitlab.com/kicad/code/kicad/-/issues/16698
2024-01-21 20:47:46 -05:00
Seth Hillbrand 39d918b36a Update translations 2024-01-21 16:55:09 -08:00
Henrik Kauhanen 2a21b6ac67 Translated using Weblate (Swedish)
Currently translated at 99.9% (9143 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-21 16:55:08 -08:00
Hajdu Norbert 1902da4ad7 Translated using Weblate (Hungarian)
Currently translated at 2.1% (197 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2024-01-21 16:55:08 -08:00
dsa-t 678219a81b Translated using Weblate (Russian)
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-01-21 16:55:08 -08:00
김랑기 946e4f6c74 Translated using Weblate (Korean)
Currently translated at 94.9% (8686 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:08 -08:00
Hajdu Norbert 32c8b8a8ce Translated using Weblate (Hungarian)
Currently translated at 1.5% (143 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2024-01-21 16:55:08 -08:00
aris-kimi 7a1f1fb9a6 Translated using Weblate (Greek)
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:08 -08:00
Tokita, Hiroshi 055bf9db08 Translated using Weblate (Japanese)
Currently translated at 99.9% (9143 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-21 16:55:08 -08:00
aris-kimi ed77fc6c00 Translated using Weblate (Greek)
Currently translated at 98.4% (9003 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:08 -08:00
Lao·Zhu b65fa66ad3 Translated using Weblate (Chinese (Simplified))
Currently translated at 92.4% (8451 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-21 16:55:08 -08:00
김랑기 dd16f87d3c Translated using Weblate (Korean)
Currently translated at 94.4% (8638 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:08 -08:00
aris-kimi b60757bb90 Translated using Weblate (Greek)
Currently translated at 97.7% (8938 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:08 -08:00
Mert Kalkancı 2a22d32018 Translated using Weblate (Turkish)
Currently translated at 51.2% (4685 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2024-01-21 16:55:08 -08:00
向阳阳 b3df1f5db9 Translated using Weblate (Chinese (Simplified))
Currently translated at 92.3% (8449 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-21 16:55:08 -08:00
김랑기 687793e2e5 Translated using Weblate (Korean)
Currently translated at 94.4% (8638 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:08 -08:00
aris-kimi 9f6fed2a51 Translated using Weblate (Greek)
Currently translated at 95.9% (8775 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:08 -08:00
Mark Hämmerling 42c9c17a9c Translated using Weblate (German)
Currently translated at 99.9% (9140 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
Pferd O a60ae5100d Translated using Weblate (German)
Currently translated at 99.9% (9140 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
dsa-t 359a859638 Translated using Weblate (Russian)
Currently translated at 89.2% (8160 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-01-21 16:55:08 -08:00
Mark Hämmerling a85da4cf49 Translated using Weblate (German)
Currently translated at 99.9% (9136 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
Pferd O 5ea8179620 Translated using Weblate (German)
Currently translated at 99.9% (9136 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
Mark Hämmerling ba594dcb9b Translated using Weblate (German)
Currently translated at 98.1% (8976 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
김랑기 15b6b7d942 Translated using Weblate (Korean)
Currently translated at 92.7% (8485 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:08 -08:00
Pferd O 7533048996 Translated using Weblate (German)
Currently translated at 98.0% (8963 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:08 -08:00
Ulices c0f137d007 Translated using Weblate (Spanish (Mexico))
Currently translated at 85.9% (7857 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-21 16:55:08 -08:00
向阳阳 5b26cbb814 Translated using Weblate (Chinese (Simplified))
Currently translated at 91.9% (8411 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-21 16:55:08 -08:00
Henrik Kauhanen f317a83450 Translated using Weblate (Swedish)
Currently translated at 99.9% (9141 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-21 16:55:07 -08:00
김랑기 84a5f11cbe Translated using Weblate (Korean)
Currently translated at 92.7% (8485 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:07 -08:00
Henrik Kauhanen f879a95859 Translated using Weblate (Finnish)
Currently translated at 99.9% (9140 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-21 16:55:07 -08:00
Mark Hämmerling 034f542045 Translated using Weblate (German)
Currently translated at 96.9% (8868 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Tokita, Hiroshi 623ef6299a Translated using Weblate (Japanese)
Currently translated at 99.9% (9141 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-21 16:55:07 -08:00
Pferd O 4565900cc9 Translated using Weblate (German)
Currently translated at 96.9% (8868 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Mark Hämmerling 3235176f3d Translated using Weblate (German)
Currently translated at 96.9% (8868 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Mark Hämmerling 9d15984a23 Translated using Weblate (German)
Currently translated at 96.9% (8868 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Pferd O 748567e148 Translated using Weblate (German)
Currently translated at 96.9% (8868 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
김랑기 86b2d40507 Translated using Weblate (Korean)
Currently translated at 92.0% (8419 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-21 16:55:07 -08:00
aris-kimi 016c3d5f93 Translated using Weblate (Greek)
Currently translated at 95.3% (8723 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:07 -08:00
Mark Hämmerling 553b3c734d Translated using Weblate (German)
Currently translated at 96.6% (8841 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Pferd O f47dfdf40c Translated using Weblate (German)
Currently translated at 96.6% (8841 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:07 -08:00
Wellington Terumi Uemura 7f2dda5971 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-01-21 16:55:07 -08:00
Henrik Kauhanen 2325dea167 Translated using Weblate (Swedish)
Currently translated at 99.8% (9127 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-21 16:55:07 -08:00
dsa-t 8df34b16d3 Translated using Weblate (Russian)
Currently translated at 89.0% (8146 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-01-21 16:55:07 -08:00
ZbeeGin e967cb75b0 Translated using Weblate (Polish)
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-01-21 16:55:07 -08:00
Tokita, Hiroshi c2e13a6537 Translated using Weblate (Japanese)
Currently translated at 99.9% (9141 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-21 16:55:07 -08:00
gallegonovato 216bb79d56 Translated using Weblate (Spanish)
Currently translated at 81.3% (7441 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2024-01-21 16:55:07 -08:00
aris-kimi 9efd59f58d Translated using Weblate (Greek)
Currently translated at 95.2% (8708 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-21 16:55:07 -08:00
Pferd O 40fecd9260 Translated using Weblate (German)
Currently translated at 94.9% (8680 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:06 -08:00
Jonathan Haas d1148a5221 Translated using Weblate (German)
Currently translated at 94.9% (8680 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-21 16:55:06 -08:00
Marek Roszko fb8dc75108 Fix broken conditional check while walking global power connected items
Per the if statement and logic, we want to walk into looking up connections if we are a pin on a chip.
IsGlobalPower is a test for it's in a power symbol, so we want it false not true.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16699
2024-01-21 19:54:09 -05:00
Jeff Young d6b39c672e Footprint editor items always get added to footprint.
Also fixes an unrelated crash when assuming the current
editor is the board editor.
2024-01-21 22:51:36 +00:00
Jeff Young 6fca467e2a Don't query first item of empty vector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16687
2024-01-21 22:51:36 +00:00
Jeff Young 2627c99654 Fix typos that produce segfaults.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16696
2024-01-21 22:51:36 +00:00
Marek Roszko 1981997ee2 Dump the ERC report as part of the erc failure 2024-01-21 16:10:43 -05:00
Marek Roszko 0147dd8699 Tweak the boost test logger config 2024-01-21 15:52:53 -05:00
Graham Keeth e58615952c Fix delimeter -> delimiter typo in translated strings
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16673
2024-01-21 13:44:43 -05:00
Wayne Stambaugh ebb69bdfa4 Tag version 8 release candidate two. 2024-01-21 12:02:38 -05:00
Wayne Stambaugh 2cfb7a5310 Incremental schematic connectivity fixes. 2024-01-21 16:53:05 +00:00
Wayne Stambaugh c2bd158194 Update about dialog contributors lists. 2024-01-21 08:29:15 -05:00
Jeff Young e07a4c285b Remove old hack required for wxWidgets 3.0 on MacOS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16687
2024-01-21 11:20:34 +00:00
Alex 767ab72cdb DXF import: INSERT angles are in degrees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16656
2024-01-21 07:56:20 +03:00
Jeff Young 37c185f437 Remove overly-complex snapping layer for moving objects.
We now have a hotkey to select Active Layer vs All Layers,
which gives the user more control.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16683
2024-01-20 22:04:56 +00:00
Jeff Young 5c4313587b Attempt to fix hierarchy tree selection issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16670
2024-01-20 19:25:18 +00:00
Jeff Young 13935399a5 Second part of d854de9d68
This one for symbol <-> footprint.  (Original was for
lib footprint <-> board footprint.)

Also fixes a major bug in DRC where we bail out of parity
checking if DRCE_MISSING_FOOTPRINT is set to ignore (or
overflows).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16671
2024-01-20 18:41:35 +00:00
Jeff Young d854de9d68 Add missing DRC checks for footprint attributes.
Requires string change, but it's a bug, and worse, a DRC
bug.  I did minimize the changes by using a single error
message string that then has the various settings (which
are already translated) put into it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16671
2024-01-20 17:22:19 +00:00
Wayne Stambaugh 466269a360 Update about dialog contributors list. 2024-01-20 09:46:40 -05:00
jean-pierre charras 2b01ea21d5 Update French tranlation (fix typo and new strings) 2024-01-20 13:00:49 +01:00
jean-pierre charras be723dd579 PANEL_PCBNEW_COLOR_SETTINGS: ensure color setting for all DRC markers are in list
Fixes #16674
https://gitlab.com/kicad/code/kicad/-/issues/16674
2024-01-20 12:05:45 +01:00
Jan Wichmann b65fa46c3c Move git clone to standard create project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16523
2024-01-19 23:52:37 +00:00
Ian McInerney b36a67e556 Fix missed IO_MGR rename in Python
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16669
2024-01-19 22:23:04 +00:00
Seth Hillbrand 7687f240a2 Prevent footprint editing in power symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16663
2024-01-19 12:52:03 -08:00
Jeff Young 7fbeea0195 Allow smaller grid dots on Retina displays. 2024-01-19 20:37:27 +00:00
Seth Hillbrand 0e6f1a9f99 Don't set defaults in blank project
Defaults are set in code so that we have a singular reference when
generating new project

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16032
2024-01-19 12:35:59 -08:00
Jeff Young ac4f9dc97a Initialize shared sheet instance page no's in drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16580
2024-01-19 18:45:46 +00:00
jean-pierre charras 7c3f8cbb79 3D viewer: do not load the current board twice when creating the 3D viewer frame. 2024-01-19 18:42:24 +01:00
Jeff Young 1597882c1f Allow creation of groups with a single member.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16586
2024-01-19 17:32:00 +00:00
Jon Evans e29baa75b4 Scale GAL grid with DPI 2024-01-19 12:20:13 -05:00
Jeff Young 7975ad495b Push busyCursor out of scope after building dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16653
2024-01-19 17:13:15 +00:00
Jeff Young c3e3f3bcb8 Possible fix for move individually.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16087
2024-01-19 15:13:41 +00:00
Jeff Young 4d80da8238 Separate symbol angle and mirroring in prop manager. 2024-01-19 13:40:56 +00:00
Jon Evans f80094e7c5 Warn the search pane that pointers are going invalid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16612
2024-01-18 17:50:50 -05:00
Jan Wichmann 693248f60f pcbnew: 3d viewer: disable show DNP footprints by default 2024-01-18 22:33:02 +00:00
Seth Hillbrand f1dacf7d92 Updated revision of polygon triangulation from 0a67dd3fdd
This maintains the primary goal of ensuring that bad splits do not allow
the triangulation process to continue.  Instead, we boot this back up to
the top-level where we will simplify the polygon before triangulating
again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16624
2024-01-18 11:07:40 -08:00
Seth Hillbrand e4a0b9c7ed Revert "Revise triangulation"
This reverts commit 0a67dd3fdd.
2024-01-18 11:07:40 -08:00
Jeff Young 6361995412 Beef up property manager access to SCH_SYMBOL.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16640
2024-01-18 16:17:46 +00:00
Jeff Young 61876533df Clean up formatting. 2024-01-18 16:17:46 +00:00
Jeff Young bb74100fe2 Fix typo. 2024-01-18 16:17:46 +00:00
Jeff Young 65b89116e1 Clean up formatting. 2024-01-18 16:17:46 +00:00
Mark Roszko 4e81f48b3e Update vcpkg baseline 2024-01-18 15:12:34 +00:00
Jeff Young 57315dd625 Make sure group children get added to board.
Also fixes a bug where you could import on to an invisible
layer (we now auto-show the layer if you do that).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642
2024-01-18 14:02:43 +00:00
Jeff Young 84c6451787 Reduce visual noise in dialog; regularize spacing. 2024-01-18 14:02:43 +00:00
Alex 3eb3fc9d1e Fix PCB arc edit point order. 2024-01-18 13:51:32 +03:00
Marek Roszko 7b24167398 FromDIP symbol and footprint editor aui panes 2024-01-17 23:08:38 -05:00
Marek Roszko 4e0e348688 FromDIP the default frame sizes 2024-01-17 23:01:58 -05:00
Marek Roszko ef3e305db4 Min width of pl_editor properties should be FromDIPed 2024-01-17 22:53:26 -05:00
Marek Roszko b41cd7981e Try and fix pcm somewhat with FromDIP
We really need FromDIP in the base class to get things correct ugh
2024-01-17 22:52:01 -05:00
Marek Roszko f5db4d6864 Remove the invalid default dock directions for search panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16636
2024-01-17 22:26:04 -05:00
Marek Roszko 1c6d7a5fa5 Sprinkle FromDIP in SCH_EDIT_FRAME aui setup 2024-01-17 22:05:54 -05:00
Marek Roszko 7c8ee26a38 FromDIP the pcb aui sizes 2024-01-17 22:02:05 -05:00
Marek Roszko 7709de3667 FromDIP the left tree view in kicad frame 2024-01-17 21:57:23 -05:00
Marek Roszko 8a3a7b2a10 Tie the caption size to the font size to scale at hi dpi better on windows 2024-01-17 21:45:18 -05:00
Andre Iwers 4d1a016429 HTTP Libraries: Improved cache performance 2024-01-18 02:33:16 +00:00
Jeff Young 97cb15dd47 Make sub menus conditional on them having child items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16631
2024-01-18 00:21:15 +00:00
Jon Evans 7aad7fcce6 Expose CORNER_STRATEGY to swig 2024-01-17 17:08:14 -05:00
Jeff Young 047b5f8b18 Cache for wxLocale::IsAvailable(). 2024-01-17 16:13:53 +00:00
Jeff Young 455fae45d8 Support point editing of inverted rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16595
2024-01-17 15:27:48 +00:00
Jeff Young df48ebfbe7 Restore preferential selection treatment for silk items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16607
2024-01-17 14:02:43 +00:00
jean-pierre charras 27482ef8a0 add missing dark icon source 2024-01-17 08:26:57 +01:00
Seth Hillbrand ba6979a274 Fix pin check to allow for globals
Don't short-circuit adding global labels to the pins vector or we won't
search all subnets
2024-01-16 16:35:47 -08:00
Jeff Young ace4ef7b16 Implement stingy selection mode for tuning patterns. 2024-01-17 00:34:22 +00:00
Jeff Young be6a2d018d Implement stingy selection mode for tuning patterns. 2024-01-17 00:34:22 +00:00
Seth Hillbrand 121271bd0a Allow users to specify no minimum text width in DRC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16596
2024-01-16 16:24:18 -08:00
Jeff Young 322ad1af45 Implement copy/paste for generators.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16613
2024-01-16 23:38:50 +00:00
Seth Hillbrand 9077c9fb80 Avoid assertion when changing projects
If the regex does not compile, we should not be checking for matches
2024-01-16 15:24:32 -08:00
Seth Hillbrand 8fea4812f3 Don't count power flags as sinks/sources
Just because we have a power flag on a net does not mean that there are
more than 1 pin

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13469
2024-01-16 15:24:32 -08:00
Jon Evans 57c40d4f17 Disable the splash screen for now 2024-01-16 17:26:02 -05:00
Marek Roszko b4bfdf95d3 Explicitly add 48, 128, 256 to icon bundles for each app 2024-01-16 17:21:44 -05:00
Marek Roszko f20e8a6e41 Add 256x256 program icon pngs 2024-01-16 17:21:44 -05:00
Marek Roszko 8b5fff4ffe Add 256 icon png generation 2024-01-16 17:21:44 -05:00
Alex Shvartzkop 27b560b439 EAGLE: fix missing undefined layer check for rectangle zones.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16619
2024-01-17 01:18:24 +03:00
levanlap2502 faeec25557 Fix fillet lines, when line angle is 0 or 180
Check angle of line before creating Fillet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15966
2024-01-16 13:30:21 -08:00
Seth Hillbrand 13544ff975 Avoid crash on step export
Detach the wxProcess from the chain before closing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16608
2024-01-16 13:18:54 -08:00
Marek Roszko 6f52220741 Add missing 256x256 image to app icos 2024-01-16 16:04:41 -05:00
Marek Roszko 0b0a9d92da Force script line endings 2024-01-16 16:03:43 -05:00
Marek Roszko 76e8ed2506 Fix sch_field and pcb_target not returning evaluated similarity correctly 2024-01-16 15:43:49 -05:00
Alex Shvartzkop 3bbf45dccb EasyEDA Pro: resolve device attribute variables in schematic. 2024-01-16 23:40:00 +03:00
Marek Roszko f6401b0903 Fix preferences dialog on hidpi using FromDIP 2024-01-16 15:33:32 -05:00
Marek Roszko 918327efb3 Use FromDIP helper for initial kicad frame size 2024-01-16 15:24:49 -05:00
Alex Shvartzkop 42255f10c3 EasyEDA Pro: fix default netport orientations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16620
2024-01-16 22:47:15 +03:00
Alex Shvartzkop fba6aaf0e8 Only height should be increased for LIB_TREE_RENDERER. 2024-01-16 22:04:30 +03:00
Alex Shvartzkop ac59fae152 Fix cut-off library tree cell texts. 2024-01-16 21:59:08 +03:00
Jeff Young 4fb11e210a Copy teardrop settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16618
2024-01-16 17:20:54 +00:00
Seth Hillbrand a044ca8d4d Don't show preferences without lib table init
Since we require lib tables for the kiface, we require them for
instantiating the kiface and won't show preferences without them

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16611
2024-01-16 09:18:22 -08:00
Seth Hillbrand 7001c4e351 Remove errand remnant of capitalized demo 2024-01-16 08:39:28 -08:00
Alex Shvartzkop c8a0a58683 Fix PCB_FILE_T usage in FP_LIB_TABLE_GRID. 2024-01-16 19:35:10 +03:00
Alex Shvartzkop 4f6c25895e Rename UNKNOWN in enums to prevent shadowing. 2024-01-16 19:14:57 +03:00
Alex Shvartzkop d512e09eb8 std::isnan is not constexpr in C++17 2024-01-16 18:42:37 +03:00
jean-pierre charras 07fa42644d SCH_PAINTER: fix a few minor issues related to Cairo print engine
- shows correctly hidden power pins unconnected circle
- do not print dangling indicators
- do not print highlight shadows.
Fixes #16615
https://gitlab.com/kicad/code/kicad/-/issues/16615
2024-01-16 16:30:55 +01:00
jean-pierre charras 76bd892f93 Fix not working Duplicate command in FP editor
Fixes #16594
https://gitlab.com/kicad/code/kicad/-/issues/16594
2024-01-16 16:30:55 +01:00
Alex Shvartzkop 4c630e5aec KiROUND: make sure input type is floating point before checking for nan. 2024-01-16 17:25:46 +03:00
Alex Shvartzkop f99505e190 Fix arc editing bugs when endpoints match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16532
2024-01-16 16:17:45 +03:00
Alex Shvartzkop 5bd620d8f9 Support Bezier curve editing in eeschema. 2024-01-16 14:11:25 +03:00
Alex Shvartzkop 338914c7cf Restore Fix Discontinuities default tolerance; enable it by default.
There's no artifacts anymore due to CalcArcCenter fixes.
2024-01-16 12:13:08 +03:00
Marek Roszko fc62d36441 Add share/locale to catalog paths on windows 2024-01-15 22:08:17 -05:00
Marek Roszko 88dc531d91 Update vcpkg to get locale installing wxwidgets 2024-01-15 21:11:19 -05:00
Seth Hillbrand d25ac664f8 Adding additional demos
Some simulation demos curtesy of Holger Vogt and a new board design
curtesy of Pat Deegan
2024-01-15 16:52:33 -08:00
Alex Shvartzkop 82a0227c20 Don't plot polygon borders when they are disabled. 2024-01-15 22:35:35 +03:00
Alex Shvartzkop 57bc443f0b Fix HPGL color mode being set. 2024-01-15 22:35:35 +03:00
Alex Shvartzkop 01e88d33aa Fix Bezier reading in schematic as well. 2024-01-15 22:35:35 +03:00
Alex Shvartzkop ad7258721b Initialize SCH_SHEET members earlier.
m_borderWidth is used for autoplacing fields.
Fixes sheet filename being in extreme locations in some cases.
2024-01-15 22:35:35 +03:00
Wayne Stambaugh d3f40dde3f Fix assertion when pasting schematic sheets.
Pasted sheets do not have assigned SCH_SCREEN objects until after they
are loaded.

Do not recalculate connectivity unless the SCH_COMMIT object actually has
connectable schematic object changes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16579
2024-01-15 12:15:30 -05:00
jean-pierre charras ec3bf79c42 Fix incorrect Help menu on Windows
Fixes #16598
https://gitlab.com/kicad/code/kicad/-/issues/16598
2024-01-15 08:37:12 +01:00
Alex Shvartzkop 4fac43d696 Fix variable substitutions in library tables.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16601
2024-01-15 09:53:08 +03:00
Alex Shvartzkop b7460f29b4 Altium schematic: fix properties parsing in old formats.
Leading "|" can be missing before "RECORD=28" in old formats.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16513
2024-01-14 13:12:47 +03:00
Alex Shvartzkop 42d8c85f12 Altium PCB import: Models is optional.
Models directory may not exist in older files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16512
2024-01-14 11:59:49 +03:00
Marek Roszko 5bc78f7d9f Remove the user 3d path creation 2024-01-13 19:35:55 -05:00
Mark Roszko 2c53ce0704 Fix ci after libgal rename 2024-01-13 17:22:01 +00:00
Marek Roszko 21647f54e9 Rename the gal output to kigal 2024-01-13 11:35:59 -05:00
Seth Hillbrand 4e3d2a148d Fix typo 2024-01-12 14:51:32 -08:00
Wayne Stambaugh 7461b4c720 Tag version 8 release candidate one. 2024-01-12 12:09:59 -05:00
Seth Hillbrand 297601f66b Update translations 2024-01-12 09:03:58 -08:00
Henrik Kauhanen dc9d97eeab Translated using Weblate (Swedish)
Currently translated at 99.7% (9119 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-12 18:03:21 +01:00
김랑기 d09ec3cc08 Translated using Weblate (Korean)
Currently translated at 91.9% (8413 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:21 +01:00
Tokita, Hiroshi d01abd6312 Translated using Weblate (Japanese)
Currently translated at 99.9% (9143 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:20 +01:00
Toni Laiho 7755f45ed8 Translated using Weblate (Finnish)
Currently translated at 99.9% (9144 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-12 18:03:20 +01:00
aris-kimi 2fae62701e Translated using Weblate (Greek)
Currently translated at 92.3% (8446 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:20 +01:00
Mark Hämmerling 4869c6db43 Translated using Weblate (German)
Currently translated at 94.9% (8681 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:20 +01:00
Li Yidong 4b1db10821 Translated using Weblate (Chinese (Simplified))
Currently translated at 86.2% (7892 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-12 18:03:20 +01:00
김랑기 4b042bba0e Translated using Weblate (Korean)
Currently translated at 91.2% (8341 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:20 +01:00
Tokita, Hiroshi d15bf34226 Translated using Weblate (Japanese)
Currently translated at 99.8% (9135 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:20 +01:00
aris-kimi 6fb2f2b1dc Translated using Weblate (Greek)
Currently translated at 87.8% (8033 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:20 +01:00
Johannes Maibaum be629272ba Translated using Weblate (German)
Currently translated at 94.8% (8676 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:20 +01:00
Ulices 86f5a8dc85 Translated using Weblate (Spanish (Mexico))
Currently translated at 85.4% (7816 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-12 18:03:20 +01:00
dsa-t a8b2e463f7 Translated using Weblate (Russian)
Currently translated at 85.4% (7814 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-01-12 18:03:20 +01:00
Toni Laiho bc39646ba1 Translated using Weblate (Finnish)
Currently translated at 99.9% (9144 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-12 18:03:20 +01:00
Mark Hämmerling 9c7d2c546a Translated using Weblate (German)
Currently translated at 94.2% (8618 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:20 +01:00
Luc 6c5017235d Translated using Weblate (German)
Currently translated at 94.2% (8618 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:20 +01:00
Ulices 5ffd5c2af0 Translated using Weblate (Spanish (Mexico))
Currently translated at 85.0% (7775 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-12 18:03:20 +01:00
김랑기 ca58a93b26 Translated using Weblate (Korean)
Currently translated at 91.1% (8337 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:20 +01:00
Tokita, Hiroshi 019b137f67 Translated using Weblate (Japanese)
Currently translated at 99.8% (9135 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:20 +01:00
aris-kimi 89bb81bfca Translated using Weblate (Greek)
Currently translated at 85.5% (7824 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:19 +01:00
Mark Hämmerling 5f5b4031b1 Translated using Weblate (German)
Currently translated at 93.6% (8563 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:19 +01:00
Tokita, Hiroshi f9a32378bf Translated using Weblate (Japanese)
Currently translated at 94.9% (8685 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:19 +01:00
Hubert Hu e01945d404 Translated using Weblate (Chinese (Simplified))
Currently translated at 86.2% (7891 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-12 18:03:19 +01:00
Tokita, Hiroshi 6c2dde7f11 Translated using Weblate (Japanese)
Currently translated at 92.2% (8436 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:19 +01:00
Hubert Hu f773020824 Translated using Weblate (Chinese (Simplified))
Currently translated at 86.2% (7890 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-12 18:03:19 +01:00
김랑기 64d79e8c2c Translated using Weblate (Korean)
Currently translated at 91.1% (8333 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:19 +01:00
Tokita, Hiroshi 6432981d07 Translated using Weblate (Japanese)
Currently translated at 91.5% (8368 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-01-12 18:03:19 +01:00
Toni Laiho b299e2a31e Translated using Weblate (Finnish)
Currently translated at 98.9% (9052 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-12 18:03:19 +01:00
aris-kimi ffd2cb022a Translated using Weblate (Greek)
Currently translated at 85.3% (7801 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:19 +01:00
Ulices 1fcd258aff Translated using Weblate (Spanish (Mexico))
Currently translated at 84.9% (7772 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-12 18:03:19 +01:00
CloverGit f9cba97bea Translated using Weblate (Chinese (Simplified))
Currently translated at 84.0% (7685 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-01-12 18:03:19 +01:00
김랑기 737cec5854 Translated using Weblate (Korean)
Currently translated at 90.0% (8239 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:19 +01:00
Jan Straka 7e494f4649 Translated using Weblate (Czech)
Currently translated at 79.7% (7294 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2024-01-12 18:03:19 +01:00
Ulices 0ce61bd726 Translated using Weblate (Spanish (Mexico))
Currently translated at 84.3% (7713 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-12 18:03:19 +01:00
Mustafa Selçuk ÇAVDAR e7e36237a9 Translated using Weblate (Turkish)
Currently translated at 51.0% (4668 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2024-01-12 18:03:19 +01:00
김랑기 d36f2931cc Translated using Weblate (Korean)
Currently translated at 90.0% (8237 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:18 +01:00
Jan Straka eab0d5d4f7 Translated using Weblate (Czech)
Currently translated at 79.3% (7255 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2024-01-12 18:03:18 +01:00
Temuri Doghonadze 4113088eb8 Translated using Weblate (Georgian)
Currently translated at 10.9% (1001 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ka/
2024-01-12 18:03:18 +01:00
Ulices 1d9621a60f Translated using Weblate (Spanish (Mexico))
Currently translated at 83.6% (7653 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-01-12 18:03:18 +01:00
Wellington Terumi Uemura 62a6766af5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-01-12 18:03:18 +01:00
김랑기 61a7099c7b Translated using Weblate (Korean)
Currently translated at 89.1% (8153 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2024-01-12 18:03:18 +01:00
aris-kimi 1336032a9e Translated using Weblate (Greek)
Currently translated at 85.2% (7794 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:18 +01:00
Mark Hämmerling 43b7820f70 Translated using Weblate (German)
Currently translated at 91.8% (8396 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:18 +01:00
Jan Straka 0377c44582 Translated using Weblate (Czech)
Currently translated at 79.0% (7227 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2024-01-12 18:03:18 +01:00
Nguyễn Ngọc Khánh edd6cb3444 Translated using Weblate (Vietnamese)
Currently translated at 20.5% (1877 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-01-12 18:03:18 +01:00
ZbeeGin 682c32a4b6 Translated using Weblate (Polish)
Currently translated at 100.0% (9145 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-01-12 18:03:18 +01:00
aris-kimi 3d9d9d42d2 Translated using Weblate (Greek)
Currently translated at 84.3% (7717 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:18 +01:00
Mark Hämmerling 46b155eb4d Translated using Weblate (German)
Currently translated at 88.4% (8089 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-01-12 18:03:18 +01:00
Nguyễn Ngọc Khánh b4ab727c5c Translated using Weblate (Vietnamese)
Currently translated at 20.4% (1867 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-01-12 18:03:18 +01:00
Henrik Kauhanen cc2535c2a2 Translated using Weblate (Swedish)
Currently translated at 99.6% (9117 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-01-12 18:03:18 +01:00
Henrik Kauhanen 9c20a4348c Translated using Weblate (Finnish)
Currently translated at 98.7% (9027 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-01-12 18:03:18 +01:00
aris-kimi 63d38a6f95 Translated using Weblate (Greek)
Currently translated at 84.3% (7717 of 9145 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2024-01-12 18:03:17 +01:00
jean-pierre charras d653cc6176 Update FindwxWidgets.cmake to support recent msys/mingw versions.
Changes are msys specific.
2024-01-12 15:39:56 +01:00
jean-pierre charras c18bfe0c61 DIALOG_DRC & DIALOG_ERC: re-enable button "Run ERC" and "Run DRC" after running tests.
Fixes #16583
https://gitlab.com/kicad/code/kicad/-/issues/16583
2024-01-12 15:38:25 +01:00
Seth Hillbrand 2aab24ef29 Prevent multiple reloads when saving
Avoid potential issues with Mac libedit crashes (hopefully)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14865
2024-01-11 19:01:31 -08:00
Seth Hillbrand 42e02552ac Make outline font min segment length configurable
This was hard coded at 10IU, which was way too small for pcbnew and
still too small for schematic editor.  Instead, we set a default of 50
and allow the user to adjust (smaller for less powerful machines)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16568
2024-01-11 18:30:00 -08:00
Seth Hillbrand e1495d1825 Add 64-px cursors 2024-01-11 18:30:00 -08:00
Wayne Stambaugh 0df8d5c2d6 Do not assert when pruning orphaned sheet and/or symbol instances.
Running the schematic editor in the stand alone mode can result in an
empty project name.  Rather than assert when the project name is empty,
just don't run the pruning algorithm.  The pruning will just have to
happen on the next load of the schematic when it has a proper project
name.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16577
2024-01-11 15:47:21 -05:00
Mike Williams 382fe3de09 Symbol Fields Table: fix regroup button using schematic values
Should use the datastore where possible since users are using this to
regroup before applying the data.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16574
2024-01-11 12:01:12 -05:00
jean-pierre charras 549ef88f70 QFNWizard: ensure thermal vias/pads have the property PAD_PROP::HEATSINK set. 2024-01-11 16:29:41 +01:00
jean-pierre charras 0ac23f9099 FP editor: ensure a newly created pad PTH has a hole.
When a new pad type PTH is created from a SMD pad master , previously its
hole had a null size because the master pad had a null size.
Also allows a HEATSINK pad to be added to a SMD footprint.
2024-01-11 16:27:05 +01:00
Marek Roszko d0236ca751 Make DRC exclusions work in cli & python DRC
The way exclusions work is actually silly, and you can end up with your project file losing them too.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11562
2024-01-10 19:55:44 -05:00
Jeff Young 4b1fc9c129 Update AM and SFFM source parameters to ngspice-43.
Note: there's no migration strategy because they didn't
work at all prior to ngspice-43.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16529
2024-01-10 20:27:52 +00:00
Jeff Young 3836194cc6 Add some missing autocomplete clauses.
We really need to figure out how to auto-generate these....

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16565
2024-01-10 20:16:52 +00:00
Jeff Young e04cd8743c Separate out Pad_Shape so auto-complete can work.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16566
2024-01-10 19:56:46 +00:00
Jeff Young 27c253780d Separate out Pad_Shape so auto-complete can work. 2024-01-10 19:22:05 +00:00
Jeff Young 94a7d1647f Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16542
2024-01-10 18:32:47 +00:00
Jeff Young c95db272ca Keep "Type" field consistent with 6.0.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16254
2024-01-10 18:14:56 +00:00
jean-pierre charras 6336f846cd French translation update 2024-01-10 18:47:11 +01:00
jean-pierre charras 6c5b116f3b Fix incorrect init of m_cbKicadUpdate only noticeable when KICAD_UPDATE_CHECK is ON 2024-01-10 18:45:11 +01:00
Jeff Young e55ec85e19 Remove added items from group on revert.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16562
2024-01-10 17:36:31 +00:00
Jeff Young 9038f80543 Switch button focus to Close after running ERC or DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16541
2024-01-10 17:36:31 +00:00
Ian McInerney 6c9e716573 More spelling and grammar fixes 2024-01-10 16:42:47 +00:00
Jeff Young 435e60d0e5 Knockout different-net dimensions in zone-filler.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16549
2024-01-10 16:42:18 +00:00
Mark Roszko a74c96b287 Fix misspelling of gltf 2024-01-10 16:30:50 +00:00
Ian McInerney e7746d3bc8 Fix spelling mistakes 2024-01-10 16:17:07 +00:00
jean-pierre charras 07d7ccf46f Fix 2 minor compil warnings. 2024-01-10 09:16:14 +01:00
Marek Roszko 08c2237a94 Update the layer names in cli/python board load of the property grid layer enum because DRC quietly uses it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16555
2024-01-09 20:43:14 -05:00
John Beard 60cba81a2e Altium import: Handle 110-byte subrecord5 in Pad6 parser
This appears to happen in some very old (Protel 3.0.0?)
library files.

The example given in issue #16514 always has 0 in the last 4 bytes.
It's not clear exactly what these bytes do, if anything, so
just skip them and assume the holerotation is 0. If it's not 0,
error out - at that point it might be possible to determine what
the value means.

This appears to correctly import the file provided in the issue.
As the license on that file is unclear, we probably can't just
add it as a unit test and it's rather tricky to special up a
binary file test-case for it.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16514
2024-01-10 00:21:20 +00:00
Wayne Stambaugh 4f3fb5c23f Second attempt at fixing ERC dialog reference update issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519
2024-01-09 13:14:13 -05:00
jean-pierre charras 6659cec5e0 LIB_TREE::onHoverTimer() fix crash in Footprint Chooser dialog, due to
a pointer that can be null, when called from Change Footprints dialog.
Fixes #16556
https://gitlab.com/kicad/code/kicad/-/issues/16556
2024-01-09 15:49:23 +01:00
jean-pierre charras 9c05b61d7b VIEW::ReorderLayerData(): fix an issue that creates crash in Gerbview
Fixes #16558
https://gitlab.com/kicad/code/kicad/-/issues/16558
2024-01-09 15:13:57 +01:00
Marek Roszko 8eb6123985 Move PAGE_INFO to kicommon 2024-01-09 07:26:04 -05:00
Marek Roszko f53c3f895d pcb_group.h should live in pcbnew 2024-01-08 22:32:18 -05:00
Marek Roszko 00f3a315d2 Create a default file name for cli 3d export if empty
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16547
2024-01-08 21:40:33 -05:00
Jon Evans 8c7d126ced Fix flipped boolean in teardrop serialization
Also change to explicit bools

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16552
2024-01-08 18:44:09 -05:00
John Beard b57626807d Fix crash when cancelling fp table setup
The missing OnPgmExit leads to a segfault later if you
cancel the FP table setup when initialising a new config.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16525
2024-01-08 23:33:12 +00:00
Andre Iwers 047cb41a1d Implemented Timeout for HTTP LIB
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15756
2024-01-08 23:20:23 +00:00
Wayne Stambaugh 92c58f2564 Fix sheet path dependent ERC dialog selection issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519
2024-01-08 11:16:55 -05:00
Alex Shvartzkop 4f9fbd230d EasyEDA (JLCEDA) Pro: fix PCB parse error.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16544
2024-01-08 14:38:06 +03:00
Jeff Young 120937b6b0 Honour forced transparency for strokes and fills.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16542
2024-01-07 17:40:50 +00:00
Jeff Young 392242b9a4 Make sure OK button has focus when re-displaying ERC window.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16541
2024-01-07 17:23:45 +00:00
jean-pierre charras c5bb939cc9 LIB_TEXTBOX: fix incorrect line style in plot function for LINE_STYLE::DEFAULT.
LINE_STYLE::DEFAULT is fixed as SOLID in all plot functions, but not for this item.
Fixes #16543
https://gitlab.com/kicad/code/kicad/-/issues/16543
2024-01-07 16:14:15 +01:00
Jeff Young 3a781f5dbe Let router draw tuning pattern baselines.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15996
2024-01-07 13:54:40 +00:00
Jeff Young cd83dfa831 Stage/add/delete group members when adding/deleting group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16540
2024-01-07 13:39:13 +00:00
jean-pierre charras f795e40584 Altium Importer: do not stop import when an item looks bad (happens in old files)
An importer should not stop import when an item just looks strange. Just skip it.
It can happen with old files.
Better do not import one item than import nothing.
2024-01-07 13:10:59 +01:00
jean-pierre charras 3f70387a17 KISTATUSBAR: code refinement and add comments 2024-01-07 09:47:40 +01:00
Jeff Young 84d161a4b7 Don't use referential values as defaults. 2024-01-06 22:01:23 +00:00
Jeff Young 7c5eaed69e Un-comment and repair TRRANDOM sources.
Also adds new parameters to AM sources for ngspice-43.

Also fixes a bug in the spice parameter parser (which would
puke on any parameter name starting with one of the flag
parameter strings).

Also fixes a bug where the skipped source parameters would
get set to "0" instead of their default values.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393
2024-01-06 20:34:36 +00:00
jean-pierre charras 1649b7dd56 Kicad manager: fix some issues about the wxStatusBar:
- fix broken code KICAD_MANAGER_FRAME::PrintPrjInfo()
- fix issues created by using KISTATUSBAR instead of wxStatusBar
(the user field count differs because there are 4 other fields added)
- do do use a fixed size in KISTATUSBAR for FIELD_OFFSET_BGJOB_TEXT field:
fixed field size does not work fine if the text to display is not known
Fixes #16535
https://gitlab.com/kicad/code/kicad/-/issues/16535
2024-01-06 20:23:37 +01:00
Wayne Stambaugh 50cad558cf Do not update tree to selected sheet in schematic hierarchy navigator.
This was causing unwanted tree expansions when descending a sheet hierarchy
in editor.

Also fixed an issue with the tree highlighting when changing sheets in the
schematic editor.
2024-01-06 12:25:39 -05:00
Jeff Young bbdefa05eb Un-comment and repair AM and SFFM sources.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16529
2024-01-06 14:49:05 +00:00
Wayne Stambaugh a310c0a05a Do not expand the entire schematic hierarchy navigator tree by default.
The new behavior is to only expand to the first child of the root sheet
level.  On very complex hierarchies, this makes the navigator far more
useful.

Do not update schematic hierarchy navigator on every edit.  Now only
sheet changes will trigger a rebuild of the tree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16371
2024-01-06 07:56:16 -05:00
jean-pierre charras f5e76e6116 Demos update 2024-01-06 10:52:46 +01:00
jean-pierre charras 3626a9e4cc SVG_PLOTTER: Update brush color also when the alpha value has changed.
Previously, the alpha value change was not tested, so the SVG style was
not always updated.
Fixes #16530
https://gitlab.com/kicad/code/kicad/-/issues/16530
2024-01-06 09:11:40 +01:00
Marek Roszko be21c689e8 Change the __except to use the exception result codes 2024-01-05 21:03:43 -05:00
Marek Roszko 05cbfc6aca Add Windows SEH to catch fontconfig/freetype font read faults
Related https://gitlab.com/kicad/code/kicad/-/issues/16484
2024-01-05 15:23:00 -05:00
Seth Hillbrand d3e1e54b24 Avoid removing segments that do not maintain conns
If the two segments being merged have connection points originally, then
the merged segment must have the same connection points.  We had been
moving the merged segment to match the original connections but this is
not as robust as just not merging these lines (and therefore leaving the
original)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15495
2024-01-05 11:40:30 -08:00
Jeff Young f5aa2ea8cf Fix copy/pasta in arc plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16531
2024-01-05 16:42:57 +00:00
Fabian Pflug a1f796ffa0 Respect exclude from bom in all python files
Two scripts were missing the excludeBOM=True selector.
2024-01-05 16:11:20 +00:00
Jeff Young 169ece3b71 Try reusing the TOOL_DISPATCHER menu hack for libtree previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16493
2024-01-05 14:20:33 +00:00
Marek Roszko 23f35e1c8b Allow lexers to build into kicommon 2024-01-05 07:48:08 -05:00
Ian McInerney 8d9185919a Give git-based projects a default file extension on repo clone
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16523
2024-01-05 12:36:12 +00:00
Ian McInerney 44ee299941 Fix layout issues in git clone dialog 2024-01-05 12:22:37 +00:00
Jeff Young 015a050169 Escape error messages for HTML. 2024-01-05 11:03:36 +00:00
Wayne Stambaugh f07d797ab3 Don't show ERCs for every sheet path when using shared schematics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16434
2024-01-04 13:53:16 -05:00
Wayne Stambaugh 38562db023 Coding policy fixes. 2024-01-04 13:30:02 -05:00
Jeff Young d05675f673 Minor performance wins. 2024-01-04 16:26:32 +00:00
Jeff Young 5aae8e2fd0 Code cleanup. 2024-01-04 16:13:42 +00:00
Jeff Young fceace93da Remove dead code. (Coverity) 2024-01-04 16:00:43 +00:00
Jeff Young e438fc2569 Remove dead code. (Coverity)
Also fixes a (small) memory leak.
2024-01-04 15:57:30 +00:00
Jeff Young ffa3b27a4e Fix uninitialized variable. (Coverity) 2024-01-04 14:58:59 +00:00
Jeff Young 3fd81fe7c0 Only generate event on setting current value.
(And do it last.)
2024-01-04 14:35:08 +00:00
Jeff Young 559bef0ea6 Switch default thicknesses to um.
Also fix a bug where resetting the values doesn't work if
the thickness units were changed because it tries to keep
the old width values which are then re-scaled to the reset
thickness units.  Probably better to just reset the widths
too, as it's potentially less confusing.
2024-01-04 14:35:08 +00:00
Jeff Young 91d144c720 Do NOT return false from a visitor unless you want to stop visiting!
This fixes a bug where DRC would bail out early if any of
the colliding objects was a free pad.
2024-01-04 14:35:08 +00:00
Jeff Young aa4107ce2d Code cleanup (and Coverity quieting). 2024-01-04 14:35:08 +00:00
jean-pierre charras df4e72827b Eeschema printing, advanced config: set EnableEeschemaPrintCairo to true by default. 2024-01-04 15:10:08 +01:00
Marek Roszko f8744b7797 dsnlexer can live in kicommon 2024-01-03 23:18:31 -05:00
Marek Roszko 675e126eae Use the new flag() shorthand for arg setup 2024-01-03 21:39:54 -05:00
Marek Roszko 58af6b8dea Add missing drill precision arg integer specifier
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16508
2024-01-03 21:29:02 -05:00
Marek Roszko 9195de9849 Disable the update check on non-apple, non windows systems by default 2024-01-03 19:32:05 -05:00
Roberto Fernandez Bautista 9004a5920f CADSTAR PCB: Handle multi-layer figures & fix multi-layer mapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16515
2024-01-03 20:57:27 +01:00
Roberto Fernandez Bautista 94cb513c0e CADSTAR PCB: Handle multi-layer library coppers correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16486
2024-01-03 20:18:02 +01:00
Wayne Stambaugh 0e4fe545a4 Fix crash when importing Eagle board file with no "classes" element.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15754
2024-01-03 10:03:52 -05:00
Mike Williams 2a04e6ac63 Schematic: don't allow setting footprint for power symbols
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16505
2024-01-03 08:52:08 -05:00
Jeff Young 1e71899611 Thread pad & graphic clearance testing.
This allows us to poll the event loop & update the progress
on a time interval rather than on an items-completed
interval (the later of which can't easily take host machine
performance into account).

Also fixes a bug where we'd bail out of QueryColliding if
we ever found !testClearance && !testShorting && !testHoles.
2024-01-03 13:49:29 +00:00
Jeff Young 8993cd12a6 Thread cache generator.
This allows us to poll the event loop & update the progress
on a time interval rather than on an items-completed
interval (the later of which can't easily take host machine
performance into account).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16506
2024-01-03 12:45:05 +00:00
jean-pierre charras c8c0685ff2 drc/drc_test_provider_library_parity: fix issues when testing graphic items:
- fix tests for zones: they were rotated/moved twice before comparing
- fix tests for some graphics (RECT and POLYGONS): they were not always compared
using the right order.
Fixes #16501
https://gitlab.com/kicad/code/kicad/-/issues/16501
2024-01-03 12:43:24 +01:00
Ian McInerney 4770532511 Ensure footprints are removed from group before exporting to library
Duplicating a footprint automatically adds it to the group the original
is contained in, and these copies should not be part of the board after
their use.

Fixes KICAD-5YC
2024-01-03 00:19:29 +00:00
Ian McInerney d0a3c04835 Handle rotating individual no connects
Fixes KICAD-4A9
2024-01-02 22:03:10 +00:00
Jeff Young 0b526cca15 Delete tracks when deleting tuning pattern as part of sel. 2024-01-02 18:00:25 +00:00
Jeff Young ab34ce295f SCH_LINE_WIRE_BUS_TOOL must use GRID_GRAPHICS for lines.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16492
2024-01-02 17:31:08 +00:00
Jeff Young a523c58530 Add a m_forceMarkObstaclesMode warning when violating DRC.
Also adds a modifier combination to commit anyway.
2024-01-02 17:02:50 +00:00
Mark Roszko d4f6425523 boost::noncopyable is redundant since we declare a copy ctor 2024-01-02 16:10:24 +00:00
jean-pierre charras 5d3c35c5d3 BOARD_NETLIST_UPDATER: fix incorrect warning message:
pad number and footprint reference were swapped.
Fixes #16500
https://gitlab.com/kicad/code/kicad/-/issues/16500
2024-01-02 15:14:53 +01:00
Ian McInerney 9db1dd5ec5 Refresh message panel when router mode changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16497
2024-01-01 19:25:54 +00:00
Jon Evans 104aa1abe4 Change prettifier QA to not depend on file format changes
Instead of writing out and reading back in using the plugin,
just test the formatter itself.

Also add support for testing full boards.
2024-01-01 13:38:16 -05:00
Jon Evans b8aef58561 Add proper comparison operators for BOARD_DESIGN_SETTINGS and children
BOARD::operator== was just comparing pointers
2024-01-01 13:37:31 -05:00
Jon Evans 81dbb12054 Don't enable the shove when forcing highlight mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16467
2024-01-01 11:48:30 -05:00
Wayne Stambaugh 32ece7d888 Update copyright template to 2024. 2024-01-01 09:06:31 -05:00
Jeff Young 15a2d65a0c More explicit pad-missing message when net involved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16489
2024-01-01 10:51:34 +00:00
jean-pierre charras 58b7eda47a QA test( test_prettifier) update golden files and fix a warning message. 2024-01-01 10:57:32 +01:00
arturo182 8373786e40 Happy New Year! 2023-12-31 23:18:30 +00:00
John Beard 751c88ef20 Use 'uuid' (not 'id') in the s-expr PCB groups/generator format
Add some regression tests to check loading of groups and generators
from various versions of the s-expr PCB format.
2023-12-31 23:09:26 +00:00
Jeff Young 985e590e6f PCB_FIELDs don't belong in the view.
They're handled by their parent FOOTPRINTs.

Also makes sure footprint children get their parents
updated on a swap.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16412
2023-12-31 21:38:11 +00:00
jean-pierre charras 55b6fdd1c4 Gerbview: fix incorrect rotation of DCode shape type regular polygon.
The rotation was the opposite of the actual rotation, due to the Y axis
direction (top to bottom) coordinate in gerbview/dcode.cpp
Fixes #16480
https://gitlab.com/kicad/code/kicad/-/issues/16480
2023-12-31 18:29:23 +01:00
Jeff Young 2a0486845d Restore legacy spin-style processing for text items.
Post-V5 we only use it on labels, but earlier versions also
used it for text.

Also process spinStyle for CADSTAR imports.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16488
2023-12-31 17:22:58 +00:00
Jeff Young 911a54ac82 Make sure sexpr gets stacked when followed by non-token.
For instance, with "(min 1.27mm)", we need to stack the
"min" token after hitting the space.
2023-12-31 17:22:58 +00:00
Ian McInerney 53e16558a5 Refresh appearance panel when appending board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16226
2023-12-31 17:08:09 +00:00
Alex Shvartzkop aa6fd88082 Default graphical line style in v6 and older was Dashed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16479
2023-12-31 19:28:55 +05:00
Jeff Young 71b9dd1fb4 Update FPWatcher when saving canvas footprint.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16414
2023-12-31 11:26:16 +00:00
Alex Shvartzkop 965576f2c6 Enable alpha test for bitmaps in OpenGL GAL. 2023-12-31 15:05:00 +05:00
Alex Shvartzkop e8fabb58a6 Fix bitmap Z order in OpenGL GAL.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16482
2023-12-31 14:09:28 +05:00
Andrea Greco 55429aea6b pcbnew: Show current router mode in status bar 2023-12-31 02:54:59 +00:00
Marek Roszko d2c3d38729 Update the vcpkg main baseline 2023-12-30 20:08:13 -05:00
Jeff Young 6c39e67342 Don't leave tools with stale state when reloading fp.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16414
2023-12-30 21:05:06 +00:00
Jeff Young 2e02ca9d14 Make length-tuning rollover layer-specific.
Also don't show target length in diaog when it hasn't been
set.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16379
2023-12-30 20:27:39 +00:00
jean-pierre charras b94c941217 Pcbnew, Fp Editor, pad_tool::PlacePad() avoid recreate from scratch a pad
when the previous is not used.
If a new pad is generated, when moving it by arrow creates a new pad for
each move by the current code.
This is not annoying unless the pad number is edited during move.
So, the pad number is now reinitialized only after the current pad is used,
not during the current move.
Fixes #16409
https://gitlab.com/kicad/code/kicad/-/issues/16409
2023-12-30 20:15:31 +01:00
Jon Evans ea0673e7a0 Do not merge buses of distinct types
Previously, this code would merge a vector bus
with a group bus containing the vector as a member.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16439
2023-12-30 10:54:24 -05:00
jean-pierre charras 1ae5bc7c0d DIALOG_BOARD_REANNOTATE_BASE: do not force the size of bitmap windows.
Also do not force the dialog size: wxWidgets sizers should set the right size.
2023-12-30 16:02:31 +01:00
Jeff Young 2e9f0679fc Fix i18n mixup.
Tab names and column names are translated on the fly, but
that means they need _HKI macros to make sure they get into
the translation database.
2023-12-30 11:24:35 +00:00
Mark Roszko e8cd5f938d update vcpkg for ngspice 42 2023-12-30 04:07:10 +00:00
Jon Evans 2ecf1ac23f Change regression test for #13162 to be less complex
We are really only testing that `Rload1` works,
and the original testcase is unstable on some platforms.
2023-12-29 13:18:46 -05:00
Jeff Young 4551880e40 Fix a typo and some i18n issues.
(Also flags some i18n issues for 9.0.)
2023-12-29 17:12:10 +00:00
Jeff Young 0fac52dcad Accept EEschema tokens as well as netlist tokens for pintype.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16169
2023-12-29 16:34:03 +00:00
Ian McInerney 4eaa0242ca Collapse schematic/symbol graphics import to single action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16463
2023-12-29 02:57:21 +00:00
Ian McInerney 5a5b7e0064 Stop clearing tool transitions when running tools
There doesn't seem to be a need to actually clear transitions for the
tools when running a handler. This clearing also prevents running
another nested handler from the same tool.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16449
2023-12-29 00:37:38 +00:00
Ian McInerney b6fffb3923 Add more tool stack tracing 2023-12-29 00:37:38 +00:00
Ian McInerney f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Wayne Stambaugh 04d15026c5 Rename SCH_SYMBOL::GetInstanceReferences() to GetInstances(). 2023-12-28 18:25:56 -05:00
Jeff Young cdb99de862 Use HasSymbol() instead of a null logger. 2023-12-28 21:52:26 +00:00
Jeff Young 5145b146e9 Handle dimensions in search pane.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16459
2023-12-28 21:16:56 +00:00
Jon Evans c9d31c4429 Add explicit copy ctor for SCH_CONNECTION 2023-12-28 15:30:25 -05:00
Jeff Young e59612d56c Add realloc locking calls for ngspice42.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15941
2023-12-28 19:36:18 +00:00
Wayne Stambaugh 482aff3f0b Prune orphaned schematic sheet instances.
Pasting from the clipboard when copying from another project can leave
sheet instance information that is not valid for the current project.
This change prunes all sheet instance information that is not relevant
to the current project.  It also prunes invalid paths created by pasting
sheets from different paths in the same project.
2023-12-28 12:19:19 -05:00
Jeff Young a452213546 Reduce menu nesting for attribute setters/clearers.
Also fixes some issues with menus being owned by the wrong
tool.

Also removes "no xxx selected" warnings in submenus which
aren't show unless xxx is selected to start with.

Also fixes some un-translated strings (which happily
already exist elsewhere in the UI)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16454
2023-12-28 14:19:13 +00:00
Jan Wichmann bddadd1f42 eeschema:
CHANGED: Simplifying the context menu and moving all removed items to main menu.
2023-12-28 13:58:05 +00:00
Marek Roszko 284df4adf8 Move two pgm_base method definitions back to pgm_base.cpp 2023-12-28 08:26:10 -05:00
Marek Roszko 7252ae551c Move EDA_PATTERN_MATCH to kicommon 2023-12-27 22:08:11 -05:00
Marek Roszko 8ef77ce8ef Fix build error due to duplicate var declaration 2023-12-27 21:52:30 -05:00
Marek Roszko 9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Marek Roszko 5e7a68fcd9 netclass can be in kicommon 2023-12-27 17:57:02 -05:00
Marek Roszko a36eb2af72 Netclass shouldnt have odd pcb forward decls 2023-12-27 17:12:35 -05:00
Marek Roszko 5bfc601e09 STD_BITMAP_BUTTON can be in kicommon 2023-12-27 17:08:05 -05:00
Jeff Young e17d81cf6d Re-enter auto-complete on a ctrl-space.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16445
2023-12-27 21:14:27 +00:00
Ian McInerney d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Ian McInerney 4a67761d29 Push library reading check to IO_BASE 2023-12-27 16:44:45 +00:00
Ian McInerney f8688a922d Unify IO library descriptors 2023-12-27 16:34:59 +00:00
Jeff Young 69c95acc57 Handle arcs in TOPOLOGY::AssembleDiffPair(). 2023-12-27 13:52:02 +00:00
Jeff Young 33c97da0fa Performance enhancement. 2023-12-27 13:52:02 +00:00
Jeff Young 2ba9e07f0f Add missing DRC auto-complete token. 2023-12-27 13:52:02 +00:00
Jeff Young 49d6439ae0 Formatting. 2023-12-27 13:52:02 +00:00
Alex Shvartzkop e636913178 EasyEDA Std: import dimensions. 2023-12-27 12:48:37 +05:00
Ian McInerney 743e9d669a Push library management into IO_BASE 2023-12-27 01:21:53 +00:00
Ian McInerney cad91312aa Introduce main base class for all IO loaders 2023-12-26 23:27:11 +00:00
Jon Evans 7d25675e2b Fix handling of dimensions in footprint updater
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16448
2023-12-26 14:08:39 -05:00
Wayne Stambaugh 20ee45edbe Fix schematic editor crash when exporting symbols to missing library.
UI string was reused from the symbol library manager.  No new translatable
strings were used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16446
2023-12-26 12:49:34 -05:00
Wayne Stambaugh 81cec494f2 Fix string grammar in 3D viewer. 2023-12-26 08:33:33 -05:00
Marek Roszko 5c20c5732d We don't need pgm_base to expose pybind to everything 2023-12-25 23:28:33 -05:00
Marek Roszko c7fa3adcb8 kicommon PROGRESS_REPORTER 2023-12-25 23:22:39 -05:00
Alex Shvartzkop 5bbe01b570 EasyEDA Pro: support .elibz format (device libraries) 2023-12-25 07:00:24 +03:00
Jeff Young 6a5adc7646 Record nested footprints for collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410
2023-12-24 19:40:21 +00:00
Jeff Young c051e66830 Handle units switch in board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16361
2023-12-24 16:18:46 +00:00
Jeff Young f887f9b1e5 Save Net Inspector col order, widths, sorting, etc. 2023-12-24 13:11:16 +00:00
jean-pierre charras 408c90d3ae Python stuff: fix an issue to build pcbnew_wrap.cxx (at least on msys2)
- Reorder two include in pcbnew.i
- rename PLUGIN to PCB_IO (missing rename) in footprint.i
2023-12-24 10:41:16 +01:00
Marek Roszko 9799a7ddcc Fix broken build due to missing rename 2023-12-23 20:42:46 -05:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney 85f62c1fde Rename all schematic IO plugins 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Ian McInerney 3a90b729ea Hide unused variable warnings in git error strings
These strings aren't actually used right now, but they may be used
in the future, so don't actually remove them but silence the error that
they aren't used.
2023-12-24 01:22:21 +00:00
Jeff Young 687389224e Do a more complete search for a coupled net.
In particular, don't bail out if the starting seg is part
of a tuning pattern meander or a user-authored non-coupled
segment to get to a via or something).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16380
2023-12-23 23:43:12 +00:00
Jon Evans 4288c8dcaf Avoid repeated selection notifications when importing netlist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16356
2023-12-23 17:41:23 -05:00
Jon Evans 63454d6da9 Prevent crash when opening properties of missing symbol 2023-12-23 17:30:29 -05:00
Jon Evans 0db46caeaf Revert "Remove unused variable"
This reverts commit 745afb7246.

Guess it isn't actually
2023-12-23 17:23:43 -05:00
Jon Evans 745afb7246 Remove unused variable 2023-12-23 16:55:32 -05:00
jean-pierre charras 2051ad8123 Fix a DRC issue about thermal reliefs.
They can be not fully counted when a rect pad has the same (or a smaller) size
as the thermal spoke width, due to a bad bounding box used in calculations.
Fixes #16265
https://gitlab.com/kicad/code/kicad/-/issues/16265
2023-12-23 19:50:11 +01:00
Jeff Young af158715e5 Honour alternates when getting SCH_PIN description.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16407
2023-12-23 13:30:15 +00:00
Jeff Young 4bdd5e172c Code cleanup. 2023-12-23 13:30:15 +00:00
Jon Evans dad842d3f0 Allow no-connects on standalone hierarchical pins/ports
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16397
2023-12-22 19:08:14 -05:00
Jon Evans 7470ec80e4 Fix some issues with Font property
Prevent out-of-bounds access
Make sure list is initialized in symbol editor frame
Don't re-init the list more frequently than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16399
2023-12-22 18:34:48 -05:00
Jeff Young 3f73bbcc4f Don't run keepUpright when not rotating.
For that matter, don't do anything at all for a rotation
of 0 (or a move vector of {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16402
2023-12-22 21:22:36 +00:00
Jeff Young a77ce59487 Don't clear selection on undo/redo.
It's annoying to the user.
2023-12-22 17:41:43 +00:00
Jeff Young df115dbcbd Keep selected flags on undo/redo items.
Also fixes a memory leak in Symbol Editor undo/redo.

Also moves a few more things to SCH_COMMIT.

Also fixes a couple of LIB_ITEM::Clone() methods that were
failing to return the same uuid.
2023-12-22 17:30:14 +00:00
Jeff Young eca22b05b3 Restore pin selection after PlacePin().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16401
2023-12-22 14:59:53 +00:00
Jeff Young 8b344b13e5 Reenable m_useAuxOriginCheckBox when appropriate.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16424
2023-12-22 14:22:02 +00:00
Jeff Young 9910c670d2 Ignore reference and value when computing "allChecked".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16408
2023-12-22 13:58:02 +00:00
Jeff Young 1f627a3a75 Fix two unrelated bugs in ungroup.
1) Don't double-remove the members from the group.
2) Don't auto-recurse BOARD_COMMIT::Stage for non-modify
changes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16419
2023-12-21 22:47:23 +00:00
Jeff Young 1ca82035ae Update SCH_SHAPE::Plot() to handle all fill styles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16429
2023-12-21 22:06:59 +00:00
Jeff Young ee0fff97f9 Cleanup formatting and remove dead code. 2023-12-21 22:06:59 +00:00
Seth Hillbrand 70a86c5caa Specify conversion for MSVC 2023-12-21 11:10:15 -08:00
Seth Hillbrand 9ccf9ce0b4 Forgot to commit the last file 2023-12-21 09:54:34 -08:00
Seth Hillbrand 5f234211f9 Remove __WXWINDOWS__ defines
__WXWINDOWS__ is for all of our builds.  __WXMSW__ is for windows only
2023-12-21 08:57:28 -08:00
Mike Williams 1700cad83b Symbol/Footprint Chooser: remember open libraries
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16383
2023-12-21 09:57:54 -05:00
Mike Williams ecb7ac1da3 Lib Tree: don't always preselect in Already/Recently Placed 2023-12-21 09:57:54 -05:00
Jon Evans c1eef79119 Fix off-by-one error in setting depth
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16421
2023-12-21 08:31:47 -05:00
Jeff Young d155870275 Sometimes use grid (instead of clearance) for slop radius.
This is particularly important both when very large grids
are in use, and when the router hasn't been initialized
with a net yet (ie: in hover mode) and the board clearance
is set to 0.

https://forum.kicad.info/t/new-track-start-position-problem-on-kicad-7-0-10-rc1/47006
2023-12-21 12:58:58 +00:00
Alex Shvartzkop 2de8991752 LTspice: bugfixes. 2023-12-21 13:56:29 +03:00
Jeff Young fc85112a72 Create dummyPattern at centre of pickerItem, not end.
This keeps TOPOLOGY::AssembleDiffPair() from picking an
arc the segment might be connect to.  Since it can't handle
arcs at all, that's bad.
2023-12-20 15:27:29 +00:00
Jeff Young 7e72a53876 Check added fields only if all fields were checked before.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16408
2023-12-20 13:15:33 +00:00
Jeff Young df161c9886 Support parital matches for libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16400
2023-12-20 12:46:22 +00:00
Wayne Stambaugh 922aee1532 Coding policy fixes. 2023-12-20 07:17:23 -05:00
Jon Evans 76d1cc8150 Cleanup 2023-12-19 22:43:15 -05:00
Jon Evans b1695add9e Fix warnings 2023-12-19 22:38:34 -05:00
Jon Evans 1c895fe18c Improve rendering of tuning status popup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304

Add dedicated UI rendering layers

Switch to screen-space rendering to avoid blurriness

Fix a bug in OpenGL GAL that causes layer
ordering to be broken when using Scale

Fix some issues with VIEW_GROUP layer ordering
2023-12-19 22:38:21 -05:00
Mike Williams bf6e6d0e11 Symbol Chooser Panel: save settings 2023-12-19 14:03:31 -05:00
Jeff Young 24846d3f44 Repair earlier fix for VVIAs. 2023-12-19 16:48:01 +00:00
Jeff Young 33a56c530d cleanup 2023-12-19 16:48:01 +00:00
Seth Hillbrand 160ebbcbd8 Update translations 2023-12-19 08:34:05 -08:00
Nguyễn Ngọc Khánh 5b961b3232 Translated using Weblate (Vietnamese)
Currently translated at 16.3% (1491 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-19 17:33:03 +01:00
dsa-t 566cbe1a72 Translated using Weblate (Russian)
Currently translated at 82.0% (7460 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-12-19 17:33:03 +01:00
aris-kimi 3c93817e6f Translated using Weblate (Greek)
Currently translated at 82.9% (7549 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-19 17:33:03 +01:00
Jan Straka 4e8df3451f Translated using Weblate (Czech)
Currently translated at 79.4% (7228 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-12-19 17:33:03 +01:00
Nguyễn Ngọc Khánh 5e75dbdeeb Translated using Weblate (Vietnamese)
Currently translated at 15.1% (1378 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-19 17:33:03 +01:00
Henrik Kauhanen 458d04432e Translated using Weblate (Swedish)
Currently translated at 99.6% (9065 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-19 17:33:03 +01:00
Toni Laiho 8da7d72578 Translated using Weblate (Finnish)
Currently translated at 99.9% (9095 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-19 17:33:03 +01:00
Ulices d202108a5d Translated using Weblate (Spanish (Mexico))
Currently translated at 84.1% (7654 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-12-19 17:33:03 +01:00
Nguyễn Ngọc Khánh 82c6ce89e4 Translated using Weblate (Vietnamese)
Currently translated at 14.6% (1336 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-19 17:33:03 +01:00
Ulices f9aad11b1a Translated using Weblate (Spanish)
Currently translated at 81.4% (7409 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2023-12-19 17:33:03 +01:00
aris-kimi 7258e1b6a7 Translated using Weblate (Greek)
Currently translated at 82.2% (7478 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-19 17:33:03 +01:00
Wellington Terumi Uemura 6013f3ac00 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9096 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-12-19 17:33:03 +01:00
Nguyễn Ngọc Khánh 5e8045e2a1 Translated using Weblate (Vietnamese)
Currently translated at 14.1% (1289 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-19 17:33:03 +01:00
Henrik Kauhanen 9838b1b238 Translated using Weblate (Swedish)
Currently translated at 99.6% (9065 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-19 17:33:02 +01:00
ZbeeGin 7a12ad0416 Translated using Weblate (Polish)
Currently translated at 100.0% (9096 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-12-19 17:33:02 +01:00
aris-kimi 1877a271eb Translated using Weblate (Greek)
Currently translated at 82.1% (7476 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-19 17:33:02 +01:00
Wellington Terumi Uemura c821c6376b Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.9% (9003 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-12-19 17:33:02 +01:00
Henrik Kauhanen c50cb76b09 Translated using Weblate (Swedish)
Currently translated at 99.6% (9065 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-19 17:33:02 +01:00
Filip Piękoś 1cffb2c446 Translated using Weblate (Polish)
Currently translated at 99.2% (9024 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-12-19 17:33:02 +01:00
ZbeeGin c8577cb376 Translated using Weblate (Polish)
Currently translated at 99.2% (9024 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-12-19 17:33:02 +01:00
김랑기 1bc51853cd Translated using Weblate (Korean)
Currently translated at 87.3% (7942 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-19 17:33:02 +01:00
Henrik Kauhanen bb9afe756e Translated using Weblate (Finnish)
Currently translated at 99.9% (9095 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-19 17:33:02 +01:00
aris-kimi bba99f5f8f Translated using Weblate (Greek)
Currently translated at 81.9% (7455 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-19 17:33:02 +01:00
Henrik Kauhanen e3c7ef9f9b Translated using Weblate (Swedish)
Currently translated at 99.6% (9063 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-19 17:33:02 +01:00
dsa-t 263508a376 Translated using Weblate (Russian)
Currently translated at 82.0% (7459 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-12-19 17:33:02 +01:00
Bas Wijnen eec2dab9fd Translated using Weblate (Dutch)
Currently translated at 69.6% (6338 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-12-19 17:33:02 +01:00
Tokita, Hiroshi 20af4c5d7c Translated using Weblate (Japanese)
Currently translated at 91.6% (8336 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-12-19 17:33:02 +01:00
Toni Laiho 075bfc971f Translated using Weblate (Finnish)
Currently translated at 99.9% (9095 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-19 17:33:02 +01:00
gallegonovato decf150a79 Translated using Weblate (Spanish)
Currently translated at 81.4% (7409 of 9096 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2023-12-19 17:33:01 +01:00
Ian McInerney c7592758cc Ensure some variables are initialized to known values 2023-12-19 14:32:31 +00:00
Ian McInerney 5c334c147b Make some types auto-reference to prevent copies 2023-12-19 14:23:36 +00:00
Ian McInerney de441d1e23 Enable compiler warnings for move semantics 2023-12-19 14:14:14 +00:00
Wayne Stambaugh ffbb7fde74 Improve footprint editor import graphics dialog layout. 2023-12-19 07:39:57 -05:00
Marek Roszko d6d25c030e add sentry-native files missed in earlier commit 2023-12-18 22:10:40 -05:00
Marek Roszko 5341af1a55 Add wxUniChar overload for nlohmann's internal char_traits 2023-12-18 22:10:39 -05:00
Wayne Stambaugh a4b38fbb80 Coverity warning fixes. 2023-12-18 16:09:13 -05:00
Jeff Young c7facfd4d4 remove unused variables 2023-12-18 18:54:47 +00:00
Jeff Young cfa55d958a performance efficiencies 2023-12-18 18:45:02 +00:00
Jeff Young 1c73d3d967 nullptr safety 2023-12-18 18:36:14 +00:00
Jeff Young e4baf877c8 performance efficiencies 2023-12-18 18:36:02 +00:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Jeff Young 68cbb820a7 performance efficiencies 2023-12-18 17:20:34 +00:00
Mike Williams 3aa20e2008 Create Array: fix mismatched tooltips
Partially addresses https://gitlab.com/kicad/code/kicad/-/issues/16391
2023-12-18 12:02:11 -05:00
Jeff Young 11805d6696 performance efficiencies 2023-12-18 17:01:55 +00:00
Jeff Young 47e07f507e nullptr safety
(Can't actually happen as the 4 base fields are mandatory,
but it'll keep Coverity happy.)
2023-12-18 17:01:55 +00:00
Mike Williams fc903592ed Hotkeys: fix multiple assignment of N key
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16376
2023-12-18 11:13:47 -05:00
Christian Weickhmann 2ee75b1aec BOM Generation: Unifying reference concatenation using more pythonic string join to avoid trailing comma. 2023-12-18 14:44:12 +00:00
Wayne Stambaugh fd91f8933e Fix a SPICE simulator crash on run of a second OP command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16341
2023-12-18 09:43:40 -05:00
Mike Williams 9e1ceba5d8 Symbol Fields Table: save modified presets without changes to schematic
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16381
2023-12-18 09:28:59 -05:00
Jeff Young 3b36307425 Remove shadowed variable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16363
2023-12-18 14:24:04 +00:00
Jeff Young 6b1d00a528 Smallest font size was a bit too small. 2023-12-18 14:24:04 +00:00
Wayne Stambaugh 25c03da5a5 Coding policy and Doxygen comment fixes. 2023-12-18 08:32:41 -05:00
Marek Roszko 421cf3d344 sentry-native update to 0.6.7 2023-12-17 21:39:10 -05:00
Marek Roszko de2f5f6547 argparse update 2023-12-17 21:29:05 -05:00
Seth Hillbrand 4a9994931a Avoid double-move
This was flagged by coverity but doesn't seem to be an actual issue in
g++/clang.  It technically leaves the moved rvalue in a "valid but
undefined state", so it is best to avoid.  The single copy into an
lvalue is (I think) cheap
2023-12-17 21:25:39 -05:00
Marek Roszko 33f75fbd0a Update bs_thread_pool to 3.5.0 2023-12-17 21:25:31 -05:00
Marek Roszko 83f4597f05 Remove a unused var 2023-12-17 21:19:07 -05:00
Marek Roszko 8e6b8911c8 Update nlohmann_json to 3.11.3 to silence char_traits deprecated warning 2023-12-17 21:14:08 -05:00
Marek Roszko 71383c9c73 Fix warnings about sprintf use. 2023-12-17 20:56:15 -05:00
Marek Roszko 93811b801d Add macOS CI build 2023-12-17 20:20:14 -05:00
Jeff Young a944310f7b Move sheet navigation commands below active tool commands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16367
2023-12-17 22:06:47 +00:00
Jeff Young 16c8050f3d Fix event/flag race condition. 2023-12-17 21:55:29 +00:00
Jeff Young 08a00633b1 Make sure child items get edit flags cleared in commit.
In the footprint editor, in particular, we often just
add the parent footprint to the commit rather than the
actual modified item(s).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16389
2023-12-17 21:55:29 +00:00
Wayne Stambaugh eb3fd10af8 Fix obscured object selection issue in board and footprint editors.
This selection improvement feature is hidden behind the advanced
configuration key "PcbSelectionVisibilityRatio".  It is turned off (1.0)
by default.  Value values are from 0.0 to less that 1.0.  From testing,
using a value between 0.1 and 0.3 produces the best results.

This fix uses normal alpha blending described in the link below.  The
current design only uses the alpha of the object's color.  It could be
improved by doing a full color alpha blending but using the color alpha
alone seems to result in satisfactory results.

https://en.wikipedia.org/wiki/Alpha_compositing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16126
2023-12-17 16:43:56 -05:00
Jeff Young 1b0cc82c56 Move a couple of stragglers to BOARD_COMMIT. 2023-12-17 21:01:31 +00:00
Jeff Young a96b7116d0 Make sure de-selected items get redrawn.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16385
2023-12-17 17:59:43 +00:00
Jeff Young b29a56530c Remove undo-of-ungroup hack.
The hack assumed that the parent group would be the first
deleted item of type group in the undo list.  While this
will be true when undoing a user ungroup command, it will
not be when undoing an ungroup side-effect, such as when a
member of a group is deleted during UpdateFromPCB.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16384
2023-12-17 15:35:35 +00:00
Alex Shvartzkop c5ac2337e4 PNS mitering: construct arcs from start, end, angle.
Previously, arc endpoint and expected miter endpoint could differ,
causing very small loops later on.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16360
2023-12-17 05:47:07 +03:00
Alex Shvartzkop 3b26f96fe4 Tuning Patterns: read/write min_amplitude. 2023-12-17 05:32:02 +03:00
Jeff Young a52da69c03 Fix overly agressive assert.
An item can be added for group/ungroup and add/delete.
2023-12-16 16:20:36 +00:00
Jeff Young 9fb06f95a0 Fix msys2 build. 2023-12-16 16:17:24 +00:00
Jeff Young 66a15f6acf Re-factor frame pointer out of generator API. 2023-12-16 16:11:45 +00:00
Jeff Young ea3c87f243 Move group/ungroup to COMMIT infrastructure. 2023-12-16 14:17:25 +00:00
jean-pierre charras 27f5ecf716 French translation update 2023-12-16 13:48:27 +01:00
jean-pierre charras d8b1e3fcb3 test_prettifier: Better warning message for commit 8e647c24 2023-12-16 13:30:06 +01:00
Marek Roszko 8849891893 Add a update notice modal dialog instead of the incomplete notifications 2023-12-16 06:47:41 -05:00
jean-pierre charras 8e647c24b4 QA test, prettifier: Update golden files to the latest version.
Add also a warning when a golden file is too old and creates comparison error.
2023-12-16 10:49:23 +01:00
Alex Shvartzkop c16db03321 Reserve strings. 2023-12-16 12:25:32 +03:00
Jeff Young 1df84f4d92 Move some PCB_GENERATOR special-cases to propMgr listeners. 2023-12-15 21:04:33 +00:00
Jeff Young 0ab474e596 Comments. 2023-12-15 18:02:52 +00:00
Jeff Young 4844cffc00 Make sure PCB_GENERATOR's lock status follows their members.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16372
2023-12-15 17:37:36 +00:00
Jeff Young bcc823e8ff Always leave library browse button active.
It's a bit of a hack, but it makes it easy for users to
switch from inferred models to specific library models.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16261
2023-12-15 13:31:09 +00:00
John Beard 9b2cde9571 Use FormatBool for PCB_GENERATOR serialisation 2023-12-14 21:22:59 +00:00
John Beard e41f5efb03 Use modern bool style for footprint locking (locked yes)
Add some simple tests for specific footprint load/save checks
(including round-trip stability)
2023-12-14 21:22:59 +00:00
John Beard 481fa1f959 Allow PCB reference image locking and UUID to be saved
Add some unit tests for reference image saving/loading.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16334
2023-12-14 21:22:59 +00:00
John Beard f3f16a1e23 Update format version for reference images and footprint format changes 2023-12-14 21:22:59 +00:00
Jeff Young a0274a8463 Last fix was too aggressive.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16362
2023-12-14 18:27:33 +00:00
Jeff Young ec7e3c5bd6 Handle nets in recoverBaseline().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16360
2023-12-14 15:35:09 +00:00
Mike Williams 5704b3f422 Symbol Chooser Dialog: forward chars to panel
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16350#note_1694513334
2023-12-14 10:04:15 -05:00
Jeff Young 5709d57824 Copy 2 bug fixes from OnSizeFieldsGrid() to OnSizePinsGrid()
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16332
2023-12-14 14:45:55 +00:00
Jeff Young 358a2b9875 Make sure mru search strings get updated on double-click.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16355
2023-12-14 12:03:41 +00:00
jean-pierre charras b9a5e04ad0 Workaround to fix a QA not working test on platforms is Python older than 3.9
A Pcbnew Python test in QA cli (to test SVG outputs) fails in old Python
because it uses a function only existing in Python 3.9 and newer.
So skip this test for older Python version
2023-12-14 11:57:10 +01:00
Marek Roszko 140a734589 Remove hardcoded test version 2023-12-13 22:36:18 -05:00
Marek Roszko b696bbfe8e Revert common settings that was accidentally changed 2023-12-13 21:21:15 -05:00
Marek Roszko 2c7e56aec3 Fix include path 2023-12-13 21:18:22 -05:00
Marek Roszko c8f646efb1 ADDED: KiCad update check
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15026
2023-12-13 20:47:40 -05:00
Seth Hillbrand 0a67dd3fdd Revise triangulation
- Avoid double-splitting a single point
- Check for mid-line intersections
- Avoid splitting zero-area polygons
- Keep full z-list for intersection checks

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16241
2023-12-13 13:37:17 -08:00
Wayne Stambaugh 8687d5092f String and dialog layout fixes. 2023-12-13 11:49:34 -05:00
Mike Williams c3d8fc4494 Symbol/Footprint Chooser: make columns resizable, sortable
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16353
2023-12-13 09:46:17 -05:00
Mike Williams b3b7a41d51 Symbol Chooser: keep Recently Used at very top
Addition of Already Placed sorted it above Recently Used
2023-12-13 09:40:28 -05:00
Mike Williams 6f25399469 Symbol Chooser: sort Already Placed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16272
2023-12-13 09:29:56 -05:00
Jeff Young 1fa6b7b5d6 Initialize pre-defined sizes even when using netclass values.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16351
2023-12-13 14:14:58 +00:00
Jeff Young b9daa073d4 Work around wxWidgets CHAR_HOOK issue. 2023-12-13 13:16:51 +00:00
Wayne Stambaugh 9d6e9b14eb Fix action tool friendly name string capitalization. 2023-12-13 08:15:19 -05:00
jean-pierre charras 427de4cda6 BOARD::GetBoardPolygonOutlines(): add option to add NPTH as board holes.
Used in 3D viewer to truncate plated holes intersecting NPTH.
Fixes #16325
https://gitlab.com/kicad/code/kicad/-/issues/16325
2023-12-13 08:31:29 +01:00
Jeff Young 4b38af36ab Shorten disambiguation timer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15128
2023-12-12 17:22:00 +00:00
Jeff Young 035725cd5d Fallback to normal undo when wire-drawing not in progress.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16216
2023-12-12 16:08:05 +00:00
Mike Williams 96e229de0a kicad-cli: only plot user selected copper layers
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15634
2023-12-12 11:00:49 -05:00
Jeff Young de070a1d62 Watch out for VVIAs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16339
2023-12-12 15:45:13 +00:00
Jeff Young d3ab677197 Pre-select current net in net selector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16320
2023-12-12 13:57:12 +00:00
Jeff Young e000acb768 Make sure router honours unconstrained tuning setting. 2023-12-12 13:57:12 +00:00
Jeff Young ea67430c49 Cleanup. 2023-12-12 13:57:12 +00:00
Ian McInerney 53fd1aaf5e Don't try accessing library table rows that don't exist
When exiting the dialog without actually visiting the table, the grid
cursor could be missing, so it could return -1. Guard against that
condition.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16342
2023-12-11 23:36:51 +00:00
John Beard 11be5d6f1d Improve error handling when reading test board data 2023-12-11 22:27:32 +00:00
Ian McInerney 3c0566d318 Don't allow copying markers
Fixes KICAD-5FQ
2023-12-11 22:22:19 +00:00
Wayne Stambaugh 078ba510b4 Remove empty QA layer test file stub from build list. 2023-12-11 16:42:38 -05:00
Jon Evans 873023f0c4 Yet another workaround for libgit2 API changes 2023-12-11 16:21:18 -05:00
Wayne Stambaugh 5fa274ead0 Add board layer view stack up sequence from front layer to back layer.
The old bottom to top layer stack up sequence from back to front layer was
only used for plotting so it was renamed appropriately.  This will be used
for future board object select disambiguation improvements.
2023-12-11 15:07:58 -05:00
Jeff Young 1adf96d879 Update gold failure count. 2023-12-11 16:45:13 +00:00
Jeff Young e801e793dc Prevent copy-elision issues by using smart-pointer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16335
2023-12-11 16:27:31 +00:00
Jeff Young abd2cf25f2 Re-display hidden router items after cancelling.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16308
2023-12-11 16:02:02 +00:00
Jeff Young c9b5e3b012 Don't leave undo items in a hidden state. 2023-12-11 15:12:41 +00:00
Jeff Young 453d0566ff Support properties dialog during tuning. 2023-12-11 15:12:41 +00:00
Mike Williams 61da4fb1af PCB Fields: operate on field copies in dialogs
Makes cancel/undo work properly
2023-12-11 09:37:23 -05:00
Wayne Stambaugh 484491aaea Fix crash on save after pasting symbols in schematic editor.
This was caused by pasting zero length instance paths which are not valid.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16300
2023-12-11 08:29:10 -05:00
Ian McInerney 7554e629a8 Fix visibility of NET_INFO::SetParent
Without explictly inheriting the base SetParent method, the compiler was
warning a lot about hiding it due to the different argument type of the
new SetParent method.
2023-12-11 10:07:28 +00:00
Graham Keeth 541e0a0aaa cli: fp export svg uses an output dir, not file 2023-12-11 09:41:57 +00:00
Graham Keeth 5f189ec3fd cli: help string cleanup
- fix some typos
- capitalization consistency
- Reword exit code argument
2023-12-11 09:41:57 +00:00
jean-pierre charras 98dca3b774 Another workaround libgit2 API change for supporting older platforms 2023-12-11 10:06:09 +01:00
Jon Evans 3c2922f993 Work around libgit2 API change for supporting older platforms 2023-12-10 23:08:31 -05:00
Jon Evans 8a474879c5 Make sure DRC engine works at startup
If we wait to initialize this until later, some
routing operations will not work properly as the
constraints will be empty
2023-12-10 23:00:19 -05:00
Jon Evans 47ab6f8d03 Set default netclass for newly-added no-net PNS items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16144
2023-12-10 22:59:36 -05:00
Jeff Young d8d71a8a6e Honour "report all errors" for track/edge collisions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16268
2023-12-10 23:04:57 +00:00
Jeff Young a567a66d35 Fix tooltip.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16330
2023-12-10 18:53:13 +00:00
Jeff Young 3efc191aa9 Implement ESC processing for choose footprint dialog.
Also steals copy processing for details pane from symbol chooser.
2023-12-10 18:13:42 +00:00
Jeff Young 518be57516 Implement ESC processing for choose symbol dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16271
2023-12-10 18:13:42 +00:00
jean-pierre charras 057baf306f Pcbnew: draw shadow PCB_SHAPEs for locked items using continuous lines.
Using other shapes gives really strange and ugly results.
Fixes #16327
https://gitlab.com/kicad/code/kicad/-/issues/16327
2023-12-10 15:36:33 +01:00
Jeff Young 931cec862e Non-plated slots are effectively edges.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16267
2023-12-09 21:06:40 +00:00
Jeff Young 9885b7a4ef Don't require more clicks than necessary to communicate intent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16261
2023-12-09 17:55:59 +00:00
Jeff Young 88760f5c0e Update pin selection flags from SCH_SYMBOL::UpdatePins().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16281
2023-12-09 16:43:56 +00:00
Alex Shvartzkop a161829f86 Use SCOPED_FLAGS_CLEANER more carefully.
Other methods used ConvertOutlineToPolygon's SKIP_STRUCT state.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16321
2023-12-09 19:24:51 +03:00
Ian McInerney d8bb9b1e66 Don't update file browser filter if control doesn't exist
When the grid is being validated, SetValue is called, which then ends up
running the file filter update. However, if the cell was never selected,
the file browser button would never have been created.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16316
2023-12-08 22:09:55 +00:00
Seth Hillbrand 0db362a907 Fix bug where default courtyard outline set to 0
The defaults are stored in mm, this needs to be converted to IU for
proper use in pcbnew
2023-12-08 13:31:13 -08:00
Jeff Young e3c9cf94b7 Reduce the size of the tuning popups.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304
2023-12-08 19:50:29 +00:00
jean-pierre charras c5d0dcdb15 French translation update 2023-12-08 19:42:21 +01:00
Wayne Stambaugh b7dc7e90ac Minor string fixes. 2023-12-08 13:09:16 -05:00
Seth Hillbrand d16b721bc8 Update translations
Fixes previous update by first applying Weblate changes
2023-12-08 09:49:34 -08:00
김랑기 d9c1c9735e Translated using Weblate (Korean)
Currently translated at 86.9% (7834 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:02 -08:00
Zhen Sun 091479c3c4 Translated using Weblate (Chinese (Simplified))
Currently translated at 85.9% (7748 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-12-08 09:49:02 -08:00
Henrik Kauhanen c7c186d735 Translated using Weblate (Swedish)
Currently translated at 99.6% (8978 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:02 -08:00
김랑기 e7b5b90601 Translated using Weblate (Korean)
Currently translated at 86.8% (7823 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:02 -08:00
Mark Hämmerling 1daa0f043e Translated using Weblate (German)
Currently translated at 86.3% (7785 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-12-08 09:49:02 -08:00
Henrik Kauhanen 3a9d418cf0 Translated using Weblate (Swedish)
Currently translated at 99.5% (8968 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:01 -08:00
aris-kimi 7d3397dc8f Translated using Weblate (Greek)
Currently translated at 82.8% (7467 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-08 09:49:01 -08:00
aris-kimi c9c48e43a4 Translated using Weblate (Greek)
Currently translated at 82.7% (7457 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-08 09:49:01 -08:00
Temuri Doghonadze 648b691b86 Translated using Weblate (Georgian)
Currently translated at 10.2% (924 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ka/
2023-12-08 09:49:01 -08:00
JasonTan 82bcab1dcd Translated using Weblate (Chinese (Simplified))
Currently translated at 85.5% (7713 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-12-08 09:49:01 -08:00
Pinpang Liao 43a9ee78f7 Translated using Weblate (Chinese (Simplified))
Currently translated at 85.4% (7703 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-12-08 09:49:01 -08:00
Ranforingus 2e5d8d75d3 Translated using Weblate (Dutch)
Currently translated at 70.3% (6338 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-12-08 09:49:01 -08:00
___davidpr 1b63a0422e Translated using Weblate (Serbian)
Currently translated at 10.2% (920 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen 8d6a82f939 Translated using Weblate (Swedish)
Currently translated at 99.4% (8959 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:01 -08:00
Mark Hämmerling 9d8793af37 Translated using Weblate (German)
Currently translated at 86.0% (7755 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-12-08 09:49:01 -08:00
Ahmed Elswah b0932eb144 Translated using Weblate (Arabic)
Currently translated at 1.1% (100 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ar/
2023-12-08 09:49:01 -08:00
___davidpr 91bf9691e6 Translated using Weblate (Serbian)
Currently translated at 10.1% (919 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2023-12-08 09:49:01 -08:00
Erkan f902adc8f9 Translated using Weblate (Turkish)
Currently translated at 52.1% (4700 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-12-08 09:49:01 -08:00
欠陥電気 cbfef4950b Translated using Weblate (Chinese (Simplified))
Currently translated at 85.4% (7703 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen 8c28149764 Translated using Weblate (Swedish)
Currently translated at 99.3% (8955 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:01 -08:00
김랑기 e03c02f587 Translated using Weblate (Korean)
Currently translated at 86.8% (7823 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen ae4074be91 Translated using Weblate (Finnish)
Currently translated at 99.9% (9008 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen 4374701c71 Translated using Weblate (Swedish)
Currently translated at 99.3% (8953 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:01 -08:00
Bas Wijnen 49dcedffdc Translated using Weblate (Dutch)
Currently translated at 70.2% (6333 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-12-08 09:49:01 -08:00
Tokita, Hiroshi 10da1871d5 Translated using Weblate (Japanese)
Currently translated at 92.0% (8293 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen 944d03d6d1 Translated using Weblate (Finnish)
Currently translated at 99.9% (9008 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-08 09:49:01 -08:00
Henrik Kauhanen 42f80c7251 Translated using Weblate (Swedish)
Currently translated at 99.0% (8925 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:01 -08:00
Tokita, Hiroshi 9b6fbc1be7 Translated using Weblate (Japanese)
Currently translated at 91.9% (8289 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-12-08 09:49:01 -08:00
Toni Laiho 4a8628dcc1 Translated using Weblate (Finnish)
Currently translated at 99.9% (9011 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-08 09:49:01 -08:00
lê văn lập a963d3d93a Translated using Weblate (Vietnamese)
Currently translated at 13.6% (1234 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-08 09:49:00 -08:00
김랑기 baba5ed98a Translated using Weblate (Korean)
Currently translated at 85.9% (7744 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:00 -08:00
Henrik Kauhanen 717f15fab9 Translated using Weblate (Swedish)
Currently translated at 98.9% (8919 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-12-08 09:49:00 -08:00
pedrolinharesmoreira 73d9972898 Translated using Weblate (Korean)
Currently translated at 85.7% (7725 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:00 -08:00
김랑기 81ea86b56c Translated using Weblate (Korean)
Currently translated at 85.7% (7725 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-12-08 09:49:00 -08:00
Henrik Kauhanen b85424723f Translated using Weblate (Finnish)
Currently translated at 99.9% (9010 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-08 09:49:00 -08:00
Phạm Minh Tấn 1b62538f61 Translated using Weblate (Vietnamese)
Currently translated at 12.9% (1168 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-12-08 09:49:00 -08:00
aris-kimi b7ee9b87d5 Translated using Weblate (Greek)
Currently translated at 82.7% (7454 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-12-08 09:49:00 -08:00
Wellington Terumi Uemura 6f803776a2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (9010 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-12-08 09:49:00 -08:00
ZbeeGin b8ed3856e7 Translated using Weblate (Polish)
Currently translated at 100.0% (9012 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-12-08 09:49:00 -08:00
Tokita, Hiroshi cd639f822e Translated using Weblate (Japanese)
Currently translated at 91.5% (8246 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-12-08 09:49:00 -08:00
Toni Laiho 79b5dd4d1a Translated using Weblate (Finnish)
Currently translated at 99.9% (9011 of 9012 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-12-08 09:49:00 -08:00
Seth Hillbrand 2ac8802bac Revert "Update translations"
This reverts commit 3d860b1b67.
2023-12-08 09:46:06 -08:00
Seth Hillbrand 3d860b1b67 Update translations 2023-12-08 09:40:20 -08:00
Jeff Young 4d28dfacc2 Remove query dialog from tuning tool startup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16305
2023-12-08 17:01:14 +00:00
Jeff Young e0a34efcb7 Use a more self-documenting API for router preview item flags.
Also fixes a bug where rule areas were drawn with solid fills.
2023-12-08 16:02:15 +00:00
jean-pierre charras 096bcff160 Try to fix a QA not working test on W10/msys2.
Probably due to a not closed file when trying to delete it.
2023-12-07 20:01:22 +01:00
jean-pierre charras ccb935db4a dialogs setup default: use a better dialog to show errors. 2023-12-07 17:04:33 +01:00
Jon Evans 0c1fba8686 IPC-2581: Do not render hidden text 2023-12-07 09:46:39 -05:00
Jon Evans 8b45579ed0 IPC-2581: Make sure components are deduplicated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16287
2023-12-07 09:32:08 -05:00
Jeff Young d257dc5b4e Cleanup unused variables. 2023-12-07 13:41:24 +00:00
Jeff Young aa046345eb Add missing case to Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2023-12-07 13:41:24 +00:00
Mike Williams d8c04e4ef2 Finish Action: fix context menu for buses 2023-12-07 08:40:29 -05:00
Ian McInerney be9c3b08b5 Fix library table file filters
The schematic librayr table was missing the Kicad Sexpr filter, and also
the filter inside the grid editor was never updated when the library
plugin type was changed in the grid, so a library of the new type could
not be selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16278
2023-12-07 11:16:02 +00:00
Jon Evans 855486f849 IPC-2581: Do not create an empty Bom node 2023-12-06 17:16:15 -05:00
Jon Evans 9fcff5e701 IPC-2581: BomHeader assembly needs to be genStringified 2023-12-06 17:02:50 -05:00
Jon Evans 2674a2a294 IPC-2581: Make sure non-physical layers aren't exported 2023-12-06 16:57:52 -05:00
jean-pierre charras 921291c28b Pcbnew, default values for sizes and thickness: add missing tests for validation.
Especially for texts, the min and max values that are used are the same as
for other dialogs.
2023-12-06 16:45:18 +01:00
Mike Williams 2795fa9ca3 EE/PCB_Actions: convert to generic Finish
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16079
2023-12-06 10:33:17 -05:00
Mike Williams 16eb31a6e8 Symbol Fields Table: preserve user column width on move
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16124
2023-12-06 09:46:05 -05:00
Mike Williams 4d5841cc98 Symbol Fields Table: better column moving
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16123
2023-12-06 09:39:10 -05:00
Jeff Young 2661e7a8ee Fix over-zealous copy/paste and add a few more comments. 2023-12-06 13:08:22 +00:00
Alex Shvartzkop b7840f4f82 Make STEP export process crash more visible. 2023-12-06 08:46:26 +03:00
Alex Shvartzkop 9345b73af5 Don't crash when OCC fails to read a model and didn't open the doc. 2023-12-06 03:16:46 +03:00
Alex Shvartzkop 26c8c718eb Fix drawing sheet border random thickness glitch. 2023-12-05 19:31:26 +03:00
Alex Shvartzkop 7e2705e444 Revert "CLI: set default Gerber drill format to 4.5 mm."
This reverts commit a06d93a383.
2023-12-05 15:33:55 +03:00
Alex Shvartzkop ec06d5e475 Revert "CLI: set default Gerber precision to 4.5 mm."
This reverts commit 754a6dcd0a.
2023-12-05 15:33:55 +03:00
Alex Shvartzkop 9c2c291255 Gerber plotter: work around CAM350 circle bug. 2023-12-05 15:33:55 +03:00
Alex Shvartzkop 0afc516107 CLI: fix strings in 3D export. 2023-12-05 13:56:01 +03:00
Alex Shvartzkop eb1fbadc12 Fix/reserve strings in STEP export dialog. 2023-12-05 13:55:26 +03:00
jean-pierre charras e5b27dbe32 Eeschema: minor fix: ensure, after loading a schematic the sheet count is updated.
Fixes #16260
https://gitlab.com/kicad/code/kicad/-/issues/16260
2023-12-05 09:58:25 +01:00
Seth Hillbrand fcc6dec0e4 Handle bezier curves in 2581 better
Rather than keeping the cached, we should calculate the level we want
and output that
2023-12-04 16:55:43 -08:00
Seth Hillbrand ef3e5b18dc Only raise the parent when show=false
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16243
2023-12-04 16:55:36 -08:00
Seth Hillbrand bd4278140f Allow graphical fill to be read as boolean
We had been allowing yes/solid/none with yes/solid both representing
true and none representing false.  This adds the complimentary boolean

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16262
2023-12-04 13:47:31 -08:00
Seth Hillbrand 06c3879007 Don't put polygons in shared bins
Some viewers don't want to render polygons as part of UserSpecial, so
keep them in their own set even though they have absolute coordinates
2023-12-04 13:45:33 -08:00
Seth Hillbrand 0e37ea0c66 2581 enabled by default 2023-12-04 12:03:15 -08:00
Alex Shvartzkop a06d93a383 CLI: set default Gerber drill format to 4.5 mm.
For compatibility with fabs.
2023-12-04 22:29:02 +03:00
Alex Shvartzkop 34b30d2586 "kicad-cli pcb export drill": hook up --gerber-precision.
7.0 commit: 5140fd7819
2023-12-04 22:10:03 +03:00
Jon Evans fc3c701fa1 Fix crash launching editors with additional command line arguments
(cherry picked from commit c5cdff6213)
2023-12-04 17:22:44 +00:00
jean-pierre charras 3bd7d92522 Fix crash: Under some circumstances the command "Export symbols to (new) library"
produces a crash when the library links are updated, and a power symbol is not found
in any loaded library.
Add also an option to export all symbols or all not pwer symbols
Fixes #16229
https://gitlab.com/kicad/code/kicad/-/issues/
2023-12-04 18:12:51 +01:00
jean-pierre charras 0b1cb0e19d Gerber plotter: do not skip not filled polygons with a 0 line thickness.
It is legal in Gerber files, although lines with thickness = 0 are not
displayed by some viewers.
2023-12-04 17:49:01 +01:00
Mike Williams d468b6d542 Point Editor: allow snapping to off-grid start point
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16244
2023-12-04 09:12:53 -05:00
jean-pierre charras b17ca50472 Gerber export: fix incorrect shape of round rect pads on paste layers in some cases.
They can be plotted as rect shape depending on margin value.
Fixes #16257
https://gitlab.com/kicad/code/kicad/-/issues/16257
2023-12-04 12:46:39 +01:00
Alex Shvartzkop 12f529d6e0 Fix build error. 2023-12-04 10:44:37 +03:00
Alex Shvartzkop 754a6dcd0a CLI: set default Gerber precision to 4.5 mm.
Many fabs still don't work correctly with 4.6 mm precision Gerbers.
2023-12-04 09:52:31 +03:00
Alex Shvartzkop 111a8d6ab3 Improve/fix Expand connection for graphics. 2023-12-04 09:52:31 +03:00
Graham Keeth e3eab57133 add IBIS demo, based on schematic/models by Fabien Corona 2023-12-04 01:05:17 +00:00
Tomasz Wlostowski 5af9d3395e eeschema: sanitize null pointer dereference of symbol filter. Used to trigger a segfault when mass-changing power symbol library refs
Fixes https://gitlab.com/kicad/code/kicad/issues/16225
2023-12-03 23:11:28 +01:00
Wayne Stambaugh ef2f72697b Make paste special dialog a bit more user friendly.
Set a default control so that the escape key closes the dialog.

Select the OK button after the user selects an annotation option.  This
allows for keyboard navigation of the dialog and saves an extra mouse
move and click to when choosing an annotation setting.
2023-12-03 13:44:38 -05:00
Jeff Young a1b514bcba Update message panel after switching layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16247
2023-12-03 17:07:08 +00:00
Jeff Young ff9d834e31 Don't use epsilon when calculating pushout force in dp placer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16210
2023-12-03 16:58:41 +00:00
Jeff Young 95cfddf3a6 Fix some issues with hotkey paste in WX_GRIDs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16253
2023-12-03 16:16:40 +00:00
Jeff Young 04246a969c Show tuning status while tuning. 2023-12-03 14:23:57 +00:00
Jeff Young 33b602eb44 Use popup look & feel for on-canvas tuning status.
We previously used the ruler look & feel because it leveraged
pre-existing code.

But it's too hard to read over a busy background.  Maybe the ruler
should move to popup look & feel as well?
2023-12-03 13:21:01 +00:00
Wayne Stambaugh 764df1d107 Fix crash when saving pasted root sheet symbols.
The paste code creates invalid KIID_PATH objects with a zero length.  All
paths must include the root KIID at a minimum.  Code was added to prune
the invalid paths and some defensive code was adding to the formatter to
prevent the crash in case there are other paths where someone generates
a zero length path.

Pruning orphaned instance data does not work when loading schematics prior
to version 7 because the paths did not include the root sheet UUID.  Once
the file is saved to V7 or later, the next load will prune any orphaned or
invalid instance data for the current project.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16245
2023-12-03 08:03:31 -05:00
Jon Evans 4268ffec77 Use default, not legacy, copper edge clearance as default
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16032
2023-12-02 23:25:06 -05:00
Jon Evans 16dea1d7e7 Remove unused advanced config variable 2023-12-02 21:25:18 -05:00
Jon Evans 9c1a160fcd Add system for property change notifications
Use this to sync symbol field edits that are
synced by the dialog

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15697
2023-12-02 19:22:59 -05:00
Jeff Young a817eaa67f Remove column auto-sizing and save user column widths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16166
2023-12-02 22:06:09 +00:00
Jeff Young 1618beba2c Fill empty zones when auto-fill is on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16234
2023-12-02 20:16:26 +00:00
Jeff Young 6e245d5eb4 Remove special cases for footprint editor. BOARD_COMMIT handles them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16236
2023-12-02 20:06:57 +00:00
Jeff Young b13590f4c0 Use preview items instead of highlightNets & status popup
The router preview item can be specific to the part that is being
tuned, rather than the whole net.  It's also less visually noisy as
it doesn't dim/undim the rest of the board.

Using kigfx preview items for the status keeps us from having a bunch
of focus issues with the status popup window.
2023-12-02 16:15:43 +00:00
Alex Shvartzkop 2a2dc3a508 Eeschema: Allow 180 deg arcs when editing, enable center point snapping. 2023-12-02 17:08:56 +03:00
Alex Shvartzkop bfcd087751 Add KiROUND for VECTOR2 types. 2023-12-02 17:08:56 +03:00
jean-pierre charras 98091d0199 Fix issues in widget_hotkey_list.cpp, HK_PROMPT_DIALOG:
- fix not working char events on MSW
- fix incorrect handling of ESC key: it deleted the current hothey
- fix incorrect management of sizers in this dialog.
Fixes #16238
https://gitlab.com/kicad/code/kicad/-/issues/16238
2023-12-02 11:29:56 +01:00
Wayne Stambaugh 6dc25f4775 Fix broken symbol reference designators on paste special.
It appears that in our zeal to prevent file changes when saving shared
schematics, we (I) clobbered saving relative symbol instance data paths
to the clipboard.  This has be restored along with setting the correct
symbol unit for relative clipboard paths.

Fixed a serious issue with KIID_PATH::MakeRelativeTo() where the original
path was not restored when the incremental KIID object test fails.  This
also included a minor optimization using the actual KIID object for
comparison instead of converting it to a string and then comparing the
string.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15981
2023-12-01 14:18:47 -05:00
Seth Hillbrand 4bc055d5d0 Don't keep showing the same error message
When updating on a timer, if there is an error, just show it once and be
done
2023-12-01 09:27:26 -08:00
Seth Hillbrand 6b3ac54a41 Add default parameter to GetEffectivePolygon()
Allows legacy plugins to use this function
2023-12-01 09:27:26 -08:00
Alex Shvartzkop 2d9eee93e2 Fixes for length tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16198
2023-12-01 08:44:10 +03:00
Alex Shvartzkop c93eb679c1 Commit Changes dialog: make more strings translatable; formatting. 2023-12-01 04:03:32 +03:00
Jon Evans 1ff3b5a437 Guard against UNDEFINED_LAYER in GetLayerSet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16230
2023-11-30 17:08:48 -05:00
Seth Hillbrand 12d787ecc0 Name pins after numbers in IPC2581
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16211
2023-11-30 10:08:03 -08:00
Seth Hillbrand 343828c552 Fix invalid string compare in IBIS parser
strcmp returns 0 if strings are the same but compareIbisWord returns
True (1).

Adds an IBIS simulation QA test case to catch this in the future

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

(cherry picked from commit ef8b6bf9e1)
2023-11-30 09:16:38 -08:00
Wayne Stambaugh 23175c163f Fix unconnected schematic net highlighting issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16218
2023-11-30 11:29:01 -05:00
Alex Shvartzkop f94b3856af Fix color swatch asserts on wxMac.
GetPixel doesn't work on wxMac.
2023-11-30 18:23:40 +03:00
jean-pierre charras 1bac16459a pcb_parser.cpp: fix parsing issues with T_bolt and T_italic. these keywords
can have a second key (yes or no) or no othe key (i.e. defualt = yes)
2023-11-30 08:58:23 +01:00
Alex Shvartzkop 1ac1753048 Improve Symbol Fields Table appearance on GTK. 2023-11-30 08:37:42 +03:00
Jon Evans 98df3860f5 Fix build on GCC 11 2023-11-29 21:29:48 -05:00
Seth Hillbrand ff9c4c56fa Clean 2581 output
Remove negative floating point outputs
Disambiguate reference ids between dictionaries

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16211
2023-11-29 17:32:23 -08:00
Alex Shvartzkop c5a6409c35 Fix a crash when opening PCB. 2023-11-29 22:50:52 +03:00
Marek Roszko 9fb61faeb2 Fix crash formatting empty strings 2023-11-29 14:43:25 -05:00
Marek Roszko 56b7f91361 Format the std::filesystem path directly 2023-11-29 14:27:08 -05:00
Alex Shvartzkop b0cc9d50b2 Fix a bug with fields focus in Clone Project from Git Repository.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16217
2023-11-29 22:20:47 +03:00
Jeff Young a5454cd7c2 Remove group from view when ungrouping.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16197
2023-11-29 18:21:18 +00:00
Jon Evans cb12464865 Potentially fix MSVC build 2023-11-29 13:10:56 -05:00
Jon Evans f3360a4442 Quote base64 data in DS and schematic 2023-11-29 16:17:41 +00:00
Jon Evans 19cfc18cf8 Quote base64 data in PCB 2023-11-29 16:17:41 +00:00
Jon Evans ae66ce68b5 Update testcases for generator_version 2023-11-29 16:17:41 +00:00
Jon Evans 786a4ce675 Use explicit booleans for schematic format 2023-11-29 16:17:41 +00:00
Jon Evans ae13a46ace Fix display of footprint parse errors at load 2023-11-29 16:17:41 +00:00
Jon Evans 7fe863c9d0 Quote UUIDs in schematic format 2023-11-29 16:17:41 +00:00
Jon Evans 4ff127b452 Parse generator_version and improve error output on mismatch
Also bump symbol format version for generator_version
2023-11-29 16:17:41 +00:00
Jon Evans b13e244dc5 Avoid space-wrapping while inside xy special case 2023-11-29 16:17:41 +00:00
Jon Evans 0face5a891 Add prettification to pl_editor; bump version 2023-11-29 16:17:41 +00:00
Marek Roszko d1ecf3790c Add generator version 2023-11-29 16:17:41 +00:00
Jon Evans f1f8981395 Automatic whitespace and indentation prettification for sexpr formats 2023-11-29 16:17:41 +00:00
Jon Evans 55ba667bcb Retire tstamp keyword in favor of uuid 2023-11-29 16:17:41 +00:00
Jon Evans 55bca5e7ac Normalize formatting of booleans in the PCB file format 2023-11-29 16:17:41 +00:00
Jeff Young 2545999b3d Delete shapes re-combined into a pad.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16193
2023-11-29 16:15:31 +00:00
Mike Williams f993e45325 Variables: make consistent across editors
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16180
2023-11-29 09:55:17 -05:00
Ian McInerney 188b9f4dd5 Fix append board dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16214
2023-11-29 14:01:13 +00:00
Graham Keeth 729659f5cf fixup title case properties 2023-11-29 10:17:05 +00:00
Alex Shvartzkop a352bd4a25 Improve Symbol Fields Table appearance on Windows. 2023-11-29 06:04:39 +03:00
Graham Keeth 4f36f669dc Use Title Case for property names 2023-11-29 01:23:35 +00:00
Alex Shvartzkop afa08b710c Support transparent cursor colors in OpenGL GAL. 2023-11-29 04:04:22 +03:00
Alex Shvartzkop bbba7fd4d7 Alpha-blend color with the checkerboard in color swatches. 2023-11-29 03:34:11 +03:00
Seth Hillbrand daf178b64f Upgrade Clipper2 to 1.3.0
Fixes a number of minor inflation issues including slivers when
overlapping points are inflated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16182
2023-11-28 16:02:39 -08:00
Seth Hillbrand 9e48b388fe Add additional QA sliver check 2023-11-28 16:02:39 -08:00
Alex Shvartzkop 08e6e0258f IBIS: add stub for Model Spec; support empty strings in line with keywords. 2023-11-29 00:24:34 +03:00
Alex Shvartzkop f84bab00b4 Fix build; renaming. 2023-11-28 22:18:37 +03:00
Seth Hillbrand 4d2b964f52 Use actual bounding limits for LIB_PIN bbox
The extra padding causes unwanted disambiguation menus especially when
working with LIB_PINs that tend to be closely packed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183
2023-11-28 10:47:57 -08:00
Jeff Young 07ee44740b Don't re-add item to screen if it wasn't there to begin with.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16184
2023-11-28 18:20:09 +00:00
Alex Shvartzkop 7eb98a9863 Fixes for tuning patterns and router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16160
2023-11-28 20:55:39 +03:00
Seth Hillbrand 619c9bb0e4 Don't include hidden layers when selecting tuning
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16188
2023-11-28 09:41:09 -08:00
jean-pierre charras 35ee0b12d1 3d_viewer_id.h: minor fix. 2023-11-28 16:59:01 +01:00
jean-pierre charras 66ae0044e6 French translation update 2023-11-28 16:59:01 +01:00
Alex Shvartzkop 42c9553262 Add a Wayland hack to hover previews. 2023-11-28 18:49:04 +03:00
Jeff Young 87fba5350f Remove unnecessary l from rectangle teardrops image.
Also further differentiates track-to-track image from rectangular
pad image.
2023-11-28 15:11:51 +00:00
Jeff Young 175e8475a7 Fix colours in light teardrop images. 2023-11-28 15:11:51 +00:00
Seth Hillbrand e1b428609d Rewrite followTrivialPath as iterative
Remove the recursion that causes stack crash and add an
additional check for if we have already seen either the
current link or the last link before adding them to the line

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16185
2023-11-28 06:57:50 -08:00
Jeff Young 86edba9eb8 Make teardrop images international, and unify terminology.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16154
2023-11-28 13:56:41 +00:00
Seth Hillbrand fb68fc3f85 Use more compliant sleep command 2023-11-27 15:03:06 -08:00
Seth Hillbrand 4a19bef2ac Handle external simulator output gracefully
On Windows, ngspice doesn't output messages to stdout or stderr, it
starts the gui which causes KiCad to hang until ngspice is terminated.
We want to handle immediate responses but not get hung by the external
process.  Passing a process class to wxExecute allows us to detach the
process (it will terminate and free itself) while still handling the
immediate output and errors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15446
2023-11-27 13:20:46 -08:00
Seth Hillbrand 1a2f2d418c Basic handling for slotted holes in IPC2581 2023-11-27 11:57:31 -08:00
Seth Hillbrand 5e9b56b431 Don't set the dirty flag when saving 2023-11-27 11:57:31 -08:00
Seth Hillbrand f64349b292 Coverity fixes 2023-11-27 11:57:31 -08:00
Mike Williams 58cc0e2d1e Schematic: correctly resolve SHEETNAME for root sheet 2023-11-27 13:45:12 -05:00
jean-pierre charras d1aa49e1c9 Eeschema, sch_painter.cpp: remove a line that was used only for a test.
It was added during a debug... and forgotten in code.
Fixes #16176
https://gitlab.com/kicad/code/kicad/-/issues/16176
2023-11-27 15:42:04 +01:00
jean-pierre charras f6bbf49800 Pcbnew, Excellon export: remove an useless line at end of file 2023-11-27 14:08:21 +01:00
jean-pierre charras 15c7f224b3 Protect against null pointer
Fixes #16172
https://gitlab.com/kicad/code/kicad/-/issues/16172
2023-11-27 09:52:18 +01:00
jean-pierre charras 998a03f005 fix missing icons
Fixes #16171
https://gitlab.com/kicad/code/kicad/-/issues/16171
2023-11-27 09:10:00 +01:00
Seth Hillbrand 4fe755854f Remove GCC extension syntax 2023-11-26 16:46:56 -08:00
Seth Hillbrand 75c6b0ab28 Added IPC2581 support
IPC2581 is a modern production file exchange system.  It provides
single-file data output for an entire board including BOM and netlist
information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1954
2023-11-26 15:30:58 -08:00
Jon Evans 90a61b8d36 Prevent some issues with recursion on repeat-last-item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16168
2023-11-26 16:43:59 -05:00
Jon Evans c3deafa597 Fix deprecation warnings in latest wxWidgets 2023-11-26 16:43:59 -05:00
Jeff Young aa3b4ee6d6 Make another attempt to fix compile button size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16167
2023-11-26 18:24:34 +00:00
Jeff Young efaa131bc4 Position dummy tuning pattern before trying to get length out of it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16165
2023-11-26 18:18:49 +00:00
jean-pierre charras ad70b50046 Add missing icons.
Fixes #16163
https://gitlab.com/kicad/code/kicad/-/issues/16163
2023-11-26 15:18:37 +01:00
jean-pierre charras 4a5859cc45 Fix compil warnings. 2023-11-26 14:26:09 +01:00
jean-pierre charras aa760406ba Fix old python examples and a compatibility issue in pcb_shape.i.
Fixes #16158
https://gitlab.com/kicad/code/kicad/-/issues/16158
2023-11-26 13:44:31 +01:00
Graham Keeth 5e01ddb18a Delete deprecated expression funcs from DRC rules 2023-11-26 00:30:55 +00:00
Graham Keeth 1fbdbabd08 add getField() and memberOfSheet() to DRC syntax help 2023-11-26 00:30:55 +00:00
Graham Keeth 4e796206f9 fix DRC syntax help example clearance-to-1mm-slot 2023-11-26 00:30:55 +00:00
Graham Keeth 136bc1dbb4 Adjust spacing between example DRC rules 2023-11-26 00:30:55 +00:00
Graham Keeth 13a2c6b017 Hide some irrelevant properties from DRC rule editor
- Fill_Color
- Line_Color
- Thermal_Spoke_Template
- Number_Box
2023-11-26 00:29:16 +00:00
Ian McInerney 1345735532 Add ability to clear hotkey in the set hotkey dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15147
2023-11-26 00:03:09 +00:00
Ian McInerney b64631d7bc Add um support to the unit binder 2023-11-26 00:03:09 +00:00
Jon Evans 2b27337778 Clamp ratio properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16153
2023-11-25 18:40:14 -05:00
Alex Shvartzkop c307e284e0 Altium PCB: fixup GetRemainingSubrecordBytes usage. 2023-11-26 00:30:22 +03:00
Alex Shvartzkop a8795711a0 Altium PCB: import hatched polygon pour fills. 2023-11-26 00:23:37 +03:00
Jon Evans 37d9b7fac0 Prevent crash if generator exists but has no items
See https://gitlab.com/kicad/code/kicad/-/issues/15366
2023-11-25 16:01:12 -05:00
Jon Evans 1cb1fd3516 Partial revert "Fix commit/view handling when dragging arcs"
Revert unintended formatting changes

This reverts commit f0988c3c5d.
2023-11-25 15:16:57 -05:00
Jon Evans f0988c3c5d Fix commit/view handling when dragging arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16145
2023-11-25 14:55:47 -05:00
Alex Shvartzkop 7e68da7f7f QA: show more info in TestCalcArcCenter3Pts. 2023-11-25 20:09:51 +03:00
Alex Shvartzkop b7824adfb1 QA: add a test for CalcArcCenter( aStart, aMid, aEnd ) 2023-11-25 18:37:53 +03:00
Jeff Young df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
jean-pierre charras d4ce2c8982 Fix a few Coverity warnings. 2023-11-25 11:44:01 +01:00
jean-pierre charras 1cf9da4b69 bitmap icons: fix a text (Amin -> A, Amax->A)
It was previously fixed for 2 icons, but these 4 icons were not fixed.
Fixes #16155
https://gitlab.com/kicad/code/kicad/-/issues/16155
2023-11-25 11:19:51 +01:00
Jon Evans a2379f4111 Altium QA: Fix issue with newer wx
Now uses std::from_chars and + prefix must be stripped
2023-11-24 16:00:42 -05:00
jean-pierre charras bcea2aa73b EEschema, Cairo printing engine: some fixes:
- Try to activate anti aliasing
- disable Preview on GTK when cairo printing is selected: it does not work,
and is also disabled for Pcbnew / Gerbview for the same reason
2023-11-24 17:43:04 +01:00
Jeff Young 2a198e22e2 Draw tuning pattern border when placing. 2023-11-23 23:25:49 +00:00
Jeff Young b6501ce632 Report current length on roll-over. 2023-11-23 23:25:49 +00:00
Wayne Stambaugh 70dad45996 Fix broken schematic net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16131
2023-11-23 17:29:02 -05:00
jean-pierre charras 029df17b5a Eeschema, Cairo printing: adjust printing to page size and other refinements 2023-11-23 17:24:16 +01:00
jean-pierre charras 247a0e6501 Eeschema: Add Cairo printing to the Eeschema print engine. The current print engine (using wxDC draw engine) has frequently issues with each new wxWidgets version. Cairo printing engine, used for Pcbnew and Gerbview has less issues. On Eeschema, the cairo print is enabled only if the advanced config has the option "EnableEeschemaPrintCairo = 1" 2023-11-23 16:11:09 +01:00
Graham Keeth 1c881bcbb8 cli: fix some extra sch plot args
- DXF doesn't support background color
- HPGL doesn't support background color
- HPGL doesn't support color themes
- HPGL doesn't support black-and-white
2023-11-23 14:23:33 +00:00
Ian McInerney 1194a91be4 Prompt if overwriting the net inspector CSV report 2023-11-23 11:49:40 +00:00
Ian McInerney 0508a9ce83 Don't write units to every field in net inspector CSV
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16147
2023-11-23 11:46:24 +00:00
Jeff Young d437d872ab Re-enable corner radius of DP meanders.
It appears whatever bugs it had have been addressed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15257
2023-11-22 19:45:56 +00:00
Alex Shvartzkop e9c5b4755b 3D OCE plugin: make two-sided faces for non-solid shapes (shells).
Fixes single-face shells display in the 3D viewer.
2023-11-22 18:53:59 +03:00
Jeff Young 85f760fc66 Run IsElementVisible() test on all markers, not just their shadows.
The view item doesn't always get its layers updated early enough for
the paint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16138
2023-11-22 14:37:45 +00:00
Jeff Young 4a25ef164d Remove children from view_group when de-selecting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16139
2023-11-22 14:37:45 +00:00
Yang Hongbo f324b1b88d Merge remote-tracking branch 'origin/master' into last_net_inspector_settings 2023-11-22 07:21:03 +08:00
Yang Hongbo 5a1b30ea42 save and restore last used net inspector settings 2023-11-22 07:13:08 +08:00
Jon Evans 2604854221 Make new lib tree highlighting dark-mode compatible 2023-11-21 17:31:23 -05:00
Jeff Young e4b7170a92 Sort on first column if none specified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16054
2023-11-21 17:14:22 +00:00
Graham Keeth fa580601f2 cli: remove double-added args
--drawing-sheet and --define-var were already added in the parent class
2023-11-21 12:06:12 +00:00
Graham Keeth ab79977d9b cli: --exclude-pdf-property-popups is only for pdf 2023-11-21 12:06:12 +00:00
Alex Shvartzkop 5de55b8c4a STEP export: fix a Bnd_BoundSortBox usage bug. 2023-11-21 14:21:12 +03:00
Alex Shvartzkop 58b9d68084 STEP export: make use of footprint names instead of "SOLID".
Should help when importing into software that does deduplication
based on label names (e.g. SolidWorks).
2023-11-21 14:11:16 +03:00
jean-pierre charras a3a2f43f6c eeschema, DIALOG_PLOT_SCHEMATIC: disable PDF option when format is not PDF
Fixes #16129
https://gitlab.com/kicad/code/kicad/-/issues/16129
2023-11-21 10:27:21 +01:00
jean-pierre charras 7ca6344b57 Kicad PROJECT_ARCHIVER: better fix than commit 734e0ca0:
Do not store twice files with extension .gm?? in zip files
Previous commit did not store files like *.gm12, that can be existing when
Gerber files come from another ECAD tool, and allowed duplicate files like *.g1
2023-11-21 09:24:14 +01:00
Jeff Young f9c8f6ab79 Support single-field-mirroring in Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13395
2023-11-20 22:56:14 +00:00
Alex Shvartzkop f3fdfa73e6 STEP export: Do not set BRepBuilderAPI precision.
This caused issues when loading some STEP models.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15485
2023-11-21 00:47:38 +03:00
Jon Evans 87ba1f7ea0 Fix expand selection for graphic shapes on graphic layers 2023-11-20 16:14:56 -05:00
Jeff Young d382a11c2a Apply new on-canvas-item marking to footprint editor tree. 2023-11-20 19:46:03 +00:00
Huibean 530b72972d Add frame window monitor display index compare with saved dialog and centre it if display changed which caused dialog disapper 2023-11-20 19:43:34 +00:00
Alex Shvartzkop 4defa6b58f Reduce editing timeout in 3D viewer raytracing. 2023-11-20 21:57:43 +03:00
Jeff Young 6732f35a52 Fix bad positioning for padded bitmap badges.
Also fixes an off-by-one error (because generally speaking it's
better to avoid writing off the end of an array).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15784
2023-11-20 18:14:54 +00:00
Jeff Young 196e05bc51 Borrow parts of simulator's separator-detection algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15248
2023-11-20 13:47:24 +00:00
Jeff Young 2ec3cd91fa Nullptr safety. 2023-11-20 13:47:24 +00:00
jean-pierre charras ed1924b975 Pcbnew, place menu: some enhancements:
- move place dimensions to a sub menu (they are not frequently used, and it
reduce the size of the place menu
- add reset drill origin, similar to reset grid origin.
2023-11-20 13:23:16 +01:00
jean-pierre charras b698ddc82c Eeschema: fix typo in files-io.cpp in revert command that deletes .kicad_sch file
Fixes #16114
https://gitlab.com/kicad/code/kicad/-/issues/16114
2023-11-20 08:47:33 +01:00
snhobbs 5cf244dd90 Added a ImportSpecctraSession overload that doesn't require a PCB_EDIT_FRAME 2023-11-20 03:06:27 +00:00
Jeff Young d620cb8a6e Only bump default grid thickness on Mac. 2023-11-19 23:43:42 +00:00
Jeff Young e73048bf98 Only set modified if it's an old file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16113
2023-11-19 23:36:36 +00:00
jean-pierre charras 734e0ca006 Kicad PROJECT_ARCHIVER: do not store twice files with extension .gm?
Files with extension .g?? and .gm? were stored in zip archive. but
*.gm? files also matches .g?? files so they were stored twice.
2023-11-19 19:54:58 +01:00
Wayne Stambaugh a309e24132 Don't copy hidden files and folders when creating project from template.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16093
2023-11-19 10:48:29 -05:00
Jeff Young c518041f9b Collapse drawing tools to a single re-entrancy guard.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16112
2023-11-19 14:17:48 +00:00
Jeff Young af9fc5be2f Hack to keep 3D Viewer's "home" zoom from being too small. 2023-11-19 14:07:50 +00:00
Jeff Young f9530d0b3f Remove "Reset View", which does the same as "Home View".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16115
2023-11-19 14:07:50 +00:00
Alex Shvartzkop 8dfad68d69 ADDED: option to optimize exported STEP files (disable pcurves) 2023-11-19 15:23:17 +03:00
Alex Shvartzkop 1321c8c6af STEP export: fix an issue when cutting circular holes in zones. 2023-11-19 14:04:31 +03:00
Jeff Young 37b6cd1714 Set modified flag when loading old s-expr files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16113
2023-11-18 20:27:24 +00:00
jean-pierre charras 7fd9226bec Fix issue in CalcArcCenter( VECTOR2D& aStart, VECTOR2D& aMid, VECTOR2D& aEnd )
It happens when the segment (aStart, aMid) is horizontal
Probably also when the segment (aEnd, aMid) is horizontal
Slopes with value 0.0 are set to double:: epsilon(), but it was a too small values
generating broken calculations.
Now set to 1e-10 (it seems working).
Fixes #16089
https://gitlab.com/kicad/code/kicad/-/issues/16089
2023-11-18 20:08:26 +01:00
Wayne Stambaugh 930b695b9f Board editor array dialog fixes. 2023-11-18 13:21:13 -05:00
Wayne Stambaugh 9e1caa0d39 Fix crash when creating an array of footprint fields in board editor.
Attempting to create an array of footprint child objects other than a pad
causes the crash due to the fact that only pads where checked.  The change
now checks if any object has a footprint as a parent.  This should prevent
any future issues when new footprint child objects are added.

There was also another subtle bug fixed when more than one child object of
a footprint were selected, the array feature would make as many copies of
the footprint as selected child items.

https://gitlab.com/kicad/code/kicad/-/issues/16088
2023-11-18 11:18:18 -05:00
Jeff Young 0de966f9ce Add m_isClosing guard in an attempt to prevent KICAD-1XF. 2023-11-18 12:45:09 +00:00
Jeff Young 341124d831 Array bounds checking for KICAD-19D. 2023-11-18 12:29:56 +00:00
Jeff Young 21d53d0b86 Make sure Use-Netclasses checkbox gets set when loading dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16110
2023-11-18 12:18:45 +00:00
Alex Shvartzkop b108e7058b Fix bad outline font glyphs when ligatures apply. 2023-11-18 07:59:46 +03:00
Jeff Young 08d0a4a65e Raise default grid thickness.
Screens with high pixel densities are now more common.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11163
2023-11-17 22:49:37 +00:00
Jeff Young f098405218 Handle justification for vertical text when mirroring.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15036
2023-11-17 21:50:16 +00:00
Jeff Young afb050a67f Header for non-MacOS builds. 2023-11-17 20:29:18 +00:00
Jeff Young 95dcf54d8d New is-canvas-item highlighting. 2023-11-17 20:29:18 +00:00
Wayne Stambaugh a5c34c50d7 Use natural sorting for net inspector when sorting by net name.
wxString sorting doesn't work when sorting strings with numbers which
results in 1,10,11...2 instead of 1,2,...9,10,11.

https://gitlab.com/kicad/code/kicad/-/issues/16100
2023-11-17 15:25:07 -05:00
Jeff Young a4a946ab75 Clearer naming. 2023-11-17 18:36:33 +00:00
Jeff Young 2f3c0a608d Score LIB_TREE_NODE_UNITs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16106
2023-11-17 18:36:33 +00:00
Jeff Young 78c46e5f4e Improved clarity and comments. 2023-11-17 18:36:33 +00:00
Jon Evans fc40b48186 Don't free state images too early
SetImageList relies on the state images still being valid

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16022
2023-11-17 13:11:27 -05:00
Jon Evans aa421f036d Revert part of 6cb046a4 that is not correct 2023-11-17 13:03:32 -05:00
Wayne Stambaugh f6c99816b2 Change the bus selection behavior of the schematic net highlight tool.
[CHANGED] Bus highlight tool now supports toggling between highlighting
          only the bus objects and highlighting the bus and all of the
          bus member objects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15388
2023-11-17 07:16:12 -05:00
jean-pierre charras 342a1ec78f KIGFX::PREVIEW::DimensionLabel(): fix a compil warning: add missing cases
micrometers and cm.
2023-11-17 10:35:11 +01:00
Alex Shvartzkop 76352234e5 ADDED: Support Altium .IntLib (Integrated Library) in fp/sym library tables. 2023-11-17 07:20:18 +03:00
Johannes Pfister 4177b64c27 Add micrometre and centimetre units 2023-11-16 23:24:52 +00:00
Jon Evans b7507cbd39 Add some failure output for git versioning 2023-11-16 12:11:42 -05:00
Jon Evans 6cb046a4eb macOS: add a few more known file types
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14206
2023-11-16 12:11:42 -05:00
Jon Evans 18833ad271 Silence a warning on macOS 2023-11-16 12:11:42 -05:00
Jeff Young 7277ae93fa Close a polygon that is marked as filled before hit-testing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16096
2023-11-16 14:07:05 +00:00
jean-pierre charras ed9dd55fde DRAWING_TOOL::PlaceImportedGraphics() do not add twice items when adding to new group. 2023-11-16 12:53:00 +01:00
jean-pierre charras 83ee2ffdab Pcbnew, dialog import graphics: add tool-tips and minor cosmetic enhancements. 2023-11-16 12:50:45 +01:00
Jeff Young d110b5b518 Improve edit points rendering on Retina displays. 2023-11-16 10:30:09 +00:00
Jeff Young b218617469 Honour bounding-hull setting on closed shapes and chained segments.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16092
2023-11-16 09:07:54 +00:00
Jon Evans c8f8b2589f Update macOS application names to current standard 2023-11-15 17:36:20 -05:00
jean-pierre charras a663dd7ec4 Pcbnew, import graphics: fixes and enhancements:
- fix regression: allow grouping or not imported items
- store more settings in Pcbnew settings: all options are now stored.
- default tolerance to connect items is now 0.01 mm. 1 mm is a too big value,
and can create serious artifacts in imported outlines.
2023-11-15 20:26:05 +01:00
Jon Evans 44374c661f Database: handle more possible datatype exceptions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16090
2023-11-15 12:27:34 -05:00
Jon Evans 35edd84269 Handle non-IOE exceptions in symbol loader 2023-11-15 12:27:34 -05:00
Mike Williams 42e0f7c94e kicad-cli: wxS fix and doc string change 2023-11-15 12:21:30 -05:00
Mike Williams eb5e327086 kicad-cli: support * wildcard in BOM export
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16086
2023-11-15 10:44:17 -05:00
Mike Williams 5734a55515 kicad-cli: correctly label non-existent fields
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16085
2023-11-15 10:44:17 -05:00
Jon Evans 0422d2e70f macOS: flatten symlinks from paths in GetExecutablePath
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14430
2023-11-15 09:25:49 -05:00
Jeff Young d54e5b180b Use sheetname for single-sheet plotting to PDF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14974
2023-11-15 11:07:05 +00:00
Jeff Young 9bb6b11c1d Separate fields from text items in FPEdit's Defaults panel.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15135
2023-11-15 10:56:14 +00:00
Jon Evans 0dea03654b CLI: schematic path needs to be made absolute along with project path 2023-11-14 11:55:51 -05:00
Jan Wichmann b1a044e22a pcbnew: ADDED new feature "Center on FP" in the dialog "Edit Text and Graphic Properties" 2023-11-14 16:35:01 +00:00
Jeff Young 298b309ebe Handle mirroring for multiple selections containing text or labels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15936
2023-11-14 15:53:53 +00:00
Jeff Young ca8cb5a206 Fix typo.
We want recursion into descendants here.  Alternatively we could
change the caller to RunOnDescendents(), but it seemed cleaner to
omit the scoping of the Stage() call....

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16077
2023-11-14 14:23:23 +00:00
Marek Roszko 34a51d3c21 Make wxPython work under run from build directory on macOS 2023-11-14 07:14:13 -05:00
Marek Roszko e5f1cfd2b2 Set PYTHONPATH internally for macOS run from build dir 2023-11-13 23:09:12 -05:00
Marek Roszko 53a90ccb88 Enable macOS builds to run from build directory.... 2023-11-13 20:23:59 -05:00
Marek Roszko 0054b64143 Fix warning due to NONE enum member mixing 2023-11-13 20:23:59 -05:00
Ian McInerney 1900000371 Fix temporary variable type in schematic parser
The internal page info was switched to double in d8be69c3c1
but it was being rounded improperly to int on reading.
2023-11-13 22:52:12 +00:00
Jeff Young cd05acac34 Use pageSettings & titleBlock export flags when drawing new sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9285
2023-11-13 20:30:57 +00:00
jean-pierre charras e3bbe32793 drc_test_provider_library_parity: Better algo to compare footprint graphics
Instead of changing the footprint in test to have a non flipped, non rotated
fp, change the footprint template from library to have the same transform.
It reduce problems like rounding and graphic shape convert for rectangles.
Fixes #16075
https://gitlab.com/kicad/code/kicad/-/issues/16075
2023-11-13 18:38:30 +01:00
jean-pierre charras f6314e6401 FOOTPRINT::cmp_drawings(): fix a incorrect sort criteria for polygons:
for polygons, GetStart() and GetEnd() have no meaning and cannotbe used
for sorting.
2023-11-13 18:36:00 +01:00
Jeff Young 752d2d5295 Filter must return true for libraries.
Also fixes a bug where a single symbol library wasn't expanded
due to the presence of the "-- already placed --" and
"-- recently used --" pseudo-libraries.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16074
2023-11-13 17:18:15 +00:00
Jeff Young 229bcc7308 Cleanup. 2023-11-13 17:18:15 +00:00
jean-pierre charras d5a5d25623 rework on commit b564d0713c: better fix 2023-11-13 11:16:21 +01:00
Jeff Young f25a06b2a5 More globals eradication.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16031
2023-11-12 23:43:30 +00:00
Ian McInerney e5f688e865 Plot footprint edgecuts in PDF drill map file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15247
2023-11-12 23:21:46 +00:00
Zhuang Jiezhi 9b8fa85b32 feat:Add python API GetKicadCurrentLanguage 2023-11-12 22:52:54 +00:00
Ian McInerney e72f563033 Fix capitalization of program name in PCM 2023-11-12 20:45:19 +00:00
Ian McInerney b2cc4b8310 Warn when installing PCM local package that is incompatible
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14243
2023-11-12 20:42:45 +00:00
jean-pierre charras b564d0713c DRC: fix one of some things that can create false positive.
in bool shapeNeedsUpdate(), if a shape is a rectangle and the other is a polygon,
we need to try to convert the polygon to a rectangle for comparison, because some
transforms ( and especially PCB_SHAPE::Normalize() ) can convert a polygon to a rectangle
So a poly and a rectangle can be in fact the same shape

Partial fix of bug 16075.
2023-11-12 20:19:09 +01:00
Jeff Young 9f0d409982 Missing files from last commit. 2023-11-12 14:33:47 +00:00
Jeff Young 2e311f59a8 Regression test for variable resolution in complex hierarchies. 2023-11-12 14:30:47 +00:00
Jeff Young 03953e80fc Enforce SCH_SHEET_PATH processing in (yet) more places.
Also fixes a bug where ERC testing for text variables in sheet pins
would start with the wrong sheet.

Also fixes a bug where ERC testing of similar labels would use the
wrong sheet.

Also fixes a bug where ERC testing of bus-to-net conflicts would use
the wrong sheet.

Also fixes a bug where ERC didn't process variable references when
checking hierarchical labels against sheet pins.

Also fixes a bug where ERC multiple-drivers and netclass-conflicts
tests didn't set a sheetpath.
2023-11-12 14:15:04 +00:00
Alex Shvartzkop 05e954ad5d Fixes for length tuning patterns. 2023-11-12 12:17:08 +03:00
Alex Shvartzkop bcde7c59c9 Fix text color updates and flickering in STATUS_MIN_MAX_POPUP. 2023-11-12 11:28:07 +03:00
Alex Shvartzkop f5b143c4a1 Double-buffered status popups. 2023-11-12 11:28:07 +03:00
Alex Shvartzkop 78c7dc85f0 Fix moving tuning patterns, disable rotation. 2023-11-12 02:24:35 +03:00
Alex Shvartzkop dc9df9517d PDF plot: match mirror state between hidden and plotted text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16066

(cherry-picked from commit 31e79ef54f)
2023-11-12 01:28:03 +03:00
Jeff Young 3819b2d5e7 Enforce SCH_SHEET_PATH processing in more places.
Making assumptions about the current SCH_SHEET_PATH has caused no end
of pain.
2023-11-11 17:46:06 +00:00
jean-pierre charras abcbba5635 PCB_TEXTBOX, create 3D shape: fix incorrect transform of the box, round 2:
when the box is a polygon (rotated rect by a non cardinal angle) the polygon
is not filled, so the shape is just a set of thick segments.
So we cannot use PCB_TEXTBOX::TransformShapeToPolygon to create the 3D view
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
2023-11-11 18:11:50 +01:00
jean-pierre charras 0904231000 Partial revert of commit d8498b62e0, due to
comments in PCB_TEXTBOX::TransformShapeToPolygon()
2023-11-11 17:01:01 +01:00
jean-pierre charras d8498b62e0 PCB_TEXTBOX::TransformShapeToPolygon(): fix incorrect transform: when it
is a polygon (rotated rect by a non cardinal angle) the polygon is not
filled, so the shape is just a set of thick segments.
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
2023-11-11 16:44:04 +01:00
Jeff Young 7e46e85c7d Update copyrights. 2023-11-11 15:29:34 +00:00
Jeff Young bdead1d0b1 Use correct sheetpath when we have it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15870
2023-11-11 15:07:54 +00:00
jean-pierre charras 75e0bf0cba Python fp wizards: Add a text ("${REFERENCE}") on fab layer to a few wizards. 2023-11-11 11:19:21 +01:00
Jeff Young 3e58425671 Flip rotation angle when board view is flipped.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15954
2023-11-10 22:30:06 +00:00
Jeff Young 9ef05fb762 Don't store document values in global PROPERTY_MANAGER.
At best it leads to the wrong units being used if they're different
between (for instance) PCB Editor and Footprint Editor.  (And this
will only get worse if we ever to to a single binary.)

At worst it causes crashes when accessing freed ORIGIN_TRANSFORMS.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16062
2023-11-10 18:37:29 +00:00
Jeff Young d41f4ec842 Only disable unflashed layers when they're conditionally flashed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16061
2023-11-10 13:57:56 +00:00
Jeff Young e6081cf31a Use position of isolotaed spoke when reporting it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16058
2023-11-10 12:49:19 +00:00
Jeff Young 6417c9888f Update EDA_REORDERABLE_LIST_DIALOG to current GUI style.
Note: while we try to omit sizing info from FBP files, the list
controls assume way too wide a minimum width if they're not set.
Furthermore, sizing the dialog ends up leaving them a certain size
and clipping other elements is the dialog itself doesn't have limits
set.  Sigh.
2023-11-10 12:49:19 +00:00
jean-pierre charras 2f594e441b Fix a compil warning (shadowed variable). 2023-11-10 10:31:40 +01:00
jean-pierre charras bfa9ea66cc Demo update 2023-11-10 10:30:33 +01:00
Marek Roszko beb917e572 Bump kicad-vcpkg repo for wx 3.2.4 2023-11-09 22:44:24 -05:00
Jeff Young 6ecfc89a4a Honour originTransforms in search panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15031
2023-11-09 18:41:18 +00:00
Alex Shvartzkop 5cd1a4674f Fix a crash in 3D viewer when changing preferences.
It was possible for OnMouseMove to come after ReloadRequest
but before DoRePaint.

Which meant m_3d_render_raytracing->Reload() has't been called yet,
thus the BVH contained invalid data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16059
2023-11-09 20:52:39 +03:00
Alex Shvartzkop c95ed281b8 Update STEP export strings/comments. 2023-11-09 20:06:21 +03:00
Alex Shvartzkop 7589de6120 Optimize footprint/symbol library hover previews. 2023-11-09 19:02:10 +03:00
Jeff Young 77e408a93d De-bounce search pane selection events.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15605
2023-11-09 14:43:39 +00:00
Seth Hillbrand fe46fafa98 Add regression test for previous hier label issue 2023-11-09 06:20:52 -08:00
Alex Shvartzkop f8095fd31a Optimize CADSTAR library parsing.
-60% loading time.
2023-11-09 17:12:39 +03:00
Jeff Young cc721c4907 Improve encapsulation of group internals.
(It's still leaking into BOARD_COMMIT and some other places, but at
least it no longer leaks into all the edit tools.)

Also fixes some bugs when moving/copying/pasting multiple selections
containing length-tuning patterns.
2023-11-09 14:05:35 +00:00
Jeff Young 78e00ade7a Clearer naming. 2023-11-09 14:05:35 +00:00
jean-pierre charras b2c33ed6b2 Demo update 2023-11-09 08:57:35 +01:00
Alex Shvartzkop b596568ce4 Use utf8. Partially reverts e35174d64b 2023-11-09 02:12:10 +03:00
Alex Shvartzkop e35174d64b Use buffered file io; use fn_str() more. 2023-11-09 01:24:54 +03:00
Alex Shvartzkop 5ccdb75091 Use CheckFileHeader in CADSTAR_SCH_ARCHIVE_PLUGIN::CanReadLibrary 2023-11-09 01:24:54 +03:00
Roberto Fernandez Bautista 09f1df6c94 CADSTAR Parts: Add QA test for +N0 root with no parts 2023-11-08 22:53:14 +01:00
Ian McInerney dd933b7d0e Update CERN copyrights 2023-11-08 21:34:14 +00:00
Alex Shvartzkop d016f596f5 Add CADSTAR_SCH_ARCHIVE_PLUGIN::CanReadLibrary 2023-11-08 23:37:38 +03:00
Alex Shvartzkop 819c0f2082 CADSTAR: fix arcs in symbol libraries. 2023-11-08 23:29:27 +03:00
Alex Shvartzkop 62d735d710 CADSTAR: fix hierarchy grammar for some part libraries. 2023-11-08 22:31:07 +03:00
Alex Shvartzkop 37a56472b7 CADSTAR: use eolf for attributes in parts lib grammar. 2023-11-08 21:27:19 +03:00
Alex Shvartzkop f1a4c9ce5b CADSTAR: update parts lib grammar to support ')' in attributes. 2023-11-08 20:08:11 +03:00
Jeff Young a003515ee7 Enable drill/place file origin for plotting PDF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15834
2023-11-08 16:40:28 +00:00
Jeff Young 72c985bc07 Rewrite scoring algo again. (Third time's the charm?)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16042
2023-11-08 12:33:09 +00:00
Jeff Young a846e0219b Improve comment. 2023-11-08 12:33:09 +00:00
jean-pierre charras 72ce955066 Gerbview: fix some issues related to comments and primitives in macros:
- comments on more than one line were not fully skipped, creating read errors
- in macros, some primitives (not all) were incorrectly rotated: they must be
rotated around the aperture macro origin, not the primitive origin.
- a new test file with rotated primitives in macros is added.
Fixes #16049
https://gitlab.com/kicad/code/kicad/-/issues/16049
2023-11-08 10:45:13 +01:00
Alex Shvartzkop 7abe2e3ea0 Restore clearance cache usage in PNS::NODE::NearestObstacle.
This (and the other commit) restores router performance to pre-7.0.3 levels.

(cherry-picked from commit 5e93814283)
2023-11-07 23:25:53 +03:00
Seneral 55c44966d9 Added a temporary item cache to improve router performance
Some items only used within algorithms were never cached
Because they are hard to manually clean up
But caching them does help the algorithms a lot
So this solution is the best I can think of

(cherry picked from commit d29c07a663)
2023-11-07 23:23:52 +03:00
Alex Shvartzkop c048635484 Use v6 code to read arcs from legacy symbols libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16048
2023-11-07 23:10:38 +03:00
Jeff Young 53cb63c173 Save text angle and justification settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16043
2023-11-07 15:47:00 +00:00
Jeff Young 6d74cc031e Refine Scintilla margin recognition.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16044
2023-11-07 15:02:49 +00:00
Jeff Young 6d43ef5678 Don't specify sizes when we don't need to.
However, in some places we *do* have to because otherwise wxWidgets
will pick a minimum size for us (and it's rather large).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16039
2023-11-07 14:53:41 +00:00
Jeff Young abda3c0d33 Handle various keepout flags independently.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16037
2023-11-07 11:57:23 +00:00
Marek Roszko 23676eb988 Ensure output directory exists for drill files cli export 2023-11-06 21:11:35 -05:00
Jeff Young 5f6dab931a Save order of all-layers in Plot Dialog.
Also adds an all-layers-specific context menu which includes an item
to sort in board-stackup order.
2023-11-06 19:56:42 +00:00
jean-pierre charras 1bbe532021 Kicad Manager, project tree: use net file icon for spice netlist (.cir) files
Fixes #15777
https://gitlab.com/kicad/code/kicad/-/issues/15777
2023-11-06 18:53:10 +01:00
jean-pierre charras 249b2e740e Demo update 2023-11-06 16:02:15 +01:00
Alex Shvartzkop a39f0c2c2f QA: update track cleaner expected value. 2023-11-06 17:43:52 +03:00
Alex Shvartzkop a6b517147e QA: update Tracks.pretty 2023-11-06 17:16:16 +03:00
Jeff Young 7788c8f21c Fix textbox mirroring and rotation (again).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15576

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14178
2023-11-06 14:03:58 +00:00
Alex Shvartzkop 6c21e0607b Use wxFileName::Mkdir instead of wxMkDir.
wxMkDir is a CRT wrapper that doesn't actually return bool.
2023-11-06 17:02:34 +03:00
Alex Shvartzkop 648b4a7689 TransformOvalToPolygon: make segments align at 45 deg angles. 2023-11-06 14:50:40 +03:00
Jeff Young 24ca7add42 Don't clamp arc centers quite so aggressively.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16029
2023-11-06 00:45:19 +00:00
Jeff Young c5520b3eef Save state of as-item-checkboxes checkbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13749
2023-11-05 16:22:20 +00:00
Jeff Young 1b6048b6d5 Handle non-binary font weights.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14502
2023-11-05 14:21:13 +00:00
jean-pierre charras d90981d981 Pcbnew: fix Swap command that improperly rotates footprints when flipping.
Fixes #16025
https://gitlab.com/kicad/code/kicad/-/issues/16025
2023-11-05 15:09:48 +01:00
Wayne Stambaugh d34e6636d0 Dialog layout fixes. 2023-11-05 08:09:51 -05:00
jean-pierre charras c53b318759 Eeschema, plot schematic: fix incorrect rotation of symbol text in textboxes.
Happened with rotated symbols.
Fixes #16027
https://gitlab.com/kicad/code/kicad/-/issues/16027
2023-11-05 14:04:28 +01:00
Jeff Young f83d60a48f Clean up autosave files when reverting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15998
2023-11-05 12:20:31 +00:00
jean-pierre charras 88a4979fff Eeschema, print schematic: resolve text variables in symbol graphic text.
Variables in graphic text (body item) were resolved in plot, but not in print function.
Fixes #16026
https://gitlab.com/kicad/code/kicad/-/issues/16026
2023-11-05 11:41:02 +01:00
jean-pierre charras b3893aed3d pcb_calculator: use usual (not scientific) notation when numbers are not very small.
Values >= 0.001 are more readable than values >= 1e-3
2023-11-05 07:28:20 +01:00
Jeff Young 1df5d9c48c Make sure to add enough wiggle room when MaxError is very large.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16024
2023-11-04 23:11:51 +00:00
Wayne Stambaugh 19e309d2d2 Dialog layout and coding policy fixes. 2023-11-04 13:57:31 -04:00
Jeff Young 32806a3b8b Make sure plot tab gets its SpicePlotName updated.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16013
2023-11-04 15:45:08 +00:00
Jeff Young 1c746f0134 Correctly parse fft commands with linearize in them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16011
2023-11-04 15:45:08 +00:00
Jeff Young b6e1387e18 Don't overwrite linearize command with fft command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16011
2023-11-04 15:45:08 +00:00
Alex Shvartzkop b2825663be Fix SCH_SHAPE rotation direction. 2023-11-04 17:10:26 +03:00
Alex Shvartzkop 48855ebe40 Graphics import: support open polygons. 2023-11-04 17:10:26 +03:00
Jeff Young 23063fa976 Now that we allow open-text netclass references we need to ERC check them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12442
2023-11-04 13:59:28 +00:00
Alex Shvartzkop 98d59f99ab EasyEDA Pro: Fix SVG mirrored SVG images in schematic. 2023-11-04 15:21:22 +03:00
Alex Shvartzkop 8752f75ef9 EasyEDA Std: COPPERAREA parsing failsafe.
Fixes KICAD-41Q
2023-11-04 13:55:29 +03:00
Jeff Young 97185ba90c Run properties action from double-click in SCH search pane.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16013
2023-11-03 18:54:29 +00:00
Jeff Young f7d899a0fb Don't accept random values; use the popup to change to a known alternate
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16021
2023-11-03 18:48:30 +00:00
Jeff Young ac172b944a Don't get stuck cycling through invisible layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16019
2023-11-03 18:17:36 +00:00
Jeff Young bc99b42c08 ADDED: put Renumber Pads in the edit menu.
Context-menu-only is too hidden.
2023-11-03 12:36:30 +00:00
Jeff Young db46b6f925 Show selection before opening menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15922
2023-11-03 12:36:30 +00:00
Jeff Young 141b953d12 Show selection before opening menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15922
2023-11-03 12:36:30 +00:00
jean-pierre charras a6f9174c0c legacy library import: fix compatibility with some old symbol libraries (*.lib files). 2023-11-03 12:48:34 +01:00
Jeff Young 92ae0f4793 Save Footprint chooser size and location.
(We're using a FRAME to mimic a dialog, so we need some of the
DIALOG_SHIM logic inside it.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15807
2023-11-03 10:34:27 +00:00
Jeff Young 50ff5e616f Don't delete text when cancelling changes.
Also changes margins of compile button so it correctly lines up at
the top of the error window.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16002
2023-11-02 18:37:55 +00:00
Jeff Young b4602616c2 Hack around wxWidgets bug that draws two pages over each other.
Also improves spacing in some of the pages.
2023-11-02 18:37:55 +00:00
Wayne Stambaugh 91b503f875 Minor dialog layout fixes. 2023-11-02 09:37:44 -04:00
Jon Evans 1b4e77d53c Fix another gcc 11 compile error 2023-11-01 20:49:08 -04:00
Jeff Young 7f8e397dfb Behave (or assert) when source or target are null or dirty. 2023-11-01 17:11:42 +00:00
Jon Evans 85f720e940 Rewrite number string, dont' append to it 2023-11-01 12:18:37 -04:00
Mark Roszko 2b3ad808ea Add the BTI C hint to libcontext arm64 2023-11-01 15:53:11 +00:00
jean-pierre charras 909619c8cc pcb_calculator, MICROSTRIP::calcSynthesize(): fix incorrect init of a variable
It was initialized before other calculations, thus using a bad value.
2023-11-01 15:41:01 +01:00
Jeff Young 2ce4adc739 Check physical_clearance rules in the router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16007
2023-11-01 14:13:16 +00:00
Jeff Young fb59f83683 Clean up references in RN_NETs when garbage collecting CN_ITEMs. 2023-11-01 13:53:30 +00:00
Jeff Young d93bb464bf When garbage collecting locally we also need to clear global references. 2023-11-01 12:47:54 +00:00
Jon Evans bc42546609 Try harder to save schematic properties panel width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15957
2023-11-01 08:42:06 -04:00
Jon Evans 81818cfb1e Fix refnum handling in reannotation 2023-11-01 08:26:48 -04:00
jean-pierre charras 248a8caa45 Demos update 2023-11-01 10:15:11 +01:00
Jon Evans ab4d9bcb14 Fix sloppy path handling in migration for old color settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15964
2023-10-31 23:38:44 -04:00
Jon Evans c6c808a7fa Support system-installed color themes
Install to ${KICAD_DATA}/colors/

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15920
2023-10-31 23:05:08 -04:00
Jon Evans 9271fde71d Preserve leading zeroes in reference designators
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15760
2023-10-31 22:51:45 -04:00
Jon Evans d6b76ae9df Net navigator: Unescape net names 2023-10-31 22:19:48 -04:00
Jon Evans e14e7e0bd9 Enforce symbol name not being empty
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15859
2023-10-31 22:11:46 -04:00
Jon Evans 24e613f60c Escape net names coming from aliases
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15212
2023-10-31 22:06:21 -04:00
Jeff Young 67d8b13b02 And Font to properties manager for EDA_TEXT items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16004
2023-11-01 00:39:42 +00:00
Jon Evans 5d5682a225 Fix missing wxRB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15990
2023-10-31 20:15:40 -04:00
Jeff Young 972308b24b Assign textBox to correct unit & conversion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15994
2023-10-31 23:20:59 +00:00
Jeff Young 64c692a42e Allow a:b to represent either lib:item_name or key:value.
Also changes the scoring algorithm to start at 0 and then increment
to 1 (the value that tells us to show, but not expand) only if the
search terms and lib filters are empty.
2023-10-31 23:20:59 +00:00
Seth Hillbrand de0736863b Allow multiple strong drivers with same name
Multiple labels with the same name are allowed (and expected) so ensure
that we use a structure that allows duplicate names
2023-10-31 11:52:29 -07:00
Jon Evans 1a7cc88b97 Add (failing) QA test for #16003
Also remove old test_netlists.cpp that should have been removed long ago
2023-10-31 12:57:14 -04:00
jean-pierre charras d8be69c3c1 PAGE_INFO: use double instead of int to store the page size.
For historical reasons, they are stored in mils, but using int create rounding
issues when converting to/from mils to IU in dialogs.
This is a minor but annoying issue.
Fixes #16000
https://gitlab.com/kicad/code/kicad/-/issues/16000
2023-10-31 13:47:32 +01:00
Jeff Young 19ca7cedaa Better test reporting.
(This make it clear in the failure message which is the expected
value and which is the actual value.)
2023-10-31 12:10:21 +00:00
Jeff Young e7fca68384 Don't double-delete unused nets (or anything else, for that matter).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15979
2023-10-31 12:10:21 +00:00
Alex Shvartzkop 3d5721a217 Fix some warnings. 2023-10-31 04:25:19 +03:00
Jon Evans 3faf3ea27c Fix ambiguous overload error in gcc 11 2023-10-30 20:59:25 -04:00
Alex Shvartzkop 2aa67ae1af EasyEDA Std: Support image transformations; SVG images in schematic. 2023-10-31 02:21:32 +03:00
Alex Shvartzkop e24c8de4b8 EasyEDA Std: Fix open polygon shapes in symbols. 2023-10-31 02:21:32 +03:00
Alex Shvartzkop f48a248db4 EasyEDA Std: Handle HTML escape characters in text. 2023-10-31 02:21:32 +03:00
Marek Roszko d0b26ae600 Add a hack to avoid spamming sentry events due to recursive asserts 2023-10-30 19:03:54 -04:00
Jeff Young b5d904b45d Ignore VVIAs when assembling length-tuning line.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15995
2023-10-30 19:55:51 +00:00
Jeff Young 42d9bc4a98 Hook up Import Settings to tuning patterns and custom rules.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15980
2023-10-30 18:12:42 +00:00
Jeff Young 87571ed8b8 Not all font sizes, fill properties or color properties are the same. 2023-10-30 17:30:15 +00:00
Seth Hillbrand 30d0a68aeb Update translations 2023-10-30 09:45:10 -07:00
Wellington Terumi Uemura 98e879eb2c Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (9123 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-10-30 17:42:06 +01:00
Mert Gülsoy e5376f9291 Translated using Weblate (Turkish)
Currently translated at 51.9% (4740 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-10-30 17:42:05 +01:00
ZbeeGin f57b0301e4 Translated using Weblate (Polish)
Currently translated at 100.0% (9125 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-10-30 17:42:05 +01:00
Arend-Jan van Hilten 9c7efcd03c Translated using Weblate (Dutch)
Currently translated at 70.3% (6334 of 9005 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-10-30 17:42:05 +01:00
Toni Laiho 095d27eec6 Translated using Weblate (Finnish)
Currently translated at 99.9% (9123 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-10-30 17:42:05 +01:00
Wellington Terumi Uemura f454ea93ed Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.0% (8943 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-10-30 17:42:05 +01:00
dsa-t e6e132c82a Translated using Weblate (Russian)
Currently translated at 83.1% (7584 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-10-30 17:42:05 +01:00
ZbeeGin 1046ac3328 Translated using Weblate (Polish)
Currently translated at 96.8% (8842 of 9125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-10-30 17:42:05 +01:00
김랑기 d40d6ba07b Translated using Weblate (Korean)
Currently translated at 88.4% (7764 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-10-30 17:42:05 +01:00
ZbeeGin e5e09fba63 Translated using Weblate (Polish)
Currently translated at 100.0% (8781 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-10-30 17:42:05 +01:00
Tokita, Hiroshi 11ba7114d1 Translated using Weblate (Japanese)
Currently translated at 93.5% (8212 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-10-30 17:42:05 +01:00
Rafael Serrano de6e2b2ba3 Translated using Weblate (Catalan)
Currently translated at 50.4% (4431 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2023-10-30 17:42:05 +01:00
Ivan Chuba 226f9dbae1 Translated using Weblate (Ukrainian)
Currently translated at 88.8% (7804 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-10-30 17:42:05 +01:00
rtyuionoop fe3d926f9e Translated using Weblate (Vietnamese)
Currently translated at 12.9% (1137 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-10-30 17:42:05 +01:00
Tokita, Hiroshi 0d1c7d32f1 Translated using Weblate (Japanese)
Currently translated at 93.0% (8174 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-10-30 17:42:05 +01:00
Radek K c656ba593b Translated using Weblate (Czech)
Currently translated at 82.7% (7268 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-10-30 17:42:04 +01:00
Jan Straka d377c57429 Translated using Weblate (Czech)
Currently translated at 82.7% (7268 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-10-30 17:42:04 +01:00
Tokita, Hiroshi fb42a03b84 Translated using Weblate (Japanese)
Currently translated at 92.3% (8108 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-10-30 17:42:04 +01:00
Luc adb87b1bf8 Translated using Weblate (German)
Currently translated at 89.5% (7861 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-10-30 17:42:04 +01:00
Tokita, Hiroshi ba7d7fd488 Translated using Weblate (Japanese)
Currently translated at 92.2% (8103 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-10-30 17:42:04 +01:00
Marine Biologist 2f89a66d8f Translated using Weblate (Turkish)
Currently translated at 53.7% (4718 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-10-30 17:42:04 +01:00
Ivan Chuba 29eafdf05c Translated using Weblate (Ukrainian)
Currently translated at 88.7% (7789 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-10-30 17:42:04 +01:00
Henrik Kauhanen 4da87319a3 Translated using Weblate (Swedish)
Currently translated at 99.5% (8743 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-10-30 17:42:04 +01:00
Wellington Terumi Uemura a4f6f17a64 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8781 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-10-30 17:42:04 +01:00
dsa-t dea233c6e9 Translated using Weblate (Russian)
Currently translated at 86.3% (7581 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-10-30 17:42:04 +01:00
Tokita, Hiroshi 1a0237ac36 Translated using Weblate (Japanese)
Currently translated at 92.2% (8099 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-10-30 17:42:04 +01:00
Jonathan Haas db487be843 Translated using Weblate (German)
Currently translated at 89.5% (7860 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-10-30 17:42:03 +01:00
Wellington Terumi Uemura 1a9522d9cd Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (8780 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-10-30 17:42:03 +01:00
ZbeeGin a57cb78cb5 Translated using Weblate (Polish)
Currently translated at 100.0% (8781 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-10-30 17:42:03 +01:00
Toni Laiho 8295a9637b Translated using Weblate (Finnish)
Currently translated at 99.9% (8780 of 8781 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-10-30 17:42:03 +01:00
Wayne Stambaugh 6183a1e4de Coverity warning fixes. 2023-10-30 09:16:24 -04:00
Jeff Young 7959c841fd Move vertical alignment icons out of text-box-only section.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15988
2023-10-30 12:33:23 +00:00
Jeff Young 1f7ac0834c EEschema currently supports only normal vs bold for text thickness.
https://forum.kicad.info/t/font-width-bug-in-schematic-editor/45871
2023-10-30 12:09:43 +00:00
jean-pierre charras 0f2beed54a LIB_TREE: use GetAssociatedDocument() to display the doc from a wxHtmlLinkEvent
One cannot always use the string given in the wxHtmlLinkEvent without expanding
Env Vars.
Fixes #15984
https://gitlab.com/kicad/code/kicad/-/issues/15984
2023-10-30 11:27:08 +01:00
Alex Shvartzkop 4b083fc342 EasyEDA Pro: support SVG images in schematic; support bitmap rotation/flip. 2023-10-30 11:34:42 +03:00
Alex Shvartzkop 847ab093c8 ADDED: Project chooser dialog for EasyEDA Pro import. 2023-10-30 09:35:27 +03:00
Jon Evans 1b9062bd9f QA: show violation info before failing DRC regressions 2023-10-30 00:16:58 -04:00
jean-pierre charras 06581c964b PROJECT_TREE_ITEM::Rename() make test for extension case insensitive.
File types are not case sensitive.
2023-10-29 20:04:45 +01:00
Seth Hillbrand 6633eadfc8 Enclose wxCHECK* macros in braces
The macros are if/else statements without enclosing structures which
leads to unexpected evaluation when expanding in an existing conditional
that does not have braces already.
2023-10-29 10:52:05 -07:00
Seth Hillbrand 6d957e9d65 Don't use KiROUND when we should trunc
When calculating the viewport extents, we only need the maximum size
that can be represented.  Anything larger should be truncated.  We do
this in many other places (wx_view_controls, ruler_item,
ds_proxy_view_item, etc) and this brings pcb_selection_tool into
alignment with this, avoiding an unneeded warning message

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15529
2023-10-29 10:42:33 -07:00
jean-pierre charras e334f11f12 kicad manager: fix broken Rename file command. 2023-10-29 18:34:28 +01:00
Jeff Young fc0017fc95 Normalize rects higher up.
We don't want to normalize footprint children to their board-relative
coordinates.
2023-10-29 11:45:16 +00:00
jean-pierre charras acda18465c DIALOG_EXPORT_STEP: fix missing init of m_outputFileName widget at opening.
Add also a validity test for the filename.
2023-10-29 10:20:51 +01:00
jean-pierre charras 7628879190 kicad manager: disable a printf used for debug. 2023-10-29 07:09:10 +01:00
Jeff Young 14d6ff8946 Change Save Symbol As... to Save Symbol Copy As...
See details in the bug report.  (It's very complicated.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12504
2023-10-28 22:25:48 +01:00
Jeff Young 72c44d7fa3 SaveAs must actually change the name of the document.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14281
2023-10-28 22:09:29 +01:00
Jeff Young 84d42a2669 Normalize rectangles after rotation/flipping.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14341
2023-10-28 20:55:46 +01:00
Jon Evans fea29624cd Update comment 2023-10-28 15:37:19 -04:00
Wayne Stambaugh bfd3e71a88 Don't show integer overflow errors in release builds.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15529
2023-10-28 15:06:32 -04:00
Wayne Stambaugh 84f58f36d4 Coding policy fixes. 2023-10-28 14:45:44 -04:00
Wayne Stambaugh 2f19112212 Revert fix for false positive Coverity warning. 2023-10-28 14:34:21 -04:00
Wayne Stambaugh 30ba1b8007 Coverity warning fix.
This fixes all of the warnings cause by using std::weak_ptr objects when
recursing the symbol inheritance tree to retrieve the root symbol.  The
issue is that the weak pointers are not guaranteed to be valid for each
recursion because the lock will go out of scope.  Using a std::shared_ptr
object will ensure the lock is valid until it goes out of scope.
2023-10-28 13:25:30 -04:00
Jeff Young f6dc67dc3b Honour platform standards on MSW for files beginning with '.'.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14221
2023-10-28 18:24:25 +01:00
Jeff Young 0747d35228 Minor formatting fixes. 2023-10-28 17:58:33 +01:00
Jeff Young a2f19ea6bb Push m_forceMarkObstaclesMode down into the DRAGGER.
The existing flag was never read anyway, and it's only the DRAGGER
that knows that the starting state is already colliding and that we
need to force mark-obstacles mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8641
2023-10-28 17:52:15 +01:00
Jeff Young 708b42ea69 Fix off-by-one error when creating user-defined signals.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15970
2023-10-28 13:27:48 +01:00
Jeff Young c1f01877a8 Improve length calculation for vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10690
2023-10-28 13:14:21 +01:00
Jeff Young 4df5f9969a Remove unnecessarily restrictive IsCopper() checks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11588
2023-10-28 12:12:34 +01:00
Jeff Young 6c6a7cf862 Provide a callback for supplying file filters just-in-time.
This allows us to make them dependent on the current plugin type in
the fp lib table.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13959
2023-10-28 11:18:17 +01:00
Ian McInerney 171458a27b Introduce action friendly names
Friendly names can be used to display action information that is clearer
in non-hierarchical contexts (e.g. not in menus).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8075
2023-10-27 23:58:29 +01:00
Ian McInerney 324028bbf3 Update license readme list 2023-10-27 23:58:29 +01:00
Ian McInerney 9f21d0d719 Don't hardcode units for length/height/width in properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15967
2023-10-27 23:58:29 +01:00
Seth Hillbrand 1c847889e7 Use deprecated GIT defines
Older Ubuntus/Debians use libgit2 that does not support the new defines.
Newer libgit2 provides a name define translation
2023-10-27 14:59:15 -07:00
Zhuang Jiezhi 61d03b41ec Eeschema: Fix crash of modifying graphic item and abort with ESC by adding re-entrancy guards 2023-10-27 21:19:31 +00:00
Wayne Stambaugh 6269453416 Coverity warning fixes. 2023-10-27 16:48:14 -04:00
Seth Hillbrand 8b3ac31646 Update GenCAD export to handle arbitrary outline
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15961
2023-10-27 12:46:37 -07:00
jean-pierre charras 0345e0f75c export gencad: clean and update old code. Should not really change the export.
- code refactory.
- allows export to be done from kicad-cli (kicad-cli code is not yet updated)
Need more work.
2023-10-27 20:03:12 +02:00
Jon Evans a9ccb0f11e Avoid crash if events happen out of order on project manager start 2023-10-27 12:55:35 -04:00
Jeff Young 6b29c346b9 When presented with empty text we don't want to Normalize() the SIM_VALUE.
But we *do* need to update NUMERICAL_EVALUATOR::m_originalText by
calling NUMERICAL_EVALUATOR::Process().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15871
2023-10-27 16:59:28 +01:00
Jeff Young 8cba785375 Single warning for all locked sheets when saving schematic.
Also checks for modified before trying to save at all.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15963
2023-10-27 14:58:30 +01:00
Jeff Young 3651cad7fd Don't fire events when going back to original text in onSetFocus().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15851
2023-10-27 14:58:30 +01:00
Ian McInerney d78d4830e4 Always output test failures when they happen
With CMake 3.17+, we can specify arguments for ctest to use when run, so
always specify output-on-failure to always show the failed test output.
2023-10-27 13:19:53 +01:00
jean-pierre charras 4d593aa21e PG_CELL_RENDERER, PGPROPERTY_COLOR4D: clear DC before drawing the color swatch.
Otherwise the previous background can be displayed on the not redrawn area.
Fixes #15955
https://gitlab.com/kicad/code/kicad/-/issues/15955
2023-10-27 08:54:38 +02:00
jean-pierre charras 06074d9192 Simulator, plot panel: Honor dragging in Y direction.
Fixes #15914
https://gitlab.com/kicad/code/kicad/-/issues/15914
2023-10-27 08:13:44 +02:00
Wayne Stambaugh 98cae68ea5 Fix pad properties dialog control updating.
This fixes an issue (at least on GTK builds) where the hidden controls
that change when selecting a different pad type and or pad shape get
shown are not laid out correctly.
2023-10-26 13:36:32 -04:00
Seth Hillbrand 1290cf6241 Fix missing random sim command
(cherry picked from commit 3ce4a5bf7f)
2023-10-26 09:47:43 -07:00
jean-pierre charras 93b5038382 FOOTPRINT_EDIT_FRAME: ensure the canvas type comes from the FOOTPRINT_EDITOR_SETTINGS config
Previously, although the fp editor preferences has an option to select the canvas type,
it was read from the the PCBNEW_SETTINGS config, using Kiface().KifaceSettings().
2023-10-26 17:58:33 +02:00
Jeff Young ca9fdbbedb Use a slower method of keeping dangling state correct for current sheet.
(The faster method ran into unit test failures.  There must be
something in here that's order-specific.)
2023-10-26 15:22:15 +01:00
Jeff Young e222f40696 Don't double-up the root sheet in CurrentSheet in test harness. 2023-10-26 15:00:00 +01:00
Jeff Young 8d3a3419f8 Honour 90-degree router mode in a few more places.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10421
2023-10-26 14:18:28 +01:00
Jeff Young 84b0848a1e Make sure that current sheet's units and dangling states are correct.
We used to store the symbol units of the current sheet and then
restore them, but we didn't handle the dangling states.

The new code uses a different strategy and just makes sure that if
any of the sheets are going to modify the current screen, the current
sheet gets to go last so that its modifications will "stick".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15392
2023-10-26 13:07:16 +01:00
Jeff Young f7420bc820 Separate Footprint Editor's sketch modes from PCB Editor's.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15345
2023-10-26 10:59:26 +01:00
Jeff Young 7bd6c9d623 Fix sloppy coding. 2023-10-26 10:43:21 +01:00
Jeff Young 2746626de0 Differentiate plane and signal clearances based on layer type.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15597
2023-10-25 22:24:19 +01:00
Jeff Young 38e5e27a50 Import Eagle arc tracks as arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14539
2023-10-25 21:55:09 +01:00
Jeff Young a3fc07b6a0 Fix build. 2023-10-25 18:41:45 +01:00
Jeff Young 6a2aeeeae2 Import a few more rules from Altium board files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15585
2023-10-25 16:06:40 +01:00
Jeff Young fc4bc10d27 Separate out axes definitions between ModEdit and PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5711
2023-10-25 15:01:36 +01:00
Jeff Young 881cf9dfcf Minor improvements to clarity and conformity for Display Options. 2023-10-25 15:01:36 +01:00
jean-pierre charras ac31c18f6e French translation update 2023-10-25 15:21:07 +02:00
jean-pierre charras 85210e5136 Pcbnew, export component placement: better string in menu (.gbr added).
(Was missing in my commit 5bf241a5)
2023-10-25 13:38:07 +02:00
jean-pierre charras 5bf241a53e Pcbnew, export component placement: better string in menu (.gbr added).
Also fix 2 minor Coverity warnings.
2023-10-25 09:41:08 +02:00
jean-pierre charras 71475a4b56 Gerber place files: do not quote strings (fields, pad name, pad function ...)
Double quotes have no special meaning, so adding them modify the texts
2023-10-25 08:59:37 +02:00
Jeff Young fefb3d96dd Better clarity and memory leak fixes for LTspice importer.
Moves some exception processing to a REPORTER interface so we don't
leak a bunch of memory by exiting early.

Also adds some assertion processing to make sure we're not leaking
in other places.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15158
2023-10-25 00:11:08 +01:00
Jeff Young 46aecefb04 Re-enable import non-Kicad project, but make it clear current will be lost.
(And there's no sense in asking if they want to save changes first,
as those will be lost too.)
2023-10-25 00:11:08 +01:00
Jeff Young fca1ad5285 Ask user if they want to delete original items after conversion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15938
2023-10-25 00:11:08 +01:00
Jon Evans 617a975b32 macOS: switch method to bring child processes to front
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14060
2023-10-24 17:27:33 -04:00
Alex Shvartzkop 0158377cb7 Fix schematic text properties dialog more, for wx 3.2.3. 2023-10-25 00:12:49 +03:00
Seth Hillbrand 2449050223 Update translations 2023-10-24 12:12:14 -07:00
jean-pierre charras d9b5257b9e DIALOG_TEXT_PROPERTIES: Fix a cosmetic issueFixes #
Fixes #15940
https://gitlab.com/kicad/code/kicad/-/issues/15940
2023-10-24 19:28:40 +02:00
Jeff Young 791aa64950 Functionally it's a "reference image".
The implementation happens to be a "bitmap".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15932
2023-10-24 15:44:21 +01:00
Alex Shvartzkop 00904e8e23 Set UNPACK_ALIGNMENT properly for RGB bitmaps, 2023-10-24 06:58:46 +03:00
Alex Shvartzkop 0e4553b1fa Fix variable shadowing. 2023-10-24 04:25:31 +03:00
Alex Shvartzkop 977912dcd5 Fix up 75c758e5f4 for masked images. 2023-10-24 03:59:03 +03:00
Alex Shvartzkop e6cf5e5e01 Don't draw PCB bitmaps on layers not visible in high-contrast mode. 2023-10-24 03:39:48 +03:00
Alex Shvartzkop 71d0c7f6af OpenGL: Improve logic when bitmap cache memory is exhausted.
Don't remove the front entry, as it will likely be needed for the next bitmap.
Instead, implement neuristics based on access times.
2023-10-24 03:36:51 +03:00
Alex Shvartzkop ccc29e9776 Improve bitmap caching performance. 2023-10-24 01:27:53 +03:00
Seth Hillbrand 4741a5ed4c Fix memory leak in connection graph
When generating virtual connections to represent bus aliases, we need to
store the pointers for future deletion otherwise we will leak the memory

(cherry picked from commit 9260f58803)
2023-10-23 13:47:07 -07:00
Seth Hillbrand 86208a7922 Improve pin-pin iteration in ERC checks
Rather than generating expensive classes to store in a set to check for
duplicate checks, we avoid double-checking elements in the vector.  For
large schematics this results in a substantial speed increase

(cherry picked from commit 1a5c515e45)
2023-10-23 13:45:43 -07:00
Seth Hillbrand cb8dd9e9a2 Don't leave deleted items in group
We filter out ref/value text in copies so we need to remove them from
the copied group (if any) as well

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

(cherry picked from commit fb387a2c09)
2023-10-23 13:34:53 -07:00
Seth Hillbrand 8cbad7a3c0 Compare bus local names
When running ERC, we want to check if bus members exist in the bus and
this should be done using m_local_name (i.e. the name it take from the
parent bus) not the resolved name as this will change depending on
connections

(cherry picked from commit 1380feef72)
2023-10-23 12:54:58 -07:00
Alex Shvartzkop c8b2e2aa07 closestDist_sq should be ECOORD_MAX initially. 2023-10-23 22:18:45 +03:00
jean-pierre charras 4ffa013467 Fix minor compil and Coverity warnings (not initialized vars) 2023-10-23 20:13:46 +02:00
Jeff Young 0cf6679bfe Try to get the scoring logic right (again).
Also adds matching against a library name.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15875
2023-10-23 18:24:25 +01:00
Jon Evans 4c1da16d6f Don't attempt to take the size of invalid bitmap 2023-10-23 13:02:38 -04:00
Jeff Young 435e3fab8d Support text variables in STEP export filename.
Also fixes some other file browser titles to match Kicad's overall style.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15927
2023-10-23 18:01:47 +01:00
jean-pierre charras dd166ce835 Pcbnew, legacy plugin: fix a minor issue about file version number.
Some .brd files have a version number = 7, very similar to version 2.
So force version = 2 to import these files.
2023-10-23 18:43:26 +02:00
Mike Williams 8ec2eb600a Point editor: manually manage grid lifetime for now
Will prevent crashes until we can fix this correctly.
2023-10-23 10:57:54 -04:00
Mike Williams 91b6bb8088 Grid helpers: remove view items on destruction 2023-10-23 09:39:08 -04:00
Mike Williams 9e48c0b695 Grids: placing symbols should respect connectables, not graphics 2023-10-23 09:34:06 -04:00
Jeff Young bf4529c1b5 Remember last tab for Pad Properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15925
2023-10-23 14:13:49 +01:00
Jon Evans 96d203477e Fix launcher buttons on macOS 2023-10-23 08:56:02 -04:00
Jeff Young f4b872226b Fix wxFormBuilder switching the default tab.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15925
2023-10-23 13:44:05 +01:00
Jeff Young bc0fe74f72 Score initializing is done by LIB_TREE_NODE::ResetScore().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15875
2023-10-23 13:09:41 +01:00
Jeff Young ab89038fa8 More protection for drawing dashed lines on MSW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15888
2023-10-23 12:58:19 +01:00
jean-pierre charras 504b3cd174 FP editor: allows FOOTPRINT field to be editable.
Although it had no meaning in FP editor, it needs to be edited in some cases,
as it is a member of a library footprint.
2023-10-23 12:53:25 +02:00
Alex Shvartzkop 97901c9ac5 Fix footprints being difficult to select in high-contrast modes.
(regression)
2023-10-23 06:09:13 +03:00
Jeff Young fb84f4592b Check vias before holes as we assume any hole is non-pushable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15840
2023-10-22 22:46:19 +01:00
Jon Evans 9d455ca399 Fix rendering of ACTION_TOOLBAR_PALETTE buttons at non-normal sizes 2023-10-22 15:40:17 -04:00
afkiwers dc8a5865d5 Symbol Editor: SCH_HTTP special treatment
Added SCH_HTTP to receive special treatment, same like with database libraries!
2023-10-22 19:37:43 +00:00
Jeff Young 7c08aa09d5 Don't generate virtual vias when editing a tuning pattern. 2023-10-22 20:35:15 +01:00
Jeff Young f1efae1e05 We don't want to do collision testing against virtual vias.
(Which means they had better not have a hole.)
2023-10-22 20:35:15 +01:00
Jeff Young ad676e22b8 Don't push a commit we don't own. 2023-10-22 20:35:14 +01:00
Jeff Young 5da35d7750 Don't modify dp-tuning when doing skew tuning.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15901
2023-10-22 20:35:14 +01:00
Jeff Young 09e92fc3fc Cap self-intersecting outline violations. 2023-10-22 20:35:14 +01:00
Jon Evans 47e25d617e ADDED: Icon scaling for toolbars only
Unlike the old "icon scale" (that actually scaled all bitmaps)
this one actually changes the toolbar size while making use
of the new bitmap bundle functionality

Add more resolutions for all tool icon bitmaps

Wouldn't want Mark's eyes to bleed
2023-10-22 14:02:06 -04:00
Jon Evans 06a4bdbf4c Upgrade BITMAP_TOGGLE and GRID_BITMAP_TOGGLE to wxBitmapBundle 2023-10-22 14:02:06 -04:00
Jon Evans 50fe585827 REMOVED: manual icon scale preference
This is now handled properly by wxWidgets on all platforms

See https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Jon Evans e2cc678231 Add 2x scale icons
See https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Jon Evans eb5b3db063 Add bitmap bundle support to BITMAP_SCALE
Change a bunch of buttons and toolbars to use it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Alex Shvartzkop 71fb1afe4c Add ngspice lib paths for when running from build dir. 2023-10-22 19:58:17 +03:00
Jeff Young 3e4d5d776d Add --exclude-pdf-property-popups to schematic plotting CLI. 2023-10-22 12:33:55 +01:00
Jeff Young 7cca303f65 Expose missing properties for label shapes. 2023-10-22 12:33:55 +01:00
Alex Shvartzkop 08e8e13f46 performance: Cache zone fill triangulation at draw. 2023-10-22 14:21:54 +03:00
Jeff Young f50de028fb Make plotting of PDF property popups optional. 2023-10-21 21:52:51 +01:00
Jeff Young f708c7d962 Open Recent for Bitmap2Cmp. 2023-10-21 20:40:04 +01:00
Jeff Young c75b84f76e Fix errant removal of parens.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15744
2023-10-21 20:10:28 +01:00
jean-pierre charras 79fb832b9e pcb_calculator, PANEL_GALVANIC_CORROSION: store selection in config.
Other minor cosmetic enhancement.
2023-10-21 20:42:35 +02:00
Jeff Young 24a9245f81 Hook up via size & drill constraints to editors. 2023-10-21 19:10:38 +01:00
Jeff Young df46521b25 Don't separate netclass values from custom rule values.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15912
2023-10-21 18:23:48 +01:00
Jon Evans e4a23be84e Recompress icons with pngcrush 1.8.13 2023-10-21 12:42:36 -04:00
Jeff Young 54277b1e8b Fix plot clipping when edge values are interpolated. 2023-10-21 16:35:33 +01:00
Jeff Young 85c218f794 Fix missing member variable initialization.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15914
2023-10-21 16:35:33 +01:00
Seth Hillbrand 91a151deb1 Coverity fixes 2023-10-21 17:31:58 +02:00
Jeff Young b97d8ddef4 Make offset-zone check multi-layer aware.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15916
2023-10-21 15:08:36 +01:00
Jeff Young 68e46ecad5 Don't set modified flag when updating measurement format internally.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15909
2023-10-21 14:26:31 +01:00
Jeff Young eff4e2cc9c Convert windows file paths to unix notation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15888
2023-10-21 13:33:22 +01:00
jean-pierre charras 76e1babb88 qa test, test_lib_part.cpp: add missing initialization of parent field member 2023-10-21 10:39:11 +02:00
jean-pierre charras f87065bf0b Fix compil issues on msys2 , gcc13 2023-10-21 08:40:08 +02:00
Marek Roszko aa2a0cdd16 We dont actually need to link to openssl 2023-10-20 19:57:33 -04:00
Seth Hillbrand 27bf47d752 Protect equality operator against invalid fields 2023-10-21 00:55:57 +02:00
Seth Hillbrand 0142b197f7 Replace last iterator to fix MSW builds 2023-10-21 00:55:57 +02:00
Seth Hillbrand 6e50b4c5f7 Add libgit compatibility header 2023-10-21 00:55:57 +02:00
Jeff Young f18ce8c6de Fix layer handling for create similar zone. 2023-10-20 22:20:30 +01:00
Jeff Young 903c01cb20 Make ERC grid error clearer that it's about the connection grid.
Also adds a context menu item to edit the connection grid spacing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15908
2023-10-20 21:01:58 +01:00
Wayne Stambaugh b8310efd19 Coding policy, Doxygen comment, and spelling fixes. 2023-10-20 14:32:54 -04:00
Mark Roszko a17bab4182 Switch to fedora 38 for CI 2023-10-20 18:31:22 +00:00
Jon Evans 6c4a294c0a Fix uninitialized pointer in PROJECT_TREE 2023-10-20 12:47:49 -04:00
Seth Hillbrand dd4c2a6001 Fix project iteration for MSW 2023-10-20 18:39:15 +02:00
Jeff Young 12118b6246 Make sure measurements are updated from grid before saving workbook.
Also fixes a typo when loading measurements.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15909
2023-10-20 17:36:17 +01:00
Jeff Young fc22e602e2 Coverity fixes. 2023-10-20 16:38:21 +01:00
Jeff Young f5e99338a9 Generators should respond to the selection filter that controls their children.
(Tuning patterns to the track checkbox, stitching patterns to the
vias checkbox, etc.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15905
2023-10-20 16:28:05 +01:00
Jeff Young 00fb542146 nullptr safety
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15906
2023-10-20 16:28:05 +01:00
Jon Evans e251bbd217 gmtime requires an explicit cast on some platforms 2023-10-20 11:26:22 -04:00
Jon Evans 32ee3bdabd Remove errant git2 link command 2023-10-20 11:26:22 -04:00
Jon Evans dda14e68a2 Add macOS required libraries in kiplatform
Supersedes 36b0aa60
2023-10-20 11:26:22 -04:00
Jon Evans 5dd3631df2 Revert "Add security library include in CMake for MacOS"
This reverts commit 36b0aa6050.
2023-10-20 11:26:22 -04:00
Alex Shvartzkop 28c72f0cf4 Fix secrets.cpp on Windows. 2023-10-20 18:20:14 +03:00
Alex Shvartzkop 8c7fe9b071 Use fn_str for ifstream in Git dialog. 2023-10-20 18:14:20 +03:00
Seth Hillbrand 36b0aa6050 Add security library include in CMake for MacOS 2023-10-20 16:39:37 +02:00
Seth Hillbrand 5c5a38af21 Update fixes for MacOS 2023-10-20 16:21:31 +02:00
Seth Hillbrand 7720ef3fae Add missing include in kicad_algo.h 2023-10-20 16:11:46 +02:00
Seth Hillbrand 91f28f84d7 Update MacOS security routines 2023-10-20 16:10:49 +02:00
Seth Hillbrand 81214e1f0f Remove unneeded headers 2023-10-20 15:17:10 +02:00
Jeff Young 62eaa7e1c7 Signals already have gain/phase broken out; user-defined signals don't.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15903
2023-10-20 14:09:46 +01:00
Jeff Young 1b04d8972e Missing update from last commit. 2023-10-20 14:09:21 +01:00
Mark Roszko 809f88b144 Add libgit2 to vcpkg 2023-10-20 13:08:33 +00:00
Seth Hillbrand d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Jeff Young 8f96009fe5 Hints and fixes for separate checking of milling cutter size and drill size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15886
2023-10-20 12:13:09 +01:00
Jeff Young 68a5753c80 Repair Rotate on PCB_GENERATOR items. 2023-10-19 23:34:52 +01:00
Wayne Stambaugh c4a9703f81 Minor dialog layout fixes. 2023-10-19 11:59:35 -04:00
Jeff Young 134685bc32 Optical alignment for capital 'T's. 2023-10-19 15:02:38 +01:00
Jeff Young 059a95a2f2 Lock generated tracks when routing.
Otherwise they lose their group status when being replaced by the
router (even if they weren't otherwise modified).
2023-10-19 11:39:01 +01:00
Jeff Young 24ddc728e8 Add PCB_ACTIONS::regenerateAllTuning....
... and move GENERATOR_TOOL to RegenerateAllOfType().
2023-10-19 11:20:09 +01:00
Jeff Young 7447700735 Fix typo. 2023-10-19 11:20:09 +01:00
Jeff Young 16ec0faa7a Reduce line-breaking.
Also simplifies handling of generator properties dialogs.
2023-10-19 11:19:57 +01:00
Jeff Young 67f0f6e3b9 Rename class to match current terminology. 2023-10-19 01:31:13 +01:00
Jeff Young b089630b4c Simplify Import Graphics.
Removed no-longer-required differentiation between importing
footprint vs board objects.

Renamed files to match the dialog.

Made Position At and Set Layer optional checkboxes.
Removed Group Items checkbox.  (In the unlikely event that you don't
want a group, do an UnGroup after importing.)

Flattened out labelled-sizers in the dialog.

Removed importers blacklist, which hasn't been active for at least 4
years.

Fixed undo/redo bug that caused items to be no-longer-grouped after
a redo.
2023-10-19 01:31:13 +01:00
Seth Hillbrand e01ef0a38d Update GitHub funding link 2023-10-18 09:40:34 -07:00
Mike Williams 70917a14e7 Route from end: fix crash and snapping bug
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13992
2023-10-18 12:32:32 -04:00
Mike Williams 5cd5194e89 SCH/PCB: warn before deleting footprint-only fields on sync
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15342
2023-10-18 11:33:17 -04:00
jean-pierre charras 599a8304a6 Pcbnew, ConnectBoardShapes(): do not add 0 size segments to outlines.
Add also our standard copyright text.
2023-10-18 11:14:43 +02:00
jean-pierre charras db9734923c DIALOG_CLEANUP_GRAPHICS: fix incorrect parameter passed to cleaner.CleanupBoard().
The fix board outlines was in fact always activated.
2023-10-18 09:40:26 +02:00
Seth Hillbrand 4ed8b14c12 Fix Mac build
Clang requires tighter forward declaration of derived enums
2023-10-17 09:26:00 -07:00
Jeff Young e793e30360 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15881
2023-10-17 13:34:58 +01:00
Jeff Young e5225abb62 Tuning mode is invariant.
Don't show target skew for length tuning, and don't show
target length for skew tuning.
2023-10-17 13:30:58 +01:00
Jeff Young f5edac547e More modern look & feel for tuning status popup.
(Also includes min and max info, and move string processing out
of router.)
2023-10-17 13:30:58 +01:00
Jeff Young 89011e888c More modern look & feel for tuning status popup.
(Also includes min and max info, and move string processing out
of router.)
2023-10-17 13:30:58 +01:00
Jeff Young 390bd44f18 Cleanup. 2023-10-17 13:30:58 +01:00
Jeff Young 9ed802e951 Support min/max rules in diff pair placer and skew placer. 2023-10-17 13:30:58 +01:00
Jeff Young 9c4bb464ac Improve tuning status popup colours. 2023-10-17 13:30:58 +01:00
Wayne Stambaugh f629898c8b Coding policy fixes. 2023-10-17 08:07:15 -04:00
Alex Shvartzkop be1008cbd8 ADDED: Heal Shapes; Fix discontinuities in gfx import and Cleanup dialog. 2023-10-17 10:29:43 +03:00
Marek Roszko 63ba3b8ea7 Remove BITMAP_OPAQUE just like the TODO said :D 2023-10-16 20:16:30 -04:00
Marek Roszko bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Marek Roszko 584757f2df Move the menu helpers to ui_common instead of sitting in bitmap for some reason 2023-10-16 19:40:46 -04:00
Marek Roszko ba83e84b91 Move SaveCanvasImageToFile to EDA_DRAW_FRAME rather than leaking things to bitmaps 2023-10-16 18:33:11 -04:00
SYSUeric66 9d4e0ba439 add python api FocusOnItem 2023-10-16 22:28:47 +00:00
Wayne Stambaugh b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Mike Williams 2849388d2e Symbol Fields Table: save Select option correctly
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15857
2023-10-16 13:42:51 -04:00
Jeff Young a2e35aabae Trim meander group items to just the tuning pattern. 2023-10-16 13:44:05 +01:00
Jeff Young 2c9d43474d Formatting. 2023-10-16 13:44:05 +01:00
Jeff Young 64cc8dd6aa Adjust dashed-box and edit-point locations to be outside meanders. 2023-10-16 13:44:05 +01:00
Alex Shvartzkop a52ee04fc7 vcpkg: Lock glm at 0.9.9.8#2
Version 2023-06-08 changed the default order of quaternion
values from xyzw to wxyz, which we don't support.

Fixes animations in the 3D viewer.
2023-10-16 14:54:23 +03:00
jean-pierre charras f41734aa48 pcb_calculator/transline/stripline: add missing conv from log to db.
Fixes #15873
https://gitlab.com/kicad/code/kicad/-/issues/15873
2023-10-16 10:31:32 +02:00
Jeff Young d51e058e24 Move diff-pair netname resolution to BOARD.
Also adds reporting of dp gap constaints and max uncoupled to track
selections, and max uncoupled during routing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13748
2023-10-15 22:46:23 +01:00
Jeff Young 2c02c26af4 Centralize min/opt/max printing. 2023-10-15 22:46:23 +01:00
Ian McInerney 55caa9c1e8 Fix casing for gerber wildards
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15877
2023-10-15 19:52:38 +01:00
Jeff Young ccc20348bf Don't start with MEANDER_SIDE_DEFAULT.
It means we get a different default for left-to-right-drawn than we
do when going the other way.

Also fixes bug in PNS::DP_MEANDER_PLACER so that it honours side
specified in settings.
2023-10-15 17:59:11 +01:00
Jeff Young 2450250ae7 Use "tuning pattern" in the GUI. 2023-10-15 17:59:11 +01:00
Jeff Young 6baac175c5 Status bar messages for meanders. 2023-10-15 17:59:11 +01:00
Jeff Young 2b28580f0c Comments. 2023-10-15 17:59:11 +01:00
jean-pierre charras 7efd414519 Fix minor Coverity and compil warnings 2023-10-15 15:55:31 +02:00
Alex Shvartzkop fd887ba929 Altium: support importing a single footprint. 2023-10-15 06:31:00 +03:00
Alex Shvartzkop ace7cbddfe CADSTAR: look for the symbol library .csa file under different names. 2023-10-15 05:56:38 +03:00
Alex Shvartzkop 77eaf252e2 CADSTAR: use pin labels if pin names are not available. 2023-10-15 05:49:07 +03:00
Alex Shvartzkop c7daf511bc Fix importing a symbol in Symbol editor. 2023-10-15 05:48:17 +03:00
Alex Shvartzkop 6e4473855b QA: update golden files for EAGLE SparkFun-GPS.lbr 2023-10-15 03:28:25 +03:00
Alex Shvartzkop 254c8accc2 Remove some debugging messages. 2023-10-15 03:28:25 +03:00
Jeff Young d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Alex Shvartzkop a16bdb7288 ADDED: Support EAGLE libraries directly in Symbol Library Table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2214
2023-10-15 01:45:39 +03:00
Alex Shvartzkop 9ed19192de Improve editing values with {return} in text fields; Add hyperlink detection. 2023-10-15 01:45:39 +03:00
Jeff Young 95032bd487 Make ERC off-grid check user-configurable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14110
2023-10-14 20:47:03 +01:00
Jeff Young 372c5d7963 Remove hack that's no longer necessary.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14020
2023-10-14 19:17:09 +01:00
Jeff Young 14d5a404b2 Don't leave deleted items in a group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15797
2023-10-14 18:23:51 +01:00
Jeff Young 87621817bf Fix typo. 2023-10-14 18:22:17 +01:00
Jeff Young 504652b972 Regularize RunOnChildren() at the BOARD_ITEM level.
BOARD_ITEM sub-classes which don't have children simply don't
overrid it.
2023-10-14 15:04:18 +01:00
Jeff Young 8028ea893f Reduce public API of PCB_GENERATOR_MEANDERS.
It doesn't make a huge difference because the class is declared in
the .cpp file, but it still makes it easier to understand what is
conceptually public and what is not.
2023-10-14 15:04:18 +01:00
Jeff Young 5f5113c80a Pick up current rule values when editing meanders. 2023-10-14 15:04:18 +01:00
Alex Shvartzkop 61bdee027b Fix a crash when using length tuning tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15874
2023-10-14 16:53:28 +03:00
Alex Shvartzkop b87496b834 Fix loading legacy (until 2009) schematic files. 2023-10-14 15:42:13 +03:00
Alex Shvartzkop f7ed9cc5c7 Fix loading thru-hole pads when drill token is missing. 2023-10-14 15:42:13 +03:00
Alex Shvartzkop 7b94ecdc01 Fix the insufficient privileges message in symbol remap dialog. 2023-10-14 15:42:13 +03:00
Alex Shvartzkop 83af481688 Improve EAGLE file header detection. 2023-10-14 15:42:13 +03:00
jean-pierre charras 805f1dfbc5 Pcbnew: when adding layers, do not change via layers.
Via layers are not defined by a LSET, and the code that used the new LSET
broke the Via start and/or end layers (for blind/buried vias)
Fixes #15856
https://gitlab.com/kicad/code/kicad/-/issues/15856
2023-10-14 08:48:22 +02:00
Jeff Young 0a111e9fbb Hook up layer-toggle command to router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15812
2023-10-13 21:33:27 +01:00
Jeff Young 2bc273f8bc Don't fire event-parameter asserts when looking for a click event.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/KICAD-2CK
2023-10-13 20:31:01 +01:00
Jeff Young 0b06a1376b Don't turn an empty string into a '0'.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15871
2023-10-13 19:07:45 +01:00
Jeff Young 8d3047d6eb Clear selection before deleting board layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15866
2023-10-13 18:20:33 +01:00
Mark Roszko 8b7af2b545 Fix broken 3dconnexion driver check
It essentially inverted it because version > min_win_version would return true, but then it would be checked against <= 0 which is false
2023-10-13 17:06:44 +00:00
Jeff Young a69869f72a Simplify undo/redo for pad edit mode.
Also simplifies high-contrast-mode handling to fix a bug when exiting
pad edit mode via an undo.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15845
2023-10-13 13:59:31 +01:00
Jeff Young 62d959ed0e Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
2023-10-13 13:59:26 +01:00
jean-pierre charras 38c7fa6db9 Pcbnew: do not display the outlines of a very special zone used by DRC
to show layer mask bridges created by DRC to show these bridges.
This is not a real ZONE, just a container to displays these filled areas.
2023-10-13 14:25:49 +02:00
jean-pierre charras 57efde1bbb Pcbnew: rename ZONE* m_SolderMask to m_SolderMaskBridges
(It is a container to build bridges on solder mask layers by DRC, not real zone)
Disable also this special zone selection by adding it in
PCB_SELECTION_TOOL::itemPassesFilter
2023-10-13 09:57:21 +02:00
Jon Evans 96f9f2c658 PNS: Allow for approximation error in hull clearance
Also revert to using exact hulls for non-compound shapes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
2023-10-12 22:55:34 -04:00
Jon Evans 660c407095 ADDED: Control of multi-layer plot order from plot dialog
Enabled by 0b136ae0
2023-10-12 21:52:37 -04:00
Marek Roszko 0fe2e06949 Fix ambiguous cast compiler errors on MSVC 2023-10-12 19:07:12 -04:00
Marek Roszko 5a8f38952b Move vcpkg forwards 2023-10-12 18:32:58 -04:00
Thomas Pointhuber 7cb198e021 fix SEGV in pcb_generator_meanders 2023-10-12 21:47:34 +02:00
jean-pierre charras 79a45c4803 TestBoardOutlinesGraphicItems(): handle small arcs. 2023-10-12 19:59:11 +02:00
Jeff Young af020f4f9a Fixes for diff-pair meander rectangle & edit points. 2023-10-12 17:54:34 +01:00
Jeff Young 78ee6f2e42 Fix a couple of undo bugs.
The first caused items coming back from undo to be hidden.

The second caused them to be ungrouped from the parent meander.
2023-10-12 17:54:34 +01:00
Jeff Young cdc9c2e409 Fix undo bug where items come back hidden. 2023-10-12 17:54:34 +01:00
Jeff Young 16d904d47e Add support for diff-pair meanders. 2023-10-12 17:54:34 +01:00
Jeff Young d4b8b550f3 Go back to using VIEW::Hide() instead of ForcedTransparency().
(The issue was that the selection VIEW_GROUP drawing ignores the
HIDDEN flag so we need to make sure the PCB_GENERATOR_MEANDERS isn't
in the selection VIEW_GROUP while we're editing it.)
2023-10-12 17:54:34 +01:00
Jeff Young 1b676985f6 Retire length tuning tool in favour of first-class meanders. 2023-10-12 17:54:34 +01:00
Jeff Young 1ca477aeee Unroll from PICKER_TOOL so we can handle amplitude/spacing events.
Also fixes a bug where we didn't clear the router on an <ESC>.
2023-10-12 17:54:34 +01:00
Jeff Young d6c2ad7503 Unroll from PICKER_TOOL so we can handle amplitude/spacing events.
Also fixes a bug where we didn't clear the router on an <ESC>.
2023-10-12 17:54:34 +01:00
Jeff Young 1aeccc5895 Unroll from PICKER_TOOL so we can handle amplitude/spacing events. 2023-10-12 17:54:34 +01:00
Jeff Young a57c9967f3 Draw meander borders while placing. 2023-10-12 17:54:34 +01:00
Jeff Young 4da3e0ff93 Make meander dashed-line borders constant size. 2023-10-12 17:54:34 +01:00
Jeff Young d04641c868 ADDED: support for editing target length in Meander Properties dialog.
Also supports overriding the custom rules.
2023-10-12 17:54:34 +01:00
Wayne Stambaugh e3c491424b Coding policy, Doxygen comment, and spelling fixes. 2023-10-12 12:27:30 -04:00
Wayne Stambaugh 50ec069a01 Fix build warnings. 2023-10-12 10:10:09 -04:00
jean-pierre charras a7d540ce94 TestBoardOutlinesGraphicItems(): add missing case.
DRC_TEST_PROVIDER_MISC::testOutline(): use a smaller size to dectedt small items.
2023-10-12 15:53:21 +02:00
Wayne Stambaugh 5d6ef69726 Coding policy and Doxygen comment fixes. 2023-10-12 09:36:28 -04:00
jean-pierre charras 499f3ca95b DRC_TEST_PROVIDER_MISC::testOutline(): add test to detect questionable items.
Graphic items (segments, rects, circles) on Edge.Cuts can create issues when
building board outlines, when they are very small (a few nm in size), because
they are not easily handled when trying to search connected graphics.
Also protect RC_ITEM::SetItems() against null pointer.
Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
2023-10-12 14:48:24 +02:00
Alex Shvartzkop b0f4adf052 Improve borderless items logic in schematic plotting. 2023-10-12 08:40:37 +03:00
Alex Shvartzkop d9c123b1ec HPGL plotting: write rects as polygons to prevent always filling. 2023-10-12 06:11:12 +03:00
Alex Shvartzkop 45791ff8d6 HPGL plotting: fix random lines connecting to circles. 2023-10-12 06:11:12 +03:00
Alex Shvartzkop 4c0a75cbd4 Fix an assert in HPGL plotter. 2023-10-12 06:11:11 +03:00
Alex Shvartzkop 3e82e59c24 DXF plotting: write zero-sized rects and circles as points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862
2023-10-12 06:11:11 +03:00
Alex Shvartzkop 843bd4f79c PDF plotting: fix zero-sized or too thick rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862
2023-10-12 06:11:11 +03:00
Alex Shvartzkop 0ea85ec9f5 Restore fill polygons on proper layers when flipping zones. 2023-10-12 02:21:47 +03:00
Marek Roszko 5a1c300cff Remove unused headers in pgm_base 2023-10-11 07:22:50 -04:00
Jon Evans 0b136ae0df CLI: Allow controlling layer order for multilayer plots 2023-10-11 00:18:58 +00:00
Seth Hillbrand dc47d251f5 Fix richio vprint
stdlib checks do not allow dereferencing the first element of a vector
when there are no elements in the vector (regardless of whether we have
allocated memory for them).  This whole function is rather
over-engineered, setting up multiple allocations and branches depending
of the string size.  This commit reduces the function to the actions
needed (get the string size, print it into the output)
2023-10-10 10:58:37 -07:00
jean-pierre charras 97fe27350f symbol_checker: add more tests to validate the ssymbol.
especially, null sized rectangles and circles are tested.
2023-10-10 18:31:10 +02:00
jean-pierre charras 42384bcbd0 OPENGL_GAL: ensure 0 sized rect with thickness is shown (already shown by Cairo)
Fixes #15850
https://gitlab.com/kicad/code/kicad/-/issues/15850
2023-10-10 18:31:10 +02:00
Jeff Young d8f35633d4 Modify interactive delete tool to respect groups & selection filter. 2023-10-10 16:04:54 +01:00
Jeff Young 8c017be24a Clearer naming. 2023-10-10 15:43:45 +01:00
Jeff Young 0683313ecb Fix ghosted image while moving meander.
Also cleans up some undo description strings.  (They go in the menu
so they should be title-caps.)
2023-10-10 15:24:58 +01:00
Jeff Young d3b50f0607 Cleanup (no functional changes). 2023-10-10 13:42:42 +01:00
Jeff Young 04e23bf5e3 Fix build. 2023-10-10 12:58:12 +01:00
Jeff Young d916e650f1 Tuning status popup for point editor. 2023-10-10 11:55:57 +01:00
Jeff Young bb74445dda Code clarity. 2023-10-10 11:14:47 +01:00
Jeff Young 4226839586 Switch to diff-pair mode if startItem is a diff-pair member. 2023-10-10 11:08:53 +01:00
Jeff Young 099e5dd9e7 More undo bugs. 2023-10-09 22:32:32 +01:00
Jeff Young 994f9f8823 Cleanup & compiler warnings. 2023-10-09 22:32:32 +01:00
Jeff Young 642938455e Add status popup for meander placer. 2023-10-09 22:32:32 +01:00
Jeff Young 1afa6ddbd5 Rename getLineBetweenPoints() to getLine().
While it uses the first point to find the line, it in fact returns
the entire connection, not just the part between the two points.
2023-10-09 22:32:32 +01:00
Jeff Young 44e0821e13 Fix some issues with undo.
Also fixes the baseline being visible while placing the meander.
2023-10-09 22:32:32 +01:00
Jeff Young d10b0b053e Move meander placer picker tool from item highlighting to net highlighting. 2023-10-09 22:32:32 +01:00
Wayne Stambaugh 9ff8d02e60 Symbol library manager object changes.
* Fix issue handling symbols with multiple inheritance.
* Remove unused code from the symbol library manager object.
* Splits out the library buffer and symbol buffer object so the can be unit
  tested without having to mock the symbol library manager object.
* Add unit tests for library buffer and symbol buffer objects.
2023-10-09 14:58:49 -04:00
Jeff Young b662ff4956 Improve graphical feedback while placing a meander. 2023-10-09 15:22:41 +01:00
Jeff Young 60a2439a53 Better spacing in the meander properties dialog. 2023-10-09 15:22:41 +01:00
Jeff Young 35d8635a6b Default skew tuning lenght to diff between N/P, but allow override. 2023-10-09 15:22:41 +01:00
Jeff Young 5793abd310 Fix build on MacOS. 2023-10-09 15:22:41 +01:00
Alex Shvartzkop 21adc0aac5 ADDED: Import vector graphics into Schematic editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Alex Shvartzkop 60d069757a ADDED: Import vector graphics into Symbol editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Alex Shvartzkop f4f8523c59 Rename pcbnew DIALOG_IMPORT_GFX -> DIALOG_IMPORT_GFX_PCB 2023-10-09 07:04:50 +03:00
Alex Shvartzkop 64a64f5216 NanoSVG: parse 'class' attribute before 'style'. 2023-10-09 07:04:50 +03:00
jean-pierre charras c9d6e79d2d Fix minor compil warnings. 2023-10-08 15:04:45 +02:00
Alex Shvartzkop f47cc39208 Add generators to test_board_item.cpp 2023-10-08 02:41:17 +00:00
Alex Shvartzkop b77df1eea4 Use advanced_config key EnableGenerators to enable menu entries for generators. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop f11339f1f5 Add actions for generators to Tools menu. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop af3bd15469 Avoid crash when length tuning+closing window. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 08e0d8d98a ADDED: Manager dialog for generative objects. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop a4832dd3c8 ADDED: Interactive meander objects for length tuning. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 455268f45e Allow to specify meander initial side via meander settings. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop ce8849f8bc Skip move in meander placers if points match. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 8b21a260c9 Refactor MEANDER_PLACER_BASE::cutTunedLine to SHAPE_LINE_CHAIN::Split. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 6cfb05b4a3 Save/load generative objects in PCB file. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 7b645aa541 Introduce GENERATORS_MGR. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 546c7ed218 Introduce GENERATOR_TOOL. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop be72e07e61 Introduce PCB_GENERATOR. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 0fcb36bc2e Add reselectItem action. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 40f7d5cb52 Add STRING_ANY_MAP. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop 471bfb1131 Add EDA_UNIT_UTILS::ParseInternalUnits 2023-10-08 02:41:17 +00:00
Marek Roszko b5ab807568 Add common to qa test path 2023-10-07 21:28:28 -04:00
Jeff Young 4d0ee276e8 Suppress "File: " when we're showing the Sheetfile field name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15637
2023-10-07 10:41:02 +01:00
Jeff Young b4986030da Include solder mask in STEP export stackup height.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15632
2023-10-07 10:28:38 +01:00
Alex Shvartzkop 36853b0df4 Allow translation of "Open cancelled by user." in pcb_parser.cpp 2023-10-07 09:09:30 +03:00
Alex Shvartzkop 280fe976c4 Add a re-entrancy guard to PCB_POINT_EDITOR. 2023-10-07 03:51:52 +03:00
Alex Shvartzkop 74075fe4d6 Fix target skew not working properly in meander skew placer. 2023-10-07 03:51:26 +03:00
Alex Shvartzkop e4e769493c Skip very short segments in MEANDER_SHAPE::forward. 2023-10-07 03:51:18 +03:00
Jeff Young da5f5536c8 Honour custom layer names for Layer_Top and Layer_Bottom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15835
2023-10-06 21:55:57 +01:00
Jeff Young b161105fce Fix assertion failure in bus alias dialog. 2023-10-06 21:41:16 +01:00
Jeff Young 3f0067cbaa Adjust colours in appropriate direction depending on background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15841
2023-10-06 21:27:02 +01:00
Jeff Young 83d896951a Apply epsilon more uniformly to footprint checks.
Rotation can cause round-off errors even in ints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15838
2023-10-06 21:04:23 +01:00
Jeff Young 420cadab34 Separate meander settings from target length/skew.
Settings move to Board Setup, while target length is sourced from
the custom rules (or a text-entry dialog if no rules are active for
the track).

Target skew is sourced from the coupled-trace-length minus the
trace-to-be-tuned length.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15826
2023-10-06 19:46:55 +01:00
Jeff Young b9e1908ffe Try to find a happier medium for text entry box widths.
Most dialogs have units outside the text entry, and the likelihood
of 14 significant digits & units is low enough to allow scrolling
in that case.
2023-10-06 19:46:55 +01:00
Alex Shvartzkop f9efed692d Pick location closest to aSeg.A in SHAPE_COMPOUND and SHAPE_RECT Collide. 2023-10-06 16:05:05 +03:00
Alex Shvartzkop 92ef40327d Add accuracy parameter to SHAPE_POLY_SET::PointOnEdge. 2023-10-06 15:56:46 +03:00
Alex Shvartzkop 113208455d Add dashed lines and circles to preview draw context. 2023-10-06 15:56:20 +03:00
Alex Shvartzkop de0c1218c3 Add a method to offset line chains. 2023-10-06 15:50:37 +03:00
Alex Shvartzkop 8a22a8fa69 Add aExact to SHAPE_LINE_CHAIN::Split. 2023-10-06 15:50:37 +03:00
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
Alex Shvartzkop 2cd630b47d Fix a bug causing lower segment count on holes when deflating polygons. 2023-10-06 15:36:42 +03:00
Alex Shvartzkop 163fd5021e Mark some methods in UNITS_PROVIDER as const. 2023-10-06 15:36:18 +03:00
Alex Shvartzkop f197882f78 Enable translations for "Open cancelled by user." in some sch plugins. 2023-10-06 15:35:58 +03:00
jean-pierre charras e48256d41a DIALOG_SYMBOL_FIELDS_TABLE::OnExport(): better error messages. 2023-10-06 13:50:59 +02:00
Alex Shvartzkop bf29b25190 EAGLE PCB: fix a regression causing polygons not being imported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15829
2023-10-06 01:13:58 +03:00
Seth Hillbrand d6c3f4d190 Protect against subgraph loops
Optimize the subgraph processing to avoid repeated loops when multiple
items belong to the same subgraph.

(cherry picked from commit 75de21314c)
2023-10-05 09:20:26 -07:00
jean-pierre charras 706b42e6f2 SCH_COMMIT: when clearing all item flags, do not clear all item flags.
If a item is selected, its SELECTED, STARTPOINT and ENDPOINT flags cannot be cleared,
and must be still selected after changes to allow more move, rotate... commands.
Fix to previous commit 741c6f2d
2023-10-05 16:46:20 +02:00
Ian McInerney 0876fb0985 Re-implement direct layer switching in the router tool
Also add a new framework to allow grouping actions that are similar into
a single context that can then be used for mass comparisons.
2023-10-05 13:34:25 +01:00
Ian McInerney fb3bfc3c57 Move About dialog to an action 2023-10-04 22:17:47 +01:00
Jeff Young 31c488bc23 NETINFO_ITEMs are owned by BOARD.
Lifecylce management must go through BOARD_COMMIT (or at least
the frame's undo/redo lists).
2023-10-04 21:01:33 +01:00
Jeff Young 6136c2438d Make sure sorts are deterministic. 2023-10-04 18:43:36 +01:00
Jeff Young 0d51729537 Make sure sort is deterministic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15336
2023-10-04 18:06:26 +01:00
Mike Williams c2d7b26ebd PCBNew: don't grab the wrong parameter type when placing vias 2023-10-04 12:17:15 -04:00
Hasan Jaafar c45ebfcccd Add hot key column on layer select dialog 2023-10-04 12:17:15 -04:00
Jeff Young e9bdfe7210 Save trace colors during session.
My first thought was to move the color out of the TRACE, which is
really a view object.  However we can't make signals a first-class
citizen either, because they change depending on what the current
simulation tab is and so (for instance) we can only load in the
workbook signals for the current tab.  Hours later I backed it all
out and arrived at this simpler, less "correct" solution.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14231
2023-10-04 17:13:08 +01:00
Jeff Young ed4d66e76b Remove dead code. 2023-10-04 17:13:08 +01:00
Franck Jullien c010c7b0ea eeschema: add 'Already placed' category when choosing symbol 2023-10-04 10:29:22 -04:00
jean-pierre charras 37df47a3e7 genDrillMapFile: reduce the pen width used to plot oval shapes (better look) 2023-10-04 15:47:47 +02:00
Marek Roszko ce672f926c Unbind some cvpcb frame events in destructor 2023-10-04 09:17:31 -04:00
Jeff Young 10d62ed766 Replace wxWidgets-Mac-specific API with a general one.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15817
2023-10-03 23:40:42 +01:00
Jeff Young f2c0f4c87f Fix logic screw-up in earlier commit. 2023-10-03 20:53:52 +01:00
Jeff Young 336a38695a MacOS fix for expanded items; MSW fix for selected event
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15817
2023-10-03 20:09:37 +01:00
jean-pierre charras 23e064aaaf fix buf in PLOTTER::sketchOval()
(incorrect parameters to plot arcs).
Fixes #15816
https://gitlab.com/kicad/code/kicad/-/issues/15816
2023-10-03 19:39:21 +02:00
Jeff Young 979942e31a Output fields in both multi-unit and single-unit cases.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15811
2023-10-03 17:38:26 +01:00
Jeff Young 95f05ee869 Fix copy/pasta. 2023-10-03 17:14:21 +01:00
Jeff Young 9f5e583ced Readability. 2023-10-03 17:14:03 +01:00
Jeff Young 9b60e99660 Use wxSTAY_ON_TOP instead of wxFRAME_FLOAT_ON_PARENT for choosers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15808
2023-10-03 14:49:50 +01:00
Jeff Young 6fbbf981f0 Handle justification when hit-testing fields.
This steals the algo used in SCH_PAINTER to get the right coords
for the text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15722
2023-10-03 14:36:13 +01:00
Jeff Young 89f444c38b Fix missing include. 2023-10-03 13:32:00 +01:00
Jeff Young 0c055e15b7 Keep user-defined signals separate.
They can't be plotted till the end of the sim.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15803
2023-10-03 12:59:49 +01:00
Jeff Young 827942c560 Clarity. 2023-10-03 12:59:49 +01:00
Jeff Young 2dfdf0682f Don't ask for empty data. 2023-10-03 12:59:49 +01:00
jean-pierre charras a60411b159 Fix a few compil and Coverity minor warnings. 2023-10-03 08:22:03 +02:00
Marek Roszko 5759823ca0 Move JOB_EXPORT_SCH_PLOT to kicommon horribly pending further refactor of plotting 2023-10-02 20:48:26 -04:00
Jeff Young a3d83cdb6d Pass symbol netlist from Field Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15806
2023-10-02 23:41:06 +01:00
Marek Roszko aa0d39dfe4 Fix the moving truck leaving behind IO_ERROR and friends 2023-10-02 18:16:17 -04:00
Jeff Young 987e382f96 Add missing member variable initialization. 2023-10-02 22:18:31 +01:00
Jeff Young e242f54816 Fix crash trying to create a new board. 2023-10-02 22:12:07 +01:00
Jeff Young 8760bd8c80 Reconcile "apply defaults to new footprints" with DRC lib checks.
Moves apply defaults settings to Board Setup (where they were
duplicated anyway due to an earlier botched merge).

Modifies the apply-to-graphics algorithm to skip copper shapes.

Modifies DRC library check to skip STROKE_PARAMS for non-copper
shapes.
2023-10-02 22:10:13 +01:00
Jeff Young 2d3a8ee4c9 Readability and comments. 2023-10-02 20:56:16 +01:00
Jeff Young 9d678e96cd Improve spacing. 2023-10-02 16:33:26 +01:00
Jeff Young 06446bb80e Only expand lib tree when filtering. 2023-10-02 16:24:53 +01:00
Mike Williams 7c8e74c156 Fields: fix redundant update messages
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15801
2023-10-02 11:02:10 -04:00
Mike Williams 532ac6992a Fields: make sure footprints get a footprint
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15796
2023-10-02 11:02:10 -04:00
Jeff Young 003acbd686 Clear render caches before plotting.
Also fixes a bug where text variables in LIB_TEXT weren't getting
expanded when plotting.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15765
2023-10-02 15:39:14 +01:00
Marek Roszko 6d3b846eb5 Add more missing destructor event cleanups 2023-10-02 07:22:00 -04:00
Jeff Young eaa3ee43e9 Tighten terminology consistency in clearance & constraint reports.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15800
2023-10-02 11:12:18 +01:00
Jeff Young 609dedda3c Insert lazily-created-rows at right position in grid sizer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15652
2023-10-02 11:12:18 +01:00
Marek Roszko e6c8fb6373 Unbind PANEL_PACKAGES_VIEW events in destructor 2023-10-01 22:03:59 -04:00
Marek Roszko 8d5e53f4e8 Unbind LIB_TREE events in destructor 2023-10-01 22:03:58 -04:00
Marek Roszko d801037c93 Unbind ACTION_MENU events in destructor 2023-10-01 22:03:58 -04:00
Mark Roszko 3c0f9ec510 Revert "Give wxTheApp to python scripts that end up touching Pgm().App()"
This reverts commit 672265b564
2023-10-02 00:23:52 +00:00
Marek Roszko b00871ad77 Unbind events in DIALOG_PCM destructor
Maybe fixes KICAD-KR
2023-10-01 20:20:18 -04:00
Marek Roszko 672265b564 Give wxTheApp to python scripts that end up touching Pgm().App()
Fixes KICAD-QG
2023-10-01 19:02:49 -04:00
Marek Roszko 3a567a3ae1 Unbind event handlers in the DIALOG_SHIM destructor to prevent late event crashes
Fixes KICAD-1XF
2023-10-01 17:54:25 -04:00
Jeff Young cf02bb171f Expose exclusion flags in search pane.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15776
2023-10-01 22:46:34 +01:00
Jeff Young 904bdc3c66 Use netclass values when reaching netclass entry.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15774
2023-10-01 21:01:46 +01:00
Jeff Young a82a007301 Allow user to affect width of field names column.
Without this there's no way to re-adjust the column width when new
items are added.  Doing more auto-sizing would be another option,
but at some point we have to stop trying to be smarter than the
user.  (And the resize algo already has bugs on Mac causing us to
make the column too short for "${ITEM_NUMBER}" for some reason.)
2023-10-01 20:47:47 +01:00
Jeff Young f58c0c370c Re-arrange visibility flags only.
Colors are owned by the slot, not the layer objects.
2023-10-01 19:12:34 +01:00
Jeff Young 40ef850bd3 Don't halve indicator icon size on Mac. 2023-10-01 19:01:02 +01:00
Jeff Young d9f1aaa8e3 Keep colors & visibility with layer objects, not layer number.
Also fixes a bug where the Layers manager would keep getting wider
each time the longest item was moved

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15790
2023-10-01 19:01:02 +01:00
Marek Roszko c5471bbe9f Gracefully handle unknown schematic formats
Fixes KICAD-400
2023-10-01 10:32:33 -04:00
Jeff Young 9214e47367 Only allow switching to enabled layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15779
2023-10-01 15:27:55 +01:00
Marek Roszko bfbba632df Guard GetModificationTime with IsValid otherwise it'll return based on INT64_MIN.
Fixes KICAD-3Z0
2023-10-01 09:43:09 -04:00
Marek Roszko f1c5581802 Don't continue with a null board in board import
Some plugin is failing and returning a null-board when the usual convention was exceptions

Fixes KICAD-3ZJ
2023-10-01 09:38:44 -04:00
Alex Shvartzkop dca964092f EasyEDA Std: import schematic images. 2023-10-01 16:21:31 +03:00
Alex Shvartzkop 979274af7c EasyEDA Std Schematic: import net ports as global labels. 2023-10-01 16:21:28 +03:00
Alex Shvartzkop 25cca5adfe EasyEDA Std: fix polygon pad orientation. 2023-10-01 16:21:26 +03:00
Alex Shvartzkop 9cca8e5970 EasyEDA Std: assign nets to PCB circles and rects. 2023-10-01 16:21:17 +03:00
Marek Roszko 0fc3f20e4d Fix assert from IsPower in search_handlers.cpp
Fixes KICAD-2C6
2023-10-01 09:20:19 -04:00
Thomas Pointhuber 7005dd7c48 altium: make special string parsing on pcb a bit more generic
Only special strings starting with a dot are supported. Parsing of concatenated special strings using quotes needs to be implemented, but at least a few test-cases are already there now.
2023-10-01 15:10:50 +02:00
Jeff Young 34769cec63 Filter line-endings from single-line Scintilla editors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15793
2023-10-01 14:04:45 +01:00
Thomas Pointhuber 3b3e4fd34a Move duplicated code of plugin.cpp and sch_plugin.cpp into a new plugin_utils located in commons 2023-10-01 13:58:38 +02:00
Jeff Young a475b01a90 Remove ic parameter from voltage-controlled sources.
It was never supported by ngspice (or LTspice or pspice).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15787
2023-10-01 12:16:25 +01:00
jean-pierre charras 629081af65 fix FOOTPRINT::GetLikelyAttribute() to follow the comments of
FOOTPRINT::CheckFootprintAttributes(): at least one through hole pad
means most probably a footprint through hole attribute.
2023-10-01 11:21:11 +02:00
jean-pierre charras b227f9de61 Eeschema: fix a crash when loading a schematic if a symbol in a sheet has
a lib_name containing {slash} instead of /
(related to commits #2f51d22b and b2bf28f5)
Fixes #15791
https://gitlab.com/kicad/code/kicad/-/issues/15791
2023-10-01 09:56:22 +02:00
Jeff Young bbfe01d4c6 Write out datasheet & descr in fields as well as top-level elements. 2023-10-01 00:36:39 +01:00
John Beard 311f041421 ADDED: Polygon boolean operations in PCB editor
This allows common operations like merging a pin courtyard
into the body courtyard in the fooprint editor, taking a
"bite" out of a polygon and so on,

For now, this only supports polygons made of straight lines.

There are some wierd cases when the operations result in nothing
(e.g. wen a big polygon is substracted from a smaller one that
it contains entirely). I have tried to do something senisble in
these cases, but there may be more optimal ways to handle it.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/13025
2023-10-01 00:10:10 +01:00
John Beard b6cd7e3b4a Make ITEM_MODIFICATION_ROUTINE status messages more general and easier to call 2023-10-01 00:10:10 +01:00
Jeff Young b18fd12694 Improve clarity. 2023-09-30 23:59:25 +01:00
Jeff Young efd004b042 Fix typo. 2023-09-30 23:37:36 +01:00
Jeff Young 3c1478367f Handle flipped state when checkging item against viewport.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15768
2023-09-30 22:54:45 +01:00
Jeff Young d6a862cafe It's "internal units", not "user interface". 2023-09-30 22:54:45 +01:00
Jeff Young 867ca2d0da Don't confuse Coverity. 2023-09-30 22:54:45 +01:00
Marek Roszko 02bbfc8f57 Fixes EDIT_TOOL::Move parameter assert
SENTRY KICAD-2CK
2023-09-30 16:00:15 -04:00
Marek Roszko 2bb811555b Guess at fixing the InlineDrag action missing param
Fixes KICAD-41T
2023-09-30 15:53:35 -04:00
Marek Roszko 2f2c8b9414 Fix printf assert
Fixes KICAD-41B
2023-09-30 15:38:23 -04:00
Jeff Young 423a5b9961 Fix format string specifier. 2023-09-30 17:38:44 +01:00
Jeff Young 9805aca5a0 Handle backslash-escaped quotes in libeval.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15786
2023-09-30 17:38:44 +01:00
jean-pierre charras b2bf28f559 Eeschema: fix a crash when loading a schematic if a symbol in a sheet has
a lib_id containing {slash} instead of /
(related to commit #2f51d22b)
Fixes #15791
https://gitlab.com/kicad/code/kicad/-/issues/15791
2023-09-30 18:21:18 +02:00
jean-pierre charras 7bc2d69ab7 Fix a typo and a Coverity warning 2023-09-30 18:17:09 +02:00
jean-pierre charras c2db20d745 Fix a link issue on mingw in debug mode. 2023-09-30 16:08:54 +02:00
Jeff Young 31e30a5f56 Fix typo in arguments list to EvalRules().
Also fixes a bug where we weren't clearing the previous tabs from
the notebook.
2023-09-30 13:14:27 +01:00
Marek Roszko a347aa7647 StartPlot can fail and leave a broken file handle
Related https://gitlab.com/kicad/code/kicad/-/issues/15782
2023-09-29 19:52:21 -04:00
Jeff Young b5dacc659d Don't hide preview when mouse is in the preview window. 2023-09-29 23:13:59 +01:00
Jeff Young e1c51ed192 A few performance improvements from profiling.
Most of them are very small; the removal of the Fracture() in
DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones() is the only
significant one.
2023-09-29 21:54:59 +01:00
Jeff Young fa11e9138d ADDED support for pin and fp filtering in FOOTPRINT_CHOOSER.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7176
2023-09-29 17:03:50 +01:00
Marek Roszko 98685b37ff Don't search when board is null (during board changes) 2023-09-29 07:08:56 -04:00
Alex Shvartzkop 3b28ba83c6 EasyEDA Pro: don't fail on attributes for dimensions. 2023-09-29 12:17:30 +03:00
Alex Shvartzkop e34d95bb45 EasyEDA Pro: deduplicate footprint 3D model fields. 2023-09-29 12:16:44 +03:00
Jeff Young b592a6634e Cleanup. 2023-09-29 00:13:13 +01:00
Jeff Young 974da4ea7c Push most of DIALOG_CHOOSE_SYMBOL down into PANEL_SYMBOL_CHOOSER.
Includes a dialog wrapper (DIALOG_SYMBOL_CHOOSER) and a frame
wrapper (SYMBOL_CHOOSER_FRAME).
2023-09-29 00:13:12 +01:00
Jeff Young 23033451b1 Cleanup. 2023-09-29 00:13:12 +01:00
Jon Evans 077159ac13 Plotting: use theme color for worksheets 2023-09-28 16:58:02 -04:00
Jon Evans 26f2dbf524 CLI: Allow multiple define args 2023-09-28 16:57:41 -04:00
Mike Williams 49a8c9eb8d Schematic: pin helpers, add wiring tool 2023-09-28 15:07:11 -04:00
Seth Hillbrand 84b841aa8e Update translations 2023-09-28 12:02:27 -07:00
Seth Hillbrand df8e4ef85d Revert "Translated using Weblate (Russian)"
This reverts commit 707f51a381.
2023-09-28 12:02:05 -07:00
Seth Hillbrand 91834611f5 Revert "Translated using Weblate (Russian)"
This reverts commit 8fb838c656.
2023-09-28 12:02:04 -07:00
Seth Hillbrand 9f9ddaf73d Revert "Translated using Weblate (Russian)"
This reverts commit 2b771dc2a4.
2023-09-28 12:02:03 -07:00
Seth Hillbrand cfbe0993b3 Revert "Translated using Weblate (Russian)"
This reverts commit 94310e2741.
2023-09-28 12:02:02 -07:00
Seth Hillbrand 333c466f2c Revert "Translated using Weblate (Russian)"
This reverts commit 9f1ebfe615.
2023-09-28 12:01:58 -07:00
Seth Hillbrand 9f1ebfe615 Translated using Weblate (Russian)
Currently translated at 100.0% (8709 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-28 20:58:28 +02:00
Ivan Chuba de1f8f581e Translated using Weblate (Estonian)
Currently translated at 4.8% (422 of 8626 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2023-09-28 20:58:28 +02:00
Ivan Chuba 025ebf34f6 Translated using Weblate (Ukrainian)
Currently translated at 89.7% (7814 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-09-28 20:58:28 +02:00
Wellington Terumi Uemura 1b2b9bed26 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8709 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-09-28 20:58:28 +02:00
Hubert Hu e177262ccc Translated using Weblate (Chinese (Simplified))
Currently translated at 89.1% (7761 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-09-28 20:58:28 +02:00
Marcel Hecko 3282fff1b2 Translated using Weblate (Slovak)
Currently translated at 57.2% (4983 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sk/
2023-09-28 20:58:28 +02:00
xXx 94310e2741 Translated using Weblate (Russian)
Currently translated at 100.0% (8709 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-28 20:58:28 +02:00
Toni Laiho 082f96f2d2 Translated using Weblate (Finnish)
Currently translated at 100.0% (8709 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-09-28 20:58:28 +02:00
Marine Biologist a762539dd5 Translated using Weblate (Turkish)
Currently translated at 54.3% (4734 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-09-28 20:58:28 +02:00
Henrik Kauhanen 2c7aa203b4 Translated using Weblate (Swedish)
Currently translated at 99.6% (8682 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-09-28 20:58:28 +02:00
xXx 2b771dc2a4 Translated using Weblate (Russian)
Currently translated at 99.9% (8708 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-28 20:58:28 +02:00
ZbeeGin 12930a9453 Translated using Weblate (Polish)
Currently translated at 100.0% (8709 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-09-28 20:58:28 +02:00
Tokita, Hiroshi c5413f0dea Translated using Weblate (Japanese)
Currently translated at 92.9% (8094 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-09-28 20:58:28 +02:00
xXx 8fb838c656 Translated using Weblate (Russian)
Currently translated at 98.8% (8609 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-28 20:58:28 +02:00
Tokita, Hiroshi 9cb28fd9a5 Translated using Weblate (Japanese)
Currently translated at 92.2% (8037 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-09-28 20:58:27 +02:00
Wellington Terumi Uemura b81a5e7750 Translated using Weblate (Portuguese (Brazil))
Currently translated at 97.5% (8497 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-09-28 20:58:27 +02:00
Henrik Kauhanen d7becf5974 Translated using Weblate (Swedish)
Currently translated at 99.6% (8680 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-09-28 20:58:27 +02:00
xXx 707f51a381 Translated using Weblate (Russian)
Currently translated at 97.0% (8455 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-28 20:58:27 +02:00
Eryk Michalak 78425c24a7 Translated using Weblate (Polish)
Currently translated at 97.3% (8479 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-09-28 20:58:27 +02:00
ZbeeGin 6a9cd94c48 Translated using Weblate (Polish)
Currently translated at 97.3% (8479 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-09-28 20:58:27 +02:00
Tokita, Hiroshi cc351fcd29 Translated using Weblate (Japanese)
Currently translated at 91.3% (7960 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-09-28 20:58:27 +02:00
Mark Hämmerling 851448b20f Translated using Weblate (German)
Currently translated at 90.1% (7855 of 8709 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-09-28 20:58:27 +02:00
Wayne Stambaugh 2f51d22b3a Fix schematic editor crash when updating symbols.
Some how symbol names that still have escaped '/' character get mixed with
symbol names that have '/' characters now that it is no longer an invalid
LIB_ID character.  This was causing derived symbols to loose the link to
the parent symbol.  This fix replaces any instances of "{slash}" with "/"
to convert symbol names to the proper escaping.

Thanks to JP for the inspiration for the fix.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15715
2023-09-28 14:30:15 -04:00
Seth Hillbrand c73c2360a4 Force focus back to canvas after popup
Following the hotkey popup, we need to place the input focus back to the
canvas to receive the next event

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15737
2023-09-28 10:52:12 -07:00
Mike Williams 5f88c132c9 Schematic: add pin helpers menu (quickly breakout pins) 2023-09-28 11:44:52 -04:00
Matthias Breithaupt be9e4c79ee CLI: Sanitize filename when exporting symbol as svg
When using symbol names as filenames, invalid characters and
characters that might be mis-interpreted (e.g. '/') have to be
removed from the name to prevent unexpected behavior.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15751
2023-09-28 13:02:47 +00:00
Marek Roszko 6b12a12b3e On second thought rename PROJECT_PCBNEW to PROJECT_PCB 2023-09-27 23:15:54 -04:00
Marek Roszko fabfe5b33d Fix GetTextVarsTicker and GetNetclassesTicker return types 2023-09-27 23:06:44 -04:00
Marek Roszko 8c6899b0d3 Tear out the eeschema conditional compile of PROJECT 2023-09-27 23:05:30 -04:00
Seth Hillbrand c772d116b2 Ensure that layer names are unique when importing
Altium allows duplicate layer names but KiCad prefers to have unique
names for each layer.  This enforces a unique name for each layer when
importing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15583
2023-09-27 18:05:21 -07:00
Seth Hillbrand 06428e0161 Remove unused 2023-09-27 18:05:21 -07:00
Marek Roszko 7e8b18035f Eliminate the conditional pcbnew/cvpcb definition of PROJECT 2023-09-27 20:53:46 -04:00
Jon Evans 017dafc8e3 Just use \n for newline
Fixes issues with extra blank lines in CSV on some platforms
2023-09-27 15:46:23 -04:00
afkiwers c97db9b6c4 fixed for field duplication
This removes case-sensitivity when mapping.
2023-09-27 18:12:39 +00:00
Alex Shvartzkop 3c40cb3fd3 Wayland: add global_remove handler, logging. 2023-09-27 18:06:57 +03:00
Jeff Young 1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
jean-pierre charras 4e77c9089e Fix typos 2023-09-27 17:01:21 +02:00
Mike Williams 0000fcbe50 Schematic Setup: add BOM Preset importing 2023-09-27 09:14:25 -04:00
Mike Williams cb115189f6 Symbol Fields Table: menu shortcut should start in edit tab
The BOM shortcut goes to Export, this makes them symmetrical.
2023-09-27 09:14:25 -04:00
jean-pierre charras e1d7d1bca7 Fix a link issue on mingw/msys2 2023-09-27 10:20:18 +02:00
jean-pierre charras 6f9affe3db Fix compil warnings: disable #pragma specific to MSVC 2023-09-27 08:22:39 +02:00
Marek Roszko 4746bde4b3 gal as a shared lib, gaasl! 2023-09-26 22:31:31 -04:00
Marek Roszko 464179894d Another set of movement to kicommon 2023-09-26 22:30:42 -04:00
Seth Hillbrand f4abc43da0 PL Editor: Fix formatting error
fmt requires `:` prior to the numerical formatting
2023-09-26 12:51:33 -07:00
Zhuang Jiezhi 618c2be380 Pcbnew: Adding net pop-up menu for placing via
ADDED: Add feature showing a pop-up menu of possible nets when it's ambiguous in Pcbnew

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15003
2023-09-26 19:42:55 +00:00
Seth Hillbrand 12ebb2bbfa Set pinmap after updating pins
When duplicating and existing symbol, we must set the pins before
setting the lib symbol as the lib symbol will generate a pin map that
will be broken by the shift to new pins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15728
2023-09-26 11:31:16 -07:00
Jeff Young 54171ec030 Add action for switching to Project Manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15740
2023-09-26 17:25:57 +01:00
Jeff Young aab0696bb6 Zoom undo/redo for simulator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14580
2023-09-26 13:19:41 +01:00
Jeff Young 51f6d38d08 Title case for menus. 2023-09-26 13:19:41 +01:00
Marek Roszko 37e8a008ab Remove obsolete config_params.h includes 2023-09-25 20:40:29 -04:00
Jeff Young 43edbcc622 Add batch edit for visible flag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14519
2023-09-26 00:31:37 +01:00
Marek Roszko 7010f7963c EDA_ITEM does not belong in VIEW 2023-09-25 19:30:42 -04:00
Jeff Young 92cbd0f599 Allow Never Show Rescue Symbols to be turned back off.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15733
2023-09-25 23:58:15 +01:00
Jeff Young 04214983cf Repair standalone application 3D plugin path resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15322
2023-09-25 18:03:27 +01:00
Jeff Young be532e96d6 Fix errors in calculating tuning length.
Fix mismatched parameter passing in TOPOLOGY::followTrivialPath()
and TOPOLOGY::AssembleTrivialPath().
Fix logic error in PNS::JOINT::IsLineCorner().
Handle VVIAs in PNS::JOINT::IsNonFanoutVia().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10614
2023-09-25 15:50:44 +00:00
Jeff Young 902e5df2e8 Report unsupported DXF features on import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15614
2023-09-25 16:21:11 +01:00
Jeff Young 88e34fd482 Coding style. 2023-09-25 16:21:11 +01:00
jean-pierre charras 58d52df97c Fix missing header on wxMSW 2023-09-25 15:19:27 +02:00
Jeff Young bf493f32f5 Nullptr safety for various panels.
Also moves preference saving out to parent as different parents
save different settings.
2023-09-25 12:35:54 +01:00
Jeff Young 7835b8ddc7 Bring various appearance managers into line over preset editing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15726
2023-09-25 12:35:54 +01:00
jean-pierre charras 938001250d SCH_SEXPR_PARSER: fix missing init of pixels size in internal units.
(the pixel size was the default for 300PPI, so the bounding box was incorrect
for images not using 300 PPI)
Avoid also magic numbers in SCH_BITMAP code.
2023-09-25 12:06:23 +02:00
Marek Roszko 050f812f5e Move fontconfig to kicommon for now to de-duplicate the font cache 2023-09-24 22:58:18 -04:00
Marek Roszko c006482feb Add SETTINGS_MANAGER::GetUserSettingsPath back because swig 2023-09-24 20:10:32 -04:00
Seth Hillbrand 91450c22cc Allow disambiguation menu configurability
Adds an advanced config flag to all testing different values for
different users.

Related to https://gitlab.com/kicad/code/kicad/-/issues/15128
2023-09-24 16:33:05 -07:00
Jeff Young 63558d4b09 Don't double-code the format of unconnected netnames.
It's owned by SCH_PIN::GetDefaultNetName().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15723
2023-09-24 22:54:10 +01:00
Marek Roszko 98b35b1a7f Start using the sentry environment tag 2023-09-24 14:42:00 -04:00
Jeff Young e962615407 Use original event position if it's available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15623
2023-09-24 19:01:53 +01:00
Jeff Young aef0f44b8e Smarten up double-click handing in PCBNew drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15700
2023-09-24 18:49:41 +01:00
Jeff Young c2c71facb1 Tidy up shutdown of APPEARANCE_CONTROLS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15024
2023-09-24 18:27:06 +01:00
Jeff Young d428b0e20e Improve SameLogicalPadAs() shorting nets test.
This is required to support 4cd26ab6bc.
2023-09-24 16:19:26 +01:00
Andre Iwers f2fdf0f3df httplib: add support for exclude attributes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15720
2023-09-24 13:37:01 +00:00
Marek Roszko a3c662839c Remove accidentally committed headers 2023-09-24 08:09:21 -04:00
jean-pierre charras 741c6f2d55 SCH_COMMIT: when clearing all item flags, do not clear SELECTED item flags.
If a item is selected, its SELECTED flag cannot be cleared without managing
selections stored in tools, and must be still selected after changes.
Fixes #15671
https://gitlab.com/kicad/code/kicad/-/issues/15671
2023-09-24 11:07:04 +02:00
Marek Roszko e3285c234a Move executable path to PATHS to avoid a circular dependency 2023-09-23 20:21:37 -04:00
Marek Roszko 3c18e216b1 Move configparams to kicommon 2023-09-23 20:06:58 -04:00
Marek Roszko 121ea99824 Move the settings path to PATHS to allow shifting other classes into kicommon 2023-09-23 20:06:58 -04:00
Marek Roszko 37479c4154 HIDPI_GL_3D_CANVAS needs CAMERA so move it over 2023-09-23 20:06:57 -04:00
Marek Roszko 669f9d795f Trim the camera includes 2023-09-23 20:06:57 -04:00
Ian McInerney a44728bc13 Remove minimum CMake versions from thridparty
New CMake versions warn when support for CMake 3.5 and before is
requested, so since we use a higher CMake minumum, just remove these
version checks in the thridparty code to remove the warnings.
2023-09-24 00:21:06 +01:00
Marek Roszko 563cd522eb confirm is now free to live in kicommon 2023-09-23 10:24:47 -04:00
Marek Roszko eb84c29414 Remove confirms dependence on pgm_base and unused header 2023-09-23 10:20:31 -04:00
Marek Roszko 1c11a599c8 Move trace_helpers to kicommon 2023-09-23 09:37:47 -04:00
Marek Roszko f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Jeff Young 0f94b467ba Fix arg parsing in ExecuteFile.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15326
2023-09-23 14:34:54 +01:00
Jeff Young 1fd3f4e375 Handle read-only libraries when saving symbol from canvas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15519
2023-09-23 14:34:54 +01:00
jean-pierre charras e7233a8dc6 DIALOG_CREATE_ARRAY, minor changes: better look, and added a few tool tips. 2023-09-23 10:08:37 +02:00
Bartek Wacławik ac9a863496 Implement new resistor substitution algorithm
Significantly improves performance of the tool.  Also corrects an mistake in the formula for computing relative errors
2023-09-22 21:43:09 +00:00
Jeff Young 463e7c3b30 Improve performance & responsiveness of sim updates.
The x-axis only needs to be fetched once per update.  Same for
redrawing the screen.  And there's no reason to fetch more y data
than we have x data for (which happens to subsequent traces as
the sim is still running as we're updating).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-22 21:40:52 +01:00
Jeff Young da1405ec6a Draw off-board pads when drawing off-board silk. 2023-09-22 20:57:31 +01:00
Seth Hillbrand bdb7b99fc8 Don't destroy the pin cache in symbols
SCH_PIN pointers are used through KiCad and removing them without a
global refresh risks crashes.  A safer approach is to simply reuse the
SCH_PIN structures, updating the data to the revised library

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15715
2023-09-22 11:28:30 -07:00
Jeff Young c1a988e3ff Handle plated vs non-plated copper for copper other than pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5569
2023-09-22 18:48:29 +01:00
Jeff Young cce366bc1d Tidy up 3D renderer display options. 2023-09-22 18:48:29 +01:00
Jeff Young 78f70b45e6 Minor readability improvements. 2023-09-22 18:48:29 +01:00
Jeff Young 4bfebb4744 Use standard names. 2023-09-22 18:48:29 +01:00
Jeff Young a954c1d93c Conversion safety. 2023-09-22 18:48:29 +01:00
Jeff Young 17df55951d Beautify Manage Footprint Association Files dialog. 2023-09-22 18:48:29 +01:00
Jeff Young 722a90213c Correct path of pcb drawing sheet file on saveAs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15551
2023-09-22 18:48:29 +01:00
jean-pierre charras 1f99a5caa6 3D viewer: do not rebuild the board 3D shape when footprint 3D models visibility
has changed: the 3D models visibility does not change the board shape.
2023-09-22 18:32:20 +02:00
Seth Hillbrand b837aa823c Disable non-KiCad import for project-mode
Adds warning if project schematic contains data

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15570
2023-09-22 09:21:56 -07:00
Alex Shvartzkop 3ee2086f95 Don't freak out when can't warp the pointer. 2023-09-22 05:10:42 +03:00
afkiwers a1708637fc fixed missing desciption in symbol chooser 2023-09-22 01:15:32 +00:00
Seth Hillbrand 4cd26ab6bc Ensure NC nets are not connected in board
Even when a pin connects to multiple pads, placing an NC indicator on
the pin type or the connected net means that all pads for that pin
should be independent and not ratsnest with each other

We accomplish this by assigning a unique id "unconnected-(REFDES-PAD#_#)" to each
pad with the pintype "no_connect".  The pad numbers and uniquely
incremented per footprint based on UUID ordering

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15692
2023-09-21 21:36:19 +00:00
Clément Saccoccio a3bc3e138b Fixed frozen pointer for some GNOME/Wayland installation. 2023-09-21 17:09:50 +00:00
Seth Hillbrand c497abd8ee Fix MSW registry key for 3dconnection
See discussion at https://gitlab.com/kicad/code/kicad/-/commit/7af5037ad76f7ac6e8bbcdaa20a72092c2db2347#note_1568602292
2023-09-21 09:55:11 -07:00
jean-pierre charras a6e883327a Fix typos (paste issue?) in SCH_TEXT::FlipHJustify() and SCH_TEXT::Rotate90().
Fixes #15708
https://gitlab.com/kicad/code/kicad/-/issues/15708
2023-09-21 16:12:36 +02:00
Jeff Young 9e2fc9b07c Footprint item positions are relative.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15477
2023-09-21 14:28:25 +01:00
Jeff Young 8d06a794f4 Simplify code.
DrawAllCameraCulled() can handle up to 4 knockout lists, and any
of them can be null, so don't dance around how we call it.
2023-09-21 14:02:23 +01:00
jean-pierre charras e152f97f35 Fix minor Coverity warnings. Small code cleaning in pcb_parser.cpp 2023-09-21 11:33:29 +02:00
jean-pierre charras b1ed0529d7 3D viewer: Simplify polygons before triangulation.
It reduce the risk to create bad triangulation.
Fixes #15706
https://gitlab.com/kicad/code/kicad/-/issues/15706
2023-09-21 11:32:32 +02:00
Seth Hillbrand f4afd7e363 Thread testTrackClearances
We are frequently testing thousands of track segments.  They can each be
uniquely tested in parallel with reporting and marking guarded by
mutexes.  This speeds up the DRC tests substantially

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15466
2023-09-20 19:51:33 -07:00
Seth Hillbrand b2ef620ea6 Focus back to the main window after dialog
Mouse actions would focus the window but we explicitly set it here to
allow keyboard shortcuts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15603
2023-09-20 17:38:06 -07:00
Jeff Young f97af9f254 Experimental feature to render off-board-footprint's pads to silk. 2023-09-20 23:28:50 +01:00
Jeff Young 87af115ee0 Make better use of method overrides. 2023-09-20 23:28:50 +01:00
Jeff Young 0126841c44 ADDED: 3D appearance setting for off-board silk. 2023-09-20 23:28:50 +01:00
Seth Hillbrand 88cbbbcdae Add error message when we cannot form a polygon
Explains to the user why the polygon creation failed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15704
2023-09-20 13:42:31 -07:00
Jon Evans 0cf09fe374 macOS: fix errant rpath 2023-09-20 14:37:44 -04:00
Seth Hillbrand 16324facaf Use kicad_algo when possible 2023-09-20 10:32:37 -07:00
Jeff Young 2f475d99dd Don't update signals and measurements for each refresh.
We only need to do them on the final refresh.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-20 17:34:34 +01:00
Jeff Young 1ff279bf72 Don't auto-adjust time axis while sim is running.
Just use start and end time.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-20 17:34:34 +01:00
Jon Evans d781d70a09 PNS fix dragging a single footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15693
2023-09-20 11:53:43 -04:00
Mike Williams 398a336d91 BOM Generator: redirect BOM buttons to new exporter
Also add legacy generator menu item.
2023-09-20 11:12:03 -04:00
Mike Williams 9541e45502 BOM Exporter: allow using presets from the command line 2023-09-20 10:57:43 -04:00
Jon Evans 9989886517 Fix accidentally backed-out change to idftools for macOS 2023-09-20 09:52:25 -04:00
Mike Williams 6425c5cc1a Symbol Fields Table: fix issues with selecting row of starting selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15684
2023-09-20 09:42:52 -04:00
Mike Williams dd0743d766 Symbol Fields Table: add fixes around preset modifications 2023-09-20 09:42:52 -04:00
Jeff Young c0ce543464 Use standard KiCad abbreviations for TH and NPTH. 2023-09-20 14:27:57 +01:00
Jeff Young 7e70ceaa03 Don't trim non-physical layers to board-outline.
If the user wants a realistic render, then they'll turn off
non-physical layers entirely.
2023-09-20 13:43:23 +01:00
Marek Roszko ee91b550d8 gl_context_mgr and gl_util belong in the gal folder 2023-09-19 23:06:44 -04:00
John Beard fb12db5f2c Add regression test for arc winding
While the bug has been fixes, the winding handling in the
SetArcGeometry() function isn't tested. This adds a regression
test on EDA_SHAPE, which is where the logic now lives.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15694
2023-09-20 02:27:46 +01:00
Marek Roszko 43a59275c3 Remove unused header 2023-09-19 21:14:26 -04:00
Jon Evans 9973dd3e5d Fix sentry compile issues on macOS 2023-09-19 20:31:14 -04:00
Marek Roszko 9deff07ca6 Save 470KB by not re-initializing lineTypeNames over a thousand cpp files it leaks into
I saved a bunch of money on my car insurance by switching to Extern
2023-09-19 20:05:55 -04:00
Seth Hillbrand 7d12e1c4f5 Fix crash in incremental update and bus conn
We store our connectivity dirty flag with the SCH_ITEM but we generate
SCH_CONNECTION based on the SCH_ITEM and the SCH_SHEET_PATH.  For this
reason, we need to avoid clearing the connectivity dirty flag until
we've finished processing all instances of the SCH_ITEM in the graph

This also means that we need to allow getting the SCH_CONNECTION pointer
even when the connectivity is still dirty (getting SCH_CONNECTION
happens based on SCH_ITEM and SCH_SHEET_PATH, not just SCH_ITEM)
2023-09-19 15:55:19 -07:00
Jon Evans d371bb06ae New macOS installation scripts
Replaces BundleUtilities that got broken by recent updates
and is basically unmaintained by cmake.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15376
2023-09-19 17:23:30 -04:00
Jeff Young dedefb743b Even out spacing in GAL display options. 2023-09-19 17:47:30 +01:00
Jeff Young 8672cdb3bd Handle power operating points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15689
2023-09-19 17:37:51 +01:00
Jeff Young ff88ed76f0 Hack to prevent timer event starvation on MSW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-19 17:04:05 +01:00
Jeff Young 58889f8120 Improve shape properties dialog layout.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15683
2023-09-19 17:04:05 +01:00
jean-pierre charras 0a26ab1cae PANEL_SETUP_BOARD_STACKUP: save the m_HasDielectricConstrains BOARD_STACKUP member.
This member was not saved in the board stackup data.
Fixes #15690
https://gitlab.com/kicad/code/kicad/-/issues/15690
2023-09-19 17:47:29 +02:00
jean-pierre charras e24c6d04ff DIALOG_CREATE_ARRAY: enhancement to commit f775637d: ensure last selection
(Set center by radius / Set center by position) has the right widgets enabled
when reopen the dialog.
2023-09-19 16:22:38 +02:00
Josue Huaroto f775637da8 Add Radius and Angle parameters to set center in Circular Array 2023-09-19 14:02:17 +00:00
Jon Evans 5a9c028e85 PNS: Allow dragging more than one footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11312
2023-09-18 22:37:11 -04:00
Graham Keeth 5dc62368b0 CLI: parameterize whether export job inputs are directories or files 2023-09-19 01:47:41 +00:00
Jon Evans 1635df57a3 httplib: code style fixes 2023-09-18 21:37:34 -04:00
Jon Evans 8f6ae8c6b3 httplib: code style / spelling fixes 2023-09-18 21:27:39 -04:00
Jon Evans 75294dc35b Make sure newly-added library rows get parent table set 2023-09-18 21:10:33 -04:00
Andre Iwers 2bcad18cc2 ADDED: HTTP library support
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12027
2023-09-19 01:09:21 +00:00
Seth Hillbrand b52c43b933 Fix some stale pointers in incremental updates
Shared pointers contained stale references to the temporary graph.  When
merging, we need to ensure all references are updated to the final graph
2023-09-18 18:02:41 -07:00
Marek Roszko 22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
jean-pierre charras a568e4f4d3 Fiw a few compil and Coverity warnings. 2023-09-18 18:15:02 +02:00
Alex Shvartzkop b6c0a3f60c Wayland: slightly better infinite drag release logic. 2023-09-18 17:42:09 +03:00
Alex Shvartzkop 6b68d2c946 Vertically center combo cells in symbol fields grid. 2023-09-18 17:27:30 +03:00
Alex Shvartzkop 1decd31baf Vertically center wxGrid cells by default. 2023-09-18 17:15:34 +03:00
Jeff Young 469a94db8c Fix mirroring of TextBox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15576
2023-09-18 14:49:38 +01:00
Alex Shvartzkop 5b77716ed8 Enable KICAD_WAYLAND by default when KICAD_USE_EGL is on. 2023-09-18 16:01:36 +03:00
Alex Shvartzkop 768d4a6782 Wayland: fix cursor warping on KDE and Weston, add logging. 2023-09-18 12:56:54 +00:00
Alex Shvartzkop c49b19b0ce Don't set GDK_BACKEND=x11 when EGL is enabled in wx. 2023-09-18 12:56:54 +00:00
Alex Shvartzkop 06463fd35a Fixes for Wayland cursor warping:
- Emulate the mouse position, since no motion events are sent after warp
- Do not call wl_surface_commit to prevent an assert
- Re-organize code a bit
2023-09-18 12:56:54 +00:00
Clément Saccoccio ad62b165fe Fixed infinite mouse-drag with fast movement on Wayland. 2023-09-18 12:56:54 +00:00
jean-pierre charras b59910a749 catch exception thrown by LIB_TABLE::FindRow().
Previously, was not handled, and crashes Pcbnew.
2023-09-18 14:30:47 +02:00
Jeff Young ec97ac189c Fix typos in FOOTPRINT_EDIT_FRAME::SaveFootprintAs().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15678
2023-09-18 13:12:13 +01:00
Marek Roszko 4a53c8f330 newstroke_font can live in kicommon
Turns out, gal doesnt even use newstroke_font.h anymore, stop bleeding it everywhere due to the gal header
2023-09-18 07:40:02 -04:00
Jeff Young 6f62565093 Handle flipped horiz/vert justifications in FIELDS_GRID_TABLE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15677
2023-09-18 12:38:34 +01:00
Jeff Young 93a5d01230 Unroll ACTIONS::CURSOR_EVENT_TYPE into a flat enum.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15666
2023-09-18 12:38:34 +01:00
jean-pierre charras d02ca968d1 Eeschema: fix crash if using ${FOOTPRINT_NAME} or ${FOOTPRINT_LIBRARY} as values
in fields, if no footprint defined for the symbol.
Fixes #15676
https://gitlab.com/kicad/code/kicad/-/issues/15676
2023-09-18 09:12:12 +02:00
jean-pierre charras 368233d6d7 EEschema: fix incorrect plot of SCH_DIRECTIVE_LABEL graphic shape.
Fixes #15675
https://gitlab.com/kicad/code/kicad/-/issues/15675
2023-09-18 09:07:51 +02:00
Jeff Young e5bce16e31 Don't reset cursor x position during a sim refresh.
The sim may not be complete yet.  And even if it is, the user
didn't ask us to move their cursor.  Just leave it where it is
with an undefined y value.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15672
2023-09-17 19:23:46 +01:00
Jeff Young ef92429ac2 Implement changed notifiers for textvar, netclasses and severities.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15440
2023-09-17 17:35:15 +01:00
Jeff Young be4c89011c Don't confuse "significant digits" with "decimal places".
Also raises the default significant digits for cursors to 3.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15669
2023-09-17 12:42:06 +01:00
Jeff Young c80eb44900 Disentangle IBIS model controls from built-in model controls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13855
2023-09-17 12:42:06 +01:00
jean-pierre charras 79590c6372 Allows new items SCH_NO_CONNECT_T and SCH_BUS_WIRE_ENTRY_T to be repeated.
Fixes #15668
https://gitlab.com/kicad/code/kicad/-/issues/15668
2023-09-17 09:37:34 +02:00
Jon Evans 467c672bcd Fix all-layer snapping for footprint editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15538
2023-09-16 22:55:40 -04:00
Seth Hillbrand d0f37ee55e Prevent double connectivity calculations
The schematic cleanup will call the connectivity calculation but we
don't want this second call, so we store the change in a dummy commit
and discard it when we're done.
2023-09-16 19:42:54 -07:00
Seth Hillbrand df90409a94 No flags should persist through the commit 2023-09-16 19:42:54 -07:00
Jon Evans 6f9af10912 DbLib: support columns with numeric data
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15662
2023-09-16 22:37:12 -04:00
Marek Roszko 2de38f8d75 Force jobs to be instantiated in kicommon
This is important since these get passed between modules at runtime
2023-09-16 21:02:33 -04:00
Marek Roszko d3e5517bfb Move python_scripts up one folder in eeschema 2023-09-16 20:24:41 -04:00
Marek Roszko ab8bcf537e EDA_UNITS_UTIL to kicommon 2023-09-16 19:43:49 -04:00
Marek Roszko d504b77af7 Remove unneeded pgm_base.h include 2023-09-16 19:41:50 -04:00
Marek Roszko 0b99d77fb5 Move layers to kcommon 2023-09-16 19:12:55 -04:00
Marek Roszko 2b90607dcd Shuffle color4d into kicommon since its used many places 2023-09-16 19:12:55 -04:00
Seth Hillbrand 9fc45eb08c Properly handle incremental bus connections
- Incremental extraction needs the newly created items.  The modified
  items are already set in the connection graph but the newly created
  items don't exist yet, so we need to add those explicitly
- Bus parents need to ensure that the bus children exist because we
  iterate on the updates from the top of the graph down
2023-09-16 12:45:04 -07:00
Alex e603ba4f3e wxGTK: add GDK display type to version info. 2023-09-16 21:53:47 +03:00
Jeff Young 9114578004 Improve custom rules syntax help (based on info in docs).
Also turns on table processing in ConvertMarkdown2Html().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15609
2023-09-16 14:41:43 +01:00
Graham Keeth 8149522c34 CLI help string fixups 2023-09-15 23:07:19 +00:00
Seth Hillbrand a6f3f04a9e Update translations 2023-09-15 15:58:52 -07:00
Li Yidong 9f465c1f20 Translated using Weblate (Chinese (Traditional))
Currently translated at 90.4% (7752 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2023-09-16 00:46:27 +02:00
Li Yidong 746c6a8bdc Translated using Weblate (Chinese (Simplified))
Currently translated at 92.4% (7919 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-09-16 00:46:23 +02:00
co8 j 08b94494cc Translated using Weblate (Japanese)
Currently translated at 94.2% (8074 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-09-16 00:46:20 +02:00
Temuri Doghonadze 4344345e04 Translated using Weblate (Georgian)
Currently translated at 10.2% (882 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ka/
2023-09-16 00:46:15 +02:00
Henrik Kauhanen 131a2a4576 Translated using Weblate (Swedish)
Currently translated at 99.8% (8550 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-09-16 00:46:13 +02:00
dsa-t 6ee84bc6da Translated using Weblate (Russian)
Currently translated at 90.8% (7779 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-09-16 00:46:10 +02:00
Toni Laiho 71c4a8e8cd Translated using Weblate (Finnish)
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-09-16 00:46:06 +02:00
Jan Straka 80df012c31 Translated using Weblate (Czech)
Currently translated at 85.9% (7364 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-09-16 00:46:02 +02:00
Ivan Chuba eb96725732 Translated using Weblate (Estonian)
Currently translated at 4.9% (420 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2023-09-16 00:45:58 +02:00
Ivan Chuba c8cab13450 Translated using Weblate (Ukrainian)
Currently translated at 92.6% (7941 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-09-16 00:45:56 +02:00
Ivan Chuba 65f446adf5 Translated using Weblate (Ukrainian)
Currently translated at 92.6% (7934 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-09-16 00:45:52 +02:00
Ivan Chuba 792504e41d Translated using Weblate (Ukrainian)
Currently translated at 92.4% (7917 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-09-16 00:45:48 +02:00
ZbeeGin d4afd2950a Translated using Weblate (Polish)
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-09-16 00:45:45 +02:00
ulikoehler b6d3c4d072 Translated using Weblate (German)
Currently translated at 93.4% (8008 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-09-16 00:45:41 +02:00
Tokita, Hiroshi cfbdeda3d8 Translated using Weblate (Japanese)
Currently translated at 93.7% (8029 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-09-16 00:45:38 +02:00
Jan Straka d424e7b3b1 Translated using Weblate (Czech)
Currently translated at 85.6% (7339 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-09-16 00:45:34 +02:00
Roberto Fernandez Bautista 71fc0f4dbc Translated using Weblate (Spanish)
Currently translated at 90.0% (7715 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2023-09-16 00:45:30 +02:00
temizinsan 190b347821 Translated using Weblate (Turkish)
Currently translated at 56.5% (4847 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-09-16 00:45:25 +02:00
Henrik Kauhanen 5a035ba27d Translated using Weblate (Swedish)
Currently translated at 99.6% (8534 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-09-16 00:45:22 +02:00
Jeff Young ede542f911 Collect comment lines into following spice unit.
This can't distinguish a header block comment in front of a file
with multiple spice units, and so will include that into the first
unit only.

Also fixes the pin assignments reference textbox to use a
fixed-width font as many .subckt's contain ASCII graphics for
pin definitions (not that it helps any with the test case from
the given bug).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15660
2023-09-15 20:08:45 +01:00
Jeff Young ed292e180d Don't assert on 0-width tracks. Just don't inherit from them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14558
2023-09-15 19:09:58 +01:00
Jeff Young 408f505b75 Formatting. 2023-09-15 19:09:58 +01:00
jean-pierre charras 6c366dce9a French translation update 2023-09-15 20:04:04 +02:00
Josue Huaroto 33f5483bc9 Change Y min/max limits in simulation plot window 2023-09-15 17:50:02 +00:00
Jeff Young 68111a1682 Handle redraws from any tent-vias changes in plot settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15254
2023-09-15 18:32:33 +01:00
Mark Roszko 21c81a5392 Fix version_header depend for kicommon 2023-09-15 17:01:38 +00:00
Jeff Young 5842e9c57e Smarten the UpdateAllItemsConditionally() tests in SetActiveLayer().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15329
2023-09-15 17:44:43 +01:00
Mark Roszko ca0b103b54 Fix/disable argparse install (again) 2023-09-15 16:21:50 +00:00
Jeff Young 28e16fbdb9 Don't do layer trimming when importing Altium footprint libraries.
It's unclear (to me) what the long-term solution should be here --
Kicad can't currently show any FP layers other than F.Cu, B.Cu, and
In1.Cu -- but that might change.
2023-09-15 14:54:05 +01:00
Jeff Young c7f69503c0 Do full high-contrast update of vias & pads if netnames are shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15657
2023-09-15 14:54:05 +01:00
Wayne Stambaugh 5e86ba1abe Fix several library symbol multiple inheritance issues. 2023-09-15 07:24:10 -04:00
jean-pierre charras 581cc0de5c Pcbnew, apparence control: add missing control of layer footprint confict
the selection of color and visibility of LAYER_CONFLICTS_SHADOW was missing.
2023-09-15 10:31:25 +02:00
jean-pierre charras 5a81977024 Fix a link issue on msys2 2023-09-15 08:47:42 +02:00
Marek Roszko 0df78f2f68 Update copyright in manifest 2023-09-14 20:21:02 -04:00
Marek Roszko 4af68a70d1 Manifest kicommon on msvc 2023-09-14 20:21:01 -04:00
Jeff Young 3a1be0f603 Fix wrong path in rescue dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15439
2023-09-15 00:43:07 +01:00
Marek Roszko 285f8c0b88 KIID kicommon 2023-09-14 19:21:55 -04:00
Marek Roszko cb7d7b09e3 config_params doesnt need color4d 2023-09-14 19:21:55 -04:00
Jeff Young 849a4656c8 Check value-follows-name case in symbol Save As.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15647
2023-09-14 23:56:05 +01:00
Alex Shvartzkop 862567b21a Turn off KICAD_WAYLAND by default. 2023-09-15 01:12:47 +03:00
Seth Hillbrand 485db8bccd Remove extra nag/grid assertion
When editing the properties, if you accidentally make an extra line, you
should be able to remove the data and have it ignored.
2023-09-14 14:39:51 -07:00
Seth Hillbrand cb1231382f Fix connectivity regression
We have a break somewhere in the connectivity that doesn't fully process
connections but the current code seems to catch these by forcing a
top-down & bottom-up calculation

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14818
2023-09-14 14:39:51 -07:00
Alex Shvartzkop 8db400500d Enable Wayland tricks by default when configured with KICAD_WAYLAND=1. 2023-09-15 00:30:54 +03:00
Alex Shvartzkop 89cb35dc22 Support pointer warping on Wayland.
Configure with KICAD_WAYLAND=1
2023-09-15 00:04:36 +03:00
Jeff Young 394ab8ccb1 Implement printing and plotting for directive-specific label shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15650
2023-09-14 17:43:22 +01:00
Jeff Young 962f79334f Don't import Altium objects to disabled layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15586
2023-09-14 17:17:07 +01:00
Alex Shvartzkop e6d6a06480 Fixes for wx 3.3 in pg_editors.cpp 2023-09-14 19:05:46 +03:00
Alex Shvartzkop ff49d5ada9 Fix ambiguous overloads on wx 3.3 2023-09-14 19:05:46 +03:00
Jeff Young f2c6f25967 Add colors-overridden warning to Symbol Editor's shape properties dialog.
(Note: could be cherry-picked as the strings are all from the
schematic editor.)
2023-09-14 16:53:22 +01:00
Jeff Young cc0facdd4e ADDED: Convert Pad to Polygon 2023-09-14 16:36:37 +01:00
jean-pierre charras a7b1448ccd Fix a compil warning.
Fix also an incorrect comment.
2023-09-14 15:19:46 +02:00
Jeff Young c7e865e4a2 Safety for negative pen widths. 2023-09-14 13:39:35 +01:00
Jeff Young 8cf291e423 Overhaul 3D degenerate shape protection. 2023-09-14 12:33:54 +01:00
jean-pierre charras 51456d973b Better detection of degenerated PCB_ARC. 2023-09-14 11:40:20 +02:00
jean-pierre charras 931401b5be Fix a compil issue (missing header) and a minor compil warning 2023-09-14 08:44:09 +02:00
Marek Roszko 5b9aab9070 fontconfig.cpp doesn't need pgm_base.h 2023-09-13 23:14:50 -04:00
Marek Roszko e2c2875765 BITMAP_INFO kicommon 2023-09-13 23:11:03 -04:00
Marek Roszko 2b0d091636 MARKUP_PARSER kicommon 2023-09-13 21:37:35 -04:00
Marek Roszko d1f2b14ee2 wx_filename to kicommon 2023-09-13 21:16:27 -04:00
Alex 66922b3bd2 Add hacks for EGL on Wayland 2023-09-14 03:54:01 +03:00
Alex 6ad19b3f45 Don't require GLX when KICAD_USE_EGL is enabled. 2023-09-14 03:54:01 +03:00
Alex 3e710fe7c9 Wayland: add KICAD_WAYLAND_TRICKS env variable. 2023-09-14 03:54:01 +03:00
Jeff Young d5801a48d3 Process text variables in pin names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15601
2023-09-13 23:34:25 +01:00
Jeff Young e492efe3c5 Finish up custom-shaped pad spoke templates.
Also fixes a bug in number box for rotated pads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13962
2023-09-13 23:34:25 +01:00
Jeff Young 948fea4be8 Nullptr safety. 2023-09-13 23:34:25 +01:00
Jeff Young 47dc86c1e2 Run filled-test before degenerate-ring-test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15642
2023-09-13 23:34:25 +01:00
Jeff Young d6b75c64e1 ADDED: custom-shaped pad spoke templates. 2023-09-13 23:34:25 +01:00
Jeff Young 31c88d1bcb Don't show cursor or grid axes in pad preview; do show the pad anchor axes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15631
2023-09-13 23:34:25 +01:00
Roberto Fernandez Bautista f48c125c3c CLI QA: Create a diff image highlighting areas of difference in red 2023-09-13 17:37:26 +00:00
Roberto Fernandez Bautista ea648d67e6 QA: Close images after comparing 2023-09-13 17:37:26 +00:00
Roberto Fernandez Bautista ca8790fd8d CLI Gerber QA test: Generate png tiles instead of full (save memory) 2023-09-13 17:37:26 +00:00
Roberto Fernandez Bautista f49125da31 QA: Add kicad-cli pcb export gerber tests 2023-09-13 17:37:26 +00:00
jean-pierre charras 2c10d5e3a0 Pcbnew: fix some issues with very small arcs (size a few internal units)
these very small arcs do not allow to calculate a reliable center position,
and therefore a reliable radius.
So seeing them as a very small segment fix plotting/drawing issues.
Fixes #15639
https://gitlab.com/kicad/code/kicad/-/issues/15639
2023-09-13 17:54:57 +02:00
Seth Hillbrand acb2de0554 Fix issue with clang and older gcc
Not all compilers support c++17 yet so we can't use the floating point
version of from_chars

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15633
2023-09-13 07:29:15 -07:00
Jeff Young 375a4af478 Don't throw the number box baby out with the bathwater.... 2023-09-12 23:49:08 +01:00
Roberto Fernandez Bautista 52ab23d1f6 Enable qa_pns_regressions for Fedora CI 2023-09-12 20:55:27 +00:00
Seth Hillbrand e1966a1259 Fix value checking for gerbview autodetect
X/Y/T require a numeric value after the starting letter.  The previous
check only looked for numbers but values can validly start with other
character (e.g. '-').  This puts the value checking into the C-local
double conversion that should find all variants

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15633
2023-09-12 12:46:00 -07:00
Josue Huaroto 2d54bc42cb Save flip board status in custom preset 2023-09-12 17:10:41 +00:00
Jeff Young a63025733a Fix symbol sorting routine to be determinant. 2023-09-12 16:52:47 +01:00
Jeff Young 7d1dbb77c3 Update symbol editor's title bar when renaming the canvas symbol. 2023-09-12 16:52:47 +01:00
Jeff Young ee724f6a2b Only update value on rename if it previously matched the symbol name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15621
2023-09-12 16:52:47 +01:00
Tomasz Wlostowski a7ae4d8e9a router: orphaned net is not the same as null net handle 2023-09-12 16:03:55 +02:00
Jeff Young 403d7019d5 Save column position of properties panel.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15627
2023-09-12 14:04:12 +01:00
Jeff Young 4a59f0de43 Apply DC voltage source exception to current sources.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15626
2023-09-12 13:45:28 +01:00
Jeff Young 93f004ff65 Formatting, and a fix for a shadowed variable. 2023-09-12 13:45:28 +01:00
jean-pierre charras 7bc0e138fb DIALOG_NET_INSPECTOR: add a close button to allow closing the dlg by ESC.
Fixes #15624
https://gitlab.com/kicad/code/kicad/-/issues/15624
2023-09-12 09:28:17 +02:00
Marek Roszko 66021f0657 Low hanging fruit to kicommon 2023-09-11 21:52:10 -04:00
Marek Roszko a4bf2ff41d LIB_ID to kicommon 2023-09-11 21:52:04 -04:00
Marek Roszko f0987821b5 Move locale_io to kicommon 2023-09-11 21:51:58 -04:00
Marek Roszko 4ac5404822 Move HTML_WINDOW to widgets folder, also fix some fbps that were wrongly not edited
Somebody manually edited at least 3 files fixed here....so the fbps were wrong
2023-09-11 19:10:16 -04:00
Jeff Young 3fcbde00c9 Clean up dead code. 2023-09-11 22:05:24 +01:00
Jeff Young 402b701c9e Formatting. 2023-09-11 22:05:24 +01:00
Jeff Young 9f5a268f15 Don't go through a middle man when reading pad shape primitives.
They're both PCB_SHAPEs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15073
2023-09-11 22:05:24 +01:00
Jeff Young 0315adc646 Dim other SMD pads when in Pad Edit Mode. 2023-09-11 22:05:24 +01:00
Jeff Young 84a9f6f665 Set padEntered when entering pad edit mode with a non-custom shaped pad. 2023-09-11 22:05:24 +01:00
Jeff Young 899fe8be17 Fix change footprints dialog to use correct selection state. 2023-09-11 22:05:20 +01:00
Alex Shvartzkop a2b7bf97b9 Altium schematic: support Line dash styles and colors. 2023-09-11 17:52:21 +03:00
jean-pierre charras 79d750e883 Gerbview, export to PCB: fix incorrect export of flashed shapes on non copper layers.
Fixes #15613
https://gitlab.com/kicad/code/kicad/-/issues/15613
2023-09-11 14:19:27 +02:00
Alex Shvartzkop 1e02c6aa71 Altium schematic: WORDWRAP is false when missing. 2023-09-11 14:18:15 +03:00
jean-pierre charras c66d4bab9c SEXPR_BOARD_FILE_VERSION: fix a typo in commit 0e382669: the date is incorrect.
was set to 20230606 instead of 20230906. it creates some issues when reading
files having a 20230606 as file version.
Fixes #15617
https://gitlab.com/kicad/code/kicad/-/issues/15617
2023-09-11 10:40:07 +02:00
jean-pierre charras 89b1b69662 Gerbview: fix missing initialization of variables in bounding box calculations. 2023-09-11 09:49:17 +02:00
Alex Shvartzkop 16062bbe33 Altium schematic: support custom sheet sizes. 2023-09-11 10:02:59 +03:00
Alex Shvartzkop de2b645fc8 Altium schematic: hide power symbol pin. 2023-09-11 10:02:43 +03:00
Alex Shvartzkop 9f63820ed4 Fix a bug in RebuildBezierToSegmentsPointsList. 2023-09-11 09:35:07 +03:00
Alex Shvartzkop 5da4dfd4a7 Work around wxGTK printing offset in eeschema.
Affects landscape Letter, Legal, A4 paper.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1907
2023-09-10 21:53:03 +03:00
Alex Shvartzkop 7eb4b0710d Fix reading/writing thermal spoke angles for custom pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518

7.0 commit: 86ec36d183
2023-09-10 19:02:16 +03:00
Marek Roszko 0e0c267829 Add missing pragma once to compoundfilereader.h 2023-09-09 22:00:04 -04:00
Marek Roszko bd52ed2054 Upgrade {fmt} to 10.1.1 to fix warnings 2023-09-09 18:39:24 -04:00
Marek Roszko b5d5eb842a Start a kicommon shared lib 2023-09-09 18:04:50 -04:00
Alex Shvartzkop c96b7bb472 Altium import: set units for LIB_TEXTBOX.
Still doesn't work on symbols in schematic for some reason.
2023-09-09 20:30:13 +03:00
Alex Shvartzkop cd9fcc1b87 Altium import: fix arcs in library symbols. 2023-09-09 20:30:05 +03:00
Alex Shvartzkop 946f6e978c Altium sch import: put transparent colors on background too. 2023-09-09 20:30:02 +03:00
Alex Shvartzkop 717f8d35e5 Document SetArcAngleAndEnd angle winding. 2023-09-09 20:28:57 +03:00
Alex Shvartzkop ead44d58a0 Fix bezier curves drawing in schematic/libedit. 2023-09-09 20:28:49 +03:00
jean-pierre charras 45e83541cd Try to make DIALOG_CREATE_ARRAY more understandable for circular arrays.
Added toop-tips and info texts.
No actual code change.
2023-09-09 11:06:36 +02:00
jean-pierre charras f2f572c370 drc_test_provider_text_dims.cpp: ensure glyphs to test are OUTLINE_GLYPH.
For non Kicad font texts with a overbar, the overbar is not a OUTLINE_GLYPH.
Fixes #15604
https://gitlab.com/kicad/code/kicad/-/issues/15604
2023-09-09 10:28:28 +02:00
jean-pierre charras b4c5d46825 wx_filename.cpp: replace include macro.h by include string_utils.h
(missing change in commit 11de9577)
2023-09-09 09:38:44 +02:00
Marek Roszko 11de95778b Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2023-09-09 00:10:57 -04:00
Marek Roszko bd3aca2887 Cleanup the kiface dll export declaration slightly
Why in the bloody world would you pass in the return type as part of the macro for export/import preprocessing
2023-09-08 20:44:08 -04:00
Marek Roszko 3bbf3a61b5 Remove PNS APIEXPORT that never made sense
It can't work because all base classes must be APIEXPORTed
2023-09-08 18:44:46 -04:00
Alex Shvartzkop bc846f5fca SVG import: skip shapes that are not stroked and not filled. 2023-09-08 14:46:04 +03:00
Marek Roszko ab1a6651a9 send multivector.h and sync_queue.h to core 2023-09-08 07:14:34 -04:00
Marek Roszko 00e51da845 Get rid of tools/property_tree that wont build anyway 2023-09-08 07:14:34 -04:00
jean-pierre charras 72984c5c40 Gerbview: add refinements to option to set offset and rotation of layers.
Fix incorrect calculation of bounding boxes when the rotation is not n*90 deg.
2023-09-08 10:43:59 +02:00
Marek Roszko 3cd60007c5 Dont leak richio into everything 2023-09-07 22:29:40 -04:00
Marek Roszko 1a6d459fb1 Fix wrong path slash 2023-09-07 22:09:26 -04:00
Marek Roszko 5da88d1d0e Move UTF8 to core 2023-09-07 20:55:16 -04:00
Marek Roszko 6e04c2835a Remove unused header 2023-09-07 20:46:08 -04:00
Marek Roszko e83f87520c Transform is right at home in kimath 2023-09-07 18:03:33 -04:00
jean-pierre charras 8aa408f0c9 fix a minor compil warning
fix a typo in translatable string.
2023-09-07 20:00:29 +02:00
Jeff Young a9bfadd71a Fix merge error. 2023-09-07 18:00:04 +01:00
Jeff Young d3e255a383 Allow context-menu update/change footprint for multiple footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15595
2023-09-07 17:51:18 +01:00
Jeff Young 0310973e3f Push TEXT_SPIN_STYLE from SCH_TEXT out to SCH_LABEL_BASE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15444
2023-09-07 17:42:51 +01:00
Seth Hillbrand 3723e9efc1 Remove unused var 2023-09-07 15:35:17 +02:00
Marek Roszko 7505fd0f37 Profile can live in core 2023-09-07 07:47:01 -04:00
jean-pierre charras 3e6f7ab3e5 Fix compil issues (especially easyeda_parser_base.xx) and compil warnings
Compil issues can be gcc13/msys2 specific.
2023-09-07 13:41:25 +02:00
jean-pierre charras 9b85942b80 Gerbview: add refinements to commit efdead20: add option to set offset and
rotation to all layers or visible layers.
2023-09-07 12:31:22 +02:00
Alex Shvartzkop 83afdd297e Use UTF-8 encoding in test_io_mgr.cpp. 2023-09-07 12:56:53 +03:00
Alex Shvartzkop 79c86445d2 QA: add plugin type tests for EasyEDA. 2023-09-07 11:02:40 +03:00
Alex Shvartzkop e6f0a3d91b QA: add test files for EasyEDA. 2023-09-07 11:02:40 +03:00
Alex Shvartzkop 21ee65aa9c ADDED: Importers for EasyEDA (JLCEDA) Standard / Professional. 2023-09-07 11:02:40 +03:00
Alex Shvartzkop 024622b0f6 SVG import: skip invisible shapes. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 2c07866fff NanoSVG: update image size to the actual size after scaling. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 892761920a FOOTPRINT::AutoPositionFields: reset justification and angle as well. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop ebbc5fd4cb Remove unused method in kicad_manager_control.h. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 05a8e59884 Move wxString and std::optional JSON serializers to core header. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 5b438d6398 Optimize makeEffectiveShapes for polygons. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop f211b2cdd0 Remove unused method from router_tool.h 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 1b8abdfde7 ADDED: Basic STEP manipulation utils available to Python. 2023-09-07 10:57:02 +03:00
Alex Shvartzkop 52feb38fd1 Add map_helpers.h 2023-09-07 10:57:02 +03:00
jean-pierre charras ecd8c7e2cc Fix a compil issue (in sch_altium_plugin.cpp) and compil warnings. 2023-09-07 08:53:30 +02:00
Marek Roszko e665cbac20 Delete line with weird comment because its weird
We should fix it for reals
2023-09-06 23:45:48 -04:00
Marek Roszko e944a61830 Nothing but the pcb calc will use eseries for the forseeable future 2023-09-06 23:44:41 -04:00
Marek Roszko 96bec8c553 promote base64.cpp to core 2023-09-06 23:27:08 -04:00
Marek Roszko 72669df354 Kick out strtok_r, all our platforms should have it (or strtok_s) 2023-09-06 23:18:55 -04:00
Marek Roszko f45d61ef18 OUTLINE_FONT does not need Pgm() or settings or EDA_TEXT 2023-09-06 22:12:59 -04:00
Marek Roszko 19db0f943f Restore gal recursive link to common 2023-09-06 21:59:01 -04:00
Alex Shvartzkop 9457e794fe Fix SCH_BITMAP::ReadImageFile( wxMemoryBuffer& ). 2023-09-07 04:48:59 +03:00
Alex Shvartzkop 69261df022 Add SCH_BITMAP::ReadImageFile( wxMemoryBuffer& ). 2023-09-07 04:45:40 +03:00
Marek Roszko 10c495952e Snip 2 useless includes in transform.cpp 2023-09-06 21:34:02 -04:00
Marek Roszko 5c62b98e7c observable can live in core 2023-09-06 21:25:24 -04:00
Marek Roszko 81c069c1a3 Lets see if any platform barfs dropping gal's link to common 2023-09-06 20:33:51 -04:00
Marek Roszko 454c5e8eca 3d-viewer should depend on common directly 2023-09-06 20:33:28 -04:00
Marek Roszko 67b031adab Painter base class should just live in gal instead of being in denial 2023-09-06 20:23:19 -04:00
Marek Roszko a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00
Josue Huaroto cef0f176d3 Add Unselect all in menu 2023-09-06 23:44:39 +00:00
Marek Roszko a7a642e090 Remove one errant gal dependency on python 2023-09-06 18:41:13 -04:00
Marek Roszko 8bcc4e52aa Fix build due to gdicmn removal
My VS build state is in psuedo-outerspace mode atm that this worked before this haha
2023-09-06 18:40:15 -04:00
Marek Roszko a4d8c021aa Remove rouge gdicmn include 2023-09-06 18:33:22 -04:00
Marek Roszko 4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04:00
John Beard 3c5052c1ac Add snaps to pad hole edges
This is often useful when measuring the distance from an
object to a pad hole edge, and also when dimensioning
holes.
2023-09-06 21:34:17 +01:00
John Beard 78c8de9b08 Fix oval pad snapping
Previously the snap points computed for oval pads didn't get all the
points correct. This breaks out the "find snap points for ovals"
into a function, reworks the logic, adds some tests.

Also adds "extremum points" when the oval isn't exactly H/V.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15594
2023-09-06 21:33:45 +01:00
Seth Hillbrand 08ffb17489 Only allow parameters for the full lib part in Altium 2023-09-06 19:15:35 +00:00
Seth Hillbrand 25a60fac54 Altium fixes
- Designators and Parameters are shared by all display modes, so don't
  try to extract one, just place the elements on them all
2023-09-06 19:15:35 +00:00
Seth Hillbrand 468beb5a05 Handle font sizes in Altium libs 2023-09-06 19:15:35 +00:00
Seth Hillbrand 893ebdd016 Adding additional Altium features
- Allow pins to be hidden
- Force backgrounds that overlap items to be in the background
- Include footprint information from Altium libraries
- Handle ellipses more intelligently
- Altium hairline treated as 1mil line (not 100nm)
2023-09-06 19:15:35 +00:00
Seth Hillbrand 1555b207a8 Add PIN_NAME and PIN_NUM to the layer ordering
This ensures that pin names/numbers are shown above the graphics
2023-09-06 19:15:35 +00:00
Seth Hillbrand c7868f0832 Altium Plugin updates
Handle Altium multiple display modes (e.g. DeMorgan)
Handle Altium overbar format (o\v\e\r\b\a\r\)
Transform ellipses and elliptical arcs into approximate arcs
Add remaining unknown RECORD ids
2023-09-06 19:15:35 +00:00
Seth Hillbrand 3bd745ee15 Add support for Altium ellipses
Not really ellipses but instead, use two arcs to simulate
2023-09-06 19:15:35 +00:00
Seth Hillbrand 1662f6aad6 Speed up footprint loading by caching
Store the COMPOUND_FILEs in a map referenced to the library name.  This
keeps the COMPOUND_FILE cache in memory rather than regenerating it each
time
2023-09-06 19:15:35 +00:00
Seth Hillbrand 1b63d11adf Speed up Altium compound file reader
Just read the footprint list once and store the cache for later use.
2023-09-06 19:15:35 +00:00
Seth Hillbrand b8b2498e0c Add support for fp cutouts in Altium libs 2023-09-06 19:15:35 +00:00
Seth Hillbrand 24d3df5416 ADDED: Altium SchLib Support 2023-09-06 19:15:35 +00:00
Seth Hillbrand cb3c712a9c ADDED: memberOfSheet() design rule function
Footprints that are a member of a specific sheet may be assigned
distinct rules, allowing users to group their rules based on sheet
layout
2023-09-06 19:14:00 +00:00
Seth Hillbrand f9b745f3d2 Allow multiple format image saving
- Keep original image data.  When loading JPEG, this avoid recompression
  that changes file data and decreases image quality
- Allow schematic and page layout editors to store non-PNG data as well
- Move page layout editor to store base64 instead of hex-coded data
2023-09-06 12:12:32 -07:00
Seth Hillbrand 0e382669d0 ADDED: Support for saving JPEG files in kicad_pcb
When users add an image to the board, this change keeps the original
file format when saving instead of converting the files into PNG-format,
which had the effect of making some board files much larger and slower

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14892
2023-09-06 12:12:32 -07:00
jean-pierre charras efdead2008 Gerbview: added (in Layers Manager) a new setting to adjust draw offset
and rotation of the active layer. This is a draw option only.
2023-09-06 20:08:45 +02:00
Seth Hillbrand 2be87e4527 Fix Portuguese(Brasil) translation naming
On case-sensitive systems, the country code needs to be capitalized for
the language to be correctly identified between two dialects.  Since
`br` was not capitalized, we fell back on european portuguese for Linux
and MacOS

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15592
2023-09-06 10:19:48 -07:00
Jeff Young 6a73f48106 Disable previews when context menu active and when scrolling. 2023-09-06 16:23:13 +01:00
Jeff Young c07e9c834f Validate new footprint / save as footprint info before exiting dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13923
2023-09-06 12:49:37 +01:00
Jeff Young 7a2a2e2df0 Remove error-prone SetReporter() API. 2023-09-06 11:37:50 +01:00
Alex Shvartzkop e09a15ae4c Altium PCB import: fix rectangular keepout fills. 2023-09-06 09:02:54 +03:00
Alex Shvartzkop 4f303a8dc2 Altium PCB import: Polygon Cutout only cuts copper fill.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15587
2023-09-06 08:43:12 +03:00
Alex Shvartzkop ee2f954bbe Revert "Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow."
This reverts commit 26f398a4b1.
2023-09-06 08:02:01 +03:00
Marek Roszko 4fe7c7a902 Prevent crash trying to load missing spice lib 2023-09-05 21:13:29 -04:00
Jeff Young 634524dde5 Validate new symbol / save as symbol info before exiting dialog. 2023-09-05 22:07:58 +01:00
Jeff Young 0dddb27408 Include underscore in word chars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14779
2023-09-05 19:44:53 +01:00
jean-pierre charras cbcaaa001c fix some Coverity and compil warnings. 2023-09-05 20:30:08 +02:00
jean-pierre charras 679733cc42 remove useless includes. 2023-09-05 18:57:17 +02:00
Marek Roszko f894f7ec4c Use the right path for loading drawing sheet in pcbnew cli 2023-09-05 11:01:57 -04:00
Alex Shvartzkop a3df8f8a97 Better drawing precision for LIB_SHAPE arcs. 2023-09-05 14:07:46 +03:00
Alex Shvartzkop a84c01b1ed Fix properties crash when selecting libedit arc and non-EDA_SHAPE. 2023-09-05 14:07:43 +03:00
Alex Shvartzkop a5a93f808e Populate symbol library type choices from SCH_IO_MGR list. 2023-09-05 07:19:15 +03:00
Marek Roszko b566f994bb Flip the RegisterSettings order to avoid legacy import crashes
(cherry picked from commit 32c2135047)
2023-09-05 03:23:07 +00:00
Marek Roszko a2522a2230 Don't call .Load() and cause settings to reload from disk
RegisterSettings can load the new settings json as added by not turning off the load now parameter
2023-09-04 22:42:00 -04:00
Jeff Young d57b726c90 Bug fix for lib-tree previews when lib-tree is hidden. 2023-09-04 22:21:39 +01:00
Jeff Young 70bbaae670 Don't attempt to render degenerate 3D shapes.
Sentry KICAD-382
2023-09-04 22:10:47 +01:00
Jeff Young ea6d64e996 Set line width when changing annotation proxy flag.
(This prevents rectangle from not getting combined into pad if
proxy flag is turned off as Clipper collapses the polygon union
because it's too small.)
2023-09-04 20:49:52 +01:00
Jeff Young 7c718db5d2 Remove dialog-based primitive editing in favour of Pad Edit Mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13561
2023-09-04 20:49:52 +01:00
Jeff Young 0e26f3ab30 Allow pad number box creation in pad edit mode.
(Also fixes a bug where we'd include pad number box in pad shape.)
2023-09-04 20:49:52 +01:00
Marek Roszko 37bdba80ab Pull in ngspice 41 for vcpkg 2023-09-04 15:34:56 -04:00
Alex Shvartzkop 3215223ee2 Move fix_board_shape.cpp to pcbcommon. 2023-09-04 22:26:47 +03:00
jean-pierre charras 2bf8602912 DIALOG_EXPORT_STEP_LOG: print the command line sent to kicad-cli in report window.
It can be useful in case of problems.
2023-09-04 19:03:04 +02:00
Jeff Young 9999ac5662 Generate NC-pin errors when connected to other items.
Also removes the NC row in the pin map as it hasn't been used since
6.0 (see #1826).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15558
2023-09-04 17:27:39 +01:00
Jeff Young 0cde8cff1d Don't include plating thickness when drawing hole clearance lines.
We don't include it in the router, and the code didn't
differentiate between plated and non-plated holes, and it confuses
users.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15575
2023-09-04 16:06:09 +01:00
Matus Pavelek d57c5d3ad9 QFN footprint wizard - Allow different number of pads in x and y directions 2023-09-04 13:39:28 +00:00
Marek Roszko 63824487d0 Hide the unsupported Visible prop for textbox text 2023-09-04 09:28:59 -04:00
Marek Roszko 4b31de61b3 Rename txtbox props to border props 2023-09-04 09:28:59 -04:00
Jeff Young d593257fbd Honour override-individual-item-colors setting for filled shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15572
2023-09-04 14:26:39 +01:00
Marek Roszko 07ecdc5fbb Force close the splash 2023-09-04 09:20:05 -04:00
Marek Roszko ec64ceeff2 Add a custom wx splash class to nullify the filterevent that causes crashes 2023-09-04 08:51:30 -04:00
Marek Roszko f6951c3ce0 Hide the splash earlier in kicad 2023-09-04 08:34:14 -04:00
Jeff Young fe0fb92441 Reduce visual clutter in GAL display options. 2023-09-04 13:06:46 +01:00
Jeff Young c9fd03202a Generate an immediate refresh when loading new footprint. 2023-09-04 11:12:34 +01:00
Jeff Young 4eb51be0a2 Streamline fetching topLevelParent. 2023-09-04 11:12:34 +01:00
jean-pierre charras ddb141ff08 GAL_OPTIONS_PANEL: replace 2 wxSpinCtrlDouble to try to fix a locale issue.
Sometimes the grid thickness setting does not work, depending on some locale setting.
Core developers are not able to reproduce this issue related to a double conversion.
So these wxSpinCtrlDouble are replaced by a wxSpinCtrl (using ints) and a wxChoice.
2023-09-04 11:32:55 +02:00
Alex Shvartzkop 2bb457d477 Remove unused variable. 2023-09-04 07:00:23 +03:00
Alex Shvartzkop ab6a049b90 Add a routine for joining PCB shapes. 2023-09-04 06:46:24 +03:00
Alex Shvartzkop 24e0a9455e Fix a string in step exporter. 2023-09-04 06:45:25 +03:00
Alex Shvartzkop b2a0d85c84 Hide std::abs for EDA_ANGLE from Python. 2023-09-04 06:45:12 +03:00
Jeff Young 9bba8e5956 Don't allow duplication of footprint items outside of footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15487
2023-09-03 22:04:50 +01:00
Josue Huaroto e7d6c84aef Replace ':' to '{', '}' for alias in variable path 2023-09-03 20:52:29 +00:00
Jeff Young d27413a032 Remove up/down buttons until we implement layer ordering.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14574
2023-09-03 21:31:46 +01:00
Josue Huaroto 91d8dabca3 Change behavior of ZOOM_FIT_ALL and ZOOM_FIT_OBJECTS for PCB_EDITOR 2023-09-03 19:58:28 +00:00
Jeff Young 60419f542a Bug fixes for paste margins on custom-shaped pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15125
2023-09-03 20:43:48 +01:00
Jeff Young c2057ba1bc Don't use Clone() for duplicating. It returns the same UUID.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14162
2023-09-03 19:06:20 +01:00
Marek Roszko 911266fe02 Fix cli test for plot one arg 2023-09-03 13:09:18 -04:00
Jeff Young f39bc64212 Show grey background in pin table for pins with no alternates defined.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14030
2023-09-03 15:34:18 +01:00
Jeff Young a72df46200 Show grey background in pin table for pins with no alternates defined.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14030
2023-09-03 15:34:18 +01:00
Marek Roszko fb8d52f19e kicad-cli: Remove -O for plot and add --pages to specify list of pages instead
--pages 1 is equivalent to -O

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15402
2023-09-03 09:18:11 -04:00
Wayne Stambaugh f8cb239f40 Fix symbol library save issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15561
2023-09-03 09:11:06 -04:00
Jeff Young a24a8aaca7 Don't start a pack&move when already in an EDIT_TOOL drag or move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15545
2023-09-03 14:03:52 +01:00
Jeff Young 624203f2e1 Don't start a router drag when already in an EDIT_TOOL drag or move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15312
2023-09-03 14:03:52 +01:00
Josue Huaroto a8e18e2d8c Flip Viewport when Flip board is enabled 2023-09-03 12:30:32 +00:00
aris-kimi 38748cce84 Small order change for three View menu items v2 2023-09-03 12:29:06 +00:00
Jeff Young 43862d767e Don't return separate shapes from a custom-shaped pad.
It just confuses the hull generator.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15553
2023-09-03 13:23:53 +01:00
Jeff Young 61bcf46ffe Don't show preview for lib-item loaded on to canvas. 2023-09-03 12:07:09 +01:00
Jeff Young e6b0a6abca ADDED: lib tree previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2418
2023-09-02 23:30:22 +01:00
Alex Shvartzkop c64b44913c NanoSVG: change preserveAspectRatio default to "xMidYMid meet". 2023-09-02 22:06:32 +03:00
Alex Shvartzkop 2cd7c0636f NanoSVG: basic support for stylesheets.
Based on https://github.com/memononen/nanosvg/pull/175
2023-09-02 19:17:31 +03:00
Alex Shvartzkop 5bb89b300f SVG lib symbol import: fix AddLine. 2023-09-02 19:17:27 +03:00
Alex Shvartzkop 3bd8ff442d SVG import: set C locale to make fractional units work. 2023-09-02 18:57:18 +03:00
Jeff Young 891583f616 Fix nullptr error. 2023-09-02 12:08:37 +01:00
Jeff Young f6e238dc3f Add items to repeat_items after paste (or duplicate).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15556
2023-09-02 11:56:52 +01:00
Jeff Young 41e274684c Make sure pads with no net get assigned Default netclass on board open.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15562
2023-09-02 10:11:38 +01:00
Jeff Young 2d762acc7d Remove accidentally-checked-in debugging code. 2023-09-02 10:11:38 +01:00
Alex Shvartzkop 8a4f203963 Altium: remove illegal chars from library name. 2023-09-02 10:36:03 +03:00
Marek Roszko 7dfac51fe1 Silence cmake warning about lowercase string 2023-09-01 22:09:49 -04:00
Marek Roszko 70c74322b0 Disable the new C5267 because we have alot of it 2023-09-01 22:09:01 -04:00
Alex Shvartzkop 0317a1f687 Fix arcs in gerber export once again.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15559
2023-09-02 00:00:34 +03:00
Alex Shvartzkop 90eb59cf9f Fix saving a new footprint library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15563
2023-09-01 23:30:27 +03:00
jean-pierre charras 3a630fc5ab Fix an obscure (but annoying) compil warning perhaps gcc 13 specific. 2023-09-01 20:21:44 +02:00
Josue Huaroto 4d84bee6f6 Add Zoom level to the 3D viewer in PCB 2023-09-01 17:51:50 +00:00
Jeff Young 69a1b30b8a Implement undo/redo around Pad Edit Mode changes. 2023-09-01 18:48:46 +01:00
Jeff Young aacb85bdab Make sure enum gets initialized. 2023-09-01 18:48:46 +01:00
Jeff Young 68c839b214 Stop trying to zero-out offset of custom-shaped pads.
It causes *way* to many issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15555
2023-09-01 18:48:46 +01:00
Jeff Young f3f57f77d9 Use STD_BITMAP_BUTTON for change symbols dialog. 2023-09-01 18:48:46 +01:00
jean-pierre charras fe18a9bf97 3d_rendering/raytracing/create_scene.cpp: add test missing in commit 22256c97
Fixes #15560
https://gitlab.com/kicad/code/kicad/-/issues/15560
2023-09-01 15:47:02 +02:00
Marek Roszko aa0df6aaa4 Fill in more descriptions 2023-08-31 22:17:14 -04:00
Marek Roszko ab92d2891e Split the define var message across two lines 2023-08-31 22:09:52 -04:00
Marek Roszko 88a76d4b01 Update argparse to get multiline alignment 2023-08-31 22:09:34 -04:00
Marek Roszko 270c195df9 Sprinkle metavars into cli descriptions 2023-08-31 22:04:25 -04:00
Marek Roszko f357e79f77 Add --define-var / -D to the cli opts for some commands
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15437
2023-08-31 21:46:37 -04:00
Marek Roszko b542539546 Add --drawing-sheet arg for various cli commands for overriding the project sheet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15438
2023-08-31 19:53:23 -04:00
Marek Roszko f869e3fb87 Fix stray arg input/output in 3d export 2023-08-31 19:04:05 -04:00
Marek Roszko df0c220f2b Some small reorg of the cli class base 2023-08-31 18:56:17 -04:00
Josue Huaroto 27048ad4d2 Half number of ticks according to window size 2023-08-31 22:50:14 +00:00
Jeff Young 377ffb00b0 Re-run autoplacement after symbol replacement (when appropriate).
Also prevents an internal wxWidgets assert by clearing grid
selection before deleting rows.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15541
2023-08-31 23:28:59 +01:00
Adam Simpkins 9b69d84688 kicad-cli: add option to control oval drill export behavior
Add an argument to "kicad-cli pcb export drill" to control the oval
holes drill mode for the excellon output format.

The Generate Drill Files GUI dialog recommends the newer "route"
behavior by default.  Previously this option was not exposed in
kicad-cli.  This commit does not change the default kicad-cli behavior,
but simply adds an argument to control it.
2023-08-31 13:57:05 -07:00
jean-pierre charras 160ec181ac dialog_export_svg: add color theme selection.
Previously, the Kicad Classic theme was always used.
2023-08-31 20:33:44 +02:00
Jeff Young 5358343023 Make button alignment consistent. 2023-08-31 17:47:28 +01:00
Jeff Young c9acca1342 Make fromHotkey parameter explicit, and don't set it for non-hotkeys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15527
2023-08-31 17:01:14 +01:00
Seth Hillbrand c2fd2f42eb Update TestDanglingEnds to O(n) speed
The elements don't care which they connect to, so don't search for
points on the page, just collect them all and then test them all

Adjusts f3dd5b73
2023-08-31 15:31:48 +00:00
jean-pierre charras 0aaafc92fc Fix a compil issue with gcc created by commit 21c54f97 (gcc only) 2023-08-31 16:21:40 +02:00
Jeff Young 0002eca70b Fix missing string-to-int conversion. 2023-08-31 15:15:57 +01:00
Jeff Young f08370b3dc Remove no-longer-used guard. 2023-08-31 15:15:57 +01:00
Jeff Young 81117d2217 Fix memory leak from double-allocation. 2023-08-31 15:15:57 +01:00
Jeff Young 9a045af81f Make all debugging statments use netcode (instead of some using netname). 2023-08-31 15:15:57 +01:00
Jeff Young 05135eed66 Extra debugging info for pns regression tests. 2023-08-31 15:15:57 +01:00
Jeff Young ac778163ab Support net queries in PNS_LOG_PLAYER_KICAD_IFACE. 2023-08-31 15:15:57 +01:00
Jeff Young c049e1e90d Formatting (no functional changes). 2023-08-31 15:15:57 +01:00
Marek Roszko 37717a8281 Fix other stroke types still drawing the border regardless of enable 2023-08-31 07:52:19 -04:00
Marek Roszko 21c54f9721 Add two more border props to props panel 2023-08-31 07:49:15 -04:00
Marek Roszko cd884211ef Actually use the sentry dsn define 2023-08-31 06:57:31 -04:00
Jeff Young cb003d8ab4 Don't count pins of both De Morgan variants when matching to footprint pads.
(And remove un unused variable from grid settings dialog.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15550
2023-08-31 11:36:39 +01:00
Jeff Young 09288ecbe2 Formatting. 2023-08-31 11:36:39 +01:00
jean-pierre charras 085485717c Gerber place file: change DCode size of pads others than 1 or A1 to 0.1 mm
Previously it was a round shape 0.0 mm (allowed but not visible)
Gerber Format rev 2023-08 changed it to 0.1 mm (still a round shape)
2023-08-31 11:02:50 +02:00
jean-pierre charras 5bf0689ac8 Fix typos in translatable strings.
fix also a coding style issue.
2023-08-31 10:27:36 +02:00
Marek Roszko 60af0448c5 Add missing if intending to border check 2023-08-30 22:51:08 -04:00
Marek Roszko ffbe0f36da Tweak the textbox file indentation
(layer was previously misaligned as it wasn't intended to be used on a new line
2023-08-30 22:47:10 -04:00
Marek Roszko 2e58f4ea60 Fix three spots it always failed to check if the border was enabled 2023-08-30 22:39:07 -04:00
Marek Roszko 2dcb7caacf Add an explicit border property to textboxes
This means it can remember the last border stroke between enabling/disabling the border
2023-08-30 22:33:55 -04:00
Marek Roszko 87513b4a04 Change the sentry dsn to be build time defined
We ultimately don't want people running personal builds to turn on sentry and start sending us crash logs we can't decipher
2023-08-30 22:17:38 -04:00
Alex Shvartzkop f2403804db Add test for GuessPluginTypeFromLibPath. 2023-08-31 05:08:16 +03:00
Alex Shvartzkop e128896ba6 Schematic plugins refactoring, fixes for PCB plugins.
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03:00
Alex Shvartzkop 7428f3d452 Fix LTspice in ShowType / EnumFromStr. 2023-08-31 04:59:37 +03:00
Jeff Young 4b22b1e831 Debugging aid. 2023-08-31 00:25:20 +01:00
Jeff Young cf14b3c233 Fix conversion to netnames in PNS_DBG output. 2023-08-31 00:25:20 +01:00
Jeff Young aeb8374ae5 Fix presumed typo in collision reporting.
(The format string contains two %d items, but is only passed a
single int.)
2023-08-31 00:25:20 +01:00
Jeff Young ac7ceb03ee Fix warning message typo, empty wxString::Format, and formatting. 2023-08-31 00:25:20 +01:00
Seth Hillbrand 7af5037ad7 Fix version compare for MSW 3D Connexion mouse 2023-08-30 15:10:45 -07:00
Jon Evans 1a8fcdfdd7 Do not crash if PARAM_LIST backing data contains unexpected type 2023-08-30 14:31:27 -04:00
Mike Williams b8a61719c3 Grids: make overrides use existing grids (choice box) 2023-08-30 13:33:04 -04:00
Mike Williams b1a388ca69 Grids: Support X and Y for all grids, add optional names 2023-08-30 11:22:19 -04:00
Mike Williams 9002ade554 Schematic: default editors to mils 2023-08-30 11:22:19 -04:00
Jeff Young 7a8d903412 ADDED: align elements to grid for Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15524
2023-08-30 15:45:31 +01:00
Jeff Young d74e9ba040 Support SHORT_NET_NAME(pin_number) and friends on symbols.
While it's of debatable use in the schematic, some users want to
author them there so that they're then copied onto the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15544
2023-08-30 11:43:35 +01:00
Jeff Young 9e309d1d83 Coding standards and wxS() safety. 2023-08-30 11:18:54 +01:00
Jeff Young ace394aab9 Minor cleanup. 2023-08-30 11:09:11 +01:00
Jeff Young 1eaadf7c7f Clean up pin text plotting code and update print code to match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15501
2023-08-30 10:56:04 +01:00
jean-pierre charras 17775e5377 UNIT_BINDER: allows more room to show values (especially inches need room)
Fixes #15539
https://gitlab.com/kicad/code/kicad/-/issues/15539
2023-08-30 09:12:59 +02:00
jean-pierre charras 67d3528866 fix minor compil warnings 2023-08-30 09:09:54 +02:00
Jeff Young 30a6d33177 Better fix for primary param in value field with other params in params field.
(Replaces 2c8178829982c6e15e443b5a7868b8c953d5126f.)
2023-08-30 00:53:01 +01:00
Alex Shvartzkop f8dac43325 STEP export: add short segments as circles.
Because OCC can't connect two arcs together sometimes.
2023-08-29 23:58:25 +03:00
Josue Huaroto 156288bfcf Extend boundary size of PCB_VIEW 2023-08-29 19:41:36 +00:00
Jeff Young 86f96d544b {slash}-to-/ comparison special-cases need to run both ways.
(The library may be legacy format, or the document may be.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15540
2023-08-29 18:29:49 +01:00
Jeff Young e0b2202e77 Improve naming for alternate pin fuction assignments. 2023-08-29 18:07:27 +01:00
Josue 94e86a69be Update RECT to RECTANGLE 2023-08-29 11:50:22 -05:00
Josue ae3a9d05b5 Remove dialog events 2023-08-29 11:50:16 -05:00
Josue 761929c052 Add OnKillFocus Event for Coordinates and Segment, Rectangle properties 2023-08-29 11:50:15 -05:00
Josue e5316fd1aa Change name: Truncate -> Round 2023-08-29 11:50:12 -05:00
Josue 54aaec3a57 Add Enter event to coordinates and Segment, Rectangle properties 2023-08-29 11:50:10 -05:00
Josue 8d7255aae3 truncate angle values in Segment properties 2023-08-29 11:50:09 -05:00
Josue 6429051750 change Rectangle property: Length to Height 2023-08-29 11:50:05 -05:00
Josue c3766bb250 Implement Length and Width for RECT 2023-08-29 11:50:02 -05:00
Josue f31a524026 add rectangle properties to UI 2023-08-29 11:49:57 -05:00
Josue 5061ca54e7 add length and angle properties to segment 2023-08-29 11:49:55 -05:00
Jeff Young f24cf2250e Make sure we have a BOARD when trying to read nets.
Also fixes a nullptr bug when trying to write nets when we don't
have a NODE.
2023-08-29 17:30:00 +01:00
Alex Shvartzkop af62e4276b Wrap FILE_LINE_READER in try-catch blocks in PCB plugins for CanRead*. 2023-08-29 19:13:55 +03:00
Jeff Young d161602e92 Don't snap a footprint (or group) to its children.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15535
2023-08-29 13:05:08 +01:00
Jeff Young 9fae110031 Make sure copied SCH_PINs get their LIB_PIN pointers set.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15536
2023-08-29 12:29:41 +01:00
Jeff Young d7a3c35f56 Repair over-zealous application of grid origin dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15537
2023-08-29 12:21:21 +01:00
Jeff Young 6f1a41f810 Repair over-zealous grid change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15526
2023-08-29 12:16:06 +01:00
Jeff Young c3d6fecccc Update pin plotting to match pin painting.
(In particular, we moved the number to the top when the name is
not shown, but forgot to update the plotter.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15501
2023-08-29 11:17:35 +01:00
Alex Shvartzkop a9a2d4aa7a Improve error reporting when running Python action plugins.
Python error traceback is now logged to stderr.
On Windows, a console window will pop up if wxTheApp gets destroyed,
because message dialogs crash due to hooks that wxWidgets sets up.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15520
2023-08-29 07:06:11 +03:00
Seth Hillbrand b43f037a91 Better handle many (MANY) duplicate refs
In large designs with thousands of duplicate elements (e.g. power
symbols), we need to be smart about vector management.  Removing all but
the first few items should be batched and not element at a time

Ref: KSC-885
2023-08-28 17:05:09 -07:00
Ian McInerney 040d192690 Migrate common actions to new constructor 2023-08-29 00:19:19 +01:00
Ian McInerney 49705a711e Update fake hotkey action to new constructor 2023-08-29 00:19:19 +01:00
Ian McInerney ba22347904 Move pcb_actions to new constructor 2023-08-29 00:19:19 +01:00
Jeff Young f6a901f84a Attempt to fix ctrl-enter from parameter grid on MSW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15244
2023-08-29 00:09:18 +01:00
Seth Hillbrand 9636321c09 Simplify logic when setting field vector
Previous logic could get stuck in infinite loop if removing element from
the middle of the vector

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15498
2023-08-28 15:26:19 -07:00
Seth Hillbrand fa15f8aa0c Fix compile error
wxMkDir's mode is required for linux but not windows (yay)
2023-08-28 14:57:28 -07:00
Roberto Fernandez Bautista 32b6deb8b1 ADDED Migrate libraries button in Footprint Library Table
Allows easy migration of legacy and non-KiCad footprint libraries
2023-08-28 22:44:10 +02:00
Roberto Fernandez Bautista f693366910 CADSTAR PCB: nullptr safety 2023-08-28 22:38:46 +02:00
Roberto Fernandez Bautista 18e6fa6a53 Fix nullptr exception in cadstar sch plugin
Fixes KICAD-30E
2023-08-28 20:49:42 +02:00
Roberto Fernandez Bautista ae05bf723e Symbol Library Table: Convert CADSTAR and other non-current Symbol Libraries
Anything other than database libraries and kicad s-expr libraries should be converted
2023-08-28 20:49:42 +02:00
Jeff Young 0d39cd5e63 Allow for offset custom-shaped pads with no holes. 2023-08-28 18:07:18 +01:00
Jeff Young 2c81788299 HasAutofill should not preclude a primary parameter in the value field 2023-08-28 17:44:45 +01:00
jean-pierre charras 7ac3e09a08 PANEL_SETUP_SEVERITIES::ImportSettingsFrom(): fix crash: ensure the option
actually exists before setting it.
Fixes #15525
https://gitlab.com/kicad/code/kicad/-/issues/15525
2023-08-28 18:19:10 +02:00
Jeff Young f12c3bb6ff Align sheetpins to grid even when parent sheet is already on grid.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15050
2023-08-28 16:35:04 +01:00
Jeff Young 0e8ca6e952 Increase minimum panel sizes a bit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15523
2023-08-28 15:55:37 +01:00
Wayne Stambaugh e4feb8826b Coverity issue fixes. 2023-08-28 09:29:56 -04:00
jean-pierre charras f4bf3bf611 Do not use the deprecated wxWidgets wxPATH_NORM_ALL flag.
Replaced by our equivalent FN_NORMALIZE_FLAGS flag.
Fix also a typo in a string.
2023-08-28 14:37:15 +02:00
Jeff Young 10ed1d1a7f Save ERC settings (including exclusions) when saving file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15274
2023-08-28 13:27:57 +01:00
Mike Williams b5cfd91268 Preferences: reset tools after grid changes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15522
2023-08-28 08:15:27 -04:00
Jeff Young 4325f4e038 ADDED: alternate pin functions in context menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12852
2023-08-28 12:51:41 +01:00
Mike Williams 3edcef0229 Grids: remove more uses of old user grid in UI
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15515
2023-08-28 07:27:25 -04:00
Jeff Young a4d1b29b91 Remember footprint library browsers liblist width.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15500
2023-08-27 21:17:29 +01:00
Jeff Young 676c6e81a4 Custom pads with round anchors in pre-7.0 files get 90 degree spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518
2023-08-27 20:42:59 +01:00
Roberto Fernandez Bautista 0e1baa6fef CADSTAR Parts Libraries: Correctly handle relative paths to .csa file 2023-08-27 20:52:46 +02:00
Roberto Fernandez Bautista 7037076360 Symbol Library Table: Show CADSTAR Parts Libraries in file selector
Even if same extension, it is good to display it as a way of showing what
we support
2023-08-27 20:52:45 +02:00
Jeff Young b5dc9ddbe0 Don't store address of temp object.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15517
2023-08-27 19:12:36 +01:00
Jeff Young a470cab7b2 Include description for page settings command. 2023-08-27 19:03:17 +01:00
jean-pierre charras 114ff054d3 STEP exporter: export track segments as thick segments with rounded end using arcs.
They are no longer exported as polygons.
Export time is slightly faster and file sizes slightly smaller.
Track arcs are still exported as polygons.
2023-08-27 19:37:41 +02:00
Jeff Young a946f7ab1b Handle non-cardinal major-axis arcs when importing DXF. 2023-08-27 16:36:12 +01:00
Jeff Young eba8acf602 Attempt to fix presumed event ordering issue on MSW. 2023-08-27 13:25:39 +01:00
Jeff Young 75b160e83a Handle DXF arcs with a flipped coord system.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14905
2023-08-27 13:16:49 +01:00
Jeff Young 3f26b29aa2 Minor cleanup and removal of stale comments.
Also attempts to fix a focus-loss bug on GTK after zone dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13221
2023-08-27 10:53:03 +01:00
Jeff Young c48084bbbf Minor cleanup and removal of stale comments. 2023-08-27 10:53:03 +01:00
Jeff Young 67bd2139ad Use standard bitmap button. 2023-08-27 10:53:03 +01:00
jean-pierre charras 9e446ba17b Update Clipper2 to commit 7cf615c2799a9328ec32eb116f46b64ed34aecff.
(it fixes (or try to fix) an issue impacting Kicad)
2023-08-27 11:13:27 +02:00
jean-pierre charras 15f5a14217 Fix minor compil warnings 2023-08-27 11:11:08 +02:00
Jeff Young 7f14b70ac3 Formatting. 2023-08-26 22:43:00 +01:00
Jeff Young 2d630a3c75 Remove useless assert. 2023-08-26 22:43:00 +01:00
Ian McInerney 375c2db844 Fix index calculation in grid submenu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15514
2023-08-26 22:10:13 +01:00
Marek Roszko 208d146a03 Force fontconfig to look at the correct path for fonts.conf on windows 2023-08-26 13:53:43 -04:00
Marek Roszko 53bf7b71c6 Don't call FcInitLoadConfigAndFonts after FcInit() already happened
We are only the default global FcConfig created by calling FcInitLoadConfigAndFonts inside FcInit().
Calling FcInitLoadConfigAndFonts does nothing but creating another FcConfig option that never gets disposed or used because we use the FcConfig functions with null
2023-08-26 13:53:43 -04:00
Jeff Young bc3c8b19c6 Don't include annotations in boundingbox when not including text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15411

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15411
2023-08-26 18:50:10 +01:00
Jeff Young 22256c97f3 Fix logic errors in handling board body visibility.
Also fixes a bug where models were placed above the silk when the
solder paste layer was shown, but on the solder paste layer when
it wasn't shown.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6770
2023-08-26 17:33:57 +01:00
Jeff Young 725840654f Fix copy/pasta.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15509
2023-08-26 16:35:28 +01:00
Jeff Young 949458bbe1 Don't presume all cached glyphs are outline glyphs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15508
2023-08-26 16:12:28 +01:00
Jeff Young 468da441e5 Allow junctions to connect to labels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15496
2023-08-26 16:00:13 +01:00
Marek Roszko 25967b4a0f Fix font map cache access creating invalid entries (and crashes) 2023-08-26 09:24:47 -04:00
Jeff Young 4fefd95e0c Move grid definitions to Prefs and grid origin to a separate dlg.
Grid origin is document-wide, while grid definitions are app-wide.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01:00
jean-pierre charras b3aa8a0c49 Fix a few (minor) compil warnings. 2023-08-26 09:40:09 +02:00
Alex Shvartzkop 331176744c EAGLE import: fixup previous commit. 2023-08-26 00:45:59 +03:00
Alex Shvartzkop f071dd1406 Fix a search pane crash when a row isn't in the hit list.
Fixes KICAD-Q7
Fixes KICAD-1A6
2023-08-25 23:24:32 +03:00
Alex Shvartzkop 0fcf9e2c7d EAGLE import: fix crash when loading unknown signal class name.
Fixes KICAD-3FA
2023-08-25 23:05:50 +03:00
Alex Shvartzkop bfb6269f0a EAGLE import: fix crash when loading a polygon.
Fixes KICAD-TW
2023-08-25 23:05:50 +03:00
Wayne Stambaugh 1db9febcfe Remove duplicate references from change symbol dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15480
2023-08-25 14:08:21 -04:00
Alex Shvartzkop 26f398a4b1 Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow.
It could've been set to point to local variable "reporter" in loadLibrary.

Fixes KICAD-15C
2023-08-25 20:59:56 +03:00
Jeff Young 83fe3576c6 Handle dimensions and textboxes when plotting contours to DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11901
2023-08-25 18:07:49 +01:00
Jeff Young 2ae36312c4 Don't use DXF-native text for textboxes.
It gets the positioning wrong.
2023-08-25 18:07:49 +01:00
Alex Shvartzkop cb3c63b2b1 Fix arc rendering in schematic / symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
2023-08-25 15:42:50 +03:00
Jeff Young e0cf49e73c Fix previous fix for honouring pad offset.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494
2023-08-25 13:05:19 +01:00
Marek Roszko cbc60d90ec Add missing line style prop to eda_shape 2023-08-24 22:32:12 -04:00
Marek Roszko 6e45be8708 Add a friendly name to textboxes for the prop mgr 2023-08-24 21:33:37 -04:00
Marek Roszko d32b55f504 Minor cleanup after last commit 2023-08-24 21:19:35 -04:00
Marek Roszko 339684263c Fix accidental plotting of disabled textbox borders
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15252
2023-08-24 21:03:48 -04:00
Marek Roszko d193334a10 Add vrml export to cli
Roughcut as the vrml exporter needs some loving

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15472
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13952
2023-08-24 20:39:21 -04:00
Alex Shvartzkop b1b66f66f4 Prevent crash when a python script tries to use pcbnew too early.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15414
2023-08-25 00:09:56 +03:00
Alex Shvartzkop 16c35857bf Fix arcs drawing in Cairo. 2023-08-25 00:09:56 +03:00
Alex Shvartzkop f842e6ac7a STEP: export arcs in board contours as curves, not polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13825
2023-08-24 21:53:53 +03:00
Mike Williams c7abbccfac Grids: update context menu on changes to grids
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15492
2023-08-24 14:20:02 -04:00
Mike Williams 2764e59400 Grids: add buttons to re-order grids 2023-08-24 13:58:22 -04:00
Mike Williams 2b78c20a62 PCB: add grid overrides to graphics/router/etc. 2023-08-24 13:58:22 -04:00
Josue Huaroto b224af0d1f Add SCH_TEXT_T and SCH_FIELD_T to Scaled Selection 2023-08-24 16:54:01 +00:00
Mike Williams 1628b65d79 Grid Settings: keep sane via value when hidden in schematic editors 2023-08-24 12:38:54 -04:00
Mike Williams d00a6b4987 Dialogs: add some margins back for GTK 2023-08-24 12:38:54 -04:00
Jeff Young 300014177f Honour pad offset when creating custom pad anchors (and polygons).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494
2023-08-24 17:30:22 +01:00
Jeff Young 0f81dd3b5e Give Grid Settings a more standard KiCad look and feel.
Also simplifies the dialog by removing the user grid (now that you
can add as many user grids as you want).

This does mean that you can no longer have an asymmetric grid, but
it gets too complex if we allow everything for everyone.
2023-08-24 16:41:08 +01:00
Mike Williams 9079df85fd PCB: check ratsnest for nullptr (segfaults) 2023-08-24 10:51:34 -04:00
Mike Williams d9c2e0ab54 PCB: start of grid overrides
Only works for moves.
2023-08-24 10:29:09 -04:00
Mike Williams 0f781f328e GRID_HELPER: push code to parent class
Prep'ing for PCB grid overrides
2023-08-24 10:29:09 -04:00
Wayne Stambaugh 0f621f9af9 Fix multiple inheritance deletion bug in symbol library manager. 2023-08-24 07:59:32 -04:00
Wayne Stambaugh 1026596964 Allow symbols to be derived from other derived symbols.
[CHANGED] Symbols can now be derived from other derived symbols removing
          the requirement to derive from root symbols.
2023-08-24 07:59:32 -04:00
Alex Shvartzkop b8ce97b532 STEP export: fix circles. 2023-08-24 14:57:15 +03:00
Alex Shvartzkop 83e9d87cde STEP export: fix hole cutting counter message. 2023-08-24 14:26:27 +03:00
Jeff Young 7fcce5224d Fix compiler warnings. 2023-08-24 12:12:16 +01:00
Jeff Young 6040f49272 Don't write opaque data types to PNS log. 2023-08-24 12:12:16 +01:00
jean-pierre charras eb8c1d2a90 Fix compil issues (and probably a bug). Also display calculation time info. 2023-08-24 13:02:10 +02:00
Jeff Young a97ba79883 Give Symbol Fields Table GUI a KiCad look & feel. 2023-08-24 11:21:19 +01:00
Jeff Young d1765c3855 Work-around non-functional row-major radio button groups on Mac. 2023-08-24 11:21:19 +01:00
Jeff Young e3b8de9a78 Work-around non-functional row-major radio button groups on Mac. 2023-08-24 11:21:19 +01:00
Alex Shvartzkop cb54bdfa84 STEP export: add bounding box optimizations for cutting holes. 2023-08-24 05:42:56 +03:00
Marek Roszko 4cb60bac1b guard out the currently broken wx version check 2023-08-23 22:06:11 -04:00
Alex Shvartzkop 458d5fbeb8 STEP export: use unfractured polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15486
2023-08-24 03:47:55 +03:00
Jon Evans e118d2fca0 DbLib: Map multiple footprints to footprint filter list
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13587
2023-08-23 19:16:49 -04:00
Ian McInerney 72daeddca3 Get translation for 3d viewer appearance manager tooltips later
The translation database isn't setup during static variable
initialization, so we can't do translations until just before the
strings are used.
2023-08-23 23:49:44 +01:00
Seth Hillbrand f62775de40 Fix missing endif() 2023-08-23 15:23:04 -07:00
Josue Huaroto c19804bb95 Replace DisplayError to an infobar for missing footprint library 2023-08-23 22:05:44 +00:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Roberto Fernandez Bautista f4f1ca352a Fix crash when running PNS Router Dump (pressing 0)
Some ITEMs don't have a Parent
2023-08-23 22:19:47 +02:00
jean-pierre charras 196fc67ece Step exporter: generate oblong pad holes using 2 arcs + 2 segments.
Previously, the oblong shapes were polygons.
2023-08-23 18:16:25 +02:00
Seth Hillbrand a6073ae566 Revert pns_log_file.cpp change to compile 2023-08-23 09:12:43 -07:00
Roberto Fernandez Bautista f75950d646 Build PNS Debug tool as part of Fedora CI 2023-08-23 15:58:45 +00:00
Mike Williams 66ed9cfe57 Schematic Editor: apply grid overrides to more tools 2023-08-23 11:31:27 -04:00
Mike Williams a44dd4d88f Symbol Editor: support grid overrides 2023-08-23 10:12:21 -04:00
Jeff Young 6166a96b8e Update PSN logger to new NET_HANDLE architecture. 2023-08-23 14:10:03 +01:00
Jeff Young 0c37e3c443 Remove realistic-mode (and duplicated settings from preferences).
Most of these settings are now available in the appearances panel.
It was concluded in a Zulip discussion that any missing items can
be added back in time if people find they need them (ie: complain).

Also hooks up 3DViewer to the common language framework.
2023-08-23 14:07:58 +01:00
Seth Hillbrand b9936b6d8a Fix fat-finged correction in c5f97421 2023-08-22 14:41:32 -07:00
Seth Hillbrand c5f9742153 Fix PNS QA compile 2023-08-22 14:10:14 -07:00
Seth Hillbrand 57ae1b872e Fix build issue in Clipper2 for *nix 2023-08-22 12:15:05 -07:00
jean-pierre charras 43c7cfec3a Revert "Record hole knockouts in zone filler earlier"
This reverts commit 3030c80de7.
The commit #3030c80d was a workaround related to a Clipper2 issue.
Updating Clipper2 is a better fix
2023-08-22 18:18:55 +02:00
jean-pierre charras 235006a1b7 Update Clipper2 to commit 4ef91e99756f97cab23e7fa2cd78861deeb61338.
It fixes some of our issues.
However, Clipper issue 618 can create problems in zone filler, Clipper2
will be updated as soom as issue 618 is fixed.
2023-08-22 18:18:55 +02:00
Jeff Young 76cd637895 Make the net identifier opaque to PNS router.
This also improves performance as we don't have to look up the
netcodes in a map.
2023-08-22 15:17:02 +00:00
Mark Roszko 5136ec07cf Add more cli command descriptions 2023-08-22 13:42:16 +00:00
jean-pierre charras b59f7fbd9d DIALOG_TEXT_PROPERTIES_BASE: allows more room in wxTextCtrl for coordinates.
Sometimes coordinates in mils can have many digits.
2023-08-22 15:30:19 +02:00
Mark Roszko 3035bbd1d1 Add back some cli descriptions 2023-08-22 13:29:02 +00:00
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Mike Williams e98dfa2bfc PCB: swap drill and grid origin icon order for convenience
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11738
2023-08-22 08:47:25 -04:00
Jon Evans 0714d3f1ab Fix SHAPE::Distance warnings 2023-08-22 08:30:47 -04:00
Marek Roszko 5327b6878b Fix var naming for export 2023-08-21 21:56:51 -04:00
Marek Roszko 5eac1840a0 Drop the 3d command in favor of direct 2023-08-21 21:47:56 -04:00
Mike Williams f770500bb4 Grids: make user editable 2023-08-21 15:48:25 -04:00
Jeff Young 498b68b8a3 Honour aAllowExtraText flag in LIB_FIELD::GetShownText().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15470
2023-08-21 19:30:20 +01:00
Seth Hillbrand c6f071c542 Add "templates" and "scripts" as possible PCM dirs
Allows organizations to distribute custom templates and scripts to their users in TLDs
2023-08-21 11:17:02 -07:00
Alex Shvartzkop cabcf4afe6 Altium: better message when importing unsupported format versions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15465
2023-08-21 19:22:56 +03:00
Mike Williams 4e763cd9f2 Schematic: ortho line drag bend lines should respect grid overrides 2023-08-21 10:42:44 -04:00
Mike Williams 8b79ab708a Grid Anchors: don't anchor from graphic lines when moving connectables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13672
2023-08-21 10:42:44 -04:00
Jeff Young 55a7b9e6bf More consistent naming.
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00
Jeff Young 3cade7fc47 Don't use string compare for A.NetClass == B.NetClass.
(or A.NetName == B.NetName, or != of either)
2023-08-21 15:26:33 +01:00
Mike Williams d150803dee Grid Tricks: entering editor needs to set selection to edited cell
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15453
2023-08-21 09:14:27 -04:00
Mike Williams 3d0dc2fc1b Symbol Fields Table: better selection event control
wxGrid changes the selection every time it gets a grid change event so
we need to selectively suppress these.
2023-08-21 08:56:38 -04:00
Jeff Young 3a40b59cd3 Ensure lazy evaluation of DRC rules works on all compilers. 2023-08-21 13:05:37 +01:00
Ian McInerney 2d8b707a3a Remove dummy pad from group before deleting
The dummy pad doesn't need group information, and it asserts when it has
it and is deleted.

Fixes KICAD-3B9
2023-08-21 10:32:50 +01:00
jean-pierre charras 84fa4532b9 DIALOG_EXPORT_STEP: fix some issues:
- add missing inits (the zones were never created)
- fix a incorrect tool tip
- minor enhancements (add afew messages during export)
2023-08-21 09:36:25 +02:00
Marek Roszko b52b05ebbb Add zone export to step export
Mileage may vary on performance, decent enough for my board.
Warning, freecad chokes on boards with zones, but commerical tools are fine

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15234
2023-08-20 22:11:45 -04:00
Mike Williams a9c4534a38 Schematic/Fields Table: handle sheet changes 2023-08-20 16:13:47 -04:00
Jeff Young ab06f277c5 Hook up 3D Viewer preferences menu to commands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15445
2023-08-20 18:10:28 +01:00
Jeff Young cf22d5b99b Preferences setting for force-show-fields-when-fp-selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-20 18:10:28 +01:00
jean-pierre charras 70c05109a0 PCB_PARSER::parsePCB_TEXTBOX(): fix bug when a TCB_TEXTBOX was rotated:
the textbox was rotated, but thai is incorrect: the polygon coordinates
are good, and must be not rotated: only the text angle must be set.
2023-08-20 18:34:57 +02:00
jean-pierre charras 4d1f9f6fb9 Pcbnew: Fix some draw issues in PCB_TEXT and PCB_TEXTBOX:
- fix incorrect ViewGetLayers() layer list.
- fix incorrect color of graphic items (BOARD_CONNECTED_ITEM items) on copper layers
- slightly modify how a PCB_TEXTBOX is drawn on LAYER_LOCKED_ITEM_SHADOW.
Fixes #15458
https://gitlab.com/kicad/code/kicad/-/issues/15458
2023-08-20 17:33:11 +02:00
jean-pierre charras adb1ac8cb8 Fix an incorrect test thact crashes fp editor
Fixes #15457
https://gitlab.com/kicad/code/kicad/-/issues/15457
2023-08-20 14:04:50 +02:00
jean-pierre charras 1c11a2c7bd Capture exceptions thrown by FP_LIB_TABLE::FindRow() in some places.
FindRow() exception is unfortunately not captured in all places using it.
The result is the application closes.
2023-08-20 12:27:37 +02:00
Marek Roszko ea3101587a Add gltf export to step dialog 2023-08-19 19:01:29 -04:00
Marek Roszko 7ef3252064 Use an indeterminate progress bar for the 3d export log window 2023-08-19 19:01:29 -04:00
Marek Roszko 93fa3a17aa Remove plotter.h from one file 2023-08-19 19:01:29 -04:00
Jeff Young 8f1a987044 Fix typos. 2023-08-19 23:20:52 +01:00
Josue Huaroto 08a01bb667 Show warning dialog message when is not possible to create the BOM file. 2023-08-19 21:05:16 +00:00
Jeff Young fa060c7c58 Make sure dummy tracks have ROUTER_TRANSIENT flags.
Also give them more info that might be queried by custom DRC rules.
This currently just includes positioning info (it already included
nets and principal layer).  We *could* also try to figure out all
layers for dummy vias, and/or widths for dummy tracks / arcs....
2023-08-19 20:51:04 +00:00
Marek Roszko 50ac5db8d2 Add binary GLTF export option to kicad-cli
Not by any means finished
2023-08-19 16:47:42 -04:00
Marek Roszko 5870b4f373 Mini-refactor step to a generic "3d" cli option (step command still exists for now) 2023-08-19 16:47:41 -04:00
Jeff Young a2627fec60 Don't snap to footprint-private items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15447
2023-08-19 21:03:05 +01:00
Alex Shvartzkop 865fa10fb2 Fix pad arcs in Gerber plot when aperture macros are disabled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15452
2023-08-19 22:49:37 +03:00
Marek Roszko c20cc24400 Rename export classes to match the scheme 2023-08-19 11:51:50 -04:00
Marek Roszko 32f0f05a98 Rename the export cli files to the cleaner structure 2023-08-19 11:46:18 -04:00
Jon Evans 373fb56fb7 Fix legacy lib table loading logic
Also enforce locking of the mutex
2023-08-18 22:46:33 -04:00
Mark Roszko 4b6116cb30 Move opencascade min to 7.5.0 2023-08-19 02:26:45 +00:00
Jon Evans 0c529411d7 Update SHAPE_POLY_SET API to not hide virtual functions 2023-08-18 21:40:40 -04:00
Jeff Young 6c5ec288a5 Don't unload project out from under someone else.
(Can only currently happen if you import settings from the current
project, but will happen in even more cases once we do MDI.)

Possibly Sentry KICAD-169.
2023-08-18 22:20:09 +01:00
Jeff Young 57d3aef4cd Correct false comments (no functional changes). 2023-08-18 22:20:09 +01:00
Jeff Young 6c9ba52f18 Clean up naming. 2023-08-18 22:20:09 +01:00
Jeff Young ec980e8696 Move "parent" property from PAD to BOARD_ITEM. 2023-08-18 22:20:09 +01:00
Seth Hillbrand 57ba38560c Optimize library load time for Altium plugin
Load times were >20min for moderate sized libraries as EnumFiles
iterated over the entire list for each operation.  The update modifies
our third-party lib to allow a return value, stopping the iteration when
we find our desired entry.  This also provides a short-circuit for
ASCII-based names, allowing single-level parsing if available
2023-08-18 13:50:15 -07:00
Alex Shvartzkop 5131dae568 Graphics import improvements/fixes:
- add support for color
- support non-uniform scale
- add GetImageBBox()
- fix SVG GetImageWidth/Height not being in mm
- fix import offset not being in mm
- add graphics importer for LIB_SYMBOL
2023-08-18 22:52:49 +03:00
Alex Shvartzkop 4e43d4e0db Graphics import: support loading from memory buffer. 2023-08-18 22:52:40 +03:00
Alex Shvartzkop 26a52ecfe9 Move parts of import_gfx to common. 2023-08-18 22:43:54 +03:00
Alex Shvartzkop 1d79952d55 Formatting, update header in io_mgr.h. 2023-08-18 22:41:07 +03:00
Alex Shvartzkop 530f270902 Add cstdint to io_mgr.h 2023-08-18 22:37:48 +03:00
Alex Shvartzkop a06c1ec826 Remove unused variable in legacy_plugin.cpp 2023-08-18 22:37:48 +03:00
Thomas Pointhuber f7f8bf5418 fix coding policy violations 2023-08-18 14:51:33 +02:00
Thomas Pointhuber c2a91caacf altium: verify that file contains "Compound File Binary Format" magic bytes, as we do not support the ASCII format 2023-08-18 14:47:08 +02:00
Jeff Young 85240d590b Remove relative current measurements.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15429
2023-08-18 13:40:52 +01:00
Thomas Pointhuber 94c732409b Fix nullptr SEGFAULT for the case PLUGIN::CanReadBoard() returns false, as no supported PLUGIN was found for the given file. 2023-08-18 14:08:06 +02:00
Jeff Young 988a90d5ee Ignore LOD scale for selections, but not things explicitly hidden.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-18 12:35:32 +01:00
jean-pierre charras bc59ed08b4 EDA_SHAPE::TransformShapeToPolygon() for filled SHAPE_T::POLY: use another algo:
previously, for aClearance/width > 0, a seg of segments (width = aClearance*2) was added
to the polygon shape. This is acceptable for polygons having not a log of vertices.
It does not work fine (bad shape, extremeny long calculation time) if there are
a **lot** of vertices.
Now the polygonal shape is just inflated by width/2. Much faster and better shape.
2023-08-18 12:58:48 +02:00
Jeff Young 1cbc6e33db Save color settings after modification in Appearances Manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15390
2023-08-18 11:05:23 +01:00
Thomas Pointhuber 08003164ce altium: Add support for Nets (connectivity) on polygons and fills for board items 2023-08-18 11:59:53 +02:00
Jeff Young 6a6e839cc4 Move checking for null parent higher.
(Otherwise we set the failure flag without telling the user why.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15415
2023-08-18 10:32:45 +01:00
Marek Roszko 726f09f9ad Add a workaround to Nahimic crapware
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11850
2023-08-17 22:46:22 -04:00
Marek Roszko 3f182a36c9 Silence uint32 to uint8 cast warning 2023-08-17 22:27:15 -04:00
Marek Roszko 57e8127a1c Silence C4263 caused by shape functions being moved around 2023-08-17 22:25:32 -04:00
Rastersoft 5936960c1e Allow to reverse the mouse wheel movement
This MR adds a CheckBox in the preferences window to reverse the
horizontal pan direction
2023-08-17 19:17:50 +00:00
jean-pierre charras a7e74bf4bc Fix a few minor compil and Coverity warnings. 2023-08-17 20:31:40 +02:00
Rastersoft 43fe1eec84 Unify mouse movements 2023-08-17 18:20:22 +00:00
Jeff Young 684344c45c GUI-created measurements of AC gain signals should be gain, not abs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15429
2023-08-17 17:42:17 +01:00
Mike Williams 3cd25f0045 PCB: add ratsnest to search pane
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15338
2023-08-17 10:25:40 -04:00
Jon Evans 1efd75ca79 ADDED: Multi-layer object snapping
Default hotkey Shift+S toggles on/off

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6266
2023-08-17 09:25:47 -04:00
Jeff Young 981089bbd3 Show correct description and units for AC/SP measurements.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15429
2023-08-17 13:32:46 +01:00
Jon Evans bf0592ad53 Lift some point-vs-shape APIs into SHAPE base class
Also provide a virtual method for conversion to polygon
2023-08-17 08:02:14 -04:00
Alex Shvartzkop d02e4f3254 Fix PLUGIN_FILE_DESC copy warning, remove a leftover comment. 2023-08-17 14:43:59 +03:00
Jeff Young 88db775d32 Disable "Override individual item colors" on read-only themes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15426
2023-08-17 11:23:58 +01:00
jean-pierre charras 53b2fda184 Fix some minor compil and Coverity warnings. 2023-08-17 10:06:17 +02:00
Alex Shvartzkop 953cf0d680 Fix KiCad-only board file dialog filter. 2023-08-17 09:36:47 +03:00
Jeff Young f2a8c25084 Update Eagle gold files for spoke angle fixes. 2023-08-16 23:21:18 +01:00
Seth Hillbrand 75f9a5bda8 Add autocomplete for zone connection style property 2023-08-16 11:05:37 -07:00
Jeff Young 25b9a9de7e Fix incorrect assumption about Eagle spoke rotation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428
2023-08-16 17:30:03 +01:00
Jeff Young da031792af Add current signals to AC analyses.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15427
2023-08-16 17:24:59 +01:00
Jeff Young a58547dde5 Better fidelity for Eagle thermal spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428
2023-08-16 17:24:59 +01:00
Alex Shvartzkop 556120554e SVG plotter: fix hidden text orientation when plot is mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15422
2023-08-16 10:43:24 +03:00
Alex Shvartzkop ea65a5a80b Tent vias by default. 2023-08-16 08:28:13 +03:00
Jeff Young c54d97170b Fix bone-headed copy/paste. 2023-08-15 23:28:19 +01:00
Jon Evans e0d4cf2d5b DbLib: Provide more useful feedback when table is misconfigured
(cherry picked from commit 8f57fd82a0)
2023-08-15 20:45:52 +00:00
Jeff Young 750b92b17f Don't allow selection of footprint dimensions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15418
2023-08-15 17:06:56 +01:00
Jeff Young 686704bb31 ADDED: plot control over FP text.
(Also adds said control to "Follow Plot Settings" in 3D viewer.)
2023-08-15 16:56:46 +01:00
Jeff Young 8c33c6c099 Remove unused variable. 2023-08-15 14:08:19 +01:00
Jeff Young f28d29ce1a Center paged dialog after lazy-loading first page. 2023-08-15 12:55:40 +01:00
Jeff Young 460e609619 Remove unused variables. 2023-08-15 12:42:19 +01:00
Jeff Young e30b05fcd0 Try not to forget file history and window state on a crash.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15343
2023-08-15 12:13:34 +01:00
Jeff Young b986391a04 Remove stale teardrops before rebuilding connectivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15398
2023-08-15 12:13:34 +01:00
Alex Shvartzkop 918ada9b16 Fix CI build. 2023-08-15 06:55:32 +03:00
Alex Shvartzkop 9299d3516c Re-add legacy KiCad .emp footprint library support. 2023-08-15 05:40:43 +03:00
Roberto Fernandez Bautista dbfb7880b5 Add IO_MGR::FindPluginTypeFromBoardPath (+QA tests) 2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista 8d5ebf5e30 QA: Add dummy board files (should fail header checks) 2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista fb3e8ef8f1 QA: Add example P-CAD file
Supplied by evanshultz in gitlab issue 3993
2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista 0b0c50471a QA: Add example KiCad legacy PCB files
legacy_demos based on commit e4fdce4a47
2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista 1c95762534 QA: Add example EAGLE PCB file - Adafruit-AHT20-PCB
Source: https://github.com/adafruit/Adafruit-AHT20-PCB
2023-08-15 05:26:12 +03:00
Roberto Fernandez Bautista 87959a4625 QA: Add simple CADSTAR PCB file 2023-08-15 05:26:12 +03:00
Alex Shvartzkop 76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
Alex Shvartzkop a0d96cea9f Rename Save -> SaveBoard, Load -> LoadBoard in PLUGIN. 2023-08-15 05:26:12 +03:00
Marek Roszko 2e5430a874 Fix MSVC build 2023-08-14 18:33:57 -04:00
Jeff Young 2a3c4d0a03 Fix switch stmt fall-through. 2023-08-14 20:38:17 +01:00
Jeff Young ef321e5fcd Un-brighten found text when making a new selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15092
2023-08-14 20:38:17 +01:00
Mike Williams e1d5089c74 Symbol Fields Table: handle recursive sheet add/delete/update 2023-08-14 14:19:26 -04:00
Mike Williams 11b469f16a Hierarchy: fix missing page numbers / sheet instances
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15413
2023-08-14 14:19:26 -04:00
Mike Williams dc103b88d1 Symbol Fields Table: make non-modal
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2141
2023-08-14 14:19:26 -04:00
Mike Williams 1c52a60270 Symbol Fields Table: API cleanups for non-modal window 2023-08-14 14:19:26 -04:00
Jeff Young f45760062b ADDED: appearances manager for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12413
2023-08-14 18:08:36 +01:00
Jeff Young bd8857389a Add a bit of slop for text-shape hit-testing. 2023-08-14 18:08:14 +01:00
jean-pierre charras b983ab4ed5 PCB_SHAPE::swapData( BOARD_ITEM* aImage ): add missing swap of m_netinfo member.
Fixes #15407
https://gitlab.com/kicad/code/kicad/-/issues/15407
2023-08-14 18:15:05 +02:00
jean-pierre charras d8ba6c07ac Pcbnew, DIALOG_PAD_PROPERTIES: ensure the right spoke angle is displayed.
Previously it was sometimes the default value, not the initial value when
opening the dialog.
Fixes #15410
https://gitlab.com/kicad/code/kicad/-/issues/15410
2023-08-14 17:56:16 +02:00
jean-pierre charras ed7c6b376d French translation update. 2023-08-14 17:51:06 +02:00
Mike Williams 63690d4a0b Symbol Fields Table: fix broken delete
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15405
2023-08-14 08:42:03 -04:00
Mike Williams 29796fff9e SCH_REFERENCE_LIST: delete unused code 2023-08-14 08:42:03 -04:00
Marek Roszko 5d001d4858 ADDED: ERC over cli....mostly 2023-08-13 20:31:19 -04:00
Marek Roszko f341fde938 Move RecordERCExclusions and ResolveERCExclusions out of the schematic frame 2023-08-13 19:50:05 -04:00
Marek Roszko 50a4a8639e Move ERC test flow to ERC_TESTER::RunTests 2023-08-13 19:44:10 -04:00
Marek Roszko cb24a612ea Commit erc.v1.json schema 2023-08-13 19:19:20 -04:00
Marek Roszko 87d36dbfd8 Fix up erc json a little 2023-08-13 19:19:20 -04:00
Marek Roszko 061d18cbb0 Support json reports as option in erc/drc dialogs 2023-08-13 19:19:19 -04:00
Marek Roszko e842a788db Split ERC report to its own class like drc 2023-08-13 19:19:19 -04:00
Marek Roszko aa93de3b4c Fix drc schema description 2023-08-13 19:19:19 -04:00
Seth Hillbrand 83b5c98309 Update translations 2023-08-13 14:57:50 -07:00
Milan Šalka b63f3b9dfa Translated using Weblate (Slovak)
Currently translated at 59.1% (5071 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sk/
2023-08-13 23:55:56 +02:00
Tokita, Hiroshi fbd7788054 Translated using Weblate (Japanese)
Currently translated at 93.7% (8029 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-13 23:55:56 +02:00
Toni Laiho 0df7cef937 Translated using Weblate (Finnish)
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-13 23:55:56 +02:00
Wellington Terumi Uemura b91fa76379 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-08-13 23:55:56 +02:00
yangyangdaji 0d428f83e8 Translated using Weblate (Chinese (Simplified))
Currently translated at 92.4% (7919 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-08-13 23:55:56 +02:00
Henrik Kauhanen 85a7def39b Translated using Weblate (Swedish)
Currently translated at 99.5% (8532 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-13 23:55:56 +02:00
dsa-t f4afbb5dc0 Translated using Weblate (Russian)
Currently translated at 90.8% (7779 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-08-13 23:55:55 +02:00
ZbeeGin cb5f39aa91 Translated using Weblate (Polish)
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-08-13 23:55:55 +02:00
Tokita, Hiroshi d180e3a65d Translated using Weblate (Japanese)
Currently translated at 93.7% (8028 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-13 23:55:55 +02:00
Toni Laiho 56e6de1209 Translated using Weblate (Finnish)
Currently translated at 100.0% (8567 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-13 23:55:55 +02:00
Henrik Kauhanen 7a71b879e4 Translated using Weblate (Swedish)
Currently translated at 97.4% (8350 of 8567 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-13 23:55:55 +02:00
Marek Roszko 14a0fa435c ADDED: DRC JSON report 2023-08-13 14:59:10 -04:00
Marek Roszko 64a7bad56e Use fn_str with std file streams
This uses the MSVC-only wchar_t overload
2023-08-13 14:59:10 -04:00
jean-pierre charras 52697c9962 Eeschema, search_handlers: fix a typo and a missing type name for Directive labels 2023-08-13 11:30:32 +02:00
jean-pierre charras 53b732466a pcbnew, DIALOG_GRAPHIC_ITEM_PROPERTIES: fix issues (perhaps platform dependent)
- fix crash when trying to select a layer
- ensure the net selector is always shown when selecting a copper layer.
2023-08-12 11:30:52 +02:00
jean-pierre charras f0d18adfb2 simulator, TUNER_SLIDER: fix incorrect wxWindow parent.
The TUNER_SLIDER were displayed in the wrong wxWindow.
2023-08-12 08:28:01 +02:00
Marek Roszko 34a13cb0c5 Add more thread safety to background jobs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15395
2023-08-11 22:37:43 -04:00
jean-pierre charras 7fe80abdff PCB_GRID_HELPER::BestSnapAnchor() fix overflow due to use of int.
GRID_HELPER::GetVisibleGrid() needs double, does not work with int (overflow).
Fixes #15389
https://gitlab.com/kicad/code/kicad/-/issues/15389
2023-08-11 17:59:24 +02:00
jean-pierre charras 91b3b296fe Update python footprints wizards to be compatible with last changes in code.
(PCB_TEXT Ctor has changed).
2023-08-11 09:57:45 +02:00
Jon Evans e9c51f1d12 Preserve logic that assumes footprint shapes can't have nets 2023-08-11 00:01:39 -04:00
Jon Evans f70b9920cb Fix some warnings 2023-08-10 22:01:55 -04:00
Jon Evans a77e630901 ADDED: Connectivity for graphic shapes on copper layers
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
2023-08-10 21:47:43 -04:00
Marek Roszko 812143ac69 ADDED: Run PCB DRC via cli 2023-08-10 20:20:40 -04:00
Roberto Fernandez Bautista e2cc35db65 Update preview board to latest version in PCB color settings panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15386
2023-08-10 17:25:35 +02:00
Mark Roszko 214c74b89b Update file zone.cpp 2023-08-10 15:15:37 +00:00
jean-pierre charras e82f9e0305 Fix a change committed by mistake (fortunately in a not used code) in cff2583f 2023-08-10 16:28:41 +02:00
jean-pierre charras cff2583f15 Minor fixes to help translations:
- do not translate a debug message.
- remove useless spaces at end of lines (always annoying for translators).
2023-08-10 10:16:24 +02:00
Mark Roszko f88148e4e8 Fix printf assert in ZONE::GetMsgPanelInfo 2023-08-10 02:49:09 +00:00
Alex Shvartzkop 9a4ee3f40f gEDA import: better to auto-position fields instead of reading. 2023-08-10 03:21:15 +03:00
Alex Shvartzkop dbd3895104 gEDA footprint import: fix arcs/circles. 2023-08-10 03:21:12 +03:00
Marek Roszko 241375f41c Add sort indicator to search pane 2023-08-09 20:09:14 -04:00
Roberto Fernandez Bautista fd7781510e PNS Log Viewer: Add Open / Save as GUI functions 2023-08-09 22:21:14 +00:00
Roberto Fernandez Bautista 6ba250a4e6 PNS Log Viewer: Refactor loading/saving functions 2023-08-09 22:21:14 +00:00
Alex Shvartzkop 9b2ac10002 LTspice spelling. 2023-08-10 00:31:21 +03:00
Alex Shvartzkop e498f1b9a0 FOOTPRINT: add a method to auto-position Reference and Value. 2023-08-10 00:30:05 +03:00
Alex Shvartzkop 040fd327ab SHAPE_POLY_SET: add BooleanXor() 2023-08-10 00:29:47 +03:00
Alex Shvartzkop 6d624ac1ff SHAPE_POLY_SET: allow constructing/adding/iterating with POLYGON 2023-08-10 00:29:33 +03:00
Alex Shvartzkop 712d61d2c1 KICAD_CURL_EASY: add SetPostFields(). 2023-08-10 00:29:19 +03:00
Mike Williams 1bc0ceb5a5 Undo/Redo: notify listeners of change events when undo/redoing 2023-08-09 14:32:06 -04:00
Mike Williams 6b2a5f643a Undo/Redo: remove unused NOP type 2023-08-09 14:32:06 -04:00
Mike Williams 2a80b1c32b Undo/Redo: remove unused EXCHANGE_T type 2023-08-09 14:32:06 -04:00
Mike Williams 20fe14c91f SCH_REFERENCE_LIST: add some iterator support 2023-08-09 14:32:06 -04:00
Mike Williams ab1dccd6b3 Symbols: remove dead code 2023-08-09 14:32:06 -04:00
Jeff Young da86593625 ADDED: Implement sorting for search panes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12614
2023-08-09 18:31:33 +01:00
Marek Roszko 4a54ea3b11 Try and fix multi-threading issues with the background job widgets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15377
2023-08-09 07:19:38 -04:00
Jeff Young a6bceb8182 Don't set modified when loading workbook.
Also keep a shadow variable of the legend position so we can notice
when the mpWindow's OnMouseMove() handler changes it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15363
2023-08-09 12:09:29 +01:00
Jeff Young 1b080ed02f Get rid of SIM_NOTEBOOK. It's completely unnecessary. 2023-08-09 12:09:29 +01:00
Marek Roszko a1f1e4c371 update vcpkg baseline 2023-08-08 22:22:48 -04:00
Roberto Fernandez Bautista 54bcd1d5ca PNS Log Viewer: Fix crash on exit
m_board needs to be deleted before m_logFile
2023-08-08 23:33:46 +02:00
Mike Williams bdecdce1b4 Exclude from Sim: move from field to attribute 2023-08-08 12:36:36 -04:00
Jeff Young 88cb1ed8b5 Show row selections in bus alias and members grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15374
2023-08-08 15:59:16 +01:00
Ian McInerney 1dd92b1bb1 Assign focus to the notebook in the ERC/DRC window after running
After running the ERC/DRC, the window would not get focus returned to it
on GTK naturally unless the user pressed the arrow key. This prevented
the ESC key from closing the window after the run was complete and
nothing else was clicked/pressed.

Instead of pulling focus to the dataview with the errors in it (which
would cause problems in GTK, such as moving the viewport to the first
marker (https://gitlab.com/kicad/code/kicad/-/issues/11925), give focus
to the notebook container instead. This will not select the marker, but
still allow the ESC to propagate into the dialog immediately.
2023-08-08 14:02:54 +01:00
Mike Williams 111d73067d Symbol Fields Table: don't deref non-existant ref 2023-08-08 08:17:43 -04:00
Jeff Young 8bb895373a Allow GetLayer() to be used with single-layer zones.
Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15233
2023-08-08 12:43:22 +01:00
Ian McInerney 54759389de Re-add event handler for the menu events generated on macOS
macOS' application menu generates command events and can't call our tool
framework directly, so we have to keep the event table handlers around
to handle these events.
2023-08-08 11:50:24 +01:00
Ian McInerney a3a701a95e Move preferences to an action instead of a wx event 2023-08-08 00:51:22 +01:00
Ian McInerney c41d78f2d3 Remove incorrect bitmap from action 2023-08-08 00:17:58 +01:00
Ian McInerney c7d2f3f380 Move eeschema actions to new constructor 2023-08-08 00:12:31 +01:00
Ian McInerney 890859dcbc Move pleditor actions to new constructor 2023-08-08 00:10:05 +01:00
Ian McInerney e1d77aeeda Update gitignore 2023-08-08 00:10:05 +01:00
Josue Huaroto 670936096e Change behavior of polygons at the end of drawing. 2023-08-07 22:58:52 +00:00
Jon Evans 8776437f29 PNS: Placement is not valid if via can't be placed 2023-08-07 18:42:44 -04:00
Jon Evans bb13e8e754 PNS: Use a via to resolve via sizes 2023-08-07 18:31:05 -04:00
Jon Evans 93b7862615 PNS Log viewer: open project read-only 2023-08-07 18:31:05 -04:00
Jeff Young 7b71e55ab9 Don't allow updates to shown_text outside of cacheShownText().
But also don't use cacheShownText() in c'tors, as it will not call
the subclass's version.
2023-08-07 23:22:09 +01:00
Roberto Fernandez Bautista feb887fe8f PNS: Prevent re-entry events when saving log to file 2023-08-07 23:48:58 +02:00
Roberto Fernandez Bautista 79a6b0d129 PNS: Re-add debugging of via dragging 2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista 6ebc2fca15 PNS: Only log events when EnableRouterDump is true 2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista 3bf9797620 PNS: add new "EnableRouterDump" kicad_advanced setting 2023-08-07 23:43:54 +02:00
Alex Shvartzkop fc869502f4 Fix symbol properties dialog height when symbol has many pins. 2023-08-08 00:00:52 +03:00
Jeff Young 60f0db09aa Make sure text gets rendered in correct colour. 2023-08-07 21:44:04 +01:00
Jeff Young c30bdf9ba8 Implement second-level cache for escaped netnames.
While it's a bit of an encapsulation leak (see comment in
CONNECTION_SUBGRAPH::driverName()), it more than doubles undo/redo
performance in documents with *lots* of nets.
2023-08-07 21:44:04 +01:00
Jeff Young e48a96ecaf Don't call driverName() unless we have a cache miss.
(That is, in fact, the whole purpose of this cache.)
2023-08-07 21:44:03 +01:00
Mike Williams fe32492252 Symbol Fields Table: scope control for limited view of symbols 2023-08-07 15:05:24 -04:00
Mike Williams 6ae8968a5b Symbol Fields Table: add selection controls
Allows cross-probing to other editors.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8188
2023-08-07 15:05:24 -04:00
Jeff Young a7dc720271 Batch undo for Convert To...
Also repairs drawing of dangling symbols for global labels.
2023-08-07 18:38:48 +01:00
Alex Shvartzkop 713d4fc593 Don't crash when symbol editor frame can't load. 2023-08-07 17:20:11 +03:00
Mike Williams 30eae5d896 Fields: preserve field order across sch<->pcb 2023-08-07 09:29:13 -04:00
Mike Williams 25de3e6b33 Fields: synchronize empty fields between sch<->pcb
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15341
2023-08-07 09:29:13 -04:00
Jeff Young 778213ba8f LEGACY_FACTOR was upside-down.
(Should be 1.68/1.61, not 1.61/1.68.)
2023-08-07 14:01:58 +01:00
Jeff Young f5c7455901 Better spacing for page settings. 2023-08-07 14:01:58 +01:00
Jeff Young f43b90b15f Lazy context handling for SVG plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15325
2023-08-07 14:01:58 +01:00
Jon Evans 256c7fa788 Fix character specifier in validator format string
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15367
2023-08-07 08:38:19 -04:00
Alex Shvartzkop 717ee350c8 Support >180 deg arcs in schematic. 2023-08-07 14:18:38 +03:00
Chris Morgan d03c3d0f6d vcpkg.json - Explicitly depend on sqlite3 with a range of features that... 2023-08-06 22:50:39 +00:00
Kuba Sunderland-Ober f7fe411cf5 Add stack guard page to all platforms. 2023-08-06 22:50:02 +00:00
Jeff Young b993311d47 Archive simulator workbook files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15364
2023-08-06 21:57:02 +01:00
Marek Roszko 97fbbceae7 Fix pns_debug_tool build due to font metrics change 2023-08-06 16:51:29 -04:00
Marek Roszko 74ce1de3f4 Allow KICAD_TEST_NOTI to work with no existing file 2023-08-06 16:27:42 -04:00
Jon Evans 103eb556f7 PNS: Make sure log viewer uses the actual design settings 2023-08-06 16:05:37 -04:00
Jeff Young ddbefe13cd Improve default margins. 2023-08-06 20:57:42 +01:00
Jeff Young b401c214f5 Fix missing variable initialization. 2023-08-06 20:57:42 +01:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Marek Roszko a0ebedc0ac Add a KICAD_TEST_NOTI env var for a fake notification on launch 2023-08-06 15:51:35 -04:00
Jon Evans 5cbe3c5d42 PNS: Fix a few issues with debug logging
Hide non-copper layers for clarity

Fix saving of router settings
2023-08-06 15:30:58 -04:00
Marek Roszko ca55656850 Prevent negative center calc on BITMAP_BUTTON 2023-08-06 13:53:34 -04:00
Marek Roszko 856b70b4df Add an extra spacer field for macOS statusbar
macOS lacks grippers and lets status bar fields use the rounded corner which we don't want
2023-08-06 12:05:06 -04:00
jean-pierre charras c594c88492 remove a very old fully outdated debug code that did nothing. 2023-08-06 15:32:41 +02:00
jean-pierre charras 5e04e90fb3 LENGTH_TUNER_TOOL: fix a bug (missing initialization) creating a serious isse.
m_inLengthTuner was not initialized, preventing the tool to be started (sometimes)
Fix also a few not initialized members.
2023-08-06 13:20:43 +02:00
Jon Evans 4c4bbdc8f3 Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15315
2023-08-06 00:56:51 -04:00
Jon Evans 6f2574d0d2 Manual cherry-pick of 2075a99c 2023-08-05 20:13:15 -04:00
Jeff Young c981c3668a Better handling of dangling markers during bus unfold. 2023-08-05 19:30:13 +01:00
Jeff Young 77c19261f6 Fix build. 2023-08-05 18:52:02 +01:00
Jeff Young 6cef504d2d Don't consider newly-added labels when looking for terminal items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15313
2023-08-05 18:50:29 +01:00
jean-pierre charras f18feb2a46 kicad-cli, export plot PDF and SVG: add missing option --drill-shape-opt.
It allows pad/via holes to ber plotted at actual size, small size, or not.
This option exists in GUI, but was missing in kicad-cli.
2023-08-05 18:18:18 +02:00
Marek Roszko 084ec1d669 Add no notifications text, declare frame border style 2023-08-05 11:53:04 -04:00
Jeff Young 0413270012 ADDED: Move Corner To... and Move Midpoint To...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
Roberto Fernandez Bautista ab614ef99f Fix IO_MGR formatting (no functional changes) 2023-08-05 15:57:29 +02:00
Roberto Fernandez Bautista 78ad3b54c3 Fix SOLIDWORKS_PCB / ALTIUM_CIRCUIT_MAKER registration into IO_MGR 2023-08-05 15:57:29 +02:00
jean-pierre charras 86eaa3de35 Pcbnew plot: do not plot via hole on layers where the via does not exist:
buried vias are not on all copper layers. their hole is also not on all
copper layer
Fixes #15355
https://gitlab.com/kicad/code/kicad/-/issues/15355
2023-08-05 10:40:35 +02:00
Marek Roszko 576be53eb1 Add missing committed file change 2023-08-04 22:12:52 -04:00
Marek Roszko 5319316815 Enhance the status bar with background progress and notifications 2023-08-04 22:06:08 -04:00
Josue Huaroto cfa49b5250 Move units labels from ticks to axis label. 2023-08-04 22:41:50 +00:00
Jeff Young d3329a0781 Only re-build the members grid when we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15320
2023-08-04 23:39:47 +01:00
Seth Hillbrand 248404a0d1 Better fix for #15217
Rather than rely on a quirk, we avoid the modified structure

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217
2023-08-04 13:58:35 -07:00
Seth Hillbrand c38ed7044a ADDED: DNP flag for position file export
Adds ability to exclude footprints with DNP flag from position files in
dialog and cli

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15353
2023-08-04 11:02:54 -07:00
Seth Hillbrand 02335010ff Don't try to get a translated empty string
Hashing an empty string can be crashy.  And empty strings are reserved
in gettext, so we shouldn't try.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15354
2023-08-04 10:08:30 -07:00
Jeff Young 620b6b7169 Re-entrancy guard for length tuner tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15268
2023-08-04 17:37:09 +01:00
jean-pierre charras 9a336eeb87 Pcbnew: Plot tented/not tented vias: fox some issues:
Fix mistake in 2 accessors
Fix a checkbox name that was the opposite of its purpose
Add tool-tips ans comments.
Fixes #15352
https://gitlab.com/kicad/code/kicad/-/issues/15352
2023-08-04 18:29:06 +02:00
Jeff Young 1cbef0157d Avoid edge cases on very wide thermal spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15280
2023-08-04 15:38:06 +01:00
Jeff Young c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Jeff Young 29f2afedbd Fix hidden text painting. 2023-08-04 11:37:46 +01:00
jean-pierre charras 9369be6186 French translation update 2023-08-04 08:40:25 +02:00
Jan Mrázek 2d010278ad Fix failure on multiple DRC runs via scripting 2023-08-04 02:32:08 +00:00
Jeff Young 9456fab435 Fix QA gold DRC counts.
Also improves the error message when some spokes are ignored because
they're connected to an isolated island.
2023-08-04 00:35:19 +01:00
Ian McInerney f463b9d017 Don't calculate minor ticks when there are no major ticks to be between
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15179#note_1480427547
2023-08-03 22:27:38 +01:00
Seth Hillbrand ff441c488e Update translations 2023-08-03 11:31:23 -07:00
turkce 3b72cb3d08 Translated using Weblate (Turkish)
Currently translated at 57.9% (4898 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-08-03 20:23:14 +02:00
Henrik Kauhanen a9fd26ee54 Translated using Weblate (Swedish)
Currently translated at 99.8% (8441 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-03 20:23:14 +02:00
Tokita, Hiroshi 697d82a3ba Translated using Weblate (Japanese)
Currently translated at 95.8% (8102 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-03 20:23:13 +02:00
Tokita, Hiroshi d7ef16e99f Translated using Weblate (Japanese)
Currently translated at 95.8% (8101 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-03 20:23:13 +02:00
Tokita, Hiroshi 7f107543d1 Translated using Weblate (Japanese)
Currently translated at 95.5% (8078 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-03 20:23:13 +02:00
Rigo Ligo 0ae32af872 Translated using Weblate (Chinese (Simplified))
Currently translated at 94.5% (7991 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-08-03 20:23:13 +02:00
Tokita, Hiroshi f2b39ef291 Translated using Weblate (Japanese)
Currently translated at 95.0% (8032 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-08-03 20:23:13 +02:00
Toni Laiho 1d3cee8f54 Translated using Weblate (Finnish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-03 20:23:13 +02:00
Mark Hämmerling be7a11fa09 Translated using Weblate (German)
Currently translated at 95.7% (8093 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-08-03 20:23:13 +02:00
Hubert Hu 779b861fda Translated using Weblate (Chinese (Simplified))
Currently translated at 94.5% (7991 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-08-03 20:23:13 +02:00
Hubert Hu 55c7acac7e Translated using Weblate (Chinese (Simplified))
Currently translated at 94.5% (7991 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-08-03 20:23:13 +02:00
Djamel Dellaa e4b198e86e Translated using Weblate (Arabic)
Currently translated at 1.1% (101 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ar/
2023-08-03 20:23:13 +02:00
Jan Straka b9eba5854f Translated using Weblate (Czech)
Currently translated at 86.4% (7308 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-08-03 20:23:13 +02:00
Andrey Fedorushkov f6e00784d5 Translated using Weblate (Russian)
Currently translated at 92.8% (7851 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-08-03 20:23:12 +02:00
Li Yidong b5c1087fa4 Translated using Weblate (Chinese (Simplified))
Currently translated at 94.5% (7991 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-08-03 20:23:12 +02:00
Elias Sjögreen 2f084c4fc2 Translated using Weblate (Swedish)
Currently translated at 99.8% (8441 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-03 20:23:12 +02:00
Luc 63b037dab8 Translated using Weblate (German)
Currently translated at 95.6% (8086 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-08-03 20:23:12 +02:00
Toni Laiho 228d930b51 Translated using Weblate (Finnish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-03 20:23:12 +02:00
aris-kimi 3c914c157c Translated using Weblate (Greek)
Currently translated at 92.4% (7813 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2023-08-03 20:23:12 +02:00
turkce 2647dc1e17 Translated using Weblate (Turkish)
Currently translated at 46.3% (3919 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-08-03 20:23:12 +02:00
Henrik Kauhanen 26ef3734eb Translated using Weblate (Swedish)
Currently translated at 99.8% (8440 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-03 20:23:12 +02:00
ZbeeGin af927535c5 Translated using Weblate (Polish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-08-03 20:23:12 +02:00
Toni Laiho 1cd9d1bc60 Translated using Weblate (Finnish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-03 20:23:11 +02:00
Henrik Kauhanen a90bd7d772 Translated using Weblate (Finnish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-03 20:23:11 +02:00
Henrik Kauhanen 45471ca68a Translated using Weblate (Swedish)
Currently translated at 99.8% (8440 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-03 20:23:11 +02:00
Ivan Chuba a99d7233a0 Translated using Weblate (Ukrainian)
Currently translated at 94.6% (7997 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-08-03 20:23:11 +02:00
Wellington Terumi Uemura 18021f8086 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-08-03 20:23:11 +02:00
Henrik Kauhanen e118742f68 Translated using Weblate (Swedish)
Currently translated at 99.8% (8436 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-08-03 20:23:11 +02:00
ZbeeGin ec37cb4a53 Translated using Weblate (Polish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-08-03 20:23:11 +02:00
Toni Laiho 559699cbee Translated using Weblate (Finnish)
Currently translated at 100.0% (8452 of 8452 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-08-03 20:23:11 +02:00
Seth Hillbrand 7fac72a914 Only deselect existing footprint if currently selected
If we have a footprint currently selected and we click on its empty
space again, we deselect the footprint.  However, if we click on the
empty space of a different footprint, we will select that footprint
instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 11:17:31 -07:00
Jeff Young a9b7b73f10 Make sure pad primitives get normalized before diff'ing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15208
2023-08-03 18:08:33 +01:00
Jeff Young 297bbca0ea Finer-grained messages for diff pads. 2023-08-03 18:08:33 +01:00
Seth Hillbrand a90c9d7c93 Refine the footprint selection logic
- Footprints cannot be selected if they do not have items visible on the
  screen
- Clicking on empty space in a footprint will select it if the space is
  contained in the visible bounding box
- Clicking on a selected footprint a second time will deselect it
- Clicking on a footprint that has pads selected will still select the
  footprint

This avoids having the full footprint bounding box considered when
selecting footprints (useful b/c footprint bbox is often much larger and
unexpected).  Also allows non-standard footprints (e.g. silk or fab only
footprints) to be logically selected if the layers on which they have
elements are visible.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 10:03:15 -07:00
jean-pierre charras 8762859c6d Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:35:49 +02:00
Mike Williams a75fb44349 Common: add fast grid cycling
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12339
2023-08-03 11:57:51 -04:00
Jeff Young 9e019a1ad1 Don't conclude we're unconnected if only connected to isolated island.
Also adds the layer name to the "thermal connection incomplete" DRC
error message.

Also improves zone layer description to not say "X and 1 more" (which
takes as much room as saying "X and Y").

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15279
2023-08-03 16:30:52 +01:00
Mike Williams 457e58d0d5 Schematic: select connections working for multiple selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11022
2023-08-03 11:27:29 -04:00
Mike Williams 22c609fb7b Schematic: handle aligning unaligned sheet pins in aligned sheet
Also fix a rounding bug.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15050
2023-08-03 11:11:34 -04:00
Mike Williams 5b335f1c4e Schematic: junctions need to be added to the view before cleanup
Otherwise they aren't considered for breaking segments.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15146
2023-08-03 10:05:19 -04:00
Roberto Fernandez Bautista 573d2f94de Fix loading of via drill default sizes and other settings from *.brd kicad files 2023-08-03 15:36:20 +02:00
Roberto Fernandez Bautista 30a63b7b32 Fix loading of legacy zone fills in .brd files + Don't refill after board import 2023-08-03 15:36:19 +02:00
Roberto Fernandez Bautista 44ff2f4858 Enable legacy .brd zone fill qa test + fix golden files
Use 0.020mm pen thickness for SVG golden file (generated with build 2013-07-07 BZR 4022)
2023-08-03 15:36:19 +02:00
Roberto Fernandez Bautista b8a7e378d8 QA: Fix utils.images_are_equal + add basic tests for qa utilities
Note: We allow differences of up to 2 pixel thickness due to erosion operation
2023-08-03 15:36:19 +02:00
Mike Williams a0d559e884 Backannotation: skip fields that are individually controlled
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15337
2023-08-03 09:09:28 -04:00
Mike Williams c61da43ee2 Coverity: fix copy paste pointless cast 2023-08-03 08:27:12 -04:00
jean-pierre charras 8649a3e340 Eeschema: fix position of shadow shape of graphic texts in a footprint.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-08-03 13:55:48 +02:00
Jeff Young e2aa3aae8a Don't delete items out from under undo lists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-08-03 10:48:44 +01:00
Seth Hillbrand 0f44876205 Thou shalt not modify the container over which you interate
Lest the memory gremlins are loosed upon the world.

Always use an intermediate container when collecting items to remove.

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15321
2023-08-02 15:59:56 -07:00
Seth Hillbrand 740679fd88 Avoid committing QA test results 2023-08-02 15:28:17 -07:00
Ian McInerney 199098910a Disable shared library building for thirdparty libraries
Specifically, the fmt CMake has defaulted to not specifying the library
type to build, so without BUILD_SHARED_LIBS=OFF set, it might try to
build it as a shared library, which we don't want.
2023-08-02 22:58:32 +01:00
Jeff Young 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Mike Williams 3428bd8e83 Symbol Fields Table: convert to SCH_COMMIT
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11899
2023-08-02 12:51:33 -04:00
Jeff Young 8ac49d0bab General cleanup, coding standards, removal of dead code, etc. 2023-08-02 16:56:56 +01:00
Jeff Young f897b4bac1 Remove cover routines for std::vector.
They just make it harder to see if we're following std::vector's
contract.
2023-08-02 16:56:56 +01:00
Jeff Young 502b91ba6f Capitalize type names. 2023-08-02 16:56:56 +01:00
Jeff Young f332dba095 Try harder to prevent duplicate axis labels. 2023-08-02 16:56:56 +01:00
Jeff Young 485b768da7 Fix issue with stripping non-trailing '9's from tick labels. 2023-08-02 16:56:56 +01:00
Jeff Young 094a80ce31 Stop adding a new return to a sim command every time we read it.
Also stop moving the legend down 40 pixels every time it's read.
2023-08-02 16:56:56 +01:00
Jeff Young fcc770cad6 Fix bugs in .meas cmd syntax for AC small-signal analyses. 2023-08-02 16:56:56 +01:00
Jeff Young e8ae3533d1 Set format on all matching signals. 2023-08-02 16:56:56 +01:00
Josue Huaroto 74695b0995 Change variable substitution for paths in Windows. 2023-08-02 15:40:57 +00:00
Jon Evans 35c372a072 Support expanding selection for schematic graphic lines
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12032
2023-08-01 21:22:35 -04:00
Jon Evans af58281a08 ADDED: Expand selection for graphics in PCB
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12032
2023-08-01 21:14:58 -04:00
Jon Evans ca4d6e8d1d Fix msvc being unhappy 2023-08-01 19:59:58 -04:00
Jon Evans cc7d470f8b PNS: Improve behavior of dragging vias
- Fall back to walkaround when drag fails
- Properly check collisions with holes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15117
2023-08-01 19:03:04 -04:00
Jon Evans 9741d57447 Remove duplicate path for extracting project text variables
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:25:34 -04:00
Jon Evans 2459949d0d A BOARD may not always have a project
For example, if it's the footprint editor model

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:19:21 -04:00
Mike Williams 37fdcce0a0 Fields Editor Table: add checkboxes for fields representing attributes
DNP, Exclude from ..., etc.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15300
2023-08-01 14:33:30 -04:00
Mike Williams 8fb316f995 Symbols: add ${EXCLUDE_FROM_SIM} variable to match the other attributes 2023-08-01 14:33:30 -04:00
Mike Williams df04171234 Fields Editor Table: apply correct column attr to new fields 2023-08-01 14:33:30 -04:00
Mike Williams 39297adc61 Fields Table Editor: remove old assumptions about Qty being last col 2023-08-01 14:33:30 -04:00
Seth Hillbrand f3d65b5156 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-01 10:43:13 -07:00
Mike Williams 25e391719e Fields Table: convert special strings like Quantity to named variables
Before, we did not actually prevent users from adding a field also named
Quantity to their symbols. This of course does not play nicely with the
assumptions that Quantity is a special column in the fields editor.

By making it a named variable, the user can safely add it to a symbol
and it will not be editable, and will also work in the fields table
editor as expected.
2023-08-01 10:55:32 -04:00
jean-pierre charras 3a82374719 sim/sim_model: fix an annoying issue when adding new fields: their ID was
set in undefined, that create an issue (the canonical name was returned as
"Field-1", breaking the schematic file).
Now, new field IDs are not set to -1, and the saved file uses the field name
(if exist) when saving fields with undefined ID.
2023-08-01 13:37:53 +02:00
Mike Williams 65450d9b5d Fields: don't unchanged fields as changed 2023-07-31 15:10:30 -04:00
jean-pierre charras e188b5f8f4 APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in
a User preset, and use the last defined object visibility when switching to
a builtin preset
Fixes #15282
https://gitlab.com/kicad/code/kicad/-/issues/15282
2023-07-31 18:40:23 +02:00
jean-pierre charras 1b0dea069b Symbol editor: minor fix do not allow the lib tree to be docked on bottom or top
of the editor frame: it cannot be displayed.
2023-07-31 18:30:13 +02:00
Mike Williams b34309fdba Schematic: display symbol's user-defined description in message panel
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15298
2023-07-31 11:22:09 -04:00
Mike Williams 744452d092 Sch/PCB: allow back-updating schematic fields from PCB
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15285
2023-07-31 10:38:43 -04:00
Mark Roszko b95b07e54d Turn off the FMT_INSTALL opt 2023-07-30 21:20:04 +00:00
Roberto Fernandez Bautista 54f401c72c Fix import of legacy stroked zone fill + add parsing of segments fills 2023-07-30 20:56:28 +02:00
Roberto Fernandez Bautista f00a68576e Add qa test for legacy (< v5) zone fills
Disable tests for .brd (legacy file format) fill for now.
2023-07-30 20:56:27 +02:00
John Beard 478df24f36 Fix fillets and chamfers when the original lines become zero-length
This needs the ITEM_MODIFICATION_ROUTINE to learn to delete items.
Condense the item change handlers into a single injected object
(ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER) and provide the basic
implementation that just takes some callables.

This simplifies the construction of the routines and also would make
a CHANGE_HANDLER object possible that can be reused between different
tools.
2023-07-30 15:12:28 +01:00
John Beard da0daffa89 Remove more special-casing for fp-edit commit handling
In the EDIT_TOOL::ModifyLines method, there was some
remaining special-casing for FP childen commits.

One bit was put back by mistake (in
0b32ae3f4b) because I thought I'd
left it out of the refactor. In fact it was removed slightly later in
1218f61d0a.

THe other bit is omitting Modify commits in the FP-editor (what the
reinstatement of the above code was trying to cause). This shouldn't
be needed any more.

However, something is still incomplete here as the tools still don't
work correctly in the footprint editor. However, I don't think it's
substantially _more_ broken with the special casing removed and at
least it's less confusing.

Related to: https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-07-30 15:10:30 +01:00
jean-pierre charras d1caadeb4f symbol editor: fix small issues:
* save visibility of the properties panel
* fix correct size of the properties panel after hide/show it.
2023-07-30 11:04:49 +02:00
jean-pierre charras 1548b14f84 DIALOG_LIB_SYMBOL_PROPERTIES: fix incorrect state of two wxCheckboxes.
When opening the dialog, m_excludeFromBomCheckBox and  m_excludeFromBoardCheckBox
states were the opposite of the actual symbol property.
Fixes #15269
https://gitlab.com/kicad/code/kicad/-/issues/15269
2023-07-30 08:42:33 +02:00
jean-pierre charras abcd753bd3 PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
Fixes #15288
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:43:32 +02:00
Seth Hillbrand 018d60eb40 Fix-up for previous commit
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217
2023-07-28 09:47:18 -07:00
Seth Hillbrand 7bd3992350 Change stale_bus_members to work around MSVC issue
Somehow, MSVC vector gets corrupted in certain cases.  While the
mechanism is unclear, using an unordered_set avoids this problem

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217
2023-07-28 09:35:39 -07:00
jean-pierre charras 60806edac0 Gerber export X3: fix an incorrect keyword ("route" must be "rout") 2023-07-27 20:11:04 +02:00
Mike Williams 1e66129218 Schematic: Align Elements to Grid needs to respect grid overrides 2023-07-27 10:45:27 -04:00
Mike Williams c0a9cf2cfa Schematic Point Editor: fix cancel of point drag 2023-07-27 10:45:27 -04:00
jean-pierre charras db382f8782 Eeschema: Export symbols to New Library: Fix Cancel button not working
This bug can crash Eeschema.
Fixes #15278
https://gitlab.com/kicad/code/kicad/-/issues/15278
2023-07-27 15:14:49 +02:00
Jon Evans d2ec4834d9 Fix macOS impl of Valid3DConnexionDriverVersion 2023-07-27 08:30:08 -04:00
Jon Evans 148e111579 Refactor pin orientation to be an enum class
Add various LIB_PIN properties
2023-07-26 23:46:15 -04:00
Jon Evans 000fa28ffc Properties: initial infrastructure for symbol editor 2023-07-26 18:32:14 -04:00
Roberto Fernandez Bautista d5fc2b757d qa_cli: increase to 1200dpi + use 1 pixel erosion in comparisons to golden sample 2023-07-27 00:21:48 +02:00
Seth Hillbrand 96a34e5b57 Consolidate Maximum clearance calculation
We were calculating the same thing in three locations and we missed
adding the clearance from the footprints in, resulting in bad fills and
missed drc errors (see QA addition)
2023-07-26 12:55:48 -07:00
jean-pierre charras 5ea170baab Symbol editor: fix crash when trying to "drag" an item.
Drag or move is an option of the schematic editor, and not in symbol editor.
So it cannot be tested in code for the symbol editor.
Fixes #15264
https://gitlab.com/kicad/code/kicad/-/issues/15264
2023-07-26 08:58:22 +02:00
Seth Hillbrand 812c56bdc7 Clarify NeighboringSegmentFilter
This doesn't affect behavior but makes the code more readable
2023-07-25 11:05:56 -07:00
Seth Hillbrand 530af96da2 Prevent null dereference 2023-07-25 10:53:05 -07:00
Seth Hillbrand 8546d417df Prevent dereferencing end iterator 2023-07-25 10:49:35 -07:00
Kuba Sunderland-Ober 589030d672 Add the fraction numeric form glyphs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14398
2023-07-25 16:58:16 +00:00
Mike Williams 132a0ada73 Grid Overrides: support grids-per-type that override the current grid.
Schematic only at this point while we test and refine.

PCB support is a future addition.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-07-25 10:17:57 -04:00
jean-pierre charras bd503647c6 Add fix in QA, missing in commit a16ab0aa 2023-07-25 11:05:02 +02:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
Kuba Sunderland-Ober b8fc45b14d Implement fontconv in Python.
This fixes metrics of U+1F98 (ᾘ)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14398
2023-07-24 22:23:11 +00:00
Seth Hillbrand 000998ccae When routing, check for board-level clearances
If the board-level clearance exceeds the max pad/track clearance, we end
up missing collisions in the router.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15162
2023-07-24 15:19:21 -07:00
Roberto Fernandez Bautista dadcc70a3d Partially revert 6cb80422
We don't need to touch cmake for anything (avoid confusion for future Devs)
2023-07-24 21:40:06 +00:00
Alex Shvartzkop b784b44ed0 UTF16ToWstring: stop at NUL input terminator. 2023-07-25 00:21:55 +03:00
Roberto Fernandez Bautista 6cb804228b Fix windows build
core needs to be linked after wxWidgets + use wide string literals
2023-07-24 22:59:41 +02:00
Seth Hillbrand 9902250f5d Fix a couple of issues with NAVLIB version checker
Need to include core lib in kiplatform for the version functions.  Need
to link kiplatform into the navlib library in eeschema to load
2023-07-24 13:55:12 -07:00
Roberto Fernandez Bautista b32f712721 Use actual KiCad "Ki" logo on splash screen 2023-07-24 22:33:05 +02:00
Seth Hillbrand 32ad42a435 Add 3dconnexion driver version check
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
Josue Huaroto eeb74dbae9 Sort SCH_ITEM by name on paste 2023-07-24 16:37:25 +00:00
jean-pierre charras e9f6ff4366 Simulator frame: removes * indicator for unsaved workbook after saving it.
Fixes #15236
https://gitlab.com/kicad/code/kicad/-/issues/15236
2023-07-24 08:55:34 +02:00
Mike Williams 7d9f791518 kicad-cli: sch bom export: fix inability to disable grouping
Just set --group-by default to "" (No default grouping), and drop the
additional --group option. Also fix the exclude DNP option.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15246
2023-07-23 13:59:28 -04:00
aris-kimi ce58208d77 Add missing licence lines in iec60664 and naming update 2023-07-23 14:12:03 +00:00
jean-pierre charras 9c5aa82d2c QA test: disable a DRC test that generate a wxWidgets exception,
and is useless in this QA test
2023-07-23 16:02:50 +02:00
John Beard 0b32ae3f4b Reinstate fp-editor-specific commit handling in fillet/chamfer tools
This check was omitted in the refactor of the fillet tool, and
resulted in a bug when undoing the action: the modified lines would
not be un-modified.
2023-07-23 14:48:31 +01:00
jean-pierre charras a343cd0a24 Try to fix a QA issue (disable useless DRC tests for 2 boards) 2023-07-23 13:08:59 +02:00
jean-pierre charras dda9d6c86c BOARD_NETLIST_UPDATER: Minor fix 2023-07-23 13:06:31 +02:00
Alex Shvartzkop d40e34aebe CompoundFileReader: fix build error 2023-07-23 15:13:08 +05:00
Alex Shvartzkop c39dfb9f05 CompoundFileReader: fix UTF16~wstring conversion on 16b wchar compilers 2023-07-23 14:55:15 +05:00
Alex Shvartzkop 430da67222 Altium PCB import: support dashed outlines (Region kind 2) 2023-07-22 22:38:05 +05:00
Josue Huaroto 8a407756c1 Change min and max zoom values 2023-07-22 14:52:54 +00:00
jean-pierre charras 8425e5a0b7 footprint.cpp::GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ):
Do not include invisible fields when aIncludeInvisibleText is false.
2023-07-22 11:48:17 +02:00
jean-pierre charras 878a67ca65 BOARD_NETLIST_UPDATER: fix incorrect handling of new fields added to a Fp
- the new field position/rotation is now the same as its footprint parent.
- it is added to the view.
2023-07-22 10:52:49 +02:00
Alex Shvartzkop 24452f41ad Improvements to Altium PCB/footprint importer:
- Support unicode footprint names
- Set default footprint text size and thickness to match KLC
- Position Reference at the top, Value at the bottom of fp bounding box
2023-07-22 08:55:53 +05:00
John Beard a61b9f4459 Pad dialog: respect IPC maximum pad radius
The IPC-7351C rule (which may be IPC 7352 now), is 25%, or
0.25mm, whichever is smaller. Currently the default ratio is 25%, which
is incorrect for pads with shortest edges over 1mm.

This also means that the "25%" default is applied in one place:
previously sometimes the value came from the default set in PAD,
rather than the value set by this dialog. While the PAD default isn't
changed here, this dialog no longer relies on that value for its
behaviour.
2023-07-22 00:45:36 +01:00
Josue 7f9742791a Re-word tent vias value setting in board_setup and plot
Fix: https://gitlab.com/kicad/code/kicad/-/issues/15210
2023-07-21 17:56:46 -05:00
Seth Hillbrand 7fe83993cf Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice
2023-07-21 15:40:19 -07:00
Seth Hillbrand e71422d2cf Avoid bulking drawing sheet polygons
On the drawing sheet, the polygons are always filled and shouldn't have
additional stroking

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15242
2023-07-21 11:22:32 -07:00
Seth Hillbrand f7f67c6d53 Sort the bus alias set by name
If we place pointers in a set, they are sorted by the pointer value in
memory, not the data, so we need a custom comparator

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11890
2023-07-21 09:03:35 -07:00
Alex Shvartzkop e7af4b86b8 Altium PCB: support solder/paste mask expansion rules.
- Writes expansion values to board design settings
- Imports footprint regions on Cu layers as pads
- Adds support for holes in non-Cu polygons in footprints
2023-07-21 20:03:03 +05:00
Alex Shvartzkop 448de72823 Fix reading legacy zone fills which were based on stroked polygons. 2023-07-21 17:11:09 +05:00
Alex Shvartzkop ef66fe88ac Altium PCB import: import holes in non-Cu polygons. 2023-07-21 08:03:03 +05:00
Alex Shvartzkop eb6cd4cc5d Altium PCB import: remove more invalid polygons. 2023-07-21 08:03:03 +05:00
Alex Shvartzkop f29bacbccd Altium PCB import: some tweaks for font sizes. 2023-07-21 05:08:11 +05:00
Alex Shvartzkop 02652437bf Altium PCB import: fix garbage symbols in font names. 2023-07-21 05:08:11 +05:00
Seth Hillbrand 2485e9a38a Update connectivity python test
Previous test depended on which track was first.  Re-saving the board
changed the track order, so there was no pad connected.  It was still in
the connectivity database, just not at the first track
2023-07-20 15:54:40 -07:00
Jeff Young e4b262d6e1 Fixed-y-scale bug fixes.
Default dialog to SPICE command.
Any of the three axis locks must lock the plotWindow Y axis (otherwise
locking Y2 but not Y1 doesn't preclude zooming).
2023-07-20 17:41:23 +01:00
Jeff Young 06f19aa761 Implement y axis locking for secondary y axes.
Still a bit of a work-in-progress.

Also fixes some bugs with formatting of measurements and cursor values.
2023-07-20 17:21:19 +01:00
jean-pierre charras 619ec2a559 PANEL_PREVIEW_3D_MODEL: Always shows the footprint not flipped, and rot 0.
Otherwise, setting the 3D shapes rotation/position is not so easy.
2023-07-20 17:33:03 +02:00
Seth Hillbrand b827073b3f Update one more board to deal with changed default net clearance 2023-07-19 17:30:48 -07:00
Seth Hillbrand 45ed38a63b Update qa tests to use new zone fill algo 2023-07-19 16:13:49 -07:00
Jeff Young 9c08d4febe ADDED support for simulation plot margins and GUI for Y axis locking. 2023-07-19 23:40:10 +01:00
Jeff Young 65f66755ee Reduce overhead for unused code. 2023-07-19 23:25:05 +01:00
Jeff Young 764913207c Read legend position from workbook. 2023-07-19 23:25:04 +01:00
Seth Hillbrand 6a09cf3551 Refill legacy zone fills on open
Previous check only looked for the existence of a new (as of v6) flag
that controlled which strategy we took.  Previous versions did not write
this flag and so will not hit the check. This works around a missing
version bump from when the feature was introduced.
2023-07-19 14:29:12 -07:00
jean-pierre charras d7e470dbcc PANEL_PREVIEW_3D_MODEL: add an option and fix an issue:
- added option: display board body or just copper layers
(useful to set the 3D model position)
- fix a bug: do not use 3D viewer settings, and do not modify 3D viewer settings
2023-07-19 12:30:42 +02:00
Ian McInerney c26863cc1e Don't try to enable sequential mode on non-existant files on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15222
2023-07-18 21:03:28 +01:00
jean-pierre charras a586bbc3ea Symbol editor, DIALOG_FIELD_PROPERTIES: fix missing initialization of font.
In Symbol editor, tying to change the font of a field did nothing.
2023-07-18 18:40:53 +02:00
jean-pierre charras f8fcf3852f revert a change committed my mistake (in commit aa3e2988) 2023-07-18 17:14:51 +02:00
jean-pierre charras df11673f86 GetISO8601CurrentDateTime(): use %z format on msys2 build ucrt64
(however ucrt64 on msys2 has an issue (crash) with json validator and
can be used only for tests)
2023-07-18 11:23:09 +02:00
jean-pierre charras aa3e298890 Kicad manager: build the PLUGIN_CONTENT_MANAGER only un request, not in
KICAD_MANAGER_FRAME Ctor. Two advantages:
- it is built after the splash screen is dismissed.
- if there are issues when creating the PLUGIN_CONTENT_MANAGER, this is more
easy to debug
2023-07-18 11:19:52 +02:00
Ian McInerney da1e82d57e Fix the fix done in fa0338a9e6 2023-07-17 22:15:11 +01:00
Jeff Young fa0338a9e6 Streamline Mac patches. 2023-07-17 22:07:36 +01:00
Jeff Young f23f75866f Remove dead code. 2023-07-17 22:06:45 +01:00
Jeff Young 64fea38e61 Seems linux impl is different.... 2023-07-17 22:05:04 +01:00
Jeff Young 19073b3e61 Fix background drawing for disabled LAYER_BOX_SELECTOR. 2023-07-17 20:30:52 +01:00
Jeff Young 29bb51560c Fix control enablement in global edit dialogs. 2023-07-17 18:30:07 +01:00
Jeff Young a1de7a77f4 Improve informational hierarchy of PNS Router Settings dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15182
2023-07-17 16:01:15 +01:00
Jeff Young 5e18287ff9 Re-implement some commented-out hole clearance checking in router. 2023-07-17 16:01:15 +01:00
jean-pierre charras 3a4f3cb0b8 Minor Coverity and compil warnings fixes. 2023-07-17 16:19:22 +02:00
Marek Roszko c009328c07 Undo accidental commit from some time ago (woops) 2023-07-16 21:54:09 -04:00
Jon Evans 4e3fd816cb Properties: rework color editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15145
2023-07-16 17:37:36 -04:00
Jeff Young c3c7f731df Fix usage of AUI SetAuiPaneSize() hack in FOOTPRINT_EDIT_FRAME.
This brings it in line with PCB_EDIT_FRAME, which seems to work
reasonably well.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14297
2023-07-16 22:29:21 +01:00
Roberto Fernandez Bautista 6f035de988 Revert "Fix crash when opening schematic setup dialog"
This reverts commit 1a5fb68ace.

[It was already fixed by b7d53e4b18]
2023-07-16 21:47:27 +02:00
Roberto Fernandez Bautista 1a5fb68ace Fix crash when opening schematic setup dialog
m_openPreferencesButton was not correctly initialised to nullptr
2023-07-16 21:42:05 +02:00
Jeff Young 30928796bd Repair new switch-based Global Update Text & Graphics.
We were forgetting to handle wire and bus labels.
2023-07-16 20:41:23 +01:00
Jon Evans 24a3816a34 EDA_TEXT Orientation property shouldn't be exposed to schematics
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15140
2023-07-16 15:19:13 -04:00
jean-pierre charras 58a9b75883 Eechema: Do Not Place markers: add a specific setting for their color.
Previously, the color was the ERROR ERC marker color.
Now they have a specific color.
2023-07-16 20:46:30 +02:00
Jeff Young b7d53e4b18 Fix uninitialized var.
(Also follow Mac GUI guidelines, odd as they are.)
2023-07-16 19:29:38 +01:00
Jeff Young eaa3543d67 Beautify DNP symbols.
Make sure the 'X' is centered over the body, not the body + pins.
2023-07-16 19:18:24 +01:00
Jeff Young 89e2cb0b85 Use loaded colours for DNP symbol.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15203
2023-07-16 18:35:05 +01:00
Jeff Young c2e7827774 Override FOOTPRINT::GetCenter() to ignore text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209
2023-07-16 18:01:45 +01:00
Jeff Young 7b81e964ab Don't copy lock files during project Save As.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15207
2023-07-16 15:40:17 +01:00
John Beard ab55684f0b ADDED: Add step parameter to footprint pad renumbering
Also includes persisting settings for next dialog invocation
and use the TransferDataFromWindow function rather than per-field
accessor methods.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10651
2023-07-16 15:37:12 +01:00
Jeff Young a16033f624 Fix logic errors in DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem().
(We can't exit out if it doesn't match a particular type as we haven't
checked the other types yet.  Use a switch to prevent this.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15206
2023-07-16 14:43:29 +01:00
Jeff Young 7f3839a179 Minor cleanup. 2023-07-16 14:43:29 +01:00
Jeff Young 63c83b3aed Remove dead code, and some formatting cleanup. 2023-07-16 14:43:29 +01:00
Jeff Young 5419055acb We no longer need activate actions with RunSynchronousAction. 2023-07-16 14:43:29 +01:00
Jeff Young 537d6bdb75 Don't destroy ERC dialog twice.
(And some other cleanup.)
2023-07-16 14:43:29 +01:00
Jeff Young a09a5cb641 More undo cleanup.
The symbol editor has few enough items that it will still be performant
if we always send a selected-item-modifed event.  (As it turns out we
were doing that anyway as the check for child-modified flags didn't
also check for selected.)
2023-07-16 14:43:29 +01:00
Roberto Fernandez Bautista cf0b719a4a Fix some unreachable code msvc warnings 2023-07-16 15:41:05 +02:00
Roberto Fernandez Bautista e7019cc7d2 Fix msvc warnings in kimath (add explicit casts) 2023-07-16 15:41:04 +02:00
jean-pierre charras 0741471092 GetISO8601CurrentDateTime(): workaround on msys2 to fix a format issue.
on msys2 the format %z is seen as %Z, which is not acceptable here.
so %z format is removed on msys2
2023-07-16 09:31:28 +02:00
jean-pierre charras 0ecf5033e2 string_utils: Add From_UTF8( const char* cstring ) and From_UTF8( const std::string aString ),
mainly because we now use std::string in a lot of function using previously char*
FROM_UTF8(const char* cstring) now calls From_UTF8(const char* cstring)
2023-07-16 08:21:43 +02:00
Jeff Young 89780d353a Pick up snapped item's line properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15192
2023-07-15 20:22:34 +01:00
Marek Roszko a8f3b63eb2 Use fmt instead of sprintfing into a char buf into a std::string
Also fix the EPS format header, it had the % escaped with a %, but it wasn't in a printf but direct append to the std::string
2023-07-15 14:07:22 -04:00
Marek Roszko a5cf2716b6 Update {fmt} to 10.0.0 2023-07-15 13:49:55 -04:00
Marek Roszko 76cef27014 Remove needless utf8 conversion due to sleepyness 2023-07-15 13:34:34 -04:00
Jeff Young 581cbfc112 Don't treat a rule area as an edge cut in the router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15200
2023-07-15 18:30:15 +01:00
Jeff Young 0446152d15 (Very) minor performance improvement. 2023-07-15 17:55:12 +01:00
Jeff Young 1218f61d0a Implement undo/redo for footprint children.
Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
2023-07-15 17:37:31 +01:00
Marek Roszko 3233bbe0ba Make exported date time strings use ISO8601 format
Also rename the function to be explicit on its result format

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15185
2023-07-14 23:24:12 -04:00
Jeff Young c3222b0652 Clear edit flags on footprint children in footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15199
2023-07-14 22:16:11 +01:00
Jeff Young 24e9cf4fd8 Improve self-documentation of sim workbook. 2023-07-14 21:02:51 +01:00
Jeff Young 041bd2a54f JSON bools can be read straight up; no need to compare to "true".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15197
2023-07-14 20:58:12 +01:00
Jeff Young d02e94805a Store original boardItem (before promoting ent.m_item to parent footprint). 2023-07-14 20:43:13 +01:00
Jeff Young 3aa479cd54 Fix typo. 2023-07-14 19:48:28 +01:00
Jeff Young 593b77be8c Fix typo. 2023-07-14 19:47:15 +01:00
Jeff Young cbf685ad76 Clear owner of old watcher before resetting std::unique_ptr.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-14 19:32:20 +01:00
Jeff Young 054252ccbe Move sim workbook to json.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15197
2023-07-14 17:46:06 +01:00
Jeff Young ff044cd0cf Mostly a terminology update...
... but also makes DIALOG_SIM_COMMAND and SIMULATOR_REPORTER a bit
more simulator-agnostic.
2023-07-14 17:46:06 +01:00
Seth Hillbrand f45883ac3d Ensure watcher is valid
Call ordering appears to allow invalid m_watcher settings for MacOS, so
we need to check if m_watcher has been initialized before clearing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-14 09:11:08 -07:00
jean-pierre charras 3ac454153e Pcbnew, footprint editor: fix crash due to a null pointer use 2023-07-14 15:13:17 +02:00
Marek Roszko cbb8835c87 Add policy to alter curl revoke settings on windows 2023-07-13 19:01:04 -04:00
Marek Roszko b0fa2561b6 Add support for enum based policies 2023-07-13 19:01:04 -04:00
Jeff Young 8d2c744349 More error messages for reading workbook files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15197
2023-07-13 23:54:00 +01:00
Jeff Young c4179cb996 Correctly initialize New Simulation Command dialog. 2023-07-13 23:37:48 +01:00
Jeff Young 5f8583cd25 Try both ends to see if one is a wire.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15178
2023-07-13 18:20:28 +01:00
Jeff Young 964e42a611 ADDED text-based pole-zero analyses. 2023-07-13 16:18:25 +01:00
Jeff Young 841b693c91 Add pole-zero command parsing and printing. 2023-07-13 16:04:29 +01:00
Jeff Young 2e89c735c0 Fix buffer overrun.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15187
2023-07-13 16:04:29 +01:00
Mike Williams c0a5be4e9f Hotkeys: add support for alternate hotkeys
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4422
2023-07-13 10:11:46 -04:00
Josue Huaroto 4cad021ef4 Add Open preferences folder button in Preferences Dialog 2023-07-13 14:10:31 +00:00
Jeff Young cf8294b5c2 Remove a bunch of blind (and a few redundant) static_casts. 2023-07-13 14:14:45 +01:00
Sergio Costas 181ae7f450 Change all bare isnan calls into std::isnan 2023-07-13 12:55:58 +00:00
Ian McInerney ae60b57c3d Add default parameter to PCB image placement action 2023-07-13 13:15:19 +01:00
jean-pierre charras 7ac0ca9c14 Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 10:53:50 +02:00
jean-pierre charras 34e9de72ae fix a compil warning (shadowed var) 2023-07-13 07:46:08 +02:00
Josue Huaroto 3c12217304 Update PCM log messages
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9753
2023-07-13 00:14:46 +00:00
Ian McInerney 5aff8b6a6e Switch to string_view in tool action construction
The TOOL_ACTION_ARGS construction method is supposed to be fairly light
weight, so instead of creating/destroying strings all the time, pass
string_views to the actual string data instead.

wx doesn't currently support string_view -> wxString implicitly
currently, so we have to do the conversion ourself.
2023-07-13 00:53:06 +01:00
Ian McInerney e926952f66 Break long header link with TOOL_ACTION and TOOLS_HOLDER 2023-07-13 00:18:20 +01:00
Ian McInerney a98e25d4df Switch gerview actions to new tool action arg constructors 2023-07-12 23:00:13 +01:00
Ian McInerney e82a58a12e Changed: Allow filling/unfilling individual zones with no selection
The draft fill and single zone unfill would only work if something was
selected first, this allows them to call the selection operation to
request what is under the cursor. Also properly gate the operation to
not cause crashes/issues when the selection contains non-zone items.
2023-07-12 23:00:13 +01:00
Seth Hillbrand dde017cdc2 Force remove tree watcher when setting
The lib watch on Mac may not actually remove the tree on DTOR, so we
need to force the removal.  This also adds some additional debug flags
if the issue continues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-12 14:29:06 -07:00
Mike Williams cfa0d4bfb7 Symbol Fields Table: handle missing fields better
Treat missing ones as empty, unless they are a named variable field and
then resolve the field.
2023-07-12 16:40:08 -04:00
Mike Williams e26dcbece4 Symbol Fields Table: add item number support 2023-07-12 15:08:50 -04:00
Ian McInerney a8f628d0df Add virtual destructor for base class 2023-07-12 19:39:15 +01:00
John Beard c8a65a631b Add Inkscape palette file for icon colours
Colours per https://dev-docs.kicad.org/en/rules-guidelines/icon-design.

Place or symlink this file in ~/.config/inkscape/palettes and you can
have easy access to the correct colours.
2023-07-12 19:21:47 +01:00
John Beard 09c0f713cd Add fillet and chamfer icons 2023-07-12 19:21:47 +01:00
John Beard a72ab9f351 Put fillet, chamfer and extend in a submenu 2023-07-12 19:21:47 +01:00
John Beard 046d978ba7 ADDED: Pcbnew chamfer and extend tools
Using the new ITEM_MODIFICATION_ROUTINE system, drop in two new
tools: chamfer and line extend. These are two geometric operations
that are relatively common when editing footprints in particular.

Chamfer delegates the geometric calculations to a dedicated unit
in kimath/geometry.
2023-07-12 19:21:37 +01:00
John Beard 8e0e9ce752 Generalise fillet tool
Describe the actions of the fillet tools is a generic way, so that the
same general pattern can be used for other tools that modify shapes on
the BOARD.

Basically, an "ITEM_MODIFICATION_ROUTINE" is defined, which is
configured and called multiple times, calling back to the EDIT_TOOL when
it modifies or creates an item.

The motivation here is to make it easier to slot in new line-based
tools like chamfer, extend and so on without having to redo the
complicated item, selection and commit handling each time, and keep the
core "routines" simple and decoupled from the EDIT_TOOL's
internals.

This also resolves #15094 because the new commit handling does the right
thing when items were "conjured up" for the fillet (e.g. when a
rectangle is decomposed into lines).

Fixes: #15094
2023-07-12 19:21:26 +01:00
Seth Hillbrand 3030c80de7 Record hole knockouts in zone filler earlier
Spokes are placed across an entire pad when filling, so the hole
knockouts need to knocked out prior to deflating

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15160
2023-07-12 11:17:57 -07:00
Jeff Young a85a2b9cbc Add via solder mask to 3D viewer rendering.
(Of course, only when vias are not tented.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-12 18:28:02 +01:00
Jeff Young 8f754c7c3e A more performant and slighty more aggressive blob trimmer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14462

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14107
2023-07-12 17:30:42 +01:00
Jeff Young 56752e9bad Move some MRU paths from app to project.
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
Mike Williams 265720ec65 BOM Export: add DNP to Group By * defaults
Closer to the BOM export scripts we are trying to replace, and gives the
user a clue that fields with variables names are way to export other
data.
2023-07-12 12:16:14 -04:00
Mike Williams 7cb8d3d1c9 Schematic fields: implement fields with variables as names
Special case that always fills in the value with the value of the
variable
2023-07-12 12:16:14 -04:00
Mike Williams e2f47ecabb Common: add GetTextVars for unexpanded variable names 2023-07-12 12:16:14 -04:00
Mike Williams 500779fc80 Properties: add ability to override writeable attribute 2023-07-12 12:16:14 -04:00
jean-pierre charras 2e7db309bd Fix typo 2023-07-12 17:24:03 +02:00
Alex Shvartzkop 89a9eee174 LTspice import: fix Mac path variable shadowing. 2023-07-12 18:07:26 +05:00
jean-pierre charras b47f172e57 PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.
Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
2023-07-12 13:02:05 +02:00
Marek Roszko 8abd32c97c HideSplash() earlier before the initial frame->Show()
There are instances we can throw modals very fast on frame show :/

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15168
2023-07-12 06:55:01 -04:00
Jeff Young 0a28956cf8 Replace misssing "if" stmt and make outer "if" catch all cases of log scales.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15174
2023-07-12 10:41:46 +01:00
Jeff Young be63e1824e Create filled polygons when centerline is chosen. 2023-07-12 10:41:46 +01:00
Alex Shvartzkop f8f7b84f13 LTspice import: add LTspice 17.1 Windows library path. 2023-07-12 10:57:30 +05:00
Alex Shvartzkop c652abecff LTspice import: don't scan input file directory recursively. 2023-07-12 09:58:51 +05:00
Alex Shvartzkop 2266ba78c5 LTspice import: much faster library path scanning. 2023-07-12 08:38:18 +05:00
Alex Shvartzkop 32fdb231b2 LTspice import: fill symbol rectangles with body color when needed. 2023-07-12 08:38:18 +05:00
Alex Shvartzkop 568a461080 LTspice import: Fix multiline text alignment. 2023-07-12 08:38:18 +05:00
jean-pierre charras 2cb23bd43a VIA on solder mask: fix incorrect size (radius) of displayed mask 2023-07-11 17:35:30 +02:00
jean-pierre charras 74c5f5a054 Ensure a layer exists before using it.
Fixes #15170
https://gitlab.com/kicad/code/kicad/-/issues/15170
2023-07-11 16:19:46 +02:00
Jeff Young f8f29b55cb Don't promote to sheet parent when the item itself is a sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15167
2023-07-11 14:52:05 +01:00
Jeff Young c3d10084b9 ADDED footprint associations dialog. 2023-07-11 14:52:05 +01:00
Mike Williams 3a7de82243 PCB: respect styling settings when inserting footprint from editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15155
2023-07-11 08:16:48 -04:00
Alex Shvartzkop 0bc546fa62 LTspice import: fixes for graphical items. 2023-07-11 16:03:29 +05:00
Alex Shvartzkop a5ba9ccce2 LTspice import: don't try loading .asc files for non-subsheets.
Subsheets don't have "Prefix" attribute, components do.
2023-07-11 16:03:29 +05:00
jean-pierre charras ab4535f01b Pcbnew, show solder mask on VIAS: refinement: take in account the mask expansion. 2023-07-11 11:07:50 +02:00
Alex Shvartzkop ef1a2ff050 LTspice import: text and pin justification, polarity fixes. 2023-07-11 13:00:43 +05:00
Alex Shvartzkop e80e4ff410 LTspice import: hide pin names with None justification, hide pin numbers 2023-07-11 12:57:56 +05:00
Mark Roszko a38875d6dd Add env variable to turn on curl verbose 2023-07-11 01:42:51 +00:00
Wayne Stambaugh 929a6a2b99 Coding policy fixes. 2023-07-10 19:24:59 -04:00
Alex Shvartzkop b957c1ad17 LTspice import: Support VCenter text justification 2023-07-11 04:09:16 +05:00
Alex Shvartzkop 1e149704b8 LTspice import: Fix M270 symbol orientation. 2023-07-11 04:09:16 +05:00
Jeff Young 879e6c302d Redraw via mask layers when switching Tented Vias on/off.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-10 23:29:54 +01:00
Alex Shvartzkop cab0db76f8 Clear view before resetting schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15159
2023-07-11 03:00:42 +05:00
Wayne Stambaugh 415dcf82c4 Coverity issue fixes.
CIDs 462497, 462496, 462495, 462494
2023-07-10 17:48:27 -04:00
mitxela 12be115c78 Prevent horizontal scrolling while zoom modifier is held 2023-07-10 19:37:46 +00:00
Wayne Stambaugh aeed542202 Net navigator fixes and improvements.
Remove wires, junctions, and bus entries from tree.  These objects make
the net tree noisy for complex nets.  Until a sane way to group these
objects can be, remove them for now.

Fix tree expansion and debug assertion issues.
2023-07-10 15:34:00 -04:00
Ian McInerney aab8d2b036 Give autocomplete routing a default parameter
Fixes KICAD-2M4
2023-07-10 19:41:03 +01:00
Jeff Young eedf319ba4 Don't double-offset effective text shapes.
Also fixes several bugs with intersheet ref fields.  (It's possible for
other fields to have an ID of 0.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15165
2023-07-10 19:32:00 +01:00
Jeff Young 8f5b7569d1 Split StyleFootprints into separate bools for fields vs text & graphics.
Also moves the settings from Board Setup to Preferences > PCB Editor.

Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
2023-07-10 17:15:57 +01:00
Alex Shvartzkop e43c8fcf6b Non-Windows uses libs3d_plugin prefix for S3D plugins.
https://gitlab.com/kicad/code/kicad/-/issues/12871
2023-07-10 20:16:38 +05:00
Jeff Young d2f9994fc5 SCH_SHEET::GetContextualTextVars() will return Project text vars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15123
2023-07-10 12:40:04 +01:00
jean-pierre charras 6a47fe1e3c simulator: shows the wxCURSOR_ARROWWAIT cursor only when the sim is running.
Reset the mouse cursor to its default shape when the simulation is finished.
2023-07-10 13:30:14 +02:00
Hendrik v. Raven 7302df8be3 add missing stdlib import
wx_Treebook uses std::function which is not defined (at least) when
using wxWidgets 3.0.5.1. Fix this by adding the import
2023-07-10 11:01:59 +00:00
Jeff Young 3ba7e7e993 A few baby steps in trying to straighten out LTSPICE_SCHEMATIC::Load(). 2023-07-10 11:34:06 +01:00
Jeff Young 229dcde948 Fix a memory leak.
There are likely *many* more in this routine, but I can't quite
understand what it's trying to do.
2023-07-10 11:34:06 +01:00
Alex Shvartzkop 0781d8c175 Filter S3D plugins by name when running from build dir.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12871
2023-07-10 09:32:22 +05:00
Alex Shvartzkop 176b308128 Update graphics error message, don't try drawing after. 2023-07-10 09:32:21 +05:00
Alex Shvartzkop bad08f88a0 Restart drawing after switching backend to fallback. 2023-07-10 09:32:21 +05:00
Alex Shvartzkop 6a123e2381 OpenGL GAL: fix reserved vertices calculation in drawSegmentChain. 2023-07-10 09:32:21 +05:00
Jeff Young 8f9a67063a Straighten out some really confusing terminology in simulator GUI. 2023-07-09 23:07:54 +01:00
Jeff Young 7608350bdc Iron out NewPlot vs EditSimCommand.
Also don't confuse SIM_PLOT_PANEL_BASE with SIM_PLOT_PANEL.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15157
2023-07-09 22:38:48 +01:00
Jeff Young db61fe03b3 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 22:28:26 +01:00
Roberto Fernandez Bautista dfe7051171 LTspice importer fixes
- Correctly find the library paths for new and old LTspice versions
- Use case insensitive comparison (store element names as lower case in the map)
- Better search paths
- Allow user to copy contents of LTspice "lib" folder to the same folder as file being imported

Partially addresses https://gitlab.com/kicad/code/kicad/-/issues/15061
2023-07-09 22:53:23 +02:00
Roberto Fernandez Bautista 6539171459 LTspice importer - remove dead code 2023-07-09 22:51:21 +02:00
Jeff Young df63ca0189 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896
2023-07-09 20:36:55 +01:00
Jeff Young 5aed30ac79 Handle RepeatLastItem for TwoClickPlace items.
(Note that we've always excluded sheet pins from RepeatLastItem.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15108
2023-07-09 20:33:33 +01:00
jean-pierre charras bdaad32dc8 Pcbnew: fix crash when trying to delete a DIMENSION living in a footprint
Fixes #15156
https://gitlab.com/kicad/code/kicad/-/issues/15156
2023-07-09 20:02:56 +02:00
Jeff Young 6182ff4834 Handle delete of sheet pins.
SCH_COMMIT::Stage() can handle promoting the parent, but then the pin
needs to be removed first.  I think it's probably clearer if we just
do the promotion in the delete routine.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15129
2023-07-09 13:40:27 +01:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
jean-pierre charras 4f3e7e6821 *.wks files: always save text font when it is not the default font.
Fixes #15154
https://gitlab.com/kicad/code/kicad/-/issues/15154
2023-07-09 10:51:33 +02:00
Mike Williams cb01ac53fa Schematic: allowing swapping sheet pins on same sheet
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15122
2023-07-08 20:26:26 -04:00
Mike Williams cc7798745e Board Settings: control styling of footprint fields
Can use library values or board default settings. Defaults to board
default settings.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8161
2023-07-08 19:58:11 -04:00
Jeff Young 1d0a5ca34b No point in having a RATSNEST_VIEW_ITEM in FP editor, viewer, etc. 2023-07-08 22:54:14 +01:00
Jeff Young 5bf257cdf6 Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153
2023-07-08 22:50:22 +01:00
Mike Williams bfc3dcbe26 Footprint Editor: don't override field text sizes in editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15134
2023-07-08 16:50:15 -04:00
Jeff Young 25445d9fe0 Make sure all items managed by their parent get correct handling in SCH_COMMIT.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15129
2023-07-08 20:40:30 +01:00
Jeff Young d48e7f159c Re-install tool view items after clearing the view.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15149
2023-07-08 20:40:30 +01:00
Jeff Young 692e060ff4 Fill in missing EDA_ITEM_DESC KICAD_T.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15144
2023-07-08 20:40:30 +01:00
jean-pierre charras 9ee21e4eeb simulator: do not show a message saying a command directive has changed
when there is no old command directive.
2023-07-08 20:30:57 +02:00
Jeff Young 12ed015174 Fix selection highlighting of heirarchical labels and sheet pins. 2023-07-08 18:50:04 +01:00
Jeff Young 5bca002567 Swap non-temp and non-edit flags for SCH_ITEMs.
This is required to keep selected and brightened state across undo.

It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED.  FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags.  But that seems like a risky change....

Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
2023-07-08 18:37:47 +01:00
Jeff Young c8e8b71198 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15129
2023-07-08 12:55:45 +01:00
jean-pierre charras 70ffd971e3 Fix a bug found by Coverity. 2023-07-08 12:51:21 +02:00
StuartTylerRelytDesigns d26aa7dc20 Pcbnew moveIndividually ctrl-M mangles 2+ tracks
CHANGED: moveIndividually ctrl-M not mangle tracks and add grid snapping

Fixes https://gitlab.com/kicad/code/kicad/issues/15124
2023-07-08 09:11:53 +00:00
Mark Roszko e53e571d2d const bool is just bool 2023-07-08 01:02:59 +00:00
Simon Richter fce02ee0b8 Do not fail formatting test when reusing a build env 2023-07-08 00:17:52 +00:00
Jeff Young dc838bc50f Formatting. 2023-07-07 23:41:58 +01:00
Jeff Young 9d9344a815 Save, clear, and restore selection around a footprint reload.
Also fixes a bug with the footprint's UUIDs getting reset.
2023-07-07 23:41:58 +01:00
Seth Hillbrand 998e749918 Move some DRC regression tests
The RegressionZoneFillTests handle issues that are resolved by the zone
filler, so Clipper2 problematic fill belongs there.  Otherwise, the
remaining tests should not refill the zones before running DRC because
we expect the DRC to catch errors without needing a refill
2023-07-07 11:52:25 -07:00
Seth Hillbrand 954b265839 Check for zone-zone overlap
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps
2023-07-07 11:52:25 -07:00
Alex Shvartzkop 2689037bde PDF plotting: support bitmaps with transparency.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5979
2023-07-07 23:29:46 +05:00
Jeff Young 30c2049977 Handle inference of V7 symbol lib DC voltage/current sources.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15127
2023-07-07 16:25:05 +01:00
Jeff Young 534a3efce1 Add a couple of TODOs for SCH_COMMIT. 2023-07-07 15:40:15 +01:00
Jeff Young 922f7128a9 Move item updating and view refresh to SCH_COMMIT::Push().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15132
2023-07-07 15:40:01 +01:00
Jeff Young bde9c2cbc5 ADDED FFT analyses.
CHANGED abandon the unpredictable behaviour of the Simulation Command
dialog.  You now separately add simulation tabs (which have invariant
command types once created), and the dialog edits the current tab.

Also a bunch of bug fixes to make multiple simulation plots actually
work.
2023-07-07 12:33:50 +01:00
Jeff Young d5d2800b03 Sort out terminology issues between vectors and plots. 2023-07-07 12:33:50 +01:00
Jeff Young 443a5dc3bb Syntax help for SPICE functions. 2023-07-07 12:33:49 +01:00
jean-pierre charras 27072e52f7 Fix a compil and Coverity warnings 2023-07-07 10:28:01 +02:00
jean-pierre charras 4f7e9bead5 Fix a typo than can create a crash
Fixes #15126
https://gitlab.com/kicad/code/kicad/-/issues/15126
2023-07-07 10:17:02 +02:00
Ian McInerney 0fd2efa283 Give unfold bus a default parameter for hotkey invocation
Fixes KICAD-2JN
2023-07-06 23:07:24 +01:00
John Beard 10d32bb1d6 Explain wxASSERT in COMMIT::Stage 2023-07-06 21:11:51 +01:00
John Beard ef8cf2d12b Avoid inheriting for POSITIONING_TOOLS_MENU
This only uses the public interface of CONDITIONAL_MENU,
so we can just make on of those and save declaring a wrapper
type.
2023-07-06 21:11:51 +01:00
jean-pierre charras 88ffcec4b5 Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa: this is not
enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord. This creates significant errors for start point
and end points of the arc. Now the center is given in double, and its position
is calculated from angle end points (and radius) to do not generate a position error
for these end points (previously the error could be 20 ... 50 nm)
Fixes #15056
https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-07-06 18:09:38 +02:00
Mike Williams efb452df37 PCB: selectionCursor can optionally take a filter list
Make sure we pass a default nullptr parameter if we want everything.
2023-07-06 11:25:53 -04:00
Mike Williams a1f42b823f PCB: drop unused lockable items list
Unused by any code, and list is incorrect anyway.
2023-07-06 11:25:41 -04:00
Kuba Sunderland-Ober bb27f09108 Fix the missing segments in certain newstroke glyphs.
Fixes #14987 https://gitlab.com/kicad/code/kicad/-/issues/14987
2023-07-05 17:19:01 +00:00
hasecilu d563e5be14 Fix minor offsets on bitmap2component svg file 2023-07-05 14:00:00 +00:00
Kuba Sunderland-Ober 3b261256e7 Use static casts between related classes. 2023-07-05 10:20:18 +00:00
Kuba Sunderland-Ober 751aef4e23 Remove unused variables. 2023-07-05 10:20:18 +00:00
Kuba Sunderland-Ober b938064e29 Fix missing consts. 2023-07-05 10:20:18 +00:00
Josue Huaroto 3ce50c3db5 Add tooltips in PCM repositories dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13169
2023-07-05 10:18:32 +00:00
Ian McInerney 50e0a3a500 Move layer ID to action mapping to PCB_ACTIONS
This mapping function is better suited for a method of the actions
itself rather than just a helper function in one file.
2023-07-05 11:09:34 +01:00
jean-pierre charras 7ae4d78738 French translation update 2023-07-05 11:11:57 +02:00
jean-pierre charras bc8cc826cc Eeschema, PlotInteractiveLayer(): do not print useless info in a PDF plot.
It makes this info more easily readable.
- Remove duplicate properties/fields
- Do not plot empty properties/fields
2023-07-05 11:08:25 +02:00
Alex Shvartzkop a80ac8286d EAGLE PCB import: fix footprint text alignment. 2023-07-05 02:56:06 +03:00
Ian McInerney 2baf4db2b6 Fix tool manager handling in ACTION_MENU event processing
The event handler may not have access to a tool manager, so we must
always check for it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15107
2023-07-04 21:40:14 +01:00
Steven A. Falco 2c983155a4 Allow python 3.12 2023-07-04 19:07:34 +00:00
jean-pierre charras 33e489c4a8 Pcbnew, PlotInteractiveLayer(): do not print useless info in a PDF plot.
It makes this ifo more easily readable.
- Remove duplicate properties
- Do not plot empty properties
- do not plot lib descr and keywords, useless in a pdf plot.
2023-07-04 20:02:28 +02:00
Jeff Young e494017b54 Fix merge error. 2023-07-04 18:53:15 +01:00
Fabien Corona 886a7c2c04 ADDED: S-parameters simulation 2023-07-04 16:01:12 +00:00
Jeff Young d563d66b86 ADDED Fourier analyses of .tran data. 2023-07-04 16:54:38 +01:00
Alex Shvartzkop e892405738 Altium PCB import: read and apply TrueType font names to text. 2023-07-04 13:29:42 +03:00
Alex Shvartzkop 536744d37a Altium PCB import: fix text positioning when not bottom-left aligned. 2023-07-04 13:16:25 +03:00
Alex Shvartzkop 847f538192 Altium PCB import: turn off Keep upright for footprint texts.
Looks like it was set to true by mistake.
2023-07-04 13:11:43 +03:00
Jeff Young 492ef62053 ADDED support to save contributions from all noise generators.
You must first check the checkbox in the Simulation Command dialog,
after which the signals will appear in the User Defined Signals
autocomplete lists.
2023-07-04 11:05:10 +01:00
Alex Shvartzkop 37772ac29e Altium schematic: import net label justification. 2023-07-04 10:27:46 +03:00
Alex Shvartzkop afe176abe2 Optimize PDF plot data size for property popups; fix unicode escape.
Adds a document-level action JSInit, which defines ShM function,
allowing more compact data representation. Also reduces whitespaces.
2023-07-04 08:57:29 +03:00
Alex Shvartzkop b09ab2daab Don't duplicate footprint bookmarks when plotting multiple PCB layers. 2023-07-04 08:08:52 +03:00
Jeff Young 7d3fa8fb4e Plotting for noise simulations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2369
2023-07-03 23:12:28 +01:00
Jeff Young 67c9d3932b Another attempt to fix qa error. 2023-07-03 16:26:20 +01:00
Jeff Young 80340c607c ADDED noise simulation GUI. 2023-07-03 16:26:20 +01:00
Marek Roszko b5e420c33c Fix EDA_TEXT creation that worked due to implicit cast
A leftover from the units object rework and I forgot to double back. The DEFAULT_SIZE_TEXT is set inside the constructor now
2023-07-03 11:23:30 -04:00
Jeff Young 84a3cdada6 Attempted fix for qa-failure on GTK. 2023-07-03 15:46:05 +01:00
Jeff Young 87c106965d Code clarity. 2023-07-03 15:46:05 +01:00
Ian McInerney 247fda80ef Give schematic editor's placeImage action a default parameter 2023-07-03 11:38:51 +01:00
Simon Richter 49a72f7cb4 Fix keyword order in include setup (Closes: #15081)
The SYSTEM keyword can only be used before a visibility keyword, so
"PUBLIC SYSTEM" declares an include directory named "SYSTEM".
2023-07-03 10:11:00 +00:00
jean-pierre charras c00c0cf581 SCH_PLOTTER: fix an issue after plotting a hierarchy (at least 2 sheets)
SCH_EDIT_FRAME::SetCurrentSheet( xxx ) was used to switch to a sheet, but
SCH_EDIT_FRAME::SetCurrentSheet() has side effects to the current VIEW
(clear some data used to show the sheet on screen) and does not fully
restore the "old" screen
SCHEMATIC::SetCurrentSheet( xxx ) is now used to switch to a sheet
2023-07-03 10:33:05 +02:00
Alex Shvartzkop 698fffb128 PDF plotting: Fix "Show Page" in Foxit PDF Reader.
pageNum is an Integer. Acrobat seems to convert automatically.
2023-07-03 09:13:37 +03:00
Alex Shvartzkop 36901bda62 Eeschema: don't plot hiererchical sheet fill when color is transparent. 2023-07-03 02:15:05 +03:00
Alex Shvartzkop 86458ae582 Eeschema printing: fix bg fill when paper orientation or size differs. 2023-07-03 02:15:05 +03:00
Alex Shvartzkop b242779f3b Put background color behind transparent bitmaps in eeschema printing.
Most virtual printers don't support alpha blending via AlphaBlend (MSW)
properly, nor masks.
2023-07-03 02:15:05 +03:00
Alex Shvartzkop 4cb7e92aad Fix overlapping transparent images covering each other in OpenGL GAL. 2023-07-03 02:15:05 +03:00
Alex Shvartzkop f286015bc7 Fix bitmap transparency in Cairo GAL.
Cairo ARGB32 format needs alpha pre-multiplied with color.
2023-07-03 02:15:05 +03:00
Alex Shvartzkop 0d7b4bbb09 Blend transparent images with background color in PDF plotter. 2023-07-03 02:15:05 +03:00
Alex Shvartzkop 7b5e725b98 Improve GAL panel refresh logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-07-03 02:15:05 +03:00
Alex Shvartzkop 55b31030c0 Perf: don't search for niluuid items when moving cursor in eeschema.
Reduces CPU usage by 60% in some cases.
2023-07-03 02:15:05 +03:00
aris-kimi 9eeb609248 Include missing SVGs 2023-07-02 22:27:51 +00:00
Ian McInerney 236de6679c Avoid copying tool parameter in intermediate function call 2023-07-02 22:18:24 +01:00
Ian McInerney 5e740c354e Don't skip loading the wxWidgets message catalogs
The wxWidgets message catalog contains translations for strings that are
in the wx-provided dialogs, and these strings aren't contained in our
message catalog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15035
2023-07-02 19:21:14 +01:00
jean-pierre charras f5d7edaa73 PANEL_SYM_EDITING_OPTIONS: Fix a focus event issue (perhaps platform specific) 2023-07-02 19:46:56 +02:00
Jeff Young ec9b2919ba Allow user-entered repeat pin spacing, but force to grid multiples.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14207
2023-07-02 17:23:01 +01:00
Jeff Young def1a9f39c Add SHORT_NET_NAME processing to footprint variable resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15095
2023-07-02 10:58:10 +01:00
Jeff Young 03fd9c2086 Fix refresh bug after a symbol reload from the file watcher.
Also moves EE_POINT_EDITOR to SCH_COMMIT.  (There was another refresh
bug in RollbackSymbolFromUndo() -- whose only caller was the
EE_POINT_EDITOR's old undo code).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14274
2023-07-02 10:37:50 +01:00
Jeff Young 4cbf512461 Support synchronous move in symbol editor.
Also removes duplicate-during-move.  It's not really compatibile with
a passed-in SCH_COMMIT, and it was never clear it was worth the code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14274
2023-07-02 10:37:50 +01:00
Jon Evans 632e94ef81 Add a few more schematic properties 2023-07-01 22:24:25 -04:00
Jeff Young efac777f28 Don't DisplayCurrentSheet() if we're already on it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14305
2023-07-01 21:57:40 +01:00
Jeff Young bcfb6e4888 Fix diagrams of meander dimensions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10073
2023-07-01 17:06:00 +01:00
Jeff Young 980ef55356 Fix grammatical error in opt-in request.
Also makes it even more clear that design files aren't shared.
2023-07-01 15:47:12 +01:00
Jeff Young 6da71e5d24 Allow routing to a free pad (even if it has a hole).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15093
2023-07-01 14:23:38 +01:00
Jeff Young 63daf336b8 Formatting. 2023-07-01 14:23:38 +01:00
jean-pierre charras 2c068ab86d Fix incorrect comment. No code change. 2023-07-01 14:17:57 +02:00
Jeff Young 9af065684b Show Properties Manager menu entry for FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15088
2023-07-01 12:01:35 +01:00
Jeff Young 9ff33e5ec6 Remove BOARD_COMMIT( TOOL_MANAGER ).
It initializes both m_isFootprintEditor and m_isBoardEditor to false,
causing all sorts of trouble.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15072
2023-07-01 11:52:46 +01:00
jean-pierre charras 011a8f29a3 Pcbnew, Update footprint: fix broken initialization of fields (especially ref and value)
- Revert commit 86e0e1cc, broken
- add comments to avoid a similar mistake
- ensure Reference and Value are correctly handled.
Fixes #15091
https://gitlab.com/kicad/code/kicad/-/issues/15091
2023-07-01 12:29:02 +02:00
Jeff Young eb8994fde5 Disable locked in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089
2023-06-30 20:51:18 +01:00
Jeff Young 7ed5963b4f Disable positioning tools when a move is in progress.
Also fixes a typo in EDIT_TOOL::doMoveSelection().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15090
2023-06-30 20:37:03 +01:00
jean-pierre charras 821f365758 Fix missing include. 2023-06-30 20:20:08 +02:00
jean-pierre charras f3a0c2b658 netlist_exporter_allegro: fix a compil warning, clearly created by a bug in code.
I am not sure the first author wanted to do, but at least the strange
and broken code (clearly due to a too zealous copy/paste) is fixed.
2023-06-30 20:08:13 +02:00
Jeff Young 773e1a1ab6 Actions with a COMMIT must be run synchronously.
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop.  So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
2023-06-30 18:57:37 +01:00
jean-pierre charras 8d46ed3c72 PCad importer: fix segfault in PCAD2KICAD::PCAD_ARC::AddToBoard
Fixes #15086
https://gitlab.com/kicad/code/kicad/-/issues/15086
2023-06-30 17:51:03 +02:00
Jeff Young dd83217062 Add DRC testing for copper graphic to zone fill collisions. 2023-06-30 14:04:20 +01:00
Jon Evans 2ae646136e Prevent crashes on invalid use of tools
See https://gitlab.com/kicad/code/kicad/-/issues/15085
2023-06-29 23:45:22 -04:00
Jon Evans 8fcd58038b Properties: fix click not working multiple times on a color 2023-06-29 23:11:50 -04:00
Jon Evans 59495971ee Properties: fixes to color swatches 2023-06-29 22:53:06 -04:00
Ian McInerney e17cd5abc6 Allow action description to be different from tooltip
The tooltip should be short and easy to read, the description can be
longer and more detailed.
2023-06-30 00:06:03 +01:00
Ian McInerney 8b8586f54b Add case to ignore the unused scroll events in the view framework 2023-06-29 23:21:15 +01:00
Ian McInerney bb4fb9088f Gracefully handle no symbols found in change symbols dialog
Fixes KICAD-2BJ
2023-06-29 23:21:15 +01:00
Ian McInerney 533d7531a1 Via routing actions need to use int flags
The actions the router uses for via placement can be a combination of
enum values, so the actions must use an int parameter instead of the
enum type.

Fixes KICAD-2DS
2023-06-29 23:21:15 +01:00
qu1ck ec94439df4 Footprints swig API: access shown text in fields 2023-06-29 20:36:27 +00:00
Seth Hillbrand 7779a01d48 SIM_VALUE stores significants in 64-bit
stol isn't neccesarily 64-bit though, so we use stoll and catch the
overflow if we have bad input data

Fixes KICAD-2EF
2023-06-29 09:50:27 -07:00
jean-pierre charras 5b42348834 Pcbnew: shows the UUID of a footprint in DIALOG_FOOTPRINT_PROPERTIES.
This is an important property of a footprint, but it is never shown to
a user, although it is used in a lot of cases.
2023-06-29 12:36:20 +02:00
jean-pierre charras 3ef757e3b9 EEschema: hide the splash screen before reading a file, to avoid obfuscate
a info dialog, if any.
Fixes #15076
https://gitlab.com/kicad/code/kicad/-/issues/15076
2023-06-29 12:34:04 +02:00
Jon Evans 3487124a4a Properties: Improve color picker UX 2023-06-28 23:54:27 -04:00
Jon Evans 200316d869 Remove duplicate fields block from netlist exporter
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15055
2023-06-28 20:38:10 -04:00
Jon Evans 0e617774dd DbLib: Remove slashes from table display names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15074
2023-06-28 19:38:21 -04:00
Ian McInerney c3674e6858 Fix incorrect parameter passing in symbol editor drawing
The text box used a different enum than the shapes, so this leads to a
possibility of clashing. The new action framework flagged this problem,
so modify the tool to handle the shape types properly.

Fixes KICAD-2CJ
2023-06-29 00:17:12 +01:00
Ian McInerney 107c79484d Give default nullptr to gridSetOrigin to denote no known origin
Fixes KICAD-2BE
2023-06-29 00:17:12 +01:00
Ian McInerney 30f20a694d Give default parameter to net highlight/selection events
Fixes KICAD-2C7
Fixes KICAD-2C3
2023-06-29 00:17:12 +01:00
Ian McInerney 0de6fb03ba Give updateLocalRatsnest action a default parameter
Fixes KICAD-2BX
2023-06-29 00:17:12 +01:00
Ian McInerney 459e6e192a Give placeFootprint action a default nullptr parameter
Fixes KICAD-2BT
2023-06-29 00:17:12 +01:00
Ian McInerney d923b871d7 Remove group reference when exporting individual footprints 2023-06-29 00:17:12 +01:00
Youbao 4cb993d872 ADDED: Cadence Allegro PCB Designer netlist exporter 2023-06-28 22:47:30 +00:00
Roberto Fernandez Bautista 6d3f512e15 Ensure symbols in subsheets are added to multi-unit map before re-annotating
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14918
2023-06-28 23:30:10 +02:00
Fabien Corona 8abb701727 IBIS: model type should not be case sensitive
Fixes #15068
2023-06-28 22:49:41 +02:00
Kuba Sunderland-Ober 1edb9bb0ce Get rid of VECTOR2U. 2023-06-28 20:48:07 +00:00
Jeff Young e77ff7e4e8 Allow PCBCalculator to respond to both Quit and Close. 2023-06-28 15:00:26 +01:00
Jeff Young 2278f5dbca Don't try to be smart about enabling the Clear Annotation button.
(At a minimum it would need to also handle when the scope changes, but
it's not clear we're adding anything by enabling/disabling it to start
with.)
2023-06-28 14:56:50 +01:00
jean-pierre charras 06c8185133 French translation update 2023-06-28 08:59:14 +02:00
jean-pierre charras 8712dac1a2 Minot fix: Honor Ctrl+Q hotkey in pl_editor and pcb_calculator 2023-06-28 08:56:40 +02:00
Jeff Young c2f2247ae3 Don't process SCINTILLA_TRICKS onCharHook when autocomplete is active.
(ESC being the exception that proves the rule.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15001
2023-06-28 00:05:38 +01:00
Seth Hillbrand 0dc5ba346e Update translations 2023-06-27 15:36:47 -07:00
Jan Straka 4bf825fbeb Translated using Weblate (Czech)
Currently translated at 87.3% (7256 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-06-27 15:36:47 -07:00
Wellington Terumi Uemura 2f1852a7d2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-06-27 15:36:47 -07:00
Allan Nordhøy 66714d06ed Translated using Weblate (Norwegian Bokmål)
Currently translated at 58.1% (4830 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2023-06-27 15:36:46 -07:00
Kuba Sunderland-Ober 95b9196703 Update the scripts to make the font source file fully reproducible. 2023-06-27 20:23:22 +00:00
Jeff Young 216541c9a3 Fix typo in RunAction() declaration.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15067
2023-06-27 17:59:16 +01:00
Jeff Young 1411b09178 Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2023-06-27 17:04:18 +01:00
Seth Hillbrand 30f0351a33 Update translations 2023-06-27 08:29:35 -07:00
Seth Hillbrand 129eb4a099 Reset Turkish translation to Mar 19 2023 2023-06-27 08:29:16 -07:00
jean-pierre charras af71308184 pcb_parser and pcb_plugin: fix incorrect handling of rotation of PCB_TEXTs
in footprints when the text angle is 0 but the fp orientation is not 0.
It was due to the fact angle 0 is not written in file and use the default
value of the created PCB_TEXT in footprint, that is not always 0
Now the angle is always written in file.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-27 08:53:04 +02:00
Seth Hillbrand f3122184df Remove existing footprint when force-reloading
Needs to clear the existing footprint in ReloadFootprint prior to
loading the new one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15040
2023-06-26 17:04:03 -07:00
Ian McInerney 2a940a5f70 Add COMMIT to TOOL_EVENTs instead of passing as a parameter 2023-06-27 00:57:59 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Steve Bollinger a318c57d77 Move E-series resistor selector table out of resistor value
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14627
2023-06-26 23:21:40 +00:00
Jeff Young aa8dbc03a2 Error reporting for missing ltspice symbol (.asy) files. 2023-06-26 21:59:57 +01:00
Jeff Young 29d2265c01 Clean up dead code. 2023-06-26 20:51:58 +01:00
Jeff Young 4f52c69724 Better path handling for importing LTspice files. 2023-06-26 20:51:16 +01:00
Jeff Young 3bdc66d3ed Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14991
2023-06-26 16:59:47 +01:00
Jeff Young 1b7473c353 Make sure Help menu is at end of menubar. 2023-06-26 14:11:13 +01:00
jean-pierre charras 7e8070b700 pcb_parser: fix incorrect handling of rotation of PCB_TEXTs in footprints.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-26 11:27:20 +02:00
Jon Evans c7f6b20405 Properties: Use color picker dialog 2023-06-25 16:32:43 -04:00
Jon Evans a2ff3bce7d Properties: custom rendering for COLOR4D 2023-06-25 16:13:07 -04:00
Jeff Young ed6487da1e Disallow sheet pins from changing sides when edited by point editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15057
2023-06-25 19:55:13 +01:00
Jeff Young 40fcfe891d Move pinnumber above pins if pinnames aren't shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14998
2023-06-25 16:01:35 +01:00
Jeff Young 3a301e50ae Clear all edit flags when pushing SCH_COMMIT. 2023-06-25 16:01:35 +01:00
Jeff Young e7ee6e1f26 Modified flags are handled by SCH_COMMIT. 2023-06-25 16:01:35 +01:00
Jeff Young 9854acd9e6 Don't set IS_CHANGED on symbol when modifying LIB_PINs for painting. 2023-06-25 16:01:35 +01:00
Jeff Young f643a8f5bf Fix build on clang. 2023-06-25 16:01:35 +01:00
Ian McInerney 118b815824 Get proper LINE_MODE type from tool event.
Properly fix https://gitlab.com/kicad/code/kicad/-/issues/15053
2023-06-25 13:43:32 +01:00
Ian McInerney b00361d136 Revert "Don't use TOOL_EVENT parameters for line modes."
This reverts commit 84a63f7daa.
2023-06-25 13:37:58 +01:00
jean-pierre charras 44810e8c09 footprint reader: fix broken handling of "Keep Upright" option.
texts inside footprints must have this option ON by default.
When disable, the keyword "unlocked" must be in field description.
2023-06-25 12:44:33 +02:00
Jeff Young 84a63f7daa Don't use TOOL_EVENT parameters for line modes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15053
2023-06-25 11:10:07 +01:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jeff Young 300a60e88e Eradicate a bunch of calls to dyn_cast. 2023-06-25 11:10:05 +01:00
jean-pierre charras 994459fd47 fp editor: fix a crash due to a null pointer when reading a .kicad_mod file
It happens if the footprint has some non mandatory fields (user fields).
2023-06-25 10:16:23 +02:00
Jon Evans d4b7144448 Properties: expose symbol attributes
Flip polarity of exclude-from-BOM and -board for symbols
to match that of footprints and match the GUI display.
2023-06-24 22:03:06 -04:00
Jon Evans f0d8edae1e Move sch properties panel to using default AUI pane info struct 2023-06-24 20:09:07 -04:00
Jon Evans bf2e9f8261 Properties for SCH_LINE
Also rename an incongruous setter
2023-06-24 20:08:42 -04:00
Jeff Young 1c1849ec1a Clear IS_MOVING (as well as IS_NEW) in SCH_COMMIT::Push().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15051
2023-06-24 17:15:43 +01:00
jean-pierre charras 1094cc5331 Fix issues related to the splash screen when no config file found:
- do not show it before the application is actually started.
- hide the splash screen before displaying dialogs.
Fixes #15047
https://gitlab.com/kicad/code/kicad/-/issues/15047
2023-06-24 18:09:43 +02:00
Jeff Young b3d7aea4df dyn_cast<PCB_TEXT*> won't find PCB_FIELDs.
We really should get rid of dyn_cast entirely....

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15052
2023-06-24 15:48:57 +01:00
Jeff Young 5195bc28fe Don't prune already-added items from the COMMIT.
We perform undo/redo backwards from each other specificially to allow
multiple entries (for instance, a wire is modified and then deleted).

This bus is almost certainly in 7.0 as well, but it comes up mostly
in schematics where 7.0 doesn't use COMMIT.  It's also possible that it
will cause unwanted effects in some cases, so I'm leaving it only in
master.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15032
2023-06-24 15:08:26 +01:00
Alex Shvartzkop bce643feae Don't draw LIB_PIN and SCH_LINE on OP layers when OP is empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-06-24 16:01:58 +03:00
Jeff Young 4764606a9d Sheet pins are owned by their parents, so the parent must go in the SCH_COMMIT.
Also collapses a bunch of duplicated code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15044
2023-06-24 12:35:48 +01:00
jean-pierre charras 830b67ead7 Eeschema: SaveSettings() : save visibility of Properties Panel in config. 2023-06-24 08:44:34 +02:00
Ian McInerney b8e9544828 Remove temporary footprint from pcb group before deletion
Bounding box computation uses a temporary footprint, but the clone
operation keeps the group information. We can't delete a footprint if it
has group information, so just delete the group information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14909
2023-06-24 00:04:06 +01:00
Jeff Young a901247cbd Rebuilding connectivity must be done after changes are committed.
It also needs to be done after undo and redo.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15028
2023-06-23 22:10:17 +01:00
Jeff Young 237cc7eee1 Move TestDanglingEnds() to SCH_COMMIT.
Also fixes a bug where Convert Symbol wasn't undoable.

Also cleans up some SetModified() call no longer needed with SCH_COMMIT.

Also fixes bug where revert of a modification didn't update the screen's
RTree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030
2023-06-23 19:59:46 +01:00
jean-pierre charras f56ea370be PCB_FIELD::GetCanonicalName() must return the canonical name (not a translation) 2023-06-23 18:48:11 +02:00
jean-pierre charras d8034b9c15 Revert "PCB Fields: save untranslated names"
This reverts commit b47fcac666.
The root issue was a bug in SCH_FIELD::GetCanonicalName(), now fixed.
2023-06-23 17:48:19 +02:00
jean-pierre charras db8201717d SCH_FIELD::GetCanonicalName() : the name must be the not translated name,
previously, it returned the translated string, by definition not the
canonical name
2023-06-23 17:48:19 +02:00
Jeff Young aa6d9ad69a Clear IS_NEW flags on commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15037
2023-06-23 15:30:09 +01:00
Jeff Young 1c13f5a0db Fix selection shadown drawing for global labels.
(The border should get shadowed, and the shape should get filled if
m_Selection.fill_shapes is set.)
2023-06-23 15:30:09 +01:00
Mike Williams b47fcac666 PCB Fields: save untranslated names 2023-06-23 09:18:55 -04:00
Tomasz Wlostowski 61391e3984 router: take holes into account when building the restricted items set for collision search 2023-06-23 14:52:45 +02:00
Jon Evans 7804c2177c Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
2023-06-23 08:09:53 -04:00
Jon Evans 504e02192c Relax handling of duplicate netclasses in Altium parser
There are some "good" boards that have this for some reason
2023-06-23 08:09:53 -04:00
jean-pierre charras 965aaa217c RULER_ITEM: fix incorrect position of the shadow text shape (round 3).
Depending on the text orientation, the shadow shape position was incorrect.
2023-06-23 12:50:56 +02:00
jean-pierre charras 1698fb6608 Refinement of commit 355575e4 (drawing shadow texts of RULER_ITEM and pin names)
Also handle non Kicad fonts (that do not use shadow texts)
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-23 10:32:23 +02:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans 39073642a7 Properties: disable pad y-size when circular
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038
2023-06-22 19:19:33 -04:00
Jon Evans 39a5929f33 Database libraries performance improvements
Rework caching system and optimize queries
2023-06-22 18:49:37 -04:00
Tomasz Wlostowski a0a68d198c router: when no collision search context is provided, assume differentNetsOnly is true 2023-06-22 23:52:21 +02:00
Ian McInerney 31961766d7 Remove unused cmake macro 2023-06-22 19:48:04 +01:00
Johannes Maibaum 9ae44e3998 Add KICAD_BUILD_{NIGHTLY_,}FLATPAK CMake options 2023-06-22 18:04:32 +00:00
Erik Agsjö bc0da92703 Fixes after merge request feedback 2023-06-22 16:20:05 +00:00
Erik Agsjö 2651d7ff5b Fixes crash in wire property dialog
Fixes crash when changes are applied with the style combo in the
indeterminate state.
2023-06-22 16:20:05 +00:00
Jeff Young f892194be4 Don't reset page unless we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15033
2023-06-22 16:56:52 +01:00
Tomasz Wlostowski bd5954242e router: provisional fix for 14926 2023-06-22 16:52:34 +02:00
3GO 206f66aee2 Make user cache path adjustable by env var. 2023-06-22 13:35:48 +00:00
jean-pierre charras 355575e477 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-22 13:28:43 +02:00
Ian McInerney 9f705f5e81 Return default initialized parameter when requested instead of assert 2023-06-21 20:39:50 +01:00
Wayne Stambaugh a5411218a2 Fix minor board file white space formatting issue. 2023-06-21 13:42:24 -04:00
Jeff Young 0fde88eefc Protect custom rule function caches from transient items. 2023-06-21 18:14:41 +01:00
Jeff Young 94a23971cc Performance improvements. 2023-06-21 17:00:32 +01:00
Jeff Young 7138e8a62e Don't double-create pins when migrating old models. 2023-06-21 16:34:35 +01:00
Mike Williams 043ed0b148 Schematic: fix up more field ID parsing to fix QA 2023-06-21 10:51:28 -04:00
Ian McInerney 19f5c16708 Ensure const-ness matches across draw wire event parameters 2023-06-21 14:06:25 +01:00
Ian McInerney 5d718617a2 Remove non-wx assert path to match rest of code
The WX_COMPATIBILITY mode is always assumed now (the option was removed
previously), but the define is no longer present. So remove the old code
that checked for it and just leave the wxASSERT statements.
2023-06-21 13:46:58 +01:00
Ian McInerney a2bd7192c0 Add default empty symbol to place symbols/power actions 2023-06-21 13:42:21 +01:00
Kuba Sunderland-Ober b60f7d4136 Make comparison operators const. 2023-06-21 08:49:26 +00:00
Mike Williams 5b4ddaba89 Schematic: fix field parsing when some mandatory fields are missing 2023-06-20 22:05:03 -04:00
Marek Roszko 74d6dc6642 ADDED: Startup splashscreen
This is purely loading in the background based and has no artificial delay.
Will be more useful once kicad.exe ends up loading more on launch immediately ;)
Right now the splash is probably visible the longest launching pcbnew standalone.

The actual splash image can be considered a placeholder
2023-06-20 20:51:08 -04:00
Mike Williams fa84575510 FP Text Grid: avoid ambiguous fallthrough
Works, but bug-prone and suspicious looking.
2023-06-20 19:23:29 -04:00
Ian McInerney 00885ab5b2 Fix mock implementation of NeighboringSegmentFilter
This was missed in 3c24ddd8cc.
2023-06-20 22:40:38 +01:00
Ian McInerney f14feafc6b Convert selection vector to EDA_ITEMS for base tool call
The base tool expects a generic EDA_ITEMS, but the existing vector
doesn't easily cast, so add a temporary one.
2023-06-20 21:52:50 +01:00
Ian McInerney f899d9676f Remove unneeded parameter from tool call 2023-06-20 21:52:50 +01:00
Ian McInerney 0a3b6c2d23 Fix call to properties when editing newly placed dimension
The edit is intended to be on the newly placed dimension, but the actual
properties tool doesn't take an item, so it was always looking up the
item to edit using the current selection/cursor position. Make this more
robust by just calling the edit properties directly on the item.
2023-06-20 21:52:50 +01:00
Ian McInerney 3c24ddd8cc Fix passing CLIENT_SELECTION_FILTER through the tool framework 2023-06-20 21:52:50 +01:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Ian McInerney b0363023a5 Parameterize the tool manager RunAction function to ensure type stabilty 2023-06-20 21:52:50 +01:00
Ian McInerney 5b2ede9e62 Add default empty filenames to the kicad manager actions 2023-06-20 21:52:50 +01:00
Ian McInerney 3718ecfcd8 Simplify forcing action parameters to have a specific type 2023-06-20 21:52:50 +01:00
Ian McInerney 07cc85e76c Fix more places where casts into RunAction were happening 2023-06-20 21:52:50 +01:00
Ian McInerney 8f3d159905 Update the net highlight action to properly use the action parameters 2023-06-20 21:52:50 +01:00
Ian McInerney 6a2dcd1936 Refactor 3D viewer view into enum class 2023-06-20 21:52:50 +01:00
Ian McInerney 6c031a4aa4 Fix some more incorrect types in event parameters 2023-06-20 21:52:50 +01:00
Ian McInerney 55a7cfcf36 Translate doDelete action to new framework and add default parameter 2023-06-20 21:52:50 +01:00
Ian McInerney 9ebe6e7614 Update tool manager to handle the std::any parameters 2023-06-20 21:52:50 +01:00
Ian McInerney 8b833211b5 Add parameter to repair board action
The tool checks for a boolean action, so default to giving false (which
makes it run in interactive mode).
2023-06-20 21:52:50 +01:00
Ian McInerney d66d1f2d6d Remove void* from project manager action parameters
This isn't needed with new std::any framework
2023-06-20 21:52:50 +01:00
Ian McInerney 9b63c57f5f Switch remainder of cvpcb actions to new args system 2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Ian McInerney 0a22bb951c Add custom UI IDs to the action framework
This replaces a hack where the parameter was used to identify a custom
UI ID with a proper solution. This moves the cut/copy/paste actions to
the new system, but more like help/quit/close should also be moved over
in the future.
2023-06-20 21:52:50 +01:00
Ian McInerney d0d0be196b Initial port of some actions to new chaining construction 2023-06-20 21:52:50 +01:00
Ian McInerney b63bbdea5f Add function-chain contructor for TOOL_ACTION
A function-chain constructor method allows for the long list of
parameters to the constructor to be shrunk to only the ones needed by
each action, and allow self-documenting code for what each part of a
TOOL_ACTION constructor does.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7617
2023-06-20 21:52:50 +01:00
Mike Williams 1d26b454f4 SCH -> PCB Fields: bump file versions 2023-06-20 18:34:52 +00:00
Mike Williams 86e0e1cccb PCB, Change Footprint: actually update text attributes 2023-06-20 18:34:52 +00:00
Mike Williams a24c55affe PCB Fields: fix up python, API
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams 85c633eb00 QA: PCB Fields bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams 85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams 636db607c1 Footprints: upgrade Sheetpath and Sheetfile to tagged items in file
Rather than loose kv properties.
2023-06-20 18:34:52 +00:00
Mike Williams 993bb84240 PCB_FIELD: bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams b81fcaeaf7 PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
Mike Williams 7d84fa2a9d Validators: drop unused is m_isLibEditor 2023-06-20 18:34:52 +00:00
Mike Williams ddafa2e75d Common: move SCH_FIELD_VALIDATORS to FIELD_VALIDATORS
Fields are now common across PCB/SCH
2023-06-20 18:34:52 +00:00
Mike Williams ad7d9ec956 PCB: footprint properties dialog fields fixes 2023-06-20 18:34:52 +00:00
Mike Williams 74606cda9c PCB: text properties dialog should indicate "Offset X/Y:" properly 2023-06-20 18:34:52 +00:00
Mike Williams 78f1040f33 PCB Fields: register with properties manager 2023-06-20 18:34:52 +00:00
Mike Williams 00f6f5011c PCB Fields: add saving / reading support to PCB files
Use common text effects parsing with PCB_TEXT
2023-06-20 18:34:52 +00:00
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Mike Williams a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Mike Williams 968785382e PCB_FIELD: add new field item similar to SCH_FIELD 2023-06-20 18:34:52 +00:00
Mike Williams 941d9c957d Netlist: export fields in its own section 2023-06-20 18:34:52 +00:00
Mike Williams 8e13f2d535 Netlist/Footprints: parse fields out of netlist into footprint
The properties section duplicates all of these fields, but also contains
a large amount of other cruft.
2023-06-20 18:34:52 +00:00
Mike Williams bd5d3533d8 Footprints: rename Fabrication Attributes to just Attributes
Makes it consistent with the Symbol attributes that are often
synchronized.
2023-06-20 18:34:52 +00:00
Mike Williams 028f500cd9 Footprints: rename properties to fields for consistency with symbols 2023-06-20 18:34:52 +00:00
Jeff Young 40abb013ec Don't consider a group to be on a copper layer.
Its members can be on copper layers, but the group itself isn't on any
layer.

Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes.  (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)

Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
2023-06-20 18:13:21 +01:00
jean-pierre charras 21f2f98270 drc_test_provider_connection_width: fix crash due to a null pointer.
Fix a crash (tested on W10 - MSYS2) when running DRC on the board
attached to issue #15005
Fixes #15005
https://gitlab.com/kicad/code/kicad/-/issues/15005
2023-06-20 16:32:07 +02:00
Georges Khaznadar 6a19d93a5e Adjusting content in the desktop-files
Signed-off-by: Georges Khaznadar <georgesk@debian.org>
Signed-off-by: Adrien Ricciardi <adrien.ricciardi@hotmail.fr>
[Adrien Ricciardi: This patch comes from Debian: https://sources.debian.org/src/kicad/7.0.5+dfsg-2/debian/patches/fixes/Adjusting-content-in-the-desktop-files.patch ;
 Also reworded the misspelled "Calculator" word]
2023-06-20 14:15:32 +00:00
Jeff Young 4473ebb02d Clear arcs before deflating area outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15007
2023-06-20 14:19:21 +01:00
Jeff Young 8c29091001 Add a "hyperzoom" mode for debugging "up close". 2023-06-20 14:19:21 +01:00
jean-pierre charras a9fff82664 spice_library_parser: catch an exception thrown when a spice model cannot be built.
Fixes #15012
https://gitlab.com/kicad/code/kicad/-/issues/15012
2023-06-20 10:26:42 +02:00
Jon Evans 7d6cb4e77b DRC markers should not be considered inactive layers 2023-06-19 21:58:08 -04:00
Jeff Young b1cdcca9e6 Use hypertext link for Edit Ingored Tests in both ERC and DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15010
2023-06-19 23:53:42 +01:00
Jeff Young 5b12b5d031 Cleanup. 2023-06-19 23:03:01 +01:00
Jeff Young 0b58fdb910 Use KIUI to specify the simulation plot axis fonts.
Also fixes a bug in generating the x-axis for the first trace.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14997
2023-06-19 22:53:08 +01:00
Jeff Young 840e4b6f72 Push fix for #14890 down a level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15005
2023-06-19 18:05:37 +01:00
Jeff Young 30336b2fe3 Unify go-back-one-step processing for drawing tools (and router).
Also warps mouse on all go-back-one-step operations for better feedback.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Jeff Young 252769d53e ADDED "clear color" command to Appearance/Nets context menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14451
2023-06-19 17:14:32 +01:00
Jon Evans 55c00f1845 ADDED: Initial support for importing Solidworks PCB files 2023-06-19 11:57:33 -04:00
jean-pierre charras 9537fd4e45 Pcbnew, graphic importer: convert arc with large radius to segment.
Arcs having a too large radius cannot be safely handled.
The criteria (not perfect) is radius < INT_MAX/2 to use arcs
Fixes #14210
https://gitlab.com/kicad/code/kicad/-/issues/14210
2023-06-19 10:43:30 +02:00
Jeff Young ecb2fcd559 Don't trip over null strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989
2023-06-18 20:28:11 +01:00
Jeff Young ee567180d1 Give ngspice time to finish simulation in test suite. 2023-06-18 18:09:07 +01:00
Jeff Young e9046076a6 Fine-tune SCH_COMMIT handling of child objects.
While a SCH_SHEET does indeed have a SCH_SHEET parent, it's not one of
the children that gets added as a CHT_MODIFY of its parent.

Also fixes a bug where the newly drawn sheet gets removed from the
preview before running the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-18 16:52:11 +01:00
Jeff Young 9199d7a781 Update simulation results as the sim runs.
Also adds a time axis which grows by 2X at a time rather than to the
size of the current data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11255
2023-06-18 16:52:11 +01:00
jean-pierre charras 9447c3d455 symbol editor: fix issue after loading a symbol from a library.
Selected items become invisible.
(similar to the issue fixed by commit b622e3a3f7)
Fixes #14151
https://gitlab.com/kicad/code/kicad/issues/14151
2023-06-18 17:17:16 +02:00
jean-pierre charras 8b71c70285 French translation update 2023-06-18 16:45:45 +02:00
Seth Hillbrand ce23040557 Update Translations 2023-06-18 15:40:21 +02:00
turkce 33659aa03c Translated using Weblate (Turkish)
Currently translated at 70.8% (5886 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-06-18 15:09:00 +02:00
Henrik Kauhanen b1d62ce964 Translated using Weblate (Swedish)
Currently translated at 99.9% (8297 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-06-18 15:09:00 +02:00
김랑기 affeb4f0f5 Translated using Weblate (Korean)
Currently translated at 97.4% (8091 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-06-18 15:08:59 +02:00
Toni Laiho 8438c3c14b Translated using Weblate (Finnish)
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-06-18 15:08:59 +02:00
turkce 626d98bb98 Translated using Weblate (Turkish)
Currently translated at 58.3% (4843 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-06-18 15:08:59 +02:00
ZbeeGin 545128967b Translated using Weblate (Polish)
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-06-18 15:08:59 +02:00
turkce 7dd13e77a6 Translated using Weblate (Turkish)
Currently translated at 55.3% (4600 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-06-18 15:08:59 +02:00
Julian Daube 6e1defaed9 Translated using Weblate (German)
Currently translated at 96.9% (8053 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-06-18 15:08:59 +02:00
Jan Straka 724918a008 Translated using Weblate (Czech)
Currently translated at 87.2% (7244 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-06-18 15:08:59 +02:00
Tokita, Hiroshi 3303a59c53 Translated using Weblate (Japanese)
Currently translated at 97.1% (8070 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-06-18 15:08:59 +02:00
ZbeeGin 69580313d8 Translated using Weblate (Polish)
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-06-18 15:08:58 +02:00
김랑기 0b41811302 Translated using Weblate (Korean)
Currently translated at 96.6% (8025 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-06-18 15:08:58 +02:00
Gabriel Martinez 7e4a52ef59 Translated using Weblate (Spanish)
Currently translated at 94.3% (7839 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2023-06-18 15:08:58 +02:00
Hubert Hu 29b195154b Translated using Weblate (Chinese (Simplified))
Currently translated at 96.8% (8040 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-06-18 15:08:58 +02:00
Bas Wijnen 344f7ea5f7 Translated using Weblate (Dutch)
Currently translated at 80.4% (6682 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-06-18 15:08:58 +02:00
Ulices 34a84a809f Translated using Weblate (Spanish (Mexico))
Currently translated at 97.3% (8088 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-06-18 15:08:58 +02:00
ZbeeGin 6283f40b9c Translated using Weblate (Polish)
Currently translated at 98.3% (8165 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-06-18 15:08:58 +02:00
Bas Wijnen c6fa14acf5 Translated using Weblate (Dutch)
Currently translated at 80.0% (6650 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-06-18 15:08:57 +02:00
Tokita, Hiroshi 8ef1b7beab Translated using Weblate (Japanese)
Currently translated at 97.0% (8057 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-06-18 15:08:57 +02:00
Toni Laiho d4e9d928ec Translated using Weblate (Finnish)
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-06-18 15:08:57 +02:00
Karl SCHUH c485ed34fb Translated using Weblate (German)
Currently translated at 96.9% (8049 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-06-18 15:08:57 +02:00
Bas Wijnen 6a1fb30949 Translated using Weblate (Dutch)
Currently translated at 79.8% (6633 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-06-18 15:08:57 +02:00
Hubert Hu 3c87f1355b Translated using Weblate (Chinese (Simplified))
Currently translated at 96.8% (8040 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-06-18 15:08:57 +02:00
Wellington Terumi Uemura 81a8173f7b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-06-18 15:08:57 +02:00
Hubert Hu b8d0b6c6b1 Translated using Weblate (Chinese (Simplified))
Currently translated at 96.8% (8040 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-06-18 15:08:57 +02:00
Henrik Kauhanen 7312c44cc8 Translated using Weblate (Swedish)
Currently translated at 99.8% (8296 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-06-18 15:08:57 +02:00
Ulices f8993a776d Translated using Weblate (Spanish (Mexico))
Currently translated at 97.3% (8083 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-06-18 15:08:56 +02:00
Toni Laiho 72ea84752b Translated using Weblate (Finnish)
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-06-18 15:08:56 +02:00
Jan Straka 8f8e9b61b8 Translated using Weblate (Czech)
Currently translated at 87.0% (7228 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-06-18 15:08:56 +02:00
Wellington Terumi Uemura 8ec1ebf746 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8305 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-06-18 15:08:56 +02:00
Henrik Kauhanen ea6afef3d5 Translated using Weblate (Swedish)
Currently translated at 99.8% (8293 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-06-18 15:08:56 +02:00
Henrik Kauhanen d34f30d3d5 Translated using Weblate (Finnish)
Currently translated at 99.9% (8304 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-06-18 15:08:56 +02:00
Toni Laiho f3a7955a5c Translated using Weblate (Finnish)
Currently translated at 99.9% (8304 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-06-18 15:08:56 +02:00
Ettore Atalan f0b4e3d279 Translated using Weblate (German)
Currently translated at 96.7% (8038 of 8305 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-06-18 15:08:55 +02:00
Jon Evans b424dc11e1 Hotkey feedback for inactive layer display mode 2023-06-17 23:47:26 -04:00
Jon Evans fc69939190 ADDED: GUI feedback when grid setting is changed by hotkey
Can be extended to other cyclical hotkey settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Jeff Young b1d5da3da3 Allow ngspice to run in the background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14085
2023-06-17 23:54:33 +01:00
Jeff Young 7f453d7943 Fix bug in wildcard search handling. 2023-06-17 23:53:37 +01:00
Jeff Young fb40c202a1 Refine track dangling test.
Turns out Clean Up Tracks and Vias wants a different answer from DRC.
2023-06-17 22:56:57 +01:00
Jeff Young 4e3730f653 Track not dangling if entirely covered by pad.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14211
2023-06-17 21:13:30 +01:00
Jeff Young 3b8cc3a3ac Tab-order fix provided by aris-kimi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:41:17 +01:00
Jeff Young e3eb0abc5f Recompute intersheet refs while printing.
Also fixes a bug where the schematic offset wasn't being added to
intersheet refs when printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14978
2023-06-17 18:12:13 +01:00
Jeff Young 1c7971c4dc Cleanup. 2023-06-17 18:12:13 +01:00
Mike Williams f9d4b75726 Symbol Fields Table: performance optimizations
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14972
2023-06-17 12:56:00 -04:00
Jeff Young 9fbaa238a2 Don't create 22.5-degree gateways if we're not cardinal or diagonal.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14984
2023-06-17 16:05:35 +01:00
Jeff Young cf4f0723f8 Select first unassigned symbol when running CvPCB.
Also cleans up some dead code, and makes more use of sharing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9938
2023-06-17 12:44:59 +01:00
Alex Shvartzkop 940f92a44f GAL: improve redraw handling, allowing higher refresh rates.
minRefreshPeriod can't be set in SwitchBackend because OpenGL isn't
initialized yet.
2023-06-17 12:42:22 +03:00
Jeff Young ef6866757e Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Jeff Young b3235ce667 Handle some Mac-standard keyboard shortcuts in Scintilla.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973
2023-06-16 17:19:18 +01:00
Alex Shvartzkop d3be62f644 Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Alex Shvartzkop caf0bb6baa Cosmetic fixes in schematic formatting panel (GTK) 2023-06-16 19:12:37 +03:00
Alex Shvartzkop 6ace80700e PAGED_DIALOG: make sure the dialog is big enough to contain page. 2023-06-16 19:12:37 +03:00
Alex Shvartzkop f5da58e17d PAGED_DIALOG: allow setting initial size in ctor. 2023-06-16 18:53:00 +03:00
jean-pierre charras e7fac08c2f Worksheet editor: fix crash when adding new graphical text object.
Was due to use of a null pointer.
Fixes #14966
https://gitlab.com/kicad/code/kicad/-/issues/14966
2023-06-16 17:31:38 +02:00
Jeff Young da558f57d4 Don't leave selection lying around when swapping out footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14971
2023-06-16 16:29:52 +01:00
Jeff Young b44c547aa6 Don't let selection VIEW_GROUP get lost from VIEW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14969
2023-06-16 16:03:37 +01:00
Jeff Young 8259091ca1 Fix typo in new SCH_COMMIT architecture for shape drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-16 15:50:51 +01:00
Jeff Young 75e78f9088 Move bitmap2cmp and pcb_calculator to tool framework.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1939

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7561
2023-06-16 15:37:58 +01:00
Jeff Young d8debfa0ee Require regular expressions to be explicit.
Normally this means surrounded by forward slashes, but we also still
allow any regular expression in a netclass match to keep from breaking
existing documents.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14944
2023-06-16 15:37:58 +01:00
Wayne Stambaugh 285f8a0e59 Command line PCB gerber export fix and improvement.
The --board-plot-params argument was never parsed so it was always ignored.

[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
        file extension (gbr) instead of the Protel gerber file extensions.

(cherry picked from commit 4e79d1ecdd)
2023-06-16 07:17:39 -04:00
jean-pierre charras c37332bdb3 Plot Solder mask layer: do not add items on edge_cut, but not on mask layer
it happened only when creating a solder mask plot with a minimum thickness.
This was a legacy option, incorrect now.
Fixes #14960
https://gitlab.com/kicad/code/kicad/-/issues/14960
2023-06-16 09:47:58 +02:00
Ian McInerney c52fb23d4f PCM: Fix use of variable after it was moved into the cache 2023-06-16 00:07:54 +01:00
Ian McInerney 63e91366e2 Add variable initializations 2023-06-15 23:49:24 +01:00
Ian McInerney 4761815f36 Fix reversed arguments in ltspice importer 2023-06-15 23:01:39 +01:00
Ian McInerney b73cc7db4a Fix a few accidental copies in loop iterators 2023-06-15 22:57:05 +01:00
Jeff Young 150e2b8a19 Separate BITMAP2CMP_PANEL from BITMAP2CMP_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young abc0c19d64 Separate SIMULATOR_PANEL from SIMULATOR_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young 5c4ca9f092 Renaming to support potential future usage of SIMULATOR_PANEL as a panel within SIMULATOR_FRAME. 2023-06-15 17:39:10 +01:00
Wayne Stambaugh fc1d540036 Fix a Coverity issue in the net navigator code. 2023-06-15 08:00:08 -04:00
Jon Evans c90fe84cc1 Fix missing change in d996ec14 2023-06-14 23:23:36 -04:00
Jon Evans d996ec143f Fix STD_BITMAP_BUTTON for GTK HiDPI 2023-06-14 23:14:07 -04:00
Ian McInerney 753cc6679b Remove temp items from its group before deleting them
The 1st level items being copied don't have their group information
copied, and we assert that it has been removed from the group on
deleting it, so we just reset the group membership to prevent the
assert.

Fixes sentry KICAD-22S
2023-06-14 23:33:41 +01:00
Ian McInerney 1f5719ef3a Pass proper parent to symbol viewer frame when changing symbols
Fixes sentry KICAD-1Z9
Fixes sentry KICAD-22J
2023-06-14 21:25:06 +01:00
jean-pierre charras 8ad7736f5e Cvpcb: fix crash when trying to associate a footprint to a symbol.
(the undo/redo list is specific to Cvpcb and does not use a
UNDO_REDO_CONTAINER container).
Fixes #14948
https://gitlab.com/kicad/code/kicad/-/issues/14948
2023-06-14 19:43:13 +02:00
Seth Hillbrand d5d28e5b34 Add magic_enum 2023-06-14 09:44:10 -07:00
Wayne Stambaugh 4ccbbde54a Net navigator bug fixes and improvements.
Note: This changes the net highlight tool behavior.  When clicking on an
      already highlighted net, the net highlighting is no longer toggled
      off.  This prevents the net navigator panel from being cleared.
2023-06-14 09:57:55 -04:00
Jeff Young 46564055f4 More protection around an exceedingly dangerous hack.
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).
2023-06-14 12:52:49 +01:00
jean-pierre charras f3eac6a12f pcb_calculator, transmission lines: some fixes:
- ensure settings are correctly saved after change in dialog
- make reinit to defaults working
- cosmetic enhancement
2023-06-14 11:59:43 +02:00
Alex Shvartzkop 730cf80960 Fix paddings in PCB calculator UI on GTK.
Also fixes instances of wxEXPAND | wxALIGN_CENTER_*
2023-06-14 10:37:03 +03:00
Alex Shvartzkop dfb05c4f4b Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.
Assert handler is already being called from wxCHECK.
2023-06-14 07:45:34 +03:00
Marek Roszko fd669773b6 Use guarded pages for coroutine stack on windows 2023-06-13 20:47:45 -04:00
Ian McInerney 137640ac28 Remove group association before plotting board outline in drill map
The plotter doesn't care about the grouping, and we expect the item to
have no group on deletion, so temporary items like this shouldn't be
part of one.

(Sentry issue KICAD-24Y)
2023-06-14 00:26:46 +01:00
Kuba Sunderland-Ober e852d04043 Ensure the bitmap exported to the clipboard is valid.
Fixes #14808
https://gitlab.com/kicad/code/kicad/-/issues/14808
2023-06-13 20:47:06 +00:00
Seth Hillbrand 6896148a10 Check for directory locking not file
When creating a new file lock, we need to check if the containing
directory can be written, not if the file (which may not yet exist) can
be written

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14942
2023-06-13 13:27:44 -07:00
Wayne Stambaugh 5a7f95e8da Allow for library symbols to derived from derived symbols.
This change allows for infinite inheritance depth so internally there is
no limit to deriving library symbols from other derived symbols.  Please
note that the Flatten() method now recurses until a symbol with no parent
is found.  The user interface is not hooked up at this time.
2023-06-13 15:52:42 -04:00
Yang Hongbo fe1b1becef Check visibility when switching layer in router tool
When routing and using layerNext (hotkey '+') to switch to next layer,
it will skip invisible layer, when click BUT_LEFT, the new line should
be in the same layer (visible layer)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14480
2023-06-13 09:46:12 -07:00
Jeff Young 20d2568f0c Move where we fire EDA_EVT_SCHEMATIC_CHANGED again.
The location in HARD_REDRAW got called everytime we change schematic
pages, which is not what we want.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14945
2023-06-13 16:36:05 +01:00
Mark Roszko 03990ee7e0 Move the custom assert handler to release builds only 2023-06-13 13:04:37 +00:00
Jeff Young 4f39cb0789 Fix SCH_COMMIT handling in TwoClickPlace. 2023-06-13 13:21:11 +01:00
Marek Roszko 992ed34365 Disable sizer asserts in release 2023-06-13 07:08:33 -04:00
Jeff Young 9ed2458f00 Reset session drawing props after Board Setup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14932
2023-06-13 11:06:10 +01:00
Alex Shvartzkop 3c742c71a0 GTK: Add workarounds for broadway and allow wayland GDK backend.
For testing. X11 backend is still used unless GDK_BACKEND=wayland
is set explicitly.
2023-06-13 09:42:20 +03:00
Marek Roszko a87fada9e5 Minor tweaks to support wx3.3 2023-06-12 20:52:47 -04:00
Seth Hillbrand 42933c1c12 Save difference file if error detected in QA image test 2023-06-12 16:14:36 -07:00
Seth Hillbrand cef4b72b89 Remove image-diff from QA
Re-enable tests for Ubuntu.

This implements a custom image diff function that checks for image
changes in plotted output.
2023-06-12 16:11:10 -07:00
Seth Hillbrand f76c94e622 Don't log asserts in release mode 2023-06-12 15:26:18 -07:00
Ian McInerney d96580c651 Properly handle improper symbols when pasting in symbol editor
Before, an improper symbol (one without the starting toekn) weren't
detected and reported to the user properly and would instead assert. Now
properly detect these and pass the error up the stack to the tool.

(Sentry issue KICAD-21J).
2023-06-12 23:14:56 +01:00
Ian McInerney 1c138b4f3e Rename function in Footprint wizard to prevent impoper override
The ReloadFootprint function now exists in the base class with 1
argument, but this frame already had a similar function with no
arguments. Rename this one to RegenerateFootprint to prevent warnings.
2023-06-12 23:14:56 +01:00
Jeff Young 28075e6efe Don't crash on empty selection in search list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14931
2023-06-12 23:07:27 +01:00
Jeff Young 782c73300b Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least.  Plotters still define their own mils-to-iu scale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Seth Hillbrand 62f24aca1e Fix Connectivity Asserts in new COMMIT structure
The connection graph should only be updated within the commit structure
because this is the only time the connectivity should be changed.  We
want any connectivity changes to be included in the commit as well, so
this should be stored prior to the undo/redo list mods
2023-06-12 13:35:06 -07:00
Jeff Young 286716a1ff Retire AddItemToCommitAndScreen()
It duplicates a bunch of stuff in SCH_COMMIT and isn't really
compatible with it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14933
2023-06-12 19:34:23 +01:00
jean-pierre charras a29f261d31 dialog_sim_model: ensure the Model panel is always correctly built.
Fixes #14904
https://gitlab.com/kicad/code/kicad/-/issues/14904
2023-06-12 16:41:21 +02:00
Jeff Young 451b9e20a1 Tighten up layer handling for LIB_SYMBOL.
We have to draw the parent symbol on the union of all layers that
its children might reside on, but we only want to draw each child
on its layers.

And we need to make sure LAYER_PRIVATE_NOTES gets into the layers
order list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13943
2023-06-12 15:38:56 +01:00
Jeff Young a3f62cc8de Don't presume a sheet-path while reading files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14920
2023-06-12 13:42:15 +01:00
Jeff Young b7f0aae006 Nullptr safety for UI Conditions.
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.

Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young aa8a903940 Cleanup. 2023-06-12 11:14:27 +01:00
Jeff Young 6502787c7a Formatting.
It's annoying to keep searching for "LIB_FIELD*" and come up empty....
2023-06-12 10:48:39 +01:00
Jeff Young a3754785df BoardDesignSettings are owned by FOOTPRINT_EDITOR_SETTINGS in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14925
2023-06-12 10:08:41 +01:00
Jeff Young bae8a077b9 Remove double call to Destroy() for DISPLAY_FOOTPRINTS_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928
2023-06-11 21:57:26 +01:00
CraftedNightmare aa667bea0f eeschema: Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120 for eeschema
Fixes that Show Search Panel Checkbox can get out of sync when restarting
eeschema while the search pane is active
2023-06-11 20:23:24 +00:00
CraftedNightmare d94e9b31b1 Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120
2023-06-11 20:23:24 +00:00
Jeff Young d6aefc458c Clear the playerFrame lookup cache when closing frames.
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....

This is an attempt to fix KICAD-39.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928
2023-06-11 20:34:24 +01:00
Alex Shvartzkop eaf65f7d53 Avoid deadlock when OpenGL context can't be created.
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.
2023-06-11 18:59:00 +03:00
Jeff Young 96073402ce Don't accidentally add NULL ptrs to the LibSymbols cache.
Operator[] will add a blank element if it isn't found in the map.

Probably Sentry KICAD-23Y.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14927
2023-06-11 15:50:24 +01:00
Jeff Young 93789e75b9 Re-create missing exclusion markers if DRC was cancelled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14919
2023-06-11 12:14:27 +01:00
Jeff Young 3159391e28 Make sure infobar gets created earlier.
(restoreLastFootprint() might want it.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14922
2023-06-11 11:40:51 +01:00
Jeff Young 4fc6047f91 Make sure infobar gets created earlier.
restoreLastFootprint() might want it.
2023-06-11 11:02:56 +01:00
Roberto Fernandez Bautista 3d1b96d6ca Cleanup jobs handlers (+Fix build) 2023-06-11 00:12:53 +02:00
Jeff Young 61493b8489 Return all results with an empty search pane filter.
Also moves the EDA_EVT_SCHEMATIC_CHANGED event so it fires after the
schematic has been loaded.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14871
2023-06-10 23:05:57 +01:00
Roberto Fernandez Bautista 3f758711fd Use external REPORTER for EESCHEMA_JOBS_HANDLER / PCB_JOBS_HANDLER 2023-06-10 23:35:32 +02:00
Jeff Young fcb156c323 Make sure opposite-corner rects test the same.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14907
2023-06-10 22:30:04 +01:00
Jeff Young 96a221ceba Refresh delete immediately; don't wait for next mouse motion. 2023-06-10 21:11:05 +01:00
Jeff Young 180c820678 More changes for SCH_COMMIT independence from frames.
Also fixes some bugs in Symbol Editor SCH_COMMIT::Revert().
2023-06-10 20:53:44 +01:00
Wayne Stambaugh a46657d802 Remove net navigator debugging code. 2023-06-10 14:04:02 -04:00
Jeff Young 5aa51bc967 Allow SCH_COMMIT to operate without a frame.
We'll want this at some point (presumably) for plugins.
2023-06-10 18:35:59 +01:00
Jeff Young 111d0a2c14 Check for proxy references and values in Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14911
2023-06-10 17:47:29 +01:00
Jeff Young f66b9f75a3 Allow EDA_COMBINED_MATCHER use in KiCad find architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12532
2023-06-10 14:50:06 +01:00
Jeff Young d18b0c62f6 Make FOOTPRINT_PREVIEW_PANEL a FPHOLDER.
Also makes sure it get its user_units set up.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14913
2023-06-10 13:36:17 +01:00
Jeff Young f2c2017068 Formatting. No (intentional) functional changes. 2023-06-10 13:36:17 +01:00
Jeff Young 53be16f409 Stop confusing Covertiy. 2023-06-10 13:36:17 +01:00
Roberto Fernandez Bautista 0159be8ddd Fix build (broken in 90ff331c) 2023-06-10 14:21:10 +02:00
Jeff Young 86210541fc Clean up clearance page of calculator. 2023-06-10 11:15:03 +01:00
Roberto Fernandez Bautista 90ff331c58 Refactor: Move static to be inside ZONE_SETTINGS 2023-06-10 12:03:41 +02:00
Alex 2450435131 Support --mirror option in "kicad-cli pcb export pdf" 2023-06-10 04:54:11 +03:00
Alex d5edde799c Enable support for KICAD_SANITIZE_ADDRESS CMake flag on MSVC. 2023-06-10 02:09:09 +03:00
Jeff Young 8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young e698156975 Upgrade many editing actions to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Jeff Young 73b653c276 Upgrade more dialogs to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Jeff Young dcfd426333 Upgrade some dialogs to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Wayne Stambaugh e9dc00cda3 Minor schematic net navigator improvements.
- Expand tree and highlight object selected with net highlight tool.
- Expand tree and highlight object that are currently highlighted with the
  selection tool.
- Use more descriptive object text rather than menu entry text for tree
  strings.
- Rebuild tree on unit changes.
2023-06-09 14:34:54 -04:00
Jon Evans 3a2cc8f56f Net Inspector: clear sort ordering during rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697
2023-06-09 09:06:11 -04:00
Jon Evans 4e6092a280 Turns out only MSW has odd behavior for bitmap sizing 2023-06-09 08:58:52 -04:00
jean-pierre charras 9c1fac3e21 kicad-cli, STEP export: fix incorrect unit when user origin is specifed.
They are specified in mm (inches) , but must be stored in board units in code.
2023-06-09 12:42:26 +02:00
jean-pierre charras 639da0eb5a Fix a wxWidgets alert when deleting the last entry in a lib table. 2023-06-09 08:09:22 +02:00
jean-pierre charras 14c10d2a37 PANEL_FP_PROPERTIES_3D_MODEL: fix a wxWidgets alert.
Happens when there is no 3D model in 3D grid list, and when trying to add
a new 3D model, but canceling the 3D dialog file selector.
2023-06-08 17:46:38 +02:00
Tomasz Wlostowski 3667e4f6b2 router: correctly assign owner via/pad to its hole when committing the world state
fixes #14852
2023-06-08 11:57:23 +02:00
jean-pierre charras 8a1220128b pcb_calculator: fix a message and Coverity warnings 2023-06-08 09:51:59 +02:00
jean-pierre charras 02e20f1a22 French translation update 2023-06-08 09:50:47 +02:00
jean-pierre charras 072bfe4bc6 pcb_calculator, panel iec60664: remove incorrect/useless tooltips. 2023-06-07 18:49:58 +02:00
jean-pierre charras 00317cf67a pcb_calculator, panel iec60664: better look, better code and fix typos. 2023-06-07 18:21:09 +02:00
Jeff Young 90c14ecdf7 Upgrade a couple of schematic actions to SCHEMATIC_COMMIT. 2023-06-07 15:30:56 +01:00
Jeff Young d5b5a3eaf4 Add action info to Undo/Redo menus.
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
2023-06-07 14:37:34 +01:00
Jeff Young 30cbfc794f Cross-probing from Pin Table to Symbol Editor canvas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8301
2023-06-07 14:37:34 +01:00
Nils VAN ZUIJLEN 518741c52a cli: add an option to the pcb exports for plotting negative svg and pdf
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-07 13:28:52 +00:00
jean-pierre charras 47c0c7b3b7 pcb_calculator: add iec60664 electrical spacing panel.
From patches from by Fabien Corona and Aris_kimi
2023-06-07 12:01:30 +02:00
jean-pierre charras f92271af2c DIALOG_GEN_FOOTPRINT_POSITION: replace "Gerber (experimental)" by "Gerber X3"
Gerber position file is now not experimental, and is accepted by some board houses.
2023-06-07 11:43:30 +02:00
Jeff Young 9a757e8e44 Restore over-aggressive CLion cleanup. 2023-06-06 15:49:41 +01:00
Jeff Young 0f8c5a96b2 Support shape collisions between SHAPE_POLY_SET and other shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14890
2023-06-06 13:40:44 +01:00
Jeff Young 9fe00bb808 Cleanup. No (intentional) functional changes. 2023-06-06 12:30:35 +01:00
Marek Roszko 1ed4cd3644 Bump vcpkg for opencascade 2023-06-05 21:10:39 -04:00
Jeff Young c5e7d800a4 Back out earlier diamond-to-rectangle fix for one that's more targeted.
(And doesn't fail qa_pcbnew.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14828
2023-06-05 21:26:37 +01:00
Jeff Young 4ea41174c3 Variable names and minor performance fixes. 2023-06-05 21:26:37 +01:00
jean-pierre charras 6eda60e503 Pcbnew: UI change: move layer selector from main toolbar to auxiliary toolbar 2023-06-05 20:31:18 +02:00
Jeff Young 4dda7d39ab Tranform diamonds back to rects after rotating to a cardinal orientation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14828
2023-06-05 18:55:18 +01:00
Seth Hillbrand c33d1ab244 Don't dirty the item connectivity prematurely
Item connectivity changes once the elements are commited, not during the
process of moving.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14884
2023-06-05 09:12:20 -07:00
Mike Williams d48858e298 LibTree: add numpad enter as enter
Written by Andrej Valek
2023-06-05 09:20:22 -04:00
Mike Williams 6e2bea8128 Symbol Fields Table: fix grid tricks show/hide column corruption
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14874
2023-06-05 08:27:26 -04:00
Mike Williams fb7925806c Symbol Fields: allow hiding reference column 2023-06-05 08:27:26 -04:00
Alex d945b76c65 Center calculator grid cells, sync font styles with fbp.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14743
2023-06-05 15:14:10 +03:00
Alex 26c25c5475 Move bitmap setup to ctor in eeschema annotation options. 2023-06-05 15:03:03 +03:00
Jeff Young aafbbb4c63 Clean up includes. 2023-06-05 11:01:10 +01:00
Jeff Young 7a3a8b67c1 Exclude redraws during closing (particularly of RATSNEST_VIEW_ITEM). 2023-06-05 11:01:10 +01:00
Jeff Young 29aabcf77e Naming clarity. No functional changes. 2023-06-05 11:01:10 +01:00
Jeff Young f3d3ade1dc Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.
2023-06-05 11:01:10 +01:00
Marek Roszko b41606ecf7 Use the correct printf format for the move individually status text
Fixes sentry KICAD-1ZT
2023-06-04 21:08:13 -04:00
Jeff Young 0091b9f897 Prevent Sentry KICAD-MM crash.
It'd be nicer to know what happens, but we don't have a reproducible
case, so this "fix" will at least prevent that particular crash.
2023-06-04 23:00:44 +01:00
Jeff Young 1528f4700c Treat canvas item as current when tree view contains no selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702
2023-06-04 20:52:12 +01:00
Mike Williams 039f23eba8 Symbol Fields Table: check against data model col for grouping
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14870
2023-06-04 14:42:55 -04:00
Mike Williams bb6555ff36 Symbol Fields Table: remember export filename
https://gitlab.com/kicad/code/kicad/-/issues/14872
2023-06-04 13:45:07 -04:00
jean-pierre charras 9e6c56525a EEschema, DIALOG_SYMBOL_FIELDS_TABLE: minor cosmetic fix
Fixes #14868
https://gitlab.com/kicad/code/kicad/-/issues/14868
2023-06-04 17:24:07 +02:00
jean-pierre charras 92018f0066 Fix minor compil warnings 2023-06-04 16:24:28 +02:00
Jeff Young 95d104ab65 Implement UI condition for search panel visibility.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14826
2023-06-04 15:13:39 +01:00
Jeff Young 2ffeca9f36 Formatting (no functional changes) 2023-06-04 15:13:39 +01:00
Seth Hillbrand e4fe27993e Fix wxCHECK_MSG in DRC
The layers check needs to look for testing against technical layers for
those vias that pass the outer layers
2023-06-03 20:25:35 -07:00
Jeff Young 9da66ccb58 Hack Mac icon buttons back to size.
It remains unclear to me how this *should* be going forward, but
this at least gets us back to the status quo.
2023-06-03 21:41:56 +01:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jon Evans 1aff03eadb Fix bitmap scaling for SPLIT_BUTTON 2023-06-03 12:41:40 -04:00
Jon Evans 8f69336ad1 Support DPI scaling in custom bitmap buttons 2023-06-03 11:32:52 -04:00
Wayne Stambaugh bdee545841 Coverity warning fixes. 2023-06-03 07:28:17 -04:00
Seth Hillbrand 5756a7a0af Prevent makeup events from contaminating the system 2023-06-02 16:04:08 -07:00
Seth Hillbrand 7f5d790610 Ensure we aren't trying to access a closed board 2023-06-02 15:47:46 -07:00
Seth Hillbrand 4bc0822733 Connectivity: Correct alias-based bus resolution
Aliases in bus resolution were being resolved without a path, making
them effectively global nets.  This applies the corrected path to the
bus members and adds a QA to catch this error
2023-06-02 14:25:51 -07:00
Jeff Young 97cf7c874e Handle Altium dimension angles and non-unit suffixes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13751
2023-06-02 18:30:16 +01:00
Jeff Young 3c8d2bfca5 Assertion checking for hole/parent ownership mismatch.
(This mismatch is the root of the problem in issue #14852.)
2023-06-02 18:30:16 +01:00
Alex df4fefeb20 Fix view shifting when infobar is shown. 2023-06-02 17:46:46 +03:00
Mike Williams 04532a61f4 Symbol Fields Dialog: don't change sheets on load
Late bind the range selection event so we don't lose our selection as a
result of loading data into the table, then jumping to the selected
value.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14186
2023-06-02 08:22:10 -04:00
jean-pierre charras cb5c571d0d Demos: update old action script to be compatible with current code 2023-06-02 13:23:50 +02:00
jean-pierre charras 9a47b34499 Replace PAD_SHAPE::RECT by PAD_SHAPE::RECTANGLE to avoid a collision NAME with a windows header on MSYS2, creating many compil warnings. No actual code change. 2023-06-02 12:18:24 +02:00
Mike Williams 0eb45a7f27 Schematic: symbol fields dialog: restore size, not min size
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14861
2023-06-01 18:02:57 -04:00
Tomasz Włostowski 3c3517cc36 router: can't add a clone of a VIA's hole when adding the via to INDEX - this will result in bogus colliding objects
This commit partially reverts deb3cbf8. VIA and SOLID operator='s introduced in it do a good job but the cloning of holes in addHole() causes bogus collisions.
2023-06-01 22:47:02 +02:00
Seth Hillbrand fe62a3f985 Update Clipper2 to 9d946d7
Fixed a number of smaller issues as well as overlapping segment
cleaning.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14682
2023-06-01 11:38:33 -07:00
Wayne Stambaugh d854e2bfe8 Schematic net navigator improvements.
Arrange connectivity items by sheet.  Complex nets which span many
sheets make finding objects difficult.  It also provides a higher
level of sheet view granularity.
2023-06-01 12:49:51 -04:00
jean-pierre charras 707b0becee bitmap2component: fix incorrect min size of the main frame.
It was due to the fact the sizers were set without menubar, created later.
A dummy menubar is now added at frame creation, to allow sizers to be
correctly initialized.
Fixes #14859
https://gitlab.com/kicad/code/kicad/-/issues/14859
2023-06-01 16:26:19 +02:00
jean-pierre charras db3cf4274b Modify the order of an include to avoid a collision name with a windows
header that prevent Kicad build (msys2 specific)
2023-06-01 16:26:19 +02:00
Jeff Young deb3cbf89b Prevent use-after-free crashes by not fighting over who owns a HOLE.
The diff-pair placer creates DIFF_PAIRs on the stack, which have
VIAs in them, which have HOLEs in them.  The HOLEs get put in the
NODE's index, and we then crash later when doing a collision after
the stack variable has gone out of scope.

The stack variable is also copied while doing a search for "best",
and without the operator= definitions the "best" and the "original"
both think they own the HOLE.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14852
2023-06-01 15:07:29 +01:00
Jeff Young 2300b0d2a3 Don't dim SCH_FIELDs when selecting them.
(They were only getting drawn on top of the selection shadow when
drawn by their parent symbol because LIB_FIELD was correctly
setting the view layers but SCH_FIELD was not.)
2023-06-01 15:07:29 +01:00
Marek Roszko e536fa966c Remove extraneous Pgm() 2023-05-31 23:02:38 -04:00
Marek Roszko 8eb265bf4c Add a central assert handler that generates sentry events 2023-05-31 21:56:59 -04:00
Marek Roszko c2d56eefb9 Fix blank symbol svg export file names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14857
2023-05-31 20:56:20 -04:00
Seth Hillbrand c7758999af Handle LOCKFILE logistics for ro
We need to check if a lockfile is valid to determine if we should
override the lock. Valid() is true if the lockfile couldn't be created
b/c of permissions or if the lockfile could be created and acquired.
2023-05-31 17:04:32 -07:00
Seth Hillbrand 844226e6b9 Fix LOCKFILE fallback
`throw` needs to provide an actual std::exception or it will not be
caught
2023-05-31 17:01:31 -07:00
Seth Hillbrand aacf8f50bf Remove unneeded headers from pcbnew_scripting_helpers.h 2023-05-31 15:54:46 -07:00
Jeff Young ddd2cb005b Don't allow setting a pad width or height of 0.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14278
2023-05-31 23:41:43 +01:00
Jeff Young c7730eae3f Force re-word-wrapping of PCM package descriptions on Mac.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13328
2023-05-31 23:28:13 +01:00
Tomasz Wlostowski 7966126040 router: invalidate items freed by PNS::NODE in the clearance cache
This was causing intermittent shove hiccups/freezes as RULE_RESOLVER::GetClearance() could return a bogus clearance value, taking
a cached value for an item that does not exist anymore. If the allocator/stack accidentally reclaimed such item's address - we were getting
very nasty and difficult to reproduce misbehaviours of the shove algorithm. Hopefully this patch fixes this. More info in the comments.

Note to self - I'm still not fully convinced I want PNS::ITEM pointers as the cache key, probably a unique counter would be better here.
2023-06-01 00:01:15 +02:00
Seth Hillbrand 14f6e32c74 ADDED: Change watcher for libraries
When editing or viewing library symbols, the files are watched for
underlying changes.  If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.

This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -07:00
Seth Hillbrand d94fd5f979 Prevent ro directories from showing lockfile error 2023-05-31 13:45:57 -07:00
Seth Hillbrand 5370fdc718 Fix override lock behavior
We don't need to lock in import because we are creating a new file.  We
should, however, show the locking user/machine when opening in schematic
editor and take over the lock if they want to proceed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9347
2023-05-31 13:43:58 -07:00
Tomasz Wlostowski 15db42d9c8 router: fix use-after-free crash in drag walkaround mode 2023-05-31 22:20:28 +02:00
Wayne Stambaugh f950354f99 Fix connectivity assertion in schematic editor.
https://gitlab.com/kicad/code/kicad/-/issues/14835
2023-05-31 13:29:47 -04:00
Jeff Young cfb45be71e Improved tooltips for all-unit-interchangeable and De Morgan.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14583
2023-05-31 17:54:19 +01:00
Jeff Young d3edad3c92 Formatting. 2023-05-31 17:26:54 +01:00
Jeff Young 421d6b2ef8 Retire LIB_ID_VALIDATOR as it prevents usage of text variables.
(We perform more complete checks in ERC anyway.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14764
2023-05-31 17:26:54 +01:00
jean-pierre charras 90c4b8bc57 Eeschema: try to fix a not working tool (Paste tool on main horiz. toolbar)
Fixes #14827
https://gitlab.com/kicad/code/kicad/-/issues/14827
2023-05-31 17:45:19 +02:00
jean-pierre charras a4b73d74a3 Remove a change committed by mistake in commit 86abfd2ce.
It should be committed in a separate commit.
2023-05-31 17:45:19 +02:00
Tomasz Włostowski b22b0e5d03 qa: ignore duplicates in PNS regression test reference data 2023-05-31 17:07:13 +02:00
Tomasz Włostowski b1ae093fe6 qa: disable center view on zoom in the PNS debug tool 2023-05-31 17:06:41 +02:00
Tomasz Włostowski 6e0a52dd47 qa: fix crash on null PNS::ITEM::Parent() UUID access 2023-05-31 17:06:33 +02:00
Tomasz Wlostowski 5100345c6e router: prevent pushout/bogus collision of via with is own hole (or copper) when dragging
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
2023-05-31 17:06:24 +02:00
Jeff Young 47bba3cbeb Correct logic errors in pin bounding box calculation.
The name and number are both centred, and either one can be long
enough to be the determining factor for either side of the bounding
box.
2023-05-31 12:51:56 +01:00
Jeff Young f9fd37c4ca Correctly handle hidden columns when pasting into grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14844
2023-05-31 12:26:18 +01:00
Jeff Young 8baf2a832f Make pad flipping work both from parent footprint *and* individually.
The last fix was for individual pads, but it broke when the whole
footprint was flipped for rotated footprints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14829
2023-05-31 11:13:35 +01:00
Jeff Young d827bb8a1f Leave back/forward/up nav buttons enabled so the action doesn't change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14783
2023-05-31 11:13:35 +01:00
Jeff Young e82e4af483 Don't double-up FUTURE_FORMAT_ERROR problem strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14780
2023-05-31 11:13:35 +01:00
jean-pierre charras 86abfd2cef Update a golden file in Eagle QA tests 2023-05-31 11:52:50 +02:00
Jon Evans 3783fc8f5a Remove unused line 2023-05-30 20:06:18 -04:00
jean-pierre charras a54f60a728 Cvpcb: the footprint viewer use the settings of pcbnew, and the code in _pcbnew.dll/so
So ensure they are loaded before creating the footprint viewer.
Fixes #14850
https://gitlab.com/kicad/code/kicad/-/issues/14850
2023-05-30 20:02:47 +02:00
Jeff Young 4874537c40 Push/pop router tool for inline drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14832
2023-05-30 18:02:12 +01:00
Jeff Young c36b0fcda7 Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)
2023-05-30 14:58:46 +01:00
jean-pierre charras 6b845b9054 Fix compil warnings and a wxWidgets alert. 2023-05-30 09:00:46 +02:00
Marek Roszko 6e468c5ce9 Fix more warnings
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Marek Roszko 8381677f20 Remove --report_level=no 2023-05-29 22:23:44 -04:00
Marek Roszko 7e51bc2011 Use the result_code with boost test or else ctest will lie that it passed 2023-05-29 21:56:55 -04:00
Marek Roszko c31b5eb7d8 Fix errant typecast in VECTOR2<T>::Resize
This fails QA on Windows but not Linux
2023-05-29 19:34:40 -04:00
Jeff Young b53bc1ae38 Trim solder paste (and other layers) to holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8484
2023-05-30 00:02:27 +01:00
Marek Roszko 8b3f5de620 Add a simple testcase for VECTOR2I::Resize 2023-05-29 18:32:56 -04:00
Jon Evans 141cc85ff3 PNS: Work around collision checking issues in shove mode
Need to special-case shove mode since 942ee13c introduced
collision checking in all modes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14836
2023-05-29 18:19:47 -04:00
Roberto Fernandez Bautista bb90aa24b7 Add basic QA test to CADSTAR PCB footprint import 2023-05-29 23:29:28 +02:00
Roberto Fernandez Bautista 3b56b7bf68 Fix assert in PROPERTY_ENUM (ENUM_MAP<PCB_LAYER_ID> was not initialised) 2023-05-29 23:29:28 +02:00
Jeff Young cb7f314f4b Handle through-hole via walls along with pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14757
2023-05-29 21:59:20 +01:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01:00
Roberto Fernandez Bautista 9633c8af22 CADSTAR PCB: Fix regression in loading of thermal pads
Due to removal of SetPos0 in 28028c94, we now don't need to compensate
for the position of the footprint while importing.
2023-05-29 16:41:47 +02:00
Jeff Young 65e53b8ecd Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
1) Also reorders parameters to make sure the compiler helps out.

2) This also makes it harder to mess up the discrepency between
   BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.

3) Also fixes a couple of bugs where the corner strategy was passed
   in as a segCount.

4) Also fixes a couple of bugs where the error wasn't forced to the
   outside to match the ERROR_LOCATION.

5) Also fixes a couple of bugs where the seg count was specified
   without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00
Mike Williams 7f250870fe schematic: fix crash in search pane when hit list is empty
std::all_of also returns true for an empty set
2023-05-29 09:50:09 -04:00
Jeff Young 2612b49698 Fix erroneous wxEXPAND flags. 2023-05-29 14:23:31 +01:00
jean-pierre charras ef4dded915 PCB_TEXT::TransformTextToPolySet(): fix incorrect param when calling Inflate()
This incorrect value created hang when clicking on a pcb text.
2023-05-29 14:21:10 +02:00
Jeff Young a4f16423c8 Push reference and value special cases down into LIB_FIELD::compare().
Use COMPARE_FLAGS::EQUALITY and COMPARE_FLAGS::ERC when doing
library diffs.

Also fixes a few more cases where we weren't checking for -1 when
doing a fieldID < MANDATORY_FIELDS.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14830
2023-05-29 12:40:20 +01:00
Roberto Fernandez Bautista dfebe516c5 CADSTAR PCB: Fix memory leak 2023-05-28 23:56:43 +02:00
Roberto Fernandez Bautista 8493cc4c89 CADSTAR SCH LIB: Add plugin options + improve symbol caching 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista 688a61df63 Add options editor to symbol library table + cleanup unused options 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young d526362d31 No sheet path has to be interpreted as the current sheet.
There's currently waaaay too much stuff that depends on it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14834
2023-05-28 20:46:50 +01:00
Jeff Young 8820df2187 Fix missing "else".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14831
2023-05-28 19:49:19 +01:00
Jeff Young 570978fa7f Replace larger text bboxes now that we're not using them for knockouts. 2023-05-28 18:17:24 +01:00
Jeff Young c71cf21e2f Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01:00
Jeff Young dacf0b2b96 Account for changes to mimic 6.0 text positioning in bounding boxes.
This is only a partial fix as knockout text is still busted....
2023-05-27 23:41:43 +01:00
Jeff Young 6b0bff2f4f Formatting. 2023-05-27 22:46:02 +01:00
Jeff Young 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +01:00
Jeff Young b8986709bf Every time I search for SCH_TEXT* it doesn't work.... 2023-05-27 21:25:36 +01:00
Jeff Young 81d7428fd2 Don't call OnPageSettingsChanges on Undo/Redo.
It's incredibly expensive (multiple seconds on a document with
lots of text in an outline font).
2023-05-27 20:35:05 +01:00
Jeff Young 3ab9175553 Spread the error-bar move evenly around justified text. 2023-05-27 18:53:04 +01:00
Jeff Young f35a88ce0b Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
jean-pierre charras f2f014a27c Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is
used to enable/disable the DeMorgan option and tool in toolbar
Fixes #13739
https://gitlab.com/kicad/code/kicad/-/issues/13739
2023-05-27 10:13:43 +02:00
Jeff Young 4ed267394a Outline font performance improvements.
1) Don't fracture font glyphs when generating them; we're going
   to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
   It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14303
2023-05-27 01:35:40 +01:00
Jeff Young ff37ebe61a Improve appearance of stroked knockout text. 2023-05-26 19:53:38 +01:00
Jeff Young cb53a18ee3 Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
Jeff Young 768fbf5af2 Give up on trying to calculate text bounding boxes.
It results in too many hacks strewn through the code.  Just draw the
text and measure it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14803
2023-05-26 18:44:33 +01:00
Jeff Young 6e127829f8 Cleanup formating and includes. 2023-05-26 18:44:33 +01:00
jean-pierre charras 68464a1993 Simulator: add missing ngspice models.
Fixes #14813
https://gitlab.com/kicad/code/kicad/-/issues/14813
2023-05-26 14:46:51 +02:00
Jon Evans 942ee13cd1 PNS: Allow width-caused DRC violations at start of route
Also fix an issue where DRC violations introduced by the
width change action could be committed in walk/shove mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14805
2023-05-25 23:10:00 -04:00
Jon Evans fbe185b99b PNS debug tool: HiDPI and settings fixes 2023-05-25 21:53:38 -04:00
Jeff Young 50da4e483e Tailor inspector text properties for dimension objects. 2023-05-25 16:18:37 +01:00
Jeff Young 5114d3b8c3 Don't use GetValueFieldText from within text var resolution.
(It resets the recursion checker.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14815
2023-05-25 14:34:20 +01:00
Steve Bollinger 28b37ad020 Someone accidentally exchanged the x and y coordinates when flipping
components horizontally and vertically in
SCH_DRAWING_TOOLS::SingleClickPlace()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14725
2023-05-25 12:11:48 +00:00
Jeff Young 1282e00775 Fix (presumed) stale name in macOS KIPLATFORM::IO. 2023-05-25 11:26:09 +01:00
Jeff Young 05fef51d81 Push rendering portion of text cache generation down into CALLBACK_GAL. 2023-05-25 11:25:32 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young 5a9ed66cfd Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
jean-pierre charras ff072feeb4 Fix an annoying compil warning on msys2 2023-05-25 11:09:58 +02:00
Seth Hillbrand 39ab2ea41f Fix typo in MSW io.cpp 2023-05-24 19:23:32 -07:00
Seth Hillbrand 48ecd742eb Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Seth Hillbrand 122be418bb Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734
2023-05-24 13:51:54 -07:00
jean-pierre charras 76d66571e4 Pcbnew: fix crash when trying to save a board with a text with overbar and
using a non Kicad font
PCB_PLUGIN::formatRenderCache() was considering all shapes in cache are polygons,
but this is not true: some items can be stroke shapes.
Fixes #14804
https://gitlab.com/kicad/code/kicad/-/issues/14804
2023-05-24 18:21:50 +02:00
jean-pierre charras cd904dc2b9 pcb_calculator, panel_cable_size: commit missing changes. 2023-05-24 13:23:08 +02:00
jean-pierre charras ed6a56cb57 pcb_calculator, panel_cable_size.*: enhancement: allow setting current density.
Fixes #14802
https://gitlab.com/kicad/code/kicad/-/issues/14802
2023-05-24 13:17:25 +02:00
jean-pierre charras a3ac014e14 French translation update 2023-05-24 10:51:43 +02:00
jean-pierre charras ef89495420 pcb_calculator, panel_cable_size.*: code cleanup. No actual change. 2023-05-24 10:25:52 +02:00
Jeff Young 2ac3f4cc9e Undo strategy based on being in a footprint, not footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14799
2023-05-23 17:56:12 +01:00
Jeff Young 56853a6209 Change teardrop edge shape to a checkbox. 2023-05-23 17:45:26 +01:00
Jeff Young b442d769fd Don't allow collisions with self.
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE.  When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14795
2023-05-23 14:10:22 +01:00
jean-pierre charras 03e846d8ea Eeschema: fix block mirroring of fields attached to labels (all types)
Fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Similar to commit 898d88cc, but for block mirroring.
Fixes #14758
https://gitlab.com/kicad/code/kicad/-/issues/14758
2023-05-23 09:42:24 +02:00
qu1ck e86937ca2e Use SetLabelText in PANEL_PACKAGE 2023-05-22 19:01:31 +00:00
Wayne Stambaugh 5b539958a2 Fix track and via properties dialog radio buttons on GTK. 2023-05-22 13:54:13 -04:00
Jeff Young 00986484e0 Attempt to fix teardrop radio buttons on GTK. 2023-05-22 14:48:53 +01:00
Wayne Stambaugh a13a49f45a Fix clipped combobox entry in board editor text box dialog.
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched.  Setting the minimum width
resolved the issue.  This may have been a GTK only issue.
2023-05-22 08:54:48 -04:00
Jeff Young 03486443c7 Fix more SPICE case-insensitivity bugs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793
2023-05-22 11:46:28 +01:00
Mark Visser 0d235ac64b fix bug whereby spice params with capital letters no longer cause an error and data loss
Spice parameters were converted to lower-case before comparison. This is incorrect, as it
is legal and common for spice parameters to contain capital letters (e.g. potentiometers
typically use Rt and SET as their parameters).
Spice parameters are not case sensitive, so the correct behaviour is to instead do a
case-insensitive comparison on the parameter name.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793
2023-05-21 17:50:35 -04:00
Jeff Young df763eaf88 Reconcile PNS router with DRC.
Hole-to-hole is only for drilled holes.
NPTH slots also get EDGE_CLEARANCE applied.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14771
2023-05-21 19:58:00 +01:00
Jeff Young 1057483983 Reset button applies to resolved page, not lazy page holder.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786
2023-05-21 18:15:21 +01:00
Jeff Young 7e51077992 STL is your friend... until it's not.
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.

Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14781
2023-05-21 17:56:43 +01:00
Jeff Young ff9a5b8373 Remove change from teardrop merge that wasn't needed for final impl. 2023-05-21 16:39:18 +01:00
Jeff Young 29674051b4 Readability (no functional changes). 2023-05-21 16:22:14 +01:00
jean-pierre charras 52bf337b55 vector2d.h: fix for the fix of the awrning fix. 2023-05-21 16:06:15 +02:00
jean-pierre charras c08f482ed4 Eeschema, panel color settings: minor fix: ensure color swatches are show/hidden
according to the option Override Colors state.
2023-05-21 14:16:11 +02:00
Marek Roszko c2e019b773 Fix warning fix 2023-05-21 08:09:49 -04:00
Jeff Young 502da2d03c Performance improvements. 2023-05-21 11:23:56 +01:00
Jeff Young cbf83c4161 Pin preferences dialog size.
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14785
2023-05-21 11:17:36 +01:00
Jeff Young d4c9d9d60a Fix issue with colours in the new lazy-loaded preference panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14784

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14782
2023-05-21 10:56:21 +01:00
Jon Evans 902913c7dd Fix infobar height in Windows HiDPI situations 2023-05-20 21:57:08 -04:00
Jon Evans c1d7fcf587 Remove very small grid sizes from schematic editor
See https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-05-20 21:36:09 -04:00
Marek Roszko aa230b4e08 Breakup sim_model_ngspice_data.cpp into multiple files to avoid unreasonable compiler link times 2023-05-20 19:58:46 -04:00
Jeff Young 08a9d4b26f ADDED preference for ratsnest thickness.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14708
2023-05-21 00:07:08 +01:00
Jeff Young 80aef37cc4 Don't consider shorted items when opitmizing ratsnest.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715
2023-05-20 22:54:44 +01:00
Jeff Young ea341289de Fix uninitialized variable (Coverity report). 2023-05-20 21:10:09 +01:00
Jeff Young 102d61ed39 Terminology cleanup. 2023-05-20 21:04:39 +01:00
Jeff Young 58f4943597 ADDED voltage- & current-controlled voltage & current sources
Added GUI support for ngspice VCVS, VCCS, CCVS and CCCS.
2023-05-20 21:04:39 +01:00
Wayne Stambaugh 24b04795fd Add net navigator panel to schematic editor.
[ADDED]: A panel to the schematic editor  that allows quick access to all
         of the items connected to the currently highlighted net.

This is an initial swag at implementing a full net navigator feature.  For
now it only shows the currently highlighted net nodes.  The incremental
net list advanced setting must be enabled in order to use this feature due
to performance reasons.  There are still some issues with saving the panel
position which will be addressed in the future.

Initial code for serializing wxAuiPaneInfo settings to and from JSON have
be implemented.
2023-05-20 13:48:03 -04:00
Marek Roszko 88bf6b2627 More double const warnings 2023-05-20 08:09:56 -04:00
Marek Roszko ded099c07d Unreachable code warning 2023-05-20 08:08:22 -04:00
Marek Roszko 4eeae65411 Fix another warning
Cast the args with static_cast so the compiler knows its intentional
2023-05-20 08:05:14 -04:00
Marek Roszko 8a7044c3fb Fix some more warnings 2023-05-20 08:00:16 -04:00
Alex 9d452a6097 Fix opening boards with deprecated features. 2023-05-20 07:39:01 +03:00
Jeff Young 4c59365867 Blind attempt to fix pns-debug-tool linking issue. 2023-05-19 19:26:03 +01:00
Jeff Young 8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
Jeff Young 329025f8a7 Update "simple" MRU paths in project Save As.
Update only those that are the project name + extension.

Fixes https://gitlab.com/kicad/code/kicad/issues/14681
2023-05-19 18:02:02 +01:00
jean-pierre charras 86c75cf261 Fix a compil issue. 2023-05-19 09:24:49 +02:00
Marek Roszko 7774b75172 Another set of C5266 warning fixes 2023-05-18 22:46:57 -04:00
Marek Roszko 3bf2fb2c0e Fix more C5266 warnings 2023-05-18 22:08:50 -04:00
Marek Roszko 573b66d243 Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect
Microsoft doesn't even document C5266
2023-05-18 21:35:06 -04:00
Marek Roszko 1cb6846df8 Disable warning made jenkin logs impossible to read 2023-05-18 20:55:26 -04:00
Seth Hillbrand 532d020d03 Update translations 2023-05-18 11:56:44 -07:00
Toni Laiho 48a439a4c1 Translated using Weblate (Finnish)
Currently translated at 100.0% (8303 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-18 20:53:41 +02:00
Wellington Terumi Uemura ea898f2198 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8303 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-05-18 20:53:41 +02:00
Henrik Kauhanen 506b9690ae Translated using Weblate (Swedish)
Currently translated at 99.7% (8281 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-18 20:53:41 +02:00
dsa-t bcdaa6e9d7 Translated using Weblate (Russian)
Currently translated at 94.9% (7885 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-05-18 20:53:41 +02:00
Miklós Márton c03a2dd240 Translated using Weblate (Hungarian)
Currently translated at 0.3% (30 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2023-05-18 20:53:40 +02:00
Toni Laiho 9c2bce53cc Translated using Weblate (Finnish)
Currently translated at 100.0% (8303 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-18 20:53:40 +02:00
Henrik Kauhanen 08f187ecef Translated using Weblate (Finnish)
Currently translated at 100.0% (8303 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-18 20:53:40 +02:00
Wellington Terumi Uemura 43675a5163 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.2% (8244 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-05-18 20:53:40 +02:00
Henrik Kauhanen b0e3021f97 Translated using Weblate (Swedish)
Currently translated at 99.7% (8281 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-18 20:53:40 +02:00
dsa-t 3cbf52d88f Translated using Weblate (Russian)
Currently translated at 94.9% (7885 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-05-18 20:53:40 +02:00
István Farkas 98d09a3a86 Translated using Weblate (Hungarian)
Currently translated at 0.1% (13 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2023-05-18 20:53:39 +02:00
Toni Laiho f314600482 Translated using Weblate (Finnish)
Currently translated at 99.9% (8298 of 8303 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-18 20:53:39 +02:00
Seth Hillbrand f574505232 Add Tamil
Also re-enable installation of partial languages
2023-05-18 11:51:17 -07:00
jean-pierre charras 898d88cc11 Eeschema, directive labels: fix some issues:
- honor mirroring of fields attached to labels (all types)
- fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Fixes #14758
https://gitlab.com/kicad/code/kicad/issues/14758
2023-05-18 10:28:27 +02:00
Jon Evans 27afd22bbf Specctra: remove grouped tracks from group before cleaning up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14763
2023-05-17 23:03:06 -04:00
Marek Roszko 3cd89eeffb Use a placeholder commit hash if we can't get a git hash
Makes CLI test happy on...build systems circa 1990s that don't just shallow copy the git repo
2023-05-17 21:24:26 -04:00
Seth Hillbrand 0de24bfd59 Cleanup text alignment between version 6 and 7
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.

This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.

This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes.  The source of these
offsets is atm unclear.

Fixes https://gitlab.com/kicad/code/kicad/issues/14755
2023-05-17 13:33:49 -07:00
Ian McInerney 20ec8ed303 Fix GitLab URLs to point to the correct project page
GitLab 16.0 removes support for URLs that don't contain /-/ after the
repository name, so the report bug feature and various links we had in
the source (including the git-fixes script) would lead to a 404 error.

See GitLab docs for deprecation/removal notice:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=16.0#legacy-urls-replaced-or-removed

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14759
2023-05-17 11:23:00 +01:00
Marek Roszko aeadd49a33 Fix windows builder broken by 831a6d5 2023-05-16 21:49:55 -04:00
Marek Roszko ecbde8fc5f Disable the image diff test on ubuntu due to the restricted PPA builder 2023-05-16 21:44:26 -04:00
Wayne Stambaugh 831a6d55fc Fix potential stale pointer bug in schematic highlight connection code.
SCH_CONNECTION objects are temporary and can become stale any time the
connectivity is updated.  Keeping them around to reference later is a
bad idea.  Even if the object pointer is still valid in an SCH_ITEM in
the undo/redo buffers, comparing the pointer against another pointer as
a test to see if they are the same connection is not valid.  Saving the
connection name is safe and ensures the connection is the same even if
the pointers differ.
2023-05-16 20:06:21 -04:00
jean-pierre charras be59e7d67f NETLIST_EXPORTER_SPICE: add space to the not allowed chars in netnames
Not allowed chars are replaced by '_'
Fixes #14724
https://gitlab.com/kicad/code/kicad/issues/14724
2023-05-16 17:59:01 +02:00
jean-pierre charras 66651327bd STEP export: in board outlines, export Circles as Cylinders, round 2.
Other arcs (not 360 deg arcs) are still exported as polylines
2023-05-16 13:39:16 +02:00
jean-pierre charras 99bdb82dff Revert "STEP export: in board outlines, export Circles as Cylinders."
This reverts commit 09515fe821.
It does not pass a QA test
2023-05-16 09:59:53 +02:00
jean-pierre charras 09515fe821 STEP export: in board outlines, export Circles as Cylinders.
Other arcs (not 360 deg arcs) are still exported as polylines
2023-05-16 08:46:34 +02:00
Marek Roszko 06b3edec53 Use pre-python 3.9 type hint in cli qa 2023-05-15 20:05:44 -04:00
Marek Roszko 1adcb86e0b Initial schematic search pane 2023-05-14 22:41:56 -04:00
Marek Roszko 34ba343754 Add SCHEMATIC_LISTENER equivalent to BOARD_LISTENER 2023-05-14 21:35:51 -04:00
Jon Evans 94130716a5 PNS: Collision search context may be null
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14741
2023-05-14 17:20:59 -04:00
Alex d790865549 Make sure text bounding box exists when syncing PNS world.
Fixes https://gitlab.com/kicad/code/kicad/issues/14733
2023-05-14 13:40:14 +03:00
jean-pierre charras 0d893f09ef French translation update 2023-05-14 10:20:15 +02:00
jean-pierre charras 3be8bfe193 Fix a few Coverity warnings (not initialized vars) 2023-05-14 10:11:38 +02:00
jean-pierre charras bd71cec826 Bitmap2component: enhancement: add more PCB layers in PCB layer list selector. 2023-05-13 12:28:48 +02:00
Seth Hillbrand 7388dfec2d Update translations 2023-05-12 12:58:58 -07:00
Ulices ffee7e8b41 Translated using Weblate (Spanish (Mexico))
Currently translated at 97.0% (8053 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-12 21:54:39 +02:00
taotieren 27a96f62ae Translated using Weblate (Chinese (Traditional))
Currently translated at 94.9% (7884 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2023-05-12 21:54:39 +02:00
taotieren 8a042e2841 Translated using Weblate (Chinese (Simplified))
Currently translated at 96.8% (8042 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:39 +02:00
Miklós Márton 41083317ee Translated using Weblate (Hungarian)
Currently translated at 35.3% (2933 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2023-05-12 21:54:39 +02:00
Toni Laiho 68cf78cda0 Translated using Weblate (Finnish)
Currently translated at 99.9% (8300 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-12 21:54:39 +02:00
taotieren c825452cbb Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
taotieren 4086654aea Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
taotieren 57d34c779e Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
taotieren 59b5e01cad Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
taotieren 7d9fd2d139 Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
Hubert Hu 940e4ca6e3 Translated using Weblate (Chinese (Simplified))
Currently translated at 96.7% (8036 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-12 21:54:38 +02:00
Henrik Kauhanen ddb69620b4 Translated using Weblate (Swedish)
Currently translated at 99.7% (8281 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-12 21:54:38 +02:00
Henrik Kauhanen d1e01466b5 Translated using Weblate (Finnish)
Currently translated at 97.4% (8089 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-12 21:54:38 +02:00
Jan Straka 414783f7a3 Translated using Weblate (Czech)
Currently translated at 86.8% (7211 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-12 21:54:37 +02:00
Wellington Terumi Uemura bdc9af7f09 Translated using Weblate (Portuguese (Brazil))
Currently translated at 97.7% (8113 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-05-12 21:54:37 +02:00
Henrik Kauhanen 27c2ac1e27 Translated using Weblate (Swedish)
Currently translated at 99.4% (8256 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-12 21:54:37 +02:00
Toni Laiho 773c1a35d7 Translated using Weblate (Finnish)
Currently translated at 97.4% (8089 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-12 21:54:37 +02:00
Ettore Atalan b2558e1901 Translated using Weblate (German)
Currently translated at 96.5% (8013 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-12 21:54:37 +02:00
Ulices 42432cadbf Translated using Weblate (Spanish (Mexico))
Currently translated at 96.9% (8048 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-12 21:54:37 +02:00
Henrik Kauhanen 490e4c2fd4 Translated using Weblate (Swedish)
Currently translated at 97.2% (8077 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-12 21:54:37 +02:00
dsa-t b7555f9d41 Translated using Weblate (Russian)
Currently translated at 94.9% (7883 of 8302 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-05-12 21:54:37 +02:00
Seth Hillbrand 6a0f64b5a4 Update golden QA images with fixed stroke font output
QA images were generated with v7 output location.  This needs to update
to use the v6 locations
2023-05-12 12:40:41 -07:00
Seth Hillbrand 72267cf9b0 Adjust stroke font output to match v6 output
Many minor tweaks were added that changed the output of the stroke font
from v5/v6.  These offsets changed the gerber output expected.  This
reverts the changes to something much closer to the v6 output.  It is
not pixel-perfect but gets very close on most texts.

Fixes https://gitlab.com/kicad/code/kicad/issues/14609
2023-05-12 12:40:41 -07:00
jean-pierre charras 94bd1c6025 Fix a few Coverity warnings. 2023-05-12 18:53:55 +02:00
Seth Hillbrand 2ffb58a7e2 Test for schematic type when changing
The schematic editor undo list may hold page layout types as well
2023-05-12 08:43:58 -07:00
Alex fe2e5cbfa6 Fix pre-commit symlink 2023-05-12 16:10:18 +03:00
Alex 28fd5f75c8 Revert change in git pre-commit hook. 2023-05-12 15:49:23 +03:00
Alex f7f15e1ddf Prevent axes settings from affecting angles in properties panel.
Fixes https://gitlab.com/kicad/code/kicad/issues/14168
2023-05-12 15:44:37 +03:00
Alex efbd360440 Fix double negative signs in mask/paste margin overrides. 2023-05-12 15:44:37 +03:00
jean-pierre charras 22de1c8813 Teardrop dialog: refinements. Show a PROGRESS_REPORTER when refilling zones. 2023-05-12 10:06:20 +02:00
Steve Bollinger 85f4f0d6c8 pcbnew: switching track posture may not work on first attempt
If you drag a track out and connect to a pad then press the hotkey
to switch the track posture it may not switch because the track
posture selected when the pad was reached is different than the one
that the mouse trail placer drew. As the aspect switching is done
in the mouse trail placer it does not know that the line placer
already override the track.

To correct this, in LINE_PLACER::FlipPosture() if the aspect is not
currently manually forced then copy the current aspect from the
line placer to m_mouseTrailPlacer before calling the FlipPosture()
method of m_mouseTrailPlacer. This will only be done once per
dragging session as once the aspect is manually forced it remains
manually forced. This seems to fix the issue with no undesirable
side effects.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12369
2023-05-11 23:35:21 +00:00
Jon Evans 89aae88e96 PNS: make sure context options are used in collideSimple
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14659
2023-05-11 16:48:15 -04:00
Jon Evans 2e60315959 PNS: Don't use clearance epsilon for calculating shove distances
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14707
2023-05-11 13:09:03 -04:00
Jeff Young 35158a7db9 Use track opacity for teardrops. 2023-05-11 15:57:44 +01:00
Jeff Young 4da6d5ff28 Add "generate raw teardrops" option to Add Teardrops dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14711

Fixes https://gitlab.com/kicad/code/kicad/issues/14704
2023-05-11 15:47:42 +01:00
Jeff Young daa3a1aae9 Revert addition of update-teardrops checkbox to DRC dialog. 2023-05-11 14:53:28 +01:00
Jeff Young 9481a218c7 Lazy loading of stackup UI widgets. 2023-05-11 14:37:48 +01:00
Jeff Young 3f44c811c7 Don't run onPageChanged() event handler during initialization. 2023-05-11 12:51:55 +01:00
jean-pierre charras a2ec8bf0a4 Fix last changes in io.cpp for msys2.
- use the same code for msys2 and msvc
- add an option to use a fallback for msys2 if the common code does not compile
2023-05-11 12:51:53 +02:00
Jeff Young 03c9b1c202 Move remainder of Board Setup to lazy loading. 2023-05-11 11:43:10 +01:00
Jeff Young ddc6ecf7be Lazy loading of Schematic Setup panels. 2023-05-11 11:43:10 +01:00
Jon Evans 932f171e96 Remove hard-coded safety margin from specctra output
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14713
2023-05-10 21:55:47 -04:00
Jon Evans 3686c5b371 Use the right path for recursing in text var resolution
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14720
2023-05-10 21:46:05 -04:00
Marek Roszko dd8dc4e513 Add a sequential read flagged fopen helper
Trying to squeeze out some kind of gain by informing the OS we will read a file sequentially.
In particular our FILE_LINE_READER just uses fgetc until the end
2023-05-10 20:24:27 -04:00
Graham Keeth df3560ab8e sim: fixup some diode parameter units 2023-05-10 23:09:13 +00:00
Graham Keeth 2970d97bf2 sim: fix diode model default breakdown voltage 2023-05-10 23:09:13 +00:00
Jeff Young 9ae8255202 Insta-prefs. 2023-05-10 18:14:14 +01:00
Jeff Young 6bf43588bb Don't store sizes in panels. Let them auto-lay-out. 2023-05-10 18:14:14 +01:00
jean-pierre charras 31d613c746 Fix a few Coverity warnings (not initialized vars)
It also fixes a potential crash when closing Kicad.
2023-05-10 09:21:39 +02:00
Marek Roszko 6e93a0cbad Fix ImmControl implementation 2023-05-09 21:27:14 -04:00
Marek Roszko 5d93487607 Disable IME input on the gal canvas
Fixes #9719
2023-05-09 20:30:15 -04:00
Seth Hillbrand 6e4de18e15 Ensure _changed_ netlist is propagated
The propagation is currently (maybe not needed) limited to the global
name that is the source of the change.  We also need to propagate the
global name that is changed in case the global is set in a tree leaf and
not the root

Fixes https://gitlab.com/kicad/code/kicad/issues/14657
2023-05-09 12:13:06 -07:00
Jeff Young e7d4b4aefc Simplify previous fix to not include new strings. 2023-05-09 18:22:29 +01:00
Jeff Young fdcc97e604 De Morgan conversions are equivalences, not additional items to simulate.
Fixes https://gitlab.com/kicad/code/kicad/issues/14230
2023-05-09 18:09:15 +01:00
Seth Hillbrand 7567adc54e Update translations 2023-05-09 09:51:58 -07:00
2tama3 2053821d10 Translated using Weblate (Japanese)
Currently translated at 99.3% (8069 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:31 +02:00
Ulices 9f7a0c5c6f Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8119 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:30 +02:00
Ken Ovo 13668c71d2 Translated using Weblate (German)
Currently translated at 99.5% (8088 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:30 +02:00
Ulices 1a1999280b Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8119 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:30 +02:00
Tokita, Hiroshi 4166fe4195 Translated using Weblate (Japanese)
Currently translated at 99.2% (8068 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:29 +02:00
Toni Laiho 402fb31dae Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:29 +02:00
Ulices 32c9676a0c Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (8089 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:29 +02:00
Hubert Hu 0c030216a0 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (8114 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-09 18:50:28 +02:00
Tokita, Hiroshi d85859ca40 Translated using Weblate (Japanese)
Currently translated at 99.2% (8068 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:28 +02:00
CloverGit da24f0b037 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (8114 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-09 18:50:28 +02:00
CloverGit be53b00c1b Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (8114 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-09 18:50:27 +02:00
김랑기 fc3cf603d9 Translated using Weblate (Korean)
Currently translated at 98.2% (7982 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-05-09 18:50:27 +02:00
Ivan Chuba d3da3f63c7 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-05-09 18:50:27 +02:00
김랑기 8401160fea Translated using Weblate (Korean)
Currently translated at 98.1% (7976 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-05-09 18:50:26 +02:00
Tokita, Hiroshi 453731379b Translated using Weblate (Japanese)
Currently translated at 99.2% (8068 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:26 +02:00
Jan Straka c42ac01d8e Translated using Weblate (Czech)
Currently translated at 89.4% (7271 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:26 +02:00
boonchai k 7412a3c09b Translated using Weblate (Thai)
Currently translated at 88.2% (7173 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2023-05-09 18:50:26 +02:00
Allan Nordhøy b6f72b7cc4 Translated using Weblate (Norwegian Bokmål)
Currently translated at 59.9% (4871 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2023-05-09 18:50:25 +02:00
Tokita, Hiroshi 904c262a6a Translated using Weblate (Japanese)
Currently translated at 98.3% (7989 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:25 +02:00
dsa-t f89d5ba8fb Translated using Weblate (Russian)
Currently translated at 97.8% (7949 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-05-09 18:50:25 +02:00
Henrik Kauhanen f212184180 Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:24 +02:00
Jan Straka 32b11c29cd Translated using Weblate (Czech)
Currently translated at 89.1% (7243 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:24 +02:00
Henrik Kauhanen 4619e3ba0a Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:24 +02:00
minsu kim (0xGabriel) f8675146dd Translated using Weblate (Korean)
Currently translated at 98.1% (7975 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-05-09 18:50:23 +02:00
Arnau Llovet Vidal 26c95724ee Translated using Weblate (Catalan)
Currently translated at 57.0% (4637 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2023-05-09 18:50:23 +02:00
Arnau Llovet Vidal 11382f745f Translated using Weblate (Catalan)
Currently translated at 56.7% (4607 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2023-05-09 18:50:23 +02:00
Ulices a40d43b8e9 Translated using Weblate (Spanish (Mexico))
Currently translated at 98.7% (8025 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:22 +02:00
Andrey Fedorushkov cc375579eb Translated using Weblate (Russian)
Currently translated at 97.8% (7948 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-05-09 18:50:22 +02:00
Ulices de10e004d9 Translated using Weblate (Spanish (Mexico))
Currently translated at 98.4% (8000 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:22 +02:00
Henrik Kauhanen c92403065d Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:21 +02:00
Tokita, Hiroshi 56e8fe627d Translated using Weblate (Japanese)
Currently translated at 98.2% (7979 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:21 +02:00
Henrik Kauhanen 8c697ae98a Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:21 +02:00
ssantos 92bceed5ca Translated using Weblate (Portuguese)
Currently translated at 99.1% (8059 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2023-05-09 18:50:20 +02:00
Mark Hämmerling 47e4fb3b29 Translated using Weblate (German)
Currently translated at 99.7% (8101 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:20 +02:00
Ivan Chuba 3006426be5 Translated using Weblate (Estonian)
Currently translated at 5.2% (425 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2023-05-09 18:50:19 +02:00
Ulices f732b7a69b Translated using Weblate (Spanish (Mexico))
Currently translated at 98.1% (7972 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:19 +02:00
Nguyễn Ngọc Khánh e01a23d353 Translated using Weblate (Vietnamese)
Currently translated at 14.3% (1167 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-05-09 18:50:19 +02:00
Luc f3a1cc4b62 Translated using Weblate (German)
Currently translated at 99.7% (8101 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:19 +02:00
Jan Straka f6622b7ccb Translated using Weblate (Czech)
Currently translated at 88.8% (7218 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:18 +02:00
Ettore Atalan aeb6bce1be Translated using Weblate (German)
Currently translated at 99.6% (8097 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:18 +02:00
Jan Straka 8e855b3d19 Translated using Weblate (Czech)
Currently translated at 88.8% (7219 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:18 +02:00
Ivan Chuba 583568f2c7 Translated using Weblate (Estonian)
Currently translated at 5.1% (415 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2023-05-09 18:50:17 +02:00
Ivan Chuba 4b8e3faa9b Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-05-09 18:50:17 +02:00
Luc 141249edaa Translated using Weblate (German)
Currently translated at 99.6% (8094 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:16 +02:00
Nguyễn Ngọc Khánh da5c0f15b8 Translated using Weblate (Vietnamese)
Currently translated at 14.3% (1166 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-05-09 18:50:16 +02:00
Toni Laiho 37603d13a5 Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:16 +02:00
Nguyễn Ngọc Khánh 263e1b1511 Translated using Weblate (Vietnamese)
Currently translated at 14.3% (1165 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2023-05-09 18:50:16 +02:00
Hubert Hu a05294ed69 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (8114 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-05-09 18:50:15 +02:00
minsu kim (0xGabriel) 026cafeab3 Translated using Weblate (Korean)
Currently translated at 98.1% (7973 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-05-09 18:50:15 +02:00
Ulices caefe90cd4 Translated using Weblate (Spanish (Mexico))
Currently translated at 97.9% (7956 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:15 +02:00
turkce 5665264953 Translated using Weblate (Turkish)
Currently translated at 48.6% (3956 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-05-09 18:50:14 +02:00
Henrik Kauhanen f29affa3f2 Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:14 +02:00
Henrik Kauhanen 8af48fa6f9 Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:14 +02:00
Toni Laiho c19cb1c227 Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:14 +02:00
Henrik Kauhanen 6dc443b5ed Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:13 +02:00
Toni Laiho baa82f8a26 Translated using Weblate (Finnish)
Currently translated at 99.9% (8124 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:13 +02:00
Henrik Kauhanen 22e6aa763c Translated using Weblate (Finnish)
Currently translated at 99.9% (8124 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:13 +02:00
Henrik Kauhanen c6a6455ef1 Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:13 +02:00
Henrik Kauhanen 8f1bc14bc9 Translated using Weblate (Finnish)
Currently translated at 99.9% (8124 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:12 +02:00
Ulices 57bff1f39c Translated using Weblate (Spanish (Mexico))
Currently translated at 97.7% (7942 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-05-09 18:50:12 +02:00
ssantos c7ed293f48 Translated using Weblate (Portuguese)
Currently translated at 99.1% (8059 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2023-05-09 18:50:12 +02:00
Jan Straka 486e106855 Translated using Weblate (Czech)
Currently translated at 88.5% (7198 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:11 +02:00
Ettore Atalan aeb5da880f Translated using Weblate (German)
Currently translated at 97.7% (7939 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-05-09 18:50:11 +02:00
Ivan Chuba 6079134bcd Translated using Weblate (Ukrainian)
Currently translated at 99.1% (8057 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-05-09 18:50:11 +02:00
Wellington Terumi Uemura 8229abcf24 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-05-09 18:50:11 +02:00
boonchai k b526e0dbc9 Translated using Weblate (Thai)
Currently translated at 88.2% (7172 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2023-05-09 18:50:10 +02:00
turkce 6a52775d84 Translated using Weblate (Turkish)
Currently translated at 46.8% (3807 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-05-09 18:50:10 +02:00
Henrik Kauhanen 73ee4fc1b5 Translated using Weblate (Swedish)
Currently translated at 99.9% (8120 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-05-09 18:50:10 +02:00
ZbeeGin 373a15158d Translated using Weblate (Polish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-05-09 18:50:09 +02:00
johanneswilkens 1c1731680b Translated using Weblate (Dutch)
Currently translated at 82.2% (6683 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-05-09 18:50:09 +02:00
Tokita, Hiroshi aa57f4d0d8 Translated using Weblate (Japanese)
Currently translated at 98.2% (7979 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-05-09 18:50:09 +02:00
Toni Laiho 186d110daa Translated using Weblate (Finnish)
Currently translated at 100.0% (8125 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-05-09 18:50:08 +02:00
Jan Straka 0567c83a26 Translated using Weblate (Czech)
Currently translated at 88.5% (7195 of 8125 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-05-09 18:50:08 +02:00
jean-pierre charras 1d5158dbaf Try to fix a compil issue. 2023-05-09 17:44:33 +02:00
jean-pierre charras 7b36e5f755 Do not mark empty strings for translation: empty strings are not allowed. 2023-05-09 17:10:59 +02:00
Jeff Young 8cd1f8d905 Support for De Morgan variants in symbol plotting CLI. 2023-05-09 13:09:12 +01:00
Jeff Young 4e420f3cf6 Formatting. 2023-05-09 12:22:17 +01:00
Jeff Young 245c3ba6e4 CLang can't do a dynamic_cast across the KiWay.
Rely on DRC for text readability instead.

(Fixes Sentry KICAD-R4 on Mac, and the assert when opening
Preferences from a non-PCBNew-module window.)
2023-05-09 11:10:33 +01:00
jean-pierre charras 484acd4246 BOARD_ADAPTER::addText() do not call Fracture twice: it is useless. 2023-05-09 09:18:20 +02:00
Jeff Young e1db4e0694 Add backspace modifier handling to SCINTILLA_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13910
2023-05-08 18:42:04 +01:00
Mike Williams 9f62e88477 Symbol Fields Table / BOM Export: handle variable resolution 2023-05-08 10:59:13 -04:00
Jeff Young 2dcbc10a09 Performance optimization. 2023-05-08 11:46:04 +01:00
Jeff Young 5b3798a370 Holes need a parent.
SetHole() handles all this for us.  Make sure it's called.

Fixes https://gitlab.com/kicad/code/kicad/issues/14702
2023-05-08 11:41:12 +01:00
Jeff Young f883b7fd4d Fix layout inconsistencies in Gen Footprint Pos file dialog. 2023-05-08 10:57:43 +01:00
Jon Evans b06f90335b PNS: Remove holes when removing items with holes
Related to https://gitlab.com/kicad/code/kicad/-/issues/14702
2023-05-07 22:12:11 -04:00
Jon Evans 09e8f72196 Don't try to open files multiple times
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14703
2023-05-07 21:46:39 -04:00
Jeff Young 7978941fa8 Don't allow thickness of 0 in case of an empty stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/10790
2023-05-07 22:24:40 +01:00
Jeff Young 031c46c887 Fix nullptr crash in undo. 2023-05-07 22:24:40 +01:00
Jeff Young 02b380da96 Field bounding boxes no longer contain interline spacing.
That's entirely done through FIELD_PADDING now.

Fixes https://gitlab.com/kicad/code/kicad/issues/14127
2023-05-07 22:24:40 +01:00
Marek Roszko 5dcc221950 Use _fgetc_nolock with msvc 2023-05-07 12:33:33 -04:00
Marek Roszko b92f62337f Change the spacemouse driver flag to true for windows by default 2023-05-07 12:12:20 -04:00
Marek Roszko c7eaef2d13 Add missing footprint load progress, usually in schematic editor 2023-05-07 10:46:39 -04:00
Jeff Young 5bf450a89f Performance. (Coverity) 2023-05-07 14:58:44 +01:00
Jeff Young 4a62cc6edd Separate symbol editor polyline and polygon tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/14695
2023-05-07 14:58:44 +01:00
Jon Evans 7a7a23c83a Fix crash when database lib config is not valid 2023-05-07 09:06:37 -04:00
Marek Roszko f169f7a009 Tweak doxygen cfg to remove inline sources 2023-05-07 08:55:28 -04:00
Jon Evans 2ab47ee1e9 Allow for settings to be added during load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14691
2023-05-07 08:48:07 -04:00
Marek Roszko fed7c87b0b Swap the doxygen build to the fedora container
Fedora is shipping a modern enough doxygen we don't need the ubuntu container anymore
2023-05-06 22:47:08 -04:00
Marek Roszko bfaee785be Apparently s5cmd put doesn't exist....just fix the cp variant 2023-05-06 22:42:41 -04:00
Marek Roszko a8afd592c1 Fix the s5cmd to put instead of cp 2023-05-06 21:49:21 -04:00
Marek Roszko a1f42a79b6 Remove accidental spaces in script 2023-05-06 21:44:27 -04:00
Marek Roszko b7ef189ec5 Change coverity to url submission 2023-05-06 20:48:06 -04:00
Jeff Young 8bd21edd8a Fix capitalization of text vars for Eagle importer.
Also fixes the test gold files to expect the correct variable
references.
2023-05-06 23:49:10 +01:00
Jeff Young 2762fa7787 ADDED: track width & via size filters in Edit Track & Via Properties
Fixes https://gitlab.com/kicad/code/kicad/issues/13315
2023-05-06 23:20:39 +01:00
Jeff Young 7bb81f7573 Expand solder mask for pads *defined* to be on copper layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/14693
2023-05-06 21:39:01 +01:00
Jeff Young 8fe02ee83c Handle Eagle user-defined attributes.
(We map these to text variables.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13798
2023-05-06 21:10:34 +01:00
Mike Williams 5d116245c6 sch_symbol: always require sheet path for text variable resolution 2023-05-06 14:30:06 -04:00
Marek Roszko b0c5993f93 Swap some more only to rules 2023-05-06 09:29:46 -04:00
Jeff Young 49655ae742 Defense in depth for "mouse stuck in canvas".
Fixes https://gitlab.com/kicad/code/kicad/issues/12653
2023-05-06 11:28:14 +01:00
Jeff Young c016bea020 Make sure mouse isn't captured when dialog is raised.
Fixes https://gitlab.com/kicad/code/kicad/issues/14685
2023-05-06 11:28:14 +01:00
Lucas Dumont a22e6db982 Add Zone when dragging component
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14629
2023-05-06 09:32:38 +00:00
Marek Roszko df35452a98 Variables should be getting merged, before_script wont 2023-05-05 23:17:12 -04:00
Marek Roszko 512e5a30ad Convert win64_build to rules 2023-05-05 23:17:12 -04:00
Marek Roszko 82d4bfac75 Make attach paths relative and upload the output contents
Attach should be relative to CI_PROJECT_DIR
2023-05-05 23:17:12 -04:00
Marek Roszko caf09dc85e Disable compare in the cadstar netlist 2023-05-05 20:16:19 -04:00
Marek Roszko ca59360d9d Move pcbnewswig tests to pytest 2023-05-05 20:16:19 -04:00
Mark Roszko 112aa66be5 Changes to get cli testing in CI and other test fixes 2023-05-05 20:16:19 -04:00
Jeff Young 995388fb71 Rewrite linebreaking algorithm.
Previous version was overly simplistic to deal correctly
with multiple spaces or textruns not separated by spaces.

Fixes https://gitlab.com/kicad/code/kicad/issues/14683
2023-05-05 22:32:40 +01:00
Wayne Stambaugh 51fd7ca5ed Verify parent symbol shared pointer is still valid in symbol editor. 2023-05-05 12:32:00 -04:00
Jeff Young b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Wayne Stambaugh fb6b8eaeea Don't include power symbol pin when exporting netlist.
The netlist exporter was never updated to exclude symbols that are
tagged as power symbols.  Only the legacy power symbol name prefix
('#') was used as the power symbol check.  Power symbols no longer
require the '#' name prefix.
2023-05-05 08:53:29 -04:00
Marek Roszko 18dd623122 Add env var to force logging on msw 2023-05-04 20:58:33 -04:00
Seth Hillbrand 2cac992801 Fix a28d590b9b
Needs to be static, so keep the reference from the associated symbol and
not the SCH_SYMBOL instance.  Both will likely have the same prefix,
which is all we care about here
2023-05-04 12:06:19 -07:00
Seth Hillbrand 1e03c84918 Add ability to toggle attributes
Adds actions and context menu options to adjust attributes.
2023-05-04 11:51:21 -07:00
Seth Hillbrand a28d590b9b Force not-on-board symbols to NONE priority
Symbols that are not on the board should not affect the arbitrary names
assigned to unlabeled nets.
2023-05-04 11:51:21 -07:00
Jeff Young c20ef06f56 Use correct sheetpath when exporting netlist. 2023-05-04 14:27:04 +01:00
Jeff Young 384f65c45e Be careful of infobar outliving symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/14680
2023-05-04 11:51:47 +01:00
jean-pierre charras 8a52941624 bom_csv_grouped_by_value_with_fp.py: fix compatibility with python < 3.9 2023-05-04 08:48:39 +02:00
Jeff Young c4668c1d3a Don't store resolved values in symbol fields table editor dataStore.
We're going to use the dataStore to update the symbol, so
if we store resolved values it will nuke any text variables
even if the field wasn't edited.

Not sure if the BOM generator has a separate resolve-variables
step or not.  But it will need one as the code removed here
only worked for Values and Footprint fields anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/14423
2023-05-04 00:06:44 +01:00
Seth Hillbrand 8b73b0549f Remove matching parents/neighbors in subgraphs
This ensures that when bus elements or labels matching bus elements are
removed that the stale neighbor/parent references are similarly removed

Matching 7.0 commit 4cdf75dc72
2023-05-03 13:37:11 -07:00
Seth Hillbrand b72c6e5cb0 Avoid NaNs when applying fillets
Segments that are inline with each other will create NaNs when
filleting.  This double check prevents NaN points from being added to
the polygon
2023-05-03 11:50:03 -07:00
jean-pierre charras 2aa9ea87eb Simulator: when using Incremental Connectivity, ensure the netlist is up to date 2023-05-03 18:59:18 +02:00
Jeff Young cd43dccb18 Add missing property to footprint texts table.
Fixes https://gitlab.com/kicad/code/kicad/issues/14357
2023-05-03 17:57:13 +01:00
Jeff Young 4c2fcb6614 Line width in Plot dialog is minimum, not default.
Fixes https://gitlab.com/kicad/code/kicad/issues/14367
2023-05-03 17:34:36 +01:00
jean-pierre charras 152f6d80e5 Use operator at() instead of [] to access a std::array item
It helps debug.
2023-05-03 16:40:40 +02:00
jean-pierre charras 631dde3ed1 Pcbnew: fix crash when loading a file having vias on connected layers only.
It was due to an access out of bounds in a std::array
Fixes #14668
https://gitlab.com/kicad/code/kicad/issues/14668
2023-05-03 16:06:32 +02:00
Jeff Young 7eb099187d Pass aEvent by value.
It will have changed by the time CallAfter() is executed.

Fixes https://gitlab.com/kicad/code/kicad/issues/12475
2023-05-03 12:29:06 +01:00
Jeff Young 0eac5c6748 Tighten lifecycle management of CN_ANCHOR/CN_ITEM.
In particular, when a CN_ITEM is freed set all its anchor's
item pointers to NULL.  (The anchors have a separate
lifecycle due to being std::shared_ptrs.)

Hopefully fixes Sentry KICAD-KV.
2023-05-03 10:50:31 +01:00
Jeff Young b53f337938 More accurate terminology for cross-probe settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/13088
2023-05-03 10:50:31 +01:00
Marek Roszko 2a222706df Start adding cli qa 2023-05-02 23:23:13 -04:00
Jeff Young f27bc16d62 Cleanup API and use text bounding box for routing.
If someone wants to route around the text more tightly
they can now convert the text to polygons.

Fixes https://gitlab.com/kicad/code/kicad/issues/14252
2023-05-02 16:03:43 +01:00
Jeff Young 80f8cd2254 Commenting and formatting. 2023-05-02 14:16:02 +01:00
qu1ck f840fe3d38 Fix PCM update indicator color 2023-05-02 11:33:41 +00:00
jean-pierre charras 7691cd9509 LIB_TREE: fix an issue when using the popup menu:
- At least on wxWidgets 3.2 GetPopupMenuSelectionFromUser() returns the submenu
id, not the submenu idx from 0
- wxID_NONE can be returned when clicking outside the popup menu, or cancel.
2023-05-02 12:40:20 +02:00
Seth Hillbrand cb85412b85 Cleanup Undo ordering
The undo command has accreted a number of things over the years.  This
prunes back the changes to the minimum required number and correctly
orders the actions

Fixes https://gitlab.com/kicad/code/kicad/issues/14661
2023-05-01 19:29:48 -07:00
Jeff Young df7d62fdd3 Added a sort-order dropdown to lib-tree filters.
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match.  The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description.  All that is left to the
provider of the weighted search terms array.
2023-05-01 21:26:43 +01:00
Mike Williams 04a53ea40d Picker Tools: make sure we know what tool we are
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14621
2023-05-01 12:43:09 -04:00
jean-pierre charras 6618cda214 3D viewer: use the right color theme (the one used in the board editor)
Fixes #14616
https://gitlab.com/kicad/code/kicad/issues/14616
2023-05-01 16:51:27 +02:00
Mike Williams 39cc686dc4 Back Annotation: add support for DNP and Exclude from BOM attributes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14584
2023-05-01 08:54:14 -04:00
Jeff Young c31fb435e6 Add missing setting to Dimension Properties dialog.
Also fixes a bug where during file save we were calling
GetPosition() on the PCB_TEXT but getting the DIMENSION's
version.

Fixes https://gitlab.com/kicad/code/kicad/issues/8447
2023-04-30 22:45:19 +01:00
Jeff Young 2f9889ff62 Add settings for plotting PDF property popups.
Fixes https://gitlab.com/kicad/code/kicad/issues/14450
2023-04-30 18:10:04 +01:00
jean-pierre charras 096af19d9a Minor fix and cosmetic change:
- SCH_SYMBOL::GetMsgPanelInfo(): slighly change the displayed lines to allow
longer strings in Description and Keywords
- panel_setup_rules_help.md: fix incorrect html link (URI), creating ERR 404
2023-04-30 17:37:30 +02:00
Mike Williams c1bebf6490 Symbol Fields Table: fix crash
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14532
2023-04-30 10:53:46 -04:00
Jeff Young a3b741a126 Extend Mac colour picker cursor fix to GTK. 2023-04-30 13:48:13 +01:00
Jeff Young 1c6b765ba5 Formatting and cleanup. 2023-04-30 13:43:25 +01:00
Jeff Young bc754df30f Go back to winner-takes-all lib-tree scoring algorithm.
(Because we sort alphabetically there's no way to see
what the second-highest scored item was.)
2023-04-30 13:01:09 +01:00
Jeff Young af7753c7cd Record parent rule for DRC assertions.
(Particularly important if the rule specified a severity.)

Also fixes a bug looking up LSET layer names in the
GetStandardLayerNames array (which aren't the same).

https://forum.kicad.info/t/a-few-questions-about-custom-rules-syntax/40068/7
2023-04-30 13:01:09 +01:00
Jon Evans dc847db19d Add initial support for database library settings UI
For now, just for diagnostic purposes (settings changes are not preserved)
2023-04-29 18:15:00 -04:00
Jeff Young dc57fa7042 Add Grid Settings to PL_EDITOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/14612
2023-04-29 18:17:21 +01:00
Jeff Young e923a5a8c6 Formatting and cleanup. 2023-04-29 18:17:17 +01:00
Jeff Young 08c773a0bf Use wxFileName to resolve . and .. in documentation paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/14564
2023-04-29 17:52:11 +01:00
Jeff Young a817b4c1ff Don't reset alpha when specified in hex value.
Also fixes a bug with colour picker cursor drawing on Mac.

Fixes https://gitlab.com/kicad/code/kicad/issues/14646
2023-04-29 17:52:11 +01:00
Seth Hillbrand f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Jeff Young 251161dbeb Bring inspection reporting in line with zone filler
1) "clearance" rules don't apply to NPTH holes with no copper
2) local zone clearance applies even if other item has no copper

Fixes https://gitlab.com/kicad/code/kicad/issues/14575
2023-04-28 22:15:10 +01:00
Jeff Young 16e000f2b0 Use Net() accessor uniformly; init hole parent in VIA::Clone()
Fixes https://gitlab.com/kicad/code/kicad/issues/14603
2023-04-28 18:32:58 +01:00
Jeff Young 6807ca6f9f Allow text input to Convert to Polygon/Zone/Keepout.
Also fixes non-copper zone filler to honor fill keepouts.

Fixes https://gitlab.com/kicad/code/kicad/issues/14566
2023-04-28 17:43:08 +01:00
Jeff Young d5cb100f72 Fix sheetPath handling in SPICE model generation. 2023-04-28 16:19:14 +01:00
Jeff Young be657d947c Import pin-names from LTSPice models. 2023-04-28 12:52:37 +01:00
Lucas Dumont b1a4353c34 Update collide for hole
As hole don't keep track of the net, update the collide function to keep it working
2023-04-28 10:20:55 +00:00
Jeff Young b2a45023bc Tighten ownership model of PNS::ITEM.
In particular, ownership must be explicitly set.  It is
no longer inherited through copy/clone/etc.
2023-04-28 11:05:39 +01:00
Jeff Young 9646e3c1c0 Simplify PNS::VIA construction. 2023-04-28 00:32:49 +01:00
Jeff Young e1b39946fe ADDED: show/hide controls for directive labels. 2023-04-28 00:32:49 +01:00
Jeff Young 4b0027a5d7 Implement better sheet-path awareness for label text var resolution. 2023-04-28 00:32:49 +01:00
Jeff Young 37c441a189 Minor performance improvement. 2023-04-28 00:32:49 +01:00
Jeff Young 1a7e99ed07 Formatting. 2023-04-28 00:32:49 +01:00
Ian McInerney 03a393b159 Fix misnamed file 2023-04-27 23:47:50 +01:00
Ian McInerney f417056cb8 Split merge request formatting check into separate include file 2023-04-27 23:42:37 +01:00
Ian McInerney ea0a30fb19 Replace deprecated GitLab CI variable
The CI_BUILD_TOKEN was deprecated by GitLab and will be removed in
GitLab 16.0. It was replaced by the CI_JOB_TOKEN varaible
(https://docs.gitlab.com/ee/update/deprecations?removal_milestone=16.0#ci_build_-predefined-variables)
2023-04-27 23:35:30 +01:00
jean-pierre charras ae7456e055 SYMBOL_LIB_TABLE and PANEL_SYM_LIB_TABLE: fix some issues:
- Ensure a change in plugin type is detected
- do not force automatic plugin type selection for *.lib files that need
an access to these libraries: they can be not always available.
2023-04-27 12:54:18 +02:00
Jeff Young 5e21e94478 Set currentSheet when exporting netlist.
Patch courtesy of Fernando Gomez.
2023-04-26 18:19:15 +01:00
Jeff Young 9d2824ec5e Pass correct sheetpath to SCH_SYMBOL(). 2023-04-26 17:25:27 +01:00
jean-pierre charras a06c4cac73 SCH_IO_MGR::GuessPluginTypeFromLibPath() Ensure env vars are expanded in filename.
For legacy libs ans cadstar libs the extension is .lib.
So we need to read the header of the file, and therefore expand the env var inside
the filename, if used.
2023-04-26 18:14:55 +02:00
Lucas Dumont c781fde236 pcbnew: don't move twice
In pcbnew, if you press M to move your selection and press M again, then escape, you will trigger the https://gitlab.com/kicad/code/kicad/-/blob/master/common/tool/tools_holder.cpp#L106 assert
2023-04-26 15:37:18 +00:00
Lucas Dumont 2992d7c68b Fix typo in QueryConstraint switch 2023-04-26 13:20:32 +00:00
Jeff Young d816fb071f Use fileds from flattened lib symbol when updating.
Fixes https://gitlab.com/kicad/code/kicad/issues/14577
2023-04-26 12:47:55 +01:00
Jeff Young 5b56cb6bdb Don't let add-row processing intercept OK processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14579
2023-04-26 12:47:55 +01:00
jean-pierre charras 2f392352b5 EDIT_TOOL::doMoveSelection(): avoid calling PushTool() and, just after,PopTool()
for the *same* event: TOOLS_HOLDER::PopTool() does not work fine in this case.
2023-04-26 13:00:50 +02:00
Seth Hillbrand f7f52d77e4 Rework Copper Sliver check
Adds QA checks to copper sliver tests.  Adds the following checks:
- Dot product between two arms (quickly avoids checks for >90°)
- Checks the sliver is convex (area test)
- Eliminates minor slivers with angles that are approximately 0 and ones
  with the opposite side width beneath a configurable level
- Updates Clipper2 to fix a couple of jagged edges on inflate
- Adds simplify during zone fill inflation to limit jaggies

Fixes https://gitlab.com/kicad/code/kicad/issues/14549
2023-04-25 10:32:46 -07:00
Jeff Young dd6e3c0432 Finish two-step rename of ltspice folder.
(CLion didn't want to do a capitalization-only change in a
single step.)
2023-04-25 15:27:46 +01:00
Jeff Young 744dec65d7 Add (limited) support for LTSpice DATAFLAGs.
Even though we can't evaluate the expressions, we should at
least show the text so users can decide what to do with them.
2023-04-25 15:27:46 +01:00
Mark Roszko 50b916cb73 Fix paths in the python tests
Can't actually test on Windows without making that a setup adventure
2023-04-25 12:29:47 +00:00
Marek Roszko e45b6c441a Fix pcbnewswig test run 2023-04-25 07:30:51 -04:00
jean-pierre charras fd6fb4a87b netlist exporter: export only the field value, even if field name is shown.
Previously, when the field name was visible, the exported field value was
prefixed by the field name, and this is incorrect.
Fixes #14611
https://gitlab.com/kicad/code/kicad/issues/14611
2023-04-25 12:43:15 +02:00
jean-pierre charras b9ed84b7db Fix minor compil warnings 2023-04-25 12:43:15 +02:00
Lucas Dumont e2e901de1d Don't override clearance when routing
The default `m_overrideClearance = -1` used here was changed to 1.
Reseting it to -1 to solve linked issue

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14595
2023-04-25 09:18:53 +00:00
Marek Roszko 8d4db2edf5 Move tests around 2023-04-24 22:09:36 -04:00
Marek Roszko 47fa5a29cd the ibis folder is really a tool 2023-04-24 19:25:58 -04:00
Jeff Young 676a15df65 Don't try to keep track of a HOLE's net.
Keep track of it's parentPadVia instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/14603
2023-04-24 18:32:17 +01:00
Jeff Young 20ab268abf Improve sheet-handling of ERC item description generation.
(In particular, stop crashing.)
2023-04-24 15:09:08 +01:00
Jeff Young 69500bfcaa LTSpice schematic import based on the work of Chetan Shinde. 2023-04-24 13:52:52 +01:00
Jeff Young 60b019591d Simulator fixes.
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:52:52 +01:00
Jeff Young c2cc27c25c Formatting. 2023-04-24 13:52:52 +01:00
Jeff Young c381b6d024 More robust file reading for simulator files. 2023-04-24 13:52:52 +01:00
jean-pierre charras afc6b325b2 Eeschema: minor enhancement: add SCH_JUNCTION::GetMsgPanelInfo() and show info. 2023-04-24 12:25:10 +02:00
jean-pierre charras d180ce7865 Pcbnew, minor fix: make Image Properties dialog re-sizable. 2023-04-24 10:21:31 +02:00
jean-pierre charras edb9a19a65 pcb_calculator: add missing code to save Regulator Panel settings. 2023-04-24 09:11:03 +02:00
jean-pierre charras 8fc70d577f better QFNWizard. 2023-04-23 17:34:21 +02:00
jean-pierre charras 31b30cef96 OPENGL_GAL: draw BITMAP_BASE: fix incorrect rendering of mirrored bitmaps
The vertical mirror was not working.
2023-04-23 16:00:05 +02:00
jean-pierre charras f47f44350d BITMAP_BASE::Mirror() and ::Rotate(): fix an issue for bitmaps with ppi not 300
wxImage::Mirror() and wxImage::Rotate() transforms clear some parameters, especially
the PPI stored in the image. It creates bad size (bad ppi) when saving a BITMAP_BASE
in files.
These parameters are now restored after transform.
2023-04-23 11:30:02 +02:00
jean-pierre charras c617abe8e9 SCH_BITMAP and PCB_BITMAP: rename m_image to m_bitmapBase. Add more info
in GetMsgPanelInfo() (PPI, scale).
m_image name was confusing: it is not a wxImage, but a BITMAP_BASE item,
and m_image name was already in use in BITMAP_BASE, used inside SCH_IMAGE.
Bitmap properties dialog: show PPI value and add Title to dialog.
2023-04-22 17:28:06 +02:00
jean-pierre charras 0c544f1f45 FOOTPRINT_EDIT_FRAME: do not delete settings when closing the frame.
They now are read when starting kicad, and must be not deleted.
2023-04-22 11:46:52 +02:00
Seth Hillbrand 6e8a5acc66 Bug Fixes for new incremental connectivity
- Ensure that critical paths (ERC/netlister) are fully-rechecked
- Handle symbol/pin distinction in change markers
- Fully connect hierarchical pins in one pass descending
2023-04-21 13:35:18 -07:00
Marek Roszko dbed94e4b1 Fix gerbers and drill plot not logging errors
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/14437
2023-04-20 23:39:59 -04:00
Marek Roszko 9f64c7f354 Load custom drawing sheets for pcb cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14171
2023-04-20 23:17:52 -04:00
Marek Roszko 53ad203028 Guard the new sentry calls because it won't be initialized if opted out 2023-04-20 23:05:06 -04:00
Marek Roszko 5b5176f104 Experiment with sentry breadcrumbs to footnote kiway events to provide more crash context 2023-04-20 23:01:50 -04:00
Marek Roszko 6f70579c03 Add doxygen comments 2023-04-20 22:22:33 -04:00
Seth Hillbrand 990641d2eb Cleanup printf bits 2023-04-20 15:19:04 -07:00
Seth Hillbrand 4b91c0c8ee Handle multiple holes in footprints
Our basic logic for whether we have a hole or an outline in a footprint
checks if there is copper pads outside of the closed edge.  This misses
the case where the footprint is used to align multiple holes but has no
copper.  Since we do not support multiple outlines in a board, we can
safely assume that multiple, closed edges in a footprint represent holes
and not outlines

Fixes https://gitlab.com/kicad/code/kicad/issues/14468
2023-04-20 14:56:36 -07:00
Seth Hillbrand b56db30019 Ensure that even open paths with fills are filled
SVG paths that are "open" can still have a fill internally, so avoid
dropping fills for these non-standard polygons

Fixes https://gitlab.com/kicad/code/kicad/issues/14518
2023-04-20 12:31:04 -07:00
Marek Roszko 3dc308464c Replace the exception handler in another spot 2023-04-19 21:21:18 -04:00
Marek Roszko 2f23df8f5f Move 3 more blocks to the common ex handler 2023-04-19 21:17:31 -04:00
Marek Roszko 26f250faa8 Handle OnKifaceStart exceptions without crashing 2023-04-19 20:38:25 -04:00
Marek Roszko c5d5450f55 Create a central exception handler we can also use to generate sentry events 2023-04-19 20:38:25 -04:00
Seth Hillbrand 7eb728ca12 Don't consider saving SCH_MARKERs
These are ephemeral, view-only elements, so don't include them in our
save map

Fixes https://gitlab.com/kicad/code/kicad/issues/11405
2023-04-19 17:00:50 -07:00
Seth Hillbrand a154571438 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1794
2023-04-19 16:14:35 -07:00
jean-pierre charras d4cf063e40 Fix a few more doxygen errors (no actual code change) 2023-04-19 20:24:42 +02:00
jean-pierre charras a20f757d8c undo a change (it was only a test) committed by mistake. 2023-04-19 16:57:35 +02:00
jean-pierre charras 1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02:00
Mike Williams 09d7e24b6d Symbol Fields Editor: drop some settings dynamic_casts
Not needed, and confusing.
2023-04-19 09:52:31 -04:00
Jeff Young cc6fc4790d Copy RC_ITEM fix to ERC_ITEM (where it's actually needed).
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:09:33 +01:00
Jeff Young 3521add640 Suppress newlines in RC_ITEM messages.
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:09:21 +01:00
Marek Roszko 6022979bfe Undo accidental commit change to kiway.cpp 2023-04-18 23:04:51 -04:00
Marek Roszko ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
Seth Hillbrand 82ba67db82 Initialize settings for SINGLE_TOP 2023-04-18 19:27:32 -07:00
Seth Hillbrand 32d17547e5 Fixup settings loading
Settings loading needs to account for potential chaining, so each
instance should be created before being Load()ed.  Additionally, add the
settings loading to QA
2023-04-18 16:00:31 -07:00
Jeff Young 51b6ec0dce Don't exit KiCad when simulator window is closed. 2023-04-18 23:55:56 +01:00
Jeff Young f7a552a2b3 Ensure item is gridded if there was no motion between clicks. 2023-04-18 23:55:56 +01:00
Seth Hillbrand 2cd861dbd5 Remove extraneous symbol editor settings 2023-04-18 13:46:33 -07:00
Seth Hillbrand 892e4536b0 Remove extraneous includes 2023-04-18 13:45:32 -07:00
Seth Hillbrand e6ab9a88ce Remove locks from settings
Settings should be initialized on start-up.  This removes the option of
lazily loading the settings from file and instead requires all settings
needed to be loaded on KiFACE start before requesting data from the
settings object
2023-04-18 13:40:25 -07:00
Jeff Young c682d11fa0 Trim VRML export layers to board outline.
Fixes https://gitlab.com/kicad/code/kicad/issues/14557
2023-04-18 17:31:29 +01:00
Jeff Young 2c34a08bf1 Ignore empty field-name-templates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14552
2023-04-18 17:31:25 +01:00
Jeff Young f72cc6dd51 Amend overly aggressive assert. 2023-04-18 17:31:22 +01:00
Jeff Young 2533141583 Revert "Update pybind11 to version 2.10.4" for now.
This reverts commits 9d077c9ba5 and
b4938f5198.

They cause a crash-on-startup on Mac ARM machines, failing to get the
locale encoding (nl_langinfo(CODESET) failed).
2023-04-18 17:28:10 +01:00
jean-pierre charras ba12f00c15 Pcbnew: re-add draw umbilical line for texts in footprints.
It was lost after removing FP_TEXT in code.
2023-04-18 09:48:46 +02:00
Ian McInerney e9a93bc711 Try to get the coverity scan results back under the size limit
Apparently our Coverity Scan file we try to upload is too large for the
server to handle, so it isn't working. Try switching to a release build
with debug symbols to see if that reduces the size.
2023-04-18 00:19:19 +01:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
qu1ck 9b58f50c68 Add usable PCB_GROUP::GetItems() swig wrapper 2023-04-17 15:41:49 +00:00
Nimish Telang 51e55dd750 Convert sprintf to snprintf in most files 2023-04-17 15:39:34 +00:00
jean-pierre charras d0676118c1 BOARD_NETLIST_UPDATER: better warning message (I hope...) in Report.
Fixes #14548
https://gitlab.com/kicad/code/kicad/issues/14548
2023-04-17 14:30:47 +02:00
Lucas Dumont 469fe76994 pcbnew: Fix crash with differential routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537
2023-04-17 14:17:14 +12:00
Marek Roszko 460b08c6ca Nix a dialog in kicad_cli.cpp that shouldn't ever fire 2023-04-16 20:09:57 -04:00
Jeff Young 02c5a31b99 Fix close button on simulator frame.
Fixes https://gitlab.com/kicad/code/kicad/issues/14551
2023-04-16 23:45:18 +01:00
Alex b4938f5198 Patch pybind11 version 2.10.4 for MSVC
Based on commits c483c582 and 8f1b2acd
2023-04-16 22:34:22 +00:00
Alex 9d077c9ba5 Update pybind11 to version 2.10.4 2023-04-16 22:34:22 +00:00
Jeff Young 86ca90aa2d Fixes to allow copy/paste of pin data.
1) allow paste even if initial cell isn't writeable
2) allow paste to add rows if there's an addHandler defined

Fixes https://gitlab.com/kicad/code/kicad/issues/14508
2023-04-16 23:04:47 +01:00
Jeff Young a540c01c61 Double double-add items to the view. 2023-04-16 23:04:47 +01:00
Jeff Young c6d593a47b Formatting. 2023-04-16 23:04:47 +01:00
Marek Roszko d18102fff6 Add a hack to try and capture more crash data 2023-04-16 13:49:21 -04:00
Jeff Young cc4a8dcc89 Small improvements to lifecycle safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/14521

Fixes https://gitlab.com/kicad/code/kicad/issues/14315
2023-04-16 18:47:04 +01:00
Jeff Young 6fb8916798 The symbol viewer handles its own message panel. 2023-04-16 18:47:04 +01:00
jean-pierre charras 725c2fd661 footprint wizards: fix for my previous commit 50502c4 2023-04-16 17:16:54 +02:00
jean-pierre charras 50502c450f footprint wizards: fixes and enhancements 2023-04-16 17:03:32 +02:00
Jeff Young b76ef8c7e2 Multi-threading safety.
(Possible fix for KICAD-74.)
2023-04-16 15:36:21 +01:00
Jeff Young 2793bb1d68 Performance. 2023-04-16 15:36:21 +01:00
Jeff Young 26c14271f2 Formatting and warnings cleanup. (No functional changes.) 2023-04-16 15:36:21 +01:00
jean-pierre charras 7545097d7f Fix a compil issue on msys2/gcc12.2, due to changes in commit dd1c58dc 2023-04-16 15:28:34 +02:00
Jeff Young 6f59740953 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)
2023-04-16 14:21:23 +01:00
Marek Roszko dd1c58dcf5 Fix MSVC C4840 warning
va_start requires trivially copy able classes.

wxString is not trivial. The correct thing to do is to use wxChar*
2023-04-16 07:36:41 -04:00
Jeff Young 140f76b870 Export rectangular aperture GBR_SEGMENTS as polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/14136
2023-04-15 22:32:26 +01:00
Jeff Young b74d964bff Handle legacy libraries with escaped symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14057
2023-04-15 17:47:32 +01:00
Jeff Young d4b4abd001 Apply symbol attributes from base symbol, not derived symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/13740
2023-04-15 17:47:32 +01:00
Marek Roszko 8fd4909f86 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855
2023-04-15 09:18:54 -04:00
Jeff Young 299c88cfec Allow setting 0 to min width, min track width, min via annular width, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/13822
2023-04-15 13:20:34 +01:00
Jeff Young 2d15067453 ADDED allow update of teardrops before running DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/14264
2023-04-15 12:18:41 +01:00
Jeff Young 521aa5b5ae Update DRC exclusions model to match terminology.
DRC exclusions were originally written following the C++
pragma model (ie: allow this violation here).  However, the
"exclusion" terminology we used in the GUI suggests a model
model where the exclusions go away when the violation no
longer exists.

Fixes https://gitlab.com/kicad/code/kicad/issues/14351
2023-04-15 12:18:41 +01:00
jean-pierre charras 27ebba6b33 Python and footprint wizard: fix issues and update to be compatible
with recent changes in Kicad code.
2023-04-15 10:30:33 +02:00
Jeff Young 4a3f77cd9d Clear board soldermask when undoing/redoing items that affect it.
Fixes https://gitlab.com/kicad/code/kicad/issues/13446
2023-04-15 00:06:58 +01:00
Jeff Young d01c023d5a Retire the lib-tree scoring algorithm.
It appears to cause more confusion than help.

Fixes https://gitlab.com/kicad/code/kicad/issues/13905
2023-04-14 23:35:27 +01:00
Jeff Young d64cb7f81b More uniform handling of power symbols and exclude-from-simulation. 2023-04-14 19:42:13 +01:00
Jeff Young 9f56b75f01 Clean up atrophied code. 2023-04-14 19:42:13 +01:00
Lucas Dumont 923f386f08 Dont' create new cell if editing one
Return key is used to change cell line. If cell was in edition, the edition is saved before changing line.

Before this change using return key in the last row, if edited, both saved the change and create new row.

After this change, it'll just save the just, and will need a second key press to create a new row.
2023-04-14 16:44:09 +00:00
Jeff Young 05185ec81a Save library when it's selected in lib tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/14220
2023-04-14 17:35:37 +01:00
Salvador E. Tropea d5c0bf3d0e Load the global fp-lib-table before running the Python DRC
Without this we get parity errors for all the KiCad footprints

(cherry picked from commit e5087ca3db)
2023-04-14 12:09:48 -04:00
jean-pierre charras 77fb7b1182 ERC: set default setting ERCE_SIMULATION_MODEL to ignore
Most of projects do not manage spice settings.
2023-04-14 17:21:09 +02:00
Jeff Young 4eb0ccffe5 Bring Sim Command dialog layout in line with Kicad std dialog layout. 2023-04-14 13:00:31 +01:00
Jeff Young 26609bbf05 Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries. 2023-04-14 12:02:36 +01:00
Okan Demir 75267a7366 Fixes issues pointed in the reviews
Wraps string literals with 'wxS', form is generated by wxFormBuilder
2023-04-14 11:01:01 +00:00
Okan Demir 82e8198fee Adds missing transient simulation settings
Adds maximum step size setting used by transient analysis solver,
and 'use initial conditions (uic)' setting. Enabling uic disables
DC operating point analysis and may introduce singularities. It requires
a careful selection of initial conditions of circuit elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/2515
2023-04-14 11:01:01 +00:00
jean-pierre charras b2bf3229e6 BOARD::Move(): o not move twice PCB_SHAPES in footprints. Altium importer:
fix incorrect position of imported PCB_TEXTs in footprints.
2023-04-14 10:42:02 +02:00
Marek Roszko 0eefde6046 Fix build error pre wx 3.1.6 2023-04-13 18:20:16 -04:00
Alex 21103924f4 Don't crash when canceling initial setup in Manage Footprint Libraries 2023-04-13 22:16:56 +03:00
jean-pierre charras 97a4e535dc ConvertOutlineToPolygon(): fix handling of polygons living in footprints.
Due to recent changes in PCB_SHAPE items, the polygon coordinates are now
in board coordinates, not in coord relatives to the parent footprint.
Fixes #14530
https://gitlab.com/kicad/code/kicad/issues/14530
2023-04-13 17:22:03 +02:00
Mike Williams 33b2b5b09d STEP Export: Update options to reflect DNP and Unspecified filtering
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14125
2023-04-13 10:33:03 -04:00
Lucas Dumont 3c24017aa4 Check KiFACE return value
Avoid segfault when cancelling initial global library setup
2023-04-13 13:31:02 +00:00
Jeff Young df5456bb5b Attempt to fix gcc compile error. 2023-04-13 13:57:48 +01:00
Jeff Young 8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00
aris-kimi 18cebe3779 Don't assume an EDA_ITEM is a SCH_ITEM. v2
In the same way as cec4109176 did

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14528
2023-04-13 11:12:02 +01:00
Jeff Young a24a63e416 Search in label fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/14075
2023-04-12 23:21:53 +01:00
Jeff Young 1f140953d6 Manual cherry-pick of 912bd4458f 2023-04-12 23:21:53 +01:00
Jeff Young b876af55df Don't exit symbol compare early when reporting. 2023-04-12 23:21:53 +01:00
Ian McInerney 6c05801d9e Make the property grid compatible with wx 3.3 2023-04-12 18:57:12 +01:00
Ian McInerney a6be0eef4a Add const to a PGPROPERTY constructor to match upstream
The base class constructor expected a const string, and the other
PGPROPERTY constructors do as well, so make this const.

This was also a compile error when building against wx 3.3.
2023-04-12 18:57:12 +01:00
Ian McInerney 2b22ff9f39 Add missing include
The implicit includes have changed in wx 3.3, so this is no longer being
included in the file, so include it explicetly to et
wxMessageOutputStderr.
2023-04-12 18:57:12 +01:00
Ian McInerney 18e573d5e9 Remove stray wx include
There is no reason to include the actual string implementation header
here.
2023-04-12 18:57:12 +01:00
Ian McInerney 73a1e63e8e Modify how we print the wx version compat macros 2023-04-12 18:57:12 +01:00
Ian McInerney 871f7e05a5 Remove use of wxGRIDTABLE_REQUEST_VIEW_GET_VALUES from the appearance panel
That even was removed by upstream wxWidgets in
https://github.com/wxWidgets/wxWidgets/commit/81570ae070b35c9d52de47b1f14897f3ff1a66c7
which is included in all versions after 3.1.1, so our 3.2 versions
definitely aren't doing anything when we pass this event. The actual
identifier has also been guarded behind a 3.0 compatibility define in wx
as of 3.3.
2023-04-12 18:57:12 +01:00
Ian McInerney 8f3bbf36f8 Replace __WXGTK20__ with __WXGTK__
We no longer care about a GTK2 vs 3 difference, we only support GTK 3.
2023-04-12 18:57:12 +01:00
Ian McInerney f0684510f0 Replace wxScopedPtr with std::unique_ptr
Upstream has deprecated wxScopedPtr and recommends users switch to using
std::unique_ptr instead.
2023-04-12 18:57:12 +01:00
jean-pierre charras c3ae2d4f43 Demos update 2023-04-12 17:16:50 +02:00
Ian McInerney 5d0b5e16ff Remove python-based board_item duplicate method
This method shadows the C++ method, and doesn't properly handle updating
the duplicated object's KIID to be unique.

Also add tests to ensure the KIIDs are unique after duplication.

Fixes https://gitlab.com/kicad/code/kicad/issues/14460
2023-04-12 16:05:56 +01:00
Ian McInerney a77e94d16f Add hack to speed up font choice box widget creation
There are problems internal to GTK that mean creating choice boxes with
a lot of items is a very slow process. This hack works around one of
those issues to make it faster to create and display the menu in the
choice box.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14277
2023-04-12 15:23:34 +01:00
Jeff Young e1c9e0e6fc ADDED memberOfFootprint() to DRC custom rules functions.
Also added memberOfGroup(), and deprecated memberOf().
2023-04-12 14:06:09 +01:00
Jeff Young 66f48d56ae Separate sheet reloads (MODEL_RELOAD) and schematic reloads (SUPERMODEL_RELOAD).
Fixes https://gitlab.com/kicad/code/kicad/issues/14523
2023-04-12 11:51:09 +01:00
Jeff Young 6059e895d7 Fix a typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14515
2023-04-12 10:45:24 +01:00
jean-pierre charras de579af352 SCH_LABEL_BASE::SetPosition(): ensure field positions are also handled.
Fixes #14520
https://gitlab.com/kicad/code/kicad/issues/14520
2023-04-12 11:15:17 +02:00
jean-pierre charras f56e569a25 Ensure we do not use a non existing pin in SIM_MODEL::MigrateSimModel()
Fixes #14522
https://gitlab.com/kicad/code/kicad/issues/14522
2023-04-12 09:37:59 +02:00
jean-pierre charras 9b0a92552a French translation update 2023-04-12 08:25:43 +02:00
jean-pierre charras 8d206d6a67 LIB_TABLE_GRID_TRICKS, popup context menu: fix minor issues:
- add separator only if needed
- ensure selection parameters are up to date.
2023-04-12 08:12:22 +02:00
Marek Roszko bfad8bb0d5 Prevent VIEW::UpdateItems and onShowTimer from firing repaints if GAL did not complete init
This appears to be a possible event race on startup

Fixes sentry KICAD-10A
2023-04-11 22:09:05 -04:00
Marek Roszko 37eaa29679 Fix crash due to extra right parens in pcad files
Fixes sentry KICAD-TA
2023-04-11 21:52:39 -04:00
Marek Roszko ed94bc4bf9 Don't crash on empty pcad polygons
Fixes sentry KICAD-103
2023-04-11 21:38:59 -04:00
Jeff Young 01564a254f Make sure "Item" and "Description" end up in the translation database. 2023-04-11 23:56:12 +01:00
Jeff Young eef3492fc0 Make symbol/footprint trees sensitive to language change. 2023-04-11 23:51:58 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
Jeff Young 6fb30398ca Don't steal an existing via's hole. 2023-04-11 17:48:27 +01:00
jean-pierre charras b2554ad611 manage libraries dialog: show new state of widgets as soon as the context-menu
activate/deactivate changes their state
Fixes #14517
https://gitlab.com/kicad/code/kicad/issues/14517
2023-04-11 18:46:07 +02:00
Jeff Young ab0dbeb523 Post-holes-work cleanup. 2023-04-11 15:51:00 +01:00
Jeff Young 2f198bdcb2 Further simplify PNS::ITEM::collideSimple().
Also brings text_pns_basic's mocks into line with their "real"
counterparts.
2023-04-11 15:51:00 +01:00
Jeff Young 6f0d963683 Add PNS::ITEM::BoardItem() call.
About 1/3 of callers to Parent() don't care if they get the immediate
parent or not, about 1/3 want only the immediate parent, and about 1/3
want the hole parent's Parent().

I had earlier changed PNS::ITEM::HOLE to override Parent() and return
the hole parent's Parent(), but since the callers are pretty evenly
split I've reverted that and added BoardItem() for callers who want the
eventual BOARD_ITEM (whether a direct parent or a grandparent).

(Also removes a dead routine so I didn't have to figure out which of
the two it wanted....)
2023-04-11 15:51:00 +01:00
Jeff Young 8a0c225efa Unify most special-case processing to the clearance if-then-else.
This also allows us to support hole-to-hole clearance when dragging
a via near another via on the same net.

Fixes https://gitlab.com/kicad/code/kicad/issues/12781
2023-04-11 15:51:00 +01:00
Jeff Young b18bf09208 Don't return holes that have a parent pad or via.
(While we don't currently have holes without a parent pad or via, you
could imagine using HOLEs in the future to represent a hole in a first-class
board outline, so better not to build this assumption in.)
2023-04-11 15:51:00 +01:00
Jeff Young 4cc289c6fb Post-merge cleanup of holes-as-first-class-citizens. 2023-04-11 15:51:00 +01:00
Tomasz Wlostowski 1532a83330 router: hole as first-class-object, initial version of rewritten collision check routine
Rebased and modified by Jeff Young <jeff@rokeby.ie> 6 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski d961cdce3f router: further changes to the ownership model
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace

Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski bfbda978b8 router: hole as first class objects, wip
Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023

(Also includes a bug-fix for highlighting collisions with edge-cut
items.)
2023-04-11 15:51:00 +01:00
Jeff Young 507a25f150 Don't call BuildInitialTrace() for entry gateways.
We're going to call it to connect the entry and target gateways
anyway, so all we need are gateways at 22.5 degrees to setup entry
at +/- 45 degrees from the current direction.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12459
2023-04-11 15:34:55 +01:00
Jeff Young cec4109176 Don't assume an EDA_ITEM is a SCH_ITEM.
(It might in fact be a LIB_ITEM, which we don't put in
the RTree anyway.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14516
2023-04-11 15:26:39 +01:00
Jeff Young 11995c1350 Improve readability. 2023-04-11 15:26:39 +01:00
jean-pierre charras e208685f85 DIALOG_SHIM: fix missing aEvent.Skip() in DIALOG_SHIM::onChildSetFocus().
This method was added in commit a914f6e9.
Missing Skip() created issues on Windows (text edit cursor not shown in dialogs)
2023-04-11 10:54:50 +02:00
Marek Roszko ca770c79ab Make libcontext build statically
Fixes an issue combining cpp and obj files explicitly on arm64
2023-04-10 21:22:04 -04:00
Marek Roszko b20bfb2ae8 Remove arch specific manifests
I copied it from wxWidgets originally in a rush but we can just wildcard the processor arch
2023-04-10 20:34:19 -04:00
Marek Roszko 9c0dda2d56 Allow LEMON_EXE to be set externally, required for cross compiling 2023-04-10 20:34:18 -04:00
qu1ck a6d10c8e97 Enable warnings on msvc 2023-04-11 00:17:50 +00:00
Marek Roszko 32a747374f Fix the #ifdef for the release_fcontext stub
As if the if def hell was easy to read
2023-04-10 19:12:27 -04:00
Marek Roszko 726b137fed Fix libcontext arm64 build and purge winfiber
The winfiber implementation ran into memory leak issues as it didnt exit the stack jumps correctly
and lets not mislead anyone by keeping it
2023-04-10 18:07:35 -04:00
Mike Williams 32eb1ef77e Sch->PCB: propagate DNP from symbols to footprints attributes
Also add a 3D viewer toggle.
2023-04-10 13:11:21 -04:00
Jeff Young a914f6e992 First <ESC> after an edit in a textEdit cancels the edit.
(Second will exit the dialog.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14514
2023-04-10 15:13:43 +01:00
jean-pierre charras f01e083f7c fix 2 issues related to SCH_GLOBALLABEL items:
- Ensure the first field in m_fields has id = 0 to be seen has hypertext
(it was not the case after reading a .kicad_sch file)
- when converting this item to another label/text, remove this special Field
from the copied field list to the converted label.
2023-04-10 09:58:27 +02:00
Jeff Young adc213a04d Add Keep Upright to properties inspector.
Fixes https://gitlab.com/kicad/code/kicad/issues/14421
2023-04-10 00:00:54 +01:00
Jeff Young d040690f60 Ease acquisition of a target item.
pickSingleItem() had a two-attempt algorithm, but the second attempt
was never made because we'd check for no hits before throwing out the
aAvoidItems.

The second attempt would fail anyway because QueryHoverItems() ignored
the aUseClearance flag when not idle, and didn't factor in the actual
clearance.
2023-04-09 22:05:17 +00:00
Jeff Young 1d19672054 Handle more pad shapes when building diffpair gateways.
Fixes https://gitlab.com/kicad/code/kicad/issues/1883
2023-04-09 22:05:17 +00:00
Jeff Young 374d3d52ef Rollback wxChoice -> wxComboBox changes for now.
wxComboBox still has serious issues on macOS.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14413
2023-04-09 23:00:33 +01:00
Jeff Young 9252793fdb Add select-all to TEXT_ENTRY_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/14237

Fixes https://gitlab.com/kicad/code/kicad/issues/13304
2023-04-09 21:25:09 +01:00
Jeff Young ea59d583d5 ADDED exclude-from-simulation property to text items and textboxes. 2023-04-09 19:03:36 +01:00
Jeff Young a226f7fc14 Don't delete default intersheetrefs field from global labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/14493
2023-04-09 19:03:36 +01:00
Marek Roszko 2025923ef4 Prevent crash during schematic window close 2023-04-08 20:31:52 -04:00
Marek Roszko 3077bbf1bb Update vcpkg for ngspice 40 2023-04-08 20:31:51 -04:00
Wayne Stambaugh d962b062ca Fix crash when duplicating symbol unit with alternate body style.
* Add check for valid symbol library link in annotation code to prevent
  crash even if the symbol was not defined correctly.  This will assert
  in debug builds.
* Fix broken pin comparisons when library symbols have units with alternate
  body style defined.
* Remove some macros from LIB_SYMBOL comparison function which made
  debugging painful.
* Exit LIB_SYMBOL comparison function as soon as non-equivalent comparison
  occurs.
* Fix broken library symbol comparison due to name differences when
  checking for existing variants of the library symbol.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14491
2023-04-08 15:29:01 -04:00
jean-pierre charras c6bcfda84c DIALOG_IMAGE_PROPERTIES: fix some issues:
- add missing dialog_image_properties_base.fpb file
- fix not displayed image.
2023-04-08 16:41:55 +02:00
jean-pierre charras 8ca0ba8118 add missing .fpb file 2023-04-08 16:41:55 +02:00
Jeff Young e522e73e0e Improve readability. 2023-04-08 15:06:49 +01:00
Jeff Young 3b63d70d01 Centralize NPTH has-annulus processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/13437
2023-04-08 15:06:49 +01:00
Marek Roszko ffa86db9a9 Bump vcpkg for wxpython fix 2023-04-07 22:42:56 -04:00
Ian McInerney a0b5de91f3 Move forgotten file to core library
Turns out, there was a cpp file for hte core library, so turn the
library into a static library.
2023-04-08 00:37:49 +01:00
Ian McInerney 07d613d0d2 Subclass wxDataViewCtrl to include our helpers
It is cleaner to just extend the class with these functions rather than
having the separate functions.
2023-04-08 00:07:33 +01:00
Seth Hillbrand 5fcc1135a8 Revert "Modernizes search for Cairo, Fontconfig, Freetype, HarfBuzz and Pixman"
This reverts commit 9efd24a69d.

Breaks MSW builds, so this is a non-starter for now
2023-04-07 10:12:43 -07:00
Seth Hillbrand 2cd854af14 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes
2023-04-07 10:08:43 -07:00
Nimish Telang 9efd24a69d Modernizes search for Cairo, Fontconfig, Freetype, HarfBuzz and Pixman 2023-04-07 16:15:53 +00:00
Alex e91b53fc39 opengl_gal: Remove extra padding of bitmap textures.
Since the format has been changed to RGBA8, default (UN)PACK_ALIGNMENT = 4
works correctly, so the texture width padding to 4 is not needed anymore.

Fixes https://gitlab.com/kicad/code/kicad/issues/14432
2023-04-07 13:52:43 +03:00
jean-pierre charras ca0e57f036 Plot gerber: fix two issues:
- ensure the metadata GBR_NETINFO_CMP is added to all PCB_SHAPE living in a footprint
- fix a too zealous plot of negative objects on the silkscreen layers, when
merging layers to silkscreen layers.
2023-04-07 11:23:24 +02:00
jean-pierre charras aa7f9a0fe5 Update spice demo. 2023-04-07 07:13:53 +02:00
Seth Hillbrand 012737593b Handle nested netclass assignments
Netclass directives should not be overriden, instead hold our error
checking for actually missing nets

Fixes https://gitlab.com/kicad/code/kicad/issues/14494
2023-04-06 17:38:13 -07:00
Ian McInerney 18ea3be3f2 Revert "Reintroduce constexpr to COLOR4D"
This reverts commit 33da9b2327 and the
following commit dc08c48f33.

C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).

An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.

For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Ian McInerney dc08c48f33 Try to fix linking after constexpr change
Somehow, GCC 10 and 11 were unable to locate the prebuild colors when
they were constexpr in gal, so give them on the link line again.
2023-04-06 15:20:16 +01:00
Ian McInerney deb2bc0ac8 Fix mistake in kimath wxWidgets include statement 2023-04-06 15:01:18 +01:00
Ian McInerney 311d5d5e26 Remove unused container header 2023-04-06 15:01:18 +01:00
Ian McInerney ea62b145ff Introduce core interface library
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
2023-04-06 15:01:18 +01:00
Wayne Stambaugh b05de51a8d Fix a few Coverity issues. 2023-04-06 08:48:02 -04:00
jean-pierre charras 7eb13c3d33 Symbol editor: clear the edit flags of a pasted pin after place it.
When pasting a single pin, its edit flags were not cleared, and create
issues when trying to edit the pasted pin.
Fixes #14188
https://gitlab.com/kicad/code/kicad/issues/14188
2023-04-06 11:08:01 +02:00
jean-pierre charras 4d05bd62da drc_test_provider_library_parity: fix false positive.
After last changes in PCB_SHAPES, there were issues when comparing coordinates
of shapes.
Use now a footprint not flipped, not rotated and at position 0,0 for comparisons.
Fixes #14496
https://gitlab.com/kicad/code/kicad/issues/14496
2023-04-05 18:25:19 +02:00
Ian McInerney 33da9b2327 Reintroduce constexpr to COLOR4D
This fixes the initialization-order fiasco in the color initialization
sequence, which was originally fixed by making COLOR4D constexpr, but
was then reintroduced when the assert was changed to wxASSERT (wxASSERT
is not compatible with constexpr).
2023-04-05 14:07:01 +01:00
Tomasz Wlostowski 1283c4713f router: rework ITEM ownership model.
- prerequisite for holes as first class objects code
- introduced the OWNABLE_ITEM interface that defines the owning container (NODE/other ITEM/ITEM_SET)
- simplified the ITEM_SET interface
- constified a lot of APIs (ownership/JOINT management) as a side effect

Rebased and cleaned up by Jeff Young <jeff@rokeby.ie> 5 April 2023
- some STL cover types removed
2023-04-05 11:21:31 +01:00
Tomasz Wlostowski eed05191a9 router: pass collision query options in a structure
Selectively cherry-picked by Jeff Young <jeff@rokeby.ie> 4 April 2023
- Jon's user-clearance-epsilon algo kept intact
- Jeff's castellated-pad code kept intact
2023-04-05 11:21:31 +01:00
Seth Hillbrand 16b4ec3c7e Allow bus elements to connect
Previously, bus elements that were not instantiated as individual nets
could not connect to each other.  This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names.  Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
  this patch or by individually instantiating each bus element as a
local label

Fixes https://gitlab.com/kicad/code/kicad/issues/14300
2023-04-04 15:23:29 -07:00
Wayne Stambaugh c3e6825d62 Add hashing to and unit tests for some low level objects. 2023-04-04 15:28:34 -04:00
Jeff Young 8dfe8e595c Merge MR 1433 from Stefan <stifisax@gmx.ch>. 2023-04-04 17:39:18 +01:00
Stefan c2686d881e add include 2023-04-04 17:31:46 +01:00
Stefan 992f38a6ce fix used functions 2023-04-04 17:31:46 +01:00
Stefan 34700c00f6 fix error string 2023-04-04 17:31:44 +01:00
Stefan fb593bd0c0 check Eagle schematic to be in xml format before parsing 2023-04-04 17:30:10 +01:00
Jeff Young a9b2234f4e Use a softer Reset for grid settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/14458
2023-04-04 17:05:21 +01:00
Mike Williams 247c2edbed Symbol Fields Table: various bug and coverity fixes 2023-04-04 11:27:09 -04:00
Mike Williams 791a9e6c78 Symbol Fields Table: fix up Rename field function 2023-04-04 11:27:09 -04:00
Stefan e6fd70777b do not allow import of legacy kicad schematic via importer 2023-04-04 13:21:05 +00:00
Jeff Young 13e79af8a0 Eagle template footprints don't actually belong to board.
Set their parent to nullptr before deleting (as the board may have
already been deleted).

Likely fix for Sentry KICAD-79.
2023-04-04 14:18:49 +01:00
Jeff Young 7e5cd01079 Improve scoping control of connetion members.
(The real bug here is that CONNECTION_GRAPH::assignNetCodesToBus() was
growing the bus aliases members list because it used a non-const
reference to it as a local storage list.  The const scoping of it will
prevent this type of error in future.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14269
2023-04-04 12:03:06 +01:00
Jeff Young b3e2cf218f Fix Mac crash-on-quit when timed infobar is up. 2023-04-03 23:44:40 +01:00
Jeff Young bd60f38569 Possible protection from acessing deleted window data.
(Long shot for Sentry KICAD-MM.)
2023-04-03 23:44:40 +01:00
Jeff Young a4e8fa96d4 Nullptr safety.
(This is a long shot for Sentry KICAD-MV, but you never know....)
2023-04-03 23:44:40 +01:00
Seth Hillbrand d135295ac8 Update translator contributions
Adds a number of missing contributors to our translations
2023-04-03 13:07:15 -07:00
Mike Williams 68353e99d1 Symbol Fields Table: more MSVC fixes 2023-04-03 13:12:13 -04:00
Mike Williams 310d26620e Symbol Fields Table: more MSVC build fixes 2023-04-03 12:27:48 -04:00
Jeff Young 9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Mike Williams 98e846459a BOM Presets: don't use designated initializers 2023-04-03 11:24:38 -04:00
Ian McInerney 27e2e820cb Split spice tests into separate test 2023-04-03 14:42:10 +01:00
Jeff Young 7a24672120 Improve naming. No functional changes. 2023-04-03 14:32:23 +01:00
Jeff Young d9b0577ddd Fix pad flipping. 2023-04-03 14:32:23 +01:00
Mike Williams b7b7dc6558 Symbol Fields Table: general settings saving cleanup 2023-04-03 09:07:52 -04:00
Mike Williams 9c3d93eb34 BOM Generator: wire up forced exclusion, optional DNP exclusion 2023-04-03 09:07:52 -04:00
Mike Williams 79a829395d BOM Generator: minor bug fixes and string changes 2023-04-03 09:07:52 -04:00
Mike Williams c5cc313da9 Symbol Fields Table: BOM presets saved in JSON settings 2023-04-03 09:07:52 -04:00
Mike Williams 753ae21fd4 BOM Generator: wire up to kicad-cli 2023-04-03 09:07:52 -04:00
Mike Williams 8433f94886 Symbol Fields: move more strings to template field names usage 2023-04-03 09:07:52 -04:00
Mike Williams 6a726709b5 Symbol Fields Table: wire up BOM format presets 2023-04-03 09:07:51 -04:00
Mike Williams bb7d55e5a4 Symbol Fields Table: fix Qty column
Really need to refactor these strings out of everything...
2023-04-03 09:07:51 -04:00
Mike Williams 106747a03b Symbol Fields Table: file chooser + working export 2023-04-03 09:07:51 -04:00
Mike Williams b59fd76c15 Symbol Fields Table: export formatting options started
Also move export into the data model and out of the dialog so we can
eventually do this without a GUI.
2023-04-03 09:07:51 -04:00
Mike Williams 97eed8c8a2 Fields Data Model: pull more UI controls interaction out of class 2023-04-03 09:07:51 -04:00
Mike Williams cccd708860 Symbol Fields Table: move data model into its own file 2023-04-03 09:07:51 -04:00
Mike Williams 21c81b19fa Symbol Fields Table: upgrade dialog in prep for exporter 2023-04-03 09:07:51 -04:00
Mike Williams a39ce5bf9e Dialog Symbol Fields Table: allow re-labeling columns 2023-04-03 09:07:51 -04:00
Mike Williams d117d4e8f5 Symbol Fields Table: Add Presets
No backing store in JSON settings yet.
2023-04-03 09:07:51 -04:00
Mike Williams f98e36efa9 Symbol Fields Table: allow hiding references
If that's what the user wants, let them.
2023-04-03 09:07:51 -04:00
Mike Williams 9b942ee8f3 Symbol Fields Table: fix up some display/field/canonical name confusion 2023-04-03 09:07:51 -04:00
Mike Williams d8df792c6a Fields Symbol Table: really move columns when the user moves them
Move the internal columns and rebuild the table when a user moves the
columns. This is the only way to fix selection issues across reordered
columns.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12295
2023-04-03 09:07:51 -04:00
Mike Williams 79b20812d0 Symbol Fields Table: move towards field names instead of fixed indices
Qty column can now be hidden.

We eventually need to get to the point that we are able to rearrange the
columns in the internal data model to work around wxGrid selection
issues.
2023-04-03 09:07:51 -04:00
Mike Williams 4ac0d71ad4 Grid Tricks: don't override paste into actively editing cell
Also strip linebreaks and tabs if we are in a single cell.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12276
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8361
2023-04-03 09:07:51 -04:00
Mike Williams 1982c1af80 Symbol Fields Table: save current table properties
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5006
2023-04-03 09:07:51 -04:00
Mike Williams e53ee9df4b Symbol Fields Table: add rename column functionality 2023-04-03 09:07:51 -04:00
Jeff Young 7286555529 Fix some issues editing pads via Pad Properties dialog.
The offsets and orientations were being incorrectly handled.
2023-04-03 13:17:52 +01:00
Jeff Young fd07f50c44 Report collisions of items with nets as SHORTING, not CLEARANCE.
Fixes https://gitlab.com/kicad/code/kicad/issues/14312
2023-04-02 21:07:52 +01:00
Jeff Young 77639a540b Add messages for clearance reports on footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/13874
2023-04-02 19:12:19 +01:00
Jeff Young 28028c941e Retire Local/Draw coords distinction from PAD (the last object to have it). 2023-04-02 18:02:41 +01:00
Jeff Young 7ca057ea02 Marginally increase sliver width checker's bogus segment tolerance.
Fixes https://gitlab.com/kicad/code/kicad/issues/14449
2023-04-02 16:43:29 +01:00
Jeff Young 7252c7471c Use enums for column ids.
(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
2023-04-02 15:10:06 +01:00
Jeff Young 3a8d6dffba Don't close ERC window when changing sheets.
This Reset() override was originally added to fix a bug when opening
a new schematic in stand-alone.  However, we now do that sort of
cleanup in SCH_EDIT_FRAME::doCloseWindow().

Fixes https://gitlab.com/kicad/code/kicad/issues/14470
2023-04-02 11:48:23 +01:00
Jeff Young b78e0a55b1 Naming conventions. (No functional changes.) 2023-04-02 11:48:23 +01:00
jean-pierre charras 054de5687c Pcbnew: fix crash when trying to delete a PCB_TEXT. 2023-04-02 12:15:18 +02:00
jean-pierre charras 31354a2d91 PCB_TEXT::TransformTextToPolySet(): fix some issues:
- incorrect rotation for texts with option "Keep Upright"
- missing code for knockout texts.
Fixes #14473
https://gitlab.com/kicad/code/kicad/issues/14473
2023-04-02 09:54:53 +02:00
Ian McInerney 45b8dced92 Fix nanodbc build with clang and gcc stdlib
This should really be fixed upstream somehow, but the upstream build
with clang is broken on Fedora 38 right now anyway due to header issues.
2023-04-02 00:50:33 +01:00
Ian McInerney 8351c8923a Make version info work without lsb-release installed 2023-04-02 00:30:36 +01:00
Marek Roszko 23476683f6 Try and patch site patch detection
Use Steven Falco's suggested fix from fedora, it appears to behave fine on Windows
2023-04-01 13:42:41 -04:00
jean-pierre charras 52315e4f02 specctra_export: fix unit conv PCB iu -> DSN 2023-04-01 17:28:50 +02:00
Jeff Young bf9a42d7e1 Naming conventions and nullptr usage. No functional changes. 2023-04-01 15:41:59 +01:00
Jeff Young 4fbb85aa4f Naming conventions. 2023-04-01 15:40:50 +01:00
Jeff Young a8faa0e615 Add hole clearance to moutning hole keepouts for SPECCTRA.
Fixes https://gitlab.com/kicad/code/kicad/issues/14439
2023-04-01 15:40:43 +01:00
Jeff Young 04cdca837e Remove GUI dialogs from PCB plugin. 2023-04-01 11:37:34 +01:00
jean-pierre charras aaae50f2aa ERC do not test power symbols for simulation model.
Fix also a minor cosmetic issue with ERCE_SIMULATION_MODEL messages.
Fixes #14463
https://gitlab.com/kicad/code/kicad/issues/14463
2023-04-01 10:16:44 +02:00
Jeff Young b80a9014ff Fix gcc warning. 2023-03-31 23:53:11 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Seth Hillbrand 7695d510d6 Prevent PCB Editor from opening multiple board_setup
ShowBoardSetup can be called multiple times from multiple locations,
resulting in duplicate board setup dialog boxes.  This is confusing and
should be prevented.  We use the established patter from the symbol
picker to ensure that only one copy of the dialog is ever opened at a
time
2023-03-30 15:34:23 -07:00
jean-pierre charras 061e423b1f Pcbnew: fix incorrect position of cached text shapes when moving a footprint.
when moving a footprint, the position of texts living in FP_TEXT_BOX was
not updated when the text shape was cached (non Kicad fonts).
Fixes #14452
https://gitlab.com/kicad/code/kicad/issues/14452
2023-03-30 17:25:25 +02:00
jean-pierre charras e1d47dfac4 fix typo 2023-03-30 13:48:37 +02:00
jean-pierre charras cd90887e06 kicad-cli, layer names: allows using both names used in GUI and in board files
Fixes #14455
https://gitlab.com/kicad/code/kicad/issues/14455
2023-03-30 13:21:18 +02:00
jean-pierre charras e0d983e0d8 kicad-cli, export drill files: re-add -u as short option for --excellon-units.
Was removed by my previous commit b6f5e3d
2023-03-30 10:47:13 +02:00
jean-pierre charras b6f5e3df2b kicad-cli, export drill files: fix duplicate options and fix some others:
- remove --separate-files duplicate option
- change --units to --excellon-units (valid only for Excellon) and default to mm
- Gerber resolution: 5 -> 6 (default must be always the higher resolution)
Fixes #14454
https://gitlab.com/kicad/code/kicad/issues/14454
2023-03-30 09:41:45 +02:00
jean-pierre charras 1aa0ef05c0 Fix missing include. 2023-03-30 08:49:36 +02:00
Roberto Fernandez Bautista d5bc223ff2 CADSTAR PCB Importer: Ignore construction layers on outer surfaces
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14443
2023-03-29 23:46:22 +02:00
Roberto Fernandez Bautista aaeb8ca739 CADSTAR PCB importer: Fix loading of rounded rectangle pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14445
2023-03-29 20:53:14 +02:00
Roberto Fernandez Bautista 89441d807d CADSTAR PCB importer: Fix incorrect position of overridden pads 2023-03-29 20:53:14 +02:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
jean-pierre charras 683a327200 Footprint editor: always export the currently loaded footprint.
Previously, it was not always the edited footprint, but a footprint
selected from the library tree.
It was especially annoying when the footprint was loaded from the board editor:
The footprint was not the loaded footprint, but its copy from library.
2023-03-29 18:47:39 +02:00
jean-pierre charras 0bd83d3096 Footprint viewer: ensure the footprint is updated after new library selection
Previously, if the first fp of the new lib has the same name as the old
displayed fp, the old fp was not replace by the new fp.
2023-03-29 16:53:49 +02:00
Seth Hillbrand f93fde15b7 Locked shadow needs to be in shadow color
Otherwise, text shadow is stroked by text color
2023-03-28 13:01:08 -07:00
Jeff Young 0f9a4ef7b7 Update local coords after changing footprint item properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/14348
2023-03-27 16:44:00 +01:00
jean-pierre charras 0e82b79a8f QA test: disable Silk clearance test in solder mask bridge QA test.
the Silk clearance test has nothing to do with a solder mask bridge QA test
2023-03-27 12:04:03 +02:00
jean-pierre charras d116ee576e French translation update 2023-03-27 11:55:21 +02:00
Jon Evans 3f42e6b702 Properties: Hide Net Class from GUI
It is confusing users who want to change the netclass of a net.
2023-03-26 19:46:00 -04:00
Jon Evans c35cefe1d5 DbLib: Get rid of some GCC warnings 2023-03-26 19:43:33 -04:00
Jon Evans 65193487a6 Properties: Rename methods to better reflect their purposes 2023-03-26 19:43:16 -04:00
Jeff Young a214ac0310 Better reporting of copper <--> keepout area clearances.
(Keepout areas can keep-out copper, but they don't have a clearance
to copper.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14375
2023-03-26 20:57:59 +01:00
Jeff Young 9976b9ce8c Only report on clearances where there was one defined.
If it's 0, it's just a straight-up collision.
2023-03-26 20:46:59 +01:00
Jeff Young 0266d03f79 Run SILK_CLEARANCE rules on mask layer when testing silk-to-mask clearance.
This allows custom rules to be authored without firing the auto-generated
rule from Board Setup > Silk Item Clearance (which should be only for silk-
to-silk clearances).

Fixes https://gitlab.com/kicad/code/kicad/issues/14417
2023-03-26 20:42:41 +01:00
Jeff Young 2443bc6e29 Update allow-solder-mask-bridges when updating footprint from library.
Fixes https://gitlab.com/kicad/code/kicad/issues/14422
2023-03-26 16:27:09 +01:00
Jeff Young 04f6f04bed Test silk/mask collisions on the correct layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/14417
2023-03-26 16:27:05 +01:00
Roberto Fernandez Bautista fc04f5135f CADSTAR Sch: TERMATTR may have more than one attribute subnode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13526
2023-03-26 15:54:21 +01:00
Marek Roszko 604a7d69db Move up a layer validity check to prevent crash
Fixes sentry crash KICAD-RF
2023-03-25 17:12:22 -04:00
Jeff Young 1788db53e5 Don't complain about no sim model when running Sim Model Editor dialog.
Also removes some atrophied code, and makes sure changes to the parameter
grid for raw spice models gets saved.
2023-03-25 20:22:04 +00:00
Jeff Young 30b3645e60 Add regression test for 14412. 2023-03-25 16:13:45 +00:00
Jeff Young c5e66361db Allow solder mask bridges between net-tie-group pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/14412
2023-03-25 16:11:07 +00:00
Wayne Stambaugh a79108f102 Fix GCC compile error. 2023-03-25 11:22:11 -04:00
Marek Roszko ab28650d57 Use read/write locks in the settings_manager to avoid thread issues in some scenarios
Fixes sentry issue KICAD-90
2023-03-25 10:46:14 -04:00
Jeff Young 35ca3e7264 Add regression test for 13988. 2023-03-25 12:45:36 +00:00
Jeff Young 60aadfee40 Move separation of model name from params earlier in the process.
We need just the model name when we look for a match in the library file.
2023-03-25 12:45:36 +00:00
Jeff Young e65a58b823 Add regression test for 14334. 2023-03-25 12:45:36 +00:00
jean-pierre charras 1b4f905f4c Plot symbol graphic texts: fix incorrect position of texts in some rotations.
The plot code is now similar to the one for symbol fields
Fixes #14327
https://gitlab.com/kicad/code/kicad/issues/14327
2023-03-25 12:45:09 +01:00
Jeff Young d6dd58fff9 Keep track of single-pad-islands so we can discount spokes to them. 2023-03-25 10:44:46 +00:00
jean-pierre charras 4e27e91b2f KICAD_CURL_EASY: fix compil warnings (avoid using deprecated functions) 2023-03-25 10:18:05 +01:00
Marek Roszko eb90448247 Fix typo 2023-03-24 19:54:41 -04:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
Seth Hillbrand 0b54eb6edb Backout change unrelated to 19d0aceda3 2023-03-24 12:28:03 -07:00
Seth Hillbrand 0984599624 Pins are case-sensitive
Cleanup should remove mis-matched cases

Fixes https://gitlab.com/kicad/code/kicad/issues/14415
2023-03-24 11:21:35 -07:00
Seth Hillbrand 19d0aceda3 Remove superfluous m_status variable
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Wayne Stambaugh 244c37298f Fix Doxygen commenting issues. 2023-03-24 11:57:52 -04:00
jean-pierre charras 2e2cbb0594 Pcbnew, APPEARANCE_CONTROLS: do not change objects visibility, when changing
layers visibility using Preset layers widget.
Fixes #13381
https://gitlab.com/kicad/code/kicad/issues/13381
2023-03-24 14:07:29 +01:00
Nimish Telang 8ea357f04d Fix Doxygen directives in numerous headers 2023-03-24 13:02:13 +00:00
Nimish Telang f7bf3011fb Use bundled Find{CURL,ZLIB}.cmake 2023-03-24 12:54:52 +00:00
qu1ck a86aa6fc3e Don't disable reload button in action plugins preferences 2023-03-24 12:49:43 +00:00
jean-pierre charras 7aace908e1 Gerber plotter: fix incorrect arcs in regions when using a plot offset.
The arc center in Gerber units was incorrectly calculated.
Fixes #14402
https://gitlab.com/kicad/code/kicad/issues/14402
2023-03-24 11:25:25 +01:00
Marek Roszko c65e33ac13 Prevent crash in color settings due to dropdown weirdness
Fixes sentry reported crash KICAD-R6
2023-03-23 19:46:47 -04:00
jean-pierre charras ac71227e75 Fix compil warnings. 2023-03-23 18:36:59 +01:00
jean-pierre charras b622e3a3f7 SYMBOL_EDIT_FRAME: fix issue after loading a symbol from schematic editor.
Selected items become invisible.
Fixes #14151
https://gitlab.com/kicad/code/kicad/issues/14151
2023-03-23 18:36:59 +01:00
Wayne Stambaugh a0d02fbab1 Make multivector.h header order independent.
Attempt to clean up all redundant headers that multivector.h touches.
2023-03-23 13:26:32 -04:00
Jon Evans dd8b52af93 Be more flexible about extracting booleans from database
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14376
2023-03-22 21:24:24 -04:00
Marek Roszko d49562a7aa Fix crash editing footprint editor defaults
Missing one level of GetParent()....use a dynamic_cast to sanity check it in debug

Fixes sentry crash KICAD-R4
2023-03-22 18:39:17 -04:00
Seth Hillbrand 8150deec32 Add QA test for Clipper2 fill 2023-03-22 15:24:46 -07:00
Seth Hillbrand 97558b62ec Update to Clipper 1.2+
Updates to Clipper2 742614f, which includes bug fixes for specific KiCad
boards beyond Clipper2 itself

Fixes https://gitlab.com/kicad/code/kicad/issues/14294
2023-03-22 15:24:26 -07:00
Seth Hillbrand 2e2da951a5 Don't double-expand NPTH checks
When filling the zone for the NPTH, the hole should not be considered as
a copper element in terms of clearance.  This prevents close but
different knockout elements from being formed
2023-03-22 15:07:58 -07:00
Seth Hillbrand 914b5a4d21 Simplify test for substantial nubs
Substantial elements following a divot should be at least as far in each
cardinal direction from the origin point in order to be considered
substantial.  This catches cases where the "substantial" element is
actually a straight segment away from the divot

Fixes https://gitlab.com/kicad/code/kicad/issues/14130
2023-03-22 13:01:50 -07:00
Jeff Young b8cf7cc080 Split name from additional params only when model is a library reference. 2023-03-22 13:52:17 +00:00
Jeff Young 5bda3b99f9 Handle single-token flag parameters.
Also fixes a bug where all VDMOS instance parameters weren't marked as
instance parameters.

Also fixes a bug where VDMOS thermal models weren't supported (they
have two extra pins: Tj and Tcase).
2023-03-22 13:52:17 +00:00
Jeff Young 9dc16eb014 Don't include non-overridden parameters in Sim.Params.
Fixes https://gitlab.com/kicad/code/kicad/issues/14369
2023-03-22 13:52:17 +00:00
jean-pierre charras 65eb84265b Fix a compil warning issue (mingw specific)
also avoid to include wx/wx.h in kicad_cli.cpp, it is compil time consuming.
2023-03-22 08:49:26 +01:00
jean-pierre charras e0e2bcf20a Ensure 3D shapes are always shown in footprint settings dialog.
Fixes #14371
https://gitlab.com/kicad/code/kicad/issues/14371
2023-03-22 08:47:42 +01:00
Salvador E. Tropea 7e3f1b1a00 Adds the missing plot formats to kicad-cli sch export 2023-03-22 02:14:50 +00:00
Jeff Young 39a801423e Separate legacy model name from parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13988
2023-03-21 13:29:17 +00:00
David Holdeman 79fbde0894 Add option to use drill/place file origin for kicad-cli gerber export 2023-03-21 12:18:14 +00:00
jean-pierre charras 0c26014eaa step exporter: fix missing initialization of a member (m_pcbName)
in EXPORTER_STEP rename m_pcbName to m_pcbBaseName, to avoid using
the same name used also in STEP_PCB_MODEL.
2023-03-21 09:30:11 +01:00
Marek Roszko edf6828cf1 Put the project name back into the step pcb label.
Software like Solidworks and other CAD treat STEP labels as unique entries.
When you import multi STEP files into the same project, it'll start deduplicating your design by those name.
So two completely unrelated PCBs with the same "PCB" name will result in one being replaced by another.
2023-03-20 21:11:28 -04:00
Jeff Young bb2a0f825a Orthogonal dimension are always cardinal, even when their start points are not.
Fixes https://gitlab.com/kicad/code/kicad/issues/13728
2023-03-20 21:22:11 +00:00
Ian McInerney aa11f78bbc Link ngspice with the QA tests that need it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12491
2023-03-20 16:54:32 +00:00
Ian McInerney 8038b3a3e1 Reorganize eeschema cmake after ngspice changes 2023-03-20 16:54:32 +00:00
Ian McInerney 016c958021 Always build spice simulator support
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
2023-03-20 16:54:32 +00:00
Jeff Young 5798b586f0 Ignore extraneous LTSpice parameters for VDMOS models.
Also adds special case handling of VDMOS syntax to allow parens (or extra
spaces, linebreaks, etc.) between "VDMOS" and "NCHAN"/"PCHAN".

Fixes https://gitlab.com/kicad/code/kicad/issues/14299
2023-03-20 16:16:44 +00:00
jean-pierre charras 10d4c63c31 EDA_SHAPE_DESC(): catch a std::runtime_error when emitted by
template<typename T> T Get( PROPERTY_BASE* aProperty ) to avoid a crash,
and displays in Debug mode the runtime error message.
Fixes #14347
https://gitlab.com/kicad/code/kicad/issues/14347
2023-03-20 16:07:08 +01:00
Chartreuse 0d5976c52b Diff Layer Transparancy Fallback for Low Framebuffer Count 2023-03-20 13:05:24 +00:00
Martin Thierer 45b94a4b3e Pcbnew: Fix rotating bitmaps
Fixes rotating bitmaps with "rotate counterclockwise",
"rotate clockwise" and "move exactly" commands.

Only rotation by 0, 90, 180 and 270 degrees is supported
for bitmaps. Other values are rounded to the nearest 90
degree multiple.

There is a different bug that this commit doesn't address,
which is that BITMAP_BASE::Rotate() got its CW/CCW logic
reversed ("m_image->Rotate( false )" should rotate CW, but
does not).

Fixes https://gitlab.com/kicad/code/kicad/issues/14197
2023-03-20 12:36:19 +00:00
Jeff Young a14c017def Save location of legend in worksheet.
Also provides a different cursor when over a legend (to make it clearer
that you can drag it).
2023-03-20 09:51:41 +00:00
Jeff Young ec6d709929 Make sure legend reflects gain/phase for AC small signal analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14301
2023-03-19 23:02:58 +00:00
Jeff Young 6f44b85c13 Formatting. (No functional changes.) 2023-03-19 22:09:43 +00:00
Jeff Young 5d55fc41ae Adds Teardrops as separate type in Global Deletions dialog.
Also removes the nag dialog as undo has worked for Global Deletions for
some time now.
2023-03-19 20:43:18 +00:00
Jeff Young 897984aa22 Filter Selected Items... is inclusive, not exclusive.
Fixes https://gitlab.com/kicad/code/kicad/issues/14273
2023-03-19 20:43:18 +00:00
Jeff Young 129ccb891e Use standard paradigm for macro scope limiting. 2023-03-19 20:43:18 +00:00
Jeff Young ef0d561a5c Less nagging. (If we need a field name, then create one.)
Also cleans up empty fields when exiting the dialog.
2023-03-19 20:43:18 +00:00
Roberto Fernandez Bautista f97beb15b8 QA: std::optional testing + re-enable cadstar parts parser qa test 2023-03-19 15:28:13 +01:00
Alex 10c4b948cb Support canceling initial global library table setup. 2023-03-19 14:30:53 +03:00
Alex 672c468342 Fix clashing error dialogs when can't load dynamic library. 2023-03-19 13:01:54 +03:00
Alex b89545e484 GTK: Fix settings import paths showing up twice. 2023-03-19 12:51:37 +03:00
Jeff Young afe813cae5 Remove accelerator keys from schematic find/replace dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14304
2023-03-18 23:33:23 +00:00
jean-pierre charras 5461dc6cd1 BOARD_NETLIST_UPDATER: add missing count of warnings
Fixes #14290
https://gitlab.com/kicad/code/kicad/issues/14290
2023-03-18 17:54:03 +01:00
jean-pierre charras d62d775115 Remove non existing OnSize event in SYMBOL_EDIT_FRAME EVENT_TABLE 2023-03-18 07:30:05 +01:00
Jeff Young ad5d3d4eba Clean up items which weren't pasted from clipboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/14335
2023-03-17 23:17:15 +00:00
Jeff Young 607622e8f8 Make the two Create() methods more parallel. 2023-03-17 15:58:28 +00:00
jean-pierre charras 5bd491bd74 Avoid schematic editor frame to go on top when selecting a symbol.
It was s side effect of a CrossProbe called on a symbol selection.
This also replace commit e51594cdf5.
Fixes #14316
https://gitlab.com/kicad/code/kicad/issues/14316
2023-03-17 16:37:49 +01:00
Jeff Young ee1d9c561c Improve zone & rule area reporting.
Also removes a bunch of "wxEmptyString" where it was degrading readability.

Also fixes a bug where footprint zones were getting sorted incorrectly
due to rotation of coordinates.

Fixes https://gitlab.com/kicad/code/kicad/issues/14322
2023-03-17 13:28:29 +00:00
Jeff Young 967ee2c85b Improved macro protection. 2023-03-17 11:04:58 +00:00
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
Jeff Young c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
jean-pierre charras e6945a85b0 fix compil and Coverity warnings. 2023-03-12 15:19:50 +01:00
Jeff Young 99247adf15 Fix uninitialized variable. 2023-03-12 12:56:12 +00:00
Marek Roszko c24214fcd2 Update vcpkg to fix python3 build 2023-03-11 16:42:03 -05:00
Jon Evans 8eaa3cfac9 Do not try to process invalid ratsnest nodes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254
2023-03-11 16:12:10 -05:00
Jeff Young 74f064d3aa Don't keep smart pointers to wxWindows, particularly modeless ones.
wxWindows have their own lifecycle management.
2023-03-11 19:36:01 +00:00
Simon Richter 08e6458abc Shrink lifetime of variable
In 7.0, this avoids a warning. In this branch, someone implemented the
compiler's suggestion, but there is an easier way.
2023-03-11 15:46:52 +00:00
Roberto Fernandez Bautista f1db501adb Fix warning in SHAPE_LINE_CHAIN::Slice 2023-03-11 16:18:53 +01:00
Ian McInerney 3d7a463cb8 Remove last few occurances of Boost::system 2023-03-11 14:21:07 +00:00
Jeff Young 6eb73133f0 Fix qa gold value. 2023-03-11 14:17:03 +00:00
jean-pierre charras a264608368 drc_test_provider_library_parity.cpp: fix a typo that crashes Pcbnew. 2023-03-11 15:01:26 +01:00
Ian McInerney 8f2a453d07 Remove explicit Boost::system dependency from our cmake
Boost::system is only used transitively by the other Boost libraries, so
their CMake will include it when it is needed.
2023-03-11 13:29:58 +00:00
Ian McInerney e20b33cb66 Fix boost dependencies
* Add Boost::locale explicetly to the CMake since nanoodbc requires it
* Don't let nanoodbc add all Boost libraries to the link line, since it
  is used in common, and it was pulling the unit test framework into
  common then.
2023-03-11 13:29:45 +00:00
Jeff Young c9351dfd67 Drawing improvements for symbol & footprint diffs.
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00
jean-pierre charras 4737e3b8a7 QA tests: link unit_test_framework library only with QA tests.
It fixes a link issue on W10/msys2 when building some .exe files
not related to QA tests, but have the unit_test_framework library linked
without this change..
2023-03-11 10:28:06 +01:00
Marek Roszko b4bb1f4b46 update vcpkg to get the arm64 compatible packages 2023-03-10 21:23:09 -05:00
Marek Roszko 65818bd4a3 Add windows arm64 support 2023-03-10 21:19:56 -05:00
Seth Hillbrand d7a6875b0b 3dviewer: Show footprint board regardless of proj
The settings for the project in terms of visibility should not impact
our ability to preview the 3d model of a footprint

Fixes https://gitlab.com/kicad/code/kicad/issues/14246
2023-03-10 15:18:45 -08:00
Jeff Young 5041bddc3b Union workbook sim commands with any defined on schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215
2023-03-10 21:33:06 +00:00
Jeff Young 6d29088668 Add missing command to SPICE directives list.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215
2023-03-10 21:33:06 +00:00
Jeff Young 3bc5e3dd8a Added PSPICE/LTSPICE JFET model parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425
2023-03-10 21:33:06 +00:00
Jeff Young 9546a40662 Correct usage of elipses after menu items.
(They should only be used when we collect more info before performing
the command.  If the command is something like showing the simulator,
then there should be no elipsis as we don't collect more info before
showing the window.)

Also improves a few of the menu tooltips.
2023-03-10 21:33:06 +00:00
Mike Williams b32ba16da4 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young 43fa5e957f Fix shadowed variable warning. 2023-03-10 17:42:36 +00:00
Jeff Young 357427d803 Graphical diff for board vs library footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-10 17:16:40 +00:00
Ian McInerney 56b7d570f9 Remove uses of climits header/defines
2 of the 3 includes never used it, and the other could be switched to
  the C++ numeric_limits class.
2023-03-10 17:08:56 +00:00
Seth Hillbrand d405fff1d8 Correct alpha blending in PDF plot
We fake the alpha channel by pre-multiplying but we forgot to account
for the downscaling of the input channel value in addition to correcting
the alpha * white.  This led to clipping when the values overflowed

Fixes https://gitlab.com/kicad/code/kicad/issues/14238
2023-03-10 09:00:12 -08:00
Ian McInerney 5671a123b9 kimath: Fix some warnings 2023-03-10 16:38:35 +00:00
Ian McInerney 3ce4016221 kimath: Enable warnings
kimath was missed when the original warnings infrastructure was added,
so enable warnings in it now.
2023-03-10 16:38:35 +00:00
Ian McInerney 9292158c76 kimath: Switch from INT_MAX to std::numeric_limits 2023-03-10 16:38:35 +00:00
Ian McInerney bc28287fa7 Cleanup includes in kimath 2023-03-10 16:38:35 +00:00
Ian McInerney a6ebd60c3b CMake: Modernize Boost import to use imported targets 2023-03-10 16:38:35 +00:00
Ian McInerney d3ae535885 cmake: Fix ordering issue in include directive 2023-03-10 16:38:35 +00:00
Ian McInerney c9eefa7ad7 Replace boost::filesystem with std::filesystem
Our minimum C++ version is C++17, which has std::filesystem, so ditch
the boost dependency and use the standard library instead. (this only
affects temp file creation in the QA suite anyway).
2023-03-10 16:38:35 +00:00
Mike Williams ade29c8577 Schematic Sheet Variables: more SCH_SHEET_PATH plumbing
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14239
2023-03-10 09:16:53 -05:00
jean-pierre charras bb27717dda DIALOG_BOARD_REANNOTATE: fix coding style issues. 2023-03-10 11:49:48 +01:00
jean-pierre charras 6fd79929be DIALOG_BOARD_REANNOTATE: fix some issues, and protect against bad settings.
Fixes #14234
https://gitlab.com/kicad/code/kicad/issues/14234
2023-03-10 10:46:55 +01:00
Jeff Young 6a46dbd306 Fix includes. 2023-03-09 23:49:01 +00:00
Seth Hillbrand d2cc252fc7 Move via/track/grid selection widget to wxComboBox
The wxComboBox drops nicely from the top of the screen, showing the full
element list, opposed to the choice widget that centers the selection
and places the list off the top of the screen if there are many
elements.  This was broke for MacOS until wx3.2

Fixes https://gitlab.com/kicad/code/kicad/issues/1866
2023-03-09 11:45:44 -08:00
Jeff Young bc0d59801a Graphical diff for schematic vs library symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-09 18:04:52 +00:00
Jeff Young 2d6ab62da4 ADDED: schematic/library diff for symbols. 2023-03-09 18:04:52 +00:00
jean-pierre charras b96f3d085c Eeschema: save worksheet filename in project file.
The call to saveProjectSettings() was missing.
Fixes #14219
https://gitlab.com/kicad/code/kicad/issues/14219
2023-03-09 15:56:19 +01:00
Seth Hillbrand 9146e38af4 Handle fully-nested zones
The logic to handle divots needs to account for fully nested, same net
zones.  The process of subtracting led to us considering the inner zone
to be a zone knock-out (negative polygon).  To avoid this, we need to
check if the inner, higher priority zone has any connection to the outer
zone.  If it does not, then we can treat it as an isolated zone without
worrying about divots to the outer zone.
2023-03-08 10:36:53 -08:00
Mike Williams 74a9d79a8d Router: fix Continue From End/ Attempt Finish work for diff pairs
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13772
2023-03-08 12:23:04 -05:00
Mike Williams 8d3e1eb52a Continue From End: support other placement algos 2023-03-08 12:01:29 -05:00
Mike Williams e7555aa45f PNS Router: arcs are directional, too
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10391
2023-03-08 12:01:29 -05:00
Mike Williams 5bc018f7dc PNS Diff Placer: fix invalid cast of Arc to Segment and derefence 2023-03-08 12:01:29 -05:00
Mike Williams e738750dff Schematic: sheet pins need to use their parent to resolve text variables
Otherwise the current sheet will be searched, which is one layer too far
down the hierarchy.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13998
2023-03-08 11:52:43 -05:00
Mike Williams 1bc4fc256a Sheets: check for duplicates using shown names
Otherwise sheet names using sheet variables may collide
2023-03-08 11:52:43 -05:00
Mike Williams bf59f1246b Schematic: correctly resolve label nets using sheet variables 2023-03-08 11:52:43 -05:00
Mike Williams c8fdac7abe Schematic: correctly resolve global power nets using sheet variables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7445
2023-03-08 11:52:43 -05:00
jean-pierre charras e4ec74e1ac Fix link issue for qa_utils on MINGW/msys2
For some obscure reason, using Boost_UNIT_TEST_FRAMEWORK_LIBRARY as library
name to link does not work. So use the actual filename.
2023-03-08 17:47:50 +01:00
jean-pierre charras 6343147bb3 Fix Coverity warnings. 2023-03-08 11:37:56 +01:00
jean-pierre charras eb4bf23ba1 French translation update 2023-03-08 09:14:58 +01:00
Seth Hillbrand 6b4c366cb8 Cleanup DRC check for via layers
Vias should only be placed on the layers through which they pass.  if
they pass through front or back copper, then they also pass through the
tech layers on that side

This is an update to 9d3f4bef6a
2023-03-07 11:13:05 -08:00
Mike Williams 671f555bc8 CMake: add flag to turn off spice QA tests (tests default to on) 2023-03-07 12:05:01 -05:00
jean-pierre charras a20c5a765f Specctra export: Fix typo 2023-03-07 15:08:23 +01:00
jean-pierre charras 5ccfc8e4ce Add missing fix in commit 2c77888b 2023-03-07 14:08:03 +01:00
jean-pierre charras 2c77888b49 DSN exporter: fix handling of multilayer copper zones, and broken zone layer id. 2023-03-07 14:01:32 +01:00
Jeff Young 33e7c78533 Edge connectors shouldn't trigger edge clearance violations.
Fixes https://gitlab.com/kicad/code/kicad/issues/14199
2023-03-07 12:23:18 +00:00
Johannes Maibaum 75424cb246 Don't bracket KICAD_VERSION when using git describe 2023-03-07 10:39:46 +00:00
Salvador E. Tropea 13de3c0656 Use constants for the names of the built-in colors
- Avoid repetition and errors from typos
- Allow simple changes
- Simpler data type handling, the constants are wxString

(Cherry-picked from f135881bd6 in 7.0)
2023-03-07 10:34:42 +00:00
jean-pierre charras 5735a57504 Pcbnew: fix crash when loading a library with a ft containing a dimension.
(crash due to the use of a null pointer during loading)
2023-03-07 10:09:34 +01:00
jean-pierre charras e7c3350482 fix compil warnings 2023-03-07 09:52:29 +01:00
Seth Hillbrand 7703a3c1ae Update translations 2023-03-06 16:51:19 -08:00
boonchai k 441d368acc Translated using Weblate (Thai)
Currently translated at 88.4% (7133 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2023-03-07 01:50:23 +01:00
Rigo Ligo 71c66bbbb1 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.0% (7992 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-03-07 01:50:22 +01:00
co8 j 51965c648e Translated using Weblate (Japanese)
Currently translated at 99.0% (7990 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-03-07 01:50:22 +01:00
Tokita, Hiroshi ad777fe5c3 Translated using Weblate (Japanese)
Currently translated at 99.0% (7990 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-03-07 01:50:22 +01:00
boonchai k 2faaddfc02 Translated using Weblate (Thai)
Currently translated at 87.5% (7062 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2023-03-07 01:50:22 +01:00
Jonathan Haas a5f25af4ca Translated using Weblate (German)
Currently translated at 98.5% (8015 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-03-07 01:50:22 +01:00
Ivan Chuba d925024509 Translated using Weblate (Estonian)
Currently translated at 5.0% (408 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2023-03-07 01:50:22 +01:00
Ivan Chuba 1fba6e7b68 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8066 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-03-07 01:50:22 +01:00
CloverGit f357cd7dff Translated using Weblate (Chinese (Simplified))
Currently translated at 98.8% (7972 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-03-07 01:50:21 +01:00
Jan Straka 25c40dd47c Translated using Weblate (Czech)
Currently translated at 89.2% (7201 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-03-07 01:50:21 +01:00
turkce 446e3bb22f Translated using Weblate (Turkish)
Currently translated at 41.6% (3359 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-03-07 01:50:21 +01:00
ssantos ff8bb97786 Translated using Weblate (Portuguese)
Currently translated at 99.9% (8064 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2023-03-07 01:50:21 +01:00
Toni Laiho 7729d4bf1f Translated using Weblate (Finnish)
Currently translated at 100.0% (8134 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:21 +01:00
Ulices 07f807098d Translated using Weblate (Spanish (Mexico))
Currently translated at 98.5% (7953 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-03-07 01:50:21 +01:00
Henrik Kauhanen a0eb478969 Translated using Weblate (Swedish)
Currently translated at 99.9% (8128 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-03-07 01:50:20 +01:00
Tom Niesse 68cf87a44b Translated using Weblate (Dutch)
Currently translated at 81.8% (6599 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2023-03-07 01:50:20 +01:00
Ulices a062c4fd05 Translated using Weblate (Spanish (Mexico))
Currently translated at 98.5% (7951 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-03-07 01:50:20 +01:00
Henrik Kauhanen 2a814f98a7 Translated using Weblate (Swedish)
Currently translated at 99.9% (8128 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-03-07 01:50:20 +01:00
김랑기 3825d2a7c7 Translated using Weblate (Korean)
Currently translated at 99.0% (7987 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-03-07 01:50:20 +01:00
Toni Laiho 3c53a1d62e Translated using Weblate (Finnish)
Currently translated at 100.0% (8134 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:20 +01:00
Henrik Kauhanen 37b89d8996 Translated using Weblate (Finnish)
Currently translated at 100.0% (8134 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:19 +01:00
Henrik Kauhanen 32ea3855b0 Translated using Weblate (German)
Currently translated at 98.5% (8015 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-03-07 01:50:19 +01:00
Ivan Chuba 50be34e15b Translated using Weblate (Ukrainian)
Currently translated at 98.5% (7951 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-03-07 01:50:19 +01:00
Wellington Terumi Uemura 16cb53c599 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8066 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-03-07 01:50:19 +01:00
Henrik Kauhanen da720374e6 Translated using Weblate (Swedish)
Currently translated at 98.5% (8017 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-03-07 01:50:19 +01:00
ZbeeGin 42c447f76d Translated using Weblate (Polish)
Currently translated at 100.0% (8066 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-03-07 01:50:18 +01:00
Jan Sobków fdc79a5d25 Translated using Weblate (Polish)
Currently translated at 100.0% (8066 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-03-07 01:50:18 +01:00
김랑기 cfcdaef5e0 Translated using Weblate (Korean)
Currently translated at 98.4% (7944 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2023-03-07 01:50:18 +01:00
Henrik Kauhanen fbcc0fc35c Translated using Weblate (Finnish)
Currently translated at 99.9% (8133 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:18 +01:00
Toni Laiho 54a8d75396 Translated using Weblate (Finnish)
Currently translated at 99.9% (8133 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:18 +01:00
Henrik Kauhanen 93a784d012 Translated using Weblate (German)
Currently translated at 98.5% (8015 of 8134 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-03-07 01:50:18 +01:00
Jan Straka 06738d1c63 Translated using Weblate (Czech)
Currently translated at 88.8% (7170 of 8066 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2023-03-07 01:50:18 +01:00
Henrik Kauhanen 03a3caa009 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-03-07 01:50:17 +01:00
Toni Laiho 072dfce78b Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:17 +01:00
Henrik Kauhanen 353d1d515b Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-03-07 01:50:17 +01:00
Henrik Kauhanen 5d793375a6 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-03-07 01:50:17 +01:00
Henrik Kauhanen ac38f3c7d9 Translated using Weblate (German)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-03-07 01:50:17 +01:00
James J 39e56485fc Consolidated ERC fixes
- Consistent calculation of IsStacked() for pins across ERC checks
 - Correct placement of ERC marker for unresolved field variables
 - Add sheet-specific paths to two ERC check results
2023-03-07 00:37:33 +00:00
Seth Hillbrand 7653a2bf99 Smarten connection width checker looking for splits
Fractured polygons are always fractured along the x-axis, so when
checking to see if a segment is a fracture point, we check if the y
coordinate is equal.  This avoids situations where there are multiple
fracture points between two inflection points

Additionally, we add a second check to ensure we don't hit spurious
blobs (all kinks should be symmetric and therefore be substantial in
each direction)

Fixes https://gitlab.com/kicad/code/kicad/issues/14130
2023-03-06 16:14:34 -08:00
Jeff Young 25623552f6 ADDED: board/library inspection for footprint differences.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-06 23:08:59 +00:00
Jeff Young 6838de962b Make SPICE netlist title explicit.
Fixes https://gitlab.com/kicad/code/kicad/issues/14183
2023-03-06 22:50:17 +00:00
Jeff Young 98d7b14dbc A better solution to keep SPICE netlist from being entirely selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/14177
2023-03-06 18:46:01 +00:00
Jeff Young 65c9988d45 Improve cache performance. 2023-03-06 17:18:01 +00:00
jean-pierre charras 636e63f0c5 more about step exporter (export more copper graphic objects). 2023-03-06 16:36:37 +01:00
Jeff Young c54c254f96 Don't allow footprint editor pad tools to run outside footprint editor.
(They can get called if a user re-assigns hotkeys to them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14166
2023-03-06 14:43:57 +00:00
Jeff Young b5060d2951 Support both wxWidgets APIs for excluded characters.
(Sadly they're mutually incompatible.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14153
2023-03-06 14:14:16 +00:00
Jeff Young 9b9efb9002 Cache for netclass pattern assignments. 2023-03-06 13:56:04 +00:00
Wayne Stambaugh a1fb8e1b1d Coverity fixes and code cleaning. 2023-03-06 07:12:18 -05:00
Jeff Young 7547e550aa Use name (even for fallback models) *if* it's specified in dropdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425
2023-03-06 11:17:39 +00:00
jean-pierre charras eeee3adb94 Step exporter: code cleaning and merge connected tracks in polygons 2023-03-06 11:59:09 +01:00
Jeff Young d96598c87c Add 12505 to the regression test suite.
Fixes https://gitlab.com/kicad/code/kicad/issues/12505
2023-03-06 10:26:59 +00:00
Jeff Young 630ff02369 Fix bone-headed logic.
(Else clause never gets called because 3 is always > 2.)
2023-03-06 10:26:59 +00:00
Jon Evans 61d30ee5bc Use constraints to determine netclas width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14190
2023-03-05 22:35:19 -05:00
Stefan 90b5dba5ac Altium Importer: add note that Parameter Set import is not yet supported 2023-03-06 02:13:40 +00:00
Jon Evans 819b767635 Bump to requiring wxWidgets 3.2.0
By the time 8.0 is out, we will not be supporting any platforms
on wxWidgets older than 3.2.0
2023-03-05 21:07:57 -05:00
qu1ck 88062c5fc3 Add vector3 to swig
Fixes regression in 7.0 making fp 3d model offsets not accessible in
python

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14179
2023-03-05 15:59:22 -08:00
Jon Evans 10d1ba59d8 Fix compile warning 2023-03-05 18:11:41 -05:00
Jon Evans 7b3fd2113c Improve sheet rendering performance
- Cache font markup parsing
- Cache SCH_SYMBOL::GetOrientation
- Don't construct new strings each time in GetDefaultFieldName
2023-03-05 17:41:46 -05:00
aris-kimi 5b43dc4e7b Simulator: Fix diode ibv unit 2023-03-05 19:23:33 +02:00
Jeff Young 6a5f305684 Allow others to also process units changed event.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156
2023-03-05 16:06:31 +00:00
Jeff Young 2994fa26cd Allow separate processing of dimensions in Edit Text & Graphics Properties. 2023-03-05 15:19:06 +00:00
Jeff Young 461def2719 Move automatic dimension processing inside PCB_DIMENSION_BASE.
Also move dimension precision to an enum so it can get a proper dropdown
in the properties inspector.
2023-03-05 15:19:06 +00:00
jean-pierre charras a3d834bef1 Step exporter: optimization: export round pad/via shapes as cylinders. 2023-03-05 14:54:16 +01:00
jean-pierre charras f569cffa8e Step exporter fixes and enhancements:
- fix duplicate code and a few bugs (some are due to changes in code over the years)
- ADDED: option to export tracks and vias on external layers Exporting tracks is *very* time consuming,
and need a bit of optimization.
2023-03-05 12:55:15 +01:00
jean-pierre charras 67ec09c850 fix a minor compil warning 2023-03-05 09:16:04 +01:00
jean-pierre charras 667acd1149 French translation update 2023-03-05 07:39:40 +01:00
Alex d2bd7e33b9 Remove extra canvas redraws when changing sheets. 2023-03-05 04:33:07 +03:00
Alex c1f4911d7e bom_csv_grouped_extra: use field-specific methods for data.
Fixes https://gitlab.com/kicad/code/kicad/issues/14129
2023-03-05 03:23:51 +03:00
Jeff Young 23accffc6d Add Property Inspector support for dimension objects.
Includes changing the class hierarchy so that dimension objects inherit
from PCB_TEXT rather than containing a PCB_TEXT member variable.
2023-03-04 23:16:46 +00:00
Jon Evans 610e787ada Move to requiring explicit action to save project settings 2023-03-04 14:25:07 -05:00
Jon Evans eba0783b38 Fix rotation/flipping properties for text boxes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14159
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14164
2023-03-04 13:11:15 -05:00
Wayne Stambaugh 4e99812145 Coverity fixes and code cleaning. 2023-03-04 13:02:05 -05:00
Jeff Young 915b352d9b Add UNITS_CHANGED handling to 3D preview controls.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156
2023-03-04 12:11:57 +00:00
Jeff Young d714ff8549 Don't commit changes on paint events or updateUI events.
Also use std::numeric_limits::epsilon for comparing doubles.

Fixes https://gitlab.com/kicad/code/kicad/issues/13851
2023-03-04 00:10:01 +00:00
Jeff Young d1b7fa6b0f Slight improvement to property grid col widths in SME. 2023-03-04 00:10:01 +00:00
Jeff Young b6d0b65261 Naming conventions and commenting. No functional changes. 2023-03-04 00:10:01 +00:00
Seth Hillbrand 48740dd3f8 Clean exposure of CONNECTION_SUBGRAPH
Removes internals from public consumption.
2023-03-03 14:07:17 -08:00
Jeff Young d545216432 Prefer Clamp() to std::min( std::max() ). 2023-03-03 21:29:37 +00:00
Jeff Young 2f2a00c307 Overflow safety.
Potential fix for some or all of
https://gitlab.com/kicad/code/kicad/-/issues/13969
2023-03-03 21:29:37 +00:00
Alex bfc3e2d29b Fix bitmap scaling when reading legacy schematic as well. 2023-03-04 00:11:09 +03:00
Seth Hillbrand 59fc62e898 Correct parent symbol for lib_text
The edited symbol should be pulled from the parent window when there is
not an existing text object
2023-03-03 12:39:07 -08:00
Jeff Young 14f1f3ec79 Convert inline models in Sim.Params fields to SPICE syntax.
Fixes https://gitlab.com/kicad/code/kicad/issues/14157
2023-03-03 18:18:03 +00:00
Jeff Young 2fb24347ad Use resolved fields when generating LIB_TREE info.
Fixes https://gitlab.com/kicad/code/kicad/issues/13737
2023-03-03 17:22:50 +00:00
Jeff Young be18413a90 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14073
2023-03-03 17:05:07 +00:00
Jeff Young 2973d292d9 Handle alternate pin definitions when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14122
2023-03-03 10:57:37 +00:00
Jeff Young 5849458476 The screen for undo is the screen that *owns* the SCH_SHEET...
... not the screen the SCH_SHEET owns.

Fixes https://gitlab.com/kicad/code/kicad/issues/14099
2023-03-03 00:23:06 +00:00
Seth Hillbrand f24deac017 Consider oblong holes with x/y equal size as drills
An oblong hole with drillsizex = drillsizey is the same as a circular
drill hit and should be converted to such in outputs (both excellon and
DRC)
2023-03-03 00:42:44 +01:00
Seth Hillbrand 597ef81e53 Allow micro/buried via holes to be considered
hole_to_hole clearance should account for all holes in the board.
Previously, we had excluded non through holes from this test but that
omits via holes that can still foul a future drill hit.

Designers wanting the old behavior can explicitly set the hole_to_hole
clearance to 0mm for specific ViaType pairs
2023-03-03 00:42:44 +01:00
Mario Luzeiro 7bc976f3f4 3D-Viewer: sort models and material models when rendering in transparent
Also enables transparency on model preview and small optimizations fixes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14005
2023-03-02 22:29:08 +00:00
aris-kimi 0f5ee38ee2 Corrosion table update 2023-03-02 22:25:48 +00:00
Seth Hillbrand 1fda68099f Prevent inf when presented with 0 errormax
acos(1) returns 0, so this implies infinite segements to get to 0 error.
This is not reasonable but might be encountered in bad arcs or circles
that have 0 radius.  Instead of returning infinite or std::max segments,
we limit the error to be at least 1 IU
2023-03-02 10:21:05 -08:00
Jeff Young f41f04b301 Hook up AddField handler to GRID_TRICKS for SCH dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/git/14153
2023-03-02 18:17:41 +00:00
Jeff Young 7638e23ff1 Add support for non-cardianlly-rotated text boxes.
Also fixes a couple of bugs in text boxes in flipped footprints.

Fixes https://gitlab.com/kicad/code/kicad/issues/14112
2023-03-02 14:57:48 +00:00
Wayne Stambaugh 789bf6455a Coverity fixes and code cleaning. 2023-03-02 09:04:47 -05:00
Jeff Young dcba555d44 Make SME prop-grid hack Mac-only.
Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-03-02 10:42:13 +00:00
Jeff Young 63a545ebfd We don't need "(gain)" or "(phase)" in names any more.
Fixes https://gitlab.com/kicad/code/kicad/issues/14140
2023-03-02 00:38:39 +00:00
Jeff Young 190ee58ccf Don't deliver pedantic error messages to user. 2023-03-02 00:38:39 +00:00
aris-kimi db2780090c Simulator: Fix RLGC c unit 2023-03-01 23:03:54 +00:00
Jon Evans 99dea1a9d7 Update {fmt} to 9.1.0 2023-03-01 17:53:27 -05:00
Jeff Young 9c68d4792f Fix bungle from earlier merge. 2023-03-01 13:43:46 +00:00
Jeff Young f5edcf82f2 Move only-write-model-if-it-contains-overrides up to base class.
It's necessary to keep us from writing out model lines for included
models and fall-backs of included models.
2023-03-01 13:31:57 +00:00
Seth Hillbrand a0f99ea8ba Allow for rounding error in connection width checker
We perform checks using squared distance but this loses the integer
rounding in the standard norm.  To correct for this, we allow a single
IU in the restriction, allowing fractionally smaller connection widths
before calculating the squared limit

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14131
2023-02-28 15:26:16 -08:00
aris-kimi 4a761179d0 Simulator: Fix some cases with initial conditions 2023-02-28 21:31:04 +00:00
Seth Hillbrand 3207d1386e Avoid forcing all units
When the enduser is not allowed to change the status of "common to all
units", then it should be disabled

Fixes https://gitlab.com/kicad/code/kicad/issues/14084
2023-02-28 13:25:32 -08:00
Seth Hillbrand daf70f9b6a Export footprint pad holes to STEP regardless
Footprint pad holes form a part of the board outline regardless of
whether the footprint is in the BOM or not

Fixes https://gitlab.com/kicad/code/kicad/issues/14013
2023-02-28 12:02:08 -08:00
Salvador E. Tropea a6b1a09edf Fix rounding errors in gerber files
The userToDeviceCoordinates helper returns a VECTOR2D
Converting it to VECTOR2I back and forth is a bug and generates rounding errors
Cherry picked from stable branch
2023-02-28 20:27:16 +01:00
Graham Keeth cc110399ea Fix column offset in BOM script
Debugged by @svk28

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14128
2023-02-28 19:10:56 +00:00
Jeff Young 7bb2cdd658 Better error reporting for constraints (and a bug fix for no constraints).
Fixes https://gitlab.com/kicad/code/kicad/issues/14070
2023-02-28 18:07:29 +00:00
Jeff Young 0ff8ba1d8c Stage group children when staging group.
Many operations such as move, rotate, etc. are applied directly to the
group's children, so it's the children that need staging.

Fixes https://gitlab.com/kicad/code/kicad/issues/13999
2023-02-28 16:51:23 +00:00
jean-pierre charras 7256a51e8e Fixes in build board outlines as polygon and convert_shape_list_to_polygon:
- Ensure Bezier curves have their polygon build before use it.
- When building board outlines as polygon the same chaining epsilon value
for DRC, export step and 3D view (default 0.01mm).
Fixes #14115
https://gitlab.com/kicad/code/kicad/issues/14115
Fixes #14009
https://gitlab.com/kicad/code/kicad/issues/14009
2023-02-28 16:45:03 +01:00
Jeff Young a1ceb585c7 Always highlight children when they're selected on their own.
Fixes https://gitlab.com/kicad/code/kicad/issues/13876
2023-02-28 13:39:07 +00:00
Jeff Young 281fde71b9 Make SIM_MODEL_SPICE_FALLBACK act more like the model it's a fallback for.
In particular, install/show the parameters, and keep the existing name
field.

Fixes https://gitlab.com/kicad/code/kicad/issues/14102
2023-02-28 12:26:04 +00:00
Johannes Pfister a87550a2c6 When importing legacy PCB dimension: Use automatic dimension when Unit couldn't be determined 2023-02-28 11:59:47 +00:00
Roberto Fernandez Bautista bb8a3a7fdc Add missing line from commit b03366c9e8 2023-02-28 00:12:50 +01:00
Roberto Fernandez Bautista b03366c9e8 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions
2023-02-27 23:57:39 +01:00
Jeff Young 766b1a1ca8 Continue rationalisation of vector, trace and signal names.
Also add a little bit more code so user-defined signals can be edited
without resetting their properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/14072
2023-02-27 21:11:31 +00:00
jean-pierre charras 4766175d60 EXPORTER_STEP: handle sub-layers in dielectric layer.
A dielectric layer (between 2 copper layers) can be made by more than one
layer (composite dielectric).  Not frequent, but possible.
sub-layers where previously ignored.
2023-02-27 16:11:58 +01:00
Mike Williams 45e67950fd Schematic: fix global labels overriding wrong power symbols
Need to check pin netname now that we support changing the value of the
power symbol.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14076
2023-02-27 09:25:05 -05:00
Fabien Corona 5b2784f418 sim - switches: open <-> closed in description 2023-02-27 09:54:14 +00:00
jean-pierre charras 8b47c94f6e PANEL_COLOR_SETTINGS: swap swatches and texts to avoid annoying truncation.
In some languages, the texts can be long, and create truncation of the left
column. So if the left column shows swatches they are truncated, or not visible
Truncating long texts is less annoying.
Fixes #14052
https://gitlab.com/kicad/code/kicad/issues/14052
2023-02-27 08:35:35 +01:00
Jeff Young 79f13ea9c7 Don't eval empty string.
Fixes https://gitlab.com/kicad/code/kicad/issues/13756
2023-02-26 23:14:09 +00:00
Marek Roszko 47cf26f047 Don't destroy the DIALOG_PCM_PROGRESS until after the threads actually terminated 2023-02-26 17:46:49 -05:00
Jeff Young fe9370ceea Don't allocate all of memory when the coord system turns inside out.
Fixes https://gitlab.com/kicad/code/kicad/issues/14088
2023-02-26 21:53:05 +00:00
Roberto Fernandez Bautista bcdb979128 CADSTAR SCH: Use screen grid instead of working grid when centering the design 2023-02-26 19:50:18 +01:00
Roberto Fernandez Bautista 698d0b7e92 CADSTAR Sch: Fix loading of graphical arc shapes
Correctly load arc shapes as real arcs instead of approximating now that
v7 supports graphical arcs in the schematic.

Also fix calculation of arc geometry for ccw arcs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14101
2023-02-26 19:46:34 +01:00
Jeff Young beb177fa79 Try and sort out the mess that is trace names and trace titles.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-26 18:08:42 +00:00
jean-pierre charras 51d46c0e73 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
2023-02-26 14:44:53 +01:00
Jeff Young 551773bf17 Save plot prefs (legend, grid, and dotted-secondary).
Fixes https://gitlab.com/kicad/code/kicad/issues/13940
2023-02-26 11:57:49 +00:00
qu1ck 733978dfd0 Fix swig mappings for PCB_BITMAP 2023-02-26 09:24:06 +00:00
jean-pierre charras 72cc2766ed kicad manager, OnOpenFileInTextEditor(): do not quote the filename.
It will be quoted later.
Fixes #14086
https://gitlab.com/kicad/code/kicad/issues/14086
2023-02-26 08:34:38 +01:00
Jeff Young c06cea2fe9 Fix units for ":power" operating points. 2023-02-25 23:30:01 +00:00
Jeff Young 23c1a23faf Provide power axis for DC-sweep analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14087
2023-02-25 23:11:29 +00:00
Jeff Young 8c8c5e1824 Provide a default xaxis for DC-sweep so we can add traces before sim is run. 2023-02-25 22:42:52 +00:00
Jeff Young 1fdc81e68d Make substrate and thermal junction nodes optional.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:30 +00:00
Jeff Young 2a79a453ec Get rid of m_sortedSymbolPinList in favour of a properly scoped variable.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:11 +00:00
Jeff Young 77ed53ab25 Nullptr safety. 2023-02-25 18:33:32 +00:00
jean-pierre charras bbfc5c272e Fix my commit d07738a06c.
( a DC->SetPen() was deleted by mistake)
2023-02-25 19:06:46 +01:00
jean-pierre charras 49a9fe38a0 Fix a compil warning 2023-02-25 19:06:46 +01:00
jean-pierre charras ece34e1a0c Plot Gerber format: ensure all attributes are added to polygon items.
Especially, TA.AperFunction,EtchedComponent for net tie footprints using polygons.
2023-02-25 19:06:46 +01:00
Jeff Young 4b427b2d0c Add second instance of "don't mess up user formatting" fix.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-25 16:31:16 +00:00
Jeff Young 2e5bf0210a Clear model name when switching to internal model.
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.

Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 15:22:20 +00:00
Jeff Young 9a0aeb4344 Adjust AC-small-signal plot names when saving placeholders.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-25 13:26:33 +00:00
mitxela 734d3667a8 Helper function to allow net.GetNetClassName() 2023-02-25 13:14:55 +00:00
mitxela 182abd4652 Expose shared_ptr to swig
Possibly not the right way to go about it but technically works
2023-02-25 13:14:55 +00:00
mitxela 716328e511 Fix python GetAllNetClasses 2023-02-25 13:14:55 +00:00
Jeff Young ee956673b1 Respect readOnly cells in GRID_TRICKS.
Also fixes setting colors in the signals grid as it allows us to make
it editable again.

Fixes https://gitlab.com/kicad/code/kicad/issues/14079
2023-02-25 11:02:12 +00:00
jean-pierre charras bb62c21abc python wizard: fix compatibility with current code 2023-02-25 11:06:01 +01:00
jean-pierre charras d3c5f25be6 Pcbnew: optimize netname and num text size and position display on pad.
Sizes where a bit too big. Fix also a difference between Cairo and OpenGL.
Fixes #13872
https://gitlab.com/kicad/code/kicad/issues/13872
2023-02-25 11:05:21 +01:00
Jon Evans 8440d7258b Do not invalidate board caches during DRC
Footprints now modify their parent container when destroyed due to
26542796, and a temporary footprint is created during DRC
in some situations.  This can lead to board caches being messed
with during DRC which can cause unpredictable bad effects due to
multithreading.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13844
2023-02-24 22:55:32 -05:00
Jon Evans 1215a967e2 Set copper edge clearance to a more reasonable default 2023-02-24 20:43:28 -05:00
Jon Evans b176881d49 Allow shorting copper zones through negative clearance
This brings the zone filler in line with other places where
we use negative clearance rules to disable constraints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14069
2023-02-24 20:36:39 -05:00
Seth Hillbrand bce402a01c Revert font spacing/tabs to the v6 model
While convoluted, this model matches as best we have found so far, the
alignment with scintilla.  The spacing is character size for N-1 of the
characters in the 4-space tab stops.  The final character is sized for
the actual space character in the stroke font (0.761905)

Fixes https://gitlab.com/kicad/code/kicad/issues/13791
2023-02-24 17:15:57 -08:00
JamesJCode 9dca70a773 Eeschema netlist output: Propagate NC across hierarchical schematics
Fixes #12580

Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.

Adds testing of pin types to netlist QA unit tests.
2023-02-25 00:02:46 +00:00
Jeff Young 65a10bd425 Remove unused member variable. 2023-02-24 22:43:23 +00:00
Jeff Young 2b96161d0e Log new undo record at the start of Change Symbols.
Also fixes a bug where the "screen" variable was used with stale
data.

Fixes https://gitlab.com/kicad/code/kicad/issues/14061
2023-02-24 22:41:46 +00:00
Jeff Young 5a12e5ee76 Only write included models if they have overridden parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13953
2023-02-24 20:31:35 +00:00
Alex b592017495 Reduce some flickering in PCM. 2023-02-24 20:06:39 +03:00
Jeff Young c188318174 Change strategy for committing values from SIM_MODEL propGrid.
Note that the PCB editor's propGrid doesn't seem to need this workaround,
but I haven't yet figured out what's different between it and the sim model
propGrid.

Fixes https://gitlab.com/kicad/code/kicad/issues/13852
2023-02-24 14:22:00 +00:00
Jeff Young 200a06a677 Cleanup some dead code, and add a potentially needed fix for non-Mac.
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)
2023-02-24 12:44:55 +00:00
Jeff Young 8059edff0e Don't mess up user formatting if eval'ing didn't actually change value.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-24 12:44:55 +00:00
Jeff Young 71df3f9edb Don't allow extra text in Sim.* fields.
(In particular, the field name.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13996
2023-02-24 12:44:55 +00:00
Jeff Young 150d2fd281 Tweak the Mac default selection highlight color for better visibility. 2023-02-24 12:44:55 +00:00
Jeff Young be54ab396e Move selection shadows to overlay.
This change doesn't appear to have any effect, but I think it's
correct.
2023-02-24 12:44:55 +00:00
Jeff Young ddf8d115c4 Handle de-highlighting items outside selection when selection changes.
Also adds selection cleared event to handled events.

And a small performance boost to not scan items for selection changes
when find is not seleciton-based.
2023-02-24 12:44:55 +00:00
Jeff Young d9a77e6a64 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008
2023-02-24 12:44:55 +00:00
Jeff Young 4bb508eacf Adjust stroke font baseline offset to better match 6.0.
Fixes https://gitlab.com/kicad/code/kicad/issues/13886
2023-02-24 12:44:55 +00:00
jean-pierre charras 4fb104b238 Plot footprint texts: add code to plot Knockout texts.
Fixes #14068
https://gitlab.com/kicad/code/kicad/issues/14068
2023-02-24 08:45:47 +01:00
Jon Evans 1651b44ab1 Fix some PCB_SHAPE properties
Hide irrelevant position/start/end properties
for shape classes that don't use them.
2023-02-23 20:23:44 -05:00
Ulices ed4a37266c Fix bad links on README file 2023-02-23 23:40:28 +00:00
Seth Hillbrand 81256c0fa4 Prevent mutex deadlock
The overbar function in outline fonts recursively calls the text
function which already owns the lock.  To avoid this, we have an
unlocked variant that is wrapped by the exposed text function

Fixes https://gitlab.com/kicad/code/kicad/issues/14015
2023-02-23 14:59:59 -08:00
Seth Hillbrand ffcc0e50b7 Handle excessively large values when hatching
While unusual, ensure that hatched zones don't break KiCad if they are
close to the integer limit

Fixes https://gitlab.com/kicad/code/kicad/issues/14066
2023-02-23 14:40:57 -08:00
Seth Hillbrand 1b8b216ac8 Bitmaps are not actually copper
We report bitmaps as being 'on' a copper layer because they are
associated with it but they are not actually physical parts so should
not be included in the DRC checks

Additionally, Bitmaps effective shape starts are the top left corner
rather than the center (unclear why that was there in the first place)

Fixes https://gitlab.com/kicad/code/kicad/issues/14065
2023-02-23 14:16:28 -08:00
Alex 9d96edc44f Print original netnames properly when reconnecting zones/vias.
Using GetNetname() after SetNet() isn't a good idea to get the original
name when updating PCB from Schematic.
2023-02-23 22:09:53 +03:00
Alex f31e5ea783 pcbnew: Fix pads losing nets after Undo.
Wasn't fixed in all places after being broken in
13f5c78e89
2023-02-23 22:06:39 +03:00
qu1ck f0dd32c3a7 Fix plugins in pcbnew breaking by opening fp editor 2023-02-23 14:20:03 +00:00
jean-pierre charras 2b3eb0b522 fix minor compil warnings 2023-02-23 09:50:28 +01:00
jean-pierre charras bc8a78c6df Eeschema plot: honor B&W plot option for bitmap images.
Fixes #14013
https://gitlab.com/kicad/code/kicad/issues/14013
2023-02-23 09:50:05 +01:00
Ian McInerney 6803976ab3 Add flags to let GCC/Clang auto initialize trivial variables
GCC 12 and Clang include a flag allowing initialization of trivial
variables with a known pattern or with 0. Enable zero init by default in
everything but debug mode, and pattern init for debug mode. Also provide
an option to completely disable this, giving unitialized variables.

ADDED: Add compile flag -ftrivial-auto-var-init to build
2023-02-23 01:39:59 +00:00
Marek Roszko c2a4dd93e8 Fix typo in appearance_controls.cpp 2023-02-22 20:35:36 -05:00
Jon Evans d8f4d04093 Disable auto-refill zones
We need a more advanced dirtying system for this to work out for
many users, it turns out.  Right now too many changes cause full
zone refills which interrupt workflow.
2023-02-22 20:13:55 -05:00
Seth Hillbrand af10878954 Use Chamfer lines when deflating
Rounded line ends when deflating leads to microscopic jags in the
outline that are not visible but add substantial computation time and
minor error when computing polygon offsets.

Instead, the chamfer deflate method prevents these jagged lines by
clipping angles < 90° by the error level.  This does not impact deflate
calls where we explicitly require the angles to be maintained
2023-02-22 16:24:26 -08:00
Seth Hillbrand 01039b50ca Correct the formula for error
The radius should always be positive but simply reversing the sign of
the inner expression only works in some cases
2023-02-22 16:24:26 -08:00
Seth Hillbrand da61d31f44 Remove superfluous Simplify() call 2023-02-22 16:24:26 -08:00
Jon Evans f076f6fb46 Preserve unknown keys in JSON_SETTINGS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13847
2023-02-22 19:00:47 -05:00
Jeff Young 4917abe655 Make sure whitespace at end of command doesn't mess up detection.
(Fixes the failing test case.)
2023-02-22 23:29:13 +00:00
aris-kimi 22bca5c2a0 Disable link maps by default and fix compile issue with lld linker
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.

Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.

xref: https://github.com/llvm/llvm-project/issues/60932

Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Stefan 04165b22d1 Altium Schematic Import: add note that blanket's are not yet supported 2023-02-22 23:10:40 +00:00
Fabien Corona cdbb868198 sim - allow users to delete several measurements at once 2023-02-22 19:27:20 +01:00
Fabien Corona 9006f38e70 sim - Don't allow user to delete the type-in measure entry 2023-02-22 19:27:20 +01:00
Fabien Corona 1170fb2e18 sim - don't create measurement duplicates 2023-02-22 19:27:20 +01:00
Fabien Corona aa006e9b91 sim - allow to add several measurements at once. 2023-02-22 19:27:20 +01:00
Mike Williams 959a19a461 Power Symbols: automatically fix mismatched legacy symbols, add tests
Has netlist generation test for legacy power symbols, and test for
fixing legacy mismatched power symbol text fields and invisible pin names.
2023-02-22 18:01:47 +00:00
Mike Williams 5995e0e516 Power Symbols: make value editable, use as netname
QA: update tests for editable power symbol values
2023-02-22 18:01:47 +00:00
Mike Williams ca5004b1d2 Power Symbols: rename IsPowerConnection to IsGlobalPower
It's kind of confusing because we have power type pins, and pins that
make global power nets as part of power symbols.
2023-02-22 18:01:47 +00:00
Mike Williams dd461d6ad6 Power Symbols: drop requirement for invisible pins 2023-02-22 18:01:47 +00:00
jean-pierre charras dce8826eb2 Fix incorrect tilt of italic texts when plotting them.
Fixes #14023
https://gitlab.com/kicad/code/kicad/issues/14023
2023-02-22 16:55:20 +01:00
Jeff Young 6fcae34f6b Clear operating points on all sim types.
(We'll fill them back in if we have data.)

Also improves handling when a plot tab is closed.

Also fixes dirtying of the view for op changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/13990
2023-02-22 15:54:18 +00:00
Jeff Young fe2679d965 Implement default levels for JFETs, MOSFETs and MESFETs. 2023-02-22 15:54:18 +00:00
Fabien Corona ae3a5c1c5f sim - set the dialog list as read only 2023-02-22 15:54:49 +01:00
Jon Evans 32d45f7e3f Fix typo 2023-02-22 09:43:26 -05:00
Jon Evans 43d3a18b86 Improve HiDPI handling of appearance/layer controls 2023-02-22 09:20:36 -05:00
Jon Evans 89ef6b36f4 Fix layer widget in HiDPI situations 2023-02-22 09:20:30 -05:00
Jon Evans 632f8c1df4 Fix macOS build 2023-02-22 09:19:30 -05:00
Salvador E. Tropea 915446a472 Create the built-in colors in the constructor
This is needed so Python scripts can get built-in colors using the
SETTINGS_MANAGER.GetColorSettings() member.
Otherwise calling it with a built-in name crashes.


(cherry picked from commit aee6d9d01c)
2023-02-22 12:52:44 +00:00
Fabien Corona f2419e9e9b sim - Fix power graphs 2023-02-22 13:18:12 +01:00
Jeff Young cb71ea872b Don't allow 0 field text size.
Fixes https://gitlab.com/kicad/code/kicad/issues/13987
2023-02-22 11:40:49 +00:00
Fabien Corona e24ddd0be4 ADDED: Measurement on power signals and integrals
Fixes #14028
2023-02-22 12:11:09 +01:00
Jeff Young f828d50cb0 Better processing of single-empty-row rule for measurements grid. 2023-02-22 10:45:27 +00:00
Jeff Young 5fa7be0320 Update signals after running a sim.
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-22 10:45:27 +00:00
Jeff Young ce25850ffd Fix include for non-OSX platforms. 2023-02-22 10:45:27 +00:00
Jeff Young a126d961d8 More dead code removal and a bit of formatting and const& for strings. 2023-02-22 10:45:27 +00:00
Jeff Young 68fe146861 Remove most of SIM_VALUE in favour of good old wxString.
This allows us to save the user's intent, including units, formatting,
and crucially variable references.
2023-02-22 10:45:27 +00:00
Jeff Young 29f21cdde6 Terminology and more dead code. 2023-02-22 10:45:27 +00:00
Jeff Young 90adc26b73 Remove dead and redundant code. 2023-02-22 10:45:27 +00:00
jean-pierre charras 814dcdab31 Fix compatibility with wxWidgetsversion < 3.1.6 2023-02-22 10:05:37 +01:00
Jon Evans ad838e3d73 Revert part of bcb93e9a that broke Windows 2023-02-21 22:45:54 -05:00
Chris Morgan 80b55f5980 Symbol editor: simpler creation of a new derived symbol
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13407
2023-02-22 01:49:46 +00:00
Ian McInerney c6e417c19c Fix missing override statements 2023-02-22 01:44:06 +00:00
Ian McInerney be19e967dc Remove WX_COMPATIBILITY flag
Some classes had been originally designed to be usable separate from wx,
but over time our uses of the classes have become entertwined with wx
features (e.g. colors), and various changes have also leaked wx into the
classes unguarded. So just remove the option to hide wx in those classes
to simplify the code.
2023-02-22 01:44:06 +00:00
Ian McInerney 301777f3c9 Cleanup condition for Linux-only CMake configs 2023-02-22 01:44:06 +00:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney 0ba116a3ee Remove unused functions from COLOR4D 2023-02-22 01:44:06 +00:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Marek Roszko 39e69a3d29 Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14011
2023-02-21 20:26:41 -05:00
Christoph Moench-Tegeder 46a59aa2c3 CMakeLists.txt: do not use -ffloat-store on clang
According to it's User Manual, clang does not know about -ffloat-store.
This is corrobated by the FreeBSD i386 build (using LLVM 13 and 15,
depending on the base system version) failing early with an error
message complaining about this parameter being unknown.

See
https://pkg-status.freebsd.org/beefy17/data/main-i386-default/pb27279cba1ca_sed03776ca7/logs/kicad-7.0.0,2.log
for an example of the failure, and
https://clang.llvm.org/docs/UsersManual.html#controlling-floating-point-behavior
for the available floating point options on clang.
2023-02-21 20:45:27 +01:00
jean-pierre charras d07738a06c gr_basic.cpp: ensure a pen with width = 0 is transparent.
Setting its color to COLOR4D::UNSPECIFIED (i.e. opacity = 0) is not enough
for all  platforms (i.e. Windows)
2023-02-21 20:06:54 +01:00
aris-kimi 543a3317b4 Fix typo 2023-02-21 18:01:13 +00:00
Jeff Young 761b59da90 Read and write user-defined signals and measurements to workbook file. 2023-02-21 13:32:01 +00:00
Jeff Young 7fd707952b Easier editing of new sim measurements. 2023-02-21 13:32:01 +00:00
Jeff Young 6fcb95b24e ADDED user-defined signals. 2023-02-21 13:32:01 +00:00
Jeff Young ae0cf19923 Nullptr safety. 2023-02-21 13:32:01 +00:00
Jeff Young 87eb4401e3 Add Scintilla support to WX_GRID. 2023-02-21 13:32:01 +00:00
Jeff Young f6fcae479c Don't generate error messages fetching sim data we know isn't there. 2023-02-21 13:32:01 +00:00
Jeff Young 7bb006c91d Spacing & font-size issues in 3D model preview dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/13880
2023-02-21 13:32:01 +00:00
jean-pierre charras e30e510354 gen drill map: fix duplicate suffix in map filenames if gbr drill fmt is selected
Fixes #14026
https://gitlab.com/kicad/code/kicad/issues/14026
2023-02-21 14:22:50 +01:00
Marek Roszko 6029fae30b Catch parsing exceptions of the local repository.json
Fixes KICAD-B9
2023-02-21 07:14:18 -05:00
jean-pierre charras b05b33a9ff Fix a compil issue with gcc12.2 and Coverity warnings. 2023-02-21 11:54:38 +01:00
Mark Roszko 365c7be4ed Fix symbol contributor link 2023-02-20 19:44:37 +00:00
Fabien Corona 3751b250c6 sim - fix a QA case for XSPICE 2023-02-20 19:40:59 +01:00
Fabien Corona 869447fedd sim - ngspice does not support .probe p(Adevice)
Fixes #13979
2023-02-20 19:30:45 +01:00
Fabien Corona 2a3b70b7eb sim - Remember the option to save powers
Fixes #13978
2023-02-20 19:30:45 +01:00
jean-pierre charras 31be74b8b3 Fix a few Coverity warnings 2023-02-20 09:25:01 +01:00
jean-pierre charras db66419f02 Teardrops: fix incorrect shape in some cases. 2023-02-20 09:06:21 +01:00
Marek Roszko 343e3aee55 Remove unused m_sockets 2023-02-19 23:49:43 -05:00
Marek Roszko 7d25b6de87 Fix crash deleting project tree items
Fixes sentry KICAD-C2
2023-02-19 10:09:04 -05:00
jean-pierre charras 3a11d90d92 Teardrops: handle arcs in tracks.
Fixes #13858
https://gitlab.com/kicad/code/kicad/issues/13858
2023-02-19 14:44:37 +01:00
Marek Roszko 30a49462fe Fix crash parsing cadstar
Fixes sentry KICAD-B2
2023-02-19 08:06:35 -05:00
Marek Roszko c5a2c9c773 Try to prevent a crash in mpFXY::Plot
Fixes sentry kicad-c0
2023-02-19 00:38:42 -05:00
Marek Roszko 9b708ce6d1 Fix copypasta typo in export pos
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13991
2023-02-19 00:24:05 -05:00
Marek Roszko d55e2049e5 Silence some warnings with static_casts 2023-02-18 23:36:50 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Mike Williams bc8f81b14d PCB Search Pane: show Board Setup / Net Classes on net activation 2023-02-18 15:41:26 -05:00
Wayne Stambaugh 12a5c2e037 Put advanced configuration Doxygen comments in their own group. 2023-02-18 12:49:42 -05:00
Marek Roszko 2d843a71d6 Add back <mutex> include since msvc differs here 2023-02-18 12:45:40 -05:00
Marek Roszko dffd2da8c8 Fix the shared_lock added and micro-opt the reindex 2023-02-18 11:28:19 -05:00
Fabien Corona facd50f4fd sim - missing assignment 2023-02-18 15:36:47 +00:00
Marek Roszko e053fbefd7 Use a shared_mutex to read/write lock the nickIndex
Fixes sentry kicad-ax
2023-02-18 10:17:58 -05:00
qu1ck c7bb6f5778 Treat dimensions in fp as text for bbox calculations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13976
2023-02-18 13:04:12 +00:00
jean-pierre charras 07f79208b9 Minor fixes: Coverity and compil minor warnings. 2023-02-18 13:04:43 +01:00
jean-pierre charras 2315111f29 French translation update 2023-02-18 13:04:43 +01:00
Fabien Corona 5482bc2905 sim - Check FindParam() results before using them 2023-02-18 12:54:55 +01:00
Fabien Corona f5902dad28 sim - don't write dc parameter twice 2023-02-18 10:07:29 +00:00
Fabien Corona fa0cc09917 sim - allow sources that are both AC and TRAN 2023-02-18 02:17:48 +00:00
Jon Evans cad607ae84 Hide parent property in footprint editor 2023-02-17 20:40:09 -05:00
Jon Evans f7d59f2e89 Enable properties panel in footprint editor 2023-02-17 20:35:56 -05:00
Jon Evans f12f2b8420 PNS: Diff pairs can have different hole-to-hole size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Jon Evans 459473ccc3 PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Fabien Corona 39a1b14a0f sim: VSIN - allow user to specify a phase
TD is not the same as PHASE.
TD is the delay before the source turns on.
PHASE is ... the phase

If only TD is set, the signal starts later, but the phase is still 0 when compared to the t=0 of the simulation.
2023-02-18 00:38:46 +00:00
Wayne Stambaugh 2dffaa4d04 Fix GCC compiler warnings. 2023-02-17 15:29:45 -05:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
Seth Hillbrand 5a56b18b0e Revert "Update Clipper2 to version 1.1.1"
This reverts commit c594a0eba2.
2023-02-17 09:24:19 -08:00
Seth Hillbrand c594a0eba2 Update Clipper2 to version 1.1.1 2023-02-17 17:14:37 +01:00
Mark Roszko 7b4abb1f7b FT_Face is also not thread, protect getTextAsGlyphs 2023-02-17 14:39:52 +00:00
Marek Roszko 65d5b34da3 freetype is not thread safe, zone filler can trigger multi-thread access
sentry KICAD-B1

https://freetype.org/freetype2/docs/reference/ft2-base_interface.html
[Since 2.5.6] In multi-threaded applications it is easiest to use one FT_Library object per thread.
In case this is too cumbersome, a single FT_Library object across threads is possible also, as long as a mutex lock is used around FT_New_Face and FT_Done_Face.
2023-02-17 07:26:52 -05:00
Jon Evans fc68b8d71a Make selected background layers translucent
We can't render them underneath other objects, but we can at least
make it possible to see other objects through them.
2023-02-16 22:45:29 -05:00
Alex bd4758e4df Keep image sizes when loading/saving 7.0- schematic file formats.
Previously, images were assumed to have 300 PPI density when loading from
schematic, but not after initial placement.
2023-02-17 03:53:44 +03:00
Alex ecb28ddf1c Prevent ghost image after canceling bitmap placement. 2023-02-17 03:53:44 +03:00
Jeff Young 8b1318c92f Update associated data structures after changing trace colour.
Also removes likely benign but never-the-less useless grid even processing
during rebuilding of the grids.

Fixes https://gitlab.com/kicad/code/kicad/issues/13956
2023-02-17 00:47:01 +00:00
Paweł Płóciennik 614755f24e Dialogs autocompletion with backspace support. 2023-02-16 23:28:27 +00:00
Seth Hillbrand 576bef4ba0 Fix Ukrainian language name
Should refer to the language not to a Ukrainian person
2023-02-16 15:10:47 -08:00
Jon Evans 053d20e13d Fix selection overlay being wiped when changing sheets 2023-02-16 17:14:08 -05:00
Seth Hillbrand 5c1b15f8e3 Make LIB_TREE_NODE sort irreflexive
std::sort requires explicit ordering of all elements.  It does not allow
for equality in its output
2023-02-16 13:00:18 -08:00
Ian McInerney 1355561d6c Update lemon to latest upstream sources
This is the lemon.c and lempar.c files from uptream as of Feb 16, 2023.
2023-02-16 18:30:46 +00:00
Jeff Young 5b0f1376c0 Simplify code now that we no longer drop out on first rule fired. 2023-02-16 17:55:33 +00:00
Jeff Young 978c2b074e Negative clearance means test will be ignored, not rule. 2023-02-16 17:39:47 +00:00
Jeff Young 407cdd63fb Translatable strings. 2023-02-16 17:28:06 +00:00
Jeff Young d5e50b70bb Display a generic "Value" column label when there are no cursors. 2023-02-16 16:55:26 +00:00
Jeff Young f50d114b27 Push gain & phase for .probe statements in AC analysis.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 16:14:25 +00:00
Jon Evans ec2fc161e1 Handle another case where schematic view was being cleared
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:25:18 -05:00
Jeff Young 5967ab9a4d Don't allow SCH_LABEL_LOCATE_ANY_T to steal SCH_LABEL_LOCATE_WIRE_T's items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13936
2023-02-16 13:21:00 +00:00
Jon Evans 955a5a13eb Symbol editor: stop removing overlay from view
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944
2023-02-16 08:17:12 -05:00
Jeff Young 95232edd0d Do a better job of looking for .probe commands in directives.
Fixes https://gitlab.com/kicad/code/kicad/issues/13941
2023-02-16 12:42:54 +00:00
Jeff Young d8a4f9821e Smarten regex to accept ':' in signal names.
(In fact, just accept anything up to the closing paren.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13942
2023-02-16 12:20:55 +00:00
jean-pierre charras 911e013850 Pcbnew: Do not change visibility objects when changing Visibility layers
Fixes #13836
https://gitlab.com/kicad/code/kicad/issues/13836
2023-02-16 12:39:15 +01:00
qu1ck 9f10c142c4 Sync pcbnew selection with selected items after plugin is run 2023-02-16 02:29:06 +00:00
Jon Evans 0f18a36f8f Fix handling of selection overlay in schematic editor
We weren't actually using the overlay group at all

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11142
2023-02-15 21:16:58 -05:00
Marek Roszko 041b7b196d update sentry-native to 0.6.0
primarily interested in windows bug fix to stack unwinding
2023-02-15 21:08:22 -05:00
Seth Hillbrand 8ae6f48cdf Update translations 2023-02-15 16:29:58 -08:00
ZbeeGin d0c2bbfef8 Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-02-15 21:10:43 +01:00
Toni Laiho 349dd1c162 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-02-15 21:10:43 +01:00
Wellington Terumi Uemura af28bd94ad Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-02-15 21:10:42 +01:00
wh201906 44166092bb Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2023-02-15 21:10:42 +01:00
ZbeeGin e1543252ec Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-02-15 21:10:42 +01:00
Henrik Kauhanen fd16046f0f Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-02-15 21:10:42 +01:00
Ulices a5546809da Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2023-02-15 21:10:42 +01:00
Wellington Terumi Uemura 24cfc65056 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2023-02-15 21:10:42 +01:00
Mustafa Selçuk ÇAVDAR 39e77fba1c Translated using Weblate (Turkish)
Currently translated at 38.6% (3097 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2023-02-15 21:10:42 +01:00
Henrik Kauhanen 269603aa93 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2023-02-15 21:10:42 +01:00
dsa-t 206ec5ceec Translated using Weblate (Russian)
Currently translated at 100.0% (8013 of 8013 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-02-15 21:10:42 +01:00
ZbeeGin 1fa51fe047 Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2023-02-15 21:10:41 +01:00
Tokita, Hiroshi a6637553a0 Translated using Weblate (Japanese)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2023-02-15 21:10:41 +01:00
Toni Laiho 41ee26055a Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2023-02-15 21:10:41 +01:00
Ettore Atalan 465f1daabc Translated using Weblate (German)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2023-02-15 21:10:41 +01:00
Ivan Chuba ce7a38d4b1 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2023-02-15 21:10:41 +01:00
dsa-t 97f6bb7e99 Translated using Weblate (Russian)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2023-02-15 21:10:41 +01:00
Seth Hillbrand 9d3f4bef6a DRC: Verify overlapping layers in physical clearance
When checking the physical clearance on a layer, it is critical to check
that the via hole exists on that layer.  Blind/buried and micro vias may
not overlap, so should be excluded from this check when they don't exist
on a particular layer

Similarly, we should only be reporting a single physical clearance error
for each item pair even though they may have multiple errors across
multiple layers in the case of via-via clearance
2023-02-15 11:35:24 -08:00
Seth Hillbrand a761b0e860 Force DNP X to foreground 2023-02-15 11:35:24 -08:00
jean-pierre charras 2032b8af59 Pcbnew: fix incorrect rotation of thermal spoke for rotated footprints.
If the footprint rotation is not a multiple of 90°, the thermal spokes
were not correctly rotated.
Fixes #13919
https://gitlab.com/kicad/code/kicad/issues/13919
2023-02-15 18:19:34 +01:00
Jeff Young c618bb7046 Correctly netlist a voltage source with both AC and DC values.
Fixes https://gitlab.com/kicad/code/kicad/issues/13912
2023-02-15 14:50:31 +00:00
Jeff Young 40e1296a8b Clear dirty flags after a move.
Fixes https://gitlab.com/kicad/code/kicad/issues/11362
2023-02-15 14:50:31 +00:00
Ian McInerney 9dc357486f Cleanup organization of build options
Organize the build options into various categories to make finding them
in the main file easier.

Other changes:
* Removed KICAD_NETLIST_QA
* Renamed BUILD_SMALL_DEBUG_FILES to KICAD_BUILD_SMALL_DEBUG_FILES
2023-02-15 13:48:41 +00:00
Ian McInerney e3858294d4 Fix option description for ASAN and TSAN options 2023-02-15 13:48:41 +00:00
jean-pierre charras 05b68413f7 Fix a QA test for bitmaps, to work with latest changes in bitmap code. 2023-02-15 14:37:01 +01:00
Marek Roszko c189053ee5 CURLINFO_SIZE_DOWNLOAD_T is a enum entry, use the version check instead 2023-02-14 23:44:46 -05:00
Marek Roszko 94b5ddbb50 CURLOPT_XFERINFOFUNCTION is an enum entry not a define, the check is invalid 2023-02-14 23:24:02 -05:00
Jon Evans e8a88411ea Set PPI properly in schematic bitmaps, too 2023-02-14 21:37:00 -05:00
Marek Roszko 5ccf205788 Try and avoid crashing on gl context creation failure in the 3d viewer
Sentry event id 0ad4afa6b86a4a03ad7f8fdbcdb72f86
2023-02-14 21:19:41 -05:00
Jon Evans 2d7c5c5c0f Router: Do not collide items within a net tie footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909
2023-02-14 21:08:36 -05:00
Jon Evans e5b376721d Properties: remove assertion that no longer makes sense 2023-02-14 21:08:36 -05:00
Marek Roszko c6540575b5 Fix step colors some more
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13611

I need to refactor the overall structure and know what to do, but ugh lazy
2023-02-14 19:44:20 -05:00
Jon Evans 473979d686 Fix handling of PPI when loading embedded images
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13884
2023-02-14 19:42:06 -05:00
Jeff Young 64f1808d60 Don't use the just-in-time model resolver when updating the dialog.
If it changes in the middle it will leave you in a world of hurt.

Also don't update the library after a loss-of-focus unless the path
really changed.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13854
2023-02-15 00:31:04 +00:00
Jon Evans 29c4482bc8 Symbol chooser: save UI settings even when canceled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13903
2023-02-14 18:26:29 -05:00
Jon Evans 0913552f84 Handle custom columns in symbol tree synchronizing adapter
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13907
2023-02-14 18:26:29 -05:00
aris-kimi dca1281263 Fix some typos 2023-02-14 23:47:05 +02:00
Seth Hillbrand 592859b889 Add Georgian 2023-02-14 12:27:26 -08:00
Mike Williams 18df4442bc Schematic: Find and Replace on Selection
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9293
2023-02-14 14:04:59 -05:00
Seth Hillbrand 9f8b25a0b0 Don't desaturate the selection shadow
Selection shadows are helpful when showing which elements are selected
and there is no benefit (and some downside) to having their color
removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/13878
2023-02-14 10:22:05 -08:00
Jeff Young 50eaba4211 Performance fix for switching pages. 2023-02-14 17:14:31 +00:00
Wayne Stambaugh eb83f76bff Allow plotting of multiple board layers per plot in Python.
Since the always plot the edge cuts layer  option was deprecate,
the ability to plot multiple board layers was exposed through the
PLOT_CONTROLLER object.

Added the interactive plot information which was overlooked during
version 7 development.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13841
2023-02-14 09:49:20 -05:00
Jeff Young 03484aedbc Workaround wxWidgets enforced min pen width by using transparent pen.
Also fixes some bugs in our shape printing code when a border is not
specified but a fill is.

Fixes https://gitlab.com/kicad/code/kicad/issues/13891
2023-02-14 14:44:04 +00:00
Ian McInerney 2b1040ae67 Fix compatibility with older wx versions
ToInt was only added in wx 3.1.6 apparently, so for now make them long
types. Fixes bug introduced in 8ce0a84ca7.
2023-02-14 13:48:47 +00:00
Mike Williams 76fb598ac2 Annotate: cleanup to use enum values instead of numbers 2023-02-14 08:21:43 -05:00
Mike Williams 4b07e3e413 Common Actions: Find Previous
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8968
2023-02-14 08:21:37 -05:00
Mike Williams 3e715c99c8 Swap: take S key now that it's available 2023-02-14 07:42:06 -05:00
Jeff Young 785f1acdb0 Archive .ibs files.
Also archives .pkg files that share a name with an archived .ibs file.

Fixes https://gitlab.com/kicad/code/kicad/issues/12102
2023-02-14 11:59:17 +00:00
Jeff Young 9ce18dffdd Better startup experience for simulator.
Pre-load signals list (and plot panel if there is an schText simulation
command).

Also fixes a bug where the workbook was getting dirtied on open because
the events would fire after the dirty flag had been cleared.
2023-02-14 11:59:17 +00:00
Marek Roszko df022acc11 Fix step model colors again
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13882
2023-02-13 22:21:20 -05:00
Marek Roszko e8e407dfba It's not impossible for the font face to fail loading
LoadFont()'s only usage already checked for nullptr to fallback, let's actually return nullptr on a failed load

Fixes sentry KICAD-8Z
Make the cause of sentry KICAD-95
2023-02-13 20:09:05 -05:00
Ian McInerney 1e8cc6855d Relax wxPython version mismatch check to major.minor
The previous version check failed when the version was even slightly
different, including on the revision field. Theoretically the ABI of the
wx minor versions in use should be the same, so this might work. On the
other hand, with wxPython it could break as well. YOLO.
2023-02-14 00:21:15 +00:00
Ian McInerney b536580119 Support subrelease field in wxWidgets cmake detection
Sometimes wxWidgets increments the subrelease to a non-zero value, and
since wxPython will report a subrelease, we must ensure we can get the
subrelease from the wx library properly, otherwise configure will fail
thinking the library isn't the same version as that used by wxPython.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13887
2023-02-14 00:21:15 +00:00
Marek Roszko 9647a22e50 Prevent another GAL crash on init due to psuedo-race
Fixes Sentry KICAD-98
2023-02-13 19:10:49 -05:00
Jeff Young eb7fec52d5 Add archiving of SPICE files.
Fixes https://gitlab.com/kicad/code/kicad/issues/12102
2023-02-13 22:46:07 +00:00
Seth Hillbrand e7fe69b97f Better handling of vertex sorting
Nominally, the zcode of a vertex is unique.  This is not 100% true,
however, as we must interlace two 32-bit numbers into a single 32-bit
number.  Sorting needs to account for the possibility that the zcode
will be the same while other elements of the vertex are different.  This
commit fixes the broken boolean logic to more clearly handle these cases

Fixes https://gitlab.com/kicad/code/kicad/issues/13867
2023-02-13 11:21:04 -08:00
Jeff Young be0a9e2738 Handle SPICE prefixes for operating point data.
Also adjusts the min-pin lenght as some symbols have very short pins.
2023-02-13 18:38:43 +00:00
Jeff Young b53e0a85b8 Don't display OP overlay when we have no data.
Also fixes a copy-pasta bug with settings (and adds a fixup for those
already bitten by it).

Fixes https://gitlab.com/kicad/code/kicad/issues/13881
2023-02-13 18:08:53 +00:00
Jeff Young 8bab429c7d Account for border when calculating text margin for text boxes.
Also fixes some unnoticed issues with the textbox dialogs (probably
dating from the move to wxWidgets 3.2).

Fixes https://gitlab.com/kicad/code/kicad/issues/13877
2023-02-13 17:08:29 +00:00
Mike Williams 71b687622b PCB Search Pane: activate item opens properties dialog
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12475
2023-02-13 10:57:05 -05:00
Mike Williams d915cb780e Search Pane: add Activation (enter/double click) event support 2023-02-13 10:57:05 -05:00
Jeff Young d6bef19811 Don't confuse .OP with .OPTIONS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13849
2023-02-13 13:33:26 +00:00
Jeff Young e6d45e27e8 Fix layout issue in IBIS fields. 2023-02-13 12:43:32 +00:00
Jeff Young df00585a55 ReadDataFields must be a separate step from Create.
Create() is done without execption processing, while ReadDataFields
should have exception processing.

(This also fixes a case where exception processing on ReadDataFields
was missing.)

Also fixes a bug where the pinSelect menu wasn't checked for -1 before
fetching.

Fixes https://gitlab.com/kicad/code/kicad/issues/13856
2023-02-13 12:43:25 +00:00
Marek Roszko 58350b4521 Ensure gal is initialized before letting DoRepaint blowup spectacularly.
Maybe a fix for KICAD-6B
2023-02-13 07:18:07 -05:00
Jeff Young 77421c8fb6 Fix too-narrow text edit control on Mac.
Also makes the yellow error highlight in CvPCB a bit less jarring.

Fixes https://gitlab.com/kicad/code/kicad/issues/13866
2023-02-13 10:47:39 +00:00
jean-pierre charras 17059971e8 DIALOG_UNUSED_PAD_LAYERS: do not use TransferDataFromWindow for any button.
TransferDataFromWindow is called only when closing by a wxID_OK button
Fixes #13865
https://gitlab.com/kicad/code/kicad/issues/13865
2023-02-13 10:26:46 +01:00
Marek Roszko 2cc3d8e9bc Prevent a crash when a spice SW_I lacks two pin net names
Fixes KICAD-5D
2023-02-12 22:26:19 -05:00
Jeff Young 74eb587291 Better sorting within sections (voltage, current, power).
Fixes https://gitlab.com/kicad/code/kicad/issues/13846
2023-02-12 23:16:45 +00:00
Jeff Young 499b58f505 ADDED: user-specified gap and linewidth for bounding hull creation. 2023-02-12 23:16:45 +00:00
Marek Roszko f409837d26 Fix a stray ternary hidden under #if 2023-02-12 16:46:34 -05:00
Jeff Young 837ba323fb Add doc link to custom rules syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/13727
2023-02-12 21:34:35 +00:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Graham Keeth 6af3dadaee Fix SPICE pins for BJTs and MESFETs
- MESFETs don't have a substrate/bulk pin
- BJTs have a substrate pin, and HICUM/VBIC have TJ

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13848
2023-02-12 21:20:02 +00:00
Jeff Young a22964a977 Prepend correct SPICE prefix when necessary for plotting currents.
Fixes https://gitlab.com/kicad/code/kicad/issues/13850
2023-02-12 21:17:45 +00:00
Marek Roszko 28da03422e Move up vcpkg baseline and kicad-vcpkg repo to get wx 3.2.2 2023-02-12 15:58:07 -05:00
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 78746b77c6 Save trace colors and cursor value formatting in sim workbook. 2023-02-12 20:40:23 +00:00
Jeff Young 84c72b087c Simplify (and fix) logic for starting new simulations.
Fixes https://gitlab.com/kicad/code/kicad/issues/13853
2023-02-12 20:40:23 +00:00
jean-pierre charras 1fb2d138b4 Fix a compil issue. 2023-02-12 09:16:42 +01:00
Jeff Young 5c45b53f88 Rollback testing changes that were accidentally checked in. 2023-02-11 21:11:07 +00:00
Jeff Young 9d3a3d705d ADDED simulation measurements. 2023-02-11 21:11:07 +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 bc108023b3 ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
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 b3ffbd6258 Don't include unconnected nets in signals list.
Fixes https://gitlab.com/kicad/code/kicad/issues/4961
2023-02-11 21:11:07 +00:00
Jeff Young 7e6c68b1d1 Remove (probably) redundant code. 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 9a99106981 Cleanup. 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 e73366db5c Add 3D viewer to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/13559
2023-02-11 21:11:07 +00:00
Jeff Young 8b4c4b8500 Board-specific hint for board version of Net Settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/13630
2023-02-11 21:11:07 +00:00
Jeff Young aab237852b Flatten Reannotation dialog. 2023-02-11 21:11:07 +00:00
Jeff Young 0dcc34ddc8 Simplify Remove Unused Pads dialog. 2023-02-11 21:11:07 +00:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Jeff Young 95fb3825bd Fix some strings from V7's string freeze. 2023-02-11 21:11:07 +00:00
Jeff Young 6bc89ee180 Don't disable run when there's no command: just ask for a command. 2023-02-11 21:11:07 +00:00
Jeff Young 7d7a48070e Separate error messages when sim model and project paths are the same. 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 02e14b45ee Better predictability and error reporting for running external SPICE. 2023-02-11 21:11:07 +00:00
Jeff Young 946e0a4b98 ADDED support for e-series based tuning. 2023-02-11 21:11:07 +00:00
Jon Evans 61dd4b7043 Properties: fix rebuilding when availability changes 2023-02-11 15:50:51 -05:00
Jon Evans 0b3928d38f Properties: add some validators for PAD 2023-02-11 15:50:51 -05:00
Jeff Young 13391176ae Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802
2023-02-11 20:43:00 +00:00
Jeff Young 7bc79c17d4 Make sure screen RTrees are updated when changing bounding boxes. 2023-02-11 20:43:00 +00:00
Jeff Young 9ce5978c3d Bug fixes for LIB_PIN boundbox generation. 2023-02-11 20:43:00 +00:00
Jeff Young 2e9ed67e05 Don't dirty connectivity when moving non-reference SCH_FIELD. 2023-02-11 20:43:00 +00:00
Marek Roszko 189ce373bb Remove default hotkeys for grid set/reset.
This is a waste of hotkeys for what should be seldom used activities.
If a user needs hotkeys for this, they can bind them manually
2023-02-11 13:20:53 -05:00
Marek Roszko 4d6e06d349 Add grid reset to place menubar. 2023-02-11 13:20:35 -05:00
jean-pierre charras 54b4f0e673 Gerbview: Aperture Macro: handle overwriting of variables
Gerbview did not handle redefinition of variable like $3 = $3 / 2
This redefinition is sometimes found in Gerber files.
This is a long standing issue now fixed.
Fixes #7222
https://gitlab.com/kicad/code/kicad/issues/7222
2023-02-11 18:22:29 +01:00
Jon Evans eb240fda9a Properties: introduce validators; re-enable zone hatch settings 2023-02-11 11:44:58 -05:00
Jon Evans 254168c788 Properties: introduce method chaining for initialization 2023-02-11 11:44:58 -05:00
Jon Evans 12a9ed0208 Add initial sections to bare template 2023-02-11 11:44:37 -05:00
Jon Evans 609ef96e42 Attempt to fix GitLab template duplication 2023-02-11 11:41:12 -05:00
Wayne Stambaugh 76e224e0af Begin version 8 development. 2023-02-11 11:03:39 -05:00
8776 changed files with 7628392 additions and 1606612 deletions
+4
View File
@@ -30,3 +30,7 @@ bitmaps_png/cpp_*/*.cpp generated
# Lemon grammars
common/libeval/grammar.c generated
common/libeval/grammar.h generated
# Scripts
*.sh text eol=lf
*.bat text eol=crlf
+2 -2
View File
@@ -1,2 +1,2 @@
community_bridge: kicad
custom: "https://donate.cernandsocietyfoundation.cern/b/my-donation?cid=4&_cv=1"
custom: "https://donate.kicad.org"
community_bridge: kicad
+5 -3
View File
@@ -1,8 +1,8 @@
.downloads-by-cmake
.gdb_history
boost_root
/Build
/build
/Build*
/build*
/cmake-build-*
common/fp_lib_table_keywords.cpp
common/drc_rules_keywords.cpp
@@ -27,11 +27,11 @@ eeschema/schematic_keywords.*
pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h
Makefile
CMakeUserPresets.json
CMakeCache.txt
.cache/
auto_renamed_to_cpp
Testing
version.h
config.h
install_manifest.txt
doxygen/out
@@ -52,6 +52,7 @@ bitmaps_png/tmp
common/pcb_keywords.cpp
include/pcb_lexer.h
fp-info-cache
qa/tests/output/**
# demo project auxiliary files
demos/**/*-bak
@@ -102,6 +103,7 @@ __pycache__
.editorconfig
CMakeSettings.json
.vscode/
/vcpkg_installed
# Sublime Text
*.sublime-*
+2 -28
View File
@@ -8,39 +8,13 @@ default:
name: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:36
entrypoint: ["/bin/sh", "-c"]
##########################################################################
# Test the formatting in a merge request using clang-format
##########################################################################
# The variable CI_COMMIT_BEFORE_SHA is not available in normal merge requests
# so we must build the commit hash ourselves, see:
# https://gitlab.com/gitlab-org/gitlab/issues/12850
test_formatting:
stage: test
needs: []
only:
- merge_requests
allow_failure: true
before_script:
# We must manually add the KiCad remote to ensure it is named sensibly
- git remote add product https://gitlab.com/kicad/code/kicad.git
- git remote add source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git
- git fetch -n product
- git fetch -n source
# Get the SHAs of the commits
- "TARGET_HEAD_SHA=$(git rev-parse product/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME})"
- "SOURCE_HEAD_SHA=$(git rev-parse source/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME})"
- "MERGE_BASE_SHA=$(git merge-base ${TARGET_HEAD_SHA} ${SOURCE_HEAD_SHA})"
script:
- echo "Testing formatting from commit ${MERGE_BASE_SHA}"
- ./tools/check_coding.sh --diff --ci --commit ${MERGE_BASE_SHA}
include:
- local: '/.gitlab/templates.yml'
- local: '/.gitlab/Fedora-Linux-CI.yml'
- local: '/.gitlab/Ubuntu-20.04-CI.yml'
- local: '/.gitlab/Windows-CI.yml'
- local: '/.gitlab/macOS-CI.yml'
- local: '/.gitlab/coverity.yml'
- local: '/.gitlab/linux-metadata-validate.yml'
- local: '/.gitlab/doxygen.yml'
- local: '/.gitlab/mr_formatting.yml'
+12 -4
View File
@@ -6,7 +6,7 @@
# Don't tag until we have separate CI for MRs
# tags:
# - kicad-fedora
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:37
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
extends: .only_code
interruptible: false
cache:
@@ -25,8 +25,9 @@
-G Ninja
-DCMAKE_BUILD_TYPE=QABUILD
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
-DKICAD_TEST_XML_OUTPUT=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
../../
- ninja 2>&1 | tee compilation_log.txt
- cd ../../
@@ -38,6 +39,10 @@
when: always
paths:
- build/linux/3d-viewer/
- build/linux/common/libkicommon.so*
- build/linux/common/gal/libkigal.so*
- build/linux/eeschema/_eeschema.kiface
- build/linux/kicad/kicad-cli
- build/linux/pcbnew/pcbnew.py
- build/linux/pcbnew/_pcbnew.kiface
- build/linux/pcbnew/_pcbnew.so
@@ -135,14 +140,17 @@ fedora_report_metrics_public:
# Run the code unit tests.
##########################################################################
.fedora_qa:
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:37
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
extends:
- .unit_test
- .only_code
before_script:
- if [ "$TEST" == "cli" ] || [ "$TEST" == "python" ]; then python3 -m pip install -r qa/tests/requirements.txt; fi
- if [ "$TEST" == "cli" ]; then sudo dnf -y install gerbv; fi
parallel:
matrix:
# The name of the test without the qa_ prefix
- TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step]
- TEST: [python, cli, common, gerbview, pcbnew, pns_regressions, eeschema, kimath, sexpr, kicad2step, spice]
fedora_qa_kicad:
extends: .fedora_qa
+1 -2
View File
@@ -32,7 +32,6 @@
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
../../
@@ -116,4 +115,4 @@
parallel:
matrix:
# The name of the test without the qa_ prefix
- TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step]
- TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step, spice]
+7 -5
View File
@@ -5,19 +5,22 @@ win64_build:
stage: build
tags:
- kicad-windows-1809
extends: .only_code
interruptible: false
image: registry.gitlab.com/kicad/kicad-ci/windows-build-image/win1809-msvc:latest
variables:
VCPKG_BINARY_SOURCES: 'nuget,kicad,readwrite'
# Switch the compressor to fastzip and reduce the compression level
FF_USE_FASTZIP: "true"
CACHE_COMPRESSION_LEVEL: "fast"
cache:
key: win64-vcpkg-"$CI_COMMIT_REF_SLUG"
paths:
- build\windows\vcpkg_installed
- .vcpkgCache
only:
- branches@kicad/code/kicad
- tags@kicad/code/kicad
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PROJECT_ROOT_NAMESPACE == "kicad" && $CI_COMMIT_REF_PROTECTED == "true"
script:
- C:\builder\build.ps1 -Env -Arch x64
- $vcpkgCache=Join-Path -Path (Get-Location) -ChildPath ".vcpkgCache";$env:VCPKG_DEFAULT_BINARY_CACHE=$vcpkgCache;New-Item -ItemType Directory -Force -Path $vcpkgCache
@@ -31,7 +34,6 @@ win64_build:
-DCMAKE_BUILD_TYPE=Debug `
-DKICAD_SCRIPTING_WXPYTHON=OFF `
-DKICAD_USE_OCC=ON `
-DKICAD_SPICE=ON `
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON `
-DKICAD_USE_3DCONNEXION=ON `
../../
+17 -12
View File
@@ -22,13 +22,16 @@
# These results will be saved for 1 day if the build fails.
.coverity_submit: &coverity_submit |
echo "Creating tar file of scan results"
tar cfz cov-int.tar.gz cov-int
export COV_INT_FILENAME=cov-int-$(date +"%Y%m%d%H%M").tar.gz
tar cfz $COV_INT_FILENAME cov-int
echo "Submitting scan results"
s5cmd/s5cmd cp $COV_INT_FILENAME s3://$KICAD_CI_R2_BUCKET/coverity/
export FILE_URL="$KICAD_CI_R2_PUBLIC_BASE/coverity/$COV_INT_FILENAME"
export KICAD_VERSION=$(sed 's/[()]//g' kicad_build_version.txt)
curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME \
--form token=$COVERITY_SCAN_TOKEN \
--form email=$GITLAB_USER_EMAIL \
--form file=@cov-int.tar.gz \
--form url="$FILE_URL" \
--form version="$KICAD_VERSION" \
--form description="$KICAD_VERSION / $CI_COMMIT_TITLE" 2>&1 \
| tee curl-response.txt
@@ -39,12 +42,9 @@ Coverity:
tags:
- coverity
stage: build
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:37
only:
refs:
- schedules
variables:
- $SCHEDULED_JOB_NAME == "coverity"
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "coverity"
cache:
key: coverity
paths:
@@ -53,18 +53,23 @@ Coverity:
- export COVERITY_SCAN_PROJECT_NAME="kicad"
- test "$(git rev-parse --is-shallow-repository)" = "false" || (git fetch --unshallow)
- git fetch origin
- curl -LO https://github.com/peak/s5cmd/releases/download/v2.0.0/s5cmd_2.0.0_Linux-64bit.tar.gz
- mkdir s5cmd
- tar -xvf ./s5cmd_2.0.0_Linux-64bit.tar.gz -C s5cmd
- export AWS_ACCESS_KEY_ID=$KICAD_CI_R2_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$KICAD_CI_R2_ACCESS_KEY
- export S3_ENDPOINT_URL=$KICAD_CI_R2_ENDPOINT
script:
- *coverity_cache_prep
- cmake
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SPICE=ON
- coverity/bin/cov-build --dir cov-int make -j8
- coverity/bin/cov-build --dir cov-int make -j10
- *coverity_submit
artifacts:
expire_in: 1 year
expose_as: 'Coverity log'
name: "coverity_log.txt"
paths:
- cov-int/build-log.txt
- cov-int/build-log.txt
+4 -7
View File
@@ -3,16 +3,13 @@ build_doxygen_docker:
services:
- docker:dind
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
tags:
- docker
- gitlab-org-docker
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
script:
- docker build -t "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH" -f ./doxygen/doxygen.Dockerfile .
- docker push "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH"
only:
refs:
- schedules
variables:
- $SCHEDULED_JOB_NAME == "doxygen"
+20
View File
@@ -0,0 +1,20 @@
<!-- --------Before Creating a New Issue-----------
* Limit report to a single issue.
* Search the issue tracker to verify the issue has not already been reported.
* Complete all instructions between `template comment markers <>.
* Keep report contents limited to the necessary information required to fix the issue.
* When creating an issue against the stable version of KiCad, make sure the latest available stable version is installed as issues may have already been resolved in later stable versions. -->
# Description
<!-- What is the current behavior and what is the expected behavior? -->
<!-- If the issue is visual/graphical, please attach screenshots of the problem. -->
<!-- Add the issue details below this line and before the "Steps to reproduce" heading. -->
# Steps to reproduce
<!-- If there are multiple steps to reproduce it or it is a visual issue, then providing a screen recording as an attachment to this report is recommended. -->
<!-- If this issue is specific to a project, please attach the necessary files to this issue. -->
<!-- Add the steps to reproduce using the numbers below -->
<!-- Add new step numbers before the "KiCad Version" heading. -->
1.
# KiCad Version
+9 -15
View File
@@ -6,23 +6,18 @@ validate_linux_metadata:
needs: []
interruptible: false
# This is the only CI image with the utilities needed for this test
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:37
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:38
# Due to bug https://github.com/hughsie/appstream-glib/issues/381, this doesn't think our description tag
# is localized even though it actually is.
allow_failure: true
only:
refs:
- master
- branches
- merge_requests
- pushes
changes:
# Only run if the resources, its tests, or the translations are updated
- resources/linux/**/*
- qa/resources/linux/**/*
- translation/**/*
except:
- schedules
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- resources/linux/**/*
- qa/resources/linux/**/*
- translation/**/*
# Only build the metadata files in this CI job
script:
- mkdir -p build/linux
@@ -31,7 +26,6 @@ validate_linux_metadata:
-DCMAKE_BUILD_TYPE=Debug
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
../../
- make metadata
+29
View File
@@ -0,0 +1,29 @@
##########################################################################
# Build KiCad on Windows and save the results
##########################################################################
macos_build:
stage: build
tags:
- kicad-macos
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PROJECT_ROOT_NAMESPACE == "kicad" && $CI_COMMIT_REF_PROTECTED == "true"
script:
- mkdir -p build/macos
- cd build/macos
- cmake
-G Ninja
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
artifacts:
# Only save the artifacts that are needed for running the tests in the next stage
# and the compilation log. The entire build directory is too large to save as an
# artifact.
expire_in: 2 hrs
when: always
paths:
- build/macos/compilation_log.txt
+27
View File
@@ -0,0 +1,27 @@
##########################################################################
# Test the formatting in a merge request using clang-format
##########################################################################
# The variable CI_COMMIT_BEFORE_SHA is not available in normal merge requests
# so we must build the commit hash ourselves, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/12850
test_formatting:
stage: test
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
allow_failure: true
before_script:
# We must manually add the KiCad remote to ensure it is named sensibly
- git remote add product https://gitlab.com/kicad/code/kicad.git ||
git remote set-url product https://gitlab.com/kicad/code/kicad.git
- git remote add source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git ||
git remote set-url source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git
- git fetch -n product
- git fetch -n source
# Get the SHAs of the commits
- "TARGET_HEAD_SHA=$(git rev-parse product/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME})"
- "SOURCE_HEAD_SHA=$(git rev-parse source/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME})"
- "MERGE_BASE_SHA=$(git merge-base ${TARGET_HEAD_SHA} ${SOURCE_HEAD_SHA})"
script:
- echo "Testing formatting from commit ${MERGE_BASE_SHA}"
- ./tools/check_coding.sh --diff --ci --commit ${MERGE_BASE_SHA}
+10 -10
View File
@@ -17,21 +17,21 @@
.unit_test:
stage: test
when: on_success
# We define this using a before script because GitLab cannot merge variable
# definitions across inheritance (so the variables block from this would disappear)
before_script:
- export BOOST_TEST_LOGGER='JUNIT,all,test_results.${TEST}.xml:HRF,warning'
- export CTEST_OUTPUT_ON_FAILURE=1
variables:
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,warning'
CTEST_OUTPUT_ON_FAILURE: 1
script:
- cd build/linux/qa
- ctest -R qa_${TEST}
# GitLab supports displaying the results in the GUI through JUNIT artifacts
# (https://docs.gitlab.com/ee/ci/junit_test_reports.html)
# so we upload the JUNIT results. Note that there is a bug with how paths
# are processed in the junit report (https://gitlab.com/gitlab-org/gitlab/issues/23835)
# so we can't use a glob and have to list out each hierarchy separately.
# so we upload the JUNIT results.
artifacts:
when: always
paths:
- build/linux/qa/**/*.log
- build/linux/qa/**/output/*
- build/linux/qa/**/*.xml
reports:
junit:
- build/linux/qa/*/*.xml
- build/linux/qa/*/*/*.xml
- build/linux/qa/**/*.xml
+8 -62
View File
@@ -61,7 +61,6 @@
#define MASK_3D_CACHE "3D_CACHE"
static std::mutex mutex3D_cache;
static std::mutex mutex3D_cacheManager;
static bool isSHA1Same( const unsigned char* shaA, const unsigned char* shaB ) noexcept
@@ -382,7 +381,13 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
fclose( fp );
unsigned int digest[5];
dblock.get_digest( digest );
// V8 only
// Boost 1.86 and later changed digest_type from uchar[20] from int[5]
// But KiCad 8.99 and later use MurmurHash3 here, so just do a fairly ugly cast to keep
// this going for another few months.
static_assert( sizeof( digest ) == sizeof( boost::uuids::detail::sha1::digest_type& ),
"SHA1 digest size mismatch" );
dblock.get_digest( reinterpret_cast<boost::uuids::detail::sha1::digest_type&>( digest ) );
// ensure MSB order
for( int i = 0; i < 5; ++i )
@@ -697,63 +702,4 @@ void S3D_CACHE::CleanCacheDir( int aNumDaysOld )
}
}
}
}
void PROJECT::Cleanup3DCache()
{
std::lock_guard<std::mutex> lock( mutex3D_cacheManager );
// Get the existing cache from the project
S3D_CACHE* cache = dynamic_cast<S3D_CACHE*>( GetElem( ELEM_3DCACHE ) );
if( cache )
{
// We'll delete ".3dc" cache files older than this many days
int clearCacheInterval = 0;
if( Pgm().GetCommonSettings() )
clearCacheInterval = Pgm().GetCommonSettings()->m_System.clear_3d_cache_interval;
// An interval of zero means the user doesn't want to ever clear the cache
if( clearCacheInterval > 0 )
cache->CleanCacheDir( clearCacheInterval );
}
}
S3D_CACHE* PROJECT::Get3DCacheManager( bool aUpdateProjDir )
{
std::lock_guard<std::mutex> lock( mutex3D_cacheManager );
// Get the existing cache from the project
S3D_CACHE* cache = dynamic_cast<S3D_CACHE*>( GetElem( ELEM_3DCACHE ) );
if( !cache )
{
// Create a cache if there is not one already
cache = new S3D_CACHE();
wxFileName cfgpath;
cfgpath.AssignDir( SETTINGS_MANAGER::GetUserSettingsPath() );
cfgpath.AppendDir( wxT( "3d" ) );
cache->SetProgramBase( &Pgm() );
cache->Set3DConfigDir( cfgpath.GetFullPath() );
SetElem( ELEM_3DCACHE, cache );
aUpdateProjDir = true;
}
if( aUpdateProjDir )
cache->SetProject( this );
return cache;
}
FILENAME_RESOLVER* PROJECT::Get3DFilenameResolver()
{
return Get3DCacheManager()->GetResolver();
}
}
+11 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -294,6 +294,16 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
++bl;
}
// prevent loading non-plugin dlls
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
if( !path.GetName().StartsWith( "s3d_plugin" )
&& !path.GetName().StartsWith( "libs3d_plugin" ) )
{
return;
}
}
aPluginList.push_back( wxpath );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] found 3D plugin '%s'\n" ), wxpath.GetData() );
+2 -2
View File
@@ -91,7 +91,7 @@ endif()
unset( S3DSG_VERSION_FILE CACHE )
# Define a flag to expose the appropriate EXPORT macro at build time
target_compile_definitions( kicad_3dsg PRIVATE -DCOMPILE_SGLIB )
target_compile_definitions( kicad_3dsg PRIVATE COMPILE_SGLIB )
target_link_libraries( kicad_3dsg ${wxWidgets_LIBRARIES} )
@@ -108,4 +108,4 @@ install( TARGETS
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:kicad_3dsg> DESTINATION ${KICAD_BIN})
endif()
endif()
+357 -128
View File
@@ -1,8 +1,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2022 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2023 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -22,7 +23,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "../3d_rendering/camera.h"
#include <gal/3d/camera.h>
#include "board_adapter.h"
#include <board_design_settings.h>
#include <board_stackup_manager/board_stackup.h>
@@ -36,6 +37,7 @@
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <wx/log.h>
#include <pcbnew_settings.h>
#include <advanced_config.h>
@@ -48,7 +50,7 @@
#define SOLDERPASTE_LAYER_THICKNESS pcbIUScale.mmToIU( 0.04 )
CUSTOM_COLORS_LIST BOARD_ADAPTER::g_SilkscreenColors;
CUSTOM_COLORS_LIST BOARD_ADAPTER::g_SilkColors;
CUSTOM_COLORS_LIST BOARD_ADAPTER::g_MaskColors;
CUSTOM_COLORS_LIST BOARD_ADAPTER::g_PasteColors;
CUSTOM_COLORS_LIST BOARD_ADAPTER::g_FinishColors;
@@ -61,6 +63,8 @@ KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSolderMask;
KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSolderPaste;
KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultSurfaceFinish;
KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultBoardBody;
KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultComments;
KIGFX::COLOR4D BOARD_ADAPTER::g_DefaultECOs;
// To be used in Raytracing render to create bevels on layer items
float g_BevelThickness3DU = 0.0f;
@@ -85,15 +89,13 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_IsPreviewer( false ),
m_board( nullptr ),
m_3dModelManager( nullptr ),
m_renderSettings( nullptr ),
m_colors( nullptr ),
m_layerZcoordTop(),
m_layerZcoordBottom()
{
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::BOARD_ADAPTER" ) );
if( PgmOrNull() )
m_colors = Pgm().GetSettingsManager().GetColorSettings();
ReloadColorSettings();
m_boardPos = VECTOR2I();
m_boardSize = VECTOR2I();
@@ -101,9 +103,9 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_boardBoundingBox.Reset();
m_throughHoleIds.Clear();
m_throughHoleOds.Clear();
m_throughHoleAnnularRings.Clear();
m_TH_IDs.Clear();
m_TH_ODs.Clear();
m_viaAnnuli.Clear();
m_copperLayersCount = 2;
@@ -130,26 +132,34 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_SilkScreenColorTop = SFVEC4F( 0.9, 0.9, 0.9, 1.0 );
m_SilkScreenColorBot = SFVEC4F( 0.9, 0.9, 0.9, 1.0 );
m_CopperColor = SFVEC4F( 0.75, 0.61, 0.23, 1.0 );
m_UserDrawingsColor = SFVEC4F( 0.85, 0.85, 0.85, 1.0 );
m_UserCommentsColor = SFVEC4F( 0.85, 0.85, 0.85, 1.0 );
m_ECO1Color = SFVEC4F( 0.70, 0.10, 0.10, 1.0 );
m_ECO2Color = SFVEC4F( 0.70, 0.10, 0.10, 1.0 );
m_platedPadsFront = nullptr;
m_platedPadsBack = nullptr;
m_offboardPadsFront = nullptr;
m_offboardPadsBack = nullptr;
m_frontPlatedPadPolys = nullptr;
m_backPlatedPadPolys = nullptr;
m_frontPlatedPadAndGraphicPolys = nullptr;
m_backPlatedPadAndGraphicPolys = nullptr;
m_frontPlatedCopperPolys = nullptr;
m_backPlatedCopperPolys = nullptr;
if( !g_ColorsLoaded )
{
#define ADD_COLOR( list, r, g, b, a, name ) \
list.emplace_back( r/255.0, g/255.0, b/255.0, a, name )
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, wxT( "Green" ) );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, wxT( "Red" ) );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, wxT( "Black" ) );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, wxT( "White" ) );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, wxT( "Yellow" ) );
ADD_COLOR( g_SilkColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White
ADD_COLOR( g_SilkColors, 20, 51, 36, 1.0, wxT( "Green" ) );
ADD_COLOR( g_SilkColors, 181, 19, 21, 1.0, wxT( "Red" ) );
ADD_COLOR( g_SilkColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
ADD_COLOR( g_SilkColors, 11, 11, 11, 1.0, wxT( "Black" ) );
ADD_COLOR( g_SilkColors, 245, 245, 245, 1.0, wxT( "White" ) );
ADD_COLOR( g_SilkColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
ADD_COLOR( g_SilkColors, 194, 195, 0, 1.0, wxT( "Yellow" ) );
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, NotSpecifiedPrm() ); // Green
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, wxT( "Green" ) );
@@ -196,6 +206,9 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
g_DefaultSurfaceFinish = COLOR4D( 0.75, 0.61, 0.23, 1.0 );
g_DefaultBoardBody = COLOR4D( 0.43, 0.45, 0.30, 0.90 );
g_DefaultComments = COLOR4D( 0.85, 0.85, 0.85, 1.0 );
g_DefaultECOs = COLOR4D( 0.70, 0.10, 0.10, 1.0 );
g_ColorsLoaded = true;
}
#undef ADD_COLOR
@@ -208,54 +221,53 @@ BOARD_ADAPTER::~BOARD_ADAPTER()
}
bool BOARD_ADAPTER::Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const
void BOARD_ADAPTER::ReloadColorSettings() noexcept
{
wxCHECK( PgmOrNull(), /* void */ );
PCBNEW_SETTINGS* cfg = nullptr;
try
{
cfg = Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
}
catch( const std::runtime_error& e )
{
wxFAIL_MSG( e.what() );
}
if( cfg )
{
m_colors = Pgm().GetSettingsManager().GetColorSettings( cfg->m_ColorTheme );
}
}
bool BOARD_ADAPTER::Is3dLayerEnabled( PCB_LAYER_ID aLayer,
const std::bitset<LAYER_3D_END>& aVisibilityFlags ) const
{
wxASSERT( aLayer < PCB_LAYER_ID_COUNT );
if( m_board && !m_board->IsLayerEnabled( aLayer ) )
return false;
// see if layer needs to be shown
// check the flags
switch( aLayer )
{
case B_Adhes:
case F_Adhes:
return m_Cfg->m_Render.show_adhesive;
case B_Paste:
case F_Paste:
return m_Cfg->m_Render.show_solderpaste;
case B_SilkS:
case F_SilkS:
return m_Cfg->m_Render.show_silkscreen;
case B_Mask:
case F_Mask:
return m_Cfg->m_Render.show_soldermask;
case Dwgs_User:
case Cmts_User:
return !m_Cfg->m_Render.realistic && m_Cfg->m_Render.show_comments;
case Eco1_User:
case Eco2_User:
return !m_Cfg->m_Render.realistic && m_Cfg->m_Render.show_eco;
case Edge_Cuts:
return !m_Cfg->m_Render.realistic && !m_Cfg->m_Render.show_board_body;
case Margin:
return !m_Cfg->m_Render.realistic;
case B_Cu:
case F_Cu:
return !m_board || m_board->IsLayerVisible( aLayer ) || m_Cfg->m_Render.realistic;
default:
// the layer is an internal copper layer, used the visibility
return m_board && m_board->IsLayerVisible( aLayer );
case B_Cu: return aVisibilityFlags.test( LAYER_3D_COPPER_BOTTOM );
case F_Cu: return aVisibilityFlags.test( LAYER_3D_COPPER_TOP );
case B_Adhes: return aVisibilityFlags.test( LAYER_3D_ADHESIVE );
case F_Adhes: return aVisibilityFlags.test( LAYER_3D_ADHESIVE );
case B_Paste: return aVisibilityFlags.test( LAYER_3D_SOLDERPASTE );
case F_Paste: return aVisibilityFlags.test( LAYER_3D_SOLDERPASTE );
case B_SilkS: return aVisibilityFlags.test( LAYER_3D_SILKSCREEN_BOTTOM );
case F_SilkS: return aVisibilityFlags.test( LAYER_3D_SILKSCREEN_TOP );
case B_Mask: return aVisibilityFlags.test( LAYER_3D_SOLDERMASK_BOTTOM );
case F_Mask: return aVisibilityFlags.test( LAYER_3D_SOLDERMASK_TOP );
case Dwgs_User: return aVisibilityFlags.test( LAYER_3D_USER_DRAWINGS );
case Cmts_User: return aVisibilityFlags.test( LAYER_3D_USER_COMMENTS );
case Eco1_User: return aVisibilityFlags.test( LAYER_3D_USER_ECO1 );
case Eco2_User: return aVisibilityFlags.test( LAYER_3D_USER_ECO2 );
default: return m_board && m_board->IsLayerVisible( aLayer );
}
}
@@ -271,6 +283,12 @@ bool BOARD_ADAPTER::IsFootprintShown( FOOTPRINT_ATTR_T aFPAttributes ) const
return false;
}
if( aFPAttributes & FP_DNP )
{
if( !m_Cfg->m_Render.show_footprints_dnp )
return false;
}
if( aFPAttributes & FP_SMD )
return m_Cfg->m_Render.show_footprints_insert;
@@ -326,11 +344,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
BOX2I bbbox;
if( m_board )
{
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder()
&& m_Cfg->m_Render.realistic
&& haveOutline );
}
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline );
// Gives a non null size to avoid issues in zoom / scale calculations
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
@@ -353,6 +367,10 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
// Calculate the conversion to apply to all positions.
m_biuTo3Dunits = RANGE_SCALE_3D / std::max( m_boardSize.x, m_boardSize.y );
// Hack to keep "home" zoom from being too small.
if( !m_board || !m_board->IsFootprintHolder() )
m_biuTo3Dunits *= 1.6f;
m_boardBodyThickness3DU = DEFAULT_BOARD_THICKNESS * m_biuTo3Dunits;
m_frontCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
m_backCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
@@ -379,13 +397,18 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
break;
case BS_ITEM_TYPE_COPPER:
if( item->GetBrdLayerId() == F_Cu )
m_frontCopperThickness3DU = item->GetThickness() * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Cu )
m_backCopperThickness3DU = item->GetThickness() * m_biuTo3Dunits;
else if( item->IsEnabled() )
thickness += item->GetThickness();
{
// The copper thickness must be > 0 to avoid draw issues (divide by 0 for instance)
// We use a minimal arbitrary value = 1 micrometer here:
int copper_thickness = std::max( item->GetThickness(), pcbIUScale.mmToIU( 0.001 ) );
if( item->GetBrdLayerId() == F_Cu )
m_frontCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Cu )
m_backCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->IsEnabled() )
thickness += copper_thickness;
}
break;
default:
@@ -431,7 +454,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
for( ; layer < MAX_CU_LAYERS; layer++ )
{
m_layerZcoordBottom[layer] = -( m_boardBodyThickness3DU / 2.0f );
m_layerZcoordTop[layer] = -( m_boardBodyThickness3DU / 2.0f ) - m_backCopperThickness3DU;
m_layerZcoordTop[layer] = m_layerZcoordBottom[layer] - m_backCopperThickness3DU;
}
// This is the top of the copper layer thickness.
@@ -487,7 +510,6 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
zposTop = zposBottom + m_nonCopperLayerThickness3DU;
break;
// !TODO: review
default:
zposTop = zpos_copperTop_front + (layer_id - MAX_CU_LAYERS + 3.0f) * zpos_offset;
zposBottom = zposTop - m_nonCopperLayerThickness3DU;
@@ -513,7 +535,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
m_boardBoundingBox = BBOX_3D( boardMin, boardMax );
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_startCreateBoardPolyTime = GetRunningMicroSecs();
int64_t stats_startCreateBoardPolyTime = GetRunningMicroSecs();
#endif
if( aStatusReporter )
@@ -521,22 +543,73 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
createLayers( aStatusReporter );
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
auto to_SFVEC4F =
[]( const COLOR4D& src )
{
return SFVEC4F( src.r, src.g, src.b, src.a );
};
m_BgColorTop = to_SFVEC4F( colors->GetColor( LAYER_3D_BACKGROUND_TOP ) );
m_BgColorBot = to_SFVEC4F( colors->GetColor( LAYER_3D_BACKGROUND_BOTTOM ) );
std::map<int, COLOR4D> colors = GetLayerColors();
m_SolderPasteColor = to_SFVEC4F( colors->GetColor( LAYER_3D_SOLDERPASTE ) );
m_BgColorTop = to_SFVEC4F( colors[ LAYER_3D_BACKGROUND_TOP ] );
m_BgColorBot = to_SFVEC4F( colors[ LAYER_3D_BACKGROUND_BOTTOM ] );
m_SolderPasteColor = to_SFVEC4F( colors[ LAYER_3D_SOLDERPASTE ] );
m_SilkScreenColorBot = to_SFVEC4F( colors[ LAYER_3D_SILKSCREEN_BOTTOM ] );
m_SilkScreenColorTop = to_SFVEC4F( colors[ LAYER_3D_SILKSCREEN_TOP ] );
m_SolderMaskColorBot = to_SFVEC4F( colors[ LAYER_3D_SOLDERMASK_BOTTOM ] );
m_SolderMaskColorTop = to_SFVEC4F( colors[ LAYER_3D_SOLDERMASK_TOP ] );
m_CopperColor = to_SFVEC4F( colors[ LAYER_3D_COPPER_TOP ] );
m_BoardBodyColor = to_SFVEC4F( colors[ LAYER_3D_BOARD ] );
m_UserDrawingsColor = to_SFVEC4F( colors[ LAYER_3D_USER_DRAWINGS ] );
m_UserCommentsColor = to_SFVEC4F( colors[ LAYER_3D_USER_COMMENTS ] );
m_ECO1Color = to_SFVEC4F( colors[ LAYER_3D_USER_ECO1 ] );
m_ECO2Color = to_SFVEC4F( colors[ LAYER_3D_USER_ECO2 ] );
}
if( m_board && colors->GetUseBoardStackupColors() )
std::map<int, COLOR4D> BOARD_ADAPTER::GetDefaultColors() const
{
std::map<int, COLOR4D> colors;
colors[ LAYER_3D_BACKGROUND_TOP ] = BOARD_ADAPTER::g_DefaultBackgroundTop;
colors[ LAYER_3D_BACKGROUND_BOTTOM ] = BOARD_ADAPTER::g_DefaultBackgroundBot;
colors[ LAYER_3D_BOARD ] = BOARD_ADAPTER::g_DefaultBoardBody;
colors[ LAYER_3D_COPPER_TOP ] = BOARD_ADAPTER::g_DefaultSurfaceFinish;
colors[ LAYER_3D_COPPER_BOTTOM ] = BOARD_ADAPTER::g_DefaultSurfaceFinish;
colors[ LAYER_3D_SILKSCREEN_TOP ] = BOARD_ADAPTER::g_DefaultSilkscreen;
colors[ LAYER_3D_SILKSCREEN_BOTTOM ] = BOARD_ADAPTER::g_DefaultSilkscreen;
colors[ LAYER_3D_SOLDERMASK_TOP ] = BOARD_ADAPTER::g_DefaultSolderMask;
colors[ LAYER_3D_SOLDERMASK_BOTTOM ] = BOARD_ADAPTER::g_DefaultSolderMask;
colors[ LAYER_3D_SOLDERPASTE ] = BOARD_ADAPTER::g_DefaultSolderPaste;
colors[ LAYER_3D_USER_DRAWINGS ] = BOARD_ADAPTER::g_DefaultComments;
colors[ LAYER_3D_USER_COMMENTS ] = BOARD_ADAPTER::g_DefaultComments;
colors[ LAYER_3D_USER_ECO1 ] = BOARD_ADAPTER::g_DefaultECOs;
colors[ LAYER_3D_USER_ECO2 ] = BOARD_ADAPTER::g_DefaultECOs;
return colors;
}
std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
{
std::map<int, COLOR4D> colors;
if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) )
{
colors = preset->colors;
}
else
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
for( const auto& [ layer, defaultColor /* unused */ ] : GetDefaultColors() )
colors[ layer ] = settings->GetColor( layer );
}
if( m_Cfg->m_UseStackupColors && m_board )
{
const BOARD_STACKUP& stackup = m_board->GetDesignSettings().GetStackupDescriptor();
KIGFX::COLOR4D bodyColor( 0, 0, 0, 0 );
auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
@@ -557,13 +630,6 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
return KIGFX::COLOR4D();
};
m_SilkScreenColorTop = to_SFVEC4F( g_DefaultSilkscreen );
m_SilkScreenColorBot = to_SFVEC4F( g_DefaultSilkscreen );
m_SolderMaskColorTop = to_SFVEC4F( g_DefaultSolderMask );
m_SolderMaskColorBot = to_SFVEC4F( g_DefaultSolderMask );
KIGFX::COLOR4D bodyColor( 0, 0, 0, 0 );
for( const BOARD_STACKUP_ITEM* stackupItem : stackup.GetList() )
{
wxString colorName = stackupItem->GetColor();
@@ -572,16 +638,17 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
{
case BS_ITEM_TYPE_SILKSCREEN:
if( stackupItem->GetBrdLayerId() == F_SilkS )
m_SilkScreenColorTop = to_SFVEC4F( findColor( colorName, g_SilkscreenColors ) );
colors[ LAYER_3D_SILKSCREEN_TOP ] = findColor( colorName, g_SilkColors );
else
m_SilkScreenColorBot = to_SFVEC4F( findColor( colorName, g_SilkscreenColors ) );
colors[ LAYER_3D_SILKSCREEN_BOTTOM ] = findColor( colorName, g_SilkColors );
break;
case BS_ITEM_TYPE_SOLDERMASK:
if( stackupItem->GetBrdLayerId() == F_Mask )
m_SolderMaskColorTop = to_SFVEC4F( findColor( colorName, g_MaskColors ) );
colors[ LAYER_3D_SOLDERMASK_TOP ] = findColor( colorName, g_MaskColors );
else
m_SolderMaskColorBot = to_SFVEC4F( findColor( colorName, g_MaskColors ) );
colors[ LAYER_3D_SOLDERMASK_BOTTOM ] = findColor( colorName, g_MaskColors );
break;
@@ -604,52 +671,223 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
}
if( bodyColor != COLOR4D( 0, 0, 0, 0 ) )
m_BoardBodyColor = to_SFVEC4F( bodyColor );
else
m_BoardBodyColor = to_SFVEC4F( g_DefaultBoardBody );
colors[ LAYER_3D_BOARD ] = bodyColor;
const wxString& finishName = stackup.m_FinishType;
if( finishName.EndsWith( wxT( "OSP" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( wxT( "Copper" ), g_FinishColors ) );
colors[ LAYER_3D_COPPER_TOP ] = findColor( wxT( "Copper" ), g_FinishColors );
}
else if( finishName.EndsWith( wxT( "IG" ) )
|| finishName.EndsWith( wxT( "gold" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( wxT( "Gold" ), g_FinishColors ) );
colors[ LAYER_3D_COPPER_TOP ] = findColor( wxT( "Gold" ), g_FinishColors );
}
else if( finishName.StartsWith( wxT( "HAL" ) )
|| finishName.StartsWith( wxT( "HASL" ) )
|| finishName.EndsWith( wxT( "tin" ) )
|| finishName.EndsWith( wxT( "nickel" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( wxT( "Tin" ), g_FinishColors ) );
colors[ LAYER_3D_COPPER_TOP ] = findColor( wxT( "Tin" ), g_FinishColors );
}
else if( finishName.EndsWith( wxT( "silver" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( wxT( "Silver" ), g_FinishColors ) );
}
else
{
m_CopperColor = to_SFVEC4F( g_DefaultSurfaceFinish );
colors[ LAYER_3D_COPPER_TOP ] = findColor( wxT( "Silver" ), g_FinishColors );
}
}
else
{
m_SilkScreenColorBot = to_SFVEC4F( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ) );
m_SilkScreenColorTop = to_SFVEC4F( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ) );
m_SolderMaskColorBot = to_SFVEC4F( colors->GetColor( LAYER_3D_SOLDERMASK_BOTTOM ) );
m_SolderMaskColorTop = to_SFVEC4F( colors->GetColor( LAYER_3D_SOLDERMASK_TOP ) );
m_CopperColor = to_SFVEC4F( colors->GetColor( LAYER_3D_COPPER ) );
m_BoardBodyColor = to_SFVEC4F( colors->GetColor( LAYER_3D_BOARD ) );
}
colors[ LAYER_3D_COPPER_BOTTOM ] = colors[ LAYER_3D_COPPER_TOP ];
return colors;
}
extern bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines,
int aErrorMax, int aChainingEpsilon,
OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr );
void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
for( const auto& [ layer, color ] : aColors )
settings->SetColor( layer, color );
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
}
void BOARD_ADAPTER::SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers )
{
m_Cfg->m_Render.show_board_body = aLayers.test( LAYER_3D_BOARD );
m_Cfg->m_Render.show_copper_top = aLayers.test( LAYER_3D_COPPER_TOP );
m_Cfg->m_Render.show_copper_bottom = aLayers.test( LAYER_3D_COPPER_BOTTOM );
m_Cfg->m_Render.show_silkscreen_top = aLayers.test( LAYER_3D_SILKSCREEN_TOP );
m_Cfg->m_Render.show_silkscreen_bottom = aLayers.test( LAYER_3D_SILKSCREEN_BOTTOM );
m_Cfg->m_Render.show_soldermask_top = aLayers.test( LAYER_3D_SOLDERMASK_TOP );
m_Cfg->m_Render.show_soldermask_bottom = aLayers.test( LAYER_3D_SOLDERMASK_BOTTOM );
m_Cfg->m_Render.show_solderpaste = aLayers.test( LAYER_3D_SOLDERPASTE );
m_Cfg->m_Render.show_adhesive = aLayers.test( LAYER_3D_ADHESIVE );
m_Cfg->m_Render.show_comments = aLayers.test( LAYER_3D_USER_COMMENTS );
m_Cfg->m_Render.show_drawings = aLayers.test( LAYER_3D_USER_DRAWINGS );
m_Cfg->m_Render.show_eco1 = aLayers.test( LAYER_3D_USER_ECO1 );
m_Cfg->m_Render.show_eco2 = aLayers.test( LAYER_3D_USER_ECO2 );
m_Cfg->m_Render.show_footprints_normal = aLayers.test( LAYER_3D_TH_MODELS );
m_Cfg->m_Render.show_footprints_insert = aLayers.test( LAYER_3D_SMD_MODELS );
m_Cfg->m_Render.show_footprints_virtual = aLayers.test( LAYER_3D_VIRTUAL_MODELS );
m_Cfg->m_Render.show_footprints_not_in_posfile = aLayers.test( LAYER_3D_MODELS_NOT_IN_POS );
m_Cfg->m_Render.show_footprints_dnp = aLayers.test( LAYER_3D_MODELS_MARKED_DNP );
m_Cfg->m_Render.show_fp_references = aLayers.test( LAYER_FP_REFERENCES );
m_Cfg->m_Render.show_fp_values = aLayers.test( LAYER_FP_VALUES );
m_Cfg->m_Render.show_fp_text = aLayers.test( LAYER_FP_TEXT );
m_Cfg->m_Render.show_model_bbox = aLayers.test( LAYER_3D_BOUNDING_BOXES );
m_Cfg->m_Render.show_off_board_silk = aLayers.test( LAYER_3D_OFF_BOARD_SILK );
m_Cfg->m_Render.show_axis = aLayers.test( LAYER_3D_AXES );
}
std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
{
std::bitset<LAYER_3D_END> ret;
ret.set( LAYER_3D_BOARD, m_Cfg->m_Render.show_board_body );
ret.set( LAYER_3D_COPPER_TOP, m_Cfg->m_Render.show_copper_top );
ret.set( LAYER_3D_COPPER_BOTTOM, m_Cfg->m_Render.show_copper_bottom );
ret.set( LAYER_3D_SILKSCREEN_TOP, m_Cfg->m_Render.show_silkscreen_top );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, m_Cfg->m_Render.show_silkscreen_bottom );
ret.set( LAYER_3D_SOLDERMASK_TOP, m_Cfg->m_Render.show_soldermask_top );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, m_Cfg->m_Render.show_soldermask_bottom );
ret.set( LAYER_3D_SOLDERPASTE, m_Cfg->m_Render.show_solderpaste );
ret.set( LAYER_3D_ADHESIVE, m_Cfg->m_Render.show_adhesive );
ret.set( LAYER_3D_USER_COMMENTS, m_Cfg->m_Render.show_comments );
ret.set( LAYER_3D_USER_DRAWINGS, m_Cfg->m_Render.show_drawings );
ret.set( LAYER_3D_USER_ECO1, m_Cfg->m_Render.show_eco1 );
ret.set( LAYER_3D_USER_ECO2, m_Cfg->m_Render.show_eco2 );
ret.set( LAYER_FP_REFERENCES, m_Cfg->m_Render.show_fp_references );
ret.set( LAYER_FP_VALUES, m_Cfg->m_Render.show_fp_values );
ret.set( LAYER_FP_TEXT, m_Cfg->m_Render.show_fp_text );
ret.set( LAYER_3D_TH_MODELS, m_Cfg->m_Render.show_footprints_normal );
ret.set( LAYER_3D_SMD_MODELS, m_Cfg->m_Render.show_footprints_insert );
ret.set( LAYER_3D_VIRTUAL_MODELS, m_Cfg->m_Render.show_footprints_virtual );
ret.set( LAYER_3D_MODELS_NOT_IN_POS, m_Cfg->m_Render.show_footprints_not_in_posfile );
ret.set( LAYER_3D_MODELS_MARKED_DNP, m_Cfg->m_Render.show_footprints_dnp );
ret.set( LAYER_3D_BOUNDING_BOXES, m_Cfg->m_Render.show_model_bbox );
ret.set( LAYER_3D_OFF_BOARD_SILK, m_Cfg->m_Render.show_off_board_silk );
ret.set( LAYER_3D_AXES, m_Cfg->m_Render.show_axis );
if( m_Cfg->m_CurrentPreset == FOLLOW_PCB )
{
if( !m_board )
return ret;
ret.set( LAYER_3D_BOARD, true );
ret.set( LAYER_3D_COPPER_TOP, m_board->IsLayerVisible( F_Cu ) );
ret.set( LAYER_3D_COPPER_BOTTOM, m_board->IsLayerVisible( B_Cu ) );
ret.set( LAYER_3D_SILKSCREEN_TOP, m_board->IsLayerVisible( F_SilkS ) );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, m_board->IsLayerVisible( B_SilkS ) );
ret.set( LAYER_3D_SOLDERMASK_TOP, m_board->IsLayerVisible( F_Mask ) );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, m_board->IsLayerVisible( B_Mask ) );
ret.set( LAYER_3D_SOLDERPASTE, m_board->IsLayerVisible( F_Paste ) );
ret.set( LAYER_3D_ADHESIVE, m_board->IsLayerVisible( F_Adhes ) );
ret.set( LAYER_3D_USER_COMMENTS, m_board->IsLayerVisible( Cmts_User ) );
ret.set( LAYER_3D_USER_DRAWINGS, m_board->IsLayerVisible( Dwgs_User ) );
ret.set( LAYER_3D_USER_ECO1, m_board->IsLayerVisible( Eco1_User ) );
ret.set( LAYER_3D_USER_ECO2, m_board->IsLayerVisible( Eco2_User ) );
for( GAL_LAYER_ID layer : { LAYER_FP_REFERENCES, LAYER_FP_VALUES, LAYER_FP_TEXT } )
ret.set( layer, m_board->IsElementVisible( layer ) );
}
else if( m_Cfg->m_CurrentPreset == FOLLOW_PLOT_SETTINGS )
{
if( !m_board )
return ret;
const PCB_PLOT_PARAMS& plotParams = m_board->GetPlotOptions();
LSET layers = plotParams.GetLayerSelection() | plotParams.GetPlotOnAllLayersSelection();
ret.set( LAYER_3D_BOARD, true );
ret.set( LAYER_3D_COPPER_TOP, layers.test( F_Cu ) );
ret.set( LAYER_3D_COPPER_BOTTOM, layers.test( B_Cu ) );
ret.set( LAYER_3D_SILKSCREEN_TOP, layers.test( F_SilkS ) );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, layers.test( B_SilkS ) );
ret.set( LAYER_3D_SOLDERMASK_TOP, layers.test( F_Mask ) );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, layers.test( B_Mask ) );
ret.set( LAYER_3D_SOLDERPASTE, layers.test( F_Paste ) );
ret.set( LAYER_3D_ADHESIVE, layers.test( F_Adhes ) );
ret.set( LAYER_3D_USER_COMMENTS, layers.test( Cmts_User ) );
ret.set( LAYER_3D_USER_DRAWINGS, layers.test( Dwgs_User ) );
ret.set( LAYER_3D_USER_ECO1, layers.test( Eco1_User ) );
ret.set( LAYER_3D_USER_ECO2, layers.test( Eco2_User ) );
ret.set( LAYER_FP_REFERENCES, plotParams.GetPlotReference() );
ret.set( LAYER_FP_VALUES, plotParams.GetPlotValue() );
ret.set( LAYER_FP_TEXT, plotParams.GetPlotFPText() );
}
else if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) )
{
ret = preset->layers;
}
else
{
ret.set( LAYER_3D_BOARD, m_Cfg->m_Render.show_board_body );
ret.set( LAYER_3D_COPPER_TOP, m_Cfg->m_Render.show_copper_top );
ret.set( LAYER_3D_COPPER_BOTTOM, m_Cfg->m_Render.show_copper_bottom );
ret.set( LAYER_3D_SILKSCREEN_TOP, m_Cfg->m_Render.show_silkscreen_top );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, m_Cfg->m_Render.show_silkscreen_bottom );
ret.set( LAYER_3D_SOLDERMASK_TOP, m_Cfg->m_Render.show_soldermask_top );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, m_Cfg->m_Render.show_soldermask_bottom );
ret.set( LAYER_3D_SOLDERPASTE, m_Cfg->m_Render.show_solderpaste );
ret.set( LAYER_3D_ADHESIVE, m_Cfg->m_Render.show_adhesive );
ret.set( LAYER_3D_USER_COMMENTS, m_Cfg->m_Render.show_comments );
ret.set( LAYER_3D_USER_DRAWINGS, m_Cfg->m_Render.show_drawings );
ret.set( LAYER_3D_USER_ECO1, m_Cfg->m_Render.show_eco1 );
ret.set( LAYER_3D_USER_ECO2, m_Cfg->m_Render.show_eco2 );
ret.set( LAYER_FP_REFERENCES, m_Cfg->m_Render.show_fp_references );
ret.set( LAYER_FP_VALUES, m_Cfg->m_Render.show_fp_values );
ret.set( LAYER_FP_TEXT, m_Cfg->m_Render.show_fp_text );
}
return ret;
}
std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetDefaultVisibleLayers() const
{
std::bitset<LAYER_3D_END> ret;
ret.set( LAYER_3D_BOARD, true );
ret.set( LAYER_3D_COPPER_TOP, true );
ret.set( LAYER_3D_COPPER_BOTTOM, true );
ret.set( LAYER_3D_SILKSCREEN_TOP, true );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, true );
ret.set( LAYER_3D_SOLDERMASK_TOP, true );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, true );
ret.set( LAYER_3D_SOLDERPASTE, true );
ret.set( LAYER_3D_ADHESIVE, true );
ret.set( LAYER_3D_USER_COMMENTS, false );
ret.set( LAYER_3D_USER_DRAWINGS, false );
ret.set( LAYER_3D_USER_ECO1, false );
ret.set( LAYER_3D_USER_ECO2, false );
ret.set( LAYER_FP_REFERENCES, true );
ret.set( LAYER_FP_VALUES, true );
ret.set( LAYER_FP_TEXT, true );
ret.set( LAYER_3D_TH_MODELS, true );
ret.set( LAYER_3D_SMD_MODELS, true );
ret.set( LAYER_3D_VIRTUAL_MODELS, true );
ret.set( LAYER_3D_MODELS_NOT_IN_POS, false );
ret.set( LAYER_3D_MODELS_MARKED_DNP, false );
ret.set( LAYER_3D_BOUNDING_BOXES, false );
ret.set( LAYER_3D_OFF_BOARD_SILK, false );
ret.set( LAYER_3D_AXES, true );
return ret;
}
bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
@@ -671,7 +909,8 @@ bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
return false;
}
int chainingEpsilon = pcbIUScale.mmToIU( 0.02 ); // max dist from one endPt to next startPt
// max dist from one endPt to next startPt
int chainingEpsilon = m_board->GetOutlinesChainingEpsilon();
success = BuildFootprintPolygonOutlines( m_board, m_board_poly,
m_board->GetDesignSettings().m_MaxError,
@@ -688,7 +927,7 @@ bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
}
else
{
success = m_board->GetBoardPolygonOutlines( m_board_poly );
success = m_board->GetBoardPolygonOutlines( m_board_poly, nullptr, false, true );
if( !success && aErrorMsg )
*aErrorMsg = _( "Board outline is missing or malformed. Run DRC for a full analysis." );
@@ -701,19 +940,9 @@ bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
float BOARD_ADAPTER::GetFootprintZPos( bool aIsFlipped ) const
{
if( aIsFlipped )
{
if( m_Cfg->m_Render.show_solderpaste )
return m_layerZcoordBottom[B_SilkS];
else
return m_layerZcoordBottom[B_Paste];
}
return m_layerZcoordBottom[B_Paste];
else
{
if( m_Cfg->m_Render.show_solderpaste )
return m_layerZcoordTop[F_SilkS];
else
return m_layerZcoordTop[F_Paste];
}
return m_layerZcoordTop[F_Paste];
}
+91 -69
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,7 +31,7 @@
#include "../3d_rendering/raytracing/accelerators/container_2d.h"
#include "../3d_rendering/raytracing/accelerators/container_3d.h"
#include "../3d_rendering/raytracing/shapes3D/bbox_3d.h"
#include "../3d_rendering/camera.h"
#include <gal/3d/camera.h>
#include "../3d_enums.h"
#include "../3d_cache/3d_cache.h"
#include "../common_ogl/ogl_attr_list.h"
@@ -49,6 +50,7 @@
#include <dialogs/dialog_color_picker.h>
class COLOR_SETTINGS;
class PCB_TEXTBOX;
/// A type that stores a container of 2d objects for each layer id
typedef std::map<PCB_LAYER_ID, BVH_CONTAINER_2D*> MAP_CONTAINER_2D_BASE;
@@ -85,7 +87,8 @@ public:
*
* @param aLayer layer ID to get status.
*/
bool Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const;
bool Is3dLayerEnabled( PCB_LAYER_ID aLayer,
const std::bitset<LAYER_3D_END>& aVisibilityFlags ) const;
/**
* Test if footprint should be displayed in relation to attributes and the flags.
@@ -100,7 +103,15 @@ public:
void SetBoard( BOARD* aBoard ) noexcept { m_board = aBoard; }
const BOARD* GetBoard() const noexcept { return m_board; }
void SetColorSettings( COLOR_SETTINGS* aSettings ) noexcept { m_colors = aSettings; }
void ReloadColorSettings() noexcept;
std::map<int, COLOR4D> GetLayerColors() const;
std::map<int, COLOR4D> GetDefaultColors() const;
void SetLayerColors( const std::map<int, COLOR4D>& aColors );
std::bitset<LAYER_3D_END> GetVisibleLayers() const;
std::bitset<LAYER_3D_END> GetDefaultVisibleLayers() const;
void SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers );
/**
* Function to be called by the render when it need to reload the settings for the board.
@@ -236,10 +247,12 @@ public:
const MAP_CONTAINER_2D_BASE& GetLayerMap() const noexcept { return m_layerMap; }
const BVH_CONTAINER_2D* GetPlatedPadsFront() const noexcept { return m_platedPadsFront; }
const BVH_CONTAINER_2D* GetPlatedPadsBack() const noexcept { return m_platedPadsBack; }
const BVH_CONTAINER_2D* GetOffboardPadsFront() const noexcept { return m_offboardPadsFront; }
const BVH_CONTAINER_2D* GetOffboardPadsBack() const noexcept { return m_offboardPadsBack; }
const MAP_CONTAINER_2D_BASE& GetLayerHoleMap() const noexcept { return m_layerHoleMap; }
const BVH_CONTAINER_2D& GetThroughHoleIds() const noexcept { return m_throughHoleIds; }
const BVH_CONTAINER_2D& GetThroughHoleOds() const noexcept { return m_throughHoleOds; }
const BVH_CONTAINER_2D& GetTH_IDs() const noexcept { return m_TH_IDs; }
const BVH_CONTAINER_2D& GetTH_ODs() const noexcept { return m_TH_ODs; }
/**
* Get through hole outside diameter 2D polygons.
@@ -248,37 +261,37 @@ public:
*
* @return a container with through hold outside diameter 2D polygons.
*/
const SHAPE_POLY_SET& GetThroughHoleOdPolys() const noexcept
const SHAPE_POLY_SET& GetTH_ODPolys() const noexcept
{
return m_throughHoleOdPolys;
return m_TH_ODPolys;
}
const BVH_CONTAINER_2D& GetThroughHoleAnnularRings() const noexcept
const BVH_CONTAINER_2D& GetViaAnnuli() const noexcept
{
return m_throughHoleAnnularRings;
return m_viaAnnuli;
}
const SHAPE_POLY_SET& GetThroughHoleAnnularRingPolys() const noexcept
const SHAPE_POLY_SET& GetViaAnnuliPolys() const noexcept
{
return m_throughHoleAnnularRingPolys;
return m_viaAnnuliPolys;
}
const SHAPE_POLY_SET& GetOuterNonPlatedThroughHolePoly() const noexcept
const SHAPE_POLY_SET& GetNPTH_ODPolys() const noexcept
{
return m_nonPlatedThroughHoleOdPolys;
return m_NPTH_ODPolys;
}
/**
* @return a container with through hole via hole outside diameters.
*/
const BVH_CONTAINER_2D& GetThroughHoleViaOds() const noexcept
const BVH_CONTAINER_2D& GetViaTH_ODs() const noexcept
{
return m_throughHoleViaOds;
return m_viaTH_ODs;
}
const SHAPE_POLY_SET& GetThroughHoleViaOdPolys() const noexcept
const SHAPE_POLY_SET& GetViaTH_ODPolys() const noexcept
{
return m_throughHoleViaOdPolys;
return m_viaTH_ODPolys;
}
unsigned int GetViaCount() const noexcept { return m_viaCount; }
@@ -318,8 +331,8 @@ public:
*/
const MAP_POLY& GetPolyMap() const noexcept { return m_layers_poly; }
const SHAPE_POLY_SET* GetFrontPlatedPadPolys() { return m_frontPlatedPadPolys; }
const SHAPE_POLY_SET* GetBackPlatedPadPolys() { return m_backPlatedPadPolys; }
const SHAPE_POLY_SET* GetFrontPlatedPadAndGraphicPolys() { return m_frontPlatedPadAndGraphicPolys; }
const SHAPE_POLY_SET* GetBackPlatedPadAndGraphicPolys() { return m_backPlatedPadAndGraphicPolys; }
const MAP_POLY& GetHoleIdPolysMap() const noexcept { return m_layerHoleIdPolys; }
const MAP_POLY& GetHoleOdPolysMap() const noexcept { return m_layerHoleOdPolys; }
@@ -334,19 +347,23 @@ private:
void destroyLayers();
// Helper functions to create the board
void createViaWithMargin( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer,
int aMargin );
void createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer );
void createPadWithMargin( const PAD *aPad, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayer, const VECTOR2I& aMargin ) const;
OBJECT_2D* createPadWithDrill( const PAD* aPad, int aInflateValue );
void createPadWithHole( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer,
int aInflateValue );
void addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId, bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads,
bool aSkipNonPlatedPads );
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads );
void addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId );
PCB_LAYER_ID aLayerId,
const std::bitset<LAYER_3D_END>& aVisibilityFlags );
void addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aDstContainer,
const BOARD_ITEM* aOwner );
@@ -357,23 +374,20 @@ private:
void addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aDstContainer,
const BOARD_ITEM* aOwner );
void addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner );
void addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId );
void transformArcToSegments( const VECTOR2I& aCentre, const VECTOR2I& aStart,
void createArcSegments( const VECTOR2I& aCentre, const VECTOR2I& aStart,
const EDA_ANGLE& aArcAngle, int aCircleToSegmentsCount, int aWidth,
CONTAINER_2D_BASE* aDstContainer, const BOARD_ITEM& aOwner );
CONTAINER_2D_BASE* aContainer, const BOARD_ITEM& aOwner );
void buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer, int aWidth );
// Helper functions to create poly contours
void buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aBuffer, int aWidth) const;
void transformFPShapesToPolySet( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLayer,
SHAPE_POLY_SET& aBuffer ) const;
public:
static CUSTOM_COLORS_LIST g_SilkscreenColors;
static CUSTOM_COLORS_LIST g_SilkColors;
static CUSTOM_COLORS_LIST g_MaskColors;
static CUSTOM_COLORS_LIST g_PasteColors;
static CUSTOM_COLORS_LIST g_FinishColors;
@@ -386,68 +400,76 @@ public:
static KIGFX::COLOR4D g_DefaultSolderPaste;
static KIGFX::COLOR4D g_DefaultSurfaceFinish;
static KIGFX::COLOR4D g_DefaultBoardBody;
static KIGFX::COLOR4D g_DefaultComments;
static KIGFX::COLOR4D g_DefaultECOs;
public:
EDA_3D_VIEWER_SETTINGS* m_Cfg;
bool m_IsBoardView;
bool m_MousewheelPanning;
bool m_IsPreviewer; ///< true if the board adaptater is living in a 3D
///< preview panel, false for the standard 3D viewer
bool m_IsPreviewer; ///< true if we're in a 3D preview panel, false
///< for the standard 3D viewer
SFVEC4F m_BgColorBot; ///< background bottom color
SFVEC4F m_BgColorTop; ///< background top color
SFVEC4F m_BoardBodyColor; ///< in realistic mode: FR4 board color
SFVEC4F m_SolderMaskColorBot; ///< in realistic mode: solder mask color ( bot )
SFVEC4F m_SolderMaskColorTop; ///< in realistic mode: solder mask color ( top )
SFVEC4F m_SolderPasteColor; ///< in realistic mode: solder paste color
SFVEC4F m_SilkScreenColorBot; ///< in realistic mode: SilkScreen color ( bot )
SFVEC4F m_SilkScreenColorTop; ///< in realistic mode: SilkScreen color ( top )
SFVEC4F m_CopperColor; ///< in realistic mode: copper color
SFVEC4F m_BgColorBot; ///< background bottom color
SFVEC4F m_BgColorTop; ///< background top color
SFVEC4F m_BoardBodyColor; ///< in realistic mode: FR4 board color
SFVEC4F m_SolderMaskColorBot; ///< in realistic mode: solder mask color ( bot )
SFVEC4F m_SolderMaskColorTop; ///< in realistic mode: solder mask color ( top )
SFVEC4F m_SolderPasteColor; ///< in realistic mode: solder paste color
SFVEC4F m_SilkScreenColorBot; ///< in realistic mode: SilkScreen color ( bot )
SFVEC4F m_SilkScreenColorTop; ///< in realistic mode: SilkScreen color ( top )
SFVEC4F m_CopperColor; ///< in realistic mode: copper color
SFVEC4F m_UserDrawingsColor;
SFVEC4F m_UserCommentsColor;
SFVEC4F m_ECO1Color;
SFVEC4F m_ECO2Color;
private:
BOARD* m_board;
S3D_CACHE* m_3dModelManager;
RENDER_SETTINGS* m_renderSettings;
COLOR_SETTINGS* m_colors;
VECTOR2I m_boardPos; ///< Board center position in board internal units.
VECTOR2I m_boardSize; ///< Board size in board internal units.
SFVEC3F m_boardCenter; ///< 3D center position of the board in 3D units.
BBOX_3D m_boardBoundingBox; ///< 3D bounding box of the board in 3D units.
VECTOR2I m_boardPos; ///< Board center position in board internal units.
VECTOR2I m_boardSize; ///< Board size in board internal units.
SFVEC3F m_boardCenter; ///< 3D center position of the board in 3D units.
BBOX_3D m_boardBoundingBox; ///< 3D bounding box of the board in 3D units.
MAP_POLY m_layers_poly; ///< Amalgamated polygon contours for various types of
///< items
MAP_POLY m_layers_poly; ///< Amalgamated polygon contours for various types
///< of items
SHAPE_POLY_SET* m_frontPlatedPadPolys;
SHAPE_POLY_SET* m_backPlatedPadPolys;
SHAPE_POLY_SET* m_frontPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_backPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_frontPlatedCopperPolys;
SHAPE_POLY_SET* m_backPlatedCopperPolys;
MAP_POLY m_layerHoleOdPolys; ///< Hole outer diameters (per layer)
MAP_POLY m_layerHoleIdPolys; ///< Hole inner diameters (per layer)
MAP_POLY m_layerHoleOdPolys; ///< Hole outer diameters (per layer)
MAP_POLY m_layerHoleIdPolys; ///< Hole inner diameters (per layer)
SHAPE_POLY_SET m_nonPlatedThroughHoleOdPolys; ///< NPTH outer diameters
SHAPE_POLY_SET m_throughHoleOdPolys; ///< PTH outer diameters
SHAPE_POLY_SET m_throughHoleViaOdPolys; ///< Via hole outer diameters
SHAPE_POLY_SET m_throughHoleAnnularRingPolys; ///< Via annular ring outer diameters
SHAPE_POLY_SET m_NPTH_ODPolys; ///< NPTH outer diameters
SHAPE_POLY_SET m_TH_ODPolys; ///< PTH outer diameters
SHAPE_POLY_SET m_viaTH_ODPolys; ///< Via hole outer diameters
SHAPE_POLY_SET m_viaAnnuliPolys; ///< Via annular ring outer diameters
SHAPE_POLY_SET m_board_poly; ///< Board outline polygon.
SHAPE_POLY_SET m_board_poly; ///< Board outline polygon.
MAP_CONTAINER_2D_BASE m_layerMap; ///< 2D elements for each layer.
MAP_CONTAINER_2D_BASE m_layerHoleMap; ///< Holes for each layer.
MAP_CONTAINER_2D_BASE m_layerMap; ///< 2D elements for each layer.
MAP_CONTAINER_2D_BASE m_layerHoleMap; ///< Holes for each layer.
BVH_CONTAINER_2D* m_platedPadsFront;
BVH_CONTAINER_2D* m_platedPadsBack;
BVH_CONTAINER_2D* m_offboardPadsFront;
BVH_CONTAINER_2D* m_offboardPadsBack;
BVH_CONTAINER_2D m_throughHoleOds; ///< List of PTH outer diameters
BVH_CONTAINER_2D m_throughHoleIds; ///< List of PTH inner diameters
BVH_CONTAINER_2D m_throughHoleAnnularRings; ///< List of via annular rings
BVH_CONTAINER_2D m_throughHoleViaOds; ///< List of via hole outer diameters
BVH_CONTAINER_2D m_throughHoleViaIds; ///< List of via hole inner diameters
BVH_CONTAINER_2D m_TH_ODs; ///< List of PTH outer diameters
BVH_CONTAINER_2D m_TH_IDs; ///< List of PTH inner diameters
BVH_CONTAINER_2D m_viaAnnuli; ///< List of via annular rings
BVH_CONTAINER_2D m_viaTH_ODs; ///< List of via hole outer diameters
unsigned int m_copperLayersCount;
double m_biuTo3Dunits; ///< Scale factor to convert board internal units to
///< 3D units normalized between -1.0 and 1.0.
double m_biuTo3Dunits; ///< Scale factor to convert board internal units
///< to 3D units normalized between -1.0 and 1.0.
std::array<float, PCB_LAYER_ID_COUNT> m_layerZcoordTop; ///< Top (End) Z position of each
///< layer in 3D units.
+250 -295
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,27 +24,23 @@
*/
/**
* @file create_graphic_brd_items.cpp
* @file create_3Dgraphic_brd_items.cpp
* @brief This file implements the creation of 2D graphic primitives of pcb items:
* pads, tracks, drawsegments, texts....
* It is based on the function found in the files:
* board_items_to_polygon_shape_transform.cpp
*/
#include "../3d_rendering/raytracing/shapes2D/ring_2d.h"
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
#include "fp_textbox.h"
#include <board_adapter.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
#include <fp_shape.h>
#include <pcb_textbox.h>
#include <board_design_settings.h>
#include <pcb_painter.h> // for PCB_RENDER_SETTINGS
#include <zone.h>
#include <fp_text.h>
#include <convert_basic_shapes_to_polygon.h>
#include <trigo.h>
#include <geometry/shape_segment.h>
@@ -63,6 +60,37 @@
#define TO_SFVEC2F( vec ) SFVEC2F( TO_3DU( vec.x ), TO_3DU( -vec.y ) )
void addFILLED_CIRCLE_2D( CONTAINER_2D_BASE* aContainer, const SFVEC2F& aCenter, float aRadius,
const BOARD_ITEM& aBoardItem )
{
if( aRadius > 0.0f )
aContainer->Add( new FILLED_CIRCLE_2D( aCenter, aRadius, aBoardItem ) );
}
void addRING_2D( CONTAINER_2D_BASE* aContainer, const SFVEC2F& aCenter, float aInnerRadius,
float aOuterRadius, const BOARD_ITEM& aBoardItem )
{
if( aOuterRadius > aInnerRadius && aInnerRadius > 0.0f )
aContainer->Add( new RING_2D( aCenter, aInnerRadius, aOuterRadius, aBoardItem ) );
}
void addROUND_SEGMENT_2D( CONTAINER_2D_BASE* aContainer, const SFVEC2F& aStart, const SFVEC2F& aEnd,
float aWidth, const BOARD_ITEM& aBoardItem )
{
if( Is_segment_a_circle( aStart, aEnd ) )
{
// Cannot add segments that have the same start and end point
addFILLED_CIRCLE_2D( aContainer, aStart, aWidth / 2, aBoardItem );
return;
}
if( aWidth > 0.0f )
aContainer->Add( new ROUND_SEGMENT_2D( aStart, aEnd, aWidth, aBoardItem ) );
}
void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
@@ -76,31 +104,14 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
if( aOwner && aOwner->IsKnockout() )
{
SHAPE_POLY_SET knockouts;
SHAPE_POLY_SET finalPoly;
const PCB_TEXT* pcbText = static_cast<const PCB_TEXT*>( aOwner );
CALLBACK_GAL callback_gal( empty_opts,
// Polygon callback
[&]( const SHAPE_LINE_CHAIN& aPoly )
{
knockouts.AddOutline( aPoly );
} );
attrs.m_StrokeWidth = aText->GetEffectiveTextPenWidth();
attrs.m_Angle = aText->GetDrawRotation();
callback_gal.SetIsFill( font->IsOutline() );
callback_gal.SetIsStroke( font->IsStroke() );
callback_gal.SetLineWidth( attrs.m_StrokeWidth );
font->Draw( &callback_gal, aText->GetShownText(), aText->GetDrawPos(), attrs );
SHAPE_POLY_SET finalPoly;
int margin = attrs.m_StrokeWidth * 1.5 +
GetKnockoutTextMargin( attrs.m_Size, attrs.m_StrokeWidth );
aText->TransformBoundingBoxToPolygon( &finalPoly, margin );
finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
finalPoly.Fracture( SHAPE_POLY_SET::PM_FAST );
pcbText->TransformTextToPolySet( finalPoly, 0, m_board->GetDesignSettings().m_MaxError,
ERROR_INSIDE );
// Do not call finalPoly.Fracture() here: ConvertPolygonToTriangles() call it
// if needed, and Fracture() called twice can create bad results and is useless
ConvertPolygonToTriangles( finalPoly, *aContainer, m_biuTo3Dunits, *aOwner );
}
else
@@ -109,24 +120,8 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
// Stroke callback
[&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2 )
{
const SFVEC2F pt1_3DU = TO_SFVEC2F( aPt1 );
const SFVEC2F pt2_3DU = TO_SFVEC2F( aPt2 );
if( penWidth_3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( pt1_3DU, pt2_3DU ) )
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( pt1_3DU, penWidth_3DU / 2,
*aOwner ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( pt1_3DU, pt2_3DU, penWidth_3DU,
*aOwner ) );
}
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( aPt1 ), TO_SFVEC2F( aPt2 ),
penWidth_3DU, *aOwner );
},
// Triangulation callback
[&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2, const VECTOR2I& aPt3 )
@@ -137,7 +132,8 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
attrs.m_Angle = aText->GetDrawRotation();
font->Draw( &callback_gal, aText->GetShownText(), aText->GetDrawPos(), attrs );
font->Draw( &callback_gal, aText->GetShownText( true ), aText->GetDrawPos(), attrs,
aOwner->GetFontMetrics() );
}
}
@@ -145,7 +141,7 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
void BOARD_ADAPTER::addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
addText( &aDimension->Text(), aContainer, aDimension );
addText( aDimension, aContainer, aDimension );
const int linewidth = aDimension->GetLineThickness();
@@ -157,18 +153,19 @@ void BOARD_ADAPTER::addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D
{
const SEG& seg = static_cast<const SHAPE_SEGMENT*>( shape.get() )->GetSeg();
aContainer->Add( new ROUND_SEGMENT_2D( TO_SFVEC2F( seg.A ), TO_SFVEC2F( seg.B ),
TO_3DU( linewidth ), *aOwner ) );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( seg.A ), TO_SFVEC2F( seg.B ),
TO_3DU( linewidth ), *aOwner );
break;
}
case SH_CIRCLE:
{
int radius = static_cast<const SHAPE_CIRCLE*>( shape.get() )->GetRadius();
int delta = aDimension->GetLineThickness() / 2;
float innerR3DU = TO_3DU( radius ) - TO_3DU( aDimension->GetLineThickness() ) / 2.0f;
float outerR3DU = TO_3DU( radius ) + TO_3DU( aDimension->GetLineThickness() ) / 2.0f;
addRING_2D( aContainer, TO_SFVEC2F( shape->Centre() ), innerR3DU, outerR3DU, *aOwner );
aContainer->Add( new RING_2D( TO_SFVEC2F( shape->Centre() ), TO_3DU( radius - delta ),
TO_3DU( radius + delta ), *aOwner ) );
break;
}
@@ -180,48 +177,69 @@ void BOARD_ADAPTER::addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D
void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId )
PCB_LAYER_ID aLayerId,
const std::bitset<LAYER_3D_END>& aVisibilityFlags )
{
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
if( aFootprint->Reference().GetLayer() == aLayerId && aFootprint->Reference().IsVisible() )
addText( &aFootprint->Reference(), aContainer, &aFootprint->Reference() );
for( PCB_FIELD* field : aFootprint->GetFields() )
{
if( field->GetLayer() == aLayerId && field->IsVisible() )
{
if( !aVisibilityFlags.test( LAYER_FP_TEXT ) )
continue;
else if( field->IsReference() && !aVisibilityFlags.test( LAYER_FP_REFERENCES ) )
continue;
else if( field->IsValue() && !aVisibilityFlags.test( LAYER_FP_VALUES ) )
continue;
if( aFootprint->Value().GetLayer() == aLayerId && aFootprint->Value().IsVisible() )
addText( &aFootprint->Value(), aContainer, &aFootprint->Value() );
addText( field, aContainer, field );
}
}
for( BOARD_ITEM* item : aFootprint->GraphicalItems() )
{
switch( item->Type() )
{
case PCB_FP_TEXT_T:
case PCB_TEXT_T:
{
FP_TEXT* text = static_cast<FP_TEXT*>( item );
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
if( text->GetLayer() == aLayerId && text->IsVisible() )
{
if( !aVisibilityFlags.test( LAYER_FP_TEXT ) )
continue;
else if( text->GetText() == wxT( "${REFERENCE}" ) && !aVisibilityFlags.test( LAYER_FP_REFERENCES ) )
continue;
else if( text->GetText() == wxT( "${VALUE}" ) && !aVisibilityFlags.test( LAYER_FP_VALUES ) )
continue;
addText( text, aContainer, text );
}
break;
}
case PCB_FP_TEXTBOX_T:
case PCB_TEXTBOX_T:
{
FP_TEXTBOX* textbox = static_cast<FP_TEXTBOX*>( item );
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
if( textbox->GetLayer() == aLayerId )
{
addShape( textbox, aContainer, aFootprint );
if( textbox->IsBorderEnabled() )
addShape( textbox, aContainer, aFootprint );
addText( textbox, aContainer, aFootprint );
}
break;
}
case PCB_FP_DIM_ALIGNED_T:
case PCB_FP_DIM_CENTER_T:
case PCB_FP_DIM_ORTHOGONAL_T:
case PCB_FP_DIM_RADIAL_T:
case PCB_FP_DIM_LEADER_T:
case PCB_DIM_ALIGNED_T:
case PCB_DIM_CENTER_T:
case PCB_DIM_ORTHOGONAL_T:
case PCB_DIM_RADIAL_T:
case PCB_DIM_LEADER_T:
{
PCB_DIMENSION_BASE* dimension = static_cast<PCB_DIMENSION_BASE*>( item );
@@ -231,9 +249,9 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2
break;
}
case PCB_FP_SHAPE_T:
case PCB_SHAPE_T:
{
FP_SHAPE* shape = static_cast<FP_SHAPE*>( item );
PCB_SHAPE* shape = static_cast<PCB_SHAPE*>( item );
if( shape->GetLayer() == aLayerId )
addShape( shape, aContainer, aFootprint );
@@ -248,6 +266,17 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2
}
void BOARD_ADAPTER::createViaWithMargin( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer,
int aMargin )
{
SFVEC2F start3DU = TO_SFVEC2F( aTrack->GetStart() );
SFVEC2F end3DU = TO_SFVEC2F( aTrack->GetEnd() );
const float radius3DU = TO_3DU( ( aTrack->GetWidth() / 2.0 ) + aMargin );
addFILLED_CIRCLE_2D( aDstContainer, start3DU, radius3DU, *aTrack );
}
void BOARD_ADAPTER::createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer )
{
SFVEC2F start3DU = TO_SFVEC2F( aTrack->GetStart() );
@@ -256,25 +285,36 @@ void BOARD_ADAPTER::createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDs
switch( aTrack->Type() )
{
case PCB_VIA_T:
{
const float radius3DU = TO_3DU( aTrack->GetWidth() / 2 );
if( radius3DU > 0.0 )
aDstContainer->Add( new FILLED_CIRCLE_2D( start3DU, radius3DU, *aTrack ) );
addFILLED_CIRCLE_2D( aDstContainer, start3DU, TO_3DU( aTrack->GetWidth() / 2.0 ), *aTrack );
break;
}
case PCB_ARC_T:
{
const PCB_ARC* arc = static_cast<const PCB_ARC*>( aTrack );
VECTOR2D center( arc->GetCenter() );
if( arc->IsDegenerated() )
{
// Draw this very small arc like a track segment (a PCB_TRACE_T)
PCB_TRACK track( arc->GetParent() );
track.SetStart( arc->GetStart() );
track.SetEnd( arc->GetEnd() );
track.SetWidth( arc->GetWidth() );
track.SetLayer( arc->GetLayer() );
createTrack( &track, aDstContainer );
return;
}
VECTOR2I center( arc->GetCenter() );
EDA_ANGLE arc_angle = arc->GetAngle();
double radius = arc->GetRadius();
int arcsegcount = GetArcToSegmentCount( radius, ARC_HIGH_DEF, arc_angle );
int arcsegcount = GetArcToSegmentCount( KiROUND( radius ), ARC_HIGH_DEF, arc_angle );
int circlesegcount;
// Avoid arcs that cannot be drawn
if( radius < std::numeric_limits<double>::min() || arc_angle.IsZero() )
break;
// We need a circle to segment count. However, the arc angle can be small, and the
// radius very big. so we calculate a reasonable value for circlesegcount.
if( arcsegcount <= 1 ) // The arc will be approximated by a segment
@@ -284,32 +324,17 @@ void BOARD_ADAPTER::createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDs
else
{
circlesegcount = KiROUND( arcsegcount * 360.0 / std::abs( arc_angle.AsDegrees() ) );
circlesegcount = std::max( 1, std::min( circlesegcount, 128 ) );
circlesegcount = alg::clamp( 1, circlesegcount, 128 );
}
transformArcToSegments( VECTOR2I( center.x, center.y ), arc->GetStart(), arc_angle,
circlesegcount, arc->GetWidth(), aDstContainer, *arc );
createArcSegments( center, arc->GetStart(), arc_angle, circlesegcount, arc->GetWidth(),
aDstContainer, *arc );
break;
}
case PCB_TRACE_T: // Track is a usual straight segment
{
if( aTrack->GetWidth() == 0 )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( start3DU, end3DU ) )
{
// Cannot add segments that have the same start and end point
aDstContainer->Add( new FILLED_CIRCLE_2D( start3DU, TO_3DU( aTrack->GetWidth() / 2 ),
*aTrack ) );
}
else
{
aDstContainer->Add( new ROUND_SEGMENT_2D( start3DU, end3DU, TO_3DU( aTrack->GetWidth() ),
*aTrack ) );
}
addROUND_SEGMENT_2D( aDstContainer, start3DU, end3DU, TO_3DU( aTrack->GetWidth() ), *aTrack );
break;
}
@@ -342,9 +367,19 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
return;
PAD dummy( *aPad );
dummy.SetSize( wxSize( dummySize.x, dummySize.y ) );
dummy.SetSize( VECTOR2I( dummySize.x, dummySize.y ) );
dummy.TransformShapeToPolygon( poly, aLayer, 0, maxError, ERROR_INSIDE );
clearance = { 0, 0 };
// Remove group membership from dummy item before deleting
dummy.SetParentGroup( nullptr );
}
else if( aPad->GetShape() == PAD_SHAPE::CUSTOM )
{
// A custom pad can have many complex subshape items. To avoid issues, use its
// final polygon shape, not its basic shape set. One cannot apply the clearance
// to each subshape: it does no work
aPad->TransformShapeToPolygon( poly, aLayer, 0, maxError );
}
else
{
@@ -358,24 +393,11 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
{
const SHAPE_SEGMENT* seg = static_cast<const SHAPE_SEGMENT*>( shape );
const SFVEC2F a3DU = TO_SFVEC2F( seg->GetSeg().A );
const SFVEC2F b3DU = TO_SFVEC2F( seg->GetSeg().B );
const double width3DU = TO_3DU( seg->GetWidth() + clearance.x * 2 );
if( width3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( a3DU, b3DU ) )
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( a3DU, width3DU / 2, *aPad ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( a3DU, b3DU, width3DU, *aPad ) );
}
addROUND_SEGMENT_2D( aContainer,
TO_SFVEC2F( seg->GetSeg().A ),
TO_SFVEC2F( seg->GetSeg().B ),
TO_3DU( seg->GetWidth() + clearance.x * 2 ),
*aPad );
break;
}
@@ -383,13 +405,10 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
{
const SHAPE_CIRCLE* circle = static_cast<const SHAPE_CIRCLE*>( shape );
const double radius3DU = TO_3DU( circle->GetRadius() + clearance.x );
const SFVEC2F center3DU = TO_SFVEC2F( circle->GetCenter() );
// Don't render zero radius circles
if( radius3DU > 0.0 )
aContainer->Add( new FILLED_CIRCLE_2D( center3DU, radius3DU, *aPad ) );
addFILLED_CIRCLE_2D( aContainer,
TO_SFVEC2F( circle->GetCenter() ),
TO_3DU( circle->GetRadius() + clearance.x ),
*aPad );
break;
}
@@ -410,7 +429,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
break;
case SH_POLY_SET:
poly = *(SHAPE_POLY_SET*) shape;
poly.Append( *static_cast<const SHAPE_POLY_SET*>( shape ) );
break;
case SH_ARC:
@@ -421,23 +440,12 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
for( int i = 0; i < l.SegmentCount(); i++ )
{
SHAPE_SEGMENT seg( l.Segment( i ).A, l.Segment( i ).B, arc->GetWidth() );
const SFVEC2F a3DU = TO_SFVEC2F( seg.GetSeg().A );
const SFVEC2F b3DU = TO_SFVEC2F( seg.GetSeg().B );
const double width3DU = TO_3DU( arc->GetWidth() + clearance.x * 2 );
if( width3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( a3DU, b3DU ) )
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( a3DU, width3DU / 2, *aPad ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( a3DU, b3DU, width3DU, *aPad ) );
}
addROUND_SEGMENT_2D( aContainer,
TO_SFVEC2F( seg.GetSeg().A ),
TO_SFVEC2F( seg.GetSeg().B ),
TO_3DU( arc->GetWidth() + clearance.x * 2 ),
*aPad );
}
break;
@@ -453,7 +461,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
if( !poly.IsEmpty() )
{
if( clearance.x )
poly.Inflate( clearance.x, 32 );
poly.Inflate( clearance.x, CORNER_STRATEGY::ROUND_ALL_CORNERS, maxError );
// Add the PAD polygon
ConvertPolygonToTriangles( poly, *aContainer, m_biuTo3Dunits, *aPad );
@@ -461,68 +469,44 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
}
OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue )
void BOARD_ADAPTER::createPadWithHole( const PAD* aPad, CONTAINER_2D_BASE* aDstContainer,
int aInflateValue )
{
if( !aPad->HasHole() )
{
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::createPadWithDrill - found an invalid pad" ) );
return nullptr;
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::createPadWithHole - found an invalid pad" ) );
return;
}
std::shared_ptr<SHAPE_SEGMENT> slot = aPad->GetEffectiveHoleShape();
if( slot->GetSeg().A == slot->GetSeg().B )
{
return new FILLED_CIRCLE_2D( TO_SFVEC2F( slot->GetSeg().A ),
TO_3DU( slot->GetWidth() / 2 + aInflateValue ),
*aPad );
}
else
{
return new ROUND_SEGMENT_2D( TO_SFVEC2F( slot->GetSeg().A ),
TO_SFVEC2F( slot->GetSeg().B ),
TO_3DU( slot->GetWidth() + aInflateValue * 2 ),
*aPad );
}
addROUND_SEGMENT_2D( aDstContainer,
TO_SFVEC2F( slot->GetSeg().A ),
TO_SFVEC2F( slot->GetSeg().B ),
TO_3DU( slot->GetWidth() + aInflateValue * 2 ),
*aPad );
}
void BOARD_ADAPTER::addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId, bool aSkipNPTHPadsWihNoCopper,
bool aSkipPlatedPads, bool aSkipNonPlatedPads )
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads )
{
for( PAD* pad : aFootprint->Pads() )
{
if( !pad->IsOnLayer( aLayerId ) )
continue;
// Skip pad annulus when not connected on this layer (if removing is enabled)
if( !pad->FlashLayer( aLayerId ) && IsCopperLayer( aLayerId ) )
continue;
// NPTH pads are not drawn on layers if the shape size and pos is the same as their hole:
if( aSkipNPTHPadsWihNoCopper && ( pad->GetAttribute() == PAD_ATTRIB::NPTH ) )
if( IsCopperLayer( aLayerId ) )
{
if( pad->GetDrillSize() == pad->GetSize() && pad->GetOffset() == wxPoint( 0, 0 ) )
{
switch( pad->GetShape() )
{
case PAD_SHAPE::CIRCLE:
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
continue;
// Skip pad annulus when there isn't one (note: this is more discerning than
// pad->IsOnLayer(), which doesn't check for NPTH pads with holes that consume
// the entire pad).
if( !pad->IsOnCopperLayer() )
continue;
break;
case PAD_SHAPE::OVAL:
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE )
continue;
break;
default:
break;
}
}
// Skip pad annulus when not connected on this layer (if removing is enabled)
if( !pad->FlashLayer( aLayerId ) )
continue;
}
VECTOR2I margin( 0, 0 );
@@ -569,10 +553,10 @@ void BOARD_ADAPTER::addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aCo
// based on TransformArcToPolygon function from
// common/convert_basic_shapes_to_polygon.cpp
void BOARD_ADAPTER::transformArcToSegments( const VECTOR2I& aCentre, const VECTOR2I& aStart,
const EDA_ANGLE& aArcAngle, int aCircleToSegmentsCount,
int aWidth, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM& aOwner )
void BOARD_ADAPTER::createArcSegments( const VECTOR2I& aCentre, const VECTOR2I& aStart,
const EDA_ANGLE& aArcAngle, int aCircleToSegmentsCount,
int aWidth, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM& aOwner )
{
// Don't attempt to render degenerate shapes
if( aWidth == 0 )
@@ -602,26 +586,16 @@ void BOARD_ADAPTER::transformArcToSegments( const VECTOR2I& aCentre, const VECTO
curr_end = arc_start;
RotatePoint( curr_end, aCentre, -ii );
const SFVEC2F start3DU = TO_SFVEC2F( curr_start );
const SFVEC2F end3DU = TO_SFVEC2F( curr_end );
if( Is_segment_a_circle( start3DU, end3DU ) )
aContainer->Add( new FILLED_CIRCLE_2D( start3DU, TO_3DU( aWidth / 2 ), aOwner ) );
else
aContainer->Add( new ROUND_SEGMENT_2D( start3DU, end3DU, TO_3DU( aWidth ), aOwner ) );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( curr_start ), TO_SFVEC2F( curr_end ),
TO_3DU( aWidth ), aOwner );
curr_start = curr_end;
}
if( curr_end != arc_end )
{
const SFVEC2F start3DU = TO_SFVEC2F( curr_end );
const SFVEC2F end3DU = TO_SFVEC2F( arc_end );
if( Is_segment_a_circle( start3DU, end3DU ) )
aContainer->Add( new FILLED_CIRCLE_2D( start3DU, TO_3DU( aWidth / 2 ), aOwner ) );
else
aContainer->Add( new ROUND_SEGMENT_2D( start3DU, end3DU, TO_3DU( aWidth ), aOwner ) );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( curr_end ), TO_SFVEC2F( arc_end ),
TO_3DU( aWidth ), aOwner );
}
}
@@ -630,42 +604,28 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
const BOARD_ITEM* aOwner )
{
// The full width of the lines to create
// The extra 1 protects the inner/outer radius values from degeneracy
const int linewidth = aShape->GetWidth() + 1;
PLOT_DASH_TYPE lineStyle = aShape->GetStroke().GetPlotStyle();
const float linewidth3DU = TO_3DU( aShape->GetWidth() );
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
{
switch( aShape->GetShape() )
{
case SHAPE_T::CIRCLE:
{
const SFVEC2F center3DU = TO_SFVEC2F( aShape->GetCenter() );
float inner_radius3DU = TO_3DU( aShape->GetRadius() - linewidth / 2 );
float outer_radius3DU = TO_3DU( aShape->GetRadius() + linewidth / 2 );
SFVEC2F center3DU = TO_SFVEC2F( aShape->GetCenter() );
float innerR3DU = TO_3DU( aShape->GetRadius() ) - linewidth3DU / 2.0;
float outerR3DU = TO_3DU( aShape->GetRadius() ) + linewidth3DU / 2.0;
if( inner_radius3DU < 0 )
inner_radius3DU = 0.0;
if( outer_radius3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( aShape->IsFilled() )
{
aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU,
*aOwner ) );
}
if( aShape->IsFilled() || innerR3DU <= 0.0 )
addFILLED_CIRCLE_2D( aContainer, center3DU, outerR3DU, *aOwner );
else
{
aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU,
*aOwner ) );
}
addRING_2D( aContainer, center3DU, innerR3DU, outerR3DU, *aOwner );
break;
}
case SHAPE_T::RECT:
case SHAPE_T::RECTANGLE:
if( aShape->IsFilled() )
{
SHAPE_POLY_SET polyList;
@@ -681,14 +641,14 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
{
std::vector<VECTOR2I> pts = aShape->GetRectCorners();
aContainer->Add( new ROUND_SEGMENT_2D( TO_SFVEC2F( pts[0] ), TO_SFVEC2F( pts[1] ),
TO_3DU( linewidth ), *aOwner ) );
aContainer->Add( new ROUND_SEGMENT_2D( TO_SFVEC2F( pts[1] ), TO_SFVEC2F( pts[2] ),
TO_3DU( linewidth ), *aOwner ) );
aContainer->Add( new ROUND_SEGMENT_2D( TO_SFVEC2F( pts[2] ), TO_SFVEC2F( pts[3] ),
TO_3DU( linewidth ), *aOwner ) );
aContainer->Add( new ROUND_SEGMENT_2D( TO_SFVEC2F( pts[3] ), TO_SFVEC2F( pts[0] ),
TO_3DU( linewidth ), *aOwner ) );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[0] ), TO_SFVEC2F( pts[1] ),
linewidth3DU, *aOwner );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[1] ), TO_SFVEC2F( pts[2] ),
linewidth3DU, *aOwner );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[2] ), TO_SFVEC2F( pts[3] ),
linewidth3DU, *aOwner );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[3] ), TO_SFVEC2F( pts[0] ),
linewidth3DU, *aOwner );
}
break;
@@ -696,33 +656,15 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
{
unsigned int segCount = GetCircleSegmentCount( aShape->GetBoundingBox().GetSizeMax() );
transformArcToSegments( aShape->GetCenter(), aShape->GetStart(), aShape->GetArcAngle(),
segCount, linewidth, aContainer, *aOwner );
createArcSegments( aShape->GetCenter(), aShape->GetStart(), aShape->GetArcAngle(),
segCount, aShape->GetWidth(), aContainer, *aOwner );
break;
}
case SHAPE_T::SEGMENT:
{
const SFVEC2F start3DU = TO_SFVEC2F( aShape->GetStart() );
const SFVEC2F end3DU = TO_SFVEC2F( aShape->GetEnd() );
const double linewidth3DU = TO_3DU( linewidth );
if( linewidth3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( start3DU, end3DU ) )
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( start3DU, linewidth3DU / 2, *aOwner ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( start3DU, end3DU, linewidth3DU, *aOwner ) );
}
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( aShape->GetStart() ),
TO_SFVEC2F( aShape->GetEnd() ), linewidth3DU, *aOwner );
break;
}
case SHAPE_T::BEZIER:
case SHAPE_T::POLY:
@@ -732,6 +674,11 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, ARC_HIGH_DEF,
ERROR_INSIDE );
// Some polygons can be a bit complex (especially when coming from a
// picture ot a text converted to a polygon
// So call Simplify before calling ConvertPolygonToTriangles, just in case.
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
if( polyList.IsEmpty() ) // Just for caution
break;
@@ -745,12 +692,11 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
break;
}
}
else if( linewidth > 0 )
else
{
std::vector<SHAPE*> shapes = aShape->MakeEffectiveShapes( true );
SFVEC2F a3DU;
SFVEC2F b3DU;
double width3DU = TO_3DU( linewidth );
const PCB_PLOT_PARAMS& plotParams = aShape->GetBoard()->GetPlotOptions();
KIGFX::PCB_RENDER_SETTINGS renderSettings;
@@ -760,16 +706,11 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
for( SHAPE* shape : shapes )
{
STROKE_PARAMS::Stroke( shape, lineStyle, linewidth, &renderSettings,
STROKE_PARAMS::Stroke( shape, lineStyle, aShape->GetWidth(), &renderSettings,
[&]( const VECTOR2I& a, const VECTOR2I& b )
{
a3DU = TO_SFVEC2F( a );
b3DU = TO_SFVEC2F( b );
if( Is_segment_a_circle( a3DU, b3DU ) )
aContainer->Add( new FILLED_CIRCLE_2D( a3DU, width3DU / 2, *aOwner ) );
else
aContainer->Add( new ROUND_SEGMENT_2D( a3DU, b3DU, width3DU, *aOwner ) );
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( a ), TO_SFVEC2F( b ),
linewidth3DU, *aOwner );
} );
}
@@ -779,12 +720,38 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
}
void BOARD_ADAPTER::addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
addText( aTextBox, aContainer, aOwner );
if( !aTextBox->IsBorderEnabled() )
return;
// We cannot use PCB_TEXTBOX::TransformShapeToPolygon because it convert the textbox
// as filled polygon even if there's no background colour.
// So for polygon, we use PCB_SHAPE::TransformShapeToPolygon
if( aTextBox->GetShape() == SHAPE_T::RECTANGLE )
addShape( static_cast<const PCB_SHAPE*>( aTextBox ), aContainer, aOwner );
else
{
SHAPE_POLY_SET polyList;
aTextBox->PCB_SHAPE::TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0,
ARC_HIGH_DEF, ERROR_INSIDE );
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
}
}
void BOARD_ADAPTER::addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId )
{
// This convert the poly in outline and holes
ConvertPolygonToTriangles( *aZone->GetFilledPolysList( aLayerId ), *aContainer,
m_biuTo3Dunits, *aZone );
ConvertPolygonToTriangles( *aZone->GetFilledPolysList( aLayerId ), *aContainer, m_biuTo3Dunits,
*aZone );
}
@@ -795,35 +762,23 @@ void BOARD_ADAPTER::buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BAS
{
const SFVEC2F center3DU = TO_SFVEC2F( aPad->ShapePos() );
const int radius = aPad->GetSize().x / 2;
const float inner_radius3DU = TO_3DU( radius - aWidth / 2 );
const float outer_radius3DU = TO_3DU( radius + aWidth / 2 );
const float inner_radius3DU = TO_3DU( radius - aWidth / 2.0 );
const float outer_radius3DU = TO_3DU( radius + aWidth / 2.0 );
aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU, *aPad ) );
return;
addRING_2D( aContainer, center3DU, inner_radius3DU, outer_radius3DU, *aPad );
}
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon();
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
for( int j = 0; j < path.PointCount(); j++ )
else
{
SFVEC2F start3DU = TO_SFVEC2F( path.CPoint( j ) );
SFVEC2F end3DU = TO_SFVEC2F( path.CPoint( j + 1 ) );
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon( ERROR_INSIDE );
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
if( aWidth == 0 )
for( int j = 0; j < path.PointCount(); j++ )
{
// Don't attempt to render degenerate shapes
}
else if( Is_segment_a_circle( start3DU, end3DU ) )
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( start3DU, TO_3DU( aWidth / 2 ), *aPad ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( start3DU, end3DU, TO_3DU( aWidth ), *aPad ) );
SFVEC2F start3DU = TO_SFVEC2F( path.CPoint( j ) );
SFVEC2F end3DU = TO_SFVEC2F( path.CPoint( j + 1 ) );
addROUND_SEGMENT_2D( aContainer, start3DU, end3DU, TO_3DU( aWidth ), *aPad );
}
}
}
File diff suppressed because it is too large Load Diff
-89
View File
@@ -1,89 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file create_layer_poly.cpp
* @brief This file implements the creation of the pcb board items in the poly
* contours format.
*/
#include "board_adapter.h"
#include <board_design_settings.h>
#include <convert_basic_shapes_to_polygon.h>
#include <fp_shape.h>
#include <footprint.h>
/*
* This is used to draw pad outlines on silk layers.
*/
void BOARD_ADAPTER::buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& aBuffer,
int aWidth ) const
{
int maxError = m_board->GetDesignSettings().m_MaxError;
if( aPad->GetShape() == PAD_SHAPE::CIRCLE ) // Draw a ring
{
TransformRingToPolygon( aBuffer, aPad->ShapePos(), aPad->GetSize().x / 2, aWidth, maxError,
ERROR_INSIDE );
return;
}
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon();
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
for( int ii = 0; ii < path.PointCount(); ++ii )
{
const VECTOR2I& a = path.CPoint( ii );
const VECTOR2I& b = path.CPoint( ii + 1 );
TransformOvalToPolygon( aBuffer, a, b, aWidth, maxError, ERROR_INSIDE );
}
}
void BOARD_ADAPTER::transformFPShapesToPolySet( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLayer,
SHAPE_POLY_SET& aBuffer ) const
{
int maxError = m_board->GetDesignSettings().m_MaxError;
for( BOARD_ITEM* item : aFootprint->GraphicalItems() )
{
if( item->Type() == PCB_FP_SHAPE_T )
{
FP_SHAPE* shape = static_cast<FP_SHAPE*>( item );
if( shape->GetLayer() == aLayer )
shape->TransformShapeToPolygon( aBuffer, aLayer, 0, maxError, ERROR_INSIDE );
}
else if( BaseType( item->Type() ) == PCB_DIMENSION_T )
{
PCB_DIMENSION_BASE* dimension = static_cast<PCB_DIMENSION_BASE*>( item );
if( dimension->GetLayer() == aLayer )
dimension->TransformShapeToPolygon( aBuffer, aLayer, 0, maxError, ERROR_INSIDE );
}
}
}
+64 -80
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,7 +23,7 @@
*/
#include <gal/opengl/kiglew.h> // Must be included first
#include <gl_utils.h>
#include <gal/opengl/gl_utils.h>
#include <wx/tokenzr.h>
#include "../common_ogl/ogl_utils.h"
@@ -32,13 +32,14 @@
#include <3d_rendering/raytracing/render_3d_raytrace.h>
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <build_version.h>
#include <board.h>
#include <reporter.h>
#include <gl_context_mgr.h>
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <gal/opengl/gl_context_mgr.h>
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <bitmaps.h>
#include <macros.h>
#include <menus_helpers.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <tool/tool_dispatcher.h>
@@ -70,10 +71,7 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, HIDPI_GL_3D_CANVAS )
EVT_MIDDLE_DOWN( EDA_3D_CANVAS::OnMiddleDown)
EVT_MOUSEWHEEL( EDA_3D_CANVAS::OnMouseWheel )
EVT_MOTION( EDA_3D_CANVAS::OnMouseMove )
#if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT )
EVT_MAGNIFY( EDA_3D_CANVAS::OnMagnify )
#endif
// other events
EVT_ERASE_BACKGROUND( EDA_3D_CANVAS::OnEraseBackground )
@@ -87,7 +85,8 @@ END_EVENT_TABLE()
EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
BOARD_ADAPTER& aBoardAdapter, CAMERA& aCamera,
S3D_CACHE* a3DCachePointer ) :
HIDPI_GL_3D_CANVAS( aCamera, aParent, wxID_ANY, aAttribList, wxDefaultPosition,
HIDPI_GL_3D_CANVAS( EDA_DRAW_PANEL_GAL::GetVcSettings(), aCamera, aParent, wxID_ANY,
aAttribList, wxDefaultPosition,
wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ),
m_eventDispatcher( nullptr ),
m_parentStatusBar( nullptr ),
@@ -140,7 +139,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
// long calculation time)
m_3d_render = m_3d_render_opengl;
m_boardAdapter.SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
m_boardAdapter.ReloadColorSettings();
wxASSERT( a3DCachePointer != nullptr );
m_boardAdapter.Set3dCacheManager( a3DCachePointer );
@@ -155,9 +154,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
wxEVT_RIGHT_UP, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_DCLICK,
wxEVT_MIDDLE_UP, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_DCLICK,
wxEVT_MOTION, wxEVT_MOUSEWHEEL, wxEVT_CHAR, wxEVT_CHAR_HOOK,
#if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT )
wxEVT_MAGNIFY,
#endif
wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT
};
@@ -230,10 +227,13 @@ bool EDA_3D_CANVAS::initializeOpenGL()
else
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s" ),
FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
wxString version = FROM_UTF8( (char *) glGetString( GL_VERSION ) );
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
__WXFUNCTION__, version );
@@ -303,7 +303,7 @@ void EDA_3D_CANVAS::ReloadRequest( BOARD* aBoard , S3D_CACHE* aCachePointer )
if( aBoard != nullptr )
m_boardAdapter.SetBoard( aBoard );
m_boardAdapter.SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
m_boardAdapter.ReloadColorSettings();
if( m_3d_render )
m_3d_render->ReloadRequest();
@@ -334,6 +334,9 @@ void EDA_3D_CANVAS::DisplayStatus()
msg.Printf( wxT( "dy %3.2f" ), m_camera.GetCameraPos().y );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::Y_POS ) );
msg.Printf( wxT( "zoom %3.2f" ), 1 / m_camera.GetZoom() );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::ZOOM_LEVEL ) );
}
}
@@ -364,16 +367,13 @@ void EDA_3D_CANVAS::DoRePaint()
// therefore with invalid board.
// This is dependent of the platform.
// Especially on OSX, but also on Windows, it frequently happens
if( !GetParent()->GetParent()->IsShown() )
if( !GetParent()->GetParent()->IsShownOnScreen() )
return; // The parent board editor frame is no more alive
wxString err_messages;
// !TODO: implement error reporter
wxString err_messages;
INFOBAR_REPORTER warningReporter( m_parentInfoBar );
STATUSBAR_REPORTER activityReporter( m_parentStatusBar, EDA_3D_VIEWER_STATUSBAR::ACTIVITY );
unsigned strtime = GetRunningMicroSecs();
int64_t start_time = GetRunningMicroSecs();
// "Makes the OpenGL state that is represented by the OpenGL rendering
// context context current, i.e. it will be used by all subsequent OpenGL calls.
@@ -383,6 +383,15 @@ void EDA_3D_CANVAS::DoRePaint()
if( m_glRC == nullptr )
m_glRC = GL_CONTEXT_MANAGER::Get().CreateCtx( this );
// CreateCtx could and does fail per sentry crash events, lets be graceful
if( m_glRC == nullptr )
{
warningReporter.Report( _( "OpenGL context creation error" ), RPT_SEVERITY_ERROR );
warningReporter.Finalize();
m_is_currently_painting.clear();
return;
}
GL_CONTEXT_MANAGER::Get().LockCtx( m_glRC, this );
// Set the OpenGL viewport according to the client size of this canvas.
@@ -456,7 +465,7 @@ void EDA_3D_CANVAS::DoRePaint()
if( m_camera_is_moving )
{
const unsigned curtime_delta = GetRunningMicroSecs() - m_strtime_camera_movement;
const int64_t curtime_delta = GetRunningMicroSecs() - m_strtime_camera_movement;
curtime_delta_s = (curtime_delta / 1e6) * m_camera_moving_speed;
m_camera.Interpolate( curtime_delta_s );
@@ -522,13 +531,13 @@ void EDA_3D_CANVAS::DoRePaint()
render_pivot( curtime_delta_s, scale );
}
#if defined( KICAD_USE_3DCONNEXION )
// This will only be enabled by the 3d mouse plugin, so we can leave
// it as a simple if statement
if( m_render3dmousePivot )
{
const float scale = glm::min( m_camera.GetZoom(), 1.0f );
render3dmousePivot( scale );
}
#endif
// "Swaps the double-buffer of this window, making the back-buffer the
// front-buffer and vice versa, so that the output of the previous OpenGL
@@ -537,16 +546,13 @@ void EDA_3D_CANVAS::DoRePaint()
GL_CONTEXT_MANAGER::Get().UnlockCtx( m_glRC );
if( !activityReporter.HasMessage() )
if( m_mouse_was_moved || m_camera_is_moving )
{
if( m_mouse_was_moved || m_camera_is_moving )
{
// Calculation time in milliseconds
const double calculation_time = (double)( GetRunningMicroSecs() - strtime) / 1e3;
// Calculation time in milliseconds
const double calculation_time = (double)( GetRunningMicroSecs() - start_time ) / 1e3;
activityReporter.Report( wxString::Format( _( "Last render time %.0f ms" ),
calculation_time ) );
}
activityReporter.Report( wxString::Format( _( "Last render time %.0f ms" ),
calculation_time ) );
}
// This will reset the flag of camera parameters changed
@@ -606,7 +612,6 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
}
#if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT )
void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
{
SetFocus();
@@ -624,11 +629,13 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
DisplayStatus();
Request_refresh();
}
#endif
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
return; // Prevents using invalid m_3d_render_raytracing data
if( m_camera_is_moving )
return;
@@ -745,6 +752,11 @@ void EDA_3D_CANVAS::OnLeftDown( wxMouseEvent& event )
SetFocus();
stop_editingTimeOut_Timer();
// Ensure m_camera.m_lastPosition (current mouse position) is up to date for
// future drag events (can be not the case when left clicking after
// opening a context menu)
OnMouseMoveCamera( event );
if( !event.Dragging() && ( m_3d_render_raytracing != nullptr ) )
{
RAY mouseRay = getRayAtCurrentMousePosition();
@@ -835,7 +847,7 @@ void EDA_3D_CANVAS::OnTimerTimeout_Redraw( wxTimerEvent& aEvent )
void EDA_3D_CANVAS::OnRefreshRequest( wxEvent& aEvent )
{
DoRePaint();
Refresh();
}
@@ -908,68 +920,56 @@ void EDA_3D_CANVAS::move_pivot_based_on_cur_mouse_position()
}
bool EDA_3D_CANVAS::SetView3D( int aKeycode )
bool EDA_3D_CANVAS::SetView3D( VIEW3D_TYPE aRequestedView )
{
if( m_camera_is_moving )
return false;
const float delta_move = m_delta_move_step_factor * m_camera.GetZoom();
const float arrow_moving_time_speed = 8.0f;
bool handled = false;
switch( aKeycode )
switch( aRequestedView )
{
case WXK_SPACE:
case VIEW3D_TYPE::VIEW3D_PIVOT_CENTER:
move_pivot_based_on_cur_mouse_position();
return true;
case WXK_LEFT:
case VIEW3D_TYPE::VIEW3D_PAN_LEFT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::LINEAR );
m_camera.SetT0_and_T1_current_T();
m_camera.Pan_T1( SFVEC3F( -delta_move, 0.0f, 0.0f ) );
request_start_moving_camera( arrow_moving_time_speed, false );
return true;
case WXK_RIGHT:
case VIEW3D_TYPE::VIEW3D_PAN_RIGHT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::LINEAR );
m_camera.SetT0_and_T1_current_T();
m_camera.Pan_T1( SFVEC3F( +delta_move, 0.0f, 0.0f ) );
request_start_moving_camera( arrow_moving_time_speed, false );
return true;
case WXK_UP:
case VIEW3D_TYPE::VIEW3D_PAN_UP:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::LINEAR );
m_camera.SetT0_and_T1_current_T();
m_camera.Pan_T1( SFVEC3F( 0.0f, +delta_move, 0.0f ) );
request_start_moving_camera( arrow_moving_time_speed, false );
return true;
case WXK_DOWN:
case VIEW3D_TYPE::VIEW3D_PAN_DOWN:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::LINEAR );
m_camera.SetT0_and_T1_current_T();
m_camera.Pan_T1( SFVEC3F( 0.0f, -delta_move, 0.0f ) );
request_start_moving_camera( arrow_moving_time_speed, false );
return true;
case WXK_HOME:
case VIEW3D_TYPE::VIEW3D_FIT_SCREEN:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
request_start_moving_camera( glm::min( glm::max( m_camera.GetZoom(), 1 / 1.26f ), 1.26f ) );
return true;
case WXK_END:
break;
case WXK_TAB:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::EASING_IN_OUT );
m_camera.SetT0_and_T1_current_T();
m_camera.RotateZ_T1( glm::radians( 45.0f ) );
request_start_moving_camera();
handled = true;
break;
case WXK_F1:
case VIEW3D_TYPE::VIEW3D_ZOOM_IN:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
@@ -978,7 +978,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
return true;
case WXK_F2:
case VIEW3D_TYPE::VIEW3D_ZOOM_OUT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
@@ -987,14 +987,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
return true;
case ID_VIEW3D_RESET:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
request_start_moving_camera( glm::min( glm::max( m_camera.GetZoom(), 0.5f ), 1.125f ) );
return true;
case ID_VIEW3D_RIGHT:
case VIEW3D_TYPE::VIEW3D_RIGHT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
@@ -1003,7 +996,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
request_start_moving_camera();
return true;
case ID_VIEW3D_LEFT:
case VIEW3D_TYPE::VIEW3D_LEFT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
@@ -1012,7 +1005,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
request_start_moving_camera();
return true;
case ID_VIEW3D_FRONT:
case VIEW3D_TYPE::VIEW3D_FRONT:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
@@ -1020,7 +1013,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
request_start_moving_camera();
return true;
case ID_VIEW3D_BACK:
case VIEW3D_TYPE::VIEW3D_BACK:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
@@ -1033,14 +1026,14 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
request_start_moving_camera();
return true;
case ID_VIEW3D_TOP:
case VIEW3D_TYPE::VIEW3D_TOP:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
request_start_moving_camera( glm::min( glm::max( m_camera.GetZoom(), 0.5f ), 1.125f ) );
return true;
case ID_VIEW3D_BOTTOM:
case VIEW3D_TYPE::VIEW3D_BOTTOM:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.Reset_T1();
@@ -1048,7 +1041,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
request_start_moving_camera( glm::min( glm::max( m_camera.GetZoom(), 0.5f ), 1.125f ) );
return true;
case ID_VIEW3D_FLIP:
case VIEW3D_TYPE::VIEW3D_FLIP:
m_camera.SetInterpolateMode( CAMERA_INTERPOLATION::BEZIER );
m_camera.SetT0_and_T1_current_T();
m_camera.RotateY_T1( glm::radians( 179.999f ) );
@@ -1058,15 +1051,6 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
default:
return false;
}
m_mouse_was_moved = true;
restart_editingTimeOut_Timer();
DisplayStatus();
Request_refresh();
return handled;
}
+9 -21
View File
@@ -114,12 +114,12 @@ public:
void GetScreenshot( wxImage& aDstImage );
/**
* Helper function to call view commands.
* Select a specific 3D view or operation
*
* @param aKeycode ascii key commands.
* @return true if the key code was handled, false if no command found for this code.
* @param aRequestedView the view to move to
* @return true if the view request was handled, false if no command found for this view.
*/
bool SetView3D( int aKeycode );
bool SetView3D( VIEW3D_TYPE aRequestedView );
/**
* Enable or disable camera animation when switching to a pre-defined view.
@@ -178,8 +178,6 @@ public:
*/
void SetRenderPivot( bool aValue ) { m_render_pivot = aValue; }
#if defined( KICAD_USE_3DCONNEXION )
/**
* Get a value indicating whether to render the 3dmouse pivot.
*/
@@ -209,13 +207,6 @@ public:
{
m_3dmousePivotPos = aPos;
}
#endif
private:
/**
* Called by a wxPaintEvent event
*/
void OnPaint( wxPaintEvent& aEvent );
/**
* The actual function to repaint the canvas.
@@ -225,16 +216,17 @@ private:
*/
void DoRePaint();
private:
// The wxPaintEvent event. mainly calls DoRePaint()
void OnPaint( wxPaintEvent& aEvent );
void OnEraseBackground( wxEraseEvent& event );
void OnRefreshRequest( wxEvent& aEvent );
void OnMouseWheel( wxMouseEvent& event );
#if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT )
void OnMagnify( wxMouseEvent& event );
#endif
void OnMouseMove( wxMouseEvent& event );
void OnLeftDown( wxMouseEvent& event );
void OnLeftUp( wxMouseEvent& event );
@@ -278,14 +270,12 @@ private:
*/
void render_pivot( float t, float aScale );
#if defined( KICAD_USE_3DCONNEXION )
/**
* Render the 3dmouse pivot cursor.
*
* @param aScale scale to apply on the cursor.
*/
void render3dmousePivot( float aScale );
#endif
/**
* @return true if OpenGL initialization succeeded.
@@ -315,7 +305,7 @@ private:
bool m_render_pivot; // Render the pivot while camera moving
float m_camera_moving_speed; // 1.0f will be 1:1
unsigned m_strtime_camera_movement; // Ticktime of camera movement start
int64_t m_strtime_camera_movement; // Ticktime of camera movement start
bool m_animation_enabled; // Camera animation enabled
int m_moving_speed_multiplier; // Camera animation speed multiplier option
@@ -331,10 +321,8 @@ private:
BOARD_ITEM* m_currentRollOverItem;
#if defined( KICAD_USE_3DCONNEXION )
bool m_render3dmousePivot = false; // Render the 3dmouse pivot
SFVEC3F m_3dmousePivotPos; // The position of the 3dmouse pivot
#endif
/**
* Trace mask used to enable or disable the trace output of this class.
@@ -120,7 +120,6 @@ void EDA_3D_CANVAS::render_pivot( float t, float aScale )
}
#if defined( KICAD_USE_3DCONNEXION )
void EDA_3D_CANVAS::render3dmousePivot( float aScale )
{
wxASSERT( aScale >= 0.0f );
@@ -160,4 +159,3 @@ void EDA_3D_CANVAS::render3dmousePivot( float aScale )
glDisable( GL_BLEND );
glDisable( GL_POINT_SMOOTH );
}
#endif
+24
View File
@@ -74,4 +74,28 @@ enum class MATERIAL_MODE
CAD_MODE = 2 ///< Use a gray shading based on diffuse material
};
enum class VIEW3D_TYPE
{
// Specific directions
VIEW3D_TOP,
VIEW3D_BOTTOM,
VIEW3D_LEFT,
VIEW3D_RIGHT,
VIEW3D_FRONT,
VIEW3D_BACK,
VIEW3D_FLIP,
// Movement commands
VIEW3D_PAN_UP,
VIEW3D_PAN_DOWN,
VIEW3D_PAN_LEFT,
VIEW3D_PAN_RIGHT,
VIEW3D_ZOOM_IN,
VIEW3D_ZOOM_OUT,
VIEW3D_PIVOT_CENTER,
// Specific levels
VIEW3D_FIT_SCREEN
};
#endif // _3D_ENUMS_H_
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -35,10 +35,12 @@
#include "../3d_cache/3d_cache.h"
#include <wx/dcclient.h>
#include <base_units.h>
#include <gl_context_mgr.h>
#include <build_version.h>
#include <gal/opengl/gl_context_mgr.h>
#include <settings/common_settings.h>
#include <pgm_base.h>
#include <gal/dpi_scaling.h>
#include <dpi_scaling_common.h>
#include <class_draw_panel_gal.h>
#include <macros.h>
/**
@@ -86,7 +88,8 @@ END_EVENT_TABLE()
EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList,
S3D_CACHE* aCacheManager ) :
HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize,
HIDPI_GL_CANVAS( EDA_DRAW_PANEL_GAL::GetVcSettings(), aParent, wxID_ANY, aAttribList,
wxDefaultPosition, wxDefaultSize,
wxFULL_REPAINT_ON_RESIZE ),
m_trackBallCamera( RANGE_SCALE_3D * 4.0f ),
m_cacheManager( aCacheManager )
@@ -100,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribL
m_BiuTo3dUnits = 1.0;
m_glRC = nullptr;
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING dpi{ settings, this };
SetScaleFactor( dpi.GetScaleFactor() );
}
@@ -195,9 +193,12 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
else
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::ogl_initialize Using GLEW version %s" ),
FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
@@ -257,6 +258,13 @@ void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
if( m_glRC == nullptr )
m_glRC = GL_CONTEXT_MANAGER::Get().CreateCtx( this );
// CreateCtx could and does fail per sentry crash events, lets be graceful
if( m_glRC == nullptr )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint creating gl context failed" ) );
return;
}
GL_CONTEXT_MANAGER::Get().LockCtx( m_glRC, this );
// Set the OpenGL viewport according to the client size of this canvas.
@@ -323,8 +331,16 @@ void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
m_ogl_3dmodel->BeginDrawMulti( true );
m_ogl_3dmodel->DrawOpaque( false );
glDepthMask( GL_FALSE );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
m_ogl_3dmodel->DrawTransparent( 1.0f, false );
glDisable( GL_BLEND );
glDepthMask( GL_TRUE );
m_ogl_3dmodel->EndDrawMulti();
glPopMatrix();
@@ -385,16 +401,16 @@ void EDA_3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event )
if( event.ShiftDown() )
{
//if( event.GetWheelRotation() < 0 )
//SetView3D( WXK_UP ); // move up
//SetView3D( VIEW_3D_TYPE::VIEW3D_PAN_UP ); // move up
//else
//SetView3D( WXK_DOWN ); // move down
//SetView3D( VIEW_3D_TYPE::VIEW3D_PAN_DOWN ); // move down
}
else if( event.ControlDown() )
{
//if( event.GetWheelRotation() > 0 )
//SetView3D( WXK_RIGHT ); // move right
//SetView3D( VIEW_3D_TYPE::VIEW3D_PAN_RIGHT ); // move right
//else
//SetView3D( WXK_LEFT ); // move left
//SetView3D( VIEW_3D_TYPE::VIEW3D_PAN_LEFT ); // move left
}
else
{
@@ -23,7 +23,7 @@
*/
/**
* @file c3d_model_viewer.h
* @file eda_3d_model_viewer.h
* @brief Implements a model viewer canvas.
*
* The purpose of model viewer is to render 3d models that come in the original data from
+2 -6
View File
@@ -1,7 +1,8 @@
if( KICAD_USE_3DCONNEXION )
add_library(3d-viewer_navlib STATIC
"nl_3d_viewer_plugin.cpp"
"nl_3d_viewer_plugin_impl.cpp"
"nl_footprint_properties_plugin.cpp"
"nl_footprint_properties_plugin_impl.cpp"
)
# 3d-viewer_navlib depends on make_lexer outputs in common
@@ -23,9 +24,4 @@ if( KICAD_USE_3DCONNEXION )
$<TARGET_PROPERTY:3DxWare::Navlib,INTERFACE_LINK_LIBRARIES>
3DxWare::Navlib
)
else()
add_library(3d-viewer_navlib STATIC
"nl_3d_viewer_plugin.cpp"
)
endif(KICAD_USE_3DCONNEXION)
+12 -26
View File
@@ -19,41 +19,27 @@
*/
#include "nl_3d_viewer_plugin.h"
#if defined( KICAD_USE_3DCONNEXION )
#include "nl_3d_viewer_plugin_impl.h"
#include <advanced_config.h>
#include <kiplatform/drivers.h>
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport ) :
m_impl( new NL_3D_VIEWER_PLUGIN_IMPL( aViewport ) )
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport )
{
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver
&& KIPLATFORM::DRIVERS::Valid3DConnexionDriverVersion() )
{
m_impl = std::make_unique<NL_3D_VIEWER_PLUGIN_IMPL>( aViewport, "KiCAD 3D" );
m_impl->Connect();
}
}
NL_3D_VIEWER_PLUGIN::~NL_3D_VIEWER_PLUGIN()
{
delete m_impl;
}
NL_3D_VIEWER_PLUGIN::~NL_3D_VIEWER_PLUGIN() = default;
void NL_3D_VIEWER_PLUGIN::SetFocus( bool focus )
{
m_impl->SetFocus( focus );
if( m_impl )
m_impl->SetFocus( focus );
}
#else
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport ) : m_impl( nullptr )
{
}
void NL_3D_VIEWER_PLUGIN::SetFocus( bool focus )
{
}
NL_3D_VIEWER_PLUGIN::~NL_3D_VIEWER_PLUGIN()
{
}
#endif
+3 -1
View File
@@ -26,6 +26,8 @@
#ifndef NL_3D_VIEWER_PLUGIN_H_
#define NL_3D_VIEWER_PLUGIN_H_
#include <memory>
// Forward declarations.
class EDA_3D_CANVAS;
class NL_3D_VIEWER_PLUGIN_IMPL;
@@ -54,7 +56,7 @@ public:
void SetFocus( bool aFocus = true );
private:
NL_3D_VIEWER_PLUGIN_IMPL* m_impl;
std::unique_ptr<NL_3D_VIEWER_PLUGIN_IMPL> m_impl;
};
#endif // NL_3D_VIEWER_PLUGIN_H_
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 3Dconnexion
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -27,6 +27,7 @@
// KiCAD includes
#include <tool/action_manager.h>
#include <tool/tool_manager.h>
#include <tool/tools_holder.h>
// stdlib
#include <map>
@@ -72,17 +73,15 @@ bool equals( glm::mat<L, C, T, Q> const& aFirst, glm::mat<L, C, T, Q> const& aSe
}
NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas ) :
NAV_3D( false, false ), m_canvas( aCanvas ), m_capIsMoving( false )
NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas, const std::string& aProfileHint ) :
NAV_3D( false, false ),
m_canvas( aCanvas ),
m_capIsMoving( false ),
m_newWidth( 0.0 )
{
m_camera = dynamic_cast<TRACK_BALL*>( m_canvas->GetCamera() );
PutProfileHint( "KiCAD 3D" );
EnableNavigation( true );
PutFrameTimingSource( TimingSource::SpaceMouse );
exportCommandsAndImages();
PutProfileHint( aProfileHint );
}
@@ -98,8 +97,19 @@ void NL_3D_VIEWER_PLUGIN_IMPL::SetFocus( bool aFocus )
NAV_3D::Write( navlib::focus_k, aFocus );
}
// temporary store for the categories
typedef std::map<std::string, TDx::CCommandTreeNode*> CATEGORY_STORE;
EDA_3D_CANVAS* NL_3D_VIEWER_PLUGIN_IMPL::GetCanvas() const
{
return m_canvas;
}
void NL_3D_VIEWER_PLUGIN_IMPL::Connect()
{
EnableNavigation(true);
PutFrameTimingSource(TimingSource::SpaceMouse);
exportCommandsAndImages();
}
/**
* Add a category to the store.
@@ -173,7 +183,7 @@ void NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages()
for( it = actions.begin(); it != actions.end(); ++it )
{
const TOOL_ACTION* action = *it;
std::string label = action->GetLabel().ToStdString();
std::string label = action->GetMenuLabel().ToStdString();
if( label.empty() )
{
@@ -568,7 +578,7 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand( std::string commandId )
if( parent->IsEnabled() )
{
TOOL_MANAGER* tool_manager = static_cast<PCB_BASE_FRAME*>( parent )->GetToolManager();
TOOL_MANAGER* tool_manager = dynamic_cast<TOOLS_HOLDER*>( parent )->GetToolManager();
if( tool_manager == nullptr )
{
@@ -588,7 +598,7 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand( std::string commandId )
if( runAction )
{
tool_manager->RunAction( *context, true );
tool_manager->RunAction( *context );
m_canvas->Request_refresh();
}
}
+21 -4
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 3Dconnexion
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -42,6 +42,11 @@
class EDA_3D_CANVAS;
class TRACK_BALL;
// temporary store for the categories
typedef std::map<std::string, TDx::CCommandTreeNode*> CATEGORY_STORE;
CATEGORY_STORE::iterator add_category( std::string aCategoryPath, CATEGORY_STORE& aCategoryStore );
// Convenience typedef.
typedef TDx::SpaceMouse::Navigation3D::CNavigation3D NAV_3D;
@@ -56,8 +61,9 @@ public:
* Initializes a new instance of the NL_3DVIEWER_PLUGIN.
*
* @param aCanvas is the viewport to be navigated.
* @param aProfileHint tells the 3DConnexion UI which profile to use.
*/
NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas );
NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas, const std::string& aProfileHint );
virtual ~NL_3D_VIEWER_PLUGIN_IMPL();
@@ -69,11 +75,21 @@ public:
*/
void SetFocus( bool aFocus = true );
/**
* Get the m_canvas pointer.
*/
EDA_3D_CANVAS* GetCanvas() const;
/**
* Connect plugin implementation to the driver.
*/
void Connect();
private:
/**
* Export the invocable actions and images to the 3Dconnexion UI.
*/
void exportCommandsAndImages();
virtual void exportCommandsAndImages();
long GetCameraMatrix( navlib::matrix_t& aMatrix ) const override;
long GetPointerPosition( navlib::point_t& aPosition ) const override;
@@ -111,6 +127,7 @@ private:
long GetCoordinateSystem( navlib::matrix_t& aMatrix ) const override;
long GetIsViewRotatable( navlib::bool_t& isRotatable ) const override;
private:
EDA_3D_CANVAS* m_canvas;
TRACK_BALL* m_camera;
@@ -0,0 +1,45 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nl_footprint_properties_plugin.h"
#include "nl_footprint_properties_plugin_impl.h"
#include <advanced_config.h>
#include <kiplatform/drivers.h>
NL_FOOTPRINT_PROPERTIES_PLUGIN::NL_FOOTPRINT_PROPERTIES_PLUGIN( EDA_3D_CANVAS* aViewport )
{
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver
&& KIPLATFORM::DRIVERS::Valid3DConnexionDriverVersion() )
{
m_impl = std::make_unique<NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL>( aViewport );
m_impl->Connect();
}
}
NL_FOOTPRINT_PROPERTIES_PLUGIN::~NL_FOOTPRINT_PROPERTIES_PLUGIN() = default;
void NL_FOOTPRINT_PROPERTIES_PLUGIN::SetFocus( bool focus )
{
if( m_impl )
m_impl->SetFocus( focus );
}
@@ -0,0 +1,62 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file nl_footprint_properties_plugin.h
* @brief declaration of the nl_footprint_properties_plugin class
*/
#ifndef NL_FOOTPRINT_PROPERTIES_PLUGIN_H_
#define NL_FOOTPRINT_PROPERTIES_PLUGIN_H_
#include <memory>
// Forward declarations.
class EDA_3D_CANVAS;
class NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL;
/**
* The class that implements the public interface to the SpaceMouse plug-in.
*/
class NL_FOOTPRINT_PROPERTIES_PLUGIN
{
public:
/**
* Initializes a new instance of the NL_FOOTPRINT_PROPERTIES_PLUGIN.
*
* @param aViewport is the viewport to be navigated.
*/
NL_FOOTPRINT_PROPERTIES_PLUGIN( EDA_3D_CANVAS* aViewport );
virtual ~NL_FOOTPRINT_PROPERTIES_PLUGIN();
/**
* Set the connection to the 3Dconnexion driver to the focus state so that
* 3DMouse data is routed here.
*
* @param aFocus is true to set the connection active.
*/
void SetFocus( bool aFocus = true );
private:
std::unique_ptr<NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL> m_impl;
};
#endif // NL_FOOTPRINT_PROPERTIES_PLUGIN_H_
@@ -0,0 +1,162 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nl_footprint_properties_plugin_impl.h"
#include <3d-viewer/3d_canvas/eda_3d_canvas.h>
// KiCAD includes
#include <tool/action_manager.h>
#include <tool/tool_manager.h>
#include <tool/tools_holder.h>
#include <wx/mstream.h>
#define BOUNDING_BOX_SCALE_FACTOR 1.3f
/**
* Flag to enable the NL_FOOTPRINT_PROPERTIES_PLUGIN debug tracing.
*
* Use "KI_TRACE_NL_FOOTPRINT_PROPERTIES_PLUGIN" to enable.
*
* @ingroup trace_env_vars
*/
const wxChar* NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::m_logTrace =
wxT( "KI_TRACE_NL_FOOTPRINT_PROPERTIES_PLUGIN" );
NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL(EDA_3D_CANVAS* aCanvas) :
NL_3D_VIEWER_PLUGIN_IMPL(aCanvas, "KiCAD Footprint Properties")
{}
long NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::GetModelExtents( navlib::box_t& extents ) const
{
SFVEC3F min = NL_3D_VIEWER_PLUGIN_IMPL::GetCanvas()->GetBoardAdapter().GetBBox().Min();
SFVEC3F max = NL_3D_VIEWER_PLUGIN_IMPL::GetCanvas()->GetBoardAdapter().GetBBox().Max();
SFVEC3F diff = ( BOUNDING_BOX_SCALE_FACTOR - 1.f ) / 2.f * ( max - min );
min -= diff;
max += diff;
extents = { min.x, min.y, min.z, max.x, max.y, max.z };
return 0;
}
void NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages()
{
std::list<TOOL_ACTION*> actions = ACTION_MANAGER::GetActionList();
if( actions.size() == 0 )
{
return;
}
using TDx::SpaceMouse::CCommand;
using TDx::SpaceMouse::CCommandSet;
// The root action set node
CCommandSet commandSet( "EDA_3D_CANVAS", "3D Viewer" );
// Activate the command set
NAV_3D::PutActiveCommands( commandSet.GetId() );
// temporary store for the categories
CATEGORY_STORE categoryStore;
std::vector<TDx::CImage> vImages;
// add the action set to the category_store
categoryStore.insert( categoryStore.end(), CATEGORY_STORE::value_type( ".", &commandSet ) );
std::list<TOOL_ACTION*>::const_iterator it;
for( it = actions.begin(); it != actions.end(); ++it )
{
const TOOL_ACTION* action = *it;
std::string label = action->GetMenuLabel().ToStdString();
if( label.empty() )
{
continue;
}
std::string name = action->GetName();
// Do no export commands for the pcbnew app.
if( name.rfind( "pcbnew.", 0 ) == 0 )
{
continue;
}
// Exclude commands which can't be used in the footprint properties.
if( name.rfind( "3DViewer.Control.pivotCenter", 0 ) == 0
|| name.rfind( "3DViewer.Control.material", 0 ) == 0
|| name.rfind( "3DViewer.Control.attribute", 0 ) == 0
|| name.rfind( "3DViewer.Control.show", 0 ) == 0 )
{
continue;
}
std::string strCategory = action->GetToolName();
CATEGORY_STORE::iterator iter = categoryStore.find( strCategory );
if( iter == categoryStore.end() )
{
iter = add_category( std::move( strCategory ), categoryStore );
}
std::string description = action->GetDescription().ToStdString();
// Arbitrary 8-bit data stream
wxMemoryOutputStream imageStream;
if( action->GetIcon() != BITMAPS::INVALID_BITMAP )
{
wxImage image = KiBitmap( action->GetIcon() ).ConvertToImage();
image.SaveFile( imageStream, wxBitmapType::wxBITMAP_TYPE_PNG );
image.Destroy();
if( imageStream.GetSize() )
{
wxStreamBuffer* streamBuffer = imageStream.GetOutputStreamBuffer();
TDx::CImage tdxImage = TDx::CImage::FromData( "", 0, name.c_str() );
tdxImage.AssignImage( std::string( reinterpret_cast<const char*>(
streamBuffer->GetBufferStart() ),
streamBuffer->GetBufferSize() ),
0 );
wxLogTrace( m_logTrace, wxT( "Adding image for : %s" ), name );
vImages.push_back( std::move( tdxImage ) );
}
}
wxLogTrace( m_logTrace, wxT( "Inserting command: %s, description: %s, in category: %s" ),
name, description, iter->first );
iter->second->push_back(
CCommand( std::move( name ), std::move( label ), std::move( description ) ) );
}
NAV_3D::AddCommandSet( commandSet );
NAV_3D::AddImages( vImages );
}
@@ -0,0 +1,68 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 3Dconnexion
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file nl_footprint_properties_plugin_impl.h
* @brief declaration of the nl_footprint_properties_plugin_impl class
*/
#ifndef NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL_H_
#define NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL_H_
#include "nl_3d_viewer_plugin_impl.h"
// TDxWare SDK.
#include <SpaceMouse/CNavigation3D.hpp>
/**
* The class that adjusts NL_3D_VIEWER_PLUGIN_IMPL implementation for 3D Model preview in footprint properties dialog.
*/
class NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL : public NL_3D_VIEWER_PLUGIN_IMPL
{
public:
/**
* Initializes a new instance of the NL_FOOTPRINT_PROPERTIES_PLUGIN.
*
* @param aCanvas is the viewport to be navigated.
*/
NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas );
private:
/**
* Get Footprint 3D Model extents.
*
* @param extents is the box around the 3D model.
*/
long GetModelExtents( navlib::box_t& extents ) const override;
/**
* Export the invocable actions and images to the 3Dconnexion UI.
*/
void exportCommandsAndImages() override;
private:
/**
* Trace mask used to enable or disable the trace output of this class.
* The debug output can be turned on by setting the WXTRACE environment variable to
* "KI_TRACE_NL_FOOTPRINT_PROPERTIES_PLUGIN". See the wxWidgets documentation on wxLogTrace for
* more information.
*/
static const wxChar* m_logTrace;
};
#endif // NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL_H_
+98 -18
View File
@@ -24,16 +24,16 @@
*/
/**
* @file c_ogl_3dmodel.cpp
* @brief
* @file 3d_model.cpp
*/
#include <algorithm>
#include <stdexcept>
#include <gal/opengl/kiglew.h> // Must be included first
#include "3d_model.h"
#include "opengl_utils.h"
#include "../common_ogl/ogl_utils.h"
#include "../3d_math.h"
#include <utility>
#include <wx/debug.h>
#include <wx/log.h>
#include <chrono>
@@ -177,9 +177,11 @@ MODEL_3D::MODEL_3D( const S3DMODEL& a3DModel, MATERIAL_MODE aMaterialMode )
// use material color for mesh bounding box or some sort of average vertex color.
glm::vec3 avg_color = material.m_Diffuse;
BBOX_3D &mesh_bbox = m_meshes_bbox[mesh_i];
for( unsigned int vtx_i = 0; vtx_i < mesh.m_VertexSize; ++vtx_i )
{
m_meshes_bbox[mesh_i].Union( mesh.m_Positions[vtx_i] );
mesh_bbox.Union( mesh.m_Positions[vtx_i] );
VERTEX& vtx_out = mesh_group.m_vertices[vtx_offset + vtx_i];
@@ -222,16 +224,19 @@ MODEL_3D::MODEL_3D( const S3DMODEL& a3DModel, MATERIAL_MODE aMaterialMode )
}
}
if( m_meshes_bbox[mesh_i].IsInitialized() )
if( mesh_bbox.IsInitialized() )
{
// generate geometry for the bounding box
MakeBbox( m_meshes_bbox[mesh_i], ( mesh_i + 1 ) * bbox_vtx_count,
MakeBbox( mesh_bbox, ( mesh_i + 1 ) * bbox_vtx_count,
&bbox_tmp_vertices[( mesh_i + 1 ) * bbox_vtx_count],
&bbox_tmp_indices[( mesh_i + 1 ) * bbox_idx_count],
{ avg_color, 1.0f } );
// bump the outer bounding box
m_model_bbox.Union( m_meshes_bbox[mesh_i] );
m_model_bbox.Union( mesh_bbox );
// add to the material group
material.m_bbox.Union( mesh_bbox );
}
@@ -410,7 +415,9 @@ void MODEL_3D::EndDrawMulti()
void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
SFVEC3F& aSelectionColor ) const
const SFVEC3F& aSelectionColor,
const glm::mat4 *aModelWorldMatrix,
const SFVEC3F *aCameraWorldPos ) const
{
if( aOpacity <= FLT_EPSILON )
return;
@@ -439,27 +446,100 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, (const float*)&param.x );
for( const MODEL_3D::MATERIAL& mat : m_materials )
std::vector<const MODEL_3D::MATERIAL *> materialsToRender;
materialsToRender.reserve( m_materials.size() );
if( aModelWorldMatrix && aCameraWorldPos )
{
if( ( mat.IsTransparent() != aTransparent )
// Sort Material groups
std::vector<std::pair<const MODEL_3D::MATERIAL*, float>> materialsSorted;
// Calculate the distance to the camera for each material group
for( const MODEL_3D::MATERIAL& mat : m_materials )
{
if( mat.m_render_idx_count == 0 )
{
continue;
}
if( ( mat.IsTransparent() != aTransparent )
&& ( aOpacity >= 1.0f )
&& m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY )
{
continue;
{
continue;
}
const BBOX_3D& bBox = mat.m_bbox;
const SFVEC3F& bBoxCenter = bBox.GetCenter();
const SFVEC3F bBoxWorld = *aModelWorldMatrix * glm::vec4( bBoxCenter, 1.0f );
const float distanceToCamera = glm::length( *aCameraWorldPos - bBoxWorld );
materialsSorted.emplace_back( &mat, distanceToCamera );
}
// Sort from back to front
std::sort( materialsSorted.begin(), materialsSorted.end(),
[&]( std::pair<const MODEL_3D::MATERIAL*, float>& a,
std::pair<const MODEL_3D::MATERIAL*, float>& b )
{
bool aInsideB = a.first->m_bbox.Inside( b.first->m_bbox );
bool bInsideA = b.first->m_bbox.Inside( a.first->m_bbox );
// If A is inside B, then A is rendered first
if( aInsideB != bInsideA )
return bInsideA;
if( a.second != b.second )
return a.second > b.second;
return a.first > b.first; // compare pointers as a last resort
} );
for( const std::pair<const MODEL_3D::MATERIAL*, float>& mat : materialsSorted )
{
materialsToRender.push_back( mat.first );
}
}
else
{
for( const MODEL_3D::MATERIAL& mat : m_materials )
{
// There is at least one default material created in case a mesh has no declared materials.
// Most meshes have a material, so usually the first material will have nothing to render and is skip.
// See S3D::GetModel for more details.
if( mat.m_render_idx_count == 0 )
{
continue;
}
if( ( mat.IsTransparent() != aTransparent )
&& ( aOpacity >= 1.0f )
&& m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY )
{
continue;
}
materialsToRender.push_back( &mat );
}
}
for( const MODEL_3D::MATERIAL* mat : materialsToRender )
{
switch( m_materialMode )
{
case MATERIAL_MODE::NORMAL:
OglSetMaterial( mat, aOpacity, aUseSelectedMaterial, aSelectionColor );
OglSetMaterial( *mat, aOpacity, aUseSelectedMaterial, aSelectionColor );
break;
case MATERIAL_MODE::DIFFUSE_ONLY:
OglSetDiffuseMaterial( mat.m_Diffuse, aOpacity, aUseSelectedMaterial, aSelectionColor );
OglSetDiffuseMaterial( mat->m_Diffuse, aOpacity, aUseSelectedMaterial, aSelectionColor );
break;
case MATERIAL_MODE::CAD_MODE:
OglSetDiffuseMaterial( MaterialDiffuseToColorCAD( mat.m_Diffuse ), aOpacity,
OglSetDiffuseMaterial( MaterialDiffuseToColorCAD( mat->m_Diffuse ), aOpacity,
aUseSelectedMaterial, aSelectionColor );
break;
@@ -467,9 +547,9 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
break;
}
glDrawElements( GL_TRIANGLES, mat.m_render_idx_count, m_index_buffer_type,
glDrawElements( GL_TRIANGLES, mat->m_render_idx_count, m_index_buffer_type,
reinterpret_cast<const void*>(
static_cast<uintptr_t>( mat.m_render_idx_buffer_offset ) ) );
static_cast<uintptr_t>( mat->m_render_idx_buffer_offset ) ) );
}
}
@@ -523,7 +603,7 @@ void MODEL_3D::DrawBboxes() const
: sizeof( GLuint );
glDrawElements( GL_LINES, bbox_idx_count * m_meshes_bbox.size(), m_bbox_index_buffer_type,
reinterpret_cast<const void*>(
reinterpret_cast<const void*>(
static_cast<uintptr_t>( bbox_idx_count * idx_size ) ) );
}
+14 -5
View File
@@ -54,7 +54,7 @@ public:
*/
void DrawOpaque( bool aUseSelectedMaterial, SFVEC3F aSelectionColor = SFVEC3F( 0.0f ) ) const
{
Draw( false, 1.0f, aUseSelectedMaterial, aSelectionColor );
Draw( false, 1.0f, aUseSelectedMaterial, aSelectionColor, nullptr, nullptr );
}
/**
@@ -63,9 +63,19 @@ public:
void DrawTransparent( float aOpacity, bool aUseSelectedMaterial,
SFVEC3F aSelectionColor = SFVEC3F( 0.0f ) ) const
{
Draw( true, aOpacity, aUseSelectedMaterial, aSelectionColor );
Draw( true, aOpacity, aUseSelectedMaterial, aSelectionColor, nullptr, nullptr );
}
/**
* Render the model into the current context.
* if aModelWorldMatrix and aCameraWorldPos is provided,
* it renders the material groups sorted.
*/
void Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
const SFVEC3F& aSelectionColor,
const glm::mat4 *aModelWorldMatrix,
const SFVEC3F *aCameraWorldPos ) const;
/**
* Return true if have opaque meshes to render.
*/
@@ -136,6 +146,8 @@ private:
unsigned int m_render_idx_buffer_offset = 0;
unsigned int m_render_idx_count = 0;
BBOX_3D m_bbox; ///< bounding box for this material group, used for transparent material ordering
MATERIAL( const SMATERIAL& aOther ) : SMATERIAL( aOther ) { }
bool IsTransparent() const { return m_Transparency > FLT_EPSILON; }
};
@@ -159,9 +171,6 @@ private:
static void MakeBbox( const BBOX_3D& aBox, unsigned int aIdxOffset, VERTEX* aVtxOut,
GLuint* aIdxOut, const glm::vec4& aColor );
void Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
SFVEC3F& aSelectionColor ) const;
};
#endif // _MODEL_3D_H_
+135 -124
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -23,24 +24,24 @@
*/
#include "render_3d_opengl.h"
#include "opengl_utils.h"
#include <board.h>
#include <footprint.h>
#include "../../3d_math.h"
#include "convert_basic_shapes_to_polygon.h"
#include <trigo.h>
#include <project.h>
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <fp_lib_table.h>
#include <eda_3d_canvas.h>
#include <eda_3d_viewer_frame.h>
#include <project_pcb.h>
void RENDER_3D_OPENGL::addObjectTriangles( const FILLED_CIRCLE_2D* aFilledCircle,
void RENDER_3D_OPENGL::addObjectTriangles( const FILLED_CIRCLE_2D* aCircle,
TRIANGLE_DISPLAY_LIST* aDstLayer, float aZtop,
float aZbot )
{
const SFVEC2F& center = aFilledCircle->GetCenter();
const float radius = aFilledCircle->GetRadius() * 2.0f; // Double because the render triangle
const SFVEC2F& center = aCircle->GetCenter();
const float radius = aCircle->GetRadius() * 2.0f; // Double because the render triangle
// This is a small adjustment to the circle texture
const float texture_factor = ( 8.0f / (float) SIZE_OF_CIRCLE_TEXTURE ) + 1.0f;
@@ -302,7 +303,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateHoles( const LIST_OBJECT2D& aListH
OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D* aContainer,
const SHAPE_POLY_SET* aPolyList,
PCB_LAYER_ID aLayerId,
PCB_LAYER_ID aLayer,
const BVH_CONTAINER_2D* aThroughHoles )
{
if( aContainer == nullptr )
@@ -316,7 +317,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
float layer_z_bot = 0.0f;
float layer_z_top = 0.0f;
getLayerZPos( aLayerId, layer_z_top, layer_z_bot );
getLayerZPos( aLayer, layer_z_top, layer_z_bot );
// Calculate an estimation for the nr of triangles based on the nr of objects
unsigned int nrTrianglesEstimation = listObject2d.size() * 8;
@@ -375,12 +376,12 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
}
OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateEmptyLayerList( PCB_LAYER_ID aLayerId )
OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateEmptyLayerList( PCB_LAYER_ID aLayer )
{
float layer_z_bot = 0.0f;
float layer_z_top = 0.0f;
getLayerZPos( aLayerId, layer_z_top, layer_z_bot );
getLayerZPos( aLayer, layer_z_top, layer_z_bot );
TRIANGLE_DISPLAY_LIST* layerTriangles = new TRIANGLE_DISPLAY_LIST( 1 );
@@ -453,7 +454,7 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
OBJECT_2D_STATS::Instance().ResetStats();
unsigned stats_startReloadTime = GetRunningMicroSecs();
int64_t stats_startReloadTime = GetRunningMicroSecs();
m_boardAdapter.InitSettings( aStatusReporter, aWarningReporter );
@@ -464,28 +465,23 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
aStatusReporter->Report( _( "Load OpenGL: board" ) );
// Create Board
m_board = createBoard( m_boardAdapter.GetBoardPoly(), &m_boardAdapter.GetThroughHoleIds() );
m_board = createBoard( m_boardAdapter.GetBoardPoly(), &m_boardAdapter.GetTH_IDs() );
if( m_boardAdapter.m_Cfg->m_Render.realistic )
{
m_antiBoardPolys.RemoveAllContours();
m_antiBoardPolys.NewOutline();
m_antiBoardPolys.Append( VECTOR2I( -INT_MAX/2, -INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( INT_MAX/2, -INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( INT_MAX/2, INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( -INT_MAX/2, INT_MAX/2 ) );
m_antiBoardPolys.Outline( 0 ).SetClosed( true );
m_antiBoardPolys.RemoveAllContours();
m_antiBoardPolys.NewOutline();
m_antiBoardPolys.Append( VECTOR2I( -INT_MAX/2, -INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( INT_MAX/2, -INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( INT_MAX/2, INT_MAX/2 ) );
m_antiBoardPolys.Append( VECTOR2I( -INT_MAX/2, INT_MAX/2 ) );
m_antiBoardPolys.Outline( 0 ).SetClosed( true );
m_antiBoardPolys.BooleanSubtract( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
m_antiBoard = createBoard( m_antiBoardPolys );
}
m_antiBoardPolys.BooleanSubtract( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
m_antiBoard = createBoard( m_antiBoardPolys );
SHAPE_POLY_SET board_poly_with_holes = m_boardAdapter.GetBoardPoly().CloneDropTriangulation();
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetThroughHoleOdPolys(),
SHAPE_POLY_SET::PM_FAST );
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
SHAPE_POLY_SET::PM_FAST );
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
m_boardWithHoles = createBoard( board_poly_with_holes );
@@ -496,28 +492,22 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( aStatusReporter )
aStatusReporter->Report( _( "Load OpenGL: holes and vias" ) );
SHAPE_POLY_SET outerPolyTHT = m_boardAdapter.GetThroughHoleOdPolys().CloneDropTriangulation();
SHAPE_POLY_SET outerPolyTHT = m_boardAdapter.GetTH_ODPolys().CloneDropTriangulation();
if( m_boardAdapter.m_Cfg->m_Render.realistic )
outerPolyTHT.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
m_outerThroughHoles = generateHoles( m_boardAdapter.GetTH_ODs().GetList(), outerPolyTHT,
1.0f, 0.0f, false, &m_boardAdapter.GetTH_IDs() );
m_outerViaThroughHoles = generateHoles( m_boardAdapter.GetViaTH_ODs().GetList(),
m_boardAdapter.GetViaTH_ODPolys(), 1.0f, 0.0f, false );
if( m_boardAdapter.m_Cfg->m_Render.clip_silk_on_via_annuli )
{
outerPolyTHT.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
}
m_outerThroughHoles = generateHoles( m_boardAdapter.GetThroughHoleOds().GetList(),
outerPolyTHT, 1.0f, 0.0f, false,
&m_boardAdapter.GetThroughHoleIds() );
m_outerViaThroughHoles = generateHoles(
m_boardAdapter.GetThroughHoleViaOds().GetList(),
m_boardAdapter.GetThroughHoleViaOdPolys(), 1.0f, 0.0f, false );
if( m_boardAdapter.m_Cfg->m_Render.clip_silk_on_via_annulus &&
m_boardAdapter.m_Cfg->m_Render.realistic )
{
m_outerThroughHoleRings = generateHoles(
m_boardAdapter.GetThroughHoleAnnularRings().GetList(),
m_boardAdapter.GetThroughHoleAnnularRingPolys(), 1.0f, 0.0f, false );
m_outerThroughHoleRings = generateHoles( m_boardAdapter.GetViaAnnuli().GetList(),
m_boardAdapter.GetViaAnnuliPolys(),
1.0f, 0.0f, false );
}
const MAP_POLY& innerMapHoles = m_boardAdapter.GetHoleIdPolysMap();
@@ -532,28 +522,20 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
float layer_z_bot = 0.0f;
float layer_z_top = 0.0f;
for( const std::pair<const PCB_LAYER_ID, SHAPE_POLY_SET*>& ii : outerMapHoles )
for( const auto& [ layer, poly ] : outerMapHoles )
{
const PCB_LAYER_ID layer_id = ii.first;
const SHAPE_POLY_SET* poly = ii.second;
const BVH_CONTAINER_2D* container = map_holes.at( layer_id );
getLayerZPos( layer, layer_z_top, layer_z_bot );
getLayerZPos( layer_id, layer_z_top, layer_z_bot );
m_outerLayerHoles[layer_id] = generateHoles( container->GetList(), *poly,
layer_z_top, layer_z_bot, false );
m_outerLayerHoles[layer] = generateHoles( map_holes.at( layer )->GetList(), *poly,
layer_z_top, layer_z_bot, false );
}
for( const std::pair<const PCB_LAYER_ID, SHAPE_POLY_SET*>& ii : innerMapHoles )
for( const auto& [ layer, poly ] : innerMapHoles )
{
const PCB_LAYER_ID layer_id = ii.first;
const SHAPE_POLY_SET* poly = ii.second;
const BVH_CONTAINER_2D* container = map_holes.at( layer_id );
getLayerZPos( layer, layer_z_top, layer_z_bot );
getLayerZPos( layer_id, layer_z_top, layer_z_bot );
m_innerLayerHoles[layer_id] = generateHoles( container->GetList(), *poly,
layer_z_top, layer_z_bot, false );
m_innerLayerHoles[layer] = generateHoles( map_holes.at( layer )->GetList(), *poly,
layer_z_top, layer_z_bot, false );
}
}
@@ -564,107 +546,98 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( aStatusReporter )
aStatusReporter->Report( _( "Load OpenGL: layers" ) );
const MAP_POLY& map_poly = m_boardAdapter.GetPolyMap();
std::bitset<LAYER_3D_END> visibilityFlags = m_boardAdapter.GetVisibleLayers();
const MAP_POLY& map_poly = m_boardAdapter.GetPolyMap();
wxString msg;
for( const std::pair<const PCB_LAYER_ID, BVH_CONTAINER_2D*>& ii : m_boardAdapter.GetLayerMap() )
for( const auto& [ layer, container2d ] : m_boardAdapter.GetLayerMap() )
{
const PCB_LAYER_ID layer_id = ii.first;
if( !m_boardAdapter.Is3dLayerEnabled( layer_id ) )
if( !m_boardAdapter.Is3dLayerEnabled( layer, visibilityFlags ) )
continue;
if( aStatusReporter )
{
aStatusReporter->Report( wxString::Format( _( "Load OpenGL layer %d" ),
(int) layer_id ) );
msg = m_boardAdapter.GetBoard()->GetLayerName( layer );
aStatusReporter->Report( wxString::Format( _( "Load OpenGL layer %s" ), msg ) );
}
const BVH_CONTAINER_2D* container2d = ii.second;
SHAPE_POLY_SET polyListSubtracted;
SHAPE_POLY_SET* polyList = nullptr;
// Load the vertical (Z axis) component of shapes
if( map_poly.find( layer_id ) != map_poly.end() )
if( m_boardAdapter.m_Cfg->m_Render.opengl_copper_thickness )
{
polyListSubtracted = *map_poly.at( layer_id );;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
if( map_poly.find( layer ) != map_poly.end() )
{
polyListSubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_FAST );
polyListSubtracted = *map_poly.at( layer );
if( layer_id != B_Mask && layer_id != F_Mask )
if( LSET::PhysicalLayersMask().test( layer ) )
{
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetThroughHoleOdPolys(),
polyListSubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_FAST );
}
if( layer != B_Mask && layer != F_Mask )
{
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(),
SHAPE_POLY_SET::PM_FAST );
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(),
SHAPE_POLY_SET::PM_FAST );
}
if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk )
{
if( layer_id == B_SilkS && map_poly.find( B_Mask ) != map_poly.end() )
if( layer == B_SilkS && map_poly.find( B_Mask ) != map_poly.end() )
{
polyListSubtracted.BooleanSubtract( *map_poly.at( B_Mask ),
SHAPE_POLY_SET::PM_FAST );
}
else if( layer_id == F_SilkS && map_poly.find( F_Mask ) != map_poly.end() )
else if( layer == F_SilkS && map_poly.find( F_Mask ) != map_poly.end() )
{
polyListSubtracted.BooleanSubtract( *map_poly.at( F_Mask ),
SHAPE_POLY_SET::PM_FAST );
}
}
}
polyList = &polyListSubtracted;
polyList = &polyListSubtracted;
}
}
OPENGL_RENDER_LIST* oglList = generateLayerList( container2d, polyList, layer_id,
&m_boardAdapter.GetThroughHoleIds() );
OPENGL_RENDER_LIST* oglList = generateLayerList( container2d, polyList, layer,
&m_boardAdapter.GetTH_IDs() );
if( oglList != nullptr )
m_layers[layer_id] = oglList;
m_layers[layer] = oglList;
}
if( m_boardAdapter.m_Cfg->m_Render.renderPlatedPadsAsPlated
&& m_boardAdapter.m_Cfg->m_Render.realistic )
if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
const SHAPE_POLY_SET* frontPlatedPadPolys = m_boardAdapter.GetFrontPlatedPadPolys();
const SHAPE_POLY_SET* backPlatedPadPolys = m_boardAdapter.GetBackPlatedPadPolys();
const SHAPE_POLY_SET* frontPlatedPadAndGraphicPolys = m_boardAdapter.GetFrontPlatedPadAndGraphicPolys();
const SHAPE_POLY_SET* backPlatedPadAndGraphicPolys = m_boardAdapter.GetBackPlatedPadAndGraphicPolys();
if( frontPlatedPadPolys )
if( frontPlatedPadAndGraphicPolys )
{
SHAPE_POLY_SET polySubtracted = frontPlatedPadPolys->CloneDropTriangulation();
polySubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHoleOdPolys(),
SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
SHAPE_POLY_SET::PM_FAST );
SHAPE_POLY_SET poly = frontPlatedPadAndGraphicPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
m_platedPadsFront = generateLayerList( m_boardAdapter.GetPlatedPadsFront(),
&polySubtracted, F_Cu );
m_platedPadsFront = generateLayerList( m_boardAdapter.GetPlatedPadsFront(), &poly, F_Cu );
// An entry for F_Cu must exist in m_layers or we'll never look at m_platedPadsFront
if( m_layers.count( F_Cu ) == 0 )
m_layers[F_Cu] = generateEmptyLayerList( F_Cu );
}
if( backPlatedPadPolys )
if( backPlatedPadAndGraphicPolys )
{
SHAPE_POLY_SET polySubtracted = backPlatedPadPolys->CloneDropTriangulation();
polySubtracted.BooleanIntersection( m_boardAdapter.GetBoardPoly(),
SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetThroughHoleOdPolys(),
SHAPE_POLY_SET::PM_FAST );
polySubtracted.BooleanSubtract( m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
SHAPE_POLY_SET::PM_FAST );
SHAPE_POLY_SET poly = backPlatedPadAndGraphicPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
m_platedPadsBack = generateLayerList( m_boardAdapter.GetPlatedPadsBack(),
&polySubtracted, B_Cu );
m_platedPadsBack = generateLayerList( m_boardAdapter.GetPlatedPadsBack(), &poly, B_Cu );
// An entry for B_Cu must exist in m_layers or we'll never look at m_platedPadsBack
if( m_layers.count( B_Cu ) == 0 )
@@ -672,6 +645,15 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
}
}
if( m_boardAdapter.m_Cfg->m_Render.show_off_board_silk )
{
if( const BVH_CONTAINER_2D* padsFront = m_boardAdapter.GetOffboardPadsFront() )
m_offboardPadsFront = generateLayerList( padsFront, nullptr, F_Cu );
if( const BVH_CONTAINER_2D* padsBack = m_boardAdapter.GetOffboardPadsBack() )
m_offboardPadsBack = generateLayerList( padsBack, nullptr, B_Cu );
}
// Load 3D models
if( aStatusReporter )
aStatusReporter->Report( _( "Loading 3D models..." ) );
@@ -775,6 +757,9 @@ void RENDER_3D_OPENGL::generateViasAndPads()
{
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( via->GetViaType() == VIATYPE::THROUGH )
continue; // handle with pad holes so castellation is taken into account
const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits();
const int nrSegments = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() );
const float hole_inner_radius = holediameter / 2.0f;
@@ -804,14 +789,33 @@ void RENDER_3D_OPENGL::generateViasAndPads()
}
if( m_boardAdapter.GetHoleCount() > 0 )
if( m_boardAdapter.GetHoleCount() > 0 || m_boardAdapter.GetViaCount() > 0 )
{
SHAPE_POLY_SET tht_outer_holes_poly; // Stores the outer poly of the copper holes (the pad)
SHAPE_POLY_SET tht_inner_holes_poly; // Stores the inner poly of the copper holes (the hole)
SHAPE_POLY_SET tht_outer_holes_poly; // Stores the outer poly of the copper holes
SHAPE_POLY_SET tht_inner_holes_poly; // Stores the inner poly of the copper holes
tht_outer_holes_poly.RemoveAllContours();
tht_inner_holes_poly.RemoveAllContours();
// Insert through-via holes (vertical cylinders)
for( const PCB_TRACK* track : m_boardAdapter.GetBoard()->Tracks() )
{
if( track->Type() == PCB_VIA_T )
{
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( via->GetViaType() == VIATYPE::THROUGH )
{
TransformCircleToPolygon( tht_outer_holes_poly, via->GetPosition(),
via->GetDrill() / 2 + platingThickness,
ARC_HIGH_DEF, ERROR_INSIDE );
TransformCircleToPolygon( tht_inner_holes_poly, via->GetPosition(),
via->GetDrill() / 2, ARC_HIGH_DEF, ERROR_INSIDE );
}
}
}
// Insert pads holes (vertical cylinders)
for( const FOOTPRINT* footprint : m_boardAdapter.GetBoard()->Footprints() )
{
@@ -836,8 +840,7 @@ void RENDER_3D_OPENGL::generateViasAndPads()
// Subtract the holes
tht_outer_holes_poly.BooleanSubtract( tht_inner_holes_poly, SHAPE_POLY_SET::PM_FAST );
if( m_boardAdapter.m_Cfg->m_Render.realistic )
tht_outer_holes_poly.BooleanSubtract( m_antiBoardPolys, SHAPE_POLY_SET::PM_FAST );
tht_outer_holes_poly.BooleanSubtract( m_antiBoardPolys, SHAPE_POLY_SET::PM_FAST );
CONTAINER_2D holesContainer;
@@ -903,7 +906,9 @@ void RENDER_3D_OPENGL::Load3dModelsIfNeeded()
load3dModels( &activityReporter );
}
else
{
load3dModels( nullptr );
}
}
@@ -912,12 +917,18 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
if( !m_boardAdapter.GetBoard() )
return;
if( !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
// Building the 3D models late crashes on recent versions of macOS
// Unclear the exact mechanism, but as a workaround, just build them
// all the time. See https://gitlab.com/kicad/code/kicad/-/issues/17198
#ifndef __WXMAC__
if( !m_boardAdapter.m_IsPreviewer
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_insert
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_virtual )
{
return;
}
#endif
// Go for all footprints
for( const FOOTPRINT* footprint : m_boardAdapter.GetBoard()->Footprints() )
@@ -931,8 +942,8 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
{
// FindRow() can throw an exception
const FP_LIB_TABLE_ROW* fpRow =
m_boardAdapter.GetBoard()->GetProject()->PcbFootprintLibs()->FindRow(
libraryName, false );
PROJECT_PCB::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() )
->FindRow( libraryName, false );
if( fpRow )
footprintBasePath = fpRow->GetFullURI( true );
@@ -471,38 +471,11 @@ void OPENGL_RENDER_LIST::DrawAll( bool aDrawMiddle ) const
}
void OPENGL_RENDER_LIST::DrawAllCameraCulled( float zCameraPos, bool aDrawMiddle ) const
{
zCameraPos = m_haveTransformation
? ( ( zCameraPos - m_zPositionTransformation ) / m_zScaleTransformation )
: zCameraPos;
if( aDrawMiddle )
DrawMiddle();
if( zCameraPos > m_zTop )
{
DrawTop();
}
else
{
if( zCameraPos < m_zBot )
{
DrawBot();
}
else
{
// If camera is in the middle dont draw it.
}
}
}
void OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
const OPENGL_RENDER_LIST* aLayerToSubtractA,
const OPENGL_RENDER_LIST* aLayerToSubtractB,
const OPENGL_RENDER_LIST* aLayerToSubtractC,
const OPENGL_RENDER_LIST* aLayerToSubtractD ) const
void OPENGL_RENDER_LIST::DrawCulled( bool aDrawMiddle,
const OPENGL_RENDER_LIST* aSubtractList,
const OPENGL_RENDER_LIST* bSubtractList,
const OPENGL_RENDER_LIST* cSubtractList,
const OPENGL_RENDER_LIST* dSubtractList ) const
{
glClearStencil( 0x00 );
glClear( GL_STENCIL_BUFFER_BIT );
@@ -517,17 +490,17 @@ void OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
glStencilFunc( GL_ALWAYS, 1, 0 );
glStencilOp( GL_KEEP, GL_KEEP, GL_REPLACE );
if( aLayerToSubtractA )
aLayerToSubtractA->DrawBot();
if( aSubtractList )
aSubtractList->DrawBot();
if( aLayerToSubtractB )
aLayerToSubtractB->DrawBot();
if( bSubtractList )
bSubtractList->DrawBot();
if( aLayerToSubtractC )
aLayerToSubtractC->DrawBot();
if( cSubtractList )
cSubtractList->DrawBot();
if( aLayerToSubtractD )
aLayerToSubtractD->DrawBot();
if( dSubtractList )
dSubtractList->DrawBot();
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
@@ -544,17 +517,17 @@ void OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
glStencilFunc( GL_ALWAYS, 2, 0 );
glStencilOp( GL_KEEP, GL_KEEP, GL_REPLACE );
if( aLayerToSubtractA )
aLayerToSubtractA->DrawTop();
if( aSubtractList )
aSubtractList->DrawTop();
if( aLayerToSubtractB )
aLayerToSubtractB->DrawTop();
if( bSubtractList )
bSubtractList->DrawTop();
if( aLayerToSubtractC )
aLayerToSubtractC->DrawTop();
if( cSubtractList )
cSubtractList->DrawTop();
if( aLayerToSubtractD )
aLayerToSubtractD->DrawTop();
if( dSubtractList )
dSubtractList->DrawTop();
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
@@ -575,8 +548,8 @@ void OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
if( aDrawMiddle )
{
if( aLayerToSubtractA )
aLayerToSubtractA->DrawMiddle();
if( aSubtractList )
aSubtractList->DrawMiddle();
}
glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE );
@@ -588,7 +561,7 @@ void OPENGL_RENDER_LIST::DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
void OPENGL_RENDER_LIST::ApplyScalePosition( float aZposition, float aZscale )
{
wxASSERT( aZscale > FLT_EPSILON );
wxCHECK2( aZscale > FLT_EPSILON, aZscale = FLT_EPSILON + 1 );
m_zPositionTransformation = aZposition;
m_zScaleTransformation = aZscale;
@@ -596,6 +569,12 @@ void OPENGL_RENDER_LIST::ApplyScalePosition( float aZposition, float aZscale )
}
void OPENGL_RENDER_LIST::ApplyScalePosition( OPENGL_RENDER_LIST* aOtherList )
{
ApplyScalePosition( aOtherList->GetZBot(), aOtherList->GetZTop() - aOtherList->GetZBot() );
}
void OPENGL_RENDER_LIST::SetItIsTransparent( bool aSetTransparent )
{
m_draw_it_transparent = aSetTransparent;
@@ -194,15 +194,14 @@ public:
*
* @param zCameraPos is the camera z axis position.
*/
void DrawAllCameraCulled( float zCameraPos, bool aDrawMiddle = true ) const;
void DrawAllCameraCulledSubtractLayer( bool aDrawMiddle,
const OPENGL_RENDER_LIST* aLayerToSubtractA = nullptr,
const OPENGL_RENDER_LIST* aLayerToSubtractB = nullptr,
const OPENGL_RENDER_LIST* aLayerToSubtractC = nullptr,
const OPENGL_RENDER_LIST* aLayerToSubtractD = nullptr ) const;
void DrawCulled( bool aDrawMiddle,
const OPENGL_RENDER_LIST* aSubtractList = nullptr,
const OPENGL_RENDER_LIST* bSubtractList = nullptr,
const OPENGL_RENDER_LIST* cSubtractList = nullptr,
const OPENGL_RENDER_LIST* dSubtractList = nullptr ) const;
void ApplyScalePosition( float aZposition, float aZscale );
void ApplyScalePosition( OPENGL_RENDER_LIST* aOtherList );
void ClearScalePosition() { m_haveTransformation = false; }
@@ -27,7 +27,7 @@
#include <trigo.h>
#include <wx/debug.h> // For the wxASSERT
#define RADPERDEG 0.0174533
#define RADPERDEG 0.0174533f
void DrawRoundArrow( SFVEC3F aPosition, SFVEC3F aTargetPos, float aSize )
{
@@ -155,7 +155,7 @@ void DrawHalfOpenCylinder( unsigned int aNrSidesPerCircle )
{
SFVEC2D corner = SFVEC2D( 0.0, radius );
RotatePoint( &corner.x, &corner.y, ii );
glVertex3f( corner.x, corner.y, 0.0 );
glVertex3f( static_cast<GLfloat>( corner.x ), static_cast<GLfloat>( corner.y ), 0.0 );
}
glVertex3d( 0.0, -radius, 0.0 );
@@ -171,7 +171,7 @@ void DrawHalfOpenCylinder( unsigned int aNrSidesPerCircle )
SFVEC2D corner = SFVEC2D( 0.0, radius );
RotatePoint( &corner.x, &corner.y, ii );
glVertex3f( corner.x, corner.y, 1.0 );
glVertex3f( static_cast<GLfloat>( corner.x ), static_cast<GLfloat>( corner.y ), 1.0 );
}
glVertex3f( 0.0, radius, 1.0 );
@@ -185,9 +185,10 @@ void DrawHalfOpenCylinder( unsigned int aNrSidesPerCircle )
SFVEC2D corner = SFVEC2D( 0.0, radius );
RotatePoint( &corner.x, &corner.y, ii );
glNormal3f( corner.x * 2.0f, corner.y * 2.0f, 0.0f );
glVertex3f( corner.x, corner.y, 1.0 );
glVertex3f( corner.x, corner.y, 0.0 );
glNormal3f( static_cast<GLfloat>( corner.x * 2.0f ),
static_cast<GLfloat>( corner.y * 2.0f ), 0.0f );
glVertex3f( static_cast<GLfloat>( corner.x ), static_cast<GLfloat>( corner.y ), 1.0f );
glVertex3f( static_cast<GLfloat>( corner.x ), static_cast<GLfloat>( corner.y ), 0.0f );
}
glNormal3f( 0.0, 1.0f, 0.0f );
File diff suppressed because it is too large Load Diff
@@ -73,16 +73,15 @@ public:
private:
OPENGL_RENDER_LIST* generateHoles( const LIST_OBJECT2D& aListHolesObject2d,
const SHAPE_POLY_SET& aPoly, float aZtop,
float aZbot, bool aInvertFaces,
const SHAPE_POLY_SET& aPoly, float aZtop, float aZbot,
bool aInvertFaces,
const BVH_CONTAINER_2D* aThroughHoles = nullptr );
OPENGL_RENDER_LIST* generateLayerList( const BVH_CONTAINER_2D* aContainer,
const SHAPE_POLY_SET* aPolyList,
PCB_LAYER_ID aLayerId,
const SHAPE_POLY_SET* aPolyList, PCB_LAYER_ID aLayer,
const BVH_CONTAINER_2D* aThroughHoles = nullptr );
OPENGL_RENDER_LIST* generateEmptyLayerList( PCB_LAYER_ID aLayerId );
OPENGL_RENDER_LIST* generateEmptyLayerList( PCB_LAYER_ID aLayer );
void addTopAndBottomTriangles( TRIANGLE_DISPLAY_LIST* aDst, const SFVEC2F& v0,
const SFVEC2F& v1, const SFVEC2F& v2, float top, float bot );
@@ -93,17 +92,17 @@ private:
void addObjectTriangles( const POLYGON_4PT_2D* aPoly, TRIANGLE_DISPLAY_LIST* aDstLayer,
float aZtop, float aZbot );
void addObjectTriangles( const FILLED_CIRCLE_2D* aFilledCircle,
TRIANGLE_DISPLAY_LIST* aDstLayer, float aZtop, float aZbot );
void addObjectTriangles( const FILLED_CIRCLE_2D* aCircle, TRIANGLE_DISPLAY_LIST* aDstLayer,
float aZtop, float aZbot );
void addObjectTriangles( const TRIANGLE_2D* aTri, TRIANGLE_DISPLAY_LIST* aDstLayer,
float aZtop, float aZbot );
void addObjectTriangles( const ROUND_SEGMENT_2D* aSeg,
TRIANGLE_DISPLAY_LIST* aDstLayer, float aZtop, float aZbot );
void addObjectTriangles( const ROUND_SEGMENT_2D* aSeg, TRIANGLE_DISPLAY_LIST* aDstLayer,
float aZtop, float aZbot );
void renderSolderMaskLayer( PCB_LAYER_ID aLayerID, float aZPosition,
bool aDrawMiddleSegments, bool aSkipRenderHoles );
void renderSolderMaskLayer( PCB_LAYER_ID aLayerID, float aZPos, bool aShowThickness,
bool aSkipRenderHoles );
void renderBoardBody( bool aSkipRenderHoles );
@@ -129,18 +128,41 @@ private:
*/
void load3dModels( REPORTER* aStatusReporter );
/**
* @param aRenderTopOrBot true will render Top, false will render bottom
* @param aRenderTransparentOnly true will render only the transparent objects, false will
* render opaque
*/
void render3dModels( bool aRenderTopOrBot, bool aRenderTransparentOnly );
struct MODELTORENDER
{
glm::mat4 m_modelWorldMat;
const MODEL_3D* m_model;
float m_opacity;
bool m_isTransparent;
bool m_isSelected;
void render3dModelsSelected( bool aRenderTopOrBot, bool aRenderTransparentOnly,
bool aRenderSelectedOnly );
MODELTORENDER( glm::mat4 aModelWorldMat,
const MODEL_3D* aNodel,
float aOpacity,
bool aIsTransparent,
bool aIsSelected ) :
m_modelWorldMat( std::move( aModelWorldMat ) ),
m_model( aNodel ),
m_opacity( aOpacity ),
m_isTransparent( aIsTransparent ),
m_isSelected( aIsSelected )
{
}
};
void renderFootprint( const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected );
void renderOpaqueModels( const glm::mat4 &aCameraViewMatrix );
void renderTransparentModels( const glm::mat4 &aCameraViewMatrix );
void renderModel( const glm::mat4 &aCameraViewMatrix, const MODELTORENDER &aModelToRender,
const SFVEC3F &aSelColor, const SFVEC3F *aCameraWorldPos );
void get3dModelsSelected( std::list<MODELTORENDER> &aDstRenderList, bool aGetTop, bool aGetBot,
bool aRenderTransparentOnly, bool aRenderSelectedOnly );
void get3dModelsFromFootprint( std::list<MODELTORENDER> &aDstRenderList,
const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected );
void setLightFront( bool enabled );
void setLightTop( bool enabled );
@@ -163,7 +185,6 @@ private:
void unsetDepthOffset();
void setLayerMaterial( PCB_LAYER_ID aLayerID );
SFVEC4F getLayerColor( PCB_LAYER_ID aLayerID );
bool initializeOpenGL();
OPENGL_RENDER_LIST* createBoard( const SHAPE_POLY_SET& aBoardPoly,
@@ -190,6 +211,8 @@ private:
MAP_OGL_DISP_LISTS m_layers;
OPENGL_RENDER_LIST* m_platedPadsFront;
OPENGL_RENDER_LIST* m_platedPadsBack;
OPENGL_RENDER_LIST* m_offboardPadsFront;
OPENGL_RENDER_LIST* m_offboardPadsBack;
MAP_OGL_DISP_LISTS m_outerLayerHoles;
MAP_OGL_DISP_LISTS m_innerLayerHoles;
OPENGL_RENDER_LIST* m_board;
@@ -209,8 +232,8 @@ private:
OPENGL_RENDER_LIST* m_padHoles;
// Caches
std::map< wxString, MODEL_3D* > m_3dModelMap;
std::map< std::vector<double>, glm::mat4 > m_3dModelMatrixMap;
std::map<wxString, MODEL_3D*> m_3dModelMap;
std::map<std::vector<float>, glm::mat4> m_3dModelMatrixMap;
BOARD_ITEM* m_currentRollOverItem;
+1 -1
View File
@@ -30,7 +30,7 @@
#ifndef POST_SHADER_H
#define POST_SHADER_H
#include "camera.h"
#include <gal/3d/camera.h>
class POST_SHADER
{
@@ -23,7 +23,7 @@
*/
/**
* @file cbvh_pbrt.cpp
* @file bvh_pbrt.cpp
* @brief This BVH implementation is based on the source code implementation
* from the book "Physically Based Rendering" (v2 and v3)
*
@@ -437,7 +437,7 @@ BVHBuildNode *BVH_PBRT::recursiveBuild ( std::vector<BVHPrimitiveInfo>& primitiv
(*totalNodes)++;
// !TODO: implement an memory Arena
// !TODO: implement a memory arena
BVHBuildNode *node = static_cast<BVHBuildNode *>( malloc( sizeof( BVHBuildNode ) ) );
m_nodesToFree.push_back( node );
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2022 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -41,9 +42,10 @@
#include <footprint.h>
#include <fp_lib_table.h>
#include <eda_3d_viewer_frame.h>
#include <project_pcb.h>
#include <base_units.h>
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
/**
* Perform an interpolation step to easy control the transparency based on the
@@ -234,7 +236,9 @@ void RENDER_3D_RAYTRACE::createItemsFromContainer( const BVH_CONTAINER_2D* aCont
if( aContainer2d == nullptr )
return;
const LIST_OBJECT2D& listObject2d = aContainer2d->GetList();
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS& cfg = m_boardAdapter.m_Cfg->m_Render;
bool isSilk = aLayer_id == B_SilkS || aLayer_id == F_SilkS;
const LIST_OBJECT2D& listObject2d = aContainer2d->GetList();
if( listObject2d.size() == 0 )
return;
@@ -273,11 +277,8 @@ void RENDER_3D_RAYTRACE::createItemsFromContainer( const BVH_CONTAINER_2D* aCont
// layer and the flag is set, then clip the silk at the outer edge of the annular ring,
// rather than the at the outer edge of the copper plating.
const BVH_CONTAINER_2D& throughHoleOuter =
m_boardAdapter.m_Cfg->m_Render.clip_silk_on_via_annulus
&& m_boardAdapter.m_Cfg->m_Render.realistic
&& ( aLayer_id == B_SilkS || aLayer_id == F_SilkS ) ?
m_boardAdapter.GetThroughHoleAnnularRings() :
m_boardAdapter.GetThroughHoleOds();
cfg.clip_silk_on_via_annuli && isSilk ? m_boardAdapter.GetViaAnnuli()
: m_boardAdapter.GetTH_ODs();
if( !throughHoleOuter.GetList().empty() )
{
@@ -303,14 +304,13 @@ void RENDER_3D_RAYTRACE::createItemsFromContainer( const BVH_CONTAINER_2D* aCont
const MAP_CONTAINER_2D_BASE& mapLayers = m_boardAdapter.GetLayerMap();
if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk
&& m_boardAdapter.m_Cfg->m_Render.realistic
if( cfg.subtract_mask_from_silk
&& ( ( aLayer_id == B_SilkS && mapLayers.find( B_Mask ) != mapLayers.end() )
|| ( aLayer_id == F_SilkS && mapLayers.find( F_Mask ) != mapLayers.end() ) ) )
{
const PCB_LAYER_ID layerMask_id = ( aLayer_id == B_SilkS ) ? B_Mask : F_Mask;
const PCB_LAYER_ID maskLayer = ( aLayer_id == B_SilkS ) ? B_Mask : F_Mask;
const BVH_CONTAINER_2D* containerMaskLayer2d = mapLayers.at( layerMask_id );
const BVH_CONTAINER_2D* containerMaskLayer2d = mapLayers.at( maskLayer );
CONST_LIST_OBJECT2D intersecting;
@@ -330,8 +330,8 @@ void RENDER_3D_RAYTRACE::createItemsFromContainer( const BVH_CONTAINER_2D* aCont
if( ( object2d_B == CSGITEM_EMPTY ) && ( object2d_C == CSGITEM_FULL ) )
{
LAYER_ITEM* objPtr = new LAYER_ITEM( object2d_A,
m_boardAdapter.GetLayerBottomZPos( aLayer_id ) - aLayerZOffset,
m_boardAdapter.GetLayerTopZPos( aLayer_id ) + aLayerZOffset );
m_boardAdapter.GetLayerBottomZPos( aLayer_id ) - aLayerZOffset,
m_boardAdapter.GetLayerTopZPos( aLayer_id ) + aLayerZOffset );
objPtr->SetMaterial( aMaterialLayer );
objPtr->SetColor( ConvertSRGBToLinear( aLayerColor ) );
m_objectContainer.Add( objPtr );
@@ -343,8 +343,8 @@ void RENDER_3D_RAYTRACE::createItemsFromContainer( const BVH_CONTAINER_2D* aCont
m_containerWithObjectsToDelete.Add( itemCSG2d );
LAYER_ITEM* objPtr = new LAYER_ITEM( itemCSG2d,
m_boardAdapter.GetLayerBottomZPos( aLayer_id ) - aLayerZOffset,
m_boardAdapter.GetLayerTopZPos( aLayer_id ) + aLayerZOffset );
m_boardAdapter.GetLayerBottomZPos( aLayer_id ) - aLayerZOffset,
m_boardAdapter.GetLayerTopZPos( aLayer_id ) + aLayerZOffset );
objPtr->SetMaterial( aMaterialLayer );
objPtr->SetColor( ConvertSRGBToLinear( aLayerColor ) );
@@ -368,7 +368,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
OBJECT_2D_STATS::Instance().ResetStats();
OBJECT_3D_STATS::Instance().ResetStats();
unsigned stats_startReloadTime = GetRunningMicroSecs();
int64_t stats_startReloadTime = GetRunningMicroSecs();
if( !aOnlyLoadCopperAndShapes )
{
@@ -393,6 +393,8 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
m_outlineBoard2dObjects = new CONTAINER_2D;
m_antioutlineBoard2dObjects = new BVH_CONTAINER_2D;
std::bitset<LAYER_3D_END> layerFlags = m_boardAdapter.GetVisibleLayers();
if( !aOnlyLoadCopperAndShapes )
{
const int outlineCount = m_boardAdapter.GetBoardPoly().OutlineCount();
@@ -434,7 +436,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
*m_boardAdapter.GetBoard(), ii );
}
if( m_boardAdapter.m_Cfg->m_Render.show_board_body )
if( layerFlags.test( LAYER_3D_BOARD ) )
{
const LIST_OBJECT2D& listObjects = m_outlineBoard2dObjects->GetList();
@@ -443,9 +445,9 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
std::vector<const OBJECT_2D*>* object2d_B = new std::vector<const OBJECT_2D*>();
// Check if there are any THT that intersects this outline object part
if( !m_boardAdapter.GetThroughHoleOds().GetList().empty() )
if( !m_boardAdapter.GetTH_ODs().GetList().empty() )
{
const BVH_CONTAINER_2D& throughHoles = m_boardAdapter.GetThroughHoleOds();
const BVH_CONTAINER_2D& throughHoles = m_boardAdapter.GetTH_ODs();
CONST_LIST_OBJECT2D intersecting;
throughHoles.GetIntersectingObjects( object2d_A->GetBBox(), intersecting );
@@ -509,9 +511,9 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
// a polygon or dummy block) it will cut also the render of the hole.
// So this will add a full hole.
// In fact, that is not need if the hole have copper.
if( !m_boardAdapter.GetThroughHoleOds().GetList().empty() )
if( !m_boardAdapter.GetTH_ODs().GetList().empty() )
{
const LIST_OBJECT2D& holeList = m_boardAdapter.GetThroughHoleOds().GetList();
const LIST_OBJECT2D& holeList = m_boardAdapter.GetTH_ODs().GetList();
for( const OBJECT_2D* hole2d : holeList )
{
@@ -586,40 +588,33 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
case B_Paste:
case F_Paste:
materialLayer = &m_materials.m_Paste;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
layerColor = m_boardAdapter.m_SolderPasteColor;
else
layerColor = m_boardAdapter.GetLayerColor( layer_id );
layerColor = m_boardAdapter.m_SolderPasteColor;
break;
case B_SilkS:
materialLayer = &m_materials.m_SilkS;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
layerColor = m_boardAdapter.m_SilkScreenColorBot;
else
layerColor = m_boardAdapter.GetLayerColor( layer_id );
layerColor = m_boardAdapter.m_SilkScreenColorBot;
break;
case F_SilkS:
materialLayer = &m_materials.m_SilkS;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
layerColor = m_boardAdapter.m_SilkScreenColorTop;
else
layerColor = m_boardAdapter.GetLayerColor( layer_id );
layerColor = m_boardAdapter.m_SilkScreenColorTop;
break;
case Dwgs_User:
layerColor = m_boardAdapter.m_UserDrawingsColor;
break;
case Cmts_User:
layerColor = m_boardAdapter.m_UserCommentsColor;
break;
case Eco1_User:
layerColor = m_boardAdapter.m_ECO1Color;
break;
case Eco2_User:
case Edge_Cuts:
case Margin:
layerColor = m_boardAdapter.m_ECO2Color;
break;
case B_CrtYd:
@@ -631,22 +626,15 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
break;
default:
if( m_boardAdapter.m_Cfg->m_Render.realistic )
if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
if( m_boardAdapter.m_Cfg->m_Render.renderPlatedPadsAsPlated )
{
layerColor = SFVEC3F( 184.0f / 255.0f, 115.0f / 255.0f, 50.0f / 255.0f );
materialLayer = &m_materials.m_NonPlatedCopper;
}
else
{
layerColor = m_boardAdapter.m_CopperColor;
materialLayer = &m_materials.m_Copper;
}
layerColor = SFVEC3F( 184.0f / 255.0f, 115.0f / 255.0f, 50.0f / 255.0f );
materialLayer = &m_materials.m_NonPlatedCopper;
}
else
{
layerColor = m_boardAdapter.GetLayerColor( layer_id );
layerColor = m_boardAdapter.m_CopperColor;
materialLayer = &m_materials.m_Copper;
}
break;
@@ -656,8 +644,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
} // for each layer on map
// Create plated copper
if( m_boardAdapter.m_Cfg->m_Render.renderPlatedPadsAsPlated
&& m_boardAdapter.m_Cfg->m_Render.realistic )
if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
createItemsFromContainer( m_boardAdapter.GetPlatedPadsFront(), F_Cu, &m_materials.m_Copper,
m_boardAdapter.m_CopperColor,
@@ -674,8 +661,9 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
// Solder mask layers are "negative" layers so the elements that we have in the container
// should remove the board outline. We will check for all objects in the outline if it
// intersects any object in the layer container and also any hole.
if( m_boardAdapter.m_Cfg->m_Render.show_soldermask
&& !m_outlineBoard2dObjects->GetList().empty() )
if( ( layerFlags.test( LAYER_3D_SOLDERMASK_TOP )
|| layerFlags.test( LAYER_3D_SOLDERMASK_BOTTOM ) )
&& !m_outlineBoard2dObjects->GetList().empty() )
{
const MATERIAL* materialLayer = &m_materials.m_SolderMask;
@@ -689,22 +677,22 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
continue;
// Only get the Solder mask layers (and only if the board has them)
if( !( layer_id == B_Mask || layer_id == F_Mask ) )
if( layer_id == F_Mask && !layerFlags.test( LAYER_3D_SOLDERMASK_TOP ) )
continue;
if( layer_id == B_Mask && !layerFlags.test( LAYER_3D_SOLDERMASK_BOTTOM ) )
continue;
// Only Mask layers are processed here because they are negative layers
if( layer_id != F_Mask && layer_id != B_Mask )
continue;
SFVEC3F layerColor;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
{
if( layer_id == B_Mask )
layerColor = m_boardAdapter.m_SolderMaskColorBot;
else
layerColor = m_boardAdapter.m_SolderMaskColorTop;
}
if( layer_id == B_Mask )
layerColor = m_boardAdapter.m_SolderMaskColorBot;
else
{
layerColor = m_boardAdapter.GetLayerColor( layer_id );
}
layerColor = m_boardAdapter.m_SolderMaskColorTop;
const float zLayerMin = m_boardAdapter.GetLayerBottomZPos( layer_id );
const float zLayerMax = m_boardAdapter.GetLayerTopZPos( layer_id );
@@ -715,9 +703,9 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
std::vector<const OBJECT_2D*>* object2d_B = new std::vector<const OBJECT_2D*>();
// Check if there are any THT that intersects this outline object part
if( !m_boardAdapter.GetThroughHoleOds().GetList().empty() )
if( !m_boardAdapter.GetTH_ODs().GetList().empty() )
{
const BVH_CONTAINER_2D& throughHoles = m_boardAdapter.GetThroughHoleOds();
const BVH_CONTAINER_2D& throughHoles = m_boardAdapter.GetTH_ODs();
CONST_LIST_OBJECT2D intersecting;
throughHoles.GetIntersectingObjects( object2d_A->GetBBox(), intersecting );
@@ -783,8 +771,8 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
}
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_endConvertTime = GetRunningMicroSecs();
unsigned stats_startLoad3DmodelsTime = stats_endConvertTime;
int64_t stats_endConvertTime = GetRunningMicroSecs();
int64_t stats_startLoad3DmodelsTime = stats_endConvertTime;
#endif
if( aStatusReporter )
@@ -793,7 +781,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
load3DModels( m_objectContainer, aOnlyLoadCopperAndShapes );
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_endLoad3DmodelsTime = GetRunningMicroSecs();
int64_t stats_endLoad3DmodelsTime = GetRunningMicroSecs();
#endif
if( !aOnlyLoadCopperAndShapes )
@@ -931,10 +919,33 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
{
float ratio =
std::max( 1.0f, m_objectContainer.GetBBox().GetMaxDimension() / RANGE_SCALE_3D );
m_camera.SetMaxZoom( CAMERA::DEFAULT_MAX_ZOOM * ratio );
m_camera.SetMinZoom( static_cast<float>( MIN_DISTANCE_IU * m_boardAdapter.BiuTo3dUnits()
/ -m_camera.GetCameraInitPos().z ) );
float max_zoom = CAMERA::DEFAULT_MAX_ZOOM * ratio;
float min_zoom = static_cast<float>( MIN_DISTANCE_IU * m_boardAdapter.BiuTo3dUnits()
/ -m_camera.GetCameraInitPos().z );
if( min_zoom > max_zoom )
std::swap( min_zoom, max_zoom );
float zoom_ratio = max_zoom / min_zoom;
// Set the minimum number of zoom 'steps' between max and min.
int steps = 3 * 3;
steps -= static_cast<int>( ceil( log( zoom_ratio ) / log( 1.26f ) ) );
steps = std::max( steps, 0 );
// Resize max and min zoom to accomplish the number of steps.
float increased_zoom = pow( 1.26f, steps / 2 );
max_zoom *= increased_zoom;
min_zoom /= increased_zoom;
if( steps & 1 )
min_zoom /= 1.26f;
min_zoom = std::min( min_zoom, 1.0f );
m_camera.SetMaxZoom( max_zoom );
m_camera.SetMinZoom( min_zoom );
}
// Create an accelerator
@@ -944,7 +955,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
if( aStatusReporter )
{
// Calculation time in seconds
double calculation_time = (double) GetRunningMicroSecs() - stats_startReloadTime / 1e6;
double calculation_time = (double) ( GetRunningMicroSecs() - stats_startReloadTime ) / 1e6;
aStatusReporter->Report( wxString::Format( _( "Reload time %.3f s" ), calculation_time ) );
}
@@ -976,15 +987,7 @@ void RENDER_3D_RAYTRACE::insertHole( const PCB_VIA* aVia )
LAYER_ITEM* objPtr = new LAYER_ITEM( ring, topZ, botZ );
objPtr->SetMaterial( &m_materials.m_Copper );
if( m_boardAdapter.m_Cfg->m_Render.realistic )
objPtr->SetColor( ConvertSRGBToLinear( m_boardAdapter.m_CopperColor ) );
else if( aVia->GetViaType() == VIATYPE::MICROVIA )
objPtr->SetColor( ConvertSRGBToLinear( m_boardAdapter.GetItemColor( LAYER_VIA_MICROVIA ) ) );
else if( aVia->GetViaType() == VIATYPE::BLIND_BURIED )
objPtr->SetColor( ConvertSRGBToLinear( m_boardAdapter.GetItemColor( LAYER_VIA_BBLIND ) ) );
else
objPtr->SetColor( ConvertSRGBToLinear( m_boardAdapter.GetItemColor( LAYER_VIAS ) ) );
objPtr->SetColor( ConvertSRGBToLinear( m_boardAdapter.m_CopperColor ) );
m_objectContainer.Add( objPtr );
}
@@ -994,13 +997,7 @@ void RENDER_3D_RAYTRACE::insertHole( const PAD* aPad )
{
const OBJECT_2D* object2d_A = nullptr;
SFVEC3F objColor;
if( m_boardAdapter.m_Cfg->m_Render.realistic )
objColor = m_boardAdapter.m_CopperColor;
else
objColor = m_boardAdapter.GetItemColor( LAYER_PADS_TH );
SFVEC3F objColor = m_boardAdapter.m_CopperColor;
const VECTOR2I drillsize = aPad->GetDrillSize();
const bool hasHole = drillsize.x && drillsize.y;
@@ -1119,12 +1116,11 @@ void RENDER_3D_RAYTRACE::insertHole( const PAD* aPad )
// Check if there are any other THT that intersects this hole
// It will use the non inflated holes
if( !m_boardAdapter.GetThroughHoleIds().GetList().empty() )
if( !m_boardAdapter.GetTH_IDs().GetList().empty() )
{
CONST_LIST_OBJECT2D intersecting;
m_boardAdapter.GetThroughHoleIds().GetIntersectingObjects( object2d_A->GetBBox(),
intersecting );
m_boardAdapter.GetTH_IDs().GetIntersectingObjects( object2d_A->GetBBox(), intersecting );
for( const OBJECT_2D* hole2d : intersecting )
{
@@ -1202,7 +1198,8 @@ void RENDER_3D_RAYTRACE::load3DModels( CONTAINER_3D& aDstContainer, bool aSkipMa
if( !m_boardAdapter.GetBoard() )
return;
if( !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
if( !m_boardAdapter.m_IsPreviewer
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_insert
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_virtual )
{
@@ -1262,8 +1259,8 @@ void RENDER_3D_RAYTRACE::load3DModels( CONTAINER_3D& aDstContainer, bool aSkipMa
{
// FindRow() can throw an exception
const FP_LIB_TABLE_ROW* fpRow =
m_boardAdapter.GetBoard()->GetProject()->PcbFootprintLibs()->FindRow(
libraryName, false );
PROJECT_PCB::PcbFootprintLibs( m_boardAdapter.GetBoard()->GetProject() )
->FindRow( libraryName, false );
if( fpRow )
footprintBasePath = fpRow->GetFullURI( true );
+3 -2
View File
@@ -141,8 +141,8 @@ struct RAYSEG2D
bool IntersectSegment( const SFVEC2F &aStartA, const SFVEC2F &aEnd_minus_startA,
const SFVEC2F &aStartB, const SFVEC2F &aEnd_minus_startB );
#if(GLM_ARCH != GLM_ARCH_PURE)
/*
#if(GLM_ARCH != GLM_ARCH_PURE)
struct RAY4
{
glm::simdVec4 m_orgX; ///< x coordinate of ray origin
@@ -155,9 +155,10 @@ struct RAY4
glm::simdVec4 m_tnear; ///< Start of ray segment
glm::simdVec4 m_tfar; ///< End of ray segment
};*/
};
#endif
*/
#endif // RAY_H
@@ -27,7 +27,7 @@
#include "ray.h"
#include "frustum.h"
#include "../camera.h"
#include <gal/3d/camera.h>
#define RAYPACKET_DIM (1 << 3)
#define RAYPACKET_MASK (unsigned int) ( ( RAYPACKET_DIM - 1 ) )
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2020 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -27,7 +27,6 @@
#include <algorithm>
#include <atomic>
#include <chrono>
#include <climits>
#include <thread>
#include "render_3d_raytrace.h"
@@ -36,7 +35,7 @@
#include "3d_fastmath.h"
#include "3d_math.h"
#include "../common_ogl/ogl_utils.h"
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <core/profile.h> // To use GetRunningMicroSecs or another profiling utility
#include <wx/log.h>
@@ -92,7 +91,7 @@ RENDER_3D_RAYTRACE::~RENDER_3D_RAYTRACE()
int RENDER_3D_RAYTRACE::GetWaitForEditingTimeOut()
{
return 1000; // ms
return 200; // ms
}
@@ -1911,9 +1910,19 @@ void RENDER_3D_RAYTRACE::initializeBlockPositions()
const SFVEC2UI center( m_realBufferSize.x / 2, m_realBufferSize.y / 2 );
std::sort( m_blockPositions.begin(), m_blockPositions.end(),
[&]( const SFVEC2UI& a, const SFVEC2UI& b ) {
[&]( const SFVEC2UI& a, const SFVEC2UI& b )
{
// Sort order: inside out.
return distance( a, center ) < distance( b, center );
float distanceA = distance( a, center );
float distanceB = distance( b, center );
if( distanceA != distanceB )
return distanceA < distanceB;
if( a[0] != b[0] )
return a[0] < b[0];
return a[1] < b[1];
} );
// Create m_shader buffer
@@ -154,7 +154,7 @@ private:
RT_RENDER_STATE m_renderState;
/// Time that the render starts
unsigned long int m_renderStartTime;
int64_t m_renderStartTime;
/// Save the number of blocks progress of the render
size_t m_blockRenderProgressCount;
@@ -229,6 +229,16 @@ bool BBOX_2D::Inside( const SFVEC2F& aPoint ) const
}
bool BBOX_2D::Inside( const BBOX_2D& aBBox ) const
{
wxASSERT( IsInitialized() );
wxASSERT( aBBox.IsInitialized() );
return Inside( aBBox.Min() ) &&
Inside( aBBox.Max() );
}
float BBOX_2D::Area() const
{
SFVEC2F extent = GetExtent();
@@ -132,6 +132,14 @@ public:
*/
bool Inside( const SFVEC2F& aPoint ) const;
/**
* Check if a bounding box is inside this bounding box.
*
* @param aBBox the bounding box to test if it is inside
* @return true if aBBox is smaller and all points are inside
*/
bool Inside( const BBOX_2D& aBBox ) const;
/**
* Calculate the area of a bounding box.
*
@@ -31,6 +31,7 @@
#include "object_2d.h"
#include "../ray.h"
#include "filled_circle_2d.h"
#include <plugins/3dapi/xv3d_types.h> // SFVEC2F
class BOARD_ITEM;
@@ -238,6 +238,16 @@ bool BBOX_3D::Inside( const SFVEC3F& aPoint ) const
}
bool BBOX_3D::Inside( const BBOX_3D& aBBox ) const
{
wxASSERT( IsInitialized() );
wxASSERT( aBBox.IsInitialized() );
return Inside( aBBox.Min() ) &&
Inside( aBBox.Max() );
}
float BBOX_3D::Volume() const
{
wxASSERT( IsInitialized() );
@@ -125,6 +125,14 @@ public:
*/
bool Inside( const SFVEC3F& aPoint ) const;
/**
* Check if a bounding box is inside this bounding box.
*
* @param aBBox the bounding box to test if it is inside
* @return true if aBBox is smaller and all points are inside
*/
bool Inside( const BBOX_3D& aBBox ) const;
/**
* Apply a transformation matrix to the box points.
*
@@ -23,8 +23,7 @@
*/
/**
* @file ccylinder.cpp
* @brief
* @file cylinder_3d.cpp
*/
#include "3d_fastmath.h"
@@ -23,8 +23,7 @@
*/
/**
* @file cobject.cpp
* @brief
* @file object_3d.cpp
*/
#include "object_3d.h"
@@ -52,7 +52,7 @@ class OBJECT_3D
public:
explicit OBJECT_3D( OBJECT_3D_TYPE aObjType );
const void SetBoardItem( BOARD_ITEM* aBoardItem ) { m_boardItem = aBoardItem; }
void SetBoardItem( BOARD_ITEM* aBoardItem ) { m_boardItem = aBoardItem; }
BOARD_ITEM* GetBoardItem() const { return m_boardItem; }
void SetMaterial( const MATERIAL* aMaterial )
+1 -1
View File
@@ -23,7 +23,7 @@
*/
/**
* @file ctrack_ball.cpp
* @file track_ball.cpp
* @brief Implementation of a track ball camera. A track ball is placed in the
* center of the screen and rotates the camera.
*/
+1 -1
View File
@@ -30,7 +30,7 @@
#ifndef TRACK_BALL_H
#define TRACK_BALL_H
#include "camera.h"
#include <gal/3d/camera.h>
class TRACK_BALL : public CAMERA
+24 -30
View File
@@ -4,7 +4,8 @@
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -27,7 +28,6 @@
#include <bitmaps.h>
#include <tool/conditional_menu.h>
#include <eda_3d_viewer_frame.h>
#include <menus_helpers.h>
#include <3d_viewer_id.h>
#include <3d_viewer/tools/eda_3d_actions.h>
#include <tool/tool_manager.h>
@@ -35,11 +35,12 @@
#include <widgets/wx_menubar.h>
void EDA_3D_VIEWER_FRAME::CreateMenuBar()
void EDA_3D_VIEWER_FRAME::doReCreateMenuBar()
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CreateMenuBar" ) );
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
wxMenuBar* oldMenuBar = GetMenuBar();
WX_MENUBAR* menuBar = new WX_MENUBAR();
@@ -81,6 +82,20 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
viewMenu->Add( ACTIONS::zoomFitScreen );
viewMenu->Add( ACTIONS::zoomRedraw );
// Grid submenu
ACTION_MENU* gridSubmenu = new ACTION_MENU( false, tool );
gridSubmenu->SetTitle( _( "3D Grid" ) );
gridSubmenu->SetIcon( BITMAPS::grid );
gridSubmenu->Add( EDA_3D_ACTIONS::noGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show10mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show5mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show2_5mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show1mmGrid, ACTION_MENU::CHECK);
viewMenu->AppendSeparator();
viewMenu->Add( gridSubmenu );
viewMenu->AppendSeparator();
viewMenu->Add( EDA_3D_ACTIONS::rotateXCW );
viewMenu->Add( EDA_3D_ACTIONS::rotateXCCW );
@@ -99,6 +114,9 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
viewMenu->Add( EDA_3D_ACTIONS::moveUp );
viewMenu->Add( EDA_3D_ACTIONS::moveDown );
viewMenu->AppendSeparator();
viewMenu->Add( EDA_3D_ACTIONS::showLayersManager, ACTION_MENU::CHECK );
//-- Preferences menu -----------------------------------------------
//
@@ -109,37 +127,12 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
BITMAPS::tools,
ACTION_MENU::CHECK );
prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
_( "Show preferences for all open tools" ),
wxID_PREFERENCES,
BITMAPS::preference );
prefsMenu->Add( ACTIONS::openPreferences );
prefsMenu->Add( _( "Reset to Default Settings" ), ID_MENU3D_RESET_DEFAULTS, BITMAPS::tools );
prefsMenu->AppendSeparator();
prefsMenu->Add( EDA_3D_ACTIONS::showTHT, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::showSMD, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::showVirtual, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::showNotInPosFile, ACTION_MENU::CHECK );
prefsMenu->AppendSeparator();
prefsMenu->Add( EDA_3D_ACTIONS::showAxis, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::showBBoxes, ACTION_MENU::CHECK );
// Grid submenu
ACTION_MENU* gridSubmenu = new ACTION_MENU( false, tool );
gridSubmenu->SetTitle( _( "3D Grid" ) );
gridSubmenu->SetIcon( BITMAPS::grid );
gridSubmenu->Add( EDA_3D_ACTIONS::noGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show10mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show5mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show2_5mmGrid, ACTION_MENU::CHECK);
gridSubmenu->Add( EDA_3D_ACTIONS::show1mmGrid, ACTION_MENU::CHECK);
prefsMenu->Add( gridSubmenu );
AddMenuLanguageList( prefsMenu, tool );
//-- Menubar -------------------------------------------------------------
//
@@ -150,4 +143,5 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
AddStandardHelpMenu( menuBar );
SetMenuBar( menuBar );
delete oldMenuBar;
}
+3 -36
View File
@@ -4,7 +4,8 @@
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,7 +31,6 @@
#include <bitmaps.h>
#include <dialogs/eda_view_switcher.h>
#include <eda_3d_viewer_frame.h>
#include <menus_helpers.h>
#include <tool/action_toolbar.h>
#include <tools/eda_3d_actions.h>
#include <3d_viewer_id.h>
@@ -52,32 +52,6 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
m_mainToolBar->SetAuiManager( &m_auimgr );
}
// Show the hotkey to open the windows list selector:
wxString keyName = KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY );
m_viewportsLabel = new wxStaticText( m_mainToolBar, wxID_ANY,
wxString::Format( _( "Viewports (%s+Tab):" ), keyName ) );
m_viewportsLabel->Wrap( -1 );
m_cbViewports = new wxChoice( m_mainToolBar, wxID_ANY );
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
m_cbViewports->Append( pair.first, static_cast<void*>( &pair.second ) );
m_cbViewports->Append( wxT( "---" ) );
m_cbViewports->Append( _( "Save viewport..." ) );
m_cbViewports->Append( _( "Delete viewport..." ) );
m_cbViewports->SetToolTip( wxString::Format( _( "Save and restore view orientation and zoom.\n"
"Use %s+Tab to activate selector.\n"
"Successive Tabs while holding %s down will "
"cycle through viewports in the popup." ),
keyName, keyName ) );
m_cbViewports->SetSelection( m_cbViewports->GetCount() - 3 );
m_lastSelectedViewport = nullptr;
// Set up toolbar
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
KiScaledBitmap( BITMAPS::import3d, this ), _( "Reload board" ) );
@@ -123,14 +97,7 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
m_mainToolBar->Add( EDA_3D_ACTIONS::toggleOrtho, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::showTHT, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->Add( EDA_3D_ACTIONS::showSMD, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->Add( EDA_3D_ACTIONS::showVirtual, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->Add( EDA_3D_ACTIONS::showNotInPosFile, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddControl( m_viewportsLabel );
m_mainToolBar->AddControl( m_cbViewports );
m_mainToolBar->Add( EDA_3D_ACTIONS::showLayersManager, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->KiRealize();
}
+227 -261
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,21 +29,20 @@
#include <wx/wupdlock.h>
#include <wx/clipbrd.h>
#include <wx/filedlg.h>
#include <wx/choice.h>
#include <wx/dialog.h>
#include "eda_3d_viewer_frame.h"
#include "eda_list_dialog.h"
#include "wx/generic/textdlgg.h"
#include "dialogs/appearance_controls_3D.h"
#include <dialogs/eda_view_switcher.h>
#include <eda_3d_viewer_settings.h>
#include <3d_viewer_id.h>
#include <3d_viewer/tools/eda_3d_actions.h>
#include <3d_viewer/tools/eda_3d_controller.h>
#include <3d_viewer/tools/eda_3d_conditions.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <board_design_settings.h>
#include <core/arraydim.h>
#include <gal/dpi_scaling.h>
#include <dpi_scaling_common.h>
#include <pgm_base.h>
#include <project.h>
#include <project/project_file.h>
@@ -54,11 +54,11 @@
#include <tool/tool_dispatcher.h>
#include <tool/action_toolbar.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_aui_utils.h>
#include <wildcards_and_files_ext.h>
#include <project_pcb.h>
#if defined( KICAD_USE_3DCONNEXION )
#include <3d_navlib/nl_3d_viewer_plugin.h>
#endif
/**
* Flag to enable 3D viewer main frame window debug tracing.
@@ -90,10 +90,11 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
const wxString& aTitle, long style ) :
KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition,
wxDefaultSize, style, QUALIFIED_VIEWER3D_FRAMENAME( aParent ), unityScale ),
m_mainToolBar( nullptr ), m_canvas( nullptr ), m_currentCamera( m_trackBallCamera ),
m_viewportsLabel( nullptr ),
m_cbViewports( nullptr ),
m_trackBallCamera( 2 * RANGE_SCALE_3D ), m_spaceMouse( nullptr )
m_mainToolBar( nullptr ),
m_canvas( nullptr ),
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D ),
m_spaceMouse( nullptr )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
@@ -106,7 +107,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
SetIcon( icon );
// Create the status line
static const int status_dims[4] = { -1, 170, 130, 130 };
static const int status_dims[5] = { -1, 170, 130, 130, 130 };
wxStatusBar *status_bar = CreateStatusBar( arrayDim( status_dims ) );
SetStatusWidths( arrayDim( status_dims ), status_dims );
@@ -115,13 +116,16 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
ANTIALIASING_MODE aaMode = static_cast<ANTIALIASING_MODE>( cfg->m_Render.opengl_AA_mode );
m_canvas = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( aaMode ),
m_boardAdapter, m_currentCamera, Prj().Get3DCacheManager() );
m_canvas = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( aaMode ), m_boardAdapter,
m_currentCamera,
PROJECT_PCB::Get3DCacheManager( &Prj() ) );
m_appearancePanel = new APPEARANCE_CONTROLS_3D( this, GetCanvas() );
LoadSettings( cfg );
loadCommonSettings();
SetUserViewports( Prj().GetProjectFile().m_Viewports3D );
m_appearancePanel->SetUserViewports( Prj().GetProjectFile().m_Viewports3D );
// Create the manager
m_toolManager = new TOOL_MANAGER;
@@ -144,16 +148,30 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
// Run the viewer control tool, it is supposed to be always active
m_toolManager->InvokeTool( "3DViewer.Control" );
CreateMenuBar();
ReCreateMenuBar();
ReCreateMainToolbar();
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
m_auimgr.SetManagedWindow( this );
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) ).Top().Layer( 6 ) );
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxS( "InfoBar" ) ).Top().Layer( 1 ) );
m_auimgr.AddPane( m_canvas, EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) ).Center() );
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) )
.Top().Layer( 6 ) );
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxS( "InfoBar" ) )
.Top().Layer( 1 ) );
m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( "LayersManager" )
.Right().Layer( 3 )
.Caption( _( "Appearance" ) ).PaneBorder( false )
.MinSize( 180, -1 ).BestSize( 190, -1 ) );
m_auimgr.AddPane( m_canvas, EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
.Center() );
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
if( cfg->m_AuiPanels.right_panel_width > 0 )
SetAuiPaneSize( m_auimgr, layersManager, cfg->m_AuiPanels.right_panel_width, -1 );
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
// hiding it.
@@ -166,7 +184,6 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
m_canvas->SetInfoBar( m_infoBar );
m_canvas->SetStatusBar( status_bar );
#if defined( KICAD_USE_3DCONNEXION )
try
{
m_spaceMouse = new NL_3D_VIEWER_PLUGIN( m_canvas );
@@ -175,39 +192,19 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
{
wxLogTrace( wxT( "KI_TRACE_NAVLIB" ), e.what() );
}
#endif
// Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
// in order to receive mouse events. Otherwise, the user has to click somewhere on
// the canvas before it will respond to mouse wheel events.
m_canvas->SetFocus();
m_cbViewports->Connect( wxEVT_COMMAND_CHOICE_SELECTED,
wxCommandEventHandler( EDA_3D_VIEWER_FRAME::onViewportChanged ),
nullptr, this );
m_cbViewports->Connect( wxEVT_UPDATE_UI,
wxUpdateUIEventHandler( EDA_3D_VIEWER_FRAME::onUpdateViewportsCb ),
nullptr, this );
}
EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME()
{
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr )
{
delete m_spaceMouse;
}
#endif
delete m_spaceMouse;
Prj().GetProjectFile().m_Viewports3D = GetUserViewports();
m_cbViewports->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED,
wxCommandEventHandler( EDA_3D_VIEWER_FRAME::onViewportChanged ),
nullptr, this );
m_cbViewports->Disconnect( wxEVT_UPDATE_UI,
wxUpdateUIEventHandler( EDA_3D_VIEWER_FRAME::onUpdateViewportsCb ),
nullptr, this );
Prj().GetProjectFile().m_Viewports3D = m_appearancePanel->GetUserViewports();
m_canvas->SetEventDispatcher( nullptr );
@@ -250,10 +247,15 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
{
return m_boardAdapter.m_Cfg->m_Render.show_footprints_not_in_posfile;
};
auto show_DNP =
[this]( const SELECTION& aSel )
{
return m_boardAdapter.m_Cfg->m_Render.show_footprints_dnp;
};
auto showBBoxes =
[this]( const SELECTION& aSel )
{
return m_boardAdapter.m_Cfg->m_Render.opengl_show_model_bbox;
return m_boardAdapter.m_Cfg->m_Render.show_model_bbox;
};
auto showAxes =
[this]( const SELECTION& aSel )
@@ -266,23 +268,31 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
return m_currentCamera.GetProjection() == PROJECTION_TYPE::ORTHO;
};
RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW, ACTION_CONDITIONS().Check( raytracing ) );
auto appearances =
[this]( const SELECTION& aSel )
{
return m_boardAdapter.m_Cfg->m_AuiPanels.show_layer_manager;
};
mgr->SetConditions( EDA_3D_ACTIONS::showTHT, ACTION_CONDITIONS().Check( showTH ) );
mgr->SetConditions( EDA_3D_ACTIONS::showSMD, ACTION_CONDITIONS().Check( showSMD ) );
mgr->SetConditions( EDA_3D_ACTIONS::showVirtual, ACTION_CONDITIONS().Check( showVirtual ) );
mgr->SetConditions( EDA_3D_ACTIONS::showNotInPosFile, ACTION_CONDITIONS().Check( show_NotInPosfile ) );
RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW, ACTION_CONDITIONS().Check( raytracing ) );
mgr->SetConditions( EDA_3D_ACTIONS::showTHT, ACTION_CONDITIONS().Check( showTH ) );
mgr->SetConditions( EDA_3D_ACTIONS::showSMD, ACTION_CONDITIONS().Check( showSMD ) );
mgr->SetConditions( EDA_3D_ACTIONS::showVirtual, ACTION_CONDITIONS().Check( showVirtual ) );
mgr->SetConditions( EDA_3D_ACTIONS::showNotInPosFile, ACTION_CONDITIONS().Check( show_NotInPosfile ) );
mgr->SetConditions( EDA_3D_ACTIONS::showDNP, ACTION_CONDITIONS().Check( show_DNP ) );
mgr->SetConditions( EDA_3D_ACTIONS::showBBoxes, ACTION_CONDITIONS().Check( showBBoxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::showAxis, ACTION_CONDITIONS().Check( showAxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::showBBoxes, ACTION_CONDITIONS().Check( showBBoxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::showAxis, ACTION_CONDITIONS().Check( showAxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::noGrid, GridSizeCheck( GRID3D_TYPE::NONE ) );
mgr->SetConditions( EDA_3D_ACTIONS::show10mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_10MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show5mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_5MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show2_5mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_2P5MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show1mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_1MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::toggleOrtho, ACTION_CONDITIONS().Check( ortho ) );
mgr->SetConditions( EDA_3D_ACTIONS::noGrid, GridSizeCheck( GRID3D_TYPE::NONE ) );
mgr->SetConditions( EDA_3D_ACTIONS::show10mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_10MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show5mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_5MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show2_5mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_2P5MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::show1mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_1MM ) );
mgr->SetConditions( EDA_3D_ACTIONS::toggleOrtho, ACTION_CONDITIONS().Check( ortho ) );
mgr->SetConditions( EDA_3D_ACTIONS::showLayersManager, ACTION_CONDITIONS().Check( appearances ) );
#undef GridSizeCheck
}
@@ -290,6 +300,7 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
bool EDA_3D_VIEWER_FRAME::TryBefore( wxEvent& aEvent )
{
static bool s_presetSwitcherShown = false;
static bool s_viewportSwitcherShown = false;
// wxWidgets generates no key events for the tab key when the ctrl key is held down. One
@@ -303,13 +314,49 @@ bool EDA_3D_VIEWER_FRAME::TryBefore( wxEvent& aEvent )
&& static_cast<wxKeyEvent&>( aEvent ).GetKeyCode() == WXK_TAB )
#endif
{
if( !s_viewportSwitcherShown && wxGetKeyState( VIEWPORT_SWITCH_KEY ) )
if( !s_presetSwitcherShown && wxGetKeyState( PRESET_SWITCH_KEY ) )
{
if( m_appearancePanel && this->IsActive() )
{
wxArrayString mru = m_appearancePanel->GetLayerPresetsMRU();
if( mru.size() > 0 )
{
for( wxString& str : mru )
{
if( str == FOLLOW_PCB )
str = _( "Follow PCB Editor" );
else if( str == FOLLOW_PLOT_SETTINGS )
str = _( "Follow PCB Plot Settings" );
}
EDA_VIEW_SWITCHER switcher( this, mru, PRESET_SWITCH_KEY );
s_presetSwitcherShown = true;
switcher.ShowModal();
s_presetSwitcherShown = false;
int idx = switcher.GetSelection();
if( idx >= 0 && idx < (int) mru.size() )
{
wxString internalName = m_appearancePanel->GetLayerPresetsMRU()[idx];
m_appearancePanel->ApplyLayerPreset( internalName );
}
return true;
}
}
}
else if( !s_viewportSwitcherShown && wxGetKeyState( VIEWPORT_SWITCH_KEY ) )
{
if( this->IsActive() )
{
if( m_viewportMRU.size() > 0 )
const wxArrayString& viewportMRU = m_appearancePanel->GetViewportsMRU();
if( viewportMRU.size() > 0 )
{
EDA_VIEW_SWITCHER switcher( this, m_viewportMRU, VIEWPORT_SWITCH_KEY );
EDA_VIEW_SWITCHER switcher( this, viewportMRU, VIEWPORT_SWITCH_KEY );
s_viewportSwitcherShown = true;
switcher.ShowModal();
@@ -317,8 +364,8 @@ bool EDA_3D_VIEWER_FRAME::TryBefore( wxEvent& aEvent )
int idx = switcher.GetSelection();
if( idx >= 0 && idx < (int) m_viewportMRU.size() )
applyViewport( m_viewportMRU[idx] );
if( idx >= 0 && idx < (int) viewportMRU.size() )
m_appearancePanel->ApplyViewport( viewportMRU[idx] );
return true;
}
@@ -334,30 +381,31 @@ void EDA_3D_VIEWER_FRAME::handleIconizeEvent( wxIconizeEvent& aEvent )
{
KIWAY_PLAYER::handleIconizeEvent( aEvent );
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr && aEvent.IsIconized() )
{
if( m_spaceMouse && aEvent.IsIconized() )
m_spaceMouse->SetFocus( false );
}
#endif
}
void EDA_3D_VIEWER_FRAME::ReloadRequest()
{
// This will schedule a request to load later
// ReloadRequest also updates the board pointer so always call it first
if( m_canvas )
m_canvas->ReloadRequest( GetBoard(), Prj().Get3DCacheManager() );
m_canvas->ReloadRequest( GetBoard(), PROJECT_PCB::Get3DCacheManager( &Prj() ) );
if( m_appearancePanel )
m_appearancePanel->UpdateLayerCtls();
}
void EDA_3D_VIEWER_FRAME::NewDisplay( bool aForceImmediateRedraw )
{
ReloadRequest();
if( m_canvas )
m_canvas->ReloadRequest( GetBoard(), PROJECT_PCB::Get3DCacheManager( &Prj() ) );
// After the ReloadRequest call, the refresh often takes a bit of time,
// and it is made here only on request.
if( aForceImmediateRedraw )
if( m_canvas && aForceImmediateRedraw )
m_canvas->Refresh();
}
@@ -391,6 +439,11 @@ void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnCloseWindow" ) );
// Do not show the layer manager during closing to avoid flicker on some platforms (Windows)
// that generate useless redraw of items in the Layer Manager
if( m_auimgr.GetPane( wxS( "LayersManager" ) ).IsShown() )
m_auimgr.GetPane( wxS( "LayersManager" ) ).Show( false );
if( m_canvas )
m_canvas->Close();
@@ -444,174 +497,6 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
}
std::vector<VIEWPORT3D> EDA_3D_VIEWER_FRAME::GetUserViewports() const
{
std::vector<VIEWPORT3D> ret;
for( const std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
ret.emplace_back( pair.second );
return ret;
}
void EDA_3D_VIEWER_FRAME::SetUserViewports( std::vector<VIEWPORT3D>& aViewportList )
{
m_viewports.clear();
for( const VIEWPORT3D& viewport : aViewportList )
{
if( m_viewports.count( viewport.name ) )
continue;
m_viewports[viewport.name] = viewport;
m_viewportMRU.Add( viewport.name );
}
}
void EDA_3D_VIEWER_FRAME::applyViewport( const wxString& aViewportName )
{
int idx = m_cbViewports->FindString( aViewportName );
if( idx >= 0 && idx < m_cbViewports->GetCount() - 3 /* separator */ )
{
m_cbViewports->SetSelection( idx );
m_lastSelectedViewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( idx ) );
m_currentCamera.SetViewMatrix( m_lastSelectedViewport->matrix );
if( m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
if( !m_lastSelectedViewport->name.IsEmpty() )
{
m_viewportMRU.Remove( m_lastSelectedViewport->name );
m_viewportMRU.Insert( m_lastSelectedViewport->name, 0 );
}
}
else
{
m_cbViewports->SetSelection( -1 ); // separator
m_lastSelectedViewport = nullptr;
}
}
void EDA_3D_VIEWER_FRAME::onViewportChanged( wxCommandEvent& aEvent )
{
int count = m_cbViewports->GetCount();
int index = m_cbViewports->GetSelection();
if( index >= 0 && index < count - 3 /* separator */ )
{
VIEWPORT3D* viewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( index ) );
wxCHECK( viewport, /* void */ );
applyViewport( viewport->name );
}
else if( index == count - 2 )
{
// Save current state to new preset
wxString name;
wxTextEntryDialog dlg( this, _( "Viewport name:" ), _( "Save Viewport" ), name );
if( dlg.ShowModal() != wxID_OK )
{
if( m_lastSelectedViewport )
m_cbViewports->SetStringSelection( m_lastSelectedViewport->name );
else
m_cbViewports->SetSelection( -1 );
return;
}
name = dlg.GetValue();
bool exists = m_viewports.count( name );
if( !exists )
{
m_viewports[name] = VIEWPORT3D( name, m_currentCamera.GetViewMatrix() );
index = m_cbViewports->Insert( name, index-1, static_cast<void*>( &m_viewports[name] ) );
}
else
{
index = m_cbViewports->FindString( name );
m_viewports[name].matrix = m_currentCamera.GetViewMatrix();
m_viewportMRU.Remove( name );
}
m_cbViewports->SetSelection( index );
m_viewportMRU.Insert( name, 0 );
return;
}
else if( index == count - 1 )
{
// Delete an existing viewport
wxArrayString headers;
std::vector<wxArrayString> items;
headers.Add( _( "Viewports" ) );
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
{
wxArrayString item;
item.Add( pair.first );
items.emplace_back( item );
}
EDA_LIST_DIALOG dlg( this, _( "Delete Viewport" ), headers, items );
dlg.SetListLabel( _( "Select viewport:" ) );
if( dlg.ShowModal() == wxID_OK )
{
wxString viewportName = dlg.GetTextSelection();
int idx = m_cbViewports->FindString( viewportName );
if( idx != wxNOT_FOUND )
{
m_viewports.erase( viewportName );
m_cbViewports->Delete( idx );
m_viewportMRU.Remove( viewportName );
}
}
if( m_lastSelectedViewport )
m_cbViewports->SetStringSelection( m_lastSelectedViewport->name );
else
m_cbViewports->SetSelection( -1 );
return;
}
passOnFocus();
}
void EDA_3D_VIEWER_FRAME::onUpdateViewportsCb( wxUpdateUIEvent& aEvent )
{
int count = m_cbViewports->GetCount();
int index = m_cbViewports->GetSelection();
if( index >= 0 && index < count - 3 )
{
VIEWPORT3D* viewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( index ) );
wxCHECK( viewport, /* void */ );
if( m_currentCamera.GetViewMatrix() != viewport->matrix )
m_cbViewports->SetSelection( -1 );
}
}
void EDA_3D_VIEWER_FRAME::onRenderEngineSelection( wxCommandEvent &event )
{
RENDER_ENGINE& engine = m_boardAdapter.m_Cfg->m_Render.engine;
@@ -655,12 +540,8 @@ void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
m_canvas->SetFocus();
}
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr )
{
if( m_spaceMouse )
m_spaceMouse->SetFocus( aEvent.GetActive() );
}
#endif
aEvent.Skip(); // required under wxMAC
}
@@ -676,13 +557,6 @@ void EDA_3D_VIEWER_FRAME::OnSetFocus( wxFocusEvent& aEvent )
}
void EDA_3D_VIEWER_FRAME::passOnFocus()
{
if( m_canvas )
m_canvas->SetFocus();
}
void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
{
EDA_BASE_FRAME::LoadSettings( aCfg );
@@ -694,16 +568,38 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
if( cfg )
{
m_boardAdapter.m_Cfg = cfg;
applySettings( cfg );
if( !GetBoard()->GetProject() )
GetBoard()->SetProject( &Prj() );
m_boardAdapter.SetBoard( GetBoard() );
// When opening the 3D viewer, we use the OpenGL mode, never the ray tracing engine
// because the ray tracing is very time consuming, and can be seen as not working
// (freeze window) with large boards.
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
m_canvas->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_canvas->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_canvas->SetProjectionMode( cfg->m_Camera.projection_mode );
if( cfg->m_CurrentPreset == LEGACY_PRESET_FLAG )
{
wxString legacyColorsPresetName = _( "legacy colors" );
cfg->m_UseStackupColors = false;
if( !cfg->FindPreset( legacyColorsPresetName ) )
{
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
GetAdapter().GetDefaultVisibleLayers(),
GetAdapter().GetDefaultColors() );
}
cfg->m_CurrentPreset = wxEmptyString;
}
m_boardAdapter.InitSettings( nullptr, nullptr );
if( m_appearancePanel )
m_appearancePanel->CommonSettingsChanged();
}
}
@@ -723,6 +619,8 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
if( cfg )
{
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
cfg->m_Camera.animation_enabled = m_canvas->GetAnimationEnabled();
cfg->m_Camera.moving_speed_multiplier = m_canvas->GetMovingSpeedMultiplier();
cfg->m_Camera.projection_mode = m_canvas->GetProjectionMode();
@@ -744,12 +642,64 @@ void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTex
ReCreateMainToolbar();
loadCommonSettings();
LoadSettings( Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>() );
applySettings( Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>() );
m_appearancePanel->CommonSettingsChanged();
NewDisplay( true );
}
void EDA_3D_VIEWER_FRAME::ShowChangedLanguage()
{
EDA_BASE_FRAME::ShowChangedLanguage();
SetTitle( _( "3D Viewer" ) );
ReCreateMainToolbar();
if( m_appearancePanel )
{
wxAuiPaneInfo& lm_pane_info = m_auimgr.GetPane( m_appearancePanel );
lm_pane_info.Caption( _( "Appearance" ) );
m_appearancePanel->OnLanguageChanged();
}
SetStatusText( wxEmptyString, ACTIVITY );
SetStatusText( wxEmptyString, HOVERED_ITEM );
}
void EDA_3D_VIEWER_FRAME::ToggleAppearanceManager()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
// show auxiliary Vertical layers and visibility manager toolbar
cfg->m_AuiPanels.show_layer_manager = !cfg->m_AuiPanels.show_layer_manager;
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
if( cfg->m_AuiPanels.show_layer_manager )
{
SetAuiPaneSize( m_auimgr, layersManager, cfg->m_AuiPanels.right_panel_width, -1 );
}
else
{
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
m_auimgr.Update();
}
}
void EDA_3D_VIEWER_FRAME::OnDarkModeToggle()
{
if( m_appearancePanel )
m_appearancePanel->OnDarkModeToggle();
}
void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
{
wxString fullFileName;
@@ -761,8 +711,8 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
{
// Remember path between saves during this session only.
const wxString wildcard = fmt_is_jpeg ? JpegFileWildcard() : PngFileWildcard();
const wxString ext = fmt_is_jpeg ? JpegFileExtension : PngFileExtension;
const wxString wildcard = fmt_is_jpeg ? FILEEXT::JpegFileWildcard() : FILEEXT::PngFileWildcard();
const wxString ext = fmt_is_jpeg ? FILEEXT::JpegFileExtension : FILEEXT::PngFileExtension;
// First time path is set to the project path.
if( !m_defaultSaveScreenshotFileName.IsOk() )
@@ -803,8 +753,13 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
}
// Be sure we have the latest 3D view (remember 3D view is buffered)
m_canvas->Request_refresh( true );
wxYield();
// Also ensure any highlighted item is not highlighted when creating screen shot
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS& cfg = m_boardAdapter.m_Cfg->m_Render;
bool allow_highlight = cfg.highlight_on_rollover;
cfg.highlight_on_rollover = false;
m_canvas->DoRePaint(); // init first buffer
m_canvas->DoRePaint(); // init second buffer
// Build image from the 3D buffer
wxWindowUpdateLocker noUpdates( this );
@@ -814,6 +769,8 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
if( m_canvas )
m_canvas->GetScreenshot( screenshotImage );
cfg.highlight_on_rollover = allow_highlight;
if( event.GetId() == ID_TOOL_SCREENCOPY_TOCLIBBOARD )
{
wxBitmap bitmap( screenshotImage );
@@ -858,9 +815,18 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING dpi{ settings, this };
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
}
void EDA_3D_VIEWER_FRAME::applySettings( EDA_3D_VIEWER_SETTINGS* cfg )
{
m_boardAdapter.m_Cfg = cfg;
m_canvas->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_canvas->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_canvas->SetProjectionMode( cfg->m_Camera.projection_mode );
m_canvas->SetVcSettings( EDA_DRAW_PANEL_GAL::GetVcSettings() );
}
+16 -26
View File
@@ -4,7 +4,8 @@
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,7 +26,7 @@
*/
/**
* @file eda_3d_viewer.h
* @file eda_3d_viewer_frame.h
* @brief Declaration of the eda_3d_viewer class
*/
@@ -40,15 +41,12 @@
#include <dialogs/dialog_color_picker.h> // for CUSTOM_COLORS_LIST definition
/// A variable name whose value holds the path of 3D shape files.
/// Currently an environment variable, eventually a project variable.
#define KICAD7_3DMODEL_DIR wxT( "KICAD7_3DMODEL_DIR" )
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS)
// Forward declarations
class NL_3D_VIEWER_PLUGIN;
class APPEARANCE_CONTROLS_3D;
enum EDA_3D_VIEWER_STATUSBAR
{
@@ -56,6 +54,7 @@ enum EDA_3D_VIEWER_STATUSBAR
HOVERED_ITEM,
X_POS,
Y_POS,
ZOOM_LEVEL,
};
/**
@@ -106,9 +105,6 @@ public:
EDA_3D_CANVAS* GetCanvas() { return m_canvas; }
std::vector<VIEWPORT3D> GetUserViewports() const;
void SetUserViewports( std::vector<VIEWPORT3D>& aViewportList );
void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
@@ -119,18 +115,19 @@ public:
* from the PCB frame because the 3D viewer isn't updated via the #KIWAY.
*/
void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
void ShowChangedLanguage() override;
APPEARANCE_CONTROLS_3D* GetAppearanceManager() { return m_appearancePanel; }
void ToggleAppearanceManager();
void OnDarkModeToggle();
protected:
void setupUIConditions() override;
void handleIconizeEvent( wxIconizeEvent& aEvent ) override;
/**
* switch to a given predefined 3D viewport
* @param aViewportName is the name of the viewport to switch on
*/
void applyViewport( const wxString& aViewportName );
private:
/// Called when user press the File->Exit
void Exit3DFrame( wxCommandEvent& event );
@@ -143,14 +140,11 @@ private:
void onRenderEngineSelection( wxCommandEvent& event );
void onDisableRayTracing( wxCommandEvent& aEvent );
void onViewportChanged( wxCommandEvent& aEvent );
void onUpdateViewportsCb( wxUpdateUIEvent& aEvent );
void OnActivate( wxActivateEvent& event );
void OnSetFocus( wxFocusEvent& event );
void passOnFocus();
void CreateMenuBar();
void doReCreateMenuBar() override;
void ReCreateMainToolbar();
/**
@@ -173,12 +167,12 @@ private:
*/
void loadCommonSettings();
void applySettings( EDA_3D_VIEWER_SETTINGS* aSettings );
private:
wxFileName m_defaultSaveScreenshotFileName;
ACTION_TOOLBAR* m_mainToolBar;
wxStaticText* m_viewportsLabel;
wxChoice* m_cbViewports;
EDA_3D_CANVAS* m_canvas;
BOARD_ADAPTER m_boardAdapter;
CAMERA& m_currentCamera;
@@ -188,10 +182,6 @@ private:
NL_3D_VIEWER_PLUGIN* m_spaceMouse;
std::map<wxString, VIEWPORT3D> m_viewports;
VIEWPORT3D* m_lastSelectedViewport;
wxArrayString m_viewportMRU;
/**
* Trace mask used to enable or disable the trace output of this class.
* The debug output can be turned on by setting the WXTRACE environment variable to
+243 -19
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -22,21 +23,172 @@
#include <common_ogl/ogl_attr_list.h>
#include <settings/parameters.h>
#include <settings/json_settings_internals.h>
#include <3d_canvas/board_adapter.h>
#include <wx/config.h>
#include "eda_3d_viewer_settings.h"
using KIGFX::COLOR4D;
///! Update the schema version whenever a migration is required
const int viewer3dSchemaVersion = 2;
using namespace std::placeholders;
EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
: APP_SETTINGS_BASE( "3d_viewer", viewer3dSchemaVersion ),
m_Render(),
m_Camera()
LAYER_PRESET_3D::LAYER_PRESET_3D( const wxString& aName ) :
name( aName )
{
layers.set( LAYER_3D_BOARD );
layers.set( LAYER_3D_COPPER_TOP );
layers.set( LAYER_3D_COPPER_BOTTOM );
layers.set( LAYER_3D_SILKSCREEN_TOP );
layers.set( LAYER_3D_SILKSCREEN_BOTTOM );
layers.set( LAYER_3D_SOLDERMASK_TOP );
layers.set( LAYER_3D_SOLDERMASK_BOTTOM );
layers.set( LAYER_3D_SOLDERPASTE );
layers.set( LAYER_3D_ADHESIVE );
layers.set( LAYER_3D_TH_MODELS );
layers.set( LAYER_3D_SMD_MODELS );
layers.set( LAYER_FP_REFERENCES );
layers.set( LAYER_FP_TEXT );
layers.set( LAYER_GRID_AXES );
// Preload colors vector so we don't have to worry about exceptions using colors.at()
colors[ LAYER_3D_BACKGROUND_TOP ] = BOARD_ADAPTER::g_DefaultBackgroundTop;
colors[ LAYER_3D_BACKGROUND_BOTTOM ] = BOARD_ADAPTER::g_DefaultBackgroundBot;
colors[ LAYER_3D_BOARD ] = BOARD_ADAPTER::g_DefaultBoardBody;
colors[ LAYER_3D_COPPER_TOP ] = BOARD_ADAPTER::g_DefaultSurfaceFinish;
colors[ LAYER_3D_COPPER_BOTTOM ] = BOARD_ADAPTER::g_DefaultSurfaceFinish;
colors[ LAYER_3D_SILKSCREEN_TOP ] = BOARD_ADAPTER::g_DefaultSilkscreen;
colors[ LAYER_3D_SILKSCREEN_BOTTOM ] = BOARD_ADAPTER::g_DefaultSilkscreen;
colors[ LAYER_3D_SOLDERMASK_TOP ] = BOARD_ADAPTER::g_DefaultSolderMask;
colors[ LAYER_3D_SOLDERMASK_BOTTOM ] = BOARD_ADAPTER::g_DefaultSolderMask;
colors[ LAYER_3D_SOLDERPASTE ] = BOARD_ADAPTER::g_DefaultSolderPaste;
colors[ LAYER_3D_USER_DRAWINGS ] = BOARD_ADAPTER::g_DefaultComments;
colors[ LAYER_3D_USER_COMMENTS ] = BOARD_ADAPTER::g_DefaultComments;
colors[ LAYER_3D_USER_ECO1 ] = BOARD_ADAPTER::g_DefaultECOs;
colors[ LAYER_3D_USER_ECO2 ] = BOARD_ADAPTER::g_DefaultECOs;
}
PARAM_LAYER_PRESET_3D::PARAM_LAYER_PRESET_3D( const std::string& aPath,
std::vector<LAYER_PRESET_3D>* aPresetList ) :
PARAM_LAMBDA<nlohmann::json>( aPath,
std::bind( &PARAM_LAYER_PRESET_3D::presetsToJson, this ),
std::bind( &PARAM_LAYER_PRESET_3D::jsonToPresets, this, _1 ),
{} ),
m_presets( aPresetList )
{
wxASSERT( aPresetList );
}
nlohmann::json PARAM_LAYER_PRESET_3D::presetsToJson()
{
nlohmann::json ret = nlohmann::json::array();
for( const LAYER_PRESET_3D& preset : *m_presets )
{
nlohmann::json js = {
{ "name", preset.name }
};
nlohmann::json layers = nlohmann::json::array();
for( int layer = 0; layer < LAYER_3D_END; ++layer )
{
if( preset.layers.test( layer ) )
layers.push_back( layer );
}
js["layers"] = layers;
nlohmann::json colors = nlohmann::json::array();
for( const auto& [ layer, color ] : preset.colors )
{
nlohmann::json layerColor = {
{ "layer", layer },
{ "color", color.ToCSSString() }
};
colors.push_back( layerColor );
}
js["colors"] = colors;
ret.push_back( js );
}
return ret;
}
void PARAM_LAYER_PRESET_3D::jsonToPresets( const nlohmann::json& aJson )
{
if( aJson.empty() || !aJson.is_array() )
return;
m_presets->clear();
for( const nlohmann::json& preset : aJson )
{
if( preset.contains( "name" ) )
{
LAYER_PRESET_3D p( preset.at( "name" ).get<wxString>() );
if( preset.contains( "layers" ) && preset.at( "layers" ).is_array() )
{
p.layers.reset();
for( const nlohmann::json& layer : preset.at( "layers" ) )
{
if( layer.is_number_integer() )
{
int layerNum = layer.get<int>();
if( layerNum >= 0 && layerNum < LAYER_3D_END )
p.layers.set( layerNum );
}
}
}
if( preset.contains( "colors" ) && preset.at( "colors" ).is_array() )
{
for( const nlohmann::json& layerColor : preset.at( "colors" ) )
{
if( layerColor.contains( "layer" ) && layerColor.contains( "color" )
&& layerColor.at( "layer" ).is_number_integer() )
{
int layerNum = layerColor.at( "layer" ).get<int>();
COLOR4D color = layerColor.at( "color" ).get<COLOR4D>();
p.colors[ layerNum ] = color;
}
}
}
m_presets->emplace_back( p );
}
}
}
///! Update the schema version whenever a migration is required
const int viewer3dSchemaVersion = 3;
EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
APP_SETTINGS_BASE( "3d_viewer", viewer3dSchemaVersion ),
m_Render(),
m_Camera()
{
m_params.emplace_back( new PARAM<bool>( "aui.show_layer_manager",
&m_AuiPanels.show_layer_manager, true ) );
m_params.emplace_back( new PARAM<int>( "aui.right_panel_width",
&m_AuiPanels.right_panel_width, -1 ) );
m_params.emplace_back( new PARAM_ENUM<RENDER_ENGINE>( "render.engine", &m_Render.engine,
RENDER_ENGINE::OPENGL,
RENDER_ENGINE::OPENGL,
@@ -67,9 +219,11 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
m_params.emplace_back( new PARAM<bool>( "render.opengl_copper_thickness",
&m_Render.opengl_copper_thickness, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_model_bbox",
&m_Render.opengl_show_model_bbox, false ) );
&m_Render.show_model_bbox, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_off_board_silk",
&m_Render.show_off_board_silk, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_highlight_on_rollover",
&m_Render.opengl_highlight_on_rollover, true ) );
&m_Render.highlight_on_rollover, true ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_AA_disableOnMove",
&m_Render.opengl_AA_disableOnMove, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_thickness_disableOnMove",
@@ -162,8 +316,6 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
&m_Render.raytrace_lightAzimuth,
default_azimuth ) );
m_params.emplace_back( new PARAM<bool>( "render.realistic",
&m_Render.realistic, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_adhesive",
&m_Render.show_adhesive, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_axis",
@@ -172,8 +324,12 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
&m_Render.show_board_body, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_comments",
&m_Render.show_comments, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_eco",
&m_Render.show_eco, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_drawings",
&m_Render.show_drawings, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_eco1",
&m_Render.show_eco1, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_eco2",
&m_Render.show_eco2, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_insert",
&m_Render.show_footprints_insert, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_normal",
@@ -182,20 +338,36 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
&m_Render.show_footprints_virtual, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_not_in_posfile",
&m_Render.show_footprints_not_in_posfile, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_silkscreen",
&m_Render.show_silkscreen, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_soldermask",
&m_Render.show_soldermask, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_dnp",
&m_Render.show_footprints_dnp, false ) );
m_params.emplace_back( new PARAM<bool>( "render.show_silkscreen_top",
&m_Render.show_silkscreen_top, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_silkscreen_bottom",
&m_Render.show_silkscreen_bottom, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_soldermask_top",
&m_Render.show_soldermask_top, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_soldermask_bottom",
&m_Render.show_soldermask_bottom, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_solderpaste",
&m_Render.show_solderpaste, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_copper_top",
&m_Render.show_copper_bottom, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_copper_bottom",
&m_Render.show_copper_top, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_zones",
&m_Render.show_zones, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_fp_references",
&m_Render.show_fp_references, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_fp_values",
&m_Render.show_fp_values, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_fp_text",
&m_Render.show_fp_text, true ) );
m_params.emplace_back( new PARAM<bool>( "render.subtract_mask_from_silk",
&m_Render.subtract_mask_from_silk, false ) );
m_params.emplace_back( new PARAM<bool>( "render.clip_silk_on_via_annulus",
&m_Render.clip_silk_on_via_annulus, false ) );
&m_Render.clip_silk_on_via_annuli, false ) );
m_params.emplace_back( new PARAM<bool>( "render.plated_and_bare_copper",
&m_Render.renderPlatedPadsAsPlated, false ) );
&m_Render.differentiate_plated_copper, false ) );
m_params.emplace_back( new PARAM<bool>( "camera.animation_enabled",
&m_Camera.animation_enabled, true ) );
m_params.emplace_back( new PARAM<int>( "camera.moving_speed_multiplier",
@@ -205,6 +377,13 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
m_params.emplace_back( new PARAM<int>( "camera.projection_mode",
&m_Camera.projection_mode, 1 ) );
m_params.emplace_back( new PARAM<bool>( "use_stackup_colors",
&m_UseStackupColors, true ) );
m_params.emplace_back( new PARAM_LAYER_PRESET_3D( "layer_presets",
&m_LayerPresets ) );
m_params.emplace_back( new PARAM<wxString>( "current_layer_preset",
&m_CurrentPreset, LEGACY_PRESET_FLAG ) );
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
registerMigration( 1, 2,
@@ -213,6 +392,51 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
Set( "render.opengl_copper_thickness", false );
return true;
} );
registerMigration( 2, 3,
[&]() -> bool
{
if( std::optional<bool> optval = Get<bool>( "render.show_copper" ) )
{
Set( "render.show_copper_top", *optval );
Set( "render.show_copper_bottom", *optval );
}
if( std::optional<bool> optval = Get<bool>( "render.show_silkscreen" ) )
{
Set( "render.show_silkscreen_top", *optval );
Set( "render.show_silkscreen_bottom", *optval );
}
if( std::optional<bool> optval = Get<bool>( "render.show_soldermask" ) )
{
Set( "render.show_soldermask_top", *optval );
Set( "render.show_soldermask_bottom", *optval );
}
if( std::optional<bool> optval = Get<bool>( "render.show_comments" ) )
Set( "render.show_drawings", *optval );
if( std::optional<bool> optval = Get<bool>( "render.show_eco" ) )
{
Set( "render.show_eco1", *optval );
Set( "render.show_eco2", *optval );
}
return true;
} );
}
LAYER_PRESET_3D* EDA_3D_VIEWER_SETTINGS::FindPreset( const wxString& aName )
{
for( LAYER_PRESET_3D& preset : m_LayerPresets )
{
if( preset.name == aName )
return &preset;
}
return nullptr;
}
+72 -9
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -26,11 +27,55 @@
#include <plugins/3dapi/xv3d_types.h>
#include <settings/app_settings.h>
#include <settings/parameters.h>
#include <project/board_project_settings.h>
#include "render_settings.h"
#define FOLLOW_PCB wxT( "follow_pcb_editor" )
#define FOLLOW_PLOT_SETTINGS wxT( "follow_plot_settings" )
#define LEGACY_PRESET_FLAG wxT( "legacy_preset_flag" )
struct LAYER_PRESET_3D
{
LAYER_PRESET_3D( const wxString& aName = wxEmptyString );
LAYER_PRESET_3D( const wxString& aName, const std::bitset<LAYER_3D_END>& aLayers,
const std::map<int, KIGFX::COLOR4D>& aColors ) :
name( aName ),
layers( aLayers ),
colors( aColors )
{
}
wxString name; ///< A name for this layer set
std::bitset<LAYER_3D_END> layers;
std::map<int, KIGFX::COLOR4D> colors;
};
class PARAM_LAYER_PRESET_3D : public PARAM_LAMBDA<nlohmann::json>
{
public:
PARAM_LAYER_PRESET_3D( const std::string& aPath, std::vector<LAYER_PRESET_3D>* aPresetList );
private:
nlohmann::json presetsToJson();
void jsonToPresets( const nlohmann::json& aJson );
std::vector<LAYER_PRESET_3D>* m_presets;
};
class EDA_3D_VIEWER_SETTINGS : public APP_SETTINGS_BASE
{
public:
struct AUI_PANELS
{
int right_panel_width;
bool show_layer_manager;
};
struct RENDER_SETTINGS
{
RENDER_ENGINE engine;
@@ -44,8 +89,9 @@ public:
bool opengl_holes_disableOnMove;
bool opengl_render_bbox_only_OnMove;
bool opengl_copper_thickness;
bool opengl_show_model_bbox;
bool opengl_highlight_on_rollover;
bool show_model_bbox;
bool show_off_board_silk;
bool highlight_on_rollover;
KIGFX::COLOR4D opengl_selection_color;
bool raytrace_anti_aliasing;
@@ -74,23 +120,32 @@ public:
std::vector<int> raytrace_lightElevation; // -90 .. 90
std::vector<int> raytrace_lightAzimuth; // 0 .. 359
bool realistic;
bool show_adhesive;
bool show_axis;
bool show_board_body;
bool show_comments;
bool show_eco;
bool show_drawings;
bool show_eco1;
bool show_eco2;
bool show_footprints_insert;
bool show_footprints_normal;
bool show_footprints_virtual;
bool show_footprints_not_in_posfile;
bool show_silkscreen;
bool show_soldermask;
bool show_footprints_dnp;
bool show_silkscreen_top;
bool show_silkscreen_bottom;
bool show_soldermask_top;
bool show_soldermask_bottom;
bool show_solderpaste;
bool show_copper_top;
bool show_copper_bottom;
bool show_zones;
bool show_fp_references;
bool show_fp_values;
bool show_fp_text;
bool subtract_mask_from_silk;
bool clip_silk_on_via_annulus;
bool renderPlatedPadsAsPlated;
bool clip_silk_on_via_annuli;
bool differentiate_plated_copper;
};
struct CAMERA_SETTINGS
@@ -105,11 +160,19 @@ public:
virtual ~EDA_3D_VIEWER_SETTINGS() {}
LAYER_PRESET_3D* FindPreset( const wxString& aName );
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
public:
AUI_PANELS m_AuiPanels;
RENDER_SETTINGS m_Render;
CAMERA_SETTINGS m_Camera;
bool m_UseStackupColors;
std::vector<LAYER_PRESET_3D> m_LayerPresets;
wxString m_CurrentPreset;
protected:
virtual std::string getLegacyFrameName() const override { return "Viewer3DFrameName"; }
+271 -206
View File
@@ -2,7 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2017-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2017-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -23,6 +24,7 @@
#include <3d_viewer_id.h>
#include <3d_enums.h>
#include "eda_3d_actions.h"
#include "tool/tool_action.h"
// Actions, being statically-defined, require specialized I18N handling. We continue to
@@ -32,245 +34,308 @@
#undef _
#define _(s) s
// No description, it is not supposed to be shown anywhere
TOOL_ACTION EDA_3D_ACTIONS::controlActivate( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control" )
.Scope( AS_GLOBAL )
.Flags( AF_ACTIVATE ) );
TOOL_ACTION EDA_3D_ACTIONS::controlActivate( "3DViewer.Control", AS_GLOBAL,
0, "", "", "",
BITMAPS::INVALID_BITMAP, AF_ACTIVATE ); // No description, it is not supposed to be shown anywhere
TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.pivotCenter" )
.Scope( AS_ACTIVE )
.DefaultHotkey( ' ' )
.FriendlyName( _( "Set Pivot" ) )
.Tooltip( _( "Place point around which the board will be rotated (middle mouse click)" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_PIVOT_CENTER ) );
TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( "3DViewer.Control.pivotCenter",
AS_ACTIVE,
' ', "",
_( "Center pivot rotation" ), _( "Center pivot rotation (middle mouse click)" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) WXK_SPACE );
TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Clockwise" ) )
.Icon( BITMAPS::rotate_cw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( "3DViewer.Control.rotateXclockwise",
AS_GLOBAL, 0, "",
_( "Rotate X Clockwise" ), _( "Rotate X Clockwise" ),
BITMAPS::rotate_cw_x, AF_NONE, (void*) ROTATION_DIR::X_CW );
TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CCW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( "3DViewer.Control.rotateXcounterclockwise",
AS_GLOBAL, 0, "",
_( "Rotate X Counterclockwise" ), _( "Rotate X Counterclockwise" ),
BITMAPS::rotate_ccw_x, AF_NONE, (void*) ROTATION_DIR::X_CCW );
TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Clockwise" ) )
.Icon( BITMAPS::rotate_cw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( "3DViewer.Control.rotateYclockwise",
AS_GLOBAL, 0, "",
_( "Rotate Y Clockwise" ), _( "Rotate Y Clockwise" ),
BITMAPS::rotate_cw_y, AF_NONE, (void*) ROTATION_DIR::Y_CW );
TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CCW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( "3DViewer.Control.rotateYcounterclockwise",
AS_GLOBAL, 0, "",
_( "Rotate Y Counterclockwise" ), _( "Rotate Y Counterclockwise" ),
BITMAPS::rotate_ccw_y, AF_NONE, (void*) ROTATION_DIR::Y_CCW );
TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Clockwise" ) )
.Icon( BITMAPS::rotate_cw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( "3DViewer.Control.rotateZclockwise",
AS_GLOBAL, 0, "",
_( "Rotate Z Clockwise" ), _( "Rotate Z Clockwise" ),
BITMAPS::rotate_cw_z, AF_NONE, (void*) ROTATION_DIR::Z_CW );
TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CCW ) );
TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( "3DViewer.Control.rotateZcounterclockwise",
AS_GLOBAL, 0, "",
_( "Rotate Z Counterclockwise" ), _( "Rotate Z Counterclockwise" ),
BITMAPS::rotate_ccw_z, AF_NONE, (void*) ROTATION_DIR::Z_CCW );
TOOL_ACTION EDA_3D_ACTIONS::moveLeft( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveLeft" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_LEFT )
.FriendlyName( _( "Move Board Left" ) )
.Icon( BITMAPS::left )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) );
TOOL_ACTION EDA_3D_ACTIONS::moveLeft( "3DViewer.Control.moveLeft",
AS_ACTIVE,
WXK_LEFT, "",
_( "Move board Left" ), _( "Move board Left" ),
BITMAPS::left, AF_NONE, (void*) CURSOR_LEFT );
TOOL_ACTION EDA_3D_ACTIONS::moveRight( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveRight" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_RIGHT )
.FriendlyName( _( "Move Board Right" ) )
.Icon( BITMAPS::right )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) );
TOOL_ACTION EDA_3D_ACTIONS::moveRight( "3DViewer.Control.moveRight",
AS_ACTIVE,
WXK_RIGHT, "",
_( "Move board Right" ), _( "Move board Right" ),
BITMAPS::right, AF_NONE, (void*) CURSOR_RIGHT );
TOOL_ACTION EDA_3D_ACTIONS::moveUp( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveUp" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_UP )
.FriendlyName( _( "Move Board Up" ) )
.Icon( BITMAPS::up )
.Flags( AF_NONE )
.Parameter( CURSOR_UP ) );
TOOL_ACTION EDA_3D_ACTIONS::moveUp( "3DViewer.Control.moveUp",
AS_ACTIVE,
WXK_UP, "",
_( "Move board Up" ), _( "Move board Up" ),
BITMAPS::up, AF_NONE, (void*) CURSOR_UP );
TOOL_ACTION EDA_3D_ACTIONS::moveDown( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.moveDown" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_DOWN )
.FriendlyName( _( "Move Board Down" ) )
.Icon( BITMAPS::down )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) );
TOOL_ACTION EDA_3D_ACTIONS::moveDown( "3DViewer.Control.moveDown",
AS_ACTIVE,
WXK_DOWN, "",
_( "Move board Down" ), _( "Move board Down" ),
BITMAPS::down, AF_NONE, (void*) CURSOR_DOWN );
TOOL_ACTION EDA_3D_ACTIONS::homeView( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.homeView" )
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_HOME )
.FriendlyName ( _( "Home View" ) )
.Tooltip( _( "Redraw at the home position and zoom" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FIT_SCREEN ) );
TOOL_ACTION EDA_3D_ACTIONS::homeView( "3DViewer.Control.homeView",
AS_ACTIVE,
WXK_HOME, "",
_( "Home view" ), _( "Home view" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) WXK_HOME );
TOOL_ACTION EDA_3D_ACTIONS::flipView( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.flipView" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'F' )
.FriendlyName( _( "Flip Board" ) )
.Tooltip( _( "Flip the board view" ) )
.Icon( BITMAPS::flip_board )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FLIP ) );
TOOL_ACTION EDA_3D_ACTIONS::resetView( "3DViewer.Control.resetView",
AS_ACTIVE,
'R', "",
_( "Reset view" ), _( "Reset view" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) ID_VIEW3D_RESET );
TOOL_ACTION EDA_3D_ACTIONS::toggleOrtho( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.toggleOrtho" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Toggle Orthographic Projection" ) )
.Tooltip( _( "Enable/disable orthographic projection" ) )
.Icon( BITMAPS::ortho ) );
TOOL_ACTION EDA_3D_ACTIONS::flipView( "3DViewer.Control.flipView",
AS_ACTIVE,
'F', "",
_( "Flip Board" ), _( "Flip the board view" ),
BITMAPS::flip_board, AF_NONE, (void*) ID_VIEW3D_FLIP );
TOOL_ACTION EDA_3D_ACTIONS::viewFront( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewFront" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Y' )
.FriendlyName( _( "View Front" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FRONT ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleOrtho( "3DViewer.Control.toggleOrtho",
AS_GLOBAL, 0, "",
_( "Toggle orthographic projection" ), _( "Enable/disable orthographic projection" ),
BITMAPS::ortho );
TOOL_ACTION EDA_3D_ACTIONS::viewBack( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewBack" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Y' )
.FriendlyName( _( "View Back" ) )
.Icon( BITMAPS::axis3d_back )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BACK ) );
TOOL_ACTION EDA_3D_ACTIONS::viewFront( "3DViewer.Control.viewFront",
AS_ACTIVE,
'Y', "",
_( "View Front" ), _( "View Front" ),
BITMAPS::axis3d_front, AF_NONE, (void*) ID_VIEW3D_FRONT );
TOOL_ACTION EDA_3D_ACTIONS::viewLeft( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewLeft" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'X' )
.FriendlyName( _( "View Left" ) )
.Icon( BITMAPS::axis3d_left )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_LEFT ) );
TOOL_ACTION EDA_3D_ACTIONS::viewBack( "3DViewer.Control.viewBack",
AS_ACTIVE,
MD_SHIFT + 'Y', "",
_( "View Back" ), _( "View Back" ),
BITMAPS::axis3d_back, AF_NONE, (void*) ID_VIEW3D_BACK );
TOOL_ACTION EDA_3D_ACTIONS::viewRight( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewRight" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'X' )
.FriendlyName( _( "View Right" ) )
.Icon( BITMAPS::axis3d_right )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_RIGHT ) );
TOOL_ACTION EDA_3D_ACTIONS::viewLeft( "3DViewer.Control.viewLeft",
AS_ACTIVE,
MD_SHIFT + 'X', "",
_( "View Left" ), _( "View Left" ),
BITMAPS::axis3d_left, AF_NONE, (void*) ID_VIEW3D_LEFT );
TOOL_ACTION EDA_3D_ACTIONS::viewTop( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewTop" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Z' )
.FriendlyName( _( "View Top" ) )
.Icon( BITMAPS::axis3d_top )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_TOP ) );
TOOL_ACTION EDA_3D_ACTIONS::viewRight( "3DViewer.Control.viewRight",
AS_ACTIVE,
'X', "",
_( "View Right" ), _( "View Right" ),
BITMAPS::axis3d_right, AF_NONE, (void*) ID_VIEW3D_RIGHT );
TOOL_ACTION EDA_3D_ACTIONS::viewBottom( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewBottom" )
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Z' )
.FriendlyName( _( "View Bottom" ) )
.Icon( BITMAPS::axis3d_bottom )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BOTTOM ) );
TOOL_ACTION EDA_3D_ACTIONS::viewTop( "3DViewer.Control.viewTop",
AS_ACTIVE,
'Z', "",
_( "View Top" ), _( "View Top" ),
BITMAPS::axis3d_top, AF_NONE, (void*) ID_VIEW3D_TOP );
TOOL_ACTION EDA_3D_ACTIONS::noGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.noGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "No 3D Grid" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::viewBottom( "3DViewer.Control.viewBottom",
AS_ACTIVE,
MD_SHIFT + 'Z', "",
_( "View Bottom" ), _( "View Bottom" ),
BITMAPS::axis3d_bottom, AF_NONE, (void*) ID_VIEW3D_BOTTOM );
TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show10mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 10mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_10MM ) );
TOOL_ACTION EDA_3D_ACTIONS::noGrid( "3DViewer.Control.noGrid",
AS_GLOBAL, 0, "",
_( "No 3D Grid" ), _( "No 3D Grid" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) GRID3D_TYPE::NONE );
TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_5MM ) );
TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( "3DViewer.Control.show10mmGrid",
AS_GLOBAL, 0, "",
_( "3D Grid 10mm" ), _( "3D Grid 10mm" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) GRID3D_TYPE::GRID_10MM );
TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show2_5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 2.5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_2P5MM ) );
TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( "3DViewer.Control.show5mmGrid",
AS_GLOBAL, 0, "",
_( "3D Grid 5mm" ), _( "3D Grid 5mm" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) GRID3D_TYPE::GRID_5MM );
TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show1mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 1mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_1MM ) );
TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( "3DViewer.Control.show2_5mmGrid",
AS_GLOBAL, 0, "",
_( "3D Grid 2.5mm" ), _( "3D Grid 2.5mm" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) GRID3D_TYPE::GRID_2P5MM );
TOOL_ACTION EDA_3D_ACTIONS::materialNormal( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialNormal" )
.Scope( AS_ACTIVE )
.FriendlyName( _( "Render Realistic Materials" ) )
.Tooltip( _( "Use all material properties from each 3D model file" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::NORMAL ) );
TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( "3DViewer.Control.show1mmGrid",
AS_GLOBAL, 0, "",
_( "3D Grid 1mm" ), _( "3D Grid 1mm" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) GRID3D_TYPE::GRID_1MM );
TOOL_ACTION EDA_3D_ACTIONS::materialDiffuse( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialDiffuse" )
.Scope( AS_ACTIVE )
.FriendlyName( _( "Render Solid Colors" ) )
.Tooltip( _( "Use only the diffuse color property from 3D model file" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::DIFFUSE_ONLY ) );
TOOL_ACTION EDA_3D_ACTIONS::materialNormal( "3DViewer.Control.materialNormal",
AS_ACTIVE,
0, "",
_( "Render Realistic Materials" ),
_( "Use all material properties from each 3D model file" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::NORMAL );
TOOL_ACTION EDA_3D_ACTIONS::materialCAD( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.materialCAD" )
.Scope( AS_ACTIVE )
.FriendlyName( _( "Render CAD Colors" ) )
.Tooltip( _( "Use a CAD color style based on the diffuse color of the material" ) )
.Flags( AF_NONE )
.Parameter( MATERIAL_MODE::CAD_MODE ) );
TOOL_ACTION EDA_3D_ACTIONS::materialDiffuse( "3DViewer.Control.materialDiffuse",
AS_ACTIVE,
0, "",
_( "Render Solid Colors" ),
_( "Use only the diffuse color property from model 3D model file" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::DIFFUSE_ONLY );
TOOL_ACTION EDA_3D_ACTIONS::showTHT( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesTHT" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'T' )
.FriendlyName( _( "Show Through Hole 3D Models" ) )
.Tooltip( _( "Show 3D models for 'Through hole' type footprints" ) )
.Icon( BITMAPS::show_tht )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::materialCAD( "3DViewer.Control.materialCAD",
AS_ACTIVE,
0, "",
_( "Render CAD Colors" ),
_( "Use a CAD color style based on the diffuse color of the material" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE );
TOOL_ACTION EDA_3D_ACTIONS::showSMD( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesSMD" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'S' )
.FriendlyName( _( "Show SMD 3D Models" ) )
.Tooltip( _( "Show 3D models for 'Surface mount' type footprints" ) )
.Icon( BITMAPS::show_smt )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT",
AS_ACTIVE,
'T', "",
_( "Toggle Through Hole 3D models" ),
_( "Toggle 3D models for 'Through hole' type components" ),
BITMAPS::show_tht, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attributesOther" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'V' )
.FriendlyName( _( "Show Unspecified 3D Models" ) )
.Tooltip( _( "Show 3D models for 'unspecified' type footprints" ) )
.Icon( BITMAPS::show_other )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD",
AS_ACTIVE,
'S', "",
_( "Toggle SMD 3D models" ),
_( "Toggle 3D models for 'Surface mount' type components" ),
BITMAPS::show_smt, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showNotInPosFile( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attribute_not_in_posfile" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'P' )
.FriendlyName( _( "Show 3D Models not in POS File" ) )
.Tooltip( _( "Show 3D models even if not found in .pos file" ) )
.Icon( BITMAPS::show_not_in_posfile )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther",
AS_ACTIVE,
'V', "",
_( "Toggle unspecified 3D models" ), _( "Toggle 3D models for 'unspecified' type components" ),
BITMAPS::show_other, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showDNP( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.attribute_dnp" )
.Scope( AS_ACTIVE )
.DefaultHotkey( 'D' )
.FriendlyName( _( "Show 3D Models marked DNP" ) )
.Tooltip( _( "Show 3D models even if marked 'Do Not Place'" ) )
.Icon( BITMAPS::show_dnp )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showNotInPosFile( "3DViewer.Control.attribute_not_in_posfile",
AS_ACTIVE,
'P', "",
_( "Toggle 3D models not in pos file" ), _( "Toggle 3D models not in pos file" ),
BITMAPS::show_not_in_posfile, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showBoundingBoxes" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Model Bounding Boxes" ) )
.Tooltip( _( "Show 3D model bounding boxes in realtime renderer" ) )
.Icon( BITMAPS::ortho )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( "3DViewer.Control.showBoundingBoxes",
AS_GLOBAL, 0, "",
_( "Show Model Bounding Boxes" ), _( "Show Model Bounding Boxes" ),
BITMAPS::ortho, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showAxis" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show 3D Axis" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleRealisticMode( "3DViewer.Control.toggleRealisticMode",
AS_GLOBAL, 0, "",
_( "Toggle realistic mode" ), _( "Toggle realistic mode" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleBoardBody( "3DViewer.Control.toggleBoardBody",
AS_GLOBAL, 0, "",
_( "Toggle board body display" ), _( "Toggle board body display" ) );
TOOL_ACTION EDA_3D_ACTIONS::showAxis( "3DViewer.Control.showAxis",
AS_GLOBAL, 0, "",
_( "Show 3D Axis" ), _( "Show 3D Axis" ),
BITMAPS::axis3d_front, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::toggleZones( "3DViewer.Control.toggleZones",
AS_GLOBAL, 0, "",
_( "Toggle zone display" ), _( "Toggle zone display" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleAdhesive( "3DViewer.Control.toggleAdhesive",
AS_GLOBAL, 0, "",
_( "Toggle adhesive display" ), _( "Toggle display of adhesive layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleSilk( "3DViewer.Control.toggleSilk",
AS_GLOBAL, 0, "",
_( "Toggle silkscreen display" ), _( "Toggle display of silkscreen layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleSolderMask( "3DViewer.Control.toggleSolderMask",
AS_GLOBAL, 0, "",
_( "Toggle solder mask display" ), _( "Toggle display of solder mask layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleSolderPaste( "3DViewer.Control.toggleSolderPaste",
AS_GLOBAL, 0, "",
_( "Toggle solder paste display" ), _( "Toggle display of solder paste layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleComments( "3DViewer.Control.toggleComments",
AS_GLOBAL, 0, "",
_( "Toggle comments display" ), _( "Toggle display of comments and drawings layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleECO( "3DViewer.Control.toggleECO",
AS_GLOBAL, 0, "",
_( "Toggle ECO display" ), _( "Toggle display of ECO layers" ) );
TOOL_ACTION EDA_3D_ACTIONS::showLayersManager( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showLayersManager" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Appearance Manager" ) )
.Tooltip( _( "Show/hide the appearance manager" ) )
.Icon( BITMAPS::layers_manager ) );
+4 -12
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2023 CERN
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@@ -54,7 +54,6 @@ public:
static TOOL_ACTION moveUp;
static TOOL_ACTION moveDown;
static TOOL_ACTION homeView;
static TOOL_ACTION resetView;
static TOOL_ACTION flipView;
static TOOL_ACTION toggleOrtho;
@@ -79,17 +78,10 @@ public:
static TOOL_ACTION showSMD;
static TOOL_ACTION showVirtual;
static TOOL_ACTION showNotInPosFile;
static TOOL_ACTION showDNP;
static TOOL_ACTION showBBoxes;
static TOOL_ACTION toggleRealisticMode;
static TOOL_ACTION toggleBoardBody;
static TOOL_ACTION showAxis;
static TOOL_ACTION toggleZones;
static TOOL_ACTION toggleAdhesive;
static TOOL_ACTION toggleSilk;
static TOOL_ACTION toggleSolderMask;
static TOOL_ACTION toggleSolderPaste;
static TOOL_ACTION toggleComments;
static TOOL_ACTION toggleECO;
static TOOL_ACTION showLayersManager;
};
#endif
+52 -116
View File
@@ -1,7 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,8 +29,9 @@
#include <id.h>
#include <kiface_base.h>
#include <tools/eda_3d_controller.h>
#include "eda_3d_actions.h"
#include "dialogs/panel_preview_3d_model.h"
#include <tools/eda_3d_actions.h>
#include <dialogs/panel_preview_3d_model.h>
#include <dialogs/appearance_controls_3D.h>
#include <3d_rendering/opengl/render_3d_opengl.h>
@@ -79,8 +81,7 @@ void EDA_3D_CONTROLLER::Reset( RESET_REASON aReason )
{
m_canvas = dynamic_cast<EDA_3D_CANVAS*>( holder->GetToolCanvas() );
EDA_3D_BOARD_HOLDER* holder3d =
dynamic_cast<EDA_3D_BOARD_HOLDER*>( holder );
EDA_3D_BOARD_HOLDER* holder3d = dynamic_cast<EDA_3D_BOARD_HOLDER*>( holder );
wxASSERT( holder3d );
@@ -117,10 +118,7 @@ int EDA_3D_CONTROLLER::Main( const TOOL_EVENT& aEvent )
if( evt->IsCancelInteractive() )
{
wxWindow* canvas = m_toolMgr->GetToolHolder()->GetToolCanvas();
wxWindow* topLevelParent = canvas->GetParent();
while( topLevelParent && !topLevelParent->IsTopLevel() )
topLevelParent = topLevelParent->GetParent();
wxWindow* topLevelParent = wxGetTopLevelParent( canvas->GetParent() );
if( topLevelParent && dynamic_cast<DIALOG_SHIM*>( topLevelParent ) )
{
@@ -152,7 +150,7 @@ int EDA_3D_CONTROLLER::Main( const TOOL_EVENT& aEvent )
int EDA_3D_CONTROLLER::ViewControl( const TOOL_EVENT& aEvent )
{
m_canvas->SetView3D( aEvent.Parameter<intptr_t>() );
m_canvas->SetView3D( aEvent.Parameter<VIEW3D_TYPE>() );
return 0;
}
@@ -160,13 +158,13 @@ int EDA_3D_CONTROLLER::ViewControl( const TOOL_EVENT& aEvent )
int EDA_3D_CONTROLLER::PanControl( const TOOL_EVENT& aEvent )
{
switch( aEvent.Parameter<intptr_t>() )
switch( aEvent.Parameter<ACTIONS::CURSOR_EVENT_TYPE>() )
{
case ACTIONS::CURSOR_UP: m_canvas->SetView3D( WXK_UP ); break;
case ACTIONS::CURSOR_DOWN: m_canvas->SetView3D( WXK_DOWN ); break;
case ACTIONS::CURSOR_LEFT: m_canvas->SetView3D( WXK_LEFT ); break;
case ACTIONS::CURSOR_RIGHT: m_canvas->SetView3D( WXK_RIGHT ); break;
default: wxFAIL; break;
case ACTIONS::CURSOR_UP: m_canvas->SetView3D( VIEW3D_TYPE::VIEW3D_PAN_UP ); break;
case ACTIONS::CURSOR_DOWN: m_canvas->SetView3D( VIEW3D_TYPE::VIEW3D_PAN_DOWN ); break;
case ACTIONS::CURSOR_LEFT: m_canvas->SetView3D( VIEW3D_TYPE::VIEW3D_PAN_LEFT ); break;
case ACTIONS::CURSOR_RIGHT: m_canvas->SetView3D( VIEW3D_TYPE::VIEW3D_PAN_RIGHT ); break;
default: wxFAIL; break;
}
return 0;
@@ -186,7 +184,7 @@ int EDA_3D_CONTROLLER::RotateView( const TOOL_EVENT& aEvent )
case ROTATION_DIR::Y_CCW: m_camera->RotateY( -rotIncrement ); break;
case ROTATION_DIR::Z_CW: m_camera->RotateZ( -rotIncrement ); break;
case ROTATION_DIR::Z_CCW: m_camera->RotateZ( rotIncrement ); break;
default: wxFAIL; break;
default: wxFAIL; break;
}
if( m_boardAdapter->m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
@@ -225,95 +223,44 @@ int EDA_3D_CONTROLLER::ToggleOrtho( const TOOL_EVENT& aEvent )
int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent )
{
bool reload = false;
std::bitset<LAYER_3D_END> visibilityFlags = m_boardAdapter->GetVisibleLayers();
APPEARANCE_CONTROLS_3D* appearanceManager = nullptr;
#define FLIP( x ) x = !x
auto flipLayer =
[&]( int layer )
{
appearanceManager->OnLayerVisibilityChanged( layer, !visibilityFlags.test( layer ) );
};
if( aEvent.IsAction( &EDA_3D_ACTIONS::showTHT ) )
if( auto viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
appearanceManager = viewer->GetAppearanceManager();
if( appearanceManager )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_footprints_normal );
reload = true;
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showSMD ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_footprints_insert );
reload = true;
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showVirtual ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_footprints_virtual );
reload = true;
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showNotInPosFile ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_footprints_not_in_posfile );
reload = true;
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showBBoxes ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.opengl_show_model_bbox );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleRealisticMode ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.realistic );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleBoardBody ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_board_body );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showAxis ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_axis );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleZones ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_zones );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleAdhesive ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_adhesive );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSilk ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_silkscreen );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSolderMask ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_soldermask );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSolderPaste ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_solderpaste );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleComments ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_comments );
}
else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleECO ) )
{
FLIP( m_boardAdapter->m_Cfg->m_Render.show_eco );
if( aEvent.IsAction( &EDA_3D_ACTIONS::showTHT ) )
flipLayer( LAYER_3D_TH_MODELS );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showSMD ) )
flipLayer( LAYER_3D_SMD_MODELS );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showVirtual ) )
flipLayer( LAYER_3D_VIRTUAL_MODELS );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showNotInPosFile ) )
flipLayer( LAYER_3D_MODELS_NOT_IN_POS );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showDNP ) )
flipLayer( LAYER_3D_MODELS_MARKED_DNP );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showAxis ) )
flipLayer( LAYER_3D_AXES );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showBBoxes ) )
flipLayer( LAYER_3D_BOUNDING_BOXES );
}
if( reload )
{
if( m_boardAdapter->m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
{
auto* renderer = static_cast<RENDER_3D_OPENGL*>( m_canvas->GetCurrentRender() );
renderer->Load3dModelsIfNeeded();
m_canvas->Request_refresh();
}
else
{
m_canvas->RenderRaytracingRequest();
}
}
else
{
if( auto viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
viewer->NewDisplay( true );
else
m_canvas->Request_refresh();
}
return 0;
}
int EDA_3D_CONTROLLER::ToggleLayersManager( const TOOL_EVENT& aEvent )
{
if( auto* viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
viewer->ToggleAppearanceManager();
return 0;
}
@@ -355,7 +302,7 @@ int EDA_3D_CONTROLLER::doZoomInOut( bool aDirection, bool aCenterOnCursor )
{
if( m_canvas )
{
m_canvas->SetView3D( aDirection ? WXK_F1 : WXK_F2 );
m_canvas->SetView3D( aDirection ? VIEW3D_TYPE::VIEW3D_ZOOM_IN : VIEW3D_TYPE::VIEW3D_ZOOM_OUT );
m_canvas->DisplayStatus();
}
@@ -367,7 +314,7 @@ int EDA_3D_CONTROLLER::ZoomFitScreen( const TOOL_EVENT& aEvent )
{
if( m_canvas )
{
m_canvas->SetView3D( WXK_HOME );
m_canvas->SetView3D( VIEW3D_TYPE::VIEW3D_FIT_SCREEN );
m_canvas->DisplayStatus();
}
@@ -399,7 +346,6 @@ void EDA_3D_CONTROLLER::setTransitions()
Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::viewBack.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::pivotCenter.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::homeView.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::resetView.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ViewControl, EDA_3D_ACTIONS::flipView.MakeEvent() );
Go( &EDA_3D_CONTROLLER::RotateView, EDA_3D_ACTIONS::rotateXCW.MakeEvent() );
Go( &EDA_3D_CONTROLLER::RotateView, EDA_3D_ACTIONS::rotateXCCW.MakeEvent() );
@@ -437,18 +383,8 @@ void EDA_3D_CONTROLLER::setTransitions()
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showSMD.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showVirtual.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showNotInPosFile.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showVirtual.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showBBoxes.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleRealisticMode.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleBoardBody.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showAxis.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleZones.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleAdhesive.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleSilk.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleSolderMask.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleSolderPaste.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleComments.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleECO.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showDNP.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleLayersManager,EDA_3D_ACTIONS::showLayersManager.MakeEvent() );
}
@@ -1,7 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023 CERN
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -95,6 +96,7 @@ public:
int ToggleOrtho( const TOOL_EVENT& aEvent );
int ToggleVisibility( const TOOL_EVENT& aEvent );
int ToggleLayersManager( const TOOL_EVENT& aEvent );
private:
///< Sets up handlers for various events.
+19 -10
View File
@@ -1,5 +1,21 @@
/**
* @file 3d_viewer_id.h
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 <author>
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
@@ -11,6 +27,7 @@
* However the number of IDs should be < ROOM_FOR_3D_VIEWER, defined in id.h
* Please change the value of ROOM_FOR_3D_VIEWER if too small.
*/
#pragma once
#include <id.h> // Generic Id.
@@ -18,14 +35,6 @@ enum id_3dview_frm
{
ID_START_COMMAND_3D = ID_KICAD_3D_VIEWER_START,
ID_RELOAD3D_BOARD,
ID_VIEW3D_TOP,
ID_VIEW3D_BOTTOM,
ID_VIEW3D_LEFT,
ID_VIEW3D_RIGHT,
ID_VIEW3D_FRONT,
ID_VIEW3D_BACK,
ID_VIEW3D_RESET,
ID_VIEW3D_FLIP,
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
ID_MENU_SCREENCOPY_PNG,
+20 -23
View File
@@ -1,5 +1,5 @@
#add_definitions(-DPRINT_STATISTICS_3D_VIEWER)
add_definitions(-DPCBNEW)
add_compile_definitions( PCBNEW )
include_directories(BEFORE ${INC_BEFORE})
include_directories(
@@ -16,7 +16,6 @@ include_directories(
)
# directories
set( DIR_DLG dialogs )
set( DIR_RAY 3d_rendering/raytracing )
set( DIR_RAY_ACC ${DIR_RAY}/accelerators )
set( DIR_RAY_2D ${DIR_RAY}/shapes2D )
@@ -28,15 +27,9 @@ set(3D-VIEWER_SRCS
${DIR_3D_PLUGINS}/3d/pluginldr3D.cpp
3d_cache/3d_cache.cpp
3d_cache/3d_plugin_manager.cpp
${DIR_DLG}/3d_cache_dialogs.cpp
${DIR_DLG}/dialog_select_3d_model_base.cpp
${DIR_DLG}/dialog_select_3d_model.cpp
${DIR_DLG}/panel_preview_3d_model_base.cpp
${DIR_DLG}/panel_preview_3d_model.cpp
3d_canvas/board_adapter.cpp
3d_canvas/create_layer_items.cpp
3d_canvas/create_3Dgraphic_brd_items.cpp
3d_canvas/create_layer_poly.cpp
3d_canvas/eda_3d_canvas.cpp
3d_canvas/eda_3d_canvas_pivot.cpp
3d_model_viewer/eda_3d_model_viewer.cpp
@@ -78,7 +71,6 @@ set(3D-VIEWER_SRCS
${DIR_RAY_3D}/triangle_3d.cpp
3d_rendering/buffers_debug.cpp
3d_rendering/render_3d_base.cpp
3d_rendering/camera.cpp
3d_rendering/color_rgb.cpp
3d_rendering/image.cpp
3d_rendering/post_shader.cpp
@@ -88,14 +80,6 @@ set(3D-VIEWER_SRCS
3d_rendering/trackball.cpp
3d_viewer/3d_menubar.cpp
3d_viewer/3d_toolbar.cpp
dialogs/panel_3D_colors.cpp
dialogs/panel_3D_colors_base.cpp
dialogs/panel_3D_display_options.cpp
dialogs/panel_3D_display_options_base.cpp
dialogs/panel_3D_opengl_options.cpp
dialogs/panel_3D_opengl_options_base.cpp
dialogs/panel_3D_raytracing_options.cpp
dialogs/panel_3D_raytracing_options_base.cpp
3d_viewer/tools/eda_3d_actions.cpp
3d_viewer/tools/eda_3d_conditions.cpp
3d_viewer/tools/eda_3d_controller.cpp
@@ -105,6 +89,19 @@ set(3D-VIEWER_SRCS
common_ogl/ogl_utils.cpp
3d_fastmath.cpp
3d_math.cpp
dialogs/3d_cache_dialogs.cpp
dialogs/appearance_controls_3D.cpp
dialogs/appearance_controls_3D_base.cpp
dialogs/dialog_select_3d_model_base.cpp
dialogs/dialog_select_3d_model.cpp
dialogs/panel_preview_3d_model_base.cpp
dialogs/panel_preview_3d_model.cpp
dialogs/panel_3D_display_options.cpp
dialogs/panel_3D_display_options_base.cpp
dialogs/panel_3D_opengl_options.cpp
dialogs/panel_3D_opengl_options_base.cpp
dialogs/panel_3D_raytracing_options.cpp
dialogs/panel_3D_raytracing_options_base.cpp
)
add_library(3d-viewer STATIC ${3D-VIEWER_SRCS})
@@ -114,16 +111,16 @@ target_link_libraries( 3d-viewer
PRIVATE
gal
kimath
core
common
nlohmann_json
${Boost_LIBRARIES}
Boost::headers
${wxWidgets_LIBRARIES}
${OPENGL_LIBRARIES}
kicad_3dsg )
add_subdirectory( 3d_cache )
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
add_subdirectory( 3d_navlib )
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
endif()
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
add_subdirectory( 3d_navlib )
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
+2
View File
@@ -31,9 +31,11 @@
#define OPENGL_INCLUDES_H
#ifdef __APPLE__
#ifndef GL_SILENCE_DEPRECATION
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation.
#define GL_SILENCE_DEPRECATION 1
#endif
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
@@ -0,0 +1,978 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 CERN
* Copyright (C) 2023-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <dialogs/appearance_controls_3D.h>
#include <bitmaps.h>
#include <confirm.h>
#include <pgm_base.h>
#include <dpi_scaling_common.h>
#include <eda_list_dialog.h>
#include <pcb_display_options.h>
#include <eda_3d_viewer_frame.h>
#include <pcbnew_settings.h>
#include <project.h>
#include <settings/settings_manager.h>
#include <settings/color_settings.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <tools/eda_3d_actions.h>
#include <widgets/bitmap_toggle.h>
#include <widgets/color_swatch.h>
#include <widgets/grid_bitmap_toggle.h>
#include <dialogs/eda_view_switcher.h>
#include <wx/bmpbuttn.h>
#include <wx/sizer.h>
#include <wx/textdlg.h>
#include <wx/checkbox.h>
#include <../3d_rendering/opengl/render_3d_opengl.h>
#define RR APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D // Render Row abbreviation to reduce source width
/// Template for object appearance settings
const APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D APPEARANCE_CONTROLS_3D::s_layerSettings[] = {
// text id tooltip
RR( _HKI( "Board Body" ), LAYER_3D_BOARD, _HKI( "Show board body" ) ),
RR( _HKI( "F.Cu" ), LAYER_3D_COPPER_TOP, _HKI( "Show front copper / surface finish color" ) ),
RR( _HKI( "B.Cu" ), LAYER_3D_COPPER_BOTTOM, _HKI( "Show back copper / surface finish color" ) ),
RR( _HKI( "Adhesive" ), LAYER_3D_ADHESIVE, _HKI( "Show adhesive" ) ),
RR( _HKI( "Solder Paste" ), LAYER_3D_SOLDERPASTE, _HKI( "Show solder paste" ) ),
RR( _HKI( "F.Silkscreen" ), LAYER_3D_SILKSCREEN_TOP, _HKI( "Show front silkscreen" ) ),
RR( _HKI( "B.Silkscreen" ), LAYER_3D_SILKSCREEN_BOTTOM, _HKI( "Show back silkscreen" ) ),
RR( _HKI( "F.Mask" ), LAYER_3D_SOLDERMASK_TOP, _HKI( "Show front solder mask" ) ),
RR( _HKI( "B.Mask" ), LAYER_3D_SOLDERMASK_BOTTOM, _HKI( "Show back solder mask" ) ),
RR( _HKI( "User.Drawings" ), LAYER_3D_USER_DRAWINGS, _HKI( "Show user drawings layer" ) ),
RR( _HKI( "User.Comments" ), LAYER_3D_USER_COMMENTS, _HKI( "Show user comments layer" ) ),
RR( _HKI( "User.Eco1" ), LAYER_3D_USER_ECO1, _HKI( "Show user ECO1 layer" ) ),
RR( _HKI( "User.Eco2" ), LAYER_3D_USER_ECO2, _HKI( "Show user ECO2 layer" ) ),
RR(),
RR( _HKI( "Through-hole Models" ), LAYER_3D_TH_MODELS, EDA_3D_ACTIONS::showTHT ),
RR( _HKI( "SMD Models" ), LAYER_3D_SMD_MODELS, EDA_3D_ACTIONS::showSMD ),
RR( _HKI( "Virtual Models" ), LAYER_3D_VIRTUAL_MODELS, EDA_3D_ACTIONS::showVirtual ),
RR( _HKI( "Models not in POS File" ), LAYER_3D_MODELS_NOT_IN_POS, EDA_3D_ACTIONS::showNotInPosFile ),
RR( _HKI( "Models marked DNP" ), LAYER_3D_MODELS_MARKED_DNP, EDA_3D_ACTIONS::showDNP ),
RR( _HKI( "Model Bounding Boxes" ), LAYER_3D_BOUNDING_BOXES, EDA_3D_ACTIONS::showBBoxes ),
RR(),
RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ),
RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ),
RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ),
RR( _HKI( "Off-board Silkscreen" ), LAYER_3D_OFF_BOARD_SILK, _HKI( "Do not clip silk layers to board outline" ) ),
RR(),
RR( _HKI( "3D Axis" ), LAYER_3D_AXES, EDA_3D_ACTIONS::showAxis ),
RR( _HKI( "Background Start" ), LAYER_3D_BACKGROUND_TOP, _HKI( "Background gradient start color" ) ),
RR( _HKI( "Background End" ), LAYER_3D_BACKGROUND_BOTTOM, _HKI( "Background gradient end color" ) ),
};
// The list of IDs that can have colors coming from the board stackup, and cannot be
// modified if use colors from stackup is activated
static std::vector<int> inStackupColors{ LAYER_3D_BOARD, LAYER_3D_COPPER_TOP,
LAYER_3D_COPPER_BOTTOM, LAYER_3D_SOLDERPASTE,
LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SILKSCREEN_BOTTOM,
LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERMASK_BOTTOM
};
APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
wxWindow* aFocusOwner ) :
APPEARANCE_CONTROLS_3D_BASE( aParent ),
m_frame( aParent ),
m_focusOwner( aFocusOwner ),
m_lastSelectedViewport( nullptr )
{
DPI_SCALING_COMMON dpi( nullptr, m_frame );
int indicatorSize = ConvertDialogToPixels( wxSize( 6, 6 ) ).x / dpi.GetContentScaleFactor();
int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
m_pointSize = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize();
m_layerPanelColour = m_panelLayers->GetBackgroundColour().ChangeLightness( 110 );
SetBorders( true, false, false, false );
m_layersOuterSizer = new wxBoxSizer( wxVERTICAL );
m_windowLayers->SetSizer( m_layersOuterSizer );
m_windowLayers->SetScrollRate( 0, 5 );
m_windowLayers->Bind( wxEVT_SET_FOCUS, &APPEARANCE_CONTROLS_3D::OnSetFocus, this );
m_envOuterSizer = new wxBoxSizer( wxVERTICAL );
wxFont infoFont = KIUI::GetInfoFont( this );
m_panelLayers->SetFont( infoFont );
m_windowLayers->SetFont( infoFont );
m_presetsLabel->SetFont( infoFont );
m_viewportsLabel->SetFont( infoFont );
// Create display options
m_cbUseBoardStackupColors = new wxCheckBox( m_panelLayers, wxID_ANY,
_( "Use board stackup colors" ) );
m_cbUseBoardStackupColors->SetFont( infoFont );
m_cbUseBoardStackupColors->Bind( wxEVT_CHECKBOX,
[this]( wxCommandEvent& aEvent )
{
EDA_3D_VIEWER_SETTINGS* cfg = m_frame->GetAdapter().m_Cfg;
cfg->m_UseStackupColors = aEvent.IsChecked();
UpdateLayerCtls();
syncLayerPresetSelection();
m_frame->NewDisplay( true );
} );
m_panelLayersSizer->Add( m_cbUseBoardStackupColors, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 7 );
m_cbLayerPresets->SetToolTip( wxString::Format( _( "Save and restore color and visibility "
"combinations.\n"
"Use %s+Tab to activate selector.\n"
"Successive Tabs while holding %s down will "
"cycle through presets in the popup." ),
KeyNameFromKeyCode( PRESET_SWITCH_KEY ),
KeyNameFromKeyCode( PRESET_SWITCH_KEY ) ) );
m_cbViewports->SetToolTip( wxString::Format( _( "Save and restore camera position and zoom.\n"
"Use %s+Tab to activate selector.\n"
"Successive Tabs while holding %s down will "
"cycle through viewports in the popup." ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
if( screenHeight <= 900 && m_pointSize >= indicatorSize )
m_pointSize = m_pointSize * 8 / 10;
m_cbLayerPresets->Bind( wxEVT_CHOICE, &APPEARANCE_CONTROLS_3D::onLayerPresetChanged, this );
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER( KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ) );
}
APPEARANCE_CONTROLS_3D::~APPEARANCE_CONTROLS_3D()
{
}
wxSize APPEARANCE_CONTROLS_3D::GetBestSize() const
{
DPI_SCALING_COMMON dpi( nullptr, m_frame );
wxSize size( 220 * dpi.GetScaleFactor(), 480 * dpi.GetScaleFactor() );
return size;
}
void APPEARANCE_CONTROLS_3D::OnSetFocus( wxFocusEvent& aEvent )
{
#ifdef __WXMSW__
// In wxMSW, buttons won't process events unless they have focus, so we'll let it take the
// focus and give it back to the parent in the button event handler.
if( wxBitmapButton* btn = dynamic_cast<wxBitmapButton*>( aEvent.GetEventObject() ) )
{
wxCommandEvent evt( wxEVT_BUTTON );
wxPostEvent( btn, evt );
}
#endif
passOnFocus();
aEvent.Skip();
}
void APPEARANCE_CONTROLS_3D::OnSize( wxSizeEvent& aEvent )
{
aEvent.Skip();
}
void APPEARANCE_CONTROLS_3D::OnLanguageChanged()
{
Freeze();
rebuildLayers();
m_cbUseBoardStackupColors->SetLabel( _( "Use board stackup colors" ) );
rebuildLayerPresetsWidget();
rebuildViewportsWidget();
Thaw();
Refresh();
}
void APPEARANCE_CONTROLS_3D::OnDarkModeToggle()
{
// This is essentially a list of hacks because DarkMode isn't yet implemented inside
// wxWidgets.
//
// The individual wxPanels, COLOR_SWATCHes and GRID_CELL_COLOR_RENDERERs should really be
// overriding some virtual method or responding to some wxWidgets event so that the parent
// doesn't have to know what it contains. But, that's not where we are, so... :shrug:
m_layerPanelColour = m_panelLayers->GetBackgroundColour().ChangeLightness( 110 );
m_windowLayers->SetBackgroundColour( m_layerPanelColour );
for( wxSizerItem* child : m_layersOuterSizer->GetChildren() )
{
if( child && child->GetWindow() )
child->GetWindow()->SetBackgroundColour( m_layerPanelColour );
}
}
void APPEARANCE_CONTROLS_3D::CommonSettingsChanged()
{
OnLanguageChanged();
UpdateLayerCtls();
syncLayerPresetSelection();
}
void APPEARANCE_CONTROLS_3D::ApplyLayerPreset( const wxString& aPresetName )
{
if( aPresetName == FOLLOW_PCB || aPresetName == FOLLOW_PLOT_SETTINGS )
{
m_frame->GetAdapter().m_Cfg->m_CurrentPreset = aPresetName;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
else if( LAYER_PRESET_3D* preset = m_frame->GetAdapter().m_Cfg->FindPreset( aPresetName ) )
{
doApplyLayerPreset( *preset );
}
// Move to front of MRU list
if( m_presetMRU.Index( aPresetName ) != wxNOT_FOUND )
m_presetMRU.Remove( aPresetName );
m_presetMRU.Insert( aPresetName, 0 );
updateLayerPresetWidget( aPresetName );
}
std::vector<VIEWPORT3D> APPEARANCE_CONTROLS_3D::GetUserViewports() const
{
std::vector<VIEWPORT3D> ret;
for( const auto& [name, viewport] : m_viewports )
ret.emplace_back( viewport );
return ret;
}
void APPEARANCE_CONTROLS_3D::SetUserViewports( std::vector<VIEWPORT3D>& aViewportList )
{
m_viewports.clear();
for( const VIEWPORT3D& viewport : aViewportList )
{
if( m_viewports.count( viewport.name ) )
continue;
m_viewports[viewport.name] = viewport;
m_viewportMRU.Add( viewport.name );
}
rebuildViewportsWidget();
// Now is as good a time as any to initialize the layer presets as well.
rebuildLayerPresetsWidget();
m_presetMRU.Add( FOLLOW_PCB );
m_presetMRU.Add( FOLLOW_PLOT_SETTINGS );
for( const LAYER_PRESET_3D& preset : m_frame->GetAdapter().m_Cfg->m_LayerPresets )
m_presetMRU.Add( preset.name );
}
void APPEARANCE_CONTROLS_3D::ApplyViewport( const wxString& aViewportName )
{
int idx = m_cbViewports->FindString( aViewportName );
if( idx >= 0 && idx < (int)m_cbViewports->GetCount() - 3 /* separator */ )
{
m_cbViewports->SetSelection( idx );
m_lastSelectedViewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( idx ) );
}
else
{
m_cbViewports->SetSelection( m_cbViewports->GetCount() - 3 ); // separator
m_lastSelectedViewport = nullptr;
}
if( m_lastSelectedViewport )
doApplyViewport( *m_lastSelectedViewport );
}
void APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged( int aLayer, bool isVisible )
{
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
const std::map<int, COLOR4D>& colors = m_frame->GetAdapter().GetLayerColors();
bool killFollow = false;
bool doFastRefresh = false; // true to just refresh the display
// Special-case controls
switch( aLayer )
{
case LAYER_FP_TEXT:
// Because Footprint Text is a meta-control that also can disable values/references,
// drag them along here so that the user is less likely to be confused.
if( !isVisible )
{
visibleLayers.set( LAYER_FP_REFERENCES, false );
visibleLayers.set( LAYER_FP_VALUES, false );
}
visibleLayers.set( LAYER_FP_TEXT, isVisible );
killFollow = true;
break;
case LAYER_FP_REFERENCES:
case LAYER_FP_VALUES:
// In case that user changes Footprint Value/References when the Footprint Text
// meta-control is disabled, we should put it back on.
if( isVisible )
visibleLayers.set( LAYER_FP_TEXT, true );
visibleLayers.set( aLayer, isVisible );
killFollow = true;
break;
case LAYER_3D_BOARD:
case LAYER_3D_COPPER_TOP:
case LAYER_3D_COPPER_BOTTOM:
case LAYER_3D_SILKSCREEN_BOTTOM:
case LAYER_3D_SILKSCREEN_TOP:
case LAYER_3D_SOLDERMASK_BOTTOM:
case LAYER_3D_SOLDERMASK_TOP:
case LAYER_3D_SOLDERPASTE:
case LAYER_3D_ADHESIVE:
case LAYER_3D_USER_COMMENTS:
case LAYER_3D_USER_DRAWINGS:
case LAYER_3D_USER_ECO1:
case LAYER_3D_USER_ECO2:
visibleLayers.set( aLayer, isVisible );
killFollow = true;
break;
case LAYER_3D_TH_MODELS:
case LAYER_3D_SMD_MODELS:
case LAYER_3D_VIRTUAL_MODELS:
case LAYER_3D_MODELS_NOT_IN_POS:
case LAYER_3D_MODELS_MARKED_DNP:
doFastRefresh = true;
visibleLayers.set( aLayer, isVisible );
break;
default:
visibleLayers.set( aLayer, isVisible );
break;
}
m_frame->GetAdapter().SetVisibleLayers( visibleLayers );
m_frame->GetAdapter().SetLayerColors( colors );
const wxString& currentPreset = m_frame->GetAdapter().m_Cfg->m_CurrentPreset;
if( ( currentPreset != FOLLOW_PCB && currentPreset != FOLLOW_PLOT_SETTINGS ) || killFollow )
syncLayerPresetSelection();
UpdateLayerCtls();
if( doFastRefresh && m_frame->GetAdapter().m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
{
RENDER_3D_OPENGL* renderer =
static_cast<RENDER_3D_OPENGL*>( m_frame->GetCanvas()->GetCurrentRender() );
renderer->Load3dModelsIfNeeded();
m_frame->GetCanvas()->Request_refresh();
}
else
{
m_frame->NewDisplay( true );
}
}
void APPEARANCE_CONTROLS_3D::onColorSwatchChanged( COLOR_SWATCH* aSwatch )
{
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
m_frame->GetAdapter().SetVisibleLayers( visibleLayers );
m_frame->GetAdapter().SetLayerColors( colors );
int layer = aSwatch->GetId();
COLOR4D newColor = aSwatch->GetSwatchColor();
colors[ layer ] = newColor;
if( layer == LAYER_3D_COPPER_TOP )
colors[ LAYER_3D_COPPER_BOTTOM ] = newColor;
else if( layer == LAYER_3D_COPPER_BOTTOM )
colors[ LAYER_3D_COPPER_TOP ] = newColor;
m_frame->GetAdapter().SetLayerColors( colors );
syncLayerPresetSelection();
m_frame->NewDisplay( true );
}
void APPEARANCE_CONTROLS_3D::rebuildLayers()
{
int swatchWidth = m_windowLayers->ConvertDialogToPixels( wxSize( 8, 0 ) ).x;
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
std::map<int, COLOR4D> defaultColors = m_frame->GetAdapter().GetDefaultColors();
m_layerSettings.clear();
m_layersOuterSizer->Clear( true );
m_layersOuterSizer->AddSpacer( 5 );
m_envOuterSizer->Clear( true );
auto appendLayer =
[&]( const std::unique_ptr<APPEARANCE_SETTING_3D>& aSetting )
{
wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL );
int layer = aSetting->m_Id;
aSetting->m_Visible = visibleLayers.test( layer );
if( colors.count( layer ) )
{
COLOR_SWATCH* swatch = new COLOR_SWATCH( m_windowLayers, colors[ layer ], layer,
COLOR4D::WHITE, defaultColors[ layer ],
SWATCH_SMALL );
swatch->SetToolTip( _( "Left double click or middle click to change color" ) );
swatch->SetReadOnlyCallback(
[this]()
{
WX_INFOBAR* infobar = m_frame->GetInfoBar();
infobar->RemoveAllButtons();
infobar->AddCloseButton();
infobar->ShowMessageFor( _( "Uncheck 'Use board stackup colors' to "
"allow color editing." ),
10000, wxICON_INFORMATION );
} );
sizer->Add( swatch, 0, wxALIGN_CENTER_VERTICAL, 0 );
aSetting->m_Ctl_color = swatch;
swatch->Bind( COLOR_SWATCH_CHANGED,
[this]( wxCommandEvent& event )
{
auto swatch = static_cast<COLOR_SWATCH*>( event.GetEventObject() );
onColorSwatchChanged( swatch );
passOnFocus();
} );
}
else
{
sizer->AddSpacer( swatchWidth );
}
sizer->AddSpacer( 5 );
wxStaticText* label = new wxStaticText( m_windowLayers, layer, aSetting->GetLabel() );
label->Wrap( -1 );
label->SetToolTip( aSetting->GetTooltip() );
if( layer == LAYER_3D_BACKGROUND_TOP || layer == LAYER_3D_BACKGROUND_BOTTOM )
{
sizer->AddSpacer( swatchWidth );
}
else
{
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowLayers, layer,
KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ),
aSetting->m_Visible );
btn_visible->Bind( TOGGLE_CHANGED,
[this]( wxCommandEvent& aEvent )
{
int id = static_cast<wxWindow*>( aEvent.GetEventObject() )->GetId();
bool isVisible = aEvent.GetInt();
OnLayerVisibilityChanged( id, isVisible );
passOnFocus();
} );
wxString tip;
tip.Printf( _( "Show or hide %s" ), aSetting->GetLabel().Lower() );
btn_visible->SetToolTip( tip );
aSetting->m_Ctl_visibility = btn_visible;
sizer->Add( btn_visible, 0, wxALIGN_CENTER_VERTICAL, 0 );
}
sizer->AddSpacer( 5 );
sizer->Add( label, 0, wxALIGN_CENTER_VERTICAL, 0 );
m_layersOuterSizer->Add( sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, 5 );
m_layersOuterSizer->AddSpacer( 2 );
};
for( const APPEARANCE_SETTING_3D& s_setting : s_layerSettings )
{
m_layerSettings.emplace_back( std::make_unique<APPEARANCE_SETTING_3D>( s_setting ) );
std::unique_ptr<APPEARANCE_SETTING_3D>& setting = m_layerSettings.back();
if( setting->m_Spacer )
m_layersOuterSizer->AddSpacer( m_pointSize );
else
appendLayer( setting );
m_layerSettingsMap[setting->m_Id] = setting.get();
}
m_sizerOuter->Layout();
}
void APPEARANCE_CONTROLS_3D::UpdateLayerCtls()
{
EDA_3D_VIEWER_SETTINGS* cfg = m_frame->GetAdapter().m_Cfg;
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
for( std::unique_ptr<APPEARANCE_SETTING_3D>& setting : m_layerSettings )
{
if( setting->m_Spacer )
continue;
if( setting->m_Ctl_visibility )
setting->m_Ctl_visibility->SetValue( visibleLayers.test( setting->m_Id ) );
if( setting->m_Ctl_color )
{
setting->m_Ctl_color->SetSwatchColor( colors[ setting->m_Id ], false );
// if cfg->m_UseStackupColors is set, board colors cannot be modified locally, but
// other colors can be
if( std::find( inStackupColors.begin(), inStackupColors.end(), setting->m_Id )
!= inStackupColors.end() )
{
if( cfg )
setting->m_Ctl_color->SetReadOnly( cfg->m_UseStackupColors );
}
}
}
if( cfg )
m_cbUseBoardStackupColors->SetValue( cfg->m_UseStackupColors );
}
void APPEARANCE_CONTROLS_3D::rebuildLayerPresetsWidget()
{
m_presetsLabel->SetLabel( wxString::Format( _( "Presets (%s+Tab):" ),
KeyNameFromKeyCode( PRESET_SWITCH_KEY ) ) );
m_cbLayerPresets->Clear();
// Build the layers preset list.
m_cbLayerPresets->Append( _( "Follow PCB Editor" ) );
m_cbLayerPresets->Append( _( "Follow PCB Plot Settings" ) );
for( const LAYER_PRESET_3D& preset : m_frame->GetAdapter().m_Cfg->m_LayerPresets )
m_cbLayerPresets->Append( preset.name );
m_cbLayerPresets->Append( wxT( "---" ) );
m_cbLayerPresets->Append( _( "Save preset..." ) );
m_cbLayerPresets->Append( _( "Delete preset..." ) );
updateLayerPresetWidget( m_frame->GetAdapter().m_Cfg->m_CurrentPreset );
}
void APPEARANCE_CONTROLS_3D::syncLayerPresetSelection()
{
m_frame->GetAdapter().m_Cfg->m_CurrentPreset = wxEmptyString;
std::vector<LAYER_PRESET_3D>& presets = m_frame->GetAdapter().m_Cfg->m_LayerPresets;
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
auto it = std::find_if(
presets.begin(), presets.end(),
[&]( const LAYER_PRESET_3D& aPreset )
{
if( aPreset.name.Lower() == _( "legacy colors" )
&& m_cbUseBoardStackupColors->GetValue() )
{
return false;
}
for( int layer = LAYER_3D_BOARD; layer < LAYER_3D_END; ++layer )
{
if( aPreset.layers.test( layer ) != visibleLayers.test( layer ) )
return false;
}
for( int layer : { LAYER_FP_REFERENCES, LAYER_FP_VALUES, LAYER_FP_TEXT } )
{
if( aPreset.layers.test( layer ) != visibleLayers.test( layer ) )
return false;
}
for( int layer = LAYER_3D_START + 1; layer < LAYER_3D_END; ++layer )
{
auto it1 = aPreset.colors.find( layer );
auto it2 = colors.find( layer );
if( it1 != aPreset.colors.end() && it2 != colors.end() && *it1 != *it2 )
return false;
}
return true;
} );
if( it != presets.end() )
{
m_frame->GetAdapter().m_Cfg->m_CurrentPreset = it->name;
m_cbLayerPresets->SetStringSelection( it->name );
}
else
{
m_cbLayerPresets->SetSelection( m_cbLayerPresets->GetCount() - 3 ); // separator
}
}
void APPEARANCE_CONTROLS_3D::updateLayerPresetWidget( const wxString& aName )
{
if( aName == FOLLOW_PCB )
m_cbLayerPresets->SetSelection( 0 );
else if( aName == FOLLOW_PLOT_SETTINGS )
m_cbLayerPresets->SetSelection( 1 );
else if( !m_cbLayerPresets->SetStringSelection( aName ) )
m_cbLayerPresets->SetSelection( m_cbLayerPresets->GetCount() - 3 ); // separator
}
void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
{
EDA_3D_VIEWER_SETTINGS* cfg = m_frame->GetAdapter().m_Cfg;
int count = m_cbLayerPresets->GetCount();
int index = m_cbLayerPresets->GetSelection();
wxString name;
auto resetSelection =
[&]()
{
updateLayerPresetWidget( cfg->m_CurrentPreset );
};
if( index == 0 )
{
name = FOLLOW_PCB;
cfg->m_CurrentPreset = name;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
else if( index == 1 )
{
name = FOLLOW_PLOT_SETTINGS;
cfg->m_CurrentPreset = name;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
else if( index == count - 3 )
{
// Separator: reject the selection
resetSelection();
return;
}
else if( index == count - 2 )
{
wxTextEntryDialog dlg( wxGetTopLevelParent( this ), _( "Layer preset name:" ),
_( "Save Layer Preset" ) );
if( dlg.ShowModal() != wxID_OK )
{
resetSelection();
return;
}
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
name = dlg.GetValue();
if( LAYER_PRESET_3D* preset = cfg->FindPreset( name ) )
{
if( !IsOK( wxGetTopLevelParent( this ), _( "Overwrite existing preset?" ) ) )
{
resetSelection();
return;
}
preset->layers = visibleLayers;
preset->colors = colors;
m_cbLayerPresets->SetSelection( m_cbLayerPresets->FindString( name ) );
}
else
{
cfg->m_LayerPresets.emplace_back( name, visibleLayers, colors );
m_cbLayerPresets->SetSelection( m_cbLayerPresets->Insert( name, index - 1 ) );
}
cfg->m_CurrentPreset = name;
m_presetMRU.Insert( name, 0 );
return;
}
else if( index == count - 1 )
{
wxArrayString headers;
std::vector<wxArrayString> items;
headers.Add( _( "Presets" ) );
for( LAYER_PRESET_3D& preset : cfg->m_LayerPresets )
{
wxArrayString item;
item.Add( preset.name );
items.emplace_back( item );
}
EDA_LIST_DIALOG dlg( m_frame, _( "Delete Preset" ), headers, items );
dlg.SetListLabel( _( "Select preset:" ) );
if( dlg.ShowModal() == wxID_OK )
{
name = dlg.GetTextSelection();
if( m_cbLayerPresets->FindString( name ) != wxNOT_FOUND )
m_cbLayerPresets->Delete( m_cbLayerPresets->FindString( name ) );
alg::delete_if( cfg->m_LayerPresets,
[name]( const LAYER_PRESET_3D& preset )
{
return preset.name == name;
} );
if( cfg->m_CurrentPreset == name )
cfg->m_CurrentPreset = wxEmptyString;
m_presetMRU.Remove( name );
}
resetSelection();
return;
}
else if( LAYER_PRESET_3D* preset = cfg->FindPreset( m_cbLayerPresets->GetStringSelection() ) )
{
name = preset->name;
doApplyLayerPreset( *preset );
}
// Move to front of MRU list
if( m_presetMRU.Index( name ) != wxNOT_FOUND )
m_presetMRU.Remove( name );
m_presetMRU.Insert( name, 0 );
passOnFocus();
}
void APPEARANCE_CONTROLS_3D::doApplyLayerPreset( const LAYER_PRESET_3D& aPreset )
{
BOARD_ADAPTER& adapter = m_frame->GetAdapter();
adapter.m_Cfg->m_CurrentPreset = aPreset.name;
adapter.SetVisibleLayers( aPreset.layers );
adapter.SetLayerColors( aPreset.colors );
if( aPreset.name.Lower() == _( "legacy colors" ) )
adapter.m_Cfg->m_UseStackupColors = false;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
void APPEARANCE_CONTROLS_3D::rebuildViewportsWidget()
{
m_viewportsLabel->SetLabel( wxString::Format( _( "Viewports (%s+Tab):" ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
m_cbViewports->Clear();
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
m_cbViewports->Append( pair.first, static_cast<void*>( &pair.second ) );
m_cbViewports->Append( wxT( "---" ) );
m_cbViewports->Append( _( "Save viewport..." ) );
m_cbViewports->Append( _( "Delete viewport..." ) );
m_cbViewports->SetSelection( m_cbViewports->GetCount() - 3 );
m_lastSelectedViewport = nullptr;
}
void APPEARANCE_CONTROLS_3D::onViewportChanged( wxCommandEvent& aEvent )
{
int count = m_cbViewports->GetCount();
int index = m_cbViewports->GetSelection();
if( index >= 0 && index < count - 3 )
{
VIEWPORT3D* viewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( index ) );
wxCHECK( viewport, /* void */ );
doApplyViewport( *viewport );
if( !viewport->name.IsEmpty() )
{
m_viewportMRU.Remove( viewport->name );
m_viewportMRU.Insert( viewport->name, 0 );
}
}
else if( index == count - 2 )
{
// Save current state to new preset
wxString name;
wxTextEntryDialog dlg( wxGetTopLevelParent( this ), _( "Viewport name:" ),
_( "Save Viewport" ), name );
if( dlg.ShowModal() != wxID_OK )
{
if( m_lastSelectedViewport )
m_cbViewports->SetStringSelection( m_lastSelectedViewport->name );
else
m_cbViewports->SetSelection( m_cbViewports->GetCount() - 3 );
return;
}
name = dlg.GetValue();
bool exists = m_viewports.count( name );
if( !exists )
{
m_viewports[name] = VIEWPORT3D( name, m_frame->GetCurrentCamera().GetViewMatrix() );
index = m_cbViewports->Insert( name, index-1, static_cast<void*>( &m_viewports[name] ) );
}
else
{
m_viewports[name].matrix = m_frame->GetCurrentCamera().GetViewMatrix();
index = m_cbViewports->FindString( name );
m_viewportMRU.Remove( name );
}
m_cbViewports->SetSelection( index );
m_viewportMRU.Insert( name, 0 );
return;
}
else if( index == count - 1 )
{
// Delete an existing viewport
wxArrayString headers;
std::vector<wxArrayString> items;
headers.Add( _( "Viewports" ) );
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
{
wxArrayString item;
item.Add( pair.first );
items.emplace_back( item );
}
EDA_LIST_DIALOG dlg( m_frame, _( "Delete Viewport" ), headers, items );
dlg.SetListLabel( _( "Select viewport:" ) );
if( dlg.ShowModal() == wxID_OK )
{
wxString viewportName = dlg.GetTextSelection();
int idx = m_cbViewports->FindString( viewportName );
if( idx != wxNOT_FOUND )
{
m_viewports.erase( viewportName );
m_cbViewports->Delete( idx );
m_viewportMRU.Remove( viewportName );
}
}
if( m_lastSelectedViewport )
m_cbViewports->SetStringSelection( m_lastSelectedViewport->name );
else
m_cbViewports->SetSelection( m_cbViewports->GetCount() - 3 );
return;
}
passOnFocus();
}
void APPEARANCE_CONTROLS_3D::onUpdateViewportsCb( wxUpdateUIEvent& aEvent )
{
int count = m_cbViewports->GetCount();
int index = m_cbViewports->GetSelection();
if( index >= 0 && index < count - 3 )
{
VIEWPORT3D* viewport = static_cast<VIEWPORT3D*>( m_cbViewports->GetClientData( index ) );
wxCHECK( viewport, /* void */ );
if( m_frame->GetCurrentCamera().GetViewMatrix() != viewport->matrix )
m_cbViewports->SetSelection( -1 );
}
}
void APPEARANCE_CONTROLS_3D::doApplyViewport( const VIEWPORT3D& aViewport )
{
m_frame->GetCurrentCamera().SetViewMatrix( aViewport.matrix );
if( m_frame->GetAdapter().m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
m_frame->GetCanvas()->Request_refresh();
else
m_frame->GetCanvas()->RenderRaytracingRequest();
}
void APPEARANCE_CONTROLS_3D::passOnFocus()
{
m_focusOwner->SetFocus();
}
+191
View File
@@ -0,0 +1,191 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 CERN
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef APPEARANCE_CONTROLS_3D_H
#define APPEARANCE_CONTROLS_3D_H
#include <vector>
#include <gal/color4d.h>
#include <layer_ids.h>
#include <3d_canvas/board_adapter.h>
#include <dialogs/appearance_controls_3D_base.h>
#include <tool/tool_action.h>
#include <wx/intl.h>
class BITMAP_TOGGLE;
class COLOR_SWATCH;
class EDA_3D_VIEWER_FRAME;
class ROW_ICON_PROVIDER;
class GRID_BITMAP_TOGGLE_RENDERER;
using KIGFX::COLOR4D;
class APPEARANCE_CONTROLS_3D : public APPEARANCE_CONTROLS_3D_BASE
{
public:
/**
* Container for an appearance setting (can control a layer class, object type, etc.)
*/
class APPEARANCE_SETTING_3D
{
public:
int m_Id;
bool m_Visible;
bool m_Spacer;
BITMAP_TOGGLE* m_Ctl_visibility;
COLOR_SWATCH* m_Ctl_color;
APPEARANCE_SETTING_3D( const wxString& aLabel, int aId, const wxString& aTooltip ) :
m_Id( aId ),
m_Visible( true ),
m_Spacer( false ),
m_Ctl_visibility( nullptr ),
m_Ctl_color( nullptr ),
m_tooltip( aTooltip ),
m_label( aLabel )
{
}
APPEARANCE_SETTING_3D( const wxString& aLabel, int aId, const TOOL_ACTION& aAction ) :
m_Id( aId ),
m_Visible( true ),
m_Spacer( false ),
m_Ctl_visibility( nullptr ),
m_Ctl_color( nullptr ),
m_label( aLabel ),
m_action( &aAction )
{
}
APPEARANCE_SETTING_3D() :
m_Id( -1 ),
m_Visible( false ),
m_Spacer( true ),
m_Ctl_visibility( nullptr ),
m_Ctl_color( nullptr )
{
}
wxString GetTooltip() const
{
if( m_tooltip.has_value() )
return wxGetTranslation( m_tooltip.value() );
else if( m_action.has_value() )
return m_action.value()->GetTooltip( true );
else
return wxEmptyString;
}
wxString GetLabel() const
{
return wxGetTranslation( m_label );
}
private:
wxString m_label;
std::optional<wxString> m_tooltip;
std::optional<const TOOL_ACTION*> m_action;
};
APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent, wxWindow* aFocusOwner );
~APPEARANCE_CONTROLS_3D();
wxSize GetBestSize() const;
void OnLanguageChanged();
void OnDarkModeToggle();
void OnLayerVisibilityChanged( int aLayer, bool isVisible );
void CommonSettingsChanged();
void UpdateLayerCtls();
void ApplyLayerPreset( const wxString& aPresetName );
const wxArrayString& GetLayerPresetsMRU() { return m_presetMRU; }
///< Return a list of viewports created by the user.
std::vector<VIEWPORT3D> GetUserViewports() const;
///< Update the current viewports from those saved in the project file.
void SetUserViewports( std::vector<VIEWPORT3D>& aPresetList );
void ApplyViewport( const wxString& aPresetName );
const wxArrayString& GetViewportsMRU() { return m_viewportMRU; }
protected:
void OnSetFocus( wxFocusEvent& aEvent ) override;
void OnSize( wxSizeEvent& aEvent ) override;
private:
void rebuildLayers();
void rebuildLayerPresetsWidget();
void syncLayerPresetSelection();
void rebuildViewportsWidget();
void onColorSwatchChanged( COLOR_SWATCH* aSwatch );
void updateLayerPresetWidget( const wxString& aName );
void onLayerPresetChanged( wxCommandEvent& aEvent ) override;
void doApplyLayerPreset( const LAYER_PRESET_3D& aPreset );
void onViewportChanged( wxCommandEvent& aEvent ) override;
void onUpdateViewportsCb( wxUpdateUIEvent& aEvent ) override;
void doApplyViewport( const VIEWPORT3D& aViewport );
void passOnFocus();
private:
static const APPEARANCE_SETTING_3D s_layerSettings[];
EDA_3D_VIEWER_FRAME* m_frame;
wxWindow* m_focusOwner;
std::vector<std::unique_ptr<APPEARANCE_SETTING_3D>> m_layerSettings;
std::map<int, APPEARANCE_SETTING_3D*> m_layerSettingsMap;
wxArrayString m_presetMRU;
std::map<wxString, VIEWPORT3D> m_viewports;
VIEWPORT3D* m_lastSelectedViewport;
wxArrayString m_viewportMRU;
wxBoxSizer* m_layersOuterSizer;
wxBoxSizer* m_envOuterSizer;
int m_pointSize;
wxColour m_layerPanelColour;
GRID_BITMAP_TOGGLE_RENDERER* m_toggleGridRenderer;
wxCheckBox* m_cbUseBoardStackupColors;
};
#endif
@@ -0,0 +1,98 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "appearance_controls_3D_base.h"
///////////////////////////////////////////////////////////////////////////
APPEARANCE_CONTROLS_3D_BASE::APPEARANCE_CONTROLS_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : WX_PANEL( parent, id, pos, size, style, name )
{
this->SetMinSize( wxSize( 200,360 ) );
m_sizerOuter = new wxBoxSizer( wxVERTICAL );
m_panelLayers = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panelLayersSizer = new wxBoxSizer( wxVERTICAL );
m_windowLayers = new wxScrolledCanvas( m_panelLayers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL );
m_panelLayersSizer->Add( m_windowLayers, 1, wxEXPAND, 5 );
m_panelLayers->SetSizer( m_panelLayersSizer );
m_panelLayers->Layout();
m_panelLayersSizer->Fit( m_panelLayers );
m_sizerOuter->Add( m_panelLayers, 1, wxEXPAND, 5 );
wxBoxSizer* bBottomMargin;
bBottomMargin = new wxBoxSizer( wxVERTICAL );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bBottomMargin->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 3 );
wxBoxSizer* bPresets;
bPresets = new wxBoxSizer( wxVERTICAL );
m_presetsLabel = new wxStaticText( this, wxID_ANY, _("Presets (Ctrl+Tab):"), wxDefaultPosition, wxDefaultSize, 0 );
m_presetsLabel->Wrap( -1 );
bPresets->Add( m_presetsLabel, 1, wxRIGHT|wxLEFT, 2 );
wxString m_cbLayerPresetsChoices[] = { _("Follow PCB Editor"), _("Follow PCB Plot Settings") };
int m_cbLayerPresetsNChoices = sizeof( m_cbLayerPresetsChoices ) / sizeof( wxString );
m_cbLayerPresets = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbLayerPresetsNChoices, m_cbLayerPresetsChoices, 0 );
m_cbLayerPresets->SetSelection( 1 );
bPresets->Add( m_cbLayerPresets, 0, wxALL|wxEXPAND, 2 );
bBottomMargin->Add( bPresets, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bBottomMargin->Add( 0, 2, 0, wxEXPAND, 5 );
wxBoxSizer* bViewports;
bViewports = new wxBoxSizer( wxVERTICAL );
m_viewportsLabel = new wxStaticText( this, wxID_ANY, _("Viewports (Alt+Tab):"), wxDefaultPosition, wxDefaultSize, 0 );
m_viewportsLabel->Wrap( -1 );
bViewports->Add( m_viewportsLabel, 1, wxRIGHT|wxLEFT, 2 );
wxString m_cbViewportsChoices[] = { _("(unsaved)") };
int m_cbViewportsNChoices = sizeof( m_cbViewportsChoices ) / sizeof( wxString );
m_cbViewports = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cbViewportsNChoices, m_cbViewportsChoices, 0 );
m_cbViewports->SetSelection( 1 );
bViewports->Add( m_cbViewports, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 2 );
bBottomMargin->Add( bViewports, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_sizerOuter->Add( bBottomMargin, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
this->SetSizer( m_sizerOuter );
this->Layout();
m_sizerOuter->Fit( this );
// Connect Events
this->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSetFocus ) );
this->Connect( wxEVT_SIZE, wxSizeEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSize ) );
m_panelLayers->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSetFocus ), NULL, this );
m_cbLayerPresets->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_3D_BASE::onLayerPresetChanged ), NULL, this );
m_cbViewports->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_3D_BASE::onViewportChanged ), NULL, this );
m_cbViewports->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( APPEARANCE_CONTROLS_3D_BASE::onUpdateViewportsCb ), NULL, this );
}
APPEARANCE_CONTROLS_3D_BASE::~APPEARANCE_CONTROLS_3D_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSetFocus ) );
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSize ) );
m_panelLayers->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( APPEARANCE_CONTROLS_3D_BASE::OnSetFocus ), NULL, this );
m_cbLayerPresets->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_3D_BASE::onLayerPresetChanged ), NULL, this );
m_cbViewports->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( APPEARANCE_CONTROLS_3D_BASE::onViewportChanged ), NULL, this );
m_cbViewports->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( APPEARANCE_CONTROLS_3D_BASE::onUpdateViewportsCb ), NULL, this );
}
@@ -0,0 +1,553 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="17"/>
<object class="Project" expanded="true">
<property name="class_decoration">; </property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">appearance_controls_3D_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">Appearance Panel 3D</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">200,360</property>
<property name="name">APPEARANCE_CONTROLS_3D_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="subclass">WX_PANEL; widgets/wx_panel.h; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnSetFocus">OnSetFocus</event>
<event name="OnSize">OnSize</event>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_sizerOuter</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxPanel" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_panelLayers</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<event name="OnSetFocus">OnSetFocus</event>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_panelLayersSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="CustomControl" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="class">wxScrolledCanvas</property>
<property name="close_button">1</property>
<property name="construction"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="declaration"></property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="include">#include &lt;wx/scrolwin.h&gt;&#x0A;#include &lt;wx/grid.h&gt; // needed for MSVC to see wxScrolledCanvas indirectly exported</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_windowLayers</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxVSCROLL</property>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bBottomMargin</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">3</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bPresets</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="false">
<property name="border">2</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Presets (Ctrl+Tab):</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_presetsLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">2</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Follow PCB Editor&quot; &quot;Follow PCB Plot Settings&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbLayerPresets</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChoice">onLayerPresetChanged</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="false">
<property name="height">2</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bViewports</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="false">
<property name="border">2</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Viewports (Alt+Tab):</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_viewportsLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;(unsaved)&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbViewports</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChoice">onViewportChanged</event>
<event name="OnUpdateUI">onUpdateViewportsCb</event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
@@ -0,0 +1,63 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "widgets/wx_panel.h"
#include <wx/scrolwin.h>
#include <wx/grid.h> // needed for MSVC to see wxScrolledCanvas indirectly exported
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/choice.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class APPEARANCE_CONTROLS_3D_BASE
///////////////////////////////////////////////////////////////////////////////
class APPEARANCE_CONTROLS_3D_BASE : public WX_PANEL
{
private:
protected:
wxBoxSizer* m_sizerOuter;
wxPanel* m_panelLayers;
wxBoxSizer* m_panelLayersSizer;
wxScrolledCanvas* m_windowLayers;
wxStaticLine* m_staticline1;
wxStaticText* m_presetsLabel;
wxChoice* m_cbLayerPresets;
wxStaticText* m_viewportsLabel;
wxChoice* m_cbViewports;
// Virtual event handlers, override them in your derived class
virtual void OnSetFocus( wxFocusEvent& event ) { event.Skip(); }
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
virtual void onLayerPresetChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void onViewportChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void onUpdateViewportsCb( wxUpdateUIEvent& event ) { event.Skip(); }
public:
APPEARANCE_CONTROLS_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~APPEARANCE_CONTROLS_3D_BASE();
};
-127
View File
@@ -1,127 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "panel_3D_colors.h"
#include <widgets/color_swatch.h>
#include <settings/settings_manager.h>
#include <pgm_base.h>
PANEL_3D_COLORS::PANEL_3D_COLORS( wxWindow* aParent ) :
PANEL_3D_COLORS_BASE( aParent )
{
m_backgroundTop->SetDefaultColor( BOARD_ADAPTER::g_DefaultBackgroundTop );
m_backgroundBottom->SetDefaultColor( BOARD_ADAPTER::g_DefaultBackgroundBot );
m_silkscreenTop->SetUserColors( &BOARD_ADAPTER::g_SilkscreenColors );
m_silkscreenTop->SetDefaultColor( BOARD_ADAPTER::g_DefaultSilkscreen );
m_silkscreenBottom->SetUserColors( &BOARD_ADAPTER::g_SilkscreenColors );
m_silkscreenBottom->SetDefaultColor( BOARD_ADAPTER::g_DefaultSilkscreen );
m_solderMaskTop->SetUserColors( &BOARD_ADAPTER::g_MaskColors );
m_solderMaskTop->SetDefaultColor( BOARD_ADAPTER::g_DefaultSolderMask );
m_solderMaskBottom->SetUserColors( &BOARD_ADAPTER::g_MaskColors );
m_solderMaskBottom->SetDefaultColor( BOARD_ADAPTER::g_DefaultSolderMask );
m_solderPaste->SetUserColors( &BOARD_ADAPTER::g_PasteColors );
m_solderPaste->SetDefaultColor( BOARD_ADAPTER::g_DefaultSolderPaste );
m_surfaceFinish->SetUserColors( &BOARD_ADAPTER::g_FinishColors );
m_surfaceFinish->SetDefaultColor( BOARD_ADAPTER::g_DefaultSurfaceFinish );
m_boardBody->SetUserColors( &BOARD_ADAPTER::g_BoardColors );
m_boardBody->SetDefaultColor( BOARD_ADAPTER::g_DefaultBoardBody );
}
bool PANEL_3D_COLORS::TransferDataToWindow()
{
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
m_backgroundTop->SetSupportsOpacity( false );
m_backgroundBottom->SetSupportsOpacity( false );
m_silkscreenTop->SetSupportsOpacity( false );
m_silkscreenBottom->SetSupportsOpacity( false );
m_solderMaskTop->SetBackgroundColour( *wxWHITE );
m_solderMaskBottom->SetBackgroundColour( *wxWHITE );
m_solderPaste->SetSupportsOpacity( false );
m_surfaceFinish->SetSupportsOpacity( false );
m_boardBody->SetBackgroundColour( *wxWHITE );
m_backgroundTop->SetSwatchColor( colors->GetColor( LAYER_3D_BACKGROUND_TOP ), false );
m_backgroundBottom->SetSwatchColor( colors->GetColor( LAYER_3D_BACKGROUND_BOTTOM ), false );
m_silkscreenTop->SetSwatchColor( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), false );
m_silkscreenBottom->SetSwatchColor( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ), false );
m_solderMaskTop->SetSwatchColor( colors->GetColor( LAYER_3D_SOLDERMASK_TOP ), false );
m_solderMaskBottom->SetSwatchColor( colors->GetColor( LAYER_3D_SOLDERMASK_BOTTOM ), false );
m_solderPaste->SetSwatchColor( colors->GetColor( LAYER_3D_SOLDERPASTE ), false );
m_surfaceFinish->SetSwatchColor( colors->GetColor( LAYER_3D_COPPER ), false );
m_boardBody->SetSwatchColor( colors->GetColor( LAYER_3D_BOARD ), false );
if( colors->GetUseBoardStackupColors() )
m_boardStackupRB->SetValue( true );
else
m_specificColorsRB->SetValue( true );
return true;
}
bool PANEL_3D_COLORS::TransferDataFromWindow()
{
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
colors->SetColor( LAYER_3D_BACKGROUND_TOP, m_backgroundTop->GetSwatchColor() );
colors->SetColor( LAYER_3D_BACKGROUND_BOTTOM, m_backgroundBottom->GetSwatchColor() );
colors->SetColor( LAYER_3D_SILKSCREEN_TOP, m_silkscreenTop->GetSwatchColor() );
colors->SetColor( LAYER_3D_SILKSCREEN_BOTTOM, m_silkscreenBottom->GetSwatchColor() );
colors->SetColor( LAYER_3D_SOLDERMASK_TOP, m_solderMaskTop->GetSwatchColor() );
colors->SetColor( LAYER_3D_SOLDERMASK_BOTTOM, m_solderMaskBottom->GetSwatchColor() );
colors->SetColor( LAYER_3D_SOLDERPASTE, m_solderPaste->GetSwatchColor() );
colors->SetColor( LAYER_3D_COPPER, m_surfaceFinish->GetSwatchColor() );
colors->SetColor( LAYER_3D_BOARD, m_boardBody->GetSwatchColor() );
colors->SetUseBoardStackupColors( m_boardStackupRB->GetValue() );
Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" );
return true;
}
void PANEL_3D_COLORS::ResetPanel()
{
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
m_backgroundTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BACKGROUND_TOP ), false );
m_backgroundBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BACKGROUND_BOTTOM ), false );
m_silkscreenTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SILKSCREEN_TOP ), false );
m_silkscreenBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SILKSCREEN_BOTTOM ), false );
m_solderMaskTop->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERMASK_TOP ), false );
m_solderMaskBottom->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERMASK_BOTTOM ), false );
m_solderPaste->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_SOLDERPASTE ), false );
m_surfaceFinish->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_COPPER ), false );
m_boardBody->SetSwatchColor( colors->GetDefaultColor( LAYER_3D_BOARD ), false );
m_boardStackupRB->SetValue( true );
}
-42
View File
@@ -1,42 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef PANEL_3D_COLORS_H
#define PANEL_3D_COLORS_H
#include "panel_3D_colors_base.h"
#include <3d_viewer/eda_3d_viewer_frame.h>
class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE
{
public:
explicit PANEL_3D_COLORS( wxWindow* aParent );
bool TransferDataFromWindow() override;
bool TransferDataToWindow() override;
void ResetPanel() override;
};
#endif // PANEL_3D_COLORS_H
-153
View File
@@ -1,153 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "widgets/color_swatch.h"
#include "panel_3D_colors_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_3D_COLORS_BASE::PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
{
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
m_environmentLable = new wxStaticText( this, wxID_ANY, _("Environment Colors"), wxDefaultPosition, wxDefaultSize, 0 );
m_environmentLable->Wrap( -1 );
bSizerMain->Add( m_environmentLable, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 5 );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
backgroundTopLabel = new wxStaticText( this, wxID_ANY, _("Background gradient start:"), wxDefaultPosition, wxDefaultSize, 0 );
backgroundTopLabel->Wrap( -1 );
fgSizer1->Add( backgroundTopLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_backgroundTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_backgroundTop, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
backgroundBotLabel = new wxStaticText( this, wxID_ANY, _("Background gradient end:"), wxDefaultPosition, wxDefaultSize, 0 );
backgroundBotLabel->Wrap( -1 );
fgSizer1->Add( backgroundBotLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_backgroundBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_backgroundBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
fgSizer1->Add( 0, 6, 1, wxEXPAND, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
solderPasteLabel = new wxStaticText( this, wxID_ANY, _("Solder paste:"), wxDefaultPosition, wxDefaultSize, 0 );
solderPasteLabel->Wrap( -1 );
fgSizer1->Add( solderPasteLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_solderPaste = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_solderPaste, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
bSizerMain->Add( fgSizer1, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
bSizerMain->Add( 0, 15, 0, wxEXPAND, 5 );
m_boardColorsLabel = new wxStaticText( this, wxID_ANY, _("Board Colors"), wxDefaultPosition, wxDefaultSize, 0 );
m_boardColorsLabel->Wrap( -1 );
bSizerMain->Add( m_boardColorsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 5 );
m_boardStackupRB = new wxRadioButton( this, wxID_ANY, _("Use board stackup colors"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerMain->Add( m_boardStackupRB, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
m_specificColorsRB = new wxRadioButton( this, wxID_ANY, _("Use colors:"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerMain->Add( m_specificColorsRB, 0, wxTOP|wxBOTTOM|wxLEFT, 8 );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 2, 5, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
silkscreenTopLabel = new wxStaticText( this, wxID_ANY, _("Silkscreen top:"), wxDefaultPosition, wxDefaultSize, 0 );
silkscreenTopLabel->Wrap( -1 );
fgSizer2->Add( silkscreenTopLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 20 );
m_silkscreenTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_silkscreenTop, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
silkscreenBottomLabel = new wxStaticText( this, wxID_ANY, _("Silkscreen bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
silkscreenBottomLabel->Wrap( -1 );
fgSizer2->Add( silkscreenBottomLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
m_silkscreenBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_silkscreenBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( 0, 6, 1, wxEXPAND, 5 );
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
solderMaskTopLabel = new wxStaticText( this, wxID_ANY, _("Solder mask top:"), wxDefaultPosition, wxDefaultSize, 0 );
solderMaskTopLabel->Wrap( -1 );
fgSizer2->Add( solderMaskTopLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
m_solderMaskTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_solderMaskTop, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
solderMaskBottomLabel = new wxStaticText( this, wxID_ANY, _("Solder mask bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
solderMaskBottomLabel->Wrap( -1 );
fgSizer2->Add( solderMaskBottomLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
m_solderMaskBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_solderMaskBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( 0, 6, 1, wxEXPAND, 5 );
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
surfaceFinishLabel = new wxStaticText( this, wxID_ANY, _("Copper/surface finish:"), wxDefaultPosition, wxDefaultSize, 0 );
surfaceFinishLabel->Wrap( -1 );
fgSizer2->Add( surfaceFinishLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
m_surfaceFinish = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_surfaceFinish, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( 0, 6, 1, wxEXPAND, 5 );
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
boardBodyLabel = new wxStaticText( this, wxID_ANY, _("Board body:"), wxDefaultPosition, wxDefaultSize, 0 );
boardBodyLabel->Wrap( -1 );
fgSizer2->Add( boardBodyLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
m_boardBody = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_boardBody, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerMain->Add( fgSizer2, 1, wxEXPAND|wxLEFT, 8 );
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
}
PANEL_3D_COLORS_BASE::~PANEL_3D_COLORS_BASE()
{
}
File diff suppressed because it is too large Load Diff
-70
View File
@@ -1,70 +0,0 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class COLOR_SWATCH;
#include "widgets/resettable_panel.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/sizer.h>
#include <wx/radiobut.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_3D_COLORS_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_3D_COLORS_BASE : public RESETTABLE_PANEL
{
private:
protected:
wxStaticText* m_environmentLable;
wxStaticLine* m_staticline1;
wxStaticText* backgroundTopLabel;
COLOR_SWATCH* m_backgroundTop;
wxStaticText* backgroundBotLabel;
COLOR_SWATCH* m_backgroundBottom;
wxStaticText* solderPasteLabel;
COLOR_SWATCH* m_solderPaste;
wxStaticText* m_boardColorsLabel;
wxStaticLine* m_staticline2;
wxRadioButton* m_boardStackupRB;
wxRadioButton* m_specificColorsRB;
wxStaticText* silkscreenTopLabel;
COLOR_SWATCH* m_silkscreenTop;
wxStaticText* silkscreenBottomLabel;
COLOR_SWATCH* m_silkscreenBottom;
wxStaticText* solderMaskTopLabel;
COLOR_SWATCH* m_solderMaskTop;
wxStaticText* solderMaskBottomLabel;
COLOR_SWATCH* m_solderMaskBottom;
wxStaticText* surfaceFinishLabel;
COLOR_SWATCH* m_surfaceFinish;
wxStaticText* boardBodyLabel;
COLOR_SWATCH* m_boardBody;
public:
PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_3D_COLORS_BASE();
};
+5 -24
View File
@@ -45,18 +45,11 @@ void PANEL_3D_DISPLAY_OPTIONS::OnCheckEnableAnimation( wxCommandEvent& event )
void PANEL_3D_DISPLAY_OPTIONS::loadViewSettings( EDA_3D_VIEWER_SETTINGS* aCfg )
{
// Check/uncheck checkboxes
m_checkBoxRealisticMode->SetValue( aCfg->m_Render.realistic );
m_checkBoxBoardBody->SetValue( aCfg->m_Render.show_board_body );
m_checkBoxAreas->SetValue( aCfg->m_Render.show_zones );
m_checkBoxSilkscreen->SetValue( aCfg->m_Render.show_silkscreen );
m_checkBoxSolderMask->SetValue( aCfg->m_Render.show_soldermask );
m_checkBoxSolderpaste->SetValue( aCfg->m_Render.show_solderpaste );
m_checkBoxAdhesive->SetValue( aCfg->m_Render.show_adhesive );
m_checkBoxComments->SetValue( aCfg->m_Render.show_comments );
m_checkBoxECO->SetValue( aCfg->m_Render.show_eco );
m_checkBoxSubtractMaskFromSilk->SetValue( aCfg->m_Render.subtract_mask_from_silk );
m_checkBoxClipSilkOnViaAnnulus->SetValue( aCfg->m_Render.clip_silk_on_via_annulus );
m_checkBoxRenderPlatedPadsAsPlated->SetValue( aCfg->m_Render.renderPlatedPadsAsPlated );
m_checkBoxClipSilkOnViaAnnulus->SetValue( aCfg->m_Render.clip_silk_on_via_annuli );
m_checkBoxRenderPlatedPadsAsPlated->SetValue( aCfg->m_Render.differentiate_plated_copper );
m_materialProperties->SetSelection( static_cast<int>( aCfg->m_Render.material_mode ) );
@@ -83,26 +76,14 @@ bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow()
{
EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
// Set render mode
cfg->m_Render.realistic = m_checkBoxRealisticMode->GetValue();
// Set visibility of items
cfg->m_Render.show_board_body = m_checkBoxBoardBody->GetValue();
cfg->m_Render.show_zones = m_checkBoxAreas->GetValue();
cfg->m_Render.subtract_mask_from_silk = m_checkBoxSubtractMaskFromSilk->GetValue();
cfg->m_Render.clip_silk_on_via_annulus = m_checkBoxClipSilkOnViaAnnulus->GetValue();
cfg->m_Render.renderPlatedPadsAsPlated = m_checkBoxRenderPlatedPadsAsPlated->GetValue();
cfg->m_Render.clip_silk_on_via_annuli = m_checkBoxClipSilkOnViaAnnulus->GetValue();
cfg->m_Render.differentiate_plated_copper = m_checkBoxRenderPlatedPadsAsPlated->GetValue();
cfg->m_Render.material_mode = static_cast<MATERIAL_MODE>( m_materialProperties->GetSelection() );
// Set Layer visibility
cfg->m_Render.show_silkscreen = m_checkBoxSilkscreen->GetValue();
cfg->m_Render.show_soldermask = m_checkBoxSolderMask->GetValue();
cfg->m_Render.show_solderpaste = m_checkBoxSolderpaste->GetValue();
cfg->m_Render.show_adhesive = m_checkBoxAdhesive->GetValue();
cfg->m_Render.show_comments = m_checkBoxComments->GetValue();
cfg->m_Render.show_eco = m_checkBoxECO->GetValue( );
// Camera Options
cfg->m_Camera.animation_enabled = m_checkBoxEnableAnimation->GetValue();
cfg->m_Camera.moving_speed_multiplier = m_sliderAnimationSpeed->GetValue();
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -15,69 +15,11 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizerMain = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer7;
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
bSizer7 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizeLeft;
bSizeLeft = new wxBoxSizer( wxVERTICAL );
m_boardLayersLabel = new wxStaticText( this, wxID_ANY, _("Board Layers"), wxDefaultPosition, wxDefaultSize, 0 );
m_boardLayersLabel->Wrap( -1 );
bSizeLeft->Add( m_boardLayersLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizeLeft->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 5 );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 1, 4, 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxSilkscreen, 0, wxLEFT, 5 );
m_checkBoxSubtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at solder mask edges"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxSubtractMaskFromSilk, 0, wxLEFT, 25 );
m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at via annuli"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxLEFT, 25 );
m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxSolderMask, 0, wxTOP|wxLEFT, 5 );
m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxSolderpaste, 0, wxLEFT, 5 );
m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_checkBoxAdhesive, 0, wxLEFT, 5 );
bSizeLeft->Add( fgSizer1, 0, wxEXPAND|wxALL, 5 );
bSizeLeft->Add( 0, 15, 0, wxEXPAND, 5 );
m_userLayersLabel = new wxStaticText( this, wxID_ANY, _("User Layers (not shown in realistic mode)"), wxDefaultPosition, wxDefaultSize, 0 );
m_userLayersLabel->Wrap( -1 );
bSizeLeft->Add( m_userLayersLabel, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline31 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizeLeft->Add( m_staticline31, 0, wxEXPAND|wxBOTTOM, 5 );
bSizeLeft->Add( 0, 5, 0, wxEXPAND, 5 );
m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comment and drawing layers"), wxDefaultPosition, wxDefaultSize, 0 );
bSizeLeft->Add( m_checkBoxComments, 0, wxRIGHT|wxLEFT, 10 );
bSizeLeft->Add( 0, 4, 0, wxEXPAND, 5 );
m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
bSizeLeft->Add( m_checkBoxECO, 0, wxRIGHT|wxLEFT, 10 );
bSizeLeft->Add( 0, 15, 0, wxEXPAND, 5 );
m_renderOptionsLabel = new wxStaticText( this, wxID_ANY, _("Render Options"), wxDefaultPosition, wxDefaultSize, 0 );
m_renderOptionsLabel->Wrap( -1 );
bSizeLeft->Add( m_renderOptionsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
@@ -86,20 +28,20 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizeLeft->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 1, 4, 0 );
fgSizer2 = new wxFlexGridSizer( 0, 1, 5, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_checkBoxBoardBody = new wxCheckBox( this, wxID_ANY, _("Show board body"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxBoardBody, 0, wxRIGHT|wxLEFT, 5 );
m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at via annuli"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxLEFT, 5 );
m_checkBoxRealisticMode = new wxCheckBox( this, wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxRealisticMode, 0, wxRIGHT|wxLEFT, 5 );
m_checkBoxSubtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at solder mask edges"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxSubtractMaskFromSilk, 0, wxLEFT, 5 );
m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxAreas, 0, wxRIGHT|wxLEFT, 5 );
m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( this, wxID_ANY, _("Use bare copper color for unplated copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( this, wxID_ANY, _("Use bare copper color for unplated copper (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxRenderPlatedPadsAsPlated->SetToolTip( _("Use different colors for plated and unplated copper. (Slow)") );
fgSizer2->Add( m_checkBoxRenderPlatedPadsAsPlated, 0, wxRIGHT|wxLEFT, 5 );
@@ -152,35 +94,27 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizerRight->Add( bSizerRotAngle, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxVERTICAL );
m_checkBoxEnableAnimation = new wxCheckBox( this, wxID_ANY, _("Enable animation"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxEnableAnimation->SetValue(true);
bSizer9->Add( m_checkBoxEnableAnimation, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizerRight->Add( bSizer9, 0, wxEXPAND|wxLEFT, 5 );
bSizerRight->Add( bSizerRotAngle, 0, wxTOP|wxLEFT, 5 );
wxBoxSizer* bSizerSlider;
bSizerSlider = new wxBoxSizer( wxHORIZONTAL );
m_staticAnimationSpeed = new wxStaticText( this, wxID_ANY, _("Animation speed:"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxEnableAnimation = new wxCheckBox( this, wxID_ANY, _("Redraw while moving"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxEnableAnimation->SetValue(true);
bSizerSlider->Add( m_checkBoxEnableAnimation, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_staticAnimationSpeed = new wxStaticText( this, wxID_ANY, _("Redraw speed:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticAnimationSpeed->Wrap( -1 );
bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
m_sliderAnimationSpeed = new wxSlider( this, wxID_ANY, 3, 1, 5, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
m_sliderAnimationSpeed->SetMinSize( wxSize( 100,-1 ) );
bSizerSlider->Add( m_sliderAnimationSpeed, 1, wxEXPAND|wxLEFT|wxRIGHT, 15 );
bSizerSlider->Add( m_sliderAnimationSpeed, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerRight->Add( bSizerSlider, 0, wxEXPAND|wxLEFT, 5 );
bSizer7->Add( bSizerRight, 0, wxEXPAND, 15 );
bSizer7->Add( bSizerRight, 0, wxEXPAND|wxTOP, 15 );
bSizerMain->Add( bSizer7, 1, 0, 5 );
@@ -191,14 +125,12 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizerMain->Fit( this );
// Connect Events
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
m_checkBoxEnableAnimation->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
}
PANEL_3D_DISPLAY_OPTIONS_BASE::~PANEL_3D_DISPLAY_OPTIONS_BASE()
{
// Disconnect Events
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
m_checkBoxEnableAnimation->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
}
@@ -64,7 +64,7 @@
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer7</property>
<property name="orient">wxHORIZONTAL</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">20</property>
@@ -75,814 +75,6 @@
<property name="name">bSizeLeft</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">13</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Board Layers</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_boardLayersLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline2</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">1</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgSizer1</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">4</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show silkscreen layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxSilkscreen</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">25</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Clip silkscreen at solder mask edges</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxSubtractMaskFromSilk</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">25</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Clip silkscreen at via annuli</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxClipSilkOnViaAnnulus</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxTOP|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show solder mask layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxSolderMask</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show solder paste layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxSolderpaste</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show adhesive layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxAdhesive</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">15</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">13</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">User Layers (not shown in realistic mode)</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_userLayersLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline31</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">5</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show comment and drawing layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxComments</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">4</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">10</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show ECO layers</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxECO</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">15</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">13</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxEXPAND</property>
@@ -1017,10 +209,10 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">4</property>
<property name="vgap">5</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
@@ -1051,7 +243,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show board body</property>
<property name="label">Clip silkscreen at via annuli</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1059,7 +251,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxBoardBody</property>
<property name="name">m_checkBoxClipSilkOnViaAnnulus</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@@ -1084,7 +276,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="flag">wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
@@ -1115,7 +307,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Realistic mode</property>
<property name="label">Clip silkscreen at solder mask edges</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1123,7 +315,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBoxRealisticMode</property>
<property name="name">m_checkBoxSubtractMaskFromSilk</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@@ -1144,7 +336,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">OnCheckRealisticMode</event>
</object>
</object>
<object class="sizeritem" expanded="0">
@@ -1244,7 +435,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Use bare copper color for unplated copper</property>
<property name="label">Use bare copper color for unplated copper (slow)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1417,7 +608,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">15</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
@@ -1543,11 +734,11 @@
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxTOP|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerRotAngle</property>
<property name="orient">wxHORIZONTAL</property>
@@ -1746,12 +937,12 @@
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer9</property>
<property name="orient">wxVERTICAL</property>
<property name="name">bSizerSlider</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
@@ -1782,7 +973,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Enable animation</property>
<property name="label">Redraw while moving</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1814,19 +1005,8 @@
<event name="OnCheckBox">OnCheckEnableAnimation</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerSlider</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="border">15</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
@@ -1857,7 +1037,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Animation speed:</property>
<property name="label">Redraw speed:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@@ -1887,9 +1067,9 @@
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">15</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">1</property>
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxSlider" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@@ -1925,7 +1105,7 @@
<property name="minValue">1</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">100,-1</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_sliderAnimationSpeed</property>
<property name="pane_border">1</property>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -19,8 +19,8 @@
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/slider.h>
#include <wx/panel.h>
@@ -36,22 +36,10 @@ class PANEL_3D_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL
private:
protected:
wxStaticText* m_boardLayersLabel;
wxStaticLine* m_staticline2;
wxCheckBox* m_checkBoxSilkscreen;
wxCheckBox* m_checkBoxSubtractMaskFromSilk;
wxCheckBox* m_checkBoxClipSilkOnViaAnnulus;
wxCheckBox* m_checkBoxSolderMask;
wxCheckBox* m_checkBoxSolderpaste;
wxCheckBox* m_checkBoxAdhesive;
wxStaticText* m_userLayersLabel;
wxStaticLine* m_staticline31;
wxCheckBox* m_checkBoxComments;
wxCheckBox* m_checkBoxECO;
wxStaticText* m_renderOptionsLabel;
wxStaticLine* m_staticline4;
wxCheckBox* m_checkBoxBoardBody;
wxCheckBox* m_checkBoxRealisticMode;
wxCheckBox* m_checkBoxClipSilkOnViaAnnulus;
wxCheckBox* m_checkBoxSubtractMaskFromSilk;
wxCheckBox* m_checkBoxAreas;
wxCheckBox* m_checkBoxRenderPlatedPadsAsPlated;
wxStaticText* m_materialPropertiesLabel;
@@ -66,7 +54,6 @@ class PANEL_3D_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL
wxSlider* m_sliderAnimationSpeed;
// Virtual event handlers, override them in your derived class
virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCheckEnableAnimation( wxCommandEvent& event ) { event.Skip(); }
@@ -41,8 +41,8 @@ PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( wxWindow* aParent ) :
void PANEL_3D_OPENGL_OPTIONS::loadSettings( EDA_3D_VIEWER_SETTINGS* aCfg )
{
m_checkBoxCuThickness->SetValue( aCfg->m_Render.opengl_copper_thickness );
m_checkBoxBoundingBoxes->SetValue( aCfg->m_Render.opengl_show_model_bbox );
m_checkBoxHighlightOnRollOver->SetValue( aCfg->m_Render.opengl_highlight_on_rollover );
m_checkBoxBoundingBoxes->SetValue( aCfg->m_Render.show_model_bbox );
m_checkBoxHighlightOnRollOver->SetValue( aCfg->m_Render.highlight_on_rollover );
m_choiceAntiAliasing->SetSelection( static_cast<int>( aCfg->m_Render.opengl_AA_mode ) );
m_selectionColorSwatch->SetSwatchColor( aCfg->m_Render.opengl_selection_color, false );
@@ -69,8 +69,8 @@ bool PANEL_3D_OPENGL_OPTIONS::TransferDataFromWindow()
EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
cfg->m_Render.opengl_copper_thickness = m_checkBoxCuThickness->GetValue();
cfg->m_Render.opengl_show_model_bbox = m_checkBoxBoundingBoxes->GetValue();
cfg->m_Render.opengl_highlight_on_rollover = m_checkBoxHighlightOnRollOver->GetValue();
cfg->m_Render.show_model_bbox = m_checkBoxBoundingBoxes->GetValue();
cfg->m_Render.highlight_on_rollover = m_checkBoxHighlightOnRollOver->GetValue();
cfg->m_Render.opengl_AA_mode = static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() );
cfg->m_Render.opengl_selection_color = m_selectionColorSwatch->GetSwatchColor();
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -26,7 +26,7 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
m_cbRaytracing_proceduralTextures = new wxCheckBox( this, wxID_ANY, _("Procedural textures (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_proceduralTextures->SetValue(true);
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxALL, 5 );
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbRaytracing_addFloor = new wxCheckBox( this, wxID_ANY, _("Add floor (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_addFloor->SetValue(true);
@@ -347,6 +347,7 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
}
PANEL_3D_RAYTRACING_OPTIONS_BASE::~PANEL_3D_RAYTRACING_OPTIONS_BASE()
@@ -45,7 +45,7 @@
<property name="minimum_size"></property>
<property name="name">PANEL_3D_RAYTRACING_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">834,514</property>
<property name="size">-1,-1</property>
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
@@ -190,7 +190,7 @@
<property name="vgap">0</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -103,7 +103,7 @@ class PANEL_3D_RAYTRACING_OPTIONS_BASE : public RESETTABLE_PANEL
public:
PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 834,514 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_3D_RAYTRACING_OPTIONS_BASE();
+160 -59
View File
@@ -4,7 +4,7 @@
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,6 +25,7 @@
*/
#include "panel_preview_3d_model.h"
#include <dialogs/dialog_unit_entry.h>
#include <3d_canvas/eda_3d_canvas.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
@@ -34,51 +35,62 @@
#include <bitmaps.h>
#include <board.h>
#include <common_ogl/ogl_attr_list.h>
#include <gal/dpi_scaling.h>
#include <dpi_scaling_common.h>
#include <pgm_base.h>
#include <project_pcb.h>
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <widgets/wx_infobar.h>
#include <eda_3d_viewer_settings.h>
#include <board_design_settings.h>
#include <3d_navlib/nl_footprint_properties_plugin.h>
PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAME* aFrame,
FOOTPRINT* aFootprint,
std::vector<FP_3DMODEL>* aParentModelList ) :
PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ),
m_parentFrame( aFrame ),
m_previewPane( nullptr ),
m_infobar( nullptr ),
m_boardAdapter(),
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D ),
m_boardThickness( aFrame, nullptr, m_boardThicknessCtrl, m_boardThicknessUnits )
m_trackBallCamera( 2 * RANGE_SCALE_3D )
{
m_userUnits = aFrame->GetUserUnits();
m_userUnits = m_parentFrame->GetUserUnits();
m_dummyBoard = new BOARD();
m_dummyBoard->SetProject( &aFrame->Prj(), true );
// This board will only be used to hold a footprint for viewing
m_dummyBoard->SetBoardUse( BOARD_USE::FPHOLDER );
m_bodyStyleShowAll = true;
BOARD_DESIGN_SETTINGS parent_bds = aFrame->GetDesignSettings();
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
BOARD_DESIGN_SETTINGS& dummy_bds = m_dummyBoard->GetDesignSettings();
dummy_bds.SetBoardThickness( parent_bds.GetBoardThickness() );
dummy_bds.SetEnabledLayers( LSET::FrontMask() | LSET::BackMask() );
BOARD_STACKUP& dummy_board_stackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
dummy_board_stackup.RemoveAll();
dummy_board_stackup.BuildDefaultStackupList( &dummy_bds, 2 );
m_selected = -1;
m_previewLabel->SetFont( KIUI::GetStatusFont( this ) );
// Set the bitmap of 3D view buttons:
m_bpvTop->SetBitmap( KiBitmap( BITMAPS::axis3d_top ) );
m_bpvFront->SetBitmap( KiBitmap( BITMAPS::axis3d_front ) );
m_bpvBack->SetBitmap( KiBitmap( BITMAPS::axis3d_back ) );
m_bpvLeft->SetBitmap( KiBitmap( BITMAPS::axis3d_left ) );
m_bpvRight->SetBitmap( KiBitmap( BITMAPS::axis3d_right ) );
m_bpvBottom->SetBitmap( KiBitmap( BITMAPS::axis3d_bottom ) );
m_bpvISO->SetBitmap( KiBitmap( BITMAPS::ortho ) );
m_bpUpdate->SetBitmap( KiBitmap( BITMAPS::reload ) );
m_bpvTop->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_top ) );
m_bpvFront->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_front ) );
m_bpvBack->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_back ) );
m_bpvLeft->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_left ) );
m_bpvRight->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_right ) );
m_bpvBottom->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_bottom ) );
m_bpvISO->SetBitmap( KiBitmapBundle( BITMAPS::ortho ) );
m_bpvBodyStyle->SetBitmap( KiBitmapBundle( BITMAPS::axis3d ) );
m_bpUpdate->SetBitmap( KiBitmapBundle( BITMAPS::reload ) );
m_bpSettings->SetBitmap( KiBitmapBundle( BITMAPS::options_3drender ) );
// Set the min and max values of spin buttons (mandatory on Linux)
// They are not used, so they are set to min and max 32 bits int values
@@ -99,13 +111,24 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_dummyFootprint = new FOOTPRINT( *aFootprint );
m_dummyFootprint->SetParentGroup( nullptr );
// Ensure the footprint is shown like in Fp editor: rot 0, not flipped
// to avoid mistakes when setting the3D shape position/rotation
if( m_dummyFootprint->IsFlipped() )
m_dummyFootprint->Flip( m_dummyFootprint->GetPosition(), false );
m_dummyFootprint->SetOrientation( ANGLE_0 );
m_dummyBoard->Add( m_dummyFootprint );
// Create the 3D canvas
m_previewPane = new EDA_3D_CANVAS( this,
OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
m_boardAdapter, m_currentCamera,
aFrame->Prj().Get3DCacheManager() );
m_boardAdapter, m_currentCamera, PROJECT_PCB::Get3DCacheManager( &aFrame->Prj() ) );
m_spaceMouse = new NL_FOOTPRINT_PROPERTIES_PLUGIN( m_previewPane );
m_spaceMouse->SetFocus( true );
m_boardAdapter.SetBoard( m_dummyBoard );
m_boardAdapter.m_IsBoardView = false;
@@ -140,6 +163,12 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
this );
}
aFrame->Connect( EDA_EVT_UNITS_CHANGED,
wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL::onUnitsChanged ),
nullptr, this );
Bind( wxCUSTOM_PANEL_SHOWN_EVENT, &PANEL_PREVIEW_3D_MODEL::onPanelShownEvent, this );
#ifdef __WXOSX__
// Call layout once to get the proper button sizes after the bitmaps have been set
Layout();
@@ -157,12 +186,18 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix );
m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix );
m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix );
m_bpSettings->SetMinSize( m_bpSettings->GetSize() + borderFix );
#endif
}
PANEL_PREVIEW_3D_MODEL::~PANEL_PREVIEW_3D_MODEL()
{
// Restore the 3D viewer Render settings, that can be modified by the panel tools
if( m_boardAdapter.m_Cfg )
m_boardAdapter.m_Cfg->m_Render = m_initialRender;
delete m_spaceMouse;
delete m_dummyBoard;
delete m_previewPane;
}
@@ -183,45 +218,30 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING dpi{ settings, this };
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
if( colors )
{
auto set =
[] ( const COLOR4D& aColor, SFVEC4F& aTarget )
{
aTarget.r = aColor.r;
aTarget.g = aColor.g;
aTarget.b = aColor.b;
aTarget.a = aColor.a;
};
set( colors->GetColor( LAYER_3D_BACKGROUND_BOTTOM ), m_boardAdapter.m_BgColorBot );
set( colors->GetColor( LAYER_3D_BACKGROUND_TOP ), m_boardAdapter.m_BgColorTop );
set( colors->GetColor( LAYER_3D_BOARD ), m_boardAdapter.m_BoardBodyColor );
set( colors->GetColor( LAYER_3D_COPPER ), m_boardAdapter.m_CopperColor );
set( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ), m_boardAdapter.m_SilkScreenColorBot );
set( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), m_boardAdapter.m_SilkScreenColorTop );
set( colors->GetColor( LAYER_3D_SOLDERMASK_BOTTOM ), m_boardAdapter.m_SolderMaskColorBot );
set( colors->GetColor( LAYER_3D_SOLDERMASK_TOP ), m_boardAdapter.m_SolderMaskColorTop );
set( colors->GetColor( LAYER_3D_SOLDERPASTE ), m_boardAdapter.m_SolderPasteColor );
}
EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
if( cfg )
{
// Save the 3D viewer render settings, to restore it after closing the preview
m_initialRender = cfg->m_Render;
m_boardAdapter.m_Cfg = cfg;
m_previewPane->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_previewPane->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_previewPane->SetProjectionMode( cfg->m_Camera.projection_mode );
// Ensure the board body is always shown, and do not use the settings of the 3D viewer
cfg->m_Render.show_copper_top = m_bodyStyleShowAll;
cfg->m_Render.show_copper_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_top = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_solderpaste = m_bodyStyleShowAll;
cfg->m_Render.show_zones = m_bodyStyleShowAll;
cfg->m_Render.show_board_body = m_bodyStyleShowAll;
}
}
@@ -320,9 +340,6 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
m_opacity->SetValue( 100 );
}
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
m_boardThickness.ChangeValue( dummy_bds.GetBoardThickness() );
}
@@ -375,16 +392,49 @@ void PANEL_PREVIEW_3D_MODEL::onOpacitySlider( wxCommandEvent& event )
}
void PANEL_PREVIEW_3D_MODEL::updateBoardThickness( wxCommandEvent& event )
void PANEL_PREVIEW_3D_MODEL::setBodyStyleView( wxCommandEvent& event )
{
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
dummy_bds.SetBoardThickness( m_boardThickness.GetValue() );
// turn ON or OFF options to show the board body if OFF, soder paste, soldermask
// and board body are hidden, to allows a good view of the 3D model and its pads.
EDA_3D_VIEWER_SETTINGS* cfg = m_boardAdapter.m_Cfg;
BOARD_STACKUP& dummy_board_stackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
dummy_board_stackup.RemoveAll();
dummy_board_stackup.BuildDefaultStackupList( &dummy_bds, 2 );
if( !cfg )
return;
m_bodyStyleShowAll = !m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_top = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_solderpaste = m_bodyStyleShowAll;
cfg->m_Render.show_zones = m_bodyStyleShowAll;
cfg->m_Render.show_board_body = m_bodyStyleShowAll;
m_previewPane->ReloadRequest();
m_previewPane->Refresh();
}
void PANEL_PREVIEW_3D_MODEL::View3DSettings( wxCommandEvent& event )
{
BOARD_DESIGN_SETTINGS bds = m_dummyBoard->GetDesignSettings();
int thickness = bds.GetBoardThickness();
WX_UNIT_ENTRY_DIALOG dlg( m_parentFrame, _( "3D Preview Options" ), _( "Board thickness:" ),
thickness );
if( dlg.ShowModal() != wxID_OK )
return;
bds.SetBoardThickness( dlg.GetValue() );
BOARD_STACKUP& boardStackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
boardStackup.RemoveAll();
boardStackup.BuildDefaultStackupList( &bds, 2 );
UpdateDummyFootprint( true );
m_previewPane->ReloadRequest();
m_previewPane->Refresh();
}
@@ -399,10 +449,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
double step = SCALE_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = SCALE_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
textCtrl->GetValue() );
curr_value += ( SCALE_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
@@ -420,10 +475,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
double step = ROTATION_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = ROTATION_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
textCtrl->GetValue() );
curr_value += ( ROTATION_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
@@ -443,15 +503,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
textCtrl = zoff;
double step_mm = OFFSET_INCREMENT_MM;
double curr_value_mm =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits, textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
if( wxGetMouseState().ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
if( wxGetMouseState().ShiftDown( ) )
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
}
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
curr_value_mm += ( step_mm * aSign );
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
@@ -487,10 +554,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = ROTATION_INCREMENT_WHEEL;
double step = ROTATION_INCREMENT;
if( event.ShiftDown( ) )
step = ROTATION_INCREMENT_WHEEL_FINE;
step = ROTATION_INCREMENT_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
@@ -538,6 +605,40 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
}
void PANEL_PREVIEW_3D_MODEL::onUnitsChanged( wxCommandEvent& aEvent )
{
double xoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
xoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
double yoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
yoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
double zoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
zoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
PCB_BASE_FRAME* frame = static_cast<PCB_BASE_FRAME*>( aEvent.GetClientData() );
m_userUnits = frame->GetUserUnits();
xoff->SetValue( formatOffsetValue( xoff_mm ) );
yoff->SetValue( formatOffsetValue( yoff_mm ) );
zoff->SetValue( formatOffsetValue( zoff_mm ) );
aEvent.Skip();
}
void PANEL_PREVIEW_3D_MODEL::onPanelShownEvent( wxCommandEvent& aEvent )
{
if( m_spaceMouse != nullptr )
{
m_spaceMouse->SetFocus( static_cast<bool>( aEvent.GetInt() ) );
}
aEvent.Skip();
}
void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired )
{
m_dummyFootprint->Models().clear();
+29 -14
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
* Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -34,6 +34,7 @@
#include <3d_canvas/eda_3d_canvas.h>
#include <3d_viewer_id.h>
#include <3d_rendering/track_ball.h>
#include <wx/event.h>
// Define min and max parameter values
#define MAX_SCALE 10000.0
@@ -43,9 +44,8 @@
#define SCALE_INCREMENT_FINE 0.02
#define SCALE_INCREMENT 0.1
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT 90 // in degrees
#define ROTATION_INCREMENT_FINE 1 // in degrees
#define OFFSET_INCREMENT_MM 0.5
#define OFFSET_INCREMENT_MM_FINE 0.1
@@ -53,6 +53,7 @@
#define OFFSET_INCREMENT_MIL 25.0
#define OFFSET_INCREMENT_MIL_FINE 5.0
wxDECLARE_EVENT( wxCUSTOM_PANEL_SHOWN_EVENT, wxCommandEvent );
// Declared classes to create pointers
class WX_INFOBAR;
@@ -61,6 +62,7 @@ class FILENAME_RESOLVER;
class BOARD;
class BOARD_ADAPTER;
class FOOTPRINT;
class NL_FOOTPRINT_PROPERTIES_PLUGIN;
class PANEL_PREVIEW_3D_MODEL: public EDA_3D_BOARD_HOLDER, public TOOLS_HOLDER, public PANEL_PREVIEW_3D_MODEL_BASE
{
@@ -135,12 +137,13 @@ private:
void onOpacitySlider( wxCommandEvent& event ) override;
void updateBoardThickness( wxCommandEvent& event ) override;
void doIncrementScale( wxSpinEvent& aEvent, double aSign );
void doIncrementRotation( wxSpinEvent& aEvent, double aSign );
void doIncrementOffset( wxSpinEvent& aEvent, double aSign );
void onUnitsChanged( wxCommandEvent& aEvent );
void onPanelShownEvent( wxCommandEvent& aEvent );
wxString formatScaleValue( double aValue );
wxString formatRotationValue( double aValue );
wxString formatOffsetValue( double aValue );
@@ -151,19 +154,24 @@ private:
m_previewPane->Refresh();
}
// turn ON or OFF options to show the board body. If OFF, solder paste, soldermask
// and board body are hidden, to allows a good view of the 3D model and its pads.
// Useful for 3D model placement
void setBodyStyleView( wxCommandEvent& event ) override;
void View3DLeft( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_LEFT );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_LEFT );
}
void View3DFront( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_FRONT );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_FRONT );
}
void View3DTop( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_TOP );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_TOP );
}
void View3DUpdate( wxCommandEvent& event ) override
@@ -172,22 +180,25 @@ private:
m_previewPane->Refresh();
}
void View3DSettings( wxCommandEvent& event ) override;
void View3DRight( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_RIGHT );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_RIGHT );
}
void View3DBack( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_BACK );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_BACK );
}
void View3DBottom( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_BOTTOM );
m_previewPane->SetView3D( VIEW3D_TYPE::VIEW3D_BOTTOM );
}
private:
PCB_BASE_FRAME* m_parentFrame;
EDA_3D_CANVAS* m_previewPane;
WX_INFOBAR* m_infobar;
BOARD_ADAPTER m_boardAdapter;
@@ -198,10 +209,14 @@ private:
FOOTPRINT* m_dummyFootprint;
std::vector<FP_3DMODEL>* m_parentModelList;
int m_selected; /// Index into m_parentInfoList
int m_selected; /// Index into m_parentInfoList
UNIT_BINDER m_boardThickness;
EDA_UNITS m_userUnits;
bool m_bodyStyleShowAll; /// true if the board body is show
/// The 3d viewer Render initial settings (must be saved and restored)
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS m_initialRender;
NL_FOOTPRINT_PROPERTIES_PLUGIN* m_spaceMouse;
};
#endif // PANEL_PREVIEW_3D_MODEL_H
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -21,7 +21,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
wxFlexGridSizer* fgSizerScale;
fgSizerScale = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerScale = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerScale->AddGrowableCol( 1 );
fgSizerScale->SetFlexibleDirection( wxBOTH );
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -66,7 +66,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
wxFlexGridSizer* fgSizerRotate;
fgSizerRotate = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerRotate = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerRotate->AddGrowableCol( 1 );
fgSizerRotate->SetFlexibleDirection( wxBOTH );
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -111,7 +111,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
wxFlexGridSizer* fgSizerOffset;
fgSizerOffset = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerOffset = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerOffset->AddGrowableCol( 1 );
fgSizerOffset->SetFlexibleDirection( wxBOTH );
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -159,20 +159,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizer4->Add( m_opacity, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerBoardThickness;
sbSizerBoardThickness = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Thickness") ), wxHORIZONTAL );
m_boardThicknessCtrl = new wxTextCtrl( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerBoardThickness->Add( m_boardThicknessCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_boardThicknessUnits = new wxStaticText( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_boardThicknessUnits->Wrap( -1 );
sbSizerBoardThickness->Add( m_boardThicknessUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
bSizerLeft->Add( sbSizerBoardThickness, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizermain->Add( bSizerLeft, 0, 0, 5 );
@@ -183,12 +170,11 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
wxBoxSizer* bSizer6;
bSizer6 = new wxBoxSizer( wxHORIZONTAL );
wxStaticText* staticPreviewLabel;
staticPreviewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
staticPreviewLabel->Wrap( -1 );
staticPreviewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_previewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
m_previewLabel->Wrap( -1 );
m_previewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer6->Add( staticPreviewLabel, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizer6->Add( m_previewLabel, 1, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizerRight->Add( bSizer6, 0, wxEXPAND, 5 );
@@ -196,7 +182,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_SizerPanelView = new wxBoxSizer( wxVERTICAL );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 8 );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 5 );
bSizermain->Add( bSizerRight, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -204,16 +190,24 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
m_bpvISO->SetToolTip( _("Enable/disable orthographic projection") );
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP|wxBOTTOM, 5 );
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP, 5 );
m_bpvBodyStyle = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
m_bpvBodyStyle->SetToolTip( _("Show or hide the board body\nIf hidden, show only copper and silkscreen layers.") );
bSizer3DButtons->Add( m_bpvBodyStyle, 0, wxTOP|wxBOTTOM, 5 );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpvLeft, 0, wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM, 5 );
bSizer3DButtons->Add( m_bpvLeft, 0, wxBOTTOM, 5 );
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpvRight, 0, wxBOTTOM, 5 );
@@ -238,6 +232,12 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
bSizer3DButtons->Add( m_bpUpdate, 0, wxBOTTOM, 5 );
m_bpSettings = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpSettings, 0, wxBOTTOM, 5 );
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
bSizermain->Add( bSizer3DButtons, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
@@ -284,9 +284,8 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
m_boardThicknessCtrl->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this );
m_boardThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this );
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
m_bpvBodyStyle->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::setBodyStyleView ), NULL, this );
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this );
@@ -294,6 +293,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
m_bpSettings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this );
}
PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
@@ -336,9 +336,8 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
m_boardThicknessCtrl->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this );
m_boardThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this );
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
m_bpvBodyStyle->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::setBodyStyleView ), NULL, this );
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this );
@@ -346,5 +345,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
m_bpSettings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this );
}
+228 -161
View File
@@ -35,6 +35,7 @@
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
@@ -93,7 +94,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -119,6 +120,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -180,6 +182,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -246,6 +249,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -306,6 +310,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -367,6 +372,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -433,6 +439,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -493,6 +500,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -554,6 +562,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -620,6 +629,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -686,7 +696,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -712,6 +722,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -773,6 +784,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -839,6 +851,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -899,6 +912,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -960,6 +974,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1026,6 +1041,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1086,6 +1102,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1147,6 +1164,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1213,6 +1231,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1279,7 +1298,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -1305,6 +1324,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1366,6 +1386,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1432,6 +1453,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1492,6 +1514,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1553,6 +1576,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1619,6 +1643,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1679,6 +1704,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1740,6 +1766,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1806,6 +1833,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1847,7 +1875,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
@@ -1882,6 +1910,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -1925,147 +1954,6 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Board Thickness</property>
<property name="minimum_size"></property>
<property name="name">sbSizerBoardThickness</property>
<property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_boardThicknessCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnMouseWheel">onMouseWheelBoardThickness</event>
<event name="OnText">updateBoardThickness</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_boardThicknessUnits</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -2089,7 +1977,7 @@
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@@ -2111,6 +1999,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2127,11 +2016,11 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">staticPreviewLabel</property>
<property name="name">m_previewLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">none</property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
@@ -2150,7 +2039,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">8</property>
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
@@ -2173,7 +2062,17 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxBOTTOM</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -2201,6 +2100,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2247,17 +2147,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM</property>
<property name="flag">wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -2285,6 +2175,92 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_bpvBodyStyle</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size">-1,-1</property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Show or hide the board body&#x0A;If hidden, show only copper and silkscreen layers.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">setBodyStyleView</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2359,6 +2335,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2433,6 +2410,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2507,6 +2485,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2581,6 +2560,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2655,6 +2635,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2739,6 +2720,7 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@@ -2783,6 +2765,91 @@
<event name="OnButtonClick">View3DUpdate</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_bpSettings</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">View3DSettings</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
</object>
</object>
</object>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -66,10 +66,10 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
wxTextCtrl* zoff;
wxSpinButton* m_spinZoffset;
wxSlider* m_opacity;
wxTextCtrl* m_boardThicknessCtrl;
wxStaticText* m_boardThicknessUnits;
wxStaticText* m_previewLabel;
wxBoxSizer* m_SizerPanelView;
wxBitmapButton* m_bpvISO;
wxBitmapButton* m_bpvBodyStyle;
wxBitmapButton* m_bpvLeft;
wxBitmapButton* m_bpvRight;
wxBitmapButton* m_bpvFront;
@@ -77,6 +77,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
wxBitmapButton* m_bpvTop;
wxBitmapButton* m_bpvBottom;
wxBitmapButton* m_bpUpdate;
wxBitmapButton* m_bpSettings;
// Virtual event handlers, override them in your derived class
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
@@ -90,9 +91,8 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
virtual void onDecrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onOpacitySlider( wxCommandEvent& event ) { event.Skip(); }
virtual void onMouseWheelBoardThickness( wxMouseEvent& event ) { event.Skip(); }
virtual void updateBoardThickness( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DISO( wxCommandEvent& event ) { event.Skip(); }
virtual void setBodyStyleView( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DLeft( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DRight( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DFront( wxCommandEvent& event ) { event.Skip(); }
@@ -100,6 +100,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DSettings( wxCommandEvent& event ) { event.Skip(); }
public:
+1
View File
@@ -50,6 +50,7 @@ Ian McInerney <ian.s.mcinerney[at]ieee-dot-org>
Thomas Pointhuber <thomas.pointhuber[at]gmx-dot-at>
Roberto Fernandez Bautista <roberto.fer.bau[at]gmail-dot-com>
Mikołaj Wielgus <wielgusmikolaj[at]gmail-dot-com>
Mike Williams <mike[at]mikebwilliams-dot-com>
See git repo on GitLab for contributors at
https://gitlab.com/kicad/code/kicad/-/graphs/master
+314 -245
View File
@@ -15,6 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
@@ -45,6 +46,7 @@ set(CMAKE_CXX_FLAGS_QABUILD "-Os -g1 -ggdb1")
include( GNUInstallDirs )
include( CMakeDependentOption )
include( CheckCXXCompilerFlag )
# Output compile_commands.json for various LSP and other users
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
@@ -53,12 +55,20 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
set( KICAD_CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" )
set( CMAKE_MODULE_PATH "${KICAD_CMAKE_MODULE_PATH}" )
# On Windows, binaries created by link option -g3 are very large (more than 1Gb for pcbnew,
# and more than 3Gb for the full kicad suite)
# This option create binaries using link option -g1 that create much smaller files, but
# there are less info in debug (but the file names and line numbers are available)
cmake_dependent_option( BUILD_SMALL_DEBUG_FILES "In debug build: create smaller binaries." OFF "NOT MSVC" OFF )
include( ConfigurePlatform )
# Create a flag to identify the non-Apple unix systems
if( UNIX AND NOT APPLE )
set( UNIX_NOT_APPLE ON )
else()
set( UNIX_NOT_APPLE OFF )
endif()
if( APPLE OR WIN32 )
set( APPLE_OR_WIN32 ON )
else()
set( APPLE_OR_WIN32 OFF )
endif()
#
# KiCad build options should be added below.
@@ -68,44 +78,123 @@ cmake_dependent_option( BUILD_SMALL_DEBUG_FILES "In debug build: create smaller
# so that build option settings can be included in bug reports.
#
option( KICAD_SCRIPTING_WXPYTHON
"Build wxPython implementation for wx interface building in Python and py.shell (default ON)."
ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
option( KICAD_INSTALL_DEMOS
"Install KiCad demos and examples (default ON)"
####################################
# Feature flags
####################################
option( KICAD_SPICE_QA
"Build software Quality assurance unit tests for spice (default ON)"
ON )
option( KICAD_BUILD_QA_TESTS
"Build software Quality assurance unit tests (default ON)"
ON )
option( KICAD_USE_SENTRY
"Build KiCad with support for sentry app metrics"
OFF )
option( KICAD_SPICE
"Build KiCad with internal Spice simulator."
option( KICAD_SIGNAL_INTEGRITY
"Build tools for signal integrity analysis ( default ON )"
ON )
option( KICAD_BUILD_I18N
"Build the translation libraries."
OFF )
option( KICAD_BUILD_QA_TESTS
"Build software Quality assurance unit tests (default ON)"
ON )
option( KICAD_SCRIPTING_WXPYTHON
"Build wxPython implementation for wx interface building in Python and py.shell (default ON)."
ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
option( KICAD_UPDATE_CHECK
"Build in update check"
ON )
# EGL is only needed on Linux with Wayland
cmake_dependent_option( KICAD_USE_EGL
"Build KiCad with EGL backend support for Wayland."
OFF "UNIX_NOT_APPLE"
OFF)
cmake_dependent_option( KICAD_USE_BUNDLED_GLEW
"Use the bundled version of GLEW - only available when KICAD_USE_EGL is set"
ON "KICAD_USE_EGL"
OFF )
cmake_dependent_option( KICAD_WAYLAND
"Support Wayland features"
ON "KICAD_USE_EGL"
OFF )
# Options to build with flatpak platform defaults (only on Linux)
cmake_dependent_option( KICAD_BUILD_FLATPAK
"Build KiCad with metadata, launchers, icons, and MIME info following flatpak conventions"
OFF "UNIX_NOT_APPLE"
OFF )
cmake_dependent_option( KICAD_BUILD_NIGHTLY_FLATPAK
"Build a Nightly flatpak (requires KICAD_BUILD_FLATPAK=ON)"
OFF "UNIX_NOT_APPLE"
OFF )
cmake_dependent_option( KICAD_WIN32_DPI_AWARE
"Turn on DPI awareness for Windows builds only"
OFF "WIN32"
OFF )
cmake_dependent_option( KICAD_WIN32_VERIFY_CODESIGN
"When enabled, verifies the code signing signature of certain DLLs loaded during runtime."
OFF "WIN32"
OFF )
# On Windows, binaries created by link option -g3 are very large (more than 1Gb for pcbnew,
# and more than 3Gb for the full kicad suite)
# This option create binaries using link option -g1 that create much smaller files, but
# there are less info in debug (but the file names and line numbers are available)
cmake_dependent_option( KICAD_BUILD_SMALL_DEBUG_FILES
"Create smaller binaries in debug builds."
OFF "NOT MSVC"
OFF )
cmake_dependent_option( KICAD_APPLE_MAKE_RELOCATEABLE_BUNDLE
"On macOS, post-process the build to make it relocateable (default ON)"
ON "APPLE" OFF )
####################################
# Installation options
####################################
option( KICAD_INSTALL_DEMOS
"Install KiCad demos and examples (default ON)"
ON )
option( KICAD_I18N_UNIX_STRICT_PATH
"Use standard Unix locale lookup path (default OFF)."
OFF )
cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS
"Installs debug pdb to the bin folder, DO NOT USE (NOR REQUIRED) FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building.
MSVC can find the PDBs without this."
OFF "WIN32"
OFF )
####################################
# Compiler options/tools
####################################
# Not supported by all platforms (for instance mingw)
option( KICAD_SANITIZE_ADDRESS
"Build KiCad with sanitizer options. WARNING: Not compatible with gold linker"
"Build KiCad with address sanitizer options. WARNING: Not compatible with gold linker"
OFF )
# Not supported by all platforms (for instance mingw)
option( KICAD_SANITIZE_THREADS
"Build KiCad with sanitizer options. WARNING: Not compatible with gold linker"
"Build KiCad with thread sanitizer options. WARNING: Not compatible with gold linker"
OFF )
option( KICAD_SIGNAL_INTEGRITY
"Build tools for signal integrity analysis ( default ON )"
ON )
# Enable additional valgrind instrumentation for stack tracking in libcontext
option( KICAD_USE_VALGRIND
"Build KiCad with valgrind stack tracking enabled."
OFF )
option( KICAD_STDLIB_DEBUG
"Build KiCad with libstdc++ debug flags enabled."
@@ -117,33 +206,31 @@ option( KICAD_STDLIB_LIGHT_DEBUG
cmake_dependent_option( KICAD_WIN32_BUILD_PARALLEL_CL_MP
"Build in parallel using the /MP compiler option (default OFF for safety reasons)"
OFF "WIN32" OFF )
option( KICAD_USE_VALGRIND
"Build KiCad with valgrind stack tracking enabled."
OFF "WIN32"
OFF )
option( KICAD_NETLIST_QA
"Run eeschema netlist QA tests (requires Python 3)"
cmake_dependent_option( KICAD_WIN32_LTCG
"Enable Whole Program Optimization"
OFF "WIN32"
OFF )
cmake_dependent_option( KICAD_WIN32_DPI_AWARE
"Turn on DPI awareness for Windows builds only"
OFF "WIN32" OFF )
cmake_dependent_option( KICAD_WIN32_CONTEXT_WINFIBER
"Use win32 fibers for libcontext"
OFF "WIN32" OFF )
option( KICAD_USE_EGL
"Build KiCad with EGL backend support for Wayland."
# Advanced option to make link maps (only available on linux)
cmake_dependent_option( KICAD_MAKE_LINK_MAPS
"Create link maps for artifacts"
OFF "UNIX_NOT_APPLE"
OFF )
mark_as_advanced( KICAD_MAKE_LINK_MAPS )
cmake_dependent_option( KICAD_USE_BUNDLED_GLEW
"Use the bundled version of GLEW - only available when KICAD_USE_EGL is set"
ON "KICAD_USE_EGL"
OFF )
set( KICAD_INIT_VARIABLES "Default" CACHE STRING "Specify how compiler should initialize variables" )
set_property( CACHE KICAD_INIT_VARIABLES PROPERTY STRINGS
"Default" # Equivalent to pattern in debug mode (but not when Valgrind is used), zero in release mode
"Off" # Don't initialize anything
"Zero" # Initialize trivial variables to 0
"Pattern" ) # Initialize trivial variables to a non-zero pattern to flag them (usually 0xAA...)
####################################
# Debugging/profiling
####################################
option( KICAD_DRC_PROTO
"Build the DRC prototype QA tool"
OFF )
@@ -160,35 +247,6 @@ option( KICAD_GAL_PROFILE
"Enable profiling info for GAL"
OFF )
cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS
"Installs debug pdb to the bin folder, DO NOT USE (NOR REQUIRED) FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building.
MSVC can find the PDBs without this."
OFF "WIN32"
OFF )
option( KICAD_USE_3DCONNEXION
"Build KiCad with support for 3Dconnexion devices (Currently only for Mac/MSW)"
OFF )
cmake_dependent_option( KICAD_WIN32_VERIFY_CODESIGN
"When enabled, verifies the code signing signature of certain DLLs loaded during runtime."
OFF "WIN32"
OFF )
option( KICAD_USE_SENTRY
"Build KiCad with support for sentry app metrics"
OFF )
if( KICAD_USE_3DCONNEXION )
if( WIN32 )
add_definitions( -DKICAD_USE_3DCONNEXION )
elseif( APPLE )
add_definitions( -DKICAD_USE_3DCONNEXION )
else()
remove_definitions( -DKICAD_USE_3DCONNEXION )
endif()
endif()
# Global setting: exports are explicit
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
@@ -201,30 +259,34 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Enable additional valgrind instrumentation for stack tracking in libcontext
if( KICAD_USE_VALGRIND )
add_definitions( -DKICAD_USE_VALGRIND )
# Pass defines into KiCad code based on the build options set
add_compile_definitions( $<$<BOOL:${KICAD_SCRIPTING_WXPYTHON}>:KICAD_SCRIPTING_WXPYTHON> )
add_compile_definitions( $<$<BOOL:${KICAD_SIGNAL_INTEGRITY}>:KICAD_SIGNAL_INTEGRITY> )
add_compile_definitions( $<$<BOOL:${KICAD_USE_VALGRIND}>:KICAD_USE_VALGRIND> )
add_compile_definitions( $<$<BOOL:${KICAD_GAL_PROFILE}>:KICAD_GAL_PROFILE> )
add_compile_definitions( $<$<BOOL:${KICAD_WIN32_VERIFY_CODESIGN}>:KICAD_WIN32_VERIFY_CODESIGN> )
add_compile_definitions( $<$<BOOL:${KICAD_UPDATE_CHECK}>:KICAD_UPDATE_CHECK> )
if( KICAD_USE_EGL )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )
add_compile_definitions( KICAD_USE_EGL )
endif()
if( KICAD_GAL_PROFILE )
add_definitions( -DKICAD_GAL_PROFILE )
endif()
if( KICAD_WIN32_VERIFY_CODESIGN )
add_definitions( -DKICAD_WIN32_VERIFY_CODESIGN )
if( KICAD_WAYLAND )
message( STATUS "Configuring KiCad to support Wayland features" )
add_compile_definitions( KICAD_WAYLAND )
endif()
# Ensure DEBUG is defined for all platforms in Debug builds
# change to add_compile_definitions() after minimum required CMake version is 3.12
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG> )
add_compile_definitions( $<$<CONFIG:Debug>:DEBUG> )
# Add option to add user directories for linker, if any
LINK_DIRECTORIES( ${LINK_DIRECTORIES_PATH} )
link_directories( ${LINK_DIRECTORIES_PATH} )
set( KICAD_CONFIG_DIR "kicad" CACHE STRING "Location of user specific KiCad config files" )
mark_as_advanced( KICAD_CONFIG_DIR )
add_definitions( -DKICAD_CONFIG_DIR=${KICAD_CONFIG_DIR} )
add_compile_definitions( KICAD_CONFIG_DIR=${KICAD_CONFIG_DIR} )
# Set default data file path to CMAKE_INSTALL_PREFIX if it wasn't specified during the
# CMake configuration. The value of DEFAULT_INSTALL_PATH is expanded in config.h and
@@ -243,71 +305,25 @@ message( STATUS "KiCad install dir: <${DEFAULT_INSTALL_PATH}>" )
include( PerformFeatureChecks )
perform_feature_checks()
# Setup the compiler warnings
include( ${KICAD_CMAKE_MODULE_PATH}/Warnings.cmake )
if( KICAD_WIN32_CONTEXT_WINFIBER )
set(LIBCONTEXT_USE_WINFIBER true)
add_compile_definitions(LIBCONTEXT_USE_WINFIBER)
else()
set(LIBCONTEXT_USE_WINFIBER false)
endif()
if( WIN32 )
# define UNICODE and_UNICODE definition on Windows. KiCad uses unicode.
# Both definitions are required
add_definitions(-DUNICODE -D_UNICODE)
add_compile_definitions( UNICODE _UNICODE)
# In fully standards-compliant mode, M_PI et al. are defined only if
# _USE_MATH_DEFINES is set.
add_definitions( -D_USE_MATH_DEFINES )
add_compile_definitions( _USE_MATH_DEFINES )
# Used for the resource compiler and other arch dependent steps
if( MSVC )
# CMake does not set CMAKE_SYSTEM_PROCESSOR correctly for MSVC
# and it will always return the host instead of the target arch
if("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM64")
set( KICAD_BUILD_ARCH "arm64" )
set( KICAD_BUILD_ARCH_ARM64 1 )
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM")
set( KICAD_BUILD_ARCH "arm" )
set( KICAD_BUILD_ARCH_ARM 1 )
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "X86")
set( KICAD_BUILD_ARCH "x86" )
set( KICAD_BUILD_ARCH_X86 1 )
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "x64")
set( KICAD_BUILD_ARCH "x64" )
set( KICAD_BUILD_ARCH_X64 1 )
else()
message(FATAL_ERROR "Failed to determine the MSVC target architecture: ${MSVC_C_ARCHITECTURE_ID}")
endif()
else()
if ( NOT CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( KICAD_BUILD_ARCH "x86" )
set( KICAD_BUILD_ARCH_X86 1 )
elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( KICAD_BUILD_ARCH "x64" )
set( KICAD_BUILD_ARCH_X64 1 )
endif()
endif()
add_definitions( -DKICAD_BUILD_ARCH=${KICAD_BUILD_ARCH} )
if( KICAD_WIN32_DPI_AWARE )
add_definitions( -DKICAD_WIN32_DPI_AWARE=1 )
endif()
add_compile_definitions( $<$<BOOL:${KICAD_WIN32_DPI_AWARE}>:KICAD_WIN32_DPI_AWARE=1> )
endif()
if(KICAD_BUILD_ARCH_X64)
add_definitions( -DKICAD_BUILD_ARCH_X64 )
elseif(KICAD_BUILD_ARCH_X86)
add_definitions( -DKICAD_BUILD_ARCH_X86 )
elseif(KICAD_BUILD_ARCH_ARM64)
add_definitions( -DKICAD_BUILD_ARCH_ARM64 )
elseif(KICAD_BUILD_ARCH_ARM)
add_definitions( -DKICAD_BUILD_ARCH_ARM )
endif()
add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_X86}>:KICAD_BUILD_ARCH_X86> )
add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_X64}>:KICAD_BUILD_ARCH_X64> )
add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_ARM}>:KICAD_BUILD_ARCH_ARM> )
add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_ARM64}>:KICAD_BUILD_ARCH_ARM64> )
#================================================
# Provide access to CCACHE
@@ -347,22 +363,28 @@ endif(USE_DISTCC)
#================================================
# Set flags for GCC, or treat llvm as GCC
# Setup compiler-specific flags
#================================================
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Set 32-bit flag for GCC to prevent excess precision
if( CMAKE_COMPILER_IS_GNUCXX )
# Set 32-bit flag for GCC to prevent excess precision (not needed for Clang)
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set( CMAKE_CXX_FLAGS "-ffloat-store ${CMAKE_CXX_FLAGS}" )
endif()
endif( CMAKE_COMPILER_IS_GNUCXX )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Clang needs this flag or wxStrings, etc. won't be viewable in the debugger
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstandalone-debug" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstandalone-debug" )
endif()
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Link flags in Debug: -g1 and -ggdb1 or -g1 and -ggdb3 can be used.
# Level 1 produces minimal information, enough for making basic backtraces.
# This includes descriptions of functions and external variables, and line number tables,
# but no information about local variables.
# Level 3 includes full information, but binaries are much larger.
if( BUILD_SMALL_DEBUG_FILES )
if( KICAD_BUILD_SMALL_DEBUG_FILES )
set( CMAKE_C_FLAGS_DEBUG "-g1 -ggdb1" )
set( CMAKE_CXX_FLAGS_DEBUG "-g1 -ggdb1" )
else()
@@ -370,14 +392,48 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3" )
endif()
# Clang needs this flag or wxStrings, etc. won't be viewable in the debugger
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstandalone-debug" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstandalone-debug" )
check_cxx_compiler_flag( "-ftrivial-auto-var-init=pattern" COMPILER_SUPPORTS_TRIVIAL_PATTERN_INIT )
if( COMPILER_SUPPORTS_TRIVIAL_PATTERN_INIT )
set( VAR_PATTERN_INIT_FLAGS -ftrivial-auto-var-init=pattern )
endif()
check_cxx_compiler_flag( "-ftrivial-auto-var-init=zero" COMPILER_SUPPORTS_TRIVIAL_ZERO_INIT )
if( COMPILER_SUPPORTS_TRIVIAL_ZERO_INIT )
set( VAR_ZERO_INIT_FLAGS -ftrivial-auto-var-init=zero )
else()
# Clang 15 and below required a special flag to enable the zero-init flag, so try that
check_cxx_compiler_flag( "-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"
COMPILER_REQUIRES_ENABLE_TRIVIAL_ZERO_INIT )
if( COMPILER_REQUIRES_ENABLE_TRIVIAL_ZERO_INIT )
set( VAR_ZERO_INIT_FLAGS -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang )
endif()
endif()
if( NOT KICAD_INIT_VARIABLES STREQUAL "Off" )
if( KICAD_INIT_VARIABLES STREQUAL "Default" )
# Disable when using valgrind to preserve reporting of uninitialized variables
if( NOT KICAD_USE_VALGRIND )
# Use pattern init in debug mode only, use zero init every other time
if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set( VAR_INIT_FLAGS ${VAR_PATTERN_INIT_FLAGS} )
else()
set( VAR_INIT_FLAGS ${VAR_ZERO_INIT_FLAGS} )
endif()
endif()
elseif( KICAD_INIT_VARIABLES STREQUAL "Zero" )
set( VAR_INIT_FLAGS ${VAR_ZERO_INIT_FLAGS} )
elseif( KICAD_INIT_VARIABLES STREQUAL "Pattern" )
set( VAR_INIT_FLAGS ${VAR_PATTERN_INIT_FLAGS} )
endif()
if( VAR_INIT_FLAGS )
add_compile_options( ${VAR_INIT_FLAGS} )
message( STATUS "Initializing trivial variables (${VAR_INIT_FLAGS})" )
endif()
endif()
if( KICAD_SANITIZE_ADDRESS )
add_definitions( -DKICAD_SANITIZE_ADDRESS )
add_compile_definitions( KICAD_SANITIZE_ADDRESS )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_SANITIZE_VECTOR -fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer" )
# ASAN shouldn't be used with these options (https://github.com/google/sanitizers/wiki/AddressSanitizer#faq)
@@ -385,7 +441,7 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif()
if( KICAD_SANITIZE_THREADS )
add_definitions( -DKICAD_SANITIZE_THREADS )
add_compile_definitions( KICAD_SANITIZE_THREADS )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_SANITIZE_VECTOR -fsanitize=thread -fno-optimize-sibling-calls -fno-omit-frame-pointer" )
# Based on this warning https://github.com/JuliaLang/julia/blob/29d5158d27ddc3983ae2e373c4cd05569b9ead6c/src/julia.h#L77
@@ -399,12 +455,12 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif()
if( KICAD_STDLIB_DEBUG )
add_definitions( -DKICAD_STDLIB_DEBUG )
add_compile_definitions( KICAD_STDLIB_DEBUG )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG" )
elseif( KICAD_STDLIB_LIGHT_DEBUG )
# useless if KICAD_STDLIB_DEBUG is ON.
# this option makes some controls to trap out of bound memory access.
add_definitions( -DKICAD_STDLIB_LIGHT_DEBUG )
add_compile_definitions( KICAD_STDLIB_LIGHT_DEBUG )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wp,-D_GLIBCXX_ASSERTIONS" )
endif()
@@ -422,12 +478,12 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# for some reasons, cmake does do use always a response file to send the list of objects
# to the archiver, and because this list can be very long, and can create issue
# when it is used in a command line, force use of a response file to store it
SET( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
# The MinGW compiler can use the microsoft system snprintf as standard and it has a broken
# API with respect to the C99 standard, so make sure we force it to use its own compliant
# snprintf
add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
add_compile_definitions( __USE_MINGW_ANSI_STDIO=1 )
# Allow linking for Boost for the UUID against bcrypt
set( EXTRA_LIBS "bcrypt" )
@@ -443,13 +499,13 @@ if( MSVC )
include_directories( ${CMAKE_SOURCE_DIR}/resources/msw/ )
# Disallow implicit linking for Boost
add_definitions( -DBOOST_ALL_NO_LIB )
add_compile_definitions( BOOST_ALL_NO_LIB )
# But allow it for the UUID so that it will link against bcrypt
add_definitions( -DBOOST_UUID_FORCE_AUTO_LINK )
add_compile_definitions( BOOST_UUID_FORCE_AUTO_LINK )
# Disable MSVC's deprecation warnings
add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS )
add_compile_definitions( _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE _SCL_SECURE_NO_WARNINGS )
# Hide Windows's min() and max() macros
add_definitions( -DNOMINMAX )
add_compile_definitions( NOMINMAX )
# source and execution charset are UTF-8
string( APPEND CMAKE_CXX_FLAGS " /utf-8" )
# C4290: throw() is interpreted as declspec(nothrow)
@@ -458,6 +514,8 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
# /Zi: create PDB
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /GF: enable string pooling
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )
@@ -466,17 +524,32 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /Gy" )
# Avoid fatal error because /GF + swig wrapper exceed standard obj file limits
string( APPEND CMAKE_CXX_FLAGS " /bigobj" )
# /permissive-: This puts MSVC into compliance mode, this flag is default on with C++20
# but we want to turn it on to enable debug performance improvements available under C++17 in MSVC 17.5+
string( APPEND CMAKE_CXX_FLAGS " /permissive-" )
# Exception handling
# Remove the potential default EHsc option cmake doesn't allow us to remove easily
string( REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
if( KICAD_WIN32_CONTEXT_WINFIBER )
# /EHsc: ensure standard exception C++ unwinding is enabled, "extern C" can never throw exceptions
string( APPEND CMAKE_CXX_FLAGS " /EHsc" )
# /EHsc: ensure standard exception C++ unwinding is enabled, "extern C" can never throw exceptions
string( APPEND CMAKE_CXX_FLAGS " /EHsc" )
else()
# the asm libcontext implementation a slight change of rules
# /EHs: ensure standard exception C++ unwinding is enabled, "extern C" MAY throw exceptions
string( APPEND CMAKE_CXX_FLAGS " /EHs" )
# the asm libcontext implementation a slight change of rules
# /EHs: ensure standard exception C++ unwinding is enabled, "extern C" MAY throw exceptions
string( APPEND CMAKE_CXX_FLAGS " /EHs" )
endif()
if( KICAD_SANITIZE_ADDRESS )
add_definitions( -DKICAD_SANITIZE_ADDRESS )
add_definitions( -D_DISABLE_VECTOR_ANNOTATION )
string( APPEND CMAKE_CXX_FLAGS " /fsanitize=address" )
endif()
if( KICAD_WIN32_LTCG )
# we are implementing this manually because CMake's LTCG option is incomplete
# https://gitlab.kitware.com/cmake/cmake/-/issues/20484
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GL" )
endif()
foreach( type EXE SHARED MODULE)
@@ -488,6 +561,12 @@ if( MSVC )
# /OPT:ICF: fold common data
string( APPEND CMAKE_${type}_LINKER_FLAGS_RELEASE " /OPT:ICF /MANIFEST:NO" )
string( APPEND CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO " /OPT:ICF /MANIFEST:NO" )
if( KICAD_WIN32_LTCG )
# we are implementing this manually because CMake's LTCG option is incomplete
# https://gitlab.kitware.com/cmake/cmake/-/issues/20484
string( APPEND CMAKE_${type}_LINKER_FLAGS_RELEASE " /LTCG" )
endif()
endforeach()
# Let cl.exe parallelize builds
@@ -496,26 +575,6 @@ if( MSVC )
endif()
endif()
if( KICAD_SCRIPTING_WXPYTHON )
add_definitions( -DKICAD_SCRIPTING_WXPYTHON )
endif()
if( KICAD_SPICE )
add_definitions( -DKICAD_SPICE )
endif()
if( KICAD_SIGNAL_INTEGRITY )
add_definitions( -DKICAD_SIGNAL_INTEGRITY )
endif()
if( KICAD_USE_EGL AND UNIX AND NOT APPLE )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )
add_definitions( -DKICAD_USE_EGL )
elseif( KICAD_USE_EGL )
message( STATUS "Ignoring KICAD_USE_EGL since not on Linux" )
endif()
# KIFACE_SUFFIX is the file extension used for top level program modules which
# implement the KIFACE interface. A valid suffix starts with a period '.'.
@@ -634,31 +693,13 @@ else()
set( KICAD_DEMOS demos
CACHE PATH "Location of KiCad demo files." FORCE )
# Required to run from build folder
if( PYTHON_FRAMEWORK )
list(APPEND CMAKE_BUILD_RPATH ${PYTHON_FRAMEWORK} )
endif()
# RPATH settings for building shared libraries
set( CMAKE_MACOSX_RPATH FALSE )
# Override default paths for fixup_bundle
set( OSX_BUNDLE_OVERRIDE_PATHS "
function( gp_item_default_embedded_path_override item default_embedded_path_var )
# by default, embed things right next to the main bundle executable:
set( path \"@executable_path/../../Contents/MacOS\" )
set( overridden 0 )
# embed .dylibs right next to the main bundle executable:
if( item MATCHES \"\\\\.dylib$\" )
set( path \"@executable_path/../Frameworks\" )
set( overridden 1 )
endif()
set( \${default_embedded_path_var} \"\${path}\" PARENT_SCOPE )
endfunction(gp_item_default_embedded_path_override)
# If `BU_CHMOD_BUNDLE_ITEMS` is not set, `install_name_tool` will fail to re-write some
# loader paths due to lack of writable permissions if the build dependencies were installed
# by brew (or didn't have writable permissions)
set ( BU_CHMOD_BUNDLE_ITEMS ON )
"
)
endif()
mark_as_advanced( KICAD_BIN
@@ -688,8 +729,12 @@ endif()
#
# Find OpenGL library, required
#
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
if( KICAD_USE_EGL )
find_package( OpenGL REQUIRED COMPONENTS OpenGL EGL )
else()
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
endif()
#
# Find GLEW library, required
@@ -722,21 +767,18 @@ endif()
# Find GLM library, required
#
find_package( GLM 0.9.8 REQUIRED )
add_definitions( -DGLM_FORCE_CTOR_INIT )
add_compile_definitions( GLM_FORCE_CTOR_INIT )
include_directories( SYSTEM ${GLM_INCLUDE_DIR} )
#
# Find zlib library, required
#
find_package(ZLIB REQUIRED)
check_find_package_result( ZLIB_FOUND "ZLIB" )
include_directories( SYSTEM ${ZLIB_INCLUDE_DIRS} )
#
# Find CURL library, required
# Find libcurl, required
#
find_package( CURL REQUIRED )
include_directories( SYSTEM ${CURL_INCLUDE_DIRS} )
#
# Find Cairo library, required
@@ -747,10 +789,22 @@ include_directories( SYSTEM ${CAIRO_INCLUDE_DIR} )
find_package( Pixman 0.30 REQUIRED )
include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} )
# Find libgit2, required
find_package( libgit2 REQUIRED )
# Set include directories for libgit
include_directories(${LIBGIT2_INCLUDE_DIRS})
#
# Find Boost headers, required.
find_package( Boost 1.71.0 REQUIRED )
include_directories( SYSTEM ${Boost_INCLUDE_DIR} )
# Find Boost headers and libraries, required.
set( BOOST_REQUESTED_COMPONENTS locale ) # locale is required by nanoodbc/database libraries
if( KICAD_BUILD_QA_TESTS )
# required by the unit test framework
list( APPEND BOOST_REQUESTED_COMPONENTS unit_test_framework )
endif()
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
#
# Libraries required for outline font support.
@@ -771,9 +825,7 @@ find_package( Fontconfig REQUIRED )
include( MinGWResourceCompiler )
# Find ngspice library, required for integrated circuit simulator
if( KICAD_SPICE )
find_package( ngspice REQUIRED )
endif()
find_package( ngspice REQUIRED )
# Find OpenCascade, required for STEP plugin and tools
find_package(OCC)
@@ -782,10 +834,10 @@ if( NOT OCC_FOUND )
" OpenCASCADE was not found!\n"
"================================================================\n")
endif()
if( OCC_VERSION_STRING VERSION_LESS 7.3.0 )
if( OCC_VERSION_STRING VERSION_LESS 7.5.0 )
MESSAGE( FATAL_ERROR "================================================================\n"
"OpenCASCADE version ${OCC_VERSION_STRING} was found.\n"
" KiCad requires a minimum version of 7.3.0\n"
" KiCad requires a minimum version of 7.5.0\n"
"================================================================\n")
endif()
include_directories( SYSTEM ${OCC_INCLUDE_DIR} )
@@ -826,7 +878,14 @@ check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
# Get the correct Python site package install path from the Python interpreter found by
# FindPythonInterp unless the user specifically defined a custom path.
if( NOT PYTHON_SITE_PACKAGE_PATH )
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print(\"%s\"%distutils.sysconfig.get_python_lib(plat_specific=0, standard_lib=0, prefix=''))"
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import sys, sysconfig
if 'deb_system' in sysconfig.get_scheme_names():
scheme = 'deb_system'
elif sys.version_info > (3, 10):
scheme = sysconfig.get_default_scheme()
else:
scheme = sysconfig._get_default_scheme()
print(\"%s\"%sysconfig.get_path('platlib', vars={'platbase': '.'}, scheme=scheme))"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
@@ -842,8 +901,8 @@ if( APPLE )
set( PYTHON_DEST "${OSX_BUNDLE_BUILD_DIR}/${OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR}"
CACHE PATH "Python module install path."
)
# change to add_compile_definitions() after minimum required CMake version is 3.12
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR="${OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR}")
add_compile_definitions( OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR="${OSX_BUNDLE_PYTHON_SITE_PACKAGES_DIR}" )
elseif( VCPKG_TOOLCHAIN )
set( PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/bin/Lib/site-packages"
CACHE PATH "Python module install path."
@@ -881,11 +940,18 @@ set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/s
if( KICAD_SCRIPTING_WXPYTHON )
# Find the wxPython installation
find_package( wxPython REQUIRED )
if( NOT VCPKG_TOOLCHAIN AND NOT KICAD_BUILD_ARCH_ARM64 )
find_package( wxPython REQUIRED )
if( WXPYTHON_VERSION VERSION_LESS 4.0.0 )
message( FATAL_ERROR "wxPython Phoenix is required" )
if( WXPYTHON_VERSION VERSION_LESS 4.0.0 )
message( FATAL_ERROR "wxPython Phoenix is required" )
endif()
if( WXPYTHON_WXVERSION VERSION_LESS 3.2.0 )
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
endif()
endif()
endif()
# GTK3 is required on Linux
@@ -905,10 +971,6 @@ endif()
# Find wxWidgets library, required
#
# Turn on wxWidgets compatibility mode for some classes
add_definitions( -DWX_COMPATIBILITY )
# Check if '--toolkit=xxx' option has been passed
string( REGEX MATCH "--toolkit=([a-zA-Z0-9]+)"
WXWIDGETS_REQUESTED_TOOLKIT "${wxWidgets_CONFIG_OPTIONS}" )
@@ -927,7 +989,11 @@ else()
endif()
# Require the same wxWidgets version as is used by wxPython
set( wxWidgets_REQ_VERSION ${WXPYTHON_WXVERSION} )
if( KICAD_SCRIPTING_WXPYTHON )
set( wxWidgets_REQ_VERSION ${WXPYTHON_WXVERSION} )
else()
set( wxWidgets_REQ_VERSION 3.2.0 )
endif()
# See line 49 of cmake/FindwxWidgets.cmake
set( wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --static=no )
@@ -937,6 +1003,12 @@ find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
if( NOT MSVC )
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.2 )
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
endif()
endif()
if( MINGW )
# This needs to be on a separate line to protect against a broken FindWxWidgets.cmake in vcpkg
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.1 )
@@ -967,9 +1039,16 @@ endif()
if( KICAD_USE_SENTRY )
set( CRASHPAD_WER_ENABLED ON )
set( KICAD_SENTRY_DSN "" CACHE STRING "The sentry DSN used with sentry integration" )
if ( KICAD_SENTRY_DSN STREQUAL "")
message( FATAL_ERROR "Sentry DSN must be configured with KICAD_USE_SENTRY" )
endif()
if( WIN32 )
set( CRASHPAD_WER_ENABLED ON )
endif()
add_subdirectory( thirdparty/sentry-native )
add_definitions( -DKICAD_USE_SENTRY )
add_compile_definitions( KICAD_USE_SENTRY )
endif()
#================================================
@@ -983,17 +1062,6 @@ add_subdirectory( doxygen )
configure_file( ${PROJECT_SOURCE_DIR}/cmake/config.h.cmake
${CMAKE_BINARY_DIR}/config.h )
###
# Generate Map file
###
if( KICAD_MAKE_LINK_MAPS )
# Currently only works on linux/gcc
if( UNIX AND NOT APPLE )
set( MAKE_LINK_MAPS true )
else()
set( MAKE_LINK_MAPS false )
endif()
endif()
#================================================
# "make uninstall" rules
@@ -1013,6 +1081,7 @@ add_custom_target( uninstall
include( CTest )
enable_testing()
list( APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure" )
#================================================
# Let CMake look in these directories for nested

Some files were not shown because too many files have changed in this diff Show More