Commit Graph

173 Commits

Author SHA1 Message Date
Jon Evans 04bb3dfe9d 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


(cherry picked from commit 2459949d0d)
2023-08-01 21:26:01 +00:00
Seth Hillbrand 2451cbddec 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)

(cherry picked from commit 96a34e5b57)
2023-07-26 13:16:32 -07:00
Jeff Young 214f785c97 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).

(cherry picked from commit c71cf21e2f)
2023-06-06 11:19:41 +01:00
Jeff Young c6e4f18d99 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777

(cherry picked from commit 14f004d2a5)
2023-05-28 18:46:39 +01:00
jean-pierre charras 50ec496c54 Step exporter: export circular board outlines as cylinder
From master branch, commit 66651327.

(cherry picked from commit 5db9a6af9d)
2023-05-28 19:38:27 +02:00
Seth Hillbrand 84eacd13a1 Revert "Step exporter: export circular board outlines as cylinder"
This reverts commit 5db9a6af9d.
2023-05-24 08:54:16 -07:00
jean-pierre charras 5db9a6af9d Step exporter: export circular board outlines as cylinder
From master branch, commit 66651327.
2023-05-23 10:25:58 +02:00
Seth Hillbrand 3c33e2c046 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

(cherry picked from commit d7a6875b0b)
2023-05-11 16:27:15 -07:00
Jeff Young ad612864ce 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:10:23 +01:00
Jeff Young fbef9ea600 Keep track of single-pad-islands so we can discount spokes to them.
(cherry picked from commit d6dd58fff9)
2023-03-25 15:37:57 +00:00
Jeff Young 249bcd9e1a Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170

(cherry picked from commit a0adb59437)
2023-03-14 11:56:33 +00:00
Seth Hillbrand 9995b8714b 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

(cherry picked from commit 283770fc45)
2023-03-13 16:11:27 -07:00
Seth Hillbrand cc6b01cf88 Force initialization of board units
Unitialized variables are the devil's playground

(cherry picked from commit f0892598a4)
2023-03-13 12:15:51 -07:00
Jon Evans 9f7b31b5c5 Do not try to process invalid ratsnest nodes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254


(cherry picked from commit 8eaa3cfac9)
2023-03-11 21:12:33 +00:00
jean-pierre charras ea0dcc8ebd 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 17:26:28 +01:00
qu1ck 396bda5611 Sync pcbnew selection with selected items after plugin is run
(cherry picked from commit 9f10c142c4)
2023-02-26 17:58:57 +00:00
Jeff Young 94963b5b3a Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802

(cherry picked from commit 13391176ae)
2023-02-13 10:55:07 +00:00
Jon Evans 200bf696af Fix importing of legacy netclasses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13746
2023-02-02 08:29:43 -05:00
Seth Hillbrand e713a3eac2 Handle cleanup safely
Make sure that the connectivity has successfully completed before
attempting to merge segments.  Also avoids reaching into the shared_ptr
if we don't need to

Fixes https://gitlab.com/kicad/code/kicad/issues/13639
2023-01-23 15:56:46 -08:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +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 8238973bf4 Make sure std::unique_ptr gets initialized.
(Fixes unit test failure.)
2023-01-11 18:28:29 +00:00
Jeff Young c85dcbc4e1 Improve performance of IncrementTimestamp so it can be called at will. 2023-01-11 17:41:08 +00:00
Jeff Young 03f79f512c Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/12966
2022-11-30 14:02:22 +00:00
Jeff Young 32836da14b Don't show annular rings controls for vias that span only a single layer. 2022-11-24 18:05:37 +00:00
Jeff Young 97fd99ec99 Re-resolve netclasses after assigning netclass to pattern.
Fixes https://gitlab.com/kicad/code/kicad/issues/12965
2022-11-22 14:54:08 +00:00
Jeff Young 138f835672 Retire group bbox cache.
It's too hard to maintain when changes to other items (the groups
members) affect it.
2022-11-11 20:31:31 +00: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
Seth Hillbrand d1bf889e71 Resolve embedded text vars
Title Block text variables are embedded into the pcb file and should
be used for resolving when the project file is missing
2022-10-21 08:37:37 -07:00
Alex 22917860ef Move Enter Group for easier access. 2022-10-07 03:03:33 +03:00
Jeff Young e49de68a59 Implement a more durable zone bounding box caching strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/10821
2022-10-01 22:10:43 +01:00
Jeff Young d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Marek Roszko 707a598e5d Prevent a crash due to the 3d preview dummy board stealing setting ownership 2022-09-25 23:04:13 -04:00
Ian McInerney ea259fd093 Remove extra creation of an outline for the soldermask zone
The zone class initializes the outline with an empty SHAPE_POLY_SET, so
adding a new SHAPE_POLY_SET outline in the BOARD constructor causes a
leak of the original.
2022-09-25 15:41:39 +01:00
Jeff Young 839d31d427 Only update properties from a "real" project.
Fixes https://gitlab.com/kicad/code/kicad/issues/6268
2022-09-22 10:14:08 +01: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
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Seth Hillbrand 26a1114e3c Avoid Yields when the results are ready
We always need to check for calculation results before yielding the
system otherwise we will delay outcomes

Fixes https://gitlab.com/kicad/code/kicad/issues/12228
2022-09-14 13:30:04 -07:00
Roberto Fernandez Bautista 2d203bc975 Don't move items inside a group: move the whole group instead 2022-09-04 00:59:57 +02:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young 77c79b6f6a Apply searchArea architecture to courtyard functions. 2022-08-28 21:20:03 +01:00
Jeff Young 667a54ad86 Retire insideArea in favour of intersectsArea and enclosedByArea. 2022-08-28 18:02:41 +01:00
Jeff Young f99761e5bd entirelyInsideArea() prototype. 2022-08-26 13:22:57 +01:00
Marek Roszko 3e451ca516 Add RemoveAllListeners function for future addons 2022-08-22 23:29:04 -04:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Seth Hillbrand af34835fdf Restore removed data
Functions and definitions used in Python scripting should not be
removed.  Comments in header files should never be removed (only
updated/corrected)
2022-08-20 08:40:08 -07:00