Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Selection larger than drawn #715

Closed
demisjohn opened this issue Jan 28, 2021 · 7 comments
Closed

Object Selection larger than drawn #715

demisjohn opened this issue Jan 28, 2021 · 7 comments
Labels

Comments

@demisjohn
Copy link

demisjohn commented Jan 28, 2021

When dragging to select multiple objects, the actual selection rectangle is invisibly larger than what is drawn on screen.
Here is a video showing this.

v26p8.-.selection.area.too.large.mov

This is an array of circle-like polygons, you can see where I end the selection box, but objects are selected in an area larger than I expected.

(Klayout v. 0.26.9, Mac OS 10.14.6, MacBook Pro "MacBookPro14,2")

@klayoutmatthias
Copy link
Collaborator

Cool .. I did not know you can add videos too.

Maybe the circles are within an instance which is rotated?

If so, the explanation is that the selection rectangle gets transformed "into" the instance. But as it stays a rectangle it will get larger - the bounding box of a rotated rectangle is bigger than the original.

If so, I'm afraid to fix that the concept of the "selection rectangle" had to be extended to a "selection polygon". That's a more difficult topic then. Not impossible, but requires some effort.

@demisjohn
Copy link
Author

demisjohn commented Mar 2, 2021

Actually @klayoutmatthias , no - this is a single-cell (flattened) file. No instances, so coordinate system should be same as the top cell.
It is a 250MB file - here is a link to the GDS in question to test the issue yourself.
https://drive.google.com/file/d/1-Hb8RgUaIyyx1mAqIFlFc7IFNe59fj8b/view?usp=sharing

@klayoutmatthias
Copy link
Collaborator

@demisjohn Sorry, I missed this ticket and it deserves a response.

There is a parameter called "capture range":

image

It expands the selection box by the specified number of pixels. If you set it 0, the captured shapes should all be inside the box selected.

Matthias

@demisjohn
Copy link
Author

Yes that was indeed the issue - thanks! I assume it's set greater than 0 to start because there is some case in which this is important. This explains some confusion I have previously had over the selection-box, where I hadn't been able to always predict exactly what would be selected, requiring me to zoom in in order to do more careful selections between adjacent objects.

@demisjohn
Copy link
Author

@klayoutmatthias
I see the issue with the "Capture range to mouse cursor" setting:

  • If it is set to 0, then clicking with the mouse is unable to select an object,
  • however, setting it to 0 makes Dragging a selection box invisibly larger than drawn on the screen.

Possibly remedies:

  1. Split "capture range" into 2 separate settings: one for clicking, and one for dragging. I assume this would be a lot of work and bug fixing.
  2. Make the Selection Box, that is drawn dynamically during a Drag, draw the real selection window (include the capture range in what is drawn). It should draw a larger selection box than just where you clicked to begin with. The selection box is not invisible this way, but actual behavior is the same.

@demisjohn demisjohn reopened this Apr 16, 2021
@klayoutmatthias
Copy link
Collaborator

Solution 1 was actually easier. This is how the options look like now:

image

The first range applies to single clicks. The second one to boxes. Default for boxes is 0 so only things really inside the box get selected.

@demisjohn
Copy link
Author

Very nice, looks good. Impressively fast fix!

klayoutmatthias added a commit that referenced this issue Apr 19, 2021
Fixes #715 (selection box larger than drawn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants