Jeff Young
4fefd95e0c
Move grid definitions to Prefs and grid origin to a separate dlg.
Grid origin is document-wide, while grid definitions are app-wide.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2 years ago
Mike Williams
d9c2e0ab54
PCB: start of grid overrides
Only works for moves.
2 years ago
Mike Williams
0f781f328e
GRID_HELPER: push code to parent class
Prep'ing for PCB grid overrides
2 years ago
Mike Williams
a44dd4d88f
Symbol Editor: support grid overrides
2 years ago
Mike Williams
4e763cd9f2
Schematic: ortho line drag bend lines should respect grid overrides
2 years ago
Mike Williams
8b79ab708a
Grid Anchors: don't anchor from graphic lines when moving connectables
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13672
2 years ago
Mike Williams
1e66129218
Schematic: Align Elements to Grid needs to respect grid overrides
2 years ago
Mike Williams
132a0ada73
Grid Overrides: support grids-per-type that override the current grid.
Schematic only at this point while we test and refine.
PCB support is a future addition.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14756
2 years ago
Jeff Young
493828cc6b
Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2 years ago
Marek Roszko
e6ed275c25
Repoint IU_PER_MILS
3 years ago
Seth Hillbrand
225b03d702
Move sheetpins by their connection point
Need to calculate the sheet pin anchor position in order to get it
aligned to the grid while moving
Fixes https://gitlab.com/kicad/code/kicad/issues/12134
3 years ago
Jeff Young
c6a8100d46
Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
4 years ago
Jeff Young
3409783d9f
Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
4 years ago
Marek Roszko
c91d3e3cf9
Remove some more wxPoint
4 years ago
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
4 years ago
Jeff Young
889970a449
SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
4 years ago
Jon Evans
ae24daa033
Do not include text when computing drag origin for a group
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9630
4 years ago
Roberto Fernandez Bautista
d1bab3116d
eeschema: Warp to origin when moving - add missing text items
Schematic fields and text items were not being warped to origin when
moving.
4 years ago
Wayne Stambaugh
cb72da294a
More NULL expunging.
4 years ago
Wayne Stambaugh
fbc135e69f
Rename SCH_COMPONENT to SCH_SYMBOL.
5 years ago
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
5 years ago
Mikolaj Wielgus
1dc0ef01b3
Fix automatic wire tool in gridless mode
The automatic wire tool was not working in the gridless mode because the
grid snapping on/off logic present in `EE_GRID_HELPER`, based on the
value of `m_enableGrid`, was not taking into account that another check,
but for the global KiCad setting, would be performed in the `Align()`
method, which is inherited from `GRID_HELPER`.
I've modified all tests of `m_enableGrid` value to also take the global
setting into account, and moved checks for it to `Align()` method, as
it's more consistent this way.
I've also removed an override of the `Align()` method in the
`PCB_GRID_HELPER` class, as it was made redundant by my changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/7402
5 years ago
Seth Hillbrand
238aa2b5b0
Snap to eeschema lines
Allows easier snapping to lines when drawing in eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/7378
5 years ago
Jeff Young
68efdb2fff
Push shared parts of GRID_HELPERs into common.
5 years ago
Ian McInerney
fc20eaa083
Fix some compiler and Coverity warnings
5 years ago
Wayne Stambaugh
dd4298bb94
Coverity fixes: 280374, 313611, 313648, 313649, and 314720.
5 years ago
Jeff Young
4f90c03c7d
Allow snapItem to be re-activated.
Don't clear until another snapPoint is chosen. This allows line
snapping to re-appear when they move back in range.
Fixes https://gitlab.com/kicad/code/kicad/issues/5973
5 years ago
Jeff Young
a3406e7514
Make snapping more predictable.
In particular, allow grid positions to override line snapping if
they're a better match (and do this independently on x and y axes).
We already allow a nearer anchor to override, but that should be
based on a cartesian distance rather than independent axes.
Fixes https://gitlab.com/kicad/code/kicad/issues/6626
5 years ago
Jeff Young
a19028a396
Hook up EE_GRID_HELPER to some more tools.
Also implements EE_GRID_HELPER layers so that connectable things
snap to connectable things and graphics snap to graphics.
Fixes https://gitlab.com/kicad/code/kicad/issues/5641
5 years ago
Jeff Young
43fe228367
Hook up a bit more of the EE_GRID_HELPER.
Fixes https://gitlab.com/kicad/code/kicad/issues/5985
5 years ago
Werni
0e44f5128c
Add const specifiers
5 years ago
Seth Hillbrand
471f81742f
ADDED: Align to Grid function in Eeschema
Adds tool option to align selected elements to the current grid.
Fixes https://gitlab.com/kicad/code/kicad/issues/5481
5 years ago
Seth Hillbrand
67a7aa8ba4
Make snapping size grid-dependent
Fixes https://gitlab.com/kicad/code/kicad/issues/5638
Fixes https://gitlab.com/kicad/code/kicad/issues/5588
5 years ago
Seth Hillbrand
1703657fb5
Decrease default snap range
The snap range needs tuning to preference and monitor resolution. This
shifts the default range down for users until the customization bits are
implemented.
5 years ago
Seth Hillbrand
d14c6ba71f
Keep snap line alignment before new snaps
Also fixes the alignment line that was supposed to be dashed and not
solid.
5 years ago
Seth Hillbrand
f493e270ea
ADDED: Menu option to enable/disable snap to grid
You can now enable and disable snap to grid when drawing/editing across
all apps. You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
5 years ago
Seth Hillbrand
173b4ff588
Add snapping to eeschema
This generalizes both the SetPosition() function and ORIGIN_VIEWITEM
class away from the pcbnew-centric.
5 years ago