-
Notifications
You must be signed in to change notification settings - Fork 361
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
HolePattern creates holes other than specified #429
Comments
@SuksAE Do you want to take look at this? |
My first thought is that maybe this can be reduced to a "lack of documentation" issue. Maximum hole size is used unfiltered only in "random" mode. In "square" or "hex" mode the default hole size is clalculated to choose an "optimum" size so that an integer number of shapes fit in a row. see init.py line 1689:
I hope this solves the mystery... |
In the linked examples both minimum and maximum hole size is 9.25 though.
Am 10. September 2022 17:09:57 MESZ schrieb SuksAE ***@***.***>:
…My first thought is that maybe this can be reduced to a "lack of documentation" issue.
Maximum hole size is used unfiltered only in "random" mode. In "square" or "hex" mode the default hole size is clalculated to choose an "optimum" size so that an integer number of shapes fit in a row.
The size of the drawn holes is always between the maximum hole size and minimum hole size given in the settings.
see init.py line 1689:
```
elif pattern in ("square", "hex"):
# use 'optimum' hole size
max_radius = min(max_radius_x, max_radius_y)
```
I hope this solves the mystery...
--
Reply to this email directly or view it on GitHub:
#429 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
You are right. Minimum hole size is actually only checked if there is an "abnormality" in a line of shapes. In this case the algorythm tries to "squeeze" in smaller holes. But as there are no abnormalities in the given example (shape is rectangle --> all lines of equal length, always the same integer number of holes), minimum hole size is irrelevant here... For visualization of minimum size usage try: Please note that:
|
When we take back a step the issue here is that the new hole pattern code is not yet general enough for all use cases. In the medium term it should replace the legacy That being said removing the hexholes generator may have been a bit premature. Otoh this highlights nicely that there is still work to be done. |
Seemingly depending on fill_pattern, space_between_holes, space_to_border the size of holes created by HolePattern doesn't match the size set with hole_min_radius and hole_max_radius.
E.g.:
https://www.festi.info/boxes.py/HolePattern?fillHoles_bar_length=50&fillHoles_fill_pattern=square&fillHoles_hole_max_radius=9.25&fillHoles_hole_min_radius=9.25&fillHoles_hole_style=round&fillHoles_max_random=1000&fillHoles_space_between_holes=2.8&fillHoles_space_to_border=2.8&x=184&y=119&shape=rectangle&thickness=3.0&format=svg&tabs=0.0&debug=0&labels=0&labels=1&reference=100&inner_corners=loop&burn=0.1&render=1
https://www.festi.info/boxes.py/HolePattern?fillHoles_bar_length=50&fillHoles_fill_pattern=hex&fillHoles_hole_max_radius=9.25&fillHoles_hole_min_radius=9.25&fillHoles_hole_style=round&fillHoles_max_random=1000&fillHoles_space_between_holes=2.8&fillHoles_space_to_border=2.8&x=184&y=119&shape=rectangle&thickness=3.0&format=svg&tabs=0.0&debug=0&labels=0&labels=1&reference=100&inner_corners=loop&burn=0.1&render=1
The text was updated successfully, but these errors were encountered: