Commit Graph

334 Commits

Author SHA1 Message Date
dsa-t cb41b53ab7 Use MurmurHash3_x64_128 (MMH3_HASH) for polygon checksum.
Improves performance when moving footprints.

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 21:19:43 +00:00
Jeff Young 90652a741d 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:08:15 +01:00
Jon Evans e16130a02c Move pad and via properties into PADSTACK 2024-05-14 20:57:56 -04:00
Jeff Young 6b797420d5 ADDED allow physical_clearance between courtyards & zone fills.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6966
2024-05-01 13:49:41 +01:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Seth Hillbrand a12bc3a410 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
2024-04-06 14:28:49 -07:00
Jon Evans 7b6afd290a Remove non-const access to board-owned items
(with a few things const-casted for now)
2024-03-26 18:36:23 -04:00
Jeff Young 50567764b5 Allow no-net teardrops on no-net pads with no-net tracks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17566
2024-03-24 19:22:25 +00:00
Seth Hillbrand 6e591f5f91 Don't count removed zone layers
This does 3 things:
1) Removes unused zone layers on load
2) Does not save unused zone layers
3) Removes unused zone layers from connectivity calculation

(1) Prevents existing boards from using unused zone layers for any
connectivity or rendering.  (2) Updates the contents of boards with
removed zone layers to prevent them from propagating.  (3) updates the
connectivity while running pcbnew and removing a zone layer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17288
2024-03-11 23:38:10 +00:00
Jeff Young d083593177 Table bug fixes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17399

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17398
2024-03-11 22:58:12 +00:00
Jeff Young d1d9636598 Run Edge.Cuts & Margin clearance tests on zone layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17292
2024-03-08 20:51:05 +00:00
Jon Evans ed18a9bcc2 Correctly handle footprint graphic knockouts for no-net case
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223
2024-03-02 15:39:07 -05:00
Jeff Young e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00: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
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
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
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
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03: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 d6b75c64e1 ADDED: custom-shaped pad spoke templates. 2023-09-13 23:34:25 +01:00
Marek Roszko 4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04: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
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
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
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
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 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
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Jon Evans 3783fc8f5a Remove unused line 2023-05-30 20:06:18 -04:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01: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 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 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 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
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 bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +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
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
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 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
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
Seth Hillbrand f4825cdd8f Allow same-net, same-priority zone filling
When two zones with the same net and same priority overlap, they should
both be filled, matching the behavior of v6.  If you would like an
explicit override of one or the other, you need to set the zone priority
higher.  Relying on the UUID as a tie breaker is good for zones with
different nets but creates unexpected changes from v6 when applying it
to zones of the same net
2023-02-10 11:07:08 -08: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
Alex c122fd0e36 Remove unused cache_optionally_flashed_connections. 2023-02-05 17:39:42 +00:00
Alex f6fd85af85 CHANGED: Try to determine via/pad flashing state before filling zones.
If removing unused via annular ring option is enabled on a layer, then the via will have the ring if both:
- Via center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone the via hole intersects with has the same net

Pads will be flashed if:
- Pad center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone at the pad center has the same net

Fixes https://gitlab.com/kicad/code/kicad/issues/12964
2023-02-05 17:39:42 +00:00
Seth Hillbrand b427ad80f6 Don't make unneeded copies of std::pairs 2023-02-03 15:28:53 +01:00
Seth Hillbrand e60152e351 Fix island removal when copper->edge clearance is 0
Just testing a single point to find copper that is outside the board works
until the arc->segment conversion moves the board outline just enough to
have the filled copper slightly (few IU) outside of the converted outline.

Instead, we do an expensive check of comparing the size of the
intersection between the island and the island's intersection with the
board.  If the intersection is at least half as large as the original
island, we can say with certainty that the island is inside.  The margin
could be much smaller than half but this preserves the intent without
picking an arbitrary number that might be violated

Fixes https://gitlab.com/kicad/code/kicad/issues/13717
2023-02-02 19:19:26 +00:00
Seth Hillbrand f34aa947d3 Allow on-outline zones to be considered inside
Also ensure that calculated areas for island removal are absolute.

The on-outline zone can happen when the clearance to the edge is
particularly small.

Fixes https://gitlab.com/kicad/code/kicad/issues/13717
2023-01-31 12:32:23 -08:00
Jon Evans 675b6b5d5c Fix logic error in ec4d377d
Also fixup goldens for importers for new default island mode
2023-01-27 10:16:56 -05:00