Jeff Young
e84c574830
Some more EDA_ANGLE cleanup.
4 years ago
Jeff Young
9b661aea10
EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
4 years ago
Jeff Young
07013d00e1
More EDA_ANGLE.
4 years ago
jean-pierre charras
431560a46b
EDA_SHAPE::SwapShape() : add missing items to the swap list.
Some items (color, fill) were missing in list, so the undo/redo was incorrect
4 years ago
Seth Hillbrand
d5faac7614
Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed. Closed will remove
the last segment if it lands on the first point. We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)
Fixes https://gitlab.com/kicad/code/kicad/issues/10334
(cherry picked from commit 55020c2b89 )
4 years ago
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
4 years ago
Marek Roszko
347e03363a
Convert wxPoint/wxSize starting from EDA_RECT usages
4 years ago
Jeff Young
f1410f0240
Line styles for PCBNew shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/2150
4 years ago
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.
4 years ago
Seth Hillbrand
42f63b679d
Check for proper winding when creating an EDA_SHAPE
There is a defined order to arc points in the EDA_SHAPE. When creating
the new object, we need to check that that order is preserved on
conversion
4 years ago
Jeff Young
78be5df39a
Don't allow negative line widths to shrink bounding box.
Fixes https://gitlab.com/kicad/code/kicad/issues/9776
4 years ago
Jeff Young
7ccf658379
Fix stupid coding error.
(Don't use epsilon on non-coordinate values, and in particular,
definitely not on polygon vertex count.)
4 years ago
Jeff Young
dede3f5709
Implement an EPSILON for library/schematic/board checking.
This is mainly to not get caught out when format changes result in
different values being stored vs. calculated (such as for arcs).
4 years ago
Jeff Young
5f8e0ef1e0
Patch up arc hit-testing and printing for 6.0
This could use another look when we're not so near release. We
really shouldn't need to special case eeWinding vs. not eeWinding.
Fixes https://gitlab.com/kicad/code/kicad/issues/9491
4 years ago
Jeff Young
f724fe7eff
Move bbox padding to RTrees so it doesn't interfere with hittesting.
Fixes https://gitlab.com/kicad/code/kicad/issues/9361
4 years ago
Wayne Stambaugh
1f7fd436a2
Move board object polygon code into the object source files.
Having the board object polygon code all defined in a separate file made
finding the polygon code for an object difficult to find.
4 years ago
qu1ck
09a2701136
Fix arc angle calculation and python API for it
1. It's impossible to use methods that modify parameters in swig so
I extend it in wrapper
2. Simplify GetArcAngle() and fix the bug where it lies about 360
degree arc to be 0 degrees.
4 years ago
Roberto Fernandez Bautista
99442350a4
CADSTAR PCB: Fix loading of arc tracks following recent PCB_ARC changes
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.
Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
4 years ago
Jeff Young
f9861b4a6c
Finish arc rework and push out to file formats.
4 years ago
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.
4 years ago
Jeff Young
9b9e379aa0
Overhaul arc internal model to not over-specify information.
4 years ago
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
4 years ago
jean-pierre charras
3316f3998a
Rename BuildPolyPointsList() to DupPolyPointsList() and optimize code
to avoid multiple useless copies of the list of polygon corners in code.
4 years ago
jean-pierre charras
49e1b5785f
PCB_SHAPE::GetFocusPosition(): returns a point on the outline instead of center.
This function is used in DRC to locate a graphic shape. For not filled shapes,
this point must be on the shape outline, not on the center of the shape (the center
shows nothing)
Fixes #8832
https://gitlab.com/kicad/code/kicad/issues/8832
4 years ago
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
4 years ago
Wayne Stambaugh
cf00319c85
More NULL expunging.
4 years ago
Eeli Kaikkonen
3616a8f0ee
Use polygon coordinates relative to the board.
Footprint polygon coordinates are relative to the footprint.
Translate to the board coordinates when doing hittest with
a (selection) rect.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8596
4 years ago
Marek Roszko
10e60acf34
Clean up including of board_design_settings.h
5 years ago
Marek Roszko
eeb405c196
Cleanup some more excess math/util includes
5 years ago
Marek Roszko
21fde9b629
enum class PCB_SHAPE_TYPE_T
5 years ago
Jeff Young
3b049b32cf
Show if pads, zones, and dimensions are locked in the status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
5 years ago
Jon Evans
c04e19f9ac
Include optimization: move some things from common.h to point-of-use
5 years ago
Jon Evans
7a8abcadd2
PCB_SHAPE: Use SHAPE_ARC as the effective shape of an arc
5 years ago
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.
5 years ago
Jeff Young
ba63ac801a
Don't make assumptions about what layers things are on.
5 years ago
Jeff Young
21bec6c016
Comment.
5 years ago
Jeff Young
6983bcd55b
Push addition of shape width down into computeArcBBox.
Also improves performance by calling GetBoundingBox only once (this
is not always an inexpensive routine for some items, such as
polygons).
5 years ago
Seth Hillbrand
1733a23ac7
Take width into viewBBox account
Don't let objects disappear until their full extend has been removed
from view.
Fixes https://gitlab.com/kicad/code/kicad/issues/7318
5 years ago
Jeff Young
0ded846130
Go back to previous arc midpoint editing routine.
It avoids erratic behaviour near the chord or end-points.
Fixes https://gitlab.com/kicad/code/kicad/issues/7135
5 years ago
Seth Hillbrand
b8dfcb34c4
Revert "Use less-sophisticated arc editing math."
This reverts commit 3b424d3868 . And fixes
issue with rouding causing arc errors
5 years ago
Jeff Young
3b424d3868
Use less-sophisticated arc editing math.
While it doesn't do the tangent retention that the old version did,
this one I can at least make work.
Fixes https://gitlab.com/kicad/code/kicad/issues/7135
5 years ago
jean-pierre charras
d4c36230d2
Pcbnew, Graphic items: show the locked status in msg panel and dialog properties.
5 years ago
Jeff Young
c66e373119
Cleanup of PCBNew message panel routines.
Also fixes bugs where invalid netclasses were reported as "Default",
and SMD pads were reported as having "0.0000" drills.
5 years ago
Jeff Young
9c7c05c161
Mostly formatting cleanup but a few type-casting cleanups too.
5 years ago
Jeff Young
114621eb2c
Move footprint shape offset/rotation stuff to the right place.
Most shapes are already offset/rotated (with thier non-offset/rotated
points in start0, etc.).
5 years ago
Jeff Young
7bd31d5237
Naming conventions.
5 years ago
Jeff Young
8bae52d1c3
Correct naming conventions.
5 years ago
Jeff Young
ec020dd19f
First-class support for filled shapes.
5 years ago
Jeff Young
47e86d76fb
Cleanup prior to adding filled flag.
5 years ago
Jeff Young
bdbb68f813
MODULE -> FOOTPRINT.
5 years ago