Commit Graph

314 Commits

Author SHA1 Message Date
jean-pierre charras b4826ce304 LIB_TEXT: fix incorrect position of the drawn text.
Fixes #10654
https://gitlab.com/kicad/code/kicad/issues/10654
2022-01-30 09:11:16 +01:00
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
2022-01-28 21:38:15 +00:00
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.
2022-01-28 21:38:15 +00:00
Jeff Young 0283e2c246 Highlighting for schematic shapes when fill shapes is turned off.
Fixes https://gitlab.com/kicad/code/kicad/issues/10372
2022-01-22 22:27:41 +00:00
Jeff Young 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
jean-pierre charras a709d97a32 SCH_LABEL_BASE::Plot(): Plot fields. 2022-01-12 11:08:34 +01:00
jean-pierre charras b3072cc16b SCH_PAINTER, DrawLine: gives a minimal length to lines having a 0 length
Lines with start point = end point always create problems in OpenGL (not drawn).
2022-01-12 09:44:30 +01:00
Jeff Young a23f6e4e92 Handle border colors for SCH_SHAPEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10361
2022-01-11 18:18:11 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +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
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Mike Williams bf2c4c1584 Eeschema: draw dangling end shadows 2021-12-29 00:06:12 +00:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young 933b82495d Use ISO 128-2 values for dashed line defaults. 2021-12-25 14:00:57 +00:00
Jeff Young 03a2723b67 Improve GUI of lib item colors. 2021-12-24 21:21:11 +00:00
Jonathan Haas 45d7f68f38 Use actual custom fill color for painting 2021-12-24 21:20:59 +00:00
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.
2021-12-24 16:13:27 +00:00
Jeff Young f7721dd274 Add highlight shadows for highlighted nets.
Fixes https://gitlab.com/kicad/code/kicad/issues/8817
2021-12-24 15:43:28 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young 68d2630d08 Flatten a layer of indirection out of 3D config settings. 2021-12-24 13:08:54 +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 653c7b78d7 Move NC pin logic so we set it before we need it.
Also fixes drawing the dangling symbol in the Pin Properties dialog
and when printing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9962
2021-12-12 22:25:36 +00:00
jean-pierre charras 65cbf2d2b7 Eeschema: fix draw issue for global labels in Cairo mode.
Fixes #9933
https://gitlab.com/kicad/code/kicad/issues/9933
2021-12-10 20:47:17 +01:00
Jeff Young c4336de868 Bug fixes in new dangling symbol drawing code. 2021-12-07 21:31:42 +00:00
Jeff Young 2e342ed8c9 Draw dangling symbols on a separate layer.
This allows us to draw them in front of wires, pins, and most
importantly, junction dots.

Fixes https://gitlab.com/kicad/code/kicad/issues/9667
2021-12-06 18:50:50 +00:00
Mikolaj Wielgus 9bb370e6b4 SCH_SHEET_PIN: Rename GetEdge, SetEdge to GetSide, SetSide 2021-11-28 20:07:06 +01:00
Jeff Young 7fc04c3cf2 Fixes for realtime connectivity being off.
Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-24 13:20:44 +00:00
Jeff Young b4ac53d93d Attempt #1 to fix LIB_SHAPE arc printing. 2021-11-17 00:34:05 +00:00
Jeff Young 025d9f82ea Remove atrophied schematic default wire and bus widths.
(They're now in the netclasses, and specifically the default netclass
if no other netclass is assigned.)

Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-13 22:56:50 +00:00
Jeff Young 4d46445ce1 Fix Bezier reading.
Fixes https://gitlab.com/kicad/code/kicad/issues/9512
2021-11-02 22:19:41 +00:00
Jeff Young 1d4d83cb7c Fix copy/paste error. 2021-10-18 18:09:40 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
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
Seth Hillbrand 52bbfb9109 Remove dependency of dot size on linear mils
Changes a dot to be a square pixel (linewidth x linewidth).  This allows
the removal of IU dependencies and ensures that a dot is always visible
on screen.  Also makes sure that cairo is setting the current linewidth
during its stroke routines

Fixes https://gitlab.com/kicad/code/kicad/issues/9362
2021-10-10 09:40:26 -07:00
Jeff Young b9596a0a5d Update dangling flags in color settings' preview. 2021-09-30 18:53:39 +01:00
Jon Evans 62ef27e372 Remove hard-coded anchor color in eeschema 2021-09-28 20:26:47 -04:00
Jeff Young fad385785d Fix botched merge. 2021-09-24 20:08:29 +01:00
Jeff Young a1a2076aee Include pin roots for symbols that don't have well-defined bodies.
Fixes https://gitlab.com/kicad/code/kicad/issues/8508
2021-09-24 16:19:54 +01:00
Jeff Young ec2ac181a2 Further simplify selection logic.
The select-single-wire stuff is no longer needed, and the prefer-wire-ends
stuff needs to be distance-based.

Also improved wire hit-testing to include bubbles the size of the dangling
symbol at each end.

Fixes https://gitlab.com/kicad/code/kicad/issues/9187
2021-09-21 20:27:35 +01:00
Jeff Young d7bfd1eb77 Restore use of floating point precision in pin name/number placement.
It's actually required here to get the shadows centred directly under
the text.
2021-09-17 12:37:53 +01:00
jean-pierre charras 8aa7e8d9f4 Fix compil warning (shadowed vars) 2021-09-16 18:21:07 +02:00
Jeff Young 684d15895c Box highlighting of selected text was never finished.
In particular, pin numbers and names weren't done.
2021-09-15 21:17:18 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 9cf7c7800b Use same text positioning algorithm in LibEdit and Eeschema.
Also fixes some uninitialized variables in PCB painter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8947
2021-09-07 12:33:06 +01:00
Jeff Young 21365fff3e Disambiguate JunctionDiameter from EffectiveJunctionDiameter.
ADDED Junction Size and Color to Edit Text & Graphics properties.

The added feature is only because it's the only way to recover from
the buggy behaviour having changed all your junctions to overridden
values.

Also adds help texts to the Junction Dot Properties dialog to
specify how to get schematic dot sizes and eeschema colors.

Also fixes the terminology in the Line/Wire/Bus Properties dialog
(the default widths come from the netclasses, not from eeschema).

Fixes https://gitlab.com/kicad/code/kicad/issues/9040
2021-08-31 12:18:02 +01:00
Jeff Young 69fac89e86 Fix some issues with incorrectly scaled defaults given in mils. 2021-08-25 20:04:06 +01:00
Jeff Young 9549a227ad Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/8993
2021-08-18 23:38:11 +01:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Jeff Young dd24502255 Clean up (yes, yet again) the default pen width handling.
Fixes https://gitlab.com/kicad/code/kicad/issues/8980
2021-08-17 11:59:50 +01:00
david-beinder c34f45f646 Split global label size expansion from TextOffset setting
Global label expansion ratio default is now 37.5%
Wire text offset default is now 15%
2021-08-02 16:40:36 +00: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 b1b4caee6a Escape "naughty" characters in symbol names.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road.  Better
to just escape them.

Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Jeff Young 3763aca52c Use getLineWidth() when drawing bus entries.
(Otherwise inheriting from the netclass or schematic doesn't work.)

Also fixes precedence order in GetPenWidth() for the two BUS_ENTRY
classes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8601
2021-06-13 20:52:03 +01:00
Jeff Young bcdec0dea7 Move '~' pin name processing to LIB_PIN and SCH_PIN.
This will also allow us to do variable processing in the future if
desired.
2021-06-12 19:54:34 +01:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Marek Roszko 3ac5aa5369 enum class SHEET_SIDE 2021-05-30 21:23:46 -04:00
Jeff Young 2817c3b3de Always show pin dangling symbols in Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/8493
2021-05-27 17:50:21 +01:00
Wayne Stambaugh 2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -04:00
Jeff Young 04f7fbfa4a Don't draw selection in hyperlink colour. 2021-04-02 11:18:18 +01:00
Jeff Young 82af98b08e Now that user can specify alpha we don't need to add in more. 2021-03-15 19:04:59 +00:00
Jon Evans 92cc88f87c Tighten up schematic label bounding boxes
Margins were being added in more places than necessary

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7689
2021-02-24 17:15:35 -05:00
Wayne Stambaugh 1786ae8773 Eeschema: use symbol nomenclature for object file naming. 2021-02-24 08:48:02 -05:00
James Jackson 48853d0c88 Eeschema: Allow auto-wiring / drawing from unconnected bus and graphic line endpoints
Fixes https://gitlab.com/kicad/code/kicad/issues/7537
2021-02-19 17:15:27 +00:00
Jeff Young a0b9b0c3ee Improve IsSymbolEditable to differentiate fields.
Fields are editable in Aliases, but still not in Legacy libraries,
locked libraries, etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/7175
2021-02-10 22:57:23 +00:00
Jeff Young ff7742c6b8 File naming and include cleanup. 2021-01-28 11:35:18 +00:00
Dominik Wernberger dc02ec9758 Remove a few const_cast 2021-01-12 20:51:31 +00:00
Dominik Wernberger 07635d2fc7 Minor adjustments 2021-01-12 20:51:31 +00:00
Dominik Wernberger ac94d72d2d Add more const specifiers 2021-01-12 20:51:31 +00:00
Jeff Young bd1f262a6b Fix issues with Intersheet Ref highlighting and hover actions. 2020-11-18 17:32:40 +00:00
Jeff Young 8c5c902fa3 Re-write IntersheetRefs on top of SCH_FIELDs and textVars.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.

As an important side-effect this also fixes the undo issues with
intersheet refs.
2020-11-17 16:05:49 +00:00
Jeff Young b227d2b910 More component -> symbol. 2020-11-15 20:23:15 +00:00
PJM 43176a5b29 Eeschema: Add Schematic Setup GUI to set junction dot size from list
CHANGED: In Schematic Setup->General->Formatting->Connections, added
pulldown for "Junction dot size" with values none, smallest, small
default, large, largest"  Added support in "sch_painter.cpp" to not
paint junction when they have a diameter of "1" which is what "none"
sets as the diameter.
2020-11-04 01:49:41 +00:00
Jeff Young bd103c133d Don't save junction colours when they're inherited.
Also fixes Edit Text & Graphics Properties to be able to clear
colours from junctions.

Fixes https://gitlab.com/kicad/code/kicad/issues/6018
2020-11-03 14:07:50 +00:00
Marek Roszko 1538d737e7 Split out FILL_T to its own header to avoid spreading eda_item everywhere 2020-10-14 21:51:23 -04:00
Jeff Young 4565631728 Finish moving eeschema assigned netclasses to sheet-path-relative.
Also adds code for the case where a new label is created on a net
with an existing netclass assignment.

Fixes https://gitlab.com/kicad/code/kicad/issues/5886
2020-10-07 16:31:55 +01:00
Jeff Young 7a7de027a7 Fix order of operations for setting underline. 2020-10-05 12:32:47 +01:00
Jeff Young cc617b715f Implement hypertext links for intersheet references. 2020-10-02 21:18:34 +01:00
Franck Jullien 2fc49045d1 ADDED: eeschema: Add intersheets references function
Add a new function to place intersheets references next to
global labels.
2020-10-01 20:39:32 +00:00
Jeff Young f347118ce3 Add a min pin width advanced config for plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5546
2020-09-08 20:19:54 +01:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Jeff Young b28332c5f1 Minor code cleanup. 2020-09-06 13:04:52 +01:00
Jeff Young d02ce77bee Make no-connects (and dangling symbols) more visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/5329
2020-08-25 13:46:40 +01:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01:00
Jeff Young 8a4b7bd9c8 Repair wire-width calculation routine.
Netclass handling has been move to GetPenWidth() so it's no longer
just a "1" that we can do a std::max against.

Fixes https://gitlab.com/kicad/code/kicad/issues/5249
2020-08-18 19:05:30 +01:00
Ian McInerney 61cdf3436b Ensure PAINTER::Draw routines properly handle EDA_ITEM casting
EDA_ITEM is a child of VIEW_ITEM, so a static_cast is not appropriate,
since in some cases it could be called with a non-EDA_ITEM argument.
This was triggering an ASAN heap-buffer-overflow in GerbView.
2020-08-16 12:37:51 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young f4ab14f32d Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
2020-08-10 12:41:52 +01:00
Jon Evans 2fc9c7233d Add color layer for schematic aux items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4825
2020-08-09 17:39:52 -04:00
Jeff Young 310613a941 Pin junction dot size to no less than 170% of wire width.
Fixes https://gitlab.com/kicad/code/kicad/issues/4917
2020-07-30 20:04:12 +01:00