Tomasz Wlostowski
832a8c5bf7
pcbnew: implement SHAPE_COMPOUND-based GetEffectiveShape()
2020-07-29 23:14:03 +02:00
Seth Hillbrand
1f5fb979b9
Keep PNS item RTree on layer-by-layer
...
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis. This also allows for layer expansion by using
deque of RTrees rather than fixed index
This fixes the missing layernumbers and keeps the layers in a deque to
prevent re-allocation on expansion.
Replaces ad94b6205
2020-07-29 11:21:00 -07:00
jean-pierre charras
f00c59c446
Fix a few Coverity warnings.
2020-07-29 09:26:57 +02:00
Seth Hillbrand
ad94b6205a
Revert "Keep PNS item RTree on layer-by-layer"
...
This reverts commit a34d33c460
.
The commit did not work properly for shove routing. Will revist in
later commit
2020-07-28 21:20:19 -07:00
Jeff Young
0fecb5f277
Be more explicit about string/character conversions.
...
This *may* fix the bug where a layer name isn't displayed correctly
in the error dialog. But probably not.
2020-07-28 20:44:40 +01:00
Marek Roszko
9278660b10
Add support for the windows application restart api
2020-07-28 14:32:39 -04:00
Seth Hillbrand
a34d33c460
Keep PNS item RTree on layer-by-layer
...
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis. This also allows for layer expansion by using
vector of RTrees rather than fixed index
2020-07-28 10:17:56 -07:00
Seth Hillbrand
a5a56c46c3
Remove INTRUSIVE_LIST from CN_ITEM
...
Intrusive lists made the connectivity search not thread-safe. Using
iterators for item deletion provides the same order performance while
keeping the container thread-localized
2020-07-28 09:29:32 -07:00
Jeff Young
46602148dc
Fix overly aggressive assert.
2020-07-28 13:35:37 +01:00
Jeff Young
be957e0105
Convert parent-less module items to board items on paste.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4938
2020-07-27 19:53:42 +01:00
Jeff Young
1d8c71c617
Fix layout issues in net inspector dialog.
...
1) don't add 10 -and- include 'M's in the strings; they're both for
margins
2) take scroll bar width into account when sizing columns
3) make sure margins are added to temp variables that we're going to
use to size column 1
Fixes https://gitlab.com/kicad/code/kicad/issues/4981
2020-07-27 19:53:42 +01:00
Seth Hillbrand
6900f04ee0
Change Zone extra clearance magic number to AC
...
Rather than keeping a magic number in the code, we set the default in
the advanced config setting and allow users/developers to modify it.
2020-07-26 07:20:24 -07:00
jean-pierre charras
124afa5fc4
FOOTPRINT_PREVIEW_PANEL: Ensure we are never using the high contrast mode
...
to display the selected footprint
Fixes #4980
https://gitlab.com/kicad/code/kicad/issues/4980
2020-07-26 13:22:21 +02:00
Simon Richter
95c2b261e8
Don't mandate ownership semantics in API
...
This API doesn't transfer ownership, so no smart pointers are required --
this just needlessly tightens requirements on the user of the interface.
(Fixes five instances of MSVC C26410 warning)
2020-07-26 02:45:27 +00:00
Simon Richter
fdaaa0a704
Make PCB_EXPR_UCODE final
...
This avoids a warning about its non-virtual destructor during deletion, as
polymorphic classes are expected to be deleteable through any pointer.
Possibly not entirely correct -- might be problematic if UCODE objects are
deleted through a base pointer.
2020-07-25 19:41:16 -07:00
Jeff Young
4153309fba
Add defensive code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4941
2020-07-25 23:54:04 +01:00
Seth Hillbrand
ad625d8d76
Add missing KIID to edge_module
...
In order to support grouping in the footprint editor, we need full KIIDs
stored with the footprint elements.
2020-07-25 14:10:53 -07: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
Jeff Young
2af6d01fdf
Add some defensive code for empty polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4947
2020-07-25 17:35:05 +01:00
jean-pierre charras
6f7d5f5e2b
Footprint editor: fix some issues in flip and mirror commands.
...
more about fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-25 18:10:24 +02:00
Jeff Young
bf445c1a95
Performance enhancements.
...
1) cache pad polygon outlines
huge improvement in connectivity performance and a decent
improvement in DRC performance
2) don't pre-allocate CONTEXT stack
significant improvement in DRC rule performance
2) don't keep re-encoding strings
decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young
d1d7f5e7fa
Fix text size in Edit Footprint dialog.
2020-07-25 13:03:33 +01:00
jean-pierre charras
377da31fcc
D_PAD copy ctor and operator = : fix missing copy of pad name and pin function members.
2020-07-25 13:28:20 +02:00
jean-pierre charras
bebba1df61
D_PAD copy ctor and operator = : fix missing copy of m_LengthPadToDie member.
2020-07-25 08:29:33 +02:00
jean-pierre charras
b5960dfb40
class D_PAD: add Copy ctor and operator =.
...
Due to the fact basic primitives for custom pads are now managed by
a list of pointer, the default copy ctor and default operator = do not work
(the basic primitives list must be duplicated).
It fixes issues related to primitives list id pad edition, footprint edition
and undo/redo
Fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-24 18:02:56 +02:00
Jeff Young
f97c50bfde
Give excluded DRC items their own layer.
...
(And fix a bug with the new mulit-layer zones and rule-based keepouts
at the same time which prevented me from testing it.)
Fixes https://gitlab.com/kicad/code/kicad/issues/4954
2020-07-24 01:28:25 +01:00
Jeff Young
6529e339a9
Don't store context in the uCode. (It's not thread-safe.)
...
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young
b60303efdb
Fix crash due to uninitialised variable.
2020-07-23 17:20:32 +01:00
Jeff Young
f2812773d4
Better handling of undefined values in Rule expressions.
...
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
jean-pierre charras
c254b331f3
Pcbnew: Activate pad fabrication property in pad properties dialog.
...
It was previously an option of advanced config since 6 months.
It is now not optional.
2020-07-23 14:33:24 +02:00
Jeff Young
86c9adbcba
Add auto-completion for DRC rule function calls.
2020-07-22 21:28:02 +01:00
Tomasz Wlostowski
70b98c3b49
router: dump entire event log + annotated PCB upon user request
2020-07-22 18:05:54 +02:00
Tomasz Wlostowski
379aa8f3b5
router: clearer distinction between LOGGER and DEBUG_DECORATOR classes.
...
The first one keeps a log of events (start routing, mouse motion, etc).
The second allows for adding temporary debug drawings and messages which are stored synchronously with the events in LOGGER.
The event stream together with the PCB design (now with UUIDs) can be used to deterministically replay routing bugs as the user sees them.
2020-07-22 18:05:54 +02:00
Tomasz Wlostowski
2a2e389a94
router: auto-guess track posture from mouse movements, experimental!
2020-07-22 18:05:50 +02:00
Tomasz Wlostowski
fd07e94760
router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable
2020-07-22 17:04:42 +02:00
Jeff Young
a6b6084a60
Add preflighting for DRC rule function calls.
2020-07-22 14:33:32 +01:00
jean-pierre charras
a61ea1fb0c
Fix a compil warning
2020-07-22 09:02:30 +02:00
Ian McInerney
450107e453
Remove if statement with duplicated branches in router
2020-07-22 00:18:30 +01:00
Jeff Young
fd647a1fa9
Code completion hookup to property manager.
2020-07-21 23:43:10 +01:00
Jeff Young
c52df811ae
Add expression eval to constraint min/max/opt values.
...
Also adds error reporting for above.
2020-07-21 23:43:10 +01:00
Jeff Young
7cbd166df7
Don't complain about duplicate names when the name didn't change.
2020-07-21 23:43:10 +01:00
Jeff Young
beb5bad9b7
Initialize Scintilla with correct braces for sexpr grammar.
2020-07-21 23:43:10 +01:00
Ben Ellis
42a2f13464
Added a check that sexprs isn't empty before popping
...
This fixes a crash on malformed sexprs in the DRC rules panel
2020-07-21 14:52:48 +00:00
Jeff Young
1790c536ef
Allow user layer names to be used in DRC rules.
...
I imagine this will also fix the property inspector, once it
gets merged.
2020-07-20 23:28:54 +01:00
Jeff Young
095937563b
Hook libeval compiler up to rule parser
...
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Mark Roszko
3b727b5d16
Make preference groups not selectable
2020-07-20 13:45:46 +00:00
Ian McInerney
20c1492b6a
Initialize pointers to nullptr in copy constructor
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4940
2020-07-20 11:31:34 +01:00
jean-pierre charras
ba90416096
Pcbnew, legacy plugin (for .brd files): remove non working code.
...
This code controls the visibility of items, is not useful and does not
make sense for some items in current Pcbnew version.
2020-07-19 09:32:53 +02:00
Ian McInerney
967587adcc
Guard against dynamic cast failure
2020-07-19 01:47:03 +01:00
Ian McInerney
50b2271f84
Fix missing variable initialization
2020-07-18 23:56:39 +01:00
Ian McInerney
2542d41481
Fix copy constructors for BOARD_DESIGN_SETTINGS and ZONE_CONTAINER
2020-07-18 23:55:06 +01:00
Seth Hillbrand
4aef369ca2
Remove accidentally committed test file
2020-07-18 13:03:22 -07:00
Ian McInerney
7b705af038
Refactor common QA components to create a single common library
...
This moves the program-specific code (e.g. BIU files) into
the program tests.
Also, create title_block.cpp to break a dependency that pulled
in eda_text.cpp when using the TITLE_BLOCK object.
2020-07-18 16:21:15 +01:00
jean-pierre charras
a25f7cc0a4
Pcbnew, footprint editor: make switching layers visibility on/off working.
...
In footprint editor the board is a dummy board not managed by project settings,
so using its settings to manage layers visibility does not work.
Fixes #4924
https://gitlab.com/kicad/code/kicad/issues/4024
2020-07-18 10:31:06 +02:00
Jeff Young
3fd0a3f842
Update text variables even when they're changed from other binary.
...
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
jean-pierre charras
e7e1d5140e
Pcbnew, DRAWSEGMENT plot function: add missing plot code for S_RECT shape.
...
Fixes #4905
https://gitlab.com/kicad/code/kicad/issues/4905
2020-07-17 11:26:35 +02:00
Jon Evans
5401f06fce
Don't nag when we can't save project settings
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4164
2020-07-16 22:56:02 -04:00
Jon Evans
5444a1b4b0
Only init display options after creating a canvas
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4909
2020-07-16 22:27:03 -04:00
Jeff Young
944c9eac7c
Allow Update Schematic from PCB to re-link based on refdes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00
Ian McInerney
da6d0c9de6
Add cancel to the selection context menu if a tool is running
...
The selection tool's context menu is displayed during the move tool,
so it should contain the ability to cancel the current action.
2020-07-16 15:12:58 +01:00
Ian McInerney
5ba0855c36
Add move operators to MODULE
...
This fixes a memory leak in the std:: containers in MODULE
that is noticable when moving a module on the board and cancelling
the operation.
2020-07-16 02:11:51 +01:00
Ian McInerney
af729d578f
Unify settings reset buttons into one location
2020-07-16 00:08:16 +01:00
Ian McInerney
b428364a98
Fix memory leak in color settings panel
2020-07-16 00:04:17 +01:00
Seth Hillbrand
7f991ce855
Revert "Set DoubleBuffering to reduce flicker"
...
This reverts commit 106259f6e6
.
2020-07-13 20:23:12 -07:00
Seth Hillbrand
e19a7910f8
Revert "Revert "Set DoubleBuffering to reduce flicker""
...
This reverts commit c18cab6154
.
2020-07-13 20:19:10 -07:00
Jon Evans
d349b24f7a
Unlink board from project before close
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4876
2020-07-13 20:48:18 -04:00
Jeff Young
efc3f8c29d
Remove unused nets when updating PCB.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4247
2020-07-13 22:41:56 +01:00
Jeff Young
1cd2a51db2
Make undo/redo lists protected.
2020-07-13 15:53:36 +01:00
Jeff Young
7340c97ef9
Undo for schematic-wide operations.
...
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/2122
Fixes https://gitlab.com/kicad/code/kicad/issues/4869
Fixes https://gitlab.com/kicad/code/kicad/issues/3933
Fixes https://gitlab.com/kicad/code/kicad/issues/4871
Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Seth Hillbrand
9f09c3872f
Ensure file reads always use the C-locale variant
...
Str2Double assumes current locale. We usually switch the locale when
reading files but we should be using the function that explicitly gets
the C-locale conversion.
2020-07-12 20:03:50 -07:00
Jon Evans
a2041073ee
Skip project backup in standalone mode
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4867
2020-07-12 11:42:05 -04:00
Jon Evans
2ea42196ed
Ensure high contrast mode gets a proper default value
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4864
2020-07-12 11:34:58 -04:00
Jon Evans
2f31bf278b
Fix layer hotkey dispatch
...
Hotkeys received by more than one tool need AF_NOTIFY
2020-07-11 21:59:16 -04:00
Jon Evans
5d118b0700
More visibility settings infrastructure
...
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings
Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Jeff Young
9b92b275de
Remove vestiages of old open-PCB-for-settings hack.
...
We used to have to open a PCB_EDIT_FRAME to get the settings for
the footprint editor and footprint viewer. This necessitated some
special processing when opening a PCB_EDIT_FRAME to actually edit
a board as it might already be open but unloaded.
Since the new settings architecture allows the footprint editor and
footprint viewer to init themselves we no longer need the special-
case code.
2020-07-11 21:19:49 +01:00
Jeff Young
e325d2e18f
Allow Net Inspector to create, rename and delete nets.
...
ADDED: create/edit/delete nets in PCBnew Net Inspector
ADDED: update from PCB now allows updating of changed nets
Fixes https://gitlab.com/kicad/code/kicad/issues/1996
2020-07-11 21:19:49 +01:00
Seth Hillbrand
c18cab6154
Revert "Set DoubleBuffering to reduce flicker"
...
This reverts commit 106259f6e6
.
In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785
Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07:00
Ben Ellis
4486b0b6d6
Fixed bounds checking. Not the root cause but keeps things from crashing.
2020-07-11 02:24:48 +00:00
Jon Evans
d248736f08
Draw ratsnest with colors if color data is available
2020-07-10 21:37:53 -04:00
Jon Evans
72b08f2b18
ADDED: Hide ratsnest for specific nets
...
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.
Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
2020-07-10 21:06:17 -04:00
Seth Hillbrand
106259f6e6
Set DoubleBuffering to reduce flicker
...
This sets double buffering for GTK and MSW to minimize flicker when
redrawing window elements.
Fixes https://gitlab.com/kicad/code/kicad/issues/4785
2020-07-10 09:29:42 -07:00
jean-pierre charras
2675f69479
Hyperlynx export: use the board current stackup parameters instead of fixed prms
...
Fixes #4856
https://gitlab.com/kicad/code/kicad/issues/4856
2020-07-10 17:30:56 +02:00
Seth Hillbrand
7201e9d7eb
pcbnew: adjust component hash for GenCAD export
...
The previous hash was not unique for changes in integer/boolean values.
Generic hash_combine routines provide decent coverage for limited extra
cycles.
2020-07-09 17:40:30 -07:00
Jon Evans
bb596ac139
Add Move with Reference to Special Tools menu
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4838
2020-07-09 12:02:26 -04:00
Jeff Young
998c216487
Remove some nag tests which keep you from doing a DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4845
2020-07-09 16:22:59 +01:00
Jon Evans
b1b9cef5fb
Full-project automatic backup system
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4763
2020-07-09 13:55:19 +00:00
jean-pierre charras
5226d6b4df
libcommon build: add NGSPICE_INCLUDE_DIR in include list (similar to Eeschema build).
...
Useful when ngspice is build by the developer in a specific folder.
Fix also an other minor compil warning.
Fixes #4851
https://gitlab.com/kicad/code/kicad/issues/4851
2020-07-09 08:46:59 +02:00
Jon Evans
afd432e687
Infrastructure for net hiding
...
LoadProjectSettings changed to take place after the board
has been loaded so that board-specific project settings can
be applied (such as net visibility and color overrides)
2020-07-08 21:59:34 -04:00
Jeff Young
741481591e
NetClass settings for Eeschema.
...
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.
Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Michael Kavanagh
841b08f9a6
Pcbnew: add Eeschema and Fp editor to tools menu
...
Unify with the Eeschema tools menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/4840
2020-07-08 11:17:27 +01:00
Jon Evans
961fbadd23
Initial infrastructure for net/netclass colors in board
2020-07-07 22:21:45 -04:00
Ian McInerney
ccc0ceb32f
Remove deleted item global variables
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4819
2020-07-07 23:12:17 +01:00
Seth Hillbrand
7cea4b23f1
ADDED: Expand selection in context menu
...
Break out the context menu with heuristically limited choices being
appended to the main list rather than re-selecting
Fixes https://gitlab.com/kicad/code/kicad/issues/4799
2020-07-07 14:18:35 -07:00
Jeff Young
e66523586b
Add Assign Netclass... to context menu.
...
ADDED Assign Netclass feature to EEschema.
Netclass assignments also now shown in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
jean-pierre charras
eab98eee1d
3D viewer: use the full board bounding box to define the visible area.
...
Remove also a printf now useless, used for debug.
Fixes #4815
https://gitlab.com/kicad/code/kicad/issues/4815
2020-07-07 11:40:35 +02:00
Jon Evans
b084305b12
Clean up some pcbnew file handling bugs
2020-07-06 21:53:28 -04:00
Jon Evans
a3655225cd
Save selection filter state in project local settings
2020-07-06 21:53:12 -04:00
Jon Evans
707ce66cc6
ADDED: Move with Reference action
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4755
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2304
2020-07-06 19:33:14 -04:00
Jeff Young
3939b31027
Integration of netclasses into Eeschema.
...
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page. Things like assigning to a net on the
canvas to follow.
Fixes https://gitlab.com/kicad/code/kicad/issues/2132
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jeff Young
b0ca7d5140
Netclass setup for Eeschema.
...
ADDED netclass panel in Schematic Setup dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/2132
2020-07-06 20:00:50 +01:00
Jeff Young
2819570d1e
Push panel_setup_netclasses down into common.
2020-07-06 20:00:50 +01:00
Jeff Young
d85a707385
Move rest of DRC to SHAPE collision architecture.
2020-07-06 20:00:50 +01:00
Jon Evans
2a1550d1d2
Don't crash when failing to deserialize old exclusions
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4820
2020-07-06 12:53:55 -04:00
Jon Evans
db4502e2ae
Add copy ctor for BOARD_DESIGN_SETTINGS
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4817
2020-07-06 12:45:57 -04:00
Jon Evans
4e54b773e9
Fix some asserts with the property system
...
It seems like there may be some race between BOARD_CONNECTED_ITEM_DESC
and BOARD_ITEM_DESC
https://gitlab.com/kicad/code/kicad/-/issues/4816
2020-07-06 12:17:36 -04:00
jean-pierre charras
0ff866895a
module and pad display info: add rotation angle.
...
This is a useful parameter, so it must be displayed on the pmessage panel.
2020-07-06 15:00:36 +02:00
jean-pierre charras
0d8c6d43a8
fix minor I18N issues.
2020-07-06 13:47:42 +02:00
Ian McInerney
476558ece7
Cleanup some memory leaks
2020-07-06 02:11:17 +01:00
Tomasz Wlostowski
49c37014f7
Updated copyright headers in expression evaluator code
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
0423fa1ec1
MARKER_PCB: include DRC_ITEM
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
a4eb92993a
D_PAD: remove const causing introspection build issues
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
8ffa86a63f
get it to compile after rebase
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
b3ce23f0e2
PCB_EXPR_EVALUATOR: implement isPlated virtual property
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
4e00ad9ca9
PCB_EXPR_EVALUATOR: implement onLayer() method
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
5372daaedf
OnLayer virtual property in PC_EXPR_EVALUATOR
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
af5afb5dd7
pcbnew: initial version of PCB-specific expression evaluator
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
8bb442ac37
pcbnew: try to compile 'old' DRC alongside the new prototype
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
539984229d
Temporarily disable D_PAD/MODULE GetLocalClearance property in introspection engine
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
e60055dcc5
BOARD_CONNECTED_ITEM: Don't use spaces in property nameS
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
c1d5394e46
properties: post-rebase fixes
2020-07-05 22:44:38 +02:00
Maciej Suminski
04728278c0
Updated classes meta-data to take advantage of property replacement
2020-07-05 22:44:38 +02:00
Maciej Suminski
a988cab84e
Net & net class properties
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
5bc6389477
Comments.
2020-07-05 19:53:04 +01:00
Jeff Young
40d8cb1a19
Fix missing reference found in code review.
2020-07-05 19:53:04 +01:00
Jeff Young
edecfaa433
Minor code cleanup.
2020-07-05 19:53:04 +01:00
jean-pierre charras
82da739786
Better calculations in TransformRoundChamferedRectToPolygon().
...
the old calculations was creating a slightly too small shape for rounded corners.
Now the polygon is outside the perfect shape (as required to create a shape with clearance)
Fixes #4805
https://gitlab.com/kicad/code/kicad/issues/4805
2020-07-05 19:32:07 +02:00
Jon Evans
3ebd5b317b
Don't try to switch projects during autosave
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4800
2020-07-05 11:02:48 -04:00
jean-pierre charras
1463dd10b2
Pcbnew fix: Select/Expand Connection can be used only once on the same segment
...
Was due to a incorrect cleared flag in calculations.
Fixes #4767
https://gitlab.com/kicad/code/kicad/issues/4767
2020-07-05 12:42:12 +02:00
Jon Evans
2f4a14a57b
Properly exclude colorless GAL layers
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4793
2020-07-03 23:23:58 -04:00
Jon Evans
0148c1db84
Support layer switch hotkeys while routing
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4699
2020-07-03 19:49:19 -04:00
Jon Evans
3d7610d6b9
Hide PNS debug graphics behind an AC key
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4061
2020-07-03 19:33:36 -04:00
Jon Evans
a9e97848dd
Fix use after free on BOARD_DESIGN_SETTINGS
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4792
2020-07-03 19:13:06 -04:00
jean-pierre charras
286c36b7da
gl_utils.h: fix compil issue on Windows
...
__WINDOWS__ is defined in wxWidgets.
the right preprocessor symbol is _WIN32 for Windows 32/64 bits
2020-07-03 17:12:36 +02:00
Thomas Pointhuber
7ba6a77c94
Improve arc geometry manager to choose the direction which makes more sense
...
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.
2020-07-03 15:05:17 +00:00
Jon Evans
4dbbe1cf68
Project settings fixes from review
...
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
2020-07-02 22:08:54 -04:00
Jon Evans
fe5959b625
Remove the schematic and board backup file system
...
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users. The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
2020-07-02 22:08:54 -04:00
Jon Evans
b592a4169f
Update project template system for new format
2020-07-02 22:08:54 -04:00
Jon Evans
12b4a55ae8
Port Eeschema to new project settings
...
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans
c0aa6965de
Migrate PcbNew project settings to new framework
...
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans
a4fadfcdf2
Begin moving project file load to new system
2020-07-02 22:08:54 -04:00
Jon Evans
a7708fa6dc
Add PROJECT_FILE and basic load/unload methods
2020-07-02 22:08:54 -04:00
Ian McInerney
c27207500d
Cleanup some compiler warnings
2020-07-03 00:10:31 +01:00
Jeff Young
2cfd6ba978
Fix a couple of integer overflows.
2020-07-02 22:52:37 +01:00
Jeff Young
eb1ff80d57
SHAPE collision fixes.
...
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors. Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE. SHAPE_POLY_SET
shouldn't be any different. (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01:00
Seth Hillbrand
54aaade47e
'const void' is not a return type
2020-07-02 11:43:18 -07:00
Seth Hillbrand
d663be853f
Explicitly add signed/unsigned comparison to warnings
2020-07-02 10:54:34 -07: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
jean-pierre charras
af8f05d570
Fix incorrect calculation of pad bounding box
...
Fixes #4776
https://gitlab.com/kicad/code/kicad/issues/4776
2020-07-02 11:33:07 +02:00
Jon Evans
f8bfb2bc16
Fix several issues with multilayer zones
...
- Properly refill if layer set is modified
- Fix some threading issues with island removal
- Fix copy constructor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4765
2020-07-01 20:51:44 -04:00
jean-pierre charras
bba5cfe17e
fix a minor compil warning
2020-07-01 18:52:42 +02:00
jean-pierre charras
8d18f289c7
remove a message printed only for debug/test.
2020-07-01 18:52:42 +02:00
Jeff Young
424d551054
Cache pad bounding boxes for performance.
...
Also allows us to return to a LOD test for pad numbers which treats
round and square pads the same.
2020-07-01 16:57:00 +01:00
Jeff Young
3b764d6357
Minor dialog spacing issues.
2020-07-01 16:57:00 +01:00
Jeff Young
8c4bfed001
Slight improvement on function names.
2020-07-01 16:57:00 +01:00
jean-pierre charras
3993181de5
D_PAD::BuildEffectiveShapes(): fix incorrect rect shape size for rect pads
...
rotated by +-90 deg
Noticeable in PnS router.
Fixes #4771
https://gitlab.com/kicad/code/kicad/issues/4771
2020-07-01 16:06:31 +02:00
Jeff Young
7b042f4a75
Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
...
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.
Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.
The Aux Origin tool can come back once we have multi-select toobar
buttons.
Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jon Evans
32b7b0c617
Fix filled zone rotation and move operations
2020-06-30 22:26:30 -04:00
Jeff Young
40847c055d
Check final corner of rectangle before merging.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4766
2020-06-30 21:01:51 +01:00
Jeff Young
40a72d9530
Add SH_RECT handling to 3D shape conversion.
...
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.
Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
jean-pierre charras
42296d7eb9
fix issues in DRC and fill zone, related to recent changes in code.
...
Note also: the actual clearance between 2 pads when < minimal clearance
is incorrectly calculated.
2020-06-30 12:59:26 +02:00
Jon Evans
49c7ba6724
Make it easier to select keepouts
2020-06-29 20:37:57 -04:00
Jeff Young
e91b7cf18f
Separate the two offset strategies for PointEditor Pad editing.
...
This doesn't indicate what I think we should do with them; it will
just make whatever we decide easier to do.
2020-06-29 23:25:13 +01:00
Jeff Young
d67f404dec
Fix undo issue with merging lines into rectangles.
2020-06-29 22:58:05 +01:00
Jeff Young
36e94773a3
Adjustments to point-editing of pads.
...
1) Don't offset pad with no hole and no offset: move them instead.
2) Don't allow editing of locked pads in board editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153
2020-06-29 19:22:38 +01:00
Jon Evans
44f3cdb31e
Fix a few issues with zone islands
2020-06-29 12:16:37 -04:00
Jeff Young
9cbcf3fe56
Improve pad annotation for custom-shaped pads.
...
Use the bounding box instead of the anchor pad size for determining
LOD and size/location of annotations.
2020-06-29 12:48:55 +01:00
Jeff Young
8ac3a3cbc0
Replace missing "sketch text" option from ModEdit View menu.
2020-06-29 12:08:11 +01:00
Jeff Young
516de9c85e
Point editor hookup for non-custom-shaped pads.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2153
2020-06-29 11:50:44 +01:00
jean-pierre charras
a229e51962
Pcbnew: fix incorrect clearance of oval pads in zone fill.
...
(The clearance value was only half of the correct value)
2020-06-29 09:57:36 +02:00
Seth Hillbrand
224b41e8b1
Fix a threading segfault when filling zones
...
The shape cache gets reset by the zone fill algorithm. This needs to be
cleaned before multiple threads are created and cannot be modified when
threading.
Fixes https://gitlab.com/kicad/code/kicad/issues/4723
2020-06-28 11:12:31 -07:00
Jon Evans
65f5ebd8f2
ADDED: Persistent selection filter UI for PcbNew
2020-06-28 15:12:47 +00:00
Jon Evans
1d5e4f86af
ADDED: Copper zone island removal is now configurable
...
ADDED: Zones and keepouts can now be named (for DRC)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4392
2020-06-28 09:09:38 -04:00
Jon Evans
0d4ee39f75
CHANGED: Copper zones can be on more than one layer
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Jon Evans
0b34cea3d5
Add an optional name property to zones
2020-06-28 08:51:57 -04:00
jean-pierre charras
67f46a0bb1
Gerber plotter: Better object attributes handling when plotting a zone
...
- Clear object attributes before and after plotting a zone.
It avoid using previously defined object attributes when plotting the next zone,
and using therefore incorrect attributes.
- Add aperture attribute to filled zone solid polygons (regions in Gerber)
2020-06-28 12:29:36 +02:00
Jon Evans
bd19c580f4
Add configuration for cross-probing behavior
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2317
2020-06-27 22:48:48 -04:00
Jon Evans
9795d30f12
Fix iteration issue in physical stackup editor
...
Also switch to KiCad color chooser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4735
2020-06-27 21:42:09 -04:00
Jeff Young
304328ca13
Fix Linux compile error.
2020-06-27 22:27:49 +01:00
Jeff Young
367fd79b5f
Don't try and second-guess the user.
...
(Especially now that polygons are useful on copper layers for custom
pad shapes.)
2020-06-27 22:08:13 +01:00
Jeff Young
6acd35c981
Cleanup.
2020-06-27 20:07:26 +01:00
Jeff Young
32c3ea4edd
Flags cleanup.
...
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).
Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.
Remove obsolete HIGHLIGHT infrastructure (we now use selection).
Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Jeff Young
da2b7071b4
WYSISYG custom pad editor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2153
Fixes https://gitlab.com/kicad/code/kicad/issues/2305
2020-06-27 14:37:01 +01:00
Jon Evans
129c16cf7d
Fix unselected event not firing when clicking empty space
2020-06-26 22:00:12 -04:00
Ian McInerney
17adb6c3c6
Add context menu to route and zone toolbar items
...
ADDED: Context menu for route and zone toolbar items
2020-06-26 21:29:03 +00:00
Ian McInerney
fb10406e67
Add right-click context menus for toolbar items
2020-06-26 21:29:03 +00:00
Ian McInerney
52856a8ce4
Move scaled toolbar separator into ACTION_TOOLBAR
...
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00
Peter Montgomery
19b7755ab7
Coverted Gerbview files to version in master so hotkey_rollover repo only contains changes for the hotkey fix
2020-06-25 22:43:29 +00:00
Seth Hillbrand
4ef02fd699
Replace TTL delauney triangulator
...
Removes the TTL triangulator in favor of the delaunator triangulator.
This removes the only AGPL code in the KiCad codebase and therefore
allows the full project to be licensed under the GPLv3.
2020-06-25 18:45:27 +00:00
jean-pierre charras
c9715ce304
class_pad.h: mark m_shapesDirty true after a move to force rebuild shapes after a move.
...
Fix also a few comments.
Fixes #4719
https://gitlab.com/kicad/code/kicad/issues/4719
Fixes #4720
https://gitlab.com/kicad/code/kicad/issues/4720
2020-06-25 20:07:51 +02:00
Seth Hillbrand
a893d19d26
pcbnew: Allow slow ratsnest to turn off
...
Depending on where you move the selection, the slow ratsnest might turn
on. This prevents that setting from being sticky, reverting to smooth
movement.
2020-06-24 17:16:07 -07:00
Seth Hillbrand
b02d3f683f
Adding documention comments for dynamic ratsnest
2020-06-24 15:17:01 -07:00
Seth Hillbrand
4c5f3cb5be
Fix crash when moving non-connected
...
Non connected items do not have netcodes, so shouldn't be included in
the calculation for ratsnest
2020-06-24 14:22:01 -07: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
Seth Hillbrand
1a7c270dcd
Fix invalid dereference on first highlight
...
When highlighting nets we don't save the previous net when there isn't a
previous net highlighted.
2020-06-23 20:36:05 -07:00
Seth Hillbrand
141bf4f579
Tighten the bicolored routine
...
Eliminates some duplicate code into a lambda
2020-06-23 16:48:24 -07:00
Seth Hillbrand
e8fc421a39
Update NearestBicoloredPair to m log(n) search
...
Instead of iterating over full set, use sweep line algorithm to limit
the number of nodes needed to be searched. This improves the speed of
the dynamic ratsnest.
2020-06-23 16:17:35 -07:00
Seth Hillbrand
214a9d53b0
Update ratsnest conn to multiset
2020-06-23 14:39:45 -07:00
Seth Hillbrand
a2ad84f84d
Revise Kruskal implementation
...
This updates the Kruskal algorithm to a faster variant utilizing a
compressed disjoint set and heap
2020-06-23 14:35:23 -07:00
Jon Evans
2ab9ceaf02
Pick up net for new zone from selection if no net is highlighted
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4706
2020-06-23 17:16:34 -04:00
Jeff Young
18ab3c4714
Fix missing user grid in COMMON_TOOLS.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4702
2020-06-23 11:17:15 +01:00
Seth Hillbrand
104ff29e5f
Remove delauney computations from dynamic ratsnest
...
Avoids additional calculations on movement by using cached ratsnest for
internal nets and keeping bicolored line calc for others.
Fixes https://gitlab.com/kicad/code/kicad/issues/1865
2020-06-22 20:37:31 -07:00
Jeff Young
d01b29ab37
Cleanup pad geometry handling.
...
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.
This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jeff Young
c57c21f577
Pad bounding radius is from pad centre, NOT shape centre.
2020-06-22 20:36:54 +01:00
Jon Evans
c0175c48af
ADDED: Setting to control track mouse drag behavior
...
Default is now to perform a 45-degree drag
2020-06-21 15:39:39 -04:00
jean-pierre charras
55e283634a
Pcbnew, DIALOG_PLOT_BASE: better warning message about non null solder mask margins.
2020-06-21 20:41:06 +02:00
Jon Evans
713cd4a47a
Point editor: show dragged points with a highlight
...
Take points editor colors from color theme
Also fix an issue where the edited object sometimes didn't
update when a point is dragged.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4600
2020-06-21 14:43:41 -04:00
jean-pierre charras
7240b3e4d3
PCB_PAINTER for D_PAD: for round and oval shapes, use native gal draw functions,
...
instead of convert shapes to polygons.
For small pad sizes (< 0.5mm) the polygonal shape is really ugly.
Moreover, circles and oblong shapes are native in gal and give a much better look.
2020-06-21 19:47:26 +02:00
Jon Evans
a16c9df79c
Delete the right object in arc cleanup
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4694
2020-06-21 13:03:14 -04:00
jean-pierre charras
ad69e449fe
Fix a collision name in drawing_tool.h with a msys2 header
2020-06-21 10:36:01 +02:00
Jeff Young
970921f88b
Support for filled DRAWSEGMENT::S_RECT and S_CIRCLE.
...
One more step in unifying pad primitives and draw segments.
2020-06-20 14:34:53 +01:00
Jeff Young
986c1a27cd
Make sure line widths (and clearances) are handled on rectangles.
2020-06-20 14:34:53 +01:00
Jeff Young
7877e4083e
Don't match to an unknown layer.
2020-06-20 14:34:53 +01:00
Jeff Young
9ba9f0288e
Read files with rectangle primitives in custom pads.
2020-06-20 14:34:53 +01:00
Jon Evans
09cb75b8a1
Use a temporary file when saving boards/schematics to make the operation more atomic
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4517
2020-06-19 23:31:26 +00:00
Jeff Young
b779715996
Don't whack original pad shape when converting to custom.
...
Rectangles and circles convert easily, but a chamfered rectangle
(for instance) needs more careful handling.
2020-06-19 14:10:41 +01:00
Jon Evans
e91b9f6dfb
Rip out the unused leftovers of the old color system
2020-06-18 22:32:14 -04:00
Seth Hillbrand
32738862b8
Fix build error in linux
2020-06-18 09:52:04 -07:00
Jeff Young
76d1b8bfa1
Make sure selectors match against user layer names.
...
Also allows for user specification of units in rule constraints.
2020-06-18 15:38:01 +01:00
Jeff Young
cae493fe65
More infrastructure work for shape editor.
2020-06-18 15:38:01 +01:00
Jeff Young
ee9d8fcd15
Collapse Pcbnew & ModEdit display and edit settings.
...
(Prep work for reusing them with a custom shape editor.)
2020-06-18 15:38:01 +01:00
Seth Hillbrand
08c61e6788
Ensure triangulation follows moving zone
...
Dragging filled zones in OpenGL was extremely slow due to the
invalidated triangulation cache. Moving the zone should also move the
triangles and keep the cache valid.
2020-06-17 19:43:11 -07:00
Seth Hillbrand
eb89d1c68b
pcbnew: Minor update to ratsnest calc
...
BuildConnectivity updates the ratsnest after it completes. By compiling
the ratsnest before connectivity, we update it twice with the dirty flag
being reset after connectivity updates.
2020-06-17 19:43:11 -07:00
Jeff Young
f31139ac48
Don't copy from a running Pcbnew now that we have settings.
...
Also fixes an issue where if Pcbnew wasn't run before the symbol
chooser (with the footprint preview active) you'd get no grids (and
a crash on non-OSX platforms).
Fixes https://gitlab.com/kicad/code/kicad/issues/4670
2020-06-17 19:02:42 +01:00
Jeff Young
a7703d1207
Cleanup Graphics to parallel Cleanup Tracks & Vias.
...
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
Jeff Young
a3cab09fb4
Make it clearer that drawSegment() can modifiy the current seg pointer.
...
This might also quiet the Coverity warning, but I've also marked it as a
false positive (as it might still mess up on the new code).
2020-06-17 18:44:39 +01:00
jean-pierre charras
55c0bd7ae3
Remove a incorrect code, unfortunately not removed after another (old) code change.
2020-06-17 12:54:09 +02:00
Seth Hillbrand
8c57821e9b
pcbnew: Move ratsnest items to separate folder
2020-06-16 11:15:14 -07: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
Eli
2a334a5c59
Updates wording used in alignment submenu to make the actions clearer when icons are missing. Also reorganises the order of items in the submenu.
2020-06-15 16:49:36 +00:00
Jeff Young
ad12c42e8b
Push grid settings dialogs down into common.
...
This also gives support for fast grid switching and a user grid
to eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
jean-pierre charras
b7ec66dc9b
Gerber plotter: better choice of aperture attributes in internal layers.
2020-06-14 18:16:01 +02:00
jean-pierre charras
a8d5d9b690
panel lib tables: avoid crash when deleting the last entry in list.
2020-06-14 17:39:32 +02:00
Seth Hillbrand
461d0e9a49
Unify rounding in altium to KiCad converter
...
This fixes an issue in the integer conversion that caused truncation
errors. Handling the conversion from micromil to nanometer using
doubles keeps intermediate values correctly rounded. There remain some
conversions that are lost where Altium rounded its metric
representation.
2020-06-14 07:53:15 -07:00
Seth Hillbrand
899496baaa
pcbnew: Remove item from edit selection in favor of parent
2020-06-14 07:29:44 -07:00
Seth Hillbrand
491ac0256d
pcbnew: Add a number of missing handles for module zones
2020-06-14 07:23:10 -07:00
Seth Hillbrand
09eee84a3e
pcbnew: Handle module zone area in delete
...
Selections containing zone areas need to be handled separately by
modifying the parent rather than the item itself
Fixes https://gitlab.com/kicad/code/kicad/issues/4653
2020-06-14 07:05:14 -07:00
Jeff Young
c48f4272f3
Collapse a level out of the zoom settings.
...
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young
47ab7c78a6
Divorce GRID_HELPER from the parent frame.
...
This moves GRID_HELPER fully into the tool framework.
2020-06-13 22:44:16 +01:00
Seth Hillbrand
4d4d24fc61
Don't snap to arc midpoints
...
This removes the extra snap points in the arcs, ensuring the endpoint
snaps connect to the correct location on an arc.
2020-06-13 11:23:14 -07:00
Seth Hillbrand
a8ab668122
Move SHAPE_ARC to start->mid->end format
...
The arc shapes need to connect with their adjacent points. By storing
the relevant points, we allow exact point matching on both ends of the
arc as well as localize point storage.
2020-06-13 11:23:14 -07:00
Seth Hillbrand
951eaa13fe
pcbnew: Fix arc track length calculation
2020-06-13 11:23:14 -07:00
Jeff Young
f84406009b
Push a couple of layers of indirection out of grid settings.
2020-06-13 11:35:56 +01:00
jean-pierre charras
2b122892d3
DIALOG_PAD_PROPERTIES: fix some issues:
...
- fix many wxWidgets alerts.
- ensure pad offset wxTextCtrs are shown or not according to the wxCheckBox state.
- ensure there is room in dialog for some wxTextCtr when switched from Hide to Show
(resize it if it is too small)
2020-06-11 20:34:13 +02:00
Jeff Young
4629b701ea
Fix spacing issue in Pad Properties.
2020-06-11 18:26:44 +01:00
Wayne Stambaugh
c5fc1d4a7c
More dialog clipped bitmap button fixes.
2020-06-11 07:31:50 -04:00
jean-pierre charras
8bd9b26717
ZONE_CONTAINER, display info: fix incorrect layer of zones on user layers.
...
Add also display on hatch count and filled polygons corner count, previously removed,
but useful for large and complex zones (that can take a lot of computation time
for DRC and display).
2020-06-10 21:01:44 +02:00
Wayne Stambaugh
ee8cf01ff5
Pcbnew: fix issue when updating board from schematic.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4607
2020-06-10 14:21:46 -04:00
Jeff Young
d7d877241a
More explicit type conversion to attempt to fix GCC compile issue.
2020-06-10 13:41:45 +01:00
Jeff Young
4138c8554c
Parse DRC rules when closing Board Setup dialog.
2020-06-10 12:03:37 +01:00
jean-pierre charras
2401ed587e
eeschema, pcbnew: fix too narrow window showing the item color list
...
Fixes #4610
https://gitlab.com/kicad/code/kicad/issues/4610
2020-06-09 20:05:38 +02:00
Jan Mrázek
3091bb1459
eagle: Change font size calculation
...
Eagle includes stroke thickness into font size, KiCAD does not. Remove
the hack with scaling down the font, compute size precisely.
CHANGED: Fixed font calculation in Eagle import
2020-06-09 15:30:04 +00:00
Jan Mrázek
e34a01dc68
eagle: Make semantics of cutout correct
...
Eagle cutout polygons only restrict filled copper, they do not limit
tracks, vias and pads inside them. Fix this behavior in the Eagle
import.
CHANGED: Fix semantics of Eagle cutout polygons
2020-06-09 15:30:04 +00:00
jean-pierre charras
64231a8491
fix a minor wxWidgets alert and a outdated comment.
2020-06-09 14:12:38 +02:00
jean-pierre charras
f8967550a8
PANEL_FP_LIB_TABLE: fix incorrect size of the SPLIT_BUTTON.
...
This was due to use of a not yet calculated of a bitmap button.
At least on msw just after setting the bitmap of a bitmap button
the actual size is not yet calculated: it is calculated after calling Layout()
2020-06-08 10:19:31 +02:00
jean-pierre charras
27c80e8a2e
Solder mask clearance default value: set default to 0, taking advice from
...
both Ucamco and Eurocircuits.
Update message in plot dialog about best solder mask clearance value.
Show warning in plot dialog if these values are no 0.
2020-06-07 11:10:28 +02:00
Thomas Pointhuber
25eb88636f
eagle: handle TRESTRICT, BRESTRICT and VRESTRICT consistently
2020-06-07 00:16:04 +00:00
Thomas Pointhuber
23cc51a53f
eagle: add support for tRestrict, bRestrict and vRestrict on circle
...
Fixes #1869
https://gitlab.com/kicad/code/kicad/-/issues/1869
2020-06-07 00:16:04 +00:00
Thomas Pointhuber
22860b6e7a
eagle: add support for tRestrict, bRestrict and vRestrict on polygons
...
Fixes #2451
https://gitlab.com/kicad/code/kicad/-/issues/2451
2020-06-07 00:16:04 +00:00
Thomas Pointhuber
54decd8afb
eagle: add support for tRestrict, bRestrict and vRestrict on rectangles
...
Fixes #2451
https://gitlab.com/kicad/code/kicad/-/issues/2451
2020-06-07 00:16:04 +00:00
Ian McInerney
9d0ea66a96
Don't use the accelerator table in the menubars
...
It seems that the accelerator table causes issues with
keyboard events on MSW.
Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Jon Evans
94cd0cf3ad
Fix accidental logic change to BOARD::InsertArea
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4474
2020-06-06 15:26:49 -04:00
jean-pierre charras
74051be3b7
pcbnew, DIALOG_PLOT: fix a cosmetice issue: a SVG option was sometimes shown
...
when the PDF plotter was selected.
2020-06-06 20:50:24 +02:00
Jon Evans
2cbae18598
Remove PCBNEW_SETTINGS dependence from PCB_PLOT_PARAMS
2020-06-06 13:57:28 -04:00
Paul Ewing
40250c427a
Expose the footprint library table to Python
2020-06-05 22:21:41 +00:00
Jeff Young
fb4f37f39c
Inherit GAL settings from parent's GAL.
2020-06-05 19:07:23 +01:00
Jeff Young
80c0e0080f
Move layout updating out of OnUpdateUI to prevent endless looping.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4623
2020-06-05 17:45:25 +01:00
Ian McInerney
4357c1d3b3
Coverity and compiler warning fixes
...
* Initialize variables
* Test dynamic casts
Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Seth Hillbrand
1c46bf1955
PNS: Use segment shape for all oval pads
...
Instead of calculating a simple polygon for the oval pads that are
rotated, we use a rotated segment.
Fixes https://gitlab.com/kicad/code/kicad/issues/4604
(cherry picked from commit 25b8da8e3b
)
2020-06-04 20:29:25 -07:00
Seth Hillbrand
674226f99f
pcbnew: Set flag when cancelling during routing
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4475
2020-06-04 15:48:01 -07:00
Seth Hillbrand
e7dfa91525
pcbnew: Use duplicate structure to allow deleting
...
Removing items from the structure will invalidate the iterators so we
need to either stage the deletions or keep a duplicate structure for the
iteration.
Fixes https://gitlab.com/kicad/code/kicad/issues/4257
2020-06-04 10:44:36 -07:00
Jeff Young
f4d8c30f9a
Tighten DRC epsilon value until we decide what to do about it.
2020-06-04 18:28:48 +01:00
jean-pierre charras
a29b3eb017
Eeschema, DIALOG_EDIT_ONE_FIELD: fix incorrect behavior for footprint field,
...
when initialized from the footprint viewer.
Fixes #4609
https://gitlab.com/kicad/code/kicad/issues/4609
2020-06-04 18:47:12 +02:00
Jeff Young
7876bab0e0
Implement another shape choice for Chamfer + Rounded.
2020-06-04 17:28:46 +01:00
Wayne Stambaugh
0032845f9e
Fix clipped bitmap buttons with GTK on Linux.
...
A note to developers, please do not set the minimum and/or size of bitmap
buttons. It causes bitmaps to get clipped using GTK on Linux. If the
bitmap button size is not acceptable, then supply an appropriately sized
bitmap rather than attempt to force the wxWidgets sizing mechanism to do
what you want. This almost always causes platform differences that do
not work well.
2020-06-03 14:01:44 -04:00
Jeff Young
36d197d8b6
Increase pad clearance test epsilon to polygonization max error.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4604
2020-06-03 18:47:19 +01:00
Jeff Young
8575afd7ef
Adjust spacing in dialog for non-OSX platforms.
2020-06-03 16:34:09 +01:00
Jeff Young
b8e4f4bfc4
Attempt #1 to fix layout issue on GTK (and perhaps MSW).
2020-06-03 16:28:08 +01:00
Ian McInerney
a843c74529
Add new kiplatform library for platform-specific code
...
* Implement ReparentQuasiModal for OSX natively
* Implement ForceFocus of OSX natively
This change means we no longer rely on the kicad-specific functions in our osx wx fork.
2020-06-03 14:58:54 +00:00
Jeff Young
7db4a3f702
Fix offset issue when pad edited from board instead of modEdit.
2020-06-03 13:50:50 +01:00
Jeff Young
d2cd4de280
Allow rules to operate on hole when hole-to-track testing.
2020-06-03 12:11:50 +01:00
Jeff Young
3bd4c0c5dc
Don't allow the pad preview canvas to become too large.
...
Also offset canvas with pad so that hole stays in centre.
Fixes https://gitlab.com/kicad/code/kicad/issues/4185
2020-06-02 22:51:41 +01:00
Jeff Young
9ff09aa784
Progressive disclosure pad properties.
2020-06-02 17:22:24 +01:00
Jeff Young
7aaf72c473
Improve visuals of html error reporting.
2020-06-01 22:00:03 +01:00
Jeff Young
a76a1aefaa
Update membership grid when a netclass name changes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4596
2020-06-01 22:00:03 +01:00
jean-pierre charras
eae0c142fe
Eeschema, DIALOG_PLOT_SCHEMATIC: fix incorrect unit of default pen width.
...
The default line width used to set the default pen width is given in mils,
and the conversion to iu was missing.
Fix also a minor Coverity warning.
Fixes #4594
https://gitlab.com/kicad/code/kicad/issues/4594
2020-06-01 16:08:46 +02:00
jean-pierre charras
e3c3dae776
Fix PCBnew crash when show local ratsnest and selecting a footprint with no pads
...
Fixes #4506
https://gitlab.com/kicad/code/kicad/issues/4506
2020-06-01 09:09:40 +02:00
Jeff Young
112316cdfb
Fixup kiway by hand when dynamic_cast fails.
...
Also allows a shortened version of Configure Paths without the 3D
paths when Pcbnew isn't already running.
Fixes https://gitlab.com/kicad/code/kicad/issues/4568
2020-05-29 22:06:48 +01:00
Jeff Young
6d5b6c8b81
A bit more refactoring to get code out of the DRC tool.
2020-05-29 22:06:48 +01:00
Jon Evans
5250215d97
Use the calculated bbox for zoomFitSelection
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4120
2020-05-29 16:38:25 -04:00
Jeff Young
39ec63c4e9
Fix some inconsistencies in clearance priorities.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4555
2020-05-29 13:41:45 +01:00
Jeff Young
9f2be3714f
Add unresolved variable testing for worksheet items.
2020-05-28 17:36:22 +01:00
Jeff Young
fe4fd19c66
Fix crash bug in unicode chars with Scintilla.
2020-05-28 00:23:18 +01:00
Jeff Young
8b084c373e
Autocomplete for text variables.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-27 23:29:51 +01:00
jean-pierre charras
53360acc3d
DIALOG_BOARD_SETUP: fix incorrect parent for the PANEL_TEXT_VARIABLES panel.
...
Fixes #4548
https://gitlab.com/kicad/code/kicad/issues/4548
2020-05-27 09:24:32 +02:00
jean-pierre charras
bf889e91fe
PANEL_SETUP_RULES: make rules help translatable.
...
Only titles are translatable.
Other strings are keywords and remain not translatable.
2020-05-27 08:52:03 +02:00
Jon Evans
39a2416c11
Only sketch pads on fab layers if they exist on that side
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4546
2020-05-26 21:17:39 -04:00
Jon Evans
d46c651d80
Only update colors on layer widget when closing preferences
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4545
2020-05-26 21:17:39 -04:00
Jeff Young
e61185775f
Implement testCopperDrawItem() for POLYGON draw items.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4549
2020-05-26 23:48:21 +01:00