Jeff Young
6c74658a98
Finish arc implementation of m_ThirdPoint for EDGE_MODULEs.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5191
2020-08-15 17:32:13 +01:00
Jeff Young
393bb0fd83
Fix assert where geometry routine wasn't ready to handle layers.
...
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Fabien Corona
133d082cc5
Pcbnew fix arc edition
2020-08-09 23:03:31 +00:00
Tomasz Wlostowski
89a953e039
Migrated GetEffectiveShape(s) to SHAPE_COMPOUND
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
832a8c5bf7
pcbnew: implement SHAPE_COMPOUND-based GetEffectiveShape()
2020-07-29 23:14:03 +02:00
Seth Hillbrand
0a5f11fb37
Keep item ordering as much as possible
...
The ordering goes first by type and then by uuid. In the case of
DRAWSEGMENT and EDGE_MODULE, we also sort by shape type before UUID.
Fixes https://gitlab.com/kicad/code/kicad/issues/4068
2020-07-25 12:56:19 -07:00
Tomasz Wlostowski
8ffa86a63f
get it to compile after rebase
2020-07-05 22:44:38 +02:00
Maciej Suminski
a289056a9e
Properties meta-data for pcbnew classes
2020-07-05 22:44:38 +02:00
Maciej Suminski
89698a727b
Removed const modifier for returned non-reference types
2020-07-05 22:44:38 +02:00
Jeff Young
441dfa30f0
Return individual custom pad shapes instead of a SHAPE_POLY_SET.
...
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.
Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
Jeff Young
e376750f62
Flatten CS_PAD_PRIMITIVE out in favour of reusing DRAWSEGMENT.
...
(In prep for the eventual replacement of DRAWSEGMENT internals with
SHAPE.)
2020-06-24 12:22:42 +01:00
Jeff Young
aeed8e6e2c
Finish implementation of DRAWSEGMENT::C_RECT.
...
It's currently only supported in the Footprint Editor. It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young
d3f017d825
DRC rules parser and engine.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2182
Fixes https://gitlab.com/kicad/code/kicad/issues/2116
Fixes https://gitlab.com/kicad/code/kicad/issues/1958
Fixes https://gitlab.com/kicad/code/kicad/issues/1965
2020-05-16 15:53:05 +01:00
Jeff Young
1535c83b88
Lay some groundwork for adding distances to DRC errors.
...
modified: eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young
7f1b409305
Remove dead legacy print code.
2020-04-20 17:03:38 +01:00
Jeff Young
cfa407616f
Don't allow degenerate arcs & circles. Trouble will follow.
2020-01-15 18:50:47 +00:00
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* Split up the thirdparty code into the thirdparty folder (#3637 )
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906 .
2020-01-07 17:12:59 +00:00
Mark Roszko
11ff16be4e
Switch to scoped enums
2019-12-20 14:11:39 +00:00
Jeff Young
37af3adffb
Add preference for flip axis.
...
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Jeff Young
d6e9bdf07b
Convert remaining legacy drawing code to print code.
2019-05-31 21:54:22 +01:00
Seth Hillbrand
ddc6079ceb
Move remaining hard-coded segment counts
...
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
2019-05-16 08:49:55 -07:00
Seth Hillbrand
f7c042a357
pcbnew: Allow curves in custom pads
...
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
Jeff Young
fd546da640
Homogenize hit testing and selection return types.
...
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Seth Hillbrand
24bf838392
pcbnew: Allow arc editing via midpoint
...
This permits changing the radius of the arc by adjusting the center
point of the arc. The arc end points are fixed in this operation.
2019-04-07 06:50:25 -07:00
jean-pierre charras
04aeec1223
Remove useless includes
2018-12-12 15:28:59 +01:00
jean-pierre charras
754837f947
Pcbnew: DRAWSEGMENT polygonal shape: fix drawings in Legacy mode. Add IsPolygonFilled() to know if the polygon is filled or not.
...
IsPolygonFilled() replaces the hard coded comparisob with Edge_Cut in code.
For now the polygon is not filled only on Edge_Cut layer.
But in the future, it could be an option for other layers.
2018-12-05 09:57:59 +01:00
Jeff Young
bcc8c64256
Consider edge cuts items to have zero width when filling zones.
...
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-11-14 23:45:32 +00:00
jean-pierre charras
4cac974420
Add Bezier curve (S_CURVE shape) support in DIALOG_GRAPHIC_ITEM_PROPERTIES.
...
Fix some issues related to S_CURVE shape support.
2018-07-22 18:39:48 +02:00
jean-pierre charras
72d1597201
DXF import: add import of DXF splines that are converted to Bezier curves.
...
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Jeff Young
eacaa39aa2
Remove global units usage from GetSelectionText...
...
... and GetMsgPanelInfo.
Step 4 in the g_UserUnit eradication effort.
Also removes a couple of conversion routines that were close
enough to extinction.
(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
jean-pierre charras
270a63daac
DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
...
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)
Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Tomasz Włostowski
a4528988ca
pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
...
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449
Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Tomasz Włostowski
58ce865352
pcbnew: made TransformShapeWithClearanceToPolygon virtual
2017-12-05 14:54:57 +01:00
jean-pierre charras
25f9c6e4f9
Incorrect default value (not saved in file) of DRAWSEGMENT width, for the S_POLYGON shape.
...
The value of the width is now always saved to avoid this kind of issue.
Also Fixes: lp:173257
2017-11-16 09:38:26 +01:00
Tomasz Włostowski
0245912c34
refactoring: split BOARD_ITEM::SwapData to use polymorphic per-item methods
2017-11-03 20:02:06 +01:00
Tomasz Włostowski
ac095b6724
pcbnew: tools for converting between custom-shaped pads and graphical shapes
2017-10-19 23:35:18 +02:00
Wayne Stambaugh
66e97fa905
Doxygen comment improvements.
...
Fix lots of Doxygen warnings.
Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
John Beard
a8eea6155a
Move bitmaps.h out of base_struct.h
...
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h
Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.
This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.
The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.
Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Simon Richter
59c81976dc
Explicitly mark overriding functions.
2016-09-24 14:53:15 -04:00
Maciej Suminski
2c08ff1d59
Switched to default copy ctor and/or operator= for BOARD, BOARD_CONNECTED_ITEM, DRAWSEGMENT & EDGE_MODULE.
2016-09-12 11:50:06 +02:00
Maciej Suminski
bfca6f083f
Bounding box for arc contains only the arc itself (excluding the center point) (GAL).
2015-09-03 23:05:01 +02:00
Tomasz Wlostowski
63b35f40a7
Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET.
2015-07-27 21:45:57 +02:00
Maciej Suminski
d2ebf688f9
Reverted commits that remove boost::polygon dependency (need more testing).
2015-07-14 22:23:13 +02:00
Tomasz Wlostowski
41c753b05d
Removed all dependencies on boost::polygon except for bitmap2component. Replaced almost all instances of CPOLYGONS_LIST with SHAPE_POLY_SET.
2015-07-14 13:36:24 +02:00
Maciej Suminski
0dd9efd9db
Merged the differential pair router & length tuning tool.
2015-03-03 11:50:50 +01:00
Maciej Suminski
4fb9bce354
Code formatting.
2015-02-18 17:53:46 +01:00
Tomasz Włostowski
5d78a007cc
added ClassOf() for DRAWSEGMENTs, PADs and PCB_TEXTs
2015-02-18 00:53:57 +01:00
John Beard
4f3672da4d
Add "move exact" and "duplicate" tools to pcbnew
2015-02-12 03:22:24 +00:00
jean-pierre charras
ba6e2ffbcf
Footprint Editor: New footprint creation: change defaults for ref and value texts: now Ref text is REF** and Value text is the footprint name. Also Value is put on fab layer (front)
...
muonde.cpp: cleanup this very old code, and fix not working code.
2015-01-28 11:00:48 +01:00
Maciej Suminski
9536ed811d
Upstream merge.
2014-05-05 10:51:31 +02:00