Commit Graph

13034 Commits

Author SHA1 Message Date
Jeff Young b9eb3e9b05 Be more explicit about string conversions. 2022-02-03 23:07:41 +00:00
Seth Hillbrand 6905cfb95b Update error message to match new arc dialog
We now provide arc end points and interior angle, so we cannot check for
null radius in the same fashion.  Instead, the starpoint==endpoint
indicates a zero radius

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

(cherry picked from commit ef94f31204)
2022-02-03 14:32:23 -08:00
Seth Hillbrand 168ad58eef Convert strings to wide when using wxString routines
WxString does not allocate space for wide strings needed during
conversion unless the string is explicitly wide.  This can cause buffer
over/underflow

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

(cherry picked from commit 7601a3385f)
2022-02-03 13:08:33 -08:00
Seth Hillbrand 92dc06ac9d Don't convert KIID on the fly
Converting to string on save prevent unneeded ops

(cherry picked from commit 901685f01b)
2022-02-03 10:35:31 -08:00
jean-pierre charras a970acd0bc Fix some issues related to new textboxes and python:
- Fix duplicate class names returned by GetClass().
- replace MTEXT name (in GetClass) by better name (FP_TEXT, FP_TEXTBOX...)
- Add missing Cast_to_PCB_TEXTBOX and Cast_to_FP_TEXTBOX
2022-02-03 13:55:37 +01:00
Seth Hillbrand a2f845a41c Handle invalid pads more gracefully
Pads generated outside of KiCad may have self-intersecting polygons that
simplify to multiple sets.  We handle this by adding multiple primitives
for such polygons and limiting our fracture calls to only polygons that
have holes

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

(cherry picked from commit 6d84acfacd)
2022-02-02 13:40:07 -08:00
Jeff Young c8d14ade65 Only run starved-thermals checks when pad is actually connected to zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/10583
2022-02-02 13:09:27 +00:00
jean-pierre charras 27c25debea teardrops: fix a not very good shape for not round targets after code change. 2022-02-02 13:31:29 +01:00
Steffen Mauch 61b2b0ff0c EAGLE plugin: use specified RATIO value for text size calculation 2022-02-01 17:58:09 +00:00
jean-pierre charras e560e765e6 PCB_TEXT::Rotate(): ensure the final orientation is -180 ... +180 deg 2022-02-01 18:07:14 +01:00
Jeff Young bebfbce9b2 Move pcb file rep of text_boxes to strokes. 2022-02-01 16:29:59 +00:00
Jeff Young 0faf3a8bf5 Get rid of FP_TEXTBOX::ViewBBox(). We want to inherit FP_SHAPE's. 2022-02-01 12:49:28 +00:00
Jeff Young 63a3b1e20a Estimate outline font thickness for DRC readability checks. 2022-02-01 12:01:04 +00:00
Jeff Young 1f8c29c395 Coverity fixup. 2022-02-01 12:01:04 +00:00
Seth Hillbrand 56d204c4c9 Revise transferDataToPad to return False on failure
When the data doesn't allow the pad to be drawn, we return false and
skip the redraw/update steps.  This allows updating with invalid values
while typing

Fixes https://gitlab.com/kicad/code/kicad/issues/10684
2022-01-31 17:02:10 -08:00
Seth Hillbrand 803675195d Be more diligent in preventing drag line errors
They can happen even when there are no collisions, so we need to reset
the 'ok' flag before using the line again.

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

(cherry picked from commit 833ce19221)
2022-01-31 16:13:53 -08:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young f3cd36d1d7 Bring EEschema textboxes in line with PCBNew's.
Also adds Border checkboxes and fixes a bunch of bugs.
2022-01-31 21:46:40 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
jean-pierre charras c494274b2e export D356 netlist: fix incorrect id for pads type connectors.
these pads are similar to SMD pads and should have the same id.
Fixes #10694
https://gitlab.com/kicad/code/kicad/issues/10694
2022-01-31 19:53:02 +01:00
Jonathan Haas 7b01530eca EDA_ANGLE: use existing Normalize180 function here 2022-01-31 18:16:49 +00:00
jean-pierre charras f846f6f704 PCB_CONTROL::unfilledZoneCheck(): skip rule areas: they are not filled by definition.
Fixes #10691
https://gitlab.com/kicad/code/kicad/issues/10691
2022-01-31 17:01:52 +01:00
markus-bonk a8486c5296 Fix warning: declaration shadows a previous local [-Wshadow]. 2022-01-31 10:41:51 +00:00
Alex e9ffea83fd Cross-probing: Do not center/zoom on empty BBox 2022-01-31 10:17:59 +03:00
jean-pierre charras 419010ec46 teardrop: add filtering to skip teardrops when pad/vias and tracks have similar sizes 2022-01-30 15:39:28 +01:00
jean-pierre charras 3a66f33d96 TEARDROP_MANAGER: add option to add teardrops on pads in zones. 2022-01-30 15:39:27 +01:00
jean-pierre charras cc2a897e2b very minor fix 2022-01-30 09:08:21 +01:00
jean-pierre charras aef665b1e2 PCB_TARGET: add missing TransformShapeWithClearanceToPolygon() method.
Fixes #10653
https://gitlab.com/kicad/code/kicad/issues/10653
2022-01-29 18:19:22 +01:00
Seth Hillbrand ad84b62b63 Prevent multiple single-point line solutions
Suggested by @rivimey, we test the case where both lines return singular
point lines and prevent them leaking into our drag solution

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

(cherry picked from commit 38a4894d92)
2022-01-29 07:07:29 -08:00
jean-pierre charras 43f5a7c746 DIALOG_PLOT: use a short living quasimodal dialog instead of a long living window.
In this case, a quasimodal dialog is the right way.
Fixes #10650
https://gitlab.com/kicad/code/kicad/issues/10650
2022-01-29 13:14:22 +01:00
Seth Hillbrand c01e2dcfec Fix large memory leak in DRC
All elements get effective shapes, many of which get triangulated.  This
memory needs to be freed when destroying the tree

(cherry picked from commit c2707f3cc0)
2022-01-28 17:08:33 -08:00
Seth Hillbrand 16e802aff4 Don't count zero-length as duplicate
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points.  A null track always matched this case,
which removed the valid track.  We solve this by avoiding null tracks in
the duplicate checker.  They are removed separately in the null track
stage.

This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing

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

(cherry picked from commit 8753051db6)
2022-01-28 16:34:34 -08:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
Seth Hillbrand 7277fd6218 Don't allow degenerate lines in dragger
If walkaround returns an invalid line, don't consider it for a track

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

(cherry picked from commit 8ae304dcca)
2022-01-28 15:19:06 -08:00
Jeff Young 0036f44e37 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
2022-01-28 21:38:15 +00:00
jean-pierre charras 5b8eb8f9ec SVG plotter rework: use mm as units in file. Remove useless inch option.
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
2022-01-28 19:33:51 +01:00
jean-pierre charras 901a9387e9 Fix python fp wizards according to last kicad code changes, especially EDA_ANGLE 2022-01-28 19:33:51 +01:00
Seth Hillbrand d32a72ddde Fix PCAD arc import 2022-01-28 10:20:18 -08:00
markus-bonk 09886bac38 Fix missing pcbcommon dependency declaration.
The pcbnew_navlib library didn't have a proper dependency chain. It
relies on headers that come from pcbcommon.
2022-01-28 12:21:42 +00:00
markus-bonk 233b537170 Fix code style. 2022-01-28 12:21:42 +00:00
markus-bonk 8663a399ac Move pcbnew_navlib compilation into pcbcommon.
Although pcb_base_frame.cpp is in the pcbnew source tree, it is compiled
and included in pcbcommon.lib. Because pcb_base_frame has a dependency
on pcbnew_navlib, the latter also needs to be included in pcbcommon to
avoid linkage issues.

The superfluous references to pcbnew_navlib in the qa projects have been
removed.
2022-01-28 12:21:42 +00:00
markus-bonk b263e89dfe Enable 3D mouse support in Footprint viewer.
The 3D mouse support is  moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
This allows all PCB_BASE_FRAME derived windows to have 3D mouse enabled
2D navigation support.
2022-01-28 12:21:42 +00:00
markus-bonk 8e43409d27 Invoke correct base method in PCB_BASE_EDIT_FRAME::handleActivateEvent.
The base class of PCB_BASE_EDIT_FRAME is PCB_BASE_FRAME. Invoking
EDA_DRAW_FRAME::handleActivateEvent in the PCB_BASE_EDIT_FRAME override
will skip the definition in PCB_BASE_FRAME.
2022-01-28 12:21:42 +00:00
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk 91d261d735 Fix "Error loading editor" when no 3Dconnexion driver installed. 2022-01-28 12:21:42 +00:00
markus-bonk 87d7bdbd5e * PCB_EDIT_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
jean-pierre charras 2345e09a12 Pcbnew, export svg: Fix incorrect saving of layer set. 2022-01-27 13:03:00 +01:00
Thomas Pointhuber 744bc0bd18 altium: Fix pcb arc import using a hack with PCB_SHAPE as intermediate object
It would be nice to not use the workaround with PCB_SHAPE, but better than creating wrong geometries in the first place. This should be improved when I'm more in the mood to think about geometric.
2022-01-25 22:24:01 +01:00
Thomas Pointhuber 5a2f351f28 altium: Refactor shape based region parsing to make it reusable for footprint import 2022-01-25 21:54:25 +01:00