Jeff Young
8165fc6c44
Give up trying to infer what kind of polygon the user wants.
...
In many instances there are 3 valid answers: mimic linewidths, use
centerlines, and build a bounding hull.
Fixes https://gitlab.com/kicad/code/kicad/issues/12950
2022-11-28 22:12:53 +00:00
Jeff Young
ec9c6a8053
Separate creation of polygons for open and closed shapes.
...
This allows us to create a bounding hull from an open shape-line-chain,
which is useful for defining milled slots.
2022-11-27 18:29:41 +00:00
Jeff Young
3fc727bb91
Clear selection before deleting objects during conversion.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12879
2022-11-11 17:53:01 +00:00
Seth Hillbrand
c7c4439027
Allow bezier->line/poly conversion
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12778
2022-10-31 12:48:53 -07:00
Jeff Young
d16b23d16e
Name shortening and line-break reduction.
2022-10-21 18:41:39 +01:00
jean-pierre charras
6b3d36b6c3
CONVERT_TOOL: also show the "Create From Selection" menu if a array can be created
...
The "Create Array" sub-menu was recently moved to this menu, so it must me
shown as soon as an array can be created.
2022-09-07 10:53:27 +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
Seth Hillbrand
f1261e71d4
Replace boost::optional with std::optional
2022-08-25 15:50:47 -07:00
Jeff Young
1871812f2b
Consolidate on a more widely used sub-type architecture.
2022-08-23 12:57:55 +01:00
Jeff Young
aa2ad3b44c
Move KICAD_T[] to std::initializer_list<KICAD_T>.
2022-08-20 10:28:11 +01:00
Jeff Young
927bc8141b
Init member variables.
2022-08-01 13:09:51 +01:00
Jeff Young
6f49b57f9b
Cleanup & performance enhancements.
2022-08-01 13:09:51 +01:00
Jeff Young
f0b9e67212
Add ignore-line-widths mode to CONVERT_TOOL.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5911
2022-07-29 21:39:03 +01:00
Jeff Young
fc1afa6298
Improvements to convert tool.
...
1) Handle filled shapes
2) If a chained outline can't be found, build hulls of the individual
segments
3) Combine intersecting shapes
4) Simplify code
Fixes https://gitlab.com/kicad/code/kicad/issues/git
Fixes https://gitlab.com/kicad/code/kicad/issues/5911
2022-07-27 18:57:45 +01:00
Seth Hillbrand
737d65fd36
Skip zero-size elements when converting
...
Also fixes an assertion when converting to polygon from the board editor
Fixes https://gitlab.com/kicad/code/kicad/issues/11313
(cherry picked from commit 6706a5c462
)
2022-04-01 13:24:10 -07:00
Seth Hillbrand
2fafa55647
Maintain width of converted tracks
2022-03-02 10:45:53 -08:00
Seth Hillbrand
7e836ae27a
Select the copper layer before processing
...
If we are converting to tracks, the copper layer needs to be selected
before any other elements are processed, otherwise, we end up with the
default undefined layer
Fixes https://gitlab.com/kicad/code/kicad/issues/11025
(cherry picked from commit 9396735733
)
2022-03-02 10:41:44 -08:00
Jeff Young
34a9a165c9
More wide-string declarations.
2022-02-05 22:26:31 +00:00
Jon Evans
bf38cb56b7
Handle footprint shapes in polygon creation
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259
(cherry picked from commit f9d8ec6137
)
2022-01-04 21:31:47 -05:00
Jon Evans
4be56825bb
Fix creating polygons from footprint rule areas
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257
(cherry picked from commit e9b91b6fab
)
2022-01-04 21:31:40 -05:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05: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
Jon Evans
62e6f542ed
Init zone type when creating in convert tool
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9918
2021-12-09 18:20:30 -05:00
Jon Evans
a9168860e0
Reduce excessive epsilon in polygon search algo
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9903
2021-12-08 21:04:23 -05: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
Ian McInerney
4d89061d4c
Support footprint arcs in convert to polygon
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9352
2021-10-10 16:26:23 +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
Jon Evans
07e01e6297
Allow converting graphic arc to track arc
2021-09-28 21:00:15 -04:00
Jon Evans
5bfafa5e4c
Add rounding epsilon to convert tool polygon search
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8927
2021-08-12 20:17:04 -04:00
Jon Evans
a90656900a
Allow creating polygon types from polygons
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7302
2021-08-08 20:29:00 -04:00
Jon Evans
3beeb52c43
Convert tool: create lines on active layer, not source layer
2021-08-08 15:12:23 -04: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
Jon Evans
75190370dd
Convert -> Create from Selection
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8818
2021-07-19 18:45:33 -04:00
Jeff Young
e02bb80bf3
Handle cancel when selecting copper layer.
...
Also changes the algorithm to ask only once, rather than one per
non-copper-layer object.
Fixes https://gitlab.com/kicad/code/kicad/issues/8767
2021-07-10 12:05:25 +01:00
Jon Evans
67762a11f6
Don't double-process arcs if we get one first
2021-07-04 12:22:52 -04:00
Jon Evans
b291f36dae
ADDED: Convert tool can create polygons with arcs from contiguous line and arc segments
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5409
2021-07-04 12:10:59 -04:00
Jon Evans
de4eb1fcef
Convert to zone: take dest layer from editor active layer
...
Show non-copper zone properties if active layer is non-copper
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8646
2021-06-20 15:13:18 -04:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
2021-06-06 15:03:42 -04:00
Marek Roszko
21fde9b629
enum class PCB_SHAPE_TYPE_T
2021-04-30 22:36:12 -04:00
Jeff Young
18470693fe
Copy linewidths when coverting to polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7893
2021-03-13 17:06:49 +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
Jeff Young
ea9c269914
Don't fill polygons converted from lines.
...
The lines couldn't have been filled, so the polygon shouldn't start
out filled either. The user can set it to filled if they want.
Fixes https://gitlab.com/kicad/code/kicad/issues/7867
2021-03-11 10:42:21 +00:00
jean-pierre charras
5d2dc0b50e
Fix a few (minor) issues:
...
- Make DIALOG_SHIM::SetPosition working)
- rename PCB_BASE_FRAME::SelectLayer() to PCB_BASE_FRAME::SelectOneLayer()
- PCB_BASE_FRAME::SelectOneLayer(): make dismiss dialog by escape key working.
Fixes #7578
https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-17 20:56:43 +01:00
Seth Hillbrand
1c9d8a9f4c
Don't warn on locked conversion
2021-01-08 16:49:47 -08:00
Jeff Young
2a088e5c7b
Add conversion of circles to zones and enable in footprint editor.
...
Also rule areas, of course.
Fixes https://gitlab.com/kicad/code/kicad/issues/6966
2021-01-06 17:21:49 +00:00