Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +01:00
Jeff Young
b80fd5329d
Clear dimension pointer after committing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11864
2022-07-22 09:31:09 +01:00
Mike Williams
3669cb4673
PCB Editor: Add User Background Images
2022-07-14 11:23:23 +00:00
Jeff Young
e122dc38bd
Add context menu item for clearing net highlighting.
...
In selection tools, drawing tools, router tool, line_wire_bus tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11920
2022-07-10 17:15:20 -06:00
Seth Hillbrand
0c47a09517
Ensure rectangles are normalized
...
Normalize on creation and fixup rectangles previously saved with
inverted coordinates
Fixes https://gitlab.com/kicad/code/kicad/issues/11965
2022-07-07 10:40:18 -07:00
Jeff Young
298edb09c3
Initialize TEXT_ATTRIBUTES justifications for text & textboxes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11805
2022-06-20 17:03:37 +01:00
Jeff Young
73836b50fc
Add proper collision test to via placer.
...
Also moves DISALLOW constraint processing outside the loop as it
performs it's own loop over any objects referenced by the rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/11832
2022-06-19 21:57:49 +01:00
Jeff Young
d40664d171
Handle double-click in dimension drawing tool.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11815
2022-06-15 18:07:50 +01:00
Jeff Young
d31bd4ea3e
Use default text properties for textboxes.
...
Also make sure text is mirrored when placed on back of board.
Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-03 18:48:09 +01:00
Jeff Young
155620cc9a
Move H/V/45 mode from zone properties to toolbar.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8587
2022-05-29 21:30:15 +01:00
Jeff Young
1fb7532859
Prepare for a more uniform implementation of H/V/45 mode.
2022-05-29 21:30:14 +01:00
Jeff Young
23fb4c7433
Uniformly use a single facility for location-less prime events.
...
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
Jeff Young
f2fc78f380
Don't copy modifiers to prime events.
...
The modifiers go with the hotkey, not with the action.
Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
Jeff Young
a49bb792bd
Insert chevrons when placing vias near tracks.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10898
2022-04-11 16:26:36 +01:00
Jeff Young
29eb5931c2
Be more careful with forced cursor positions.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9977
2022-04-10 23:14:57 +01:00
Jeff Young
4f62960334
Update message panel from PCB point editor and SCH drawing tools.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young
ec5b7a57ec
Consistency in via dimensions terminology.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11024
2022-03-03 22:40:18 +00:00
Jeff Young
d65f9ad2d8
Implement multi-layer stitching via logic.
2022-02-24 21:32:43 +00:00
Jeff Young
369f53bb19
Better DRC checking when placing vias.
2022-02-24 21:32:43 +00:00
Jeff Young
41f6e634c6
Partially integrate grid snapping with constraints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Jeff Young
50a4d610a6
Be cognizant of flashed layers when generating pad shapes.
2022-02-11 13:10:52 +00:00
Seth Hillbrand
162545ddf0
Validate arc output when editing
...
Handles checking output of the arc to ensure we don't end up generating
an invalid arc. Also keeps the limit of the arc angle to be (360,360)
excluding 0.
Fixes https://gitlab.com/kicad/code/kicad/issues/10070
(cherry picked from commit 8fc831cbc2
)
2022-02-07 08:55:53 -08:00
Jeff Young
34a9a165c9
More wide-string declarations.
2022-02-05 22:26:31 +00:00
Jeff Young
5739505aa3
TextBoxes for PCBNew.
2022-01-31 20:00:47 +00:00
Jeff Young
e84c574830
Some more EDA_ANGLE cleanup.
2022-01-16 19:16:18 +00:00
Jeff Young
89c0f8e297
Move to new font engine.
2022-01-02 14:57:03 +00:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05:00
Jeff Young
3a8ffd40b8
Fix dimension drawing bug.
2021-12-26 17:30:21 +00:00
Jeff Young
fa908e1f98
Dimensions for footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young
ed79f6e511
Clean up some TODOs.
2021-12-24 21:10:28 +00:00
Jeff Young
3f90b3e2a0
Keep line stroke params as long as layer doesn't change.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6210
2021-12-24 16:13:51 +00:00
Jeff Young
d28714167c
All the preferences, all the time.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7877
Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jeff Young
2bc86fa0a8
Shapes for schematic.
...
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young
4b6bf3095a
Radial dimensions.
...
ADDED radial type dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
dsa-t
a7193e0932
Do not warp cursor to last location when footprint/text placement is activated from toolbar/menu.
...
Also makes the footprint appear instantly after closing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9840
2021-12-07 22:48:56 +00:00
Jonathan Haas
04b0435c45
Snap to pads when placing via
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9873
2021-12-06 15:54:49 +00:00
Wayne Stambaugh
53f5d616aa
Coverity issue fixes.
2021-11-13 11:38:31 -05:00
Seth Hillbrand
8a3bc3fe4d
Don't translate empty strings
...
The _( "" ) msgid is reserved in gettext, so we need to avoid it in code
2021-10-25 06:24:06 -07:00
Jeff Young
c9d858eaf5
Add status bar message for constraint mode.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9282
2021-10-24 14:04:12 +01:00
Jeff Young
f9861b4a6c
Finish arc rework and push out to file formats.
2021-10-15 12:45:43 +01:00
Jeff Young
9b9e379aa0
Overhaul arc internal model to not over-specify information.
2021-10-15 12:45:43 +01:00
Jeff Young
8b08c9e53f
Shorter names before things get out of hand.
...
Also, remove comments indicating CURVE is a Bezier. Just call it a
BEZIER.
2021-10-15 12:45:43 +01:00
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
2021-10-15 12:45:43 +01:00
jean-pierre charras
da79a3dd69
Option graphics limited to 45deg in creation: separate options for brd and fp editors.
...
Add these options in PANEL_EDIT_OPTIONS.
This option was previously living only in some context menus, not really visible.
2021-10-02 16:43:31 +02:00
Marek Roszko
847c9e32c8
Don't allow the draw via tool to activate in the footprint editor
...
Fix #9186
2021-09-17 23:01:16 -04:00
Jeff Young
fdfecf5932
Don't push view control settings to the previous active tool.
...
See further comments in bug report.
Fixes https://gitlab.com/kicad/code/kicad/issues/9147
2021-09-13 13:28:05 +01:00
Seth Hillbrand
092cdc0bb5
Move 45° limit to hotkey
...
This assigns the "Tab" key to a general pcbnew 45° limitation. Limit
can be enabled/disabled using context menu as well.
Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.
Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
2021-09-05 13:42:51 -07:00
Seth Hillbrand
e03257b55f
Allow close placement of stitching vias
...
When placing a stitching via for a bypass capacitor, it is common to
place it close to the relevant pad. If the via does not have the
correct net, this will violate DRC and be prevented.
Checking for zone-based net assignments allows the workflow to proceed
2021-09-01 15:52:35 -07:00
Jeff Young
c51b1dad72
Generalize infobar MESSAGE_TYPE handling and use for DRC errors.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8782
2021-08-01 21:51:39 +01:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
dd5676f4bc
Implement a safer (RAII) tool re-entrancy guard.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8873
2021-07-27 16:37:34 +01:00
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
2021-07-21 20:58:59 +01:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00
jean-pierre charras
9a865b1989
Fix a typo and a minor compil warning
2021-06-28 14:37:35 +02:00
Jeff Young
7efca0113d
Reset m_inDrawingTool on exit.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8653
2021-06-22 13:02:45 +01:00
Jeff Young
b72545a432
Implement more aggressive re-entrancy blocking for drawing tools.
...
A similar strategy was already implemented in Eeschema.
Also adds some safety around clearing of autopan and mouse capture.
Fixes https://gitlab.com/kicad/code/kicad/issues/6909
2021-06-20 11:09:55 +01:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
Jeff Young
16b0147af8
Prefix DIMENSION types.
2021-06-11 17:59:44 +01:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
2021-06-06 15:03:42 -04:00
Ian McInerney
23f8851409
Remove pcb_group include from board header
2021-06-03 20:03:31 +01:00
Seth Hillbrand
ba73456d49
Allow point editor to persist
...
After drawing a graphic, allow the control points to persist when
exiting the tool.
The effect of this is to make the first "Esc" press a
"return-to-select-tool" event without modifying the selection or control
points from within the drawing tools. The section "Esc" press, when in
the selection tool will clear the selection and the control points
2021-05-25 16:47:54 -07:00
Jeff Young
0d8a9a1091
Make sure that a tool never exits with autopan or capture.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8459
2021-05-21 14:53:58 +01:00
Jeff Young
7356f9568d
Move grid disable modifier from ALT to CTRL.
...
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.
Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
Marek Roszko
21fde9b629
enum class PCB_SHAPE_TYPE_T
2021-04-30 22:36:12 -04:00
Jeff Young
dc0cf3b802
Clean up a confusing API.
...
AllowDRCViolations is kept in any mode as a *setting*, but only
controls router behaviour when the mode is mark obstacles.
Fixes https://gitlab.com/kicad/code/kicad/issues/7795
2021-04-10 11:08:02 +01:00
Jeff Young
3fd3be9843
Layer fixes for PCBNew drawing tools.
...
1) Implement layer changes for dimension drawing tool
2) Ensure drawing layer is visible for (1) and for the text drawing
tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-07 15:02:48 +01:00
Jeff Young
e50b450092
Formatting and organisation.
2021-04-07 14:50:29 +01:00
Jeff Young
ec45855aed
Make sure drawing layer is visible.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8106
2021-04-06 00:06:23 +01:00
jean-pierre charras
d3bf20e80b
Pcbnew, place free via: take netcode from the pad, if the via is inside a pad.
...
Fixes #8089
https://gitlab.com/kicad/code/kicad/issues/8089
2021-04-02 17:19:44 +02:00
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
2021-03-20 12:09:18 -04:00
jean-pierre charras
3ba7fc0cc2
Move board stackup table drawing code from drawing_tool.cpp to drawing_stackup_table_tool.cpp
...
This avoid a too large drawing_tool.cpp file.
Remove also values in internal units and convert them to mm.
2021-03-14 17:44:16 +01:00
Fabien Corona
f428ce03f2
ADDED: pcbnew - stackup / characteristics table
2021-03-13 20:19:46 +00:00
Jeff Young
93db7a130a
Offset 3D models when moving footprint origin.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7868
2021-03-12 17:37:38 +00:00
Jon Evans
18037e2f65
Rework bitmap system to load from archived PNGs
...
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jonathan Haas
274d4e2eb4
Fix orientation of orthogonal dimensions
...
When drawing and editing orthogonal dimensions, take distance and
relative position to the end points into account.
Fixes https://gitlab.com/kicad/code/kicad/issues/7243
Fixes https://gitlab.com/kicad/code/kicad/issues/7189
2021-03-08 00:13:38 +00:00
Jon Evans
1fc399fa31
Fix a few more cases of picking up wrong mouse positions
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7745
2021-03-03 20:09:24 -05:00
Marek Roszko
b82fcbcad6
More exception var disuse warnings
2021-02-26 19:30:58 -05:00
Seth Hillbrand
0bab025832
Fixup toolchaining for immediate mode
...
The move tool can stack on others, so when we re-enter the previous tool
this caused another immediate action. We flag re-entry in the tool
stack to check for this and avoid unexpected tool starts
2021-02-24 10:44:54 -08:00
Seth Hillbrand
0518d9c546
Add more force-immediate tools
2021-02-23 17:05:03 -08:00
Jeff Young
34c2028e7b
Assign via net before running DRC checks.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7579
2021-02-17 19:39:56 +00:00
Jeff Young
d66de5bb35
Exclude footprints and groups from VIA_PLACER DRC testing.
...
(Their children need to get tested, but not the parent objects
themselves.)
Fixes https://gitlab.com/kicad/code/kicad/issues/7569
2021-02-17 14:08:53 +00:00
Jeff Young
b7672d3c92
Respece router Allow DRC Violations in free via placer.
...
Also don't check for collision on non-copper layers, but do check
for hole clearance violations.
Fixes https://gitlab.com/kicad/code/kicad/issues/7532
2021-02-14 22:32:12 +00:00
Jeff Young
e2f8b1a4b1
Interpreting wxDialog::ShowModal()'s retval as bool is never what you want.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7454
2021-02-08 17:40:57 +00:00
Mikolaj Wielgus
5aaedd86ed
Add "Limit graphic lines to 45 deg" to line drawing tool context menu
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7181
2021-02-08 16:20:38 +00:00
Jeff Young
6272b48481
Make sure layer gets passed in to rules evaluation.
2021-02-08 14:53:49 +00:00
Jeff Young
8571687f51
Upgrade place via tool to new DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7358
2021-02-01 23:00:13 +00:00
Seth Hillbrand
386ead30c5
All circle and arc tools to select all at first
...
Non-layer elements can be logical centers for the circle and arc tools.
We allow the non-layer to snap for the center points and revert to only
on-layer elements after
Fixes https://gitlab.com/kicad/code/kicad/issues/7327
2021-01-29 10:14:44 -08:00
Jeff Young
35978adef9
Don't run dimension updates while parsing files.
...
They mess up the geometry when only partial values are provided.
Fixes https://gitlab.com/kicad/code/kicad/issues/7177
2021-01-19 16:09:44 +00:00
Jeff Young
68efdb2fff
Push shared parts of GRID_HELPERs into common.
2021-01-16 23:18:10 +00:00
Roberto Fernandez Bautista
00918c68f5
Don't do clever snapping logic when drawing a circle
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7131
2021-01-16 08:39:20 +00:00
Jon Evans
70c397a9b4
Implement free vias fully
...
CHANGED: manually-placed (stitching) vias won't have their nets automatically updated
(unless the via is placed directly on a track segment)
CHANGED: stitching vias can be placed on footprint pads and pick up their nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5484
2020-12-20 16:29:50 -05:00
Jeff Young
acfbcb4beb
Make distinction between PCBNew-wide tools and Board-specific tools.
...
The old names were really hard to keep straight (even for me, who named
many of them).
2020-12-16 13:32:46 +00:00
Jeff Young
22a6b36257
Don't allow dbl-click to leak through to other tools.
...
This only applies if the tool doesn't handle properties (which also
handles double-click events).
Fixes https://gitlab.com/kicad/code/kicad/issues/6735
2020-12-14 22:15:43 +00:00
Jeff Young
60ecd4698c
Nets don't have properites; netclasses do.
2020-12-08 13:05:39 +00:00
Jeff Young
e882753ebf
Grid snapping fixes.
...
1) Uniformly honour the GAL grid snap settings
2) Make more uniform use of GRID_HELPERs
3) Smarten EDIT_LINE for mid-point snapping
Fixes https://gitlab.com/kicad/code/kicad/issues/6558
2020-12-03 19:55:58 +00:00
Jeff Young
3c521942ed
Smarten isEmpty checks to include nothing-but-whitespace.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6567
2020-12-01 16:39:06 +00:00
Jeff Young
0293f880ec
Fix a bunch of group issues with importing graphics.
...
Groups do not own their children; they only reference them. That
being said, they do own *selection* and *moving* of their children.
This might address some of 6493, but in any case will be a
pre-requisite for fixing it.
Fixes https://gitlab.com/kicad/code/kicad/issues/6493
2020-11-27 22:03:14 +00:00
Ian McInerney
d50d728d19
Cleanup compiler warnings
2020-11-25 00:08:09 +00:00
Jeff Young
9c7c05c161
Mostly formatting cleanup but a few type-casting cleanups too.
2020-11-24 22:16:41 +00:00