Commit Graph

15110 Commits

Author SHA1 Message Date
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 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
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
Roberto Fernandez Bautista dfebe516c5 CADSTAR PCB: Fix memory leak 2023-05-28 23:56:43 +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 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 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +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
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
Jeff Young 50da4e483e Tailor inspector text properties for dimension objects. 2023-05-25 16:18:37 +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
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
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
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 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 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 502da2d03c Performance improvements. 2023-05-21 11:23:56 +01: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
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
jean-pierre charras 86c75cf261 Fix a compil issue. 2023-05-19 09:24:49 +02:00
Marek Roszko 3bf2fb2c0e Fix more C5266 warnings 2023-05-18 22:08:50 -04: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
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
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
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 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