7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-27 00:26:13 +00:00
Commit Graph

9914 Commits

Author SHA1 Message Date
Marek Roszko
d74caace0a Initial jobset creation and running within the CLI and GUI.
Incomplete, just pushing this before feature freeze, much fixing left
2024-09-30 20:04:53 -04:00
Jeff Young
6255586d5b Clean up some layout issues. 2024-09-30 20:13:27 +01:00
John Beard
460e575457 Use REFERENCE_IMAGE for SCH_BITMAP
Also wire in the transform origin handling to the point editor
and the properties panel in eeschema.
2024-09-30 10:20:20 +01:00
John Beard
3f131e2011 Abstract REFERENCE_IMAGE to a separate class
Break the non-PCB-specfic parts of PCB_REFERENCE_IMAGE out
to a common REFERENCE_IMAGE class, which is then composed into
the PCB_REFERENCE_IMAGE. This will make it easier to bring the
transform origin logic to eeschema without repetition.
2024-09-30 10:20:20 +01:00
jean-pierre charras
4a0f111fd6 Eeschema: add bitmap to tool Increment Annotations From... 2024-09-30 11:00:43 +02:00
i404788
330150a6a6 Add ERROR_LOC to exports 2024-09-29 12:14:03 +00:00
John Beard
164ff0b870 Pcbnew: catch some preview item oveflows at low zooms 2024-09-27 23:06:32 +01:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
jean-pierre charras
e2282a4af8 Minor cosmetic enhancement: add icon to Revert and Generate Legacy BOM tools 2024-09-27 13:34:20 +02:00
John Beard
7dfac8d1ab Bezier: Correct bounding box calculation
Beziers can extend outside the control point hull,
and can also be far inside the hull. Especially the latter
interferes with selection.

So use the approximated segments to determine.
2024-09-27 06:23:04 +01:00
John Beard
717847cc31 UNIT_BINDER: Fix typo affecting transformed points
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18788
2024-09-27 10:53:50 +01:00
Mike Williams
953bc2d4bd design blocks: implement properties window
Also adds support for default fields when placing design blocks as a
sheet.
2024-09-26 15:48:39 -04:00
jean-pierre charras
51d615d30d Minor cosmetic enhancement: add icon to "Create Outsets from Selection" tool 2024-09-26 20:13:43 +02:00
John Beard
0e788f97ca Bezier: add fill to properties panel 2024-09-25 22:20:58 +01:00
John Beard
b3248095e8 Pcbnew: add bezier editing tool
Adds the initial implementation of bezier overlay
(assistant) and geometry manager. This is only
implemented in Pcbnew - the code is common, but
eeschema doesn't currently use it for any shape.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 21:41:32 +01:00
John Beard
30e51f7d1a Pcbnew: Show some helper lines in point editor
Some shapes, like arcs and beziers have "lines" that
can be useful to see when editing, but aren't directly
editable and may not overlap the object's own lines.

So make it possible to, indepedently:

 - Turn off the centre-point drag handle affordance
 - Show the actual line segment on screen.
2024-09-26 10:17:23 +01:00
Mike Williams
53022ab347 mouse settings: add reverse zoom option
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18583
2024-09-23 17:09:44 +00:00
John Beard
95beedb612 Dogbones: add slots for acute angles
It's actually not as hard as I thought, though
surely has wierd edge cases which users might need to
handle manually.
2024-09-22 13:45:19 +01:00
JamesJCode
68196ad3f3 Don't add default netclass for missing PCB or schematic colors
We don't allow these to be set on the default netclass, so we
don't need to resolve it if they are missing in a custom netclass.
The renderer will use the colors specified in the application
color scheme.
2024-09-20 18:46:39 +01:00
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
John Beard
46e7228945 UNIT_BINDER: Handle binding of combo-box option lists
This is useful if you want to give some preset options
to a user (e.g. recently used value) but stil have them
controlled and presented using the UNIT_BINDER logic.
2024-09-19 06:35:43 +01:00
John Beard
653d85f9fc Abstract LIB_TABLE IO to allow non-file-based tables
Mostly intended right now for allowing testing of library tables
to help with testing chained loading, but it also decouples the
idea of a library table from on-disk files in general.

All current (real) lib table implementations continue to use the
file-based IO.

This could be made more general (not just for tables) if really
needed.
2024-09-19 06:35:43 +01:00
Jon Evans
8647da613f Fix typo'd comparison in 4e7fcb3b 2024-09-18 18:37:32 -04:00
Jon Evans
4e7fcb3b67 Temporary patches around LSET and negative layers
Probably this should be replaced with a less error-prone
approach.  Right now the LSET -> BASE_SET system is risky
because it is converting a signed enum (PCB_LAYER_ID) to
a size_t in all the underlying operations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18738
2024-09-18 18:36:17 -04:00
Mike Williams
87a66d4df1 grids: make settings panel correctly implement cancel
Before we edited the grid settings directly so cancel would keep your
changes.

Also includes numerous QoL improvements borrowed from Ian's patch,
and a few other small fixes.
2024-09-18 10:49:12 -04:00
JamesJCode
df869036e5 Enable 'exclude_from_sim' property for DB libraries 2024-09-17 18:20:33 +01:00
jean-pierre charras
3534546ef7 fix compil warnings 2024-09-17 09:37:23 +02:00
Julie Vairai
06eb7fa588 Added GenCad export within kicad-cli
Available options:

 "--flip-bottom-pads"
 "--unique-pins"
 "--unique-footprints"
 "--use-drill-origin"
 "--store-origin-coord"
2024-09-16 22:31:52 +00:00
Eric
1506beecbc Implement ODB++ export
ADDED: Add support in Pcbnew for exporting ODB++ files under Fabrication
       Outputs, base on ODB++Design Format Specification (Release v8.1
       Update 3 February 2021).

Note: There is still a lot of work to do if we will make the feature as
      complete as the ODB++ spec.  However, the current functionality's
      completeness is already sufficient to cover general production
      scenarios. I have compared the output results with Gerber files by
      DFM tool and the accuracy at the graphic level should be able to
      cover most usage scenarios.  Additionally, I am very grateful to
      the great open-source project Horizon EDA for giving me a lot of
      inspiration in terms of ideas.

The feature can be enabled by adding "EnableODB=1" to the kicad_advanced
configuration file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2019
2024-09-14 15:34:51 +00:00
Mike Williams
337211adea grids: allow editing existing grids
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16870
2024-09-12 15:19:34 -04:00
John Beard
f6a693475f BOX2: Add a KiROUND specialisation for BOX2D -> BOX2I 2024-09-11 22:35:35 +01:00
John Beard
f4eb173c43 BOX2: By-value GetInflated method
This allows better value-semantics and const correctness.

This is a common method, as the Inflate method is
in-place:

  BOX2I inflated = other;
  // 'Inflated' is not inflated yet
  inflated.Inflate( delta );
  // Now it is inflated, but it's not const

This is annoying, as the 'inflated' box cannot easily
be made const. Instead:

  const BOX2I inflated = other.GetInflated( delta );
2024-09-11 22:35:35 +01:00
John Beard
ebef24b6b0 Debug: graphical snap anchor debug mode
When working near snap anchors, which come and go
rapidly, it's often useful to see what snaps have been
calculated. Add an advanced config to show these
(EnableSnapAnchorsDebug) on an overlay layer.

With more polish this could be a hotkey or something.
2024-09-11 22:35:35 +01:00
John Beard
6bad4bb1a2 Put extension snaps behind an advanced config
This can be backed out when the snapping bevaviour is
considered good enough to be on by default.
2024-09-11 22:35:35 +01:00
John Beard
b2be0d39bd Snapping: Add construction geometry snapping
This is a pretty major rework of the snapping system.
The GRID_HELPERs now have a separate CONSTRUCTION_MANAGER
which handles some of the state involving "construction
geometry".

This is fed with 'extended' geometry (e.g. "infinite" lines from
segments) for use in generating things like intersection points.
It also handles adding this geoemtry to a GAL view item
(CONSTRUCTION_GEOM) for display to the user.

The process is:

* A TOOL creates a GRID_HELPER
* Optionally, it pre-loads a "persistent" batch of construction
  geometry (e.g. for an item's original position)
* The grid helper finds useful snap 'anchors' as before, including
  those involving the construction items.
* Other items on the board can be 'activated' by snapping to one
  of their main points. Then, if it has construction geometry,
  it will be added to the display. At most 2 items of this kind of
  geometry are shown, plus the original item, to reduce avoid
  too much clutter.

The dashed snap lines state machine is also handled in the
CONSTRUCTION_MANAGER and displayed in the CONSTRUCTION_GEOM item.
2024-09-11 22:35:35 +01:00
Mike Williams
5222b89ffd design blocks: don't attempt to get file access times on dir
Causes errors on Windows
2024-09-10 15:50:03 -04:00
Mike Williams
895c977dd3 design blocks: move all loading out the main kicad frame
This lets standalone eeschema at least use the global table if a project
is not loaded, similar to how symbols/footprints work.
2024-09-10 15:50:03 -04:00
Mike Williams
2eec2489ea design blocks: move globals behind accessor functions
Prepare for lazy loading
2024-09-10 15:50:03 -04:00
Mike Williams
b2dda11fae design blocks: move table manager to common dialogs
Also add to schematic editor preferences.
2024-09-10 15:50:03 -04:00
Mike Williams
0a5de3510d design blocks: use correct global library path in dialog 2024-09-10 15:50:03 -04:00
Jan Wichmann
59575c19d8 CHANGED: pcbnew - Enable grid override by default.
As is the case with eeschema. So that the feature is easier to use.
2024-09-09 23:37:33 +00:00
John Beard
9a3ebfba40 KIID: Use Boost uuids own hash function (fix Boost 1.86)
Not only is this simpler, but it should be compatible
with all Boost versions (the cast is a problem in 1.86)
and it was also 'improved' in 1.86 for better mixing.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18651
2024-09-08 22:42:30 +01:00
Marek Roszko
aceca713d8 Fix kicommon exports 2024-09-08 08:00:47 -04:00
Alex Shvartzkop
e0291133f2 Import POURED items as zone fills from EasyEDA/LCEDA Pro v2.2+ PCBs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18664

(cherry picked from commit 6b199c52a1)
2024-09-07 12:24:53 +03:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
Seth Hillbrand
be2a52dd2b Avoid GL ctx deadlock
Allow non-drawing routines to access error messages without dealocking
the load
2024-09-06 16:00:49 -07:00
Seth Hillbrand
5ba50c26a9 Update embedded files hash to use Murmur3
SHA256 is fine for one-offs but for large libraries where we might be
running the hash on hundreds of files, the speed difference is
appreciable.  We don't require crytographic hashing, just a check that
the original file hasn't been corrupted so Murmur3 satisfies our basic
requirement.
2024-09-06 09:57:23 -07:00
Seth Hillbrand
89849ccff1 Catch JSON errors when migrating
Any parsing of the json files can throw, so be sure we are catching the
errors and not crashing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18655
2024-09-06 09:31:05 -07:00
Jeff Young
ca5fb08f62 Ensure thread safety with EDA_PATTERN_MATCH_RELATIONAL. 2024-09-05 17:37:49 +01:00
Mike Williams
2c99bc6c6d new feature: Schematic Design Blocks
Added to advanced config, default to off.
EnableDesignBlocks=1 in kicad_advanced to test

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2263
2024-09-05 08:35:49 -04:00