Commit Graph

154 Commits

Author SHA1 Message Date
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03: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
Jeff Young d6b75c64e1 ADDED: custom-shaped pad spoke templates. 2023-09-13 23:34:25 +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
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 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
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
Jeff Young ec980e8696 Move "parent" property from PAD to BOARD_ITEM. 2023-08-18 22:20:09 +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
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
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
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
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
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
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
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 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
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
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
Jeff Young d9b0577ddd Fix pad flipping. 2023-04-03 14:32:23 +01: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 28028c941e Retire Local/Draw coords distinction from PAD (the last object to have it). 2023-04-02 18:02:41 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Seth Hillbrand da61d31f44 Remove superfluous Simplify() call 2023-02-22 16:24:26 -08: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
Marek Roszko f409837d26 Fix a stray ternary hidden under #if 2023-02-12 16:46:34 -05:00
Jon Evans 0b3928d38f Properties: add some validators for PAD 2023-02-11 15:50:51 -05:00
Alex b71fa91bc4 Don't write outside of overrides array on pad zone_layer_connections.
Use std::array to catch future errors in Debug.

Fixes https://gitlab.com/kicad/code/kicad/issues/13803
2023-02-08 01:32:52 +03:00
Jeff Young f2f54fe926 Improve zone-layer-connections terminology and comments.
This makes it clearer that the overrides are not inverses of each
other -- one overrides the flashing state and the other overrides
the connection state (to other zones, not to everything).

Also fixes a bug where we were failing to check the force-no-connect
for pads.
2023-02-05 17:39:42 +00:00
Jeff Young 00e2bbac5a Special-case net-ties for solder mask bridging.
Fixes https://gitlab.com/kicad/code/kicad/issues/13646
2023-01-24 11:33:08 +00:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Jeff Young e509fa0fc9 Don't depend on a pad being connected to a non-zone when filling zones.
If the pad hasn't already been owned by another zone, and the zone we're
currently filling can connect to it, then we want to try to flash it even
if it's not connected to anything else.

Fixes https://gitlab.com/kicad/code/kicad/issues/13415
2023-01-07 19:34:32 +00:00
Jon Evans 5eb3f5d3e7 Use correct translation macro for group names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13277
2022-12-26 20:11:20 -05:00
Jeff Young 5dce8323e8 KIGFX::REPAINT is not enough if the item isn't in the view.
Fixes https://gitlab.com/kicad/code/kicad/issues/11656

Fixes https://gitlab.com/kicad/code/kicad/issues/13217
2022-12-24 17:18:22 +00:00
Jon Evans 67df342255 Properties: mask irrelevant NPTH properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13087
2022-12-08 18:00:44 -05:00
Jon Evans 73b3f28c25 Properties: mask layer property for items that can't set it 2022-12-01 22:22:29 -05:00
Jon Evans 81ab8a0499 Properties: Move orientation to basic 2022-11-29 18:56:15 -05:00
Jeff Young eb19e32b40 Performance optimization for pad drawing.
Fixes https://gitlab.com/kicad/code/kicad/issues/12999
2022-11-28 13:20:12 +00:00
Jon Evans b2b3f5752f Properties: Add grouping and sorting by creation order 2022-11-27 22:40:23 -05:00
Jon Evans 74a2e4cad9 Properties: Add support for zone connection style 2022-11-25 18:44:02 -05:00
Jon Evans 308576b78d Properties: Use parent footprint references instead of UUIDs
Also remove redundant Net Name property (Net is used)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12334
2022-11-24 22:40:45 -05:00
Jeff Young 03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young 585fac19c6 Copy connected-only and keep-top-bottom properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/12691
2022-10-21 00:05:11 +01:00
Jeff Young 437d2c4589 Overhaul of remove-unconnected's zone filling and drawing strategies.
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state.  Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.

2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.

3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.

4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).

Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-10-18 13:05:42 +01:00
Alex 58b03b0a1c Small optimizations. 2022-09-22 17:22:04 +00:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00