Commit Graph

9177 Commits

Author SHA1 Message Date
Tomasz Wlostowski 89a953e039 Migrated GetEffectiveShape(s) to SHAPE_COMPOUND 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 85aecc15ee router: fix mistake in 45/free-angle mode selection when dragging corners 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski c2b9db293f router: prevent heap crash when initial walkaround line is empty 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 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