Commit Graph

82 Commits

Author SHA1 Message Date
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jeff Young 499b58f505 ADDED: user-specified gap and linewidth for bounding hull creation. 2023-02-12 23:16:45 +00:00
Jeff Young 45eae3e594 Don't Simplify() polys with arcs in them.
Fixes https://gitlab.com/kicad/code/kicad/issues/13134
2022-12-12 12:54:34 +00:00
Jeff Young 20791c99ac Allow conversion of single track segments and vias.
Fixes https://gitlab.com/kicad/code/kicad/issues/13047
2022-12-01 17:15:29 +00:00
Jeff Young 6befa1c57e A bit of cleanup to recent convert tool changes. 2022-12-01 14:53:13 +00:00
Jeff Young 4d8e73a630 Allow tracks as input to bounding hull generation.
Fixes https://gitlab.com/kicad/code/kicad/issues/13047
2022-12-01 14:53:13 +00:00
Jeff Young 98ab078905 Remember conversion strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/13043
2022-11-30 14:29:16 +00:00
Jeff Young 8dbd6fee00 Go back to smaller chaining epsilon.
Using a large epsilon here to allow for sloppy drawing can cause
the algorithm to miss very short segments in a converted bezier.
So use an epsilon only large enough to cover for rouding errors in
the conversion.

Fixes https://gitlab.com/kicad/code/kicad/issues/12951
2022-11-30 13:26:45 +00:00
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