The previous fix for optimizer breakout length calculation was providing
better scores to longer traces rather than longer breakouts as intended.
This limits the length scoring to breakout only.
The oval clearance adds an edge on the 0-length side of a circular oval.
This is not needed and can affect the fill algorithm. Instead, we treat
round ovals as circles for pad polygons
Fixes: lp:1849846
* https://bugs.launchpad.net/kicad/+bug/1849846
(cherry picked from commit 57f0f88552)
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.
This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.
BLOCK elements in DXF are re-usable bits that are useful when editing
the file but should not be shown when importing the model. This skips
all references except those that exist in the default "*Model_Space".
This block is required in each DXF file and cannot be renamed.
Fixes: lp:1790821
* https://bugs.launchpad.net/kicad/+bug/1790821
Flipped footprint pads may report their "primary" layer as not the front
layer in high contrast. We need to check whether the board item for
snaps is visible on the active layers.
Fixes: lp:1847877
* https://bugs.launchpad.net/kicad/+bug/1847877
In ZONE_CONTAINER( ZONE_CONTAINER& aOther ), the net info was set before zone type and layer were set.
So the net info was always set to ORPHAN net, instead of set to aOther net info.
Especially, it broke undo/redo function.
Fixes: lp:1840727
https://bugs.launchpad.net/kicad/+bug/1840727
The fracture routine introduces degenerate points that are healed by the
Clipper Polygon simplify command. This is normally fine but in the case
of hatched areas, there are thousands of degenerate points, which is
very slow in Clipper. Healing the degenerate points first before
simplifying and fracturing is much faster.
Fixes: lp:1847764
* https://bugs.launchpad.net/kicad/+bug/1847764
This margin is mandatory to avoid incorrect polygons in Gerber files:
due to the fact Gerber units can be 10 nm (and Gerbview internal unit is also 10nm), valid polygons
can be converted to non valid (self intersecting for instance) by coordinates truncation.
This is a known problem in Gerber files (not specific to Gerber format)
Fixes: lp:1847737
https://bugs.launchpad.net/kicad/+bug/1847737
The router items may not yet have a board item parent. In this case,
the reference to the parent needs to be guarded before dereferencing.
Fixes: lp:1847717
* https://bugs.launchpad.net/kicad/+bug/1847717
Therefore, for some footprints, the right footprint was not associated to the component.
The hash calculation was using a XOR to combine 2 sub hash values.
This is not a strong way to combine these hash values.
They are now added. Looks better to identify similar and different footprints.
Fixes: lp:1847575
https://bugs.launchpad.net/kicad/+bug/1847575
Items and layers that are hidden in the view should not be used as snap
points. This happens in multiple locations:
1) Grid Helper for normal tools
2) TOOL_BASE::snapToItem for router
Resolves KiPro Issue #116
Fixes: lp:1833128
* https://bugs.launchpad.net/kicad/+bug/1833128
Unlike schematic symbols, the value field and the footprint name are 2 different fields.
So coupling these fields in the DIALOG_FOOTPRINT_FP_EDITOR dialog created serious issues.
Fixes: lp:1846533
https://bugs.launchpad.net/kicad/+bug/1846533
Calling Init() in an action routine will reset the router
settings to the state they were in when first starting pcbnew.
The Init() function is automatically called when the tool is created.
Fixes: lp:1843810
* https://bugs.launchpad.net/kicad/+bug/1843810
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
* Fix wildcard display in the file selector dialog (on GTK
it would show the regex to the user)
* Move the file extension comparison into a common function
Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
* Make the events generated by the selection of context menu items
have the position where the menu was opened
* Ensure that TC_COMMAND type events have their position set to
be the cursor position where the event originated
On complex boards, the view holds a very large vector of all objects.
The dtor will remove each one, searching for the pointer before
removing. When removing all items, this process is not needed, so we
clear the view when exiting. This also prevents lock-up when closing
the full application as KiCad waits for the dtor to finish
(non-interactively). This will cause Windows to crash and Linux to
offer an option for terminating the non-responsive application.
Fixes: lp:1843092
* https://bugs.launchpad.net/kicad/+bug/1843092
the old way was not compatible with the current management if board item lists.
The crash was probably due to double deletions.
Note also the management of undo command in pcbnew_action_plugins needs serious optimization.
Fixes: lp:1844880
https://bugs.launchpad.net/kicad/+bug/1844880
The parenthesis depth is 2 when the polygon isn't closed. This
shouldn't happen but we have the fall-through to handle odd cases
Fixes: lp:1844872
* https://bugs.launchpad.net/kicad/+bug/1844872
(cherry picked from commit d862cdaa72)
Pads may include offsets that allow the user to shift the connection
point of the pad. This is captured by the pad m_Pos but not by
ShapePos(). When testing connectivity, we need to get the offset
position.
With pads, we should check available anchor points for each connection,
increasing probability of finding connection to match fill algorithm
Fixes: lp:1844661
* https://bugs.launchpad.net/kicad/+bug/1844661
The angle rotation was always negated. But this is incorrect:
The angle rotation must be negated when flipping around X axis
The angle rotation must be 180 - initial rotation when flipping around Y axis
This bug can break position files and footprint updates,
especially when mixing flipping around Y axis and flipping around X axis.
This is the behavior of previous 5.1 version.
Using the bounding box has advantages, but unfortunately in many cases the footprint position is moved.
If a lot of flip commands are made on the same footprint, it is moved far from its initial position.
This happens with wxWidgets 3.0.4 on Windows and is a side effect of a call to Layout().
The fix just calls Layout() only when needed.
Fixes: lp:1843594
https://bugs.launchpad.net/kicad/+bug/1843594
Eagle includes the width of the polygon line when generating polygon pad
sizes where KiCad does not. This simple fix inflates polygon pads half
of the Eagle polygon line width.
Fixes lp:1833687
https://bugs.launchpad.net/kicad/+bug/1833687
panel_board_stackup.cpp: material selection:
replace wxChoice by a better widget (wxTextCtrl+wxButton) to call the dielectric manager dialog
Move dielectric material class to a specific file
Doing so in the internals keeps users from being able to swap layer
names as the dialog does each layer name change individually.
Fixes: lp:1842665
* https://bugs.launchpad.net/kicad/+bug/1842665
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.
Fixes lp:1839565
https://bugs.launchpad.net/kicad/+bug/1839565
This makes the pcbnew multiline text editor natively accept tabs in the
same manner as eeschema and extracts key handling routines to the shim
to allow undo/redo.
Also allows Ctrl-Y under Linux in addition to other platforms. While
not as popular as Ctrl-Shift-Z, it is utilized for Redo in some contexts
Also wrap orientation instead of verifying it. This allows valid angles
that are larger/smaller than the ±180 limit.
Fixes: lp:1842654
* https://bugs.launchpad.net/kicad/+bug/1842654
The INT_MAX limit for most elements makes sense only for single-segment,
straight line elements. For elements that accumulate lengths, we should
utilize the long long int (64 bits) to allow for greater lengths.
Fixes: lp:1842367
* https://bugs.launchpad.net/kicad/+bug/1842367
While we're re-using the Text Properties dialog, it really covers all
properties for a Dimension, so it needs to be more clear what's text
and what's not. This changelist uses the Tooltips to store the more
explicit labels so they can still be edited in FormBuilder.
Setting the active layer should be tied to the events that are triggered
by the layer change and overloaded for each frame. This ties the hotkey
back to these events.
Fixes: lp:1838244
* https://bugs.launchpad.net/kicad/+bug/1838244
When we refresh a scrolled window to get the GTK scrollbars updated, we
can capture the mouse, making key-only scrolling difficult when we want
the window not focused. This resets the active focus after refresh.
Fixes: lp:1841565
* https://bugs.launchpad.net/kicad/+bug/1841565
Adds the missing default layer to the default board setups for two
layers with parts on single side (either top or bottom)
Fixes: lp:1841294
* https://bugs.launchpad.net/kicad/+bug/1841294
(cherry picked from commit 8b3a2984bf)
We need to set the footprint local coordinates of the footprint
reference and value fields at instantiation separately from the
TEXT_DIVERS elements.
Fixes: lp:1829727
* https://bugs.launchpad.net/kicad/+bug/1829727
(cherry picked from commit a43a228f78)
Previously, zones of the same net were merged for plotting,
regardless the fact the outline thickness can be different between the zones,
creating incorrect solid areas.
Fixes: lp:1840695
https://bugs.launchpad.net/kicad/+bug/1840695
When moving a group of items, the allowed snapping layers should be each
layer in the group, not just the first item's LSET.
Fixes: lp:1830164
* https://bugs.launchpad.net/kicad/+bug/1830164
This modifies that logic for optimizing pad connections.
1) Custom pads now prefer the connections to their longer side. This is
particularly important to match the behavior in a rectangular pad
2) Costs for straight lines are non-zero. This favors fewer connections
3) Custom pad breakouts are at the polygon boundary rather than offset
by 0.1mm. This also matches the circular and rectangular paradigm.
4) Line Heads contained in the pad itself are not optimized. This
prevents escaping the pad unnecessarily
Fixes: lp:1824182
* https://bugs.launchpad.net/kicad/+bug/1824182