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

Gaps: Autoclose/Autofill enhancement #1141

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

manongjohn
Copy link
Collaborator

This PR enhances the following:

  1. Allows Fill Gaps and Close and Fill Gaps options to work with Refer Visible on Smart Raster levels
  2. Adds Fill Gaps and Close and Fill Gaps options for standard Raster levels

This was accomplished by converting a raster image (rendered raster in the case of Refer Visible) into a Smart Raster image and then applying the Autoclose/Autofill logic to it. The results were then transferred back to the raster image where needed.

@manongjohn manongjohn added the 1.4 Included in Version 1.4 label Feb 28, 2023
@F-Burning
Copy link

Amazing. Thank you.

@melieconiek
Copy link
Contributor

I sometimes cannot get refer visible to work on a smart raster level if the drawing is blank. Drawing a line somewhere on the drawing seems to resolve this.

@melieconiek
Copy link
Contributor

I can't get this to work at all if I copy my current stuff folder into the PR build.

@manongjohn
Copy link
Collaborator Author

@melieconiek
I can duplicate the issue with refer visible + close/fill gaps not working on blank Smart Raster drawings. Will look into it. Seems ok with Raster drawings.

As for your current stuff folder issue, the only thing that might impact this PR would probably be the env.ini file. Maybe there is something in the settings there that is somehow impacting this? I'd need a copy to see if I can duplicate.

@melieconiek
Copy link
Contributor

FYI, I think the stuff folder thing was the blank drawing bug. The drawing, line thickness, default resolution, etc I was testing on was different and that seemed to break it. For this one I had to hand draw a circle all the way around the drawing to get it to work. Using the geometry tool to draw a circle didn't work, oddly enough.

@melieconiek
Copy link
Contributor

This is a very common fill error when using this tool:
image

I'll pm you the project file.

@melieconiek
Copy link
Contributor

Sometimes, when using a tablet pen, this tool will execute a fill as expected, then a moment later fill the entire level with the same color. It seems you can avoid this if you tap the pen very quickly.

The fix for the empty level bug works, btw.

@manongjohn
Copy link
Collaborator Author

This is a very common fill error when using this tool

Yeah, I've run into this issue a few times even before this change and had to adjust fill depth to make it stop. Is it worse now with this change?

I do plan on looking more into the fill logic, sooner than later, since I want to use very similar logic for something else. I will likely look at this particular at that time.

@manongjohn
Copy link
Collaborator Author

Sometimes, when using a tablet pen, this tool will execute a fill as expected, then a moment later fill the entire level with the same color

I know in Normal fill mode, you can click-drag to fill multiple areas without lifting the pen. Can you be inadvertently doing that? How prevalent is this? Is this a pre-existing
issue or something new? I will try to duplicate with a pen when I get a chance.

@melieconiek
Copy link
Contributor

Played around with it more, the extra fill thing will happen if you move the cursor to another region after tapping the pen and before it finishes executing the fill. I can't replicate the issue with a mouse. Tried recording an example, but the recorder's overlay prevented the bug from happening.

The fill error bug I posted above always happens when the fill is adjacent to another existing fill. It can be fixed by setting Fill Depth Min to 1. This creates gaps between the fills though. It's workable, but not ideal.

@manongjohn
Copy link
Collaborator Author

Played around with it more, the extra fill thing will happen if you move the cursor to another region after tapping the pen and before it finishes executing the fill

I was able to reproduce the issue with both a pen and a mouse when I click quickly enough. I have a sneaking suspicion it is related to that weird fill banding issue which I believe is caused by over filling under vector/smart raster reference lines. Seems to happen only on Smart Raster levels for me since on Raster levels, fills fall short of vector/smart raster reference lines.

It appears to be an existing issue since I was able to reproduce it in the current release.

Having said that, I made some additional notes for myself to investigate the fill issues I'm seeing and will try and handle them in a separate PR.

@manongjohn manongjohn merged commit 74142e2 into tahoma2d:master Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.4 Included in Version 1.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants