Fix/isolation geometry and numpad zoom - #5
Open
spaxxomatic wants to merge 2 commits into
Open
Conversation
…settings Geometry.isolation_geometry() (and get_exteriors()/get_interiors()) return a plain list of BaseGeometry rather than a Shapely Multi* geometry. When generate_envelope() was called with invert=False (i.e. the default climb milling setting, tools_iso_milling_type="cl"), that raw list was returned as-is instead of being normalized into a single geometry object. The caller in combined_normal() then appended the whole list as one element of solid_geo (since it isn't a MultiLineString/MultiPolygon instance), and flatten_shapely_geometry() raised AssertionError on that nested list when run with the default "Complete" isolation type (iso_type=2) and default climb milling. Normalize geom_shp into a single geometry via unary_union() whenever it's a list, regardless of invert, so downstream code always receives a proper Shapely geometry as documented.
Zoom In is bound to the '=' key (Key_Equal) and Zoom Out to '-' (Key_Minus). Key_Minus is shared between the main keyboard row and the numpad, so Zoom Out already works from the numpad. Key_Plus (numpad +) has no such overlap with Key_Equal, so Zoom In had no numpad equivalent and could be awkward to reach on non-US keyboard layouts where '=' isn't a dedicated key (e.g. German layouts, where it's Shift+0). Accept Key_Plus alongside Key_Equal in the main view and in the Geometry, Gerber, and Excellon editors, mirroring how Zoom Out already behaves.
Owner
|
Would you please consider sending this fix upstream? |
Author
|
I don't get it, what should I do ? |
Owner
|
Send the PR to https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_1.0 (which is the upstream). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed a crash during isolation routing, added numpad keys + and - for zoom in / out since '=' does not work on a german keyboard