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

fix #3288 "Extrude region node - keep original" #4999

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

satabol
Copy link
Collaborator

@satabol satabol commented Sep 21, 2023

Sverchok 1.3.0-alpha, Blender 3.6.1, Windows 11

Result is good:
image

File for tests: issue_3288.example.blend.zip

- Create library function separate_loose_mesh.py
@satabol
Copy link
Collaborator Author

satabol commented Sep 21, 2023

Hi @portnov! Can you check it? Some code are commented. I remove it later if you approve it.

@portnov
Copy link
Collaborator

portnov commented Sep 25, 2023

If you think the problem is in Blender code, I'd suggest to file an issue against Blender, and add a link in code comment to that issue and write that you are doing a workaround for it.
Otherwise, no objections.

@satabol
Copy link
Collaborator Author

satabol commented Sep 25, 2023

Hi @portnov.

this is copy of comment: #3288 (comment)

This is very interesting problem. I found some cases where it happens:

  1. Your case with one face but there is more general case: with all extruded faces in mesh:
  2. If all faces are extruded then property "Keep Original" is off has no effect:
    image
    Some results are good. For example ("Keep original" is off), if 4-th face if excluded from extrude then result looks good:
    image

but in other cases result is not good ("Keep original" is off), if 0 and 1 faces are excluded from extrude then result is not good:
image

So why this happens?
Lets look at blender source code for function "bmesh.ops.extrude_face_region":

image

So this is problem of Blender. Shame. What solution can be here? As you can see if exists a face in shape that is not extruded then result is good:

image

So... we cannot exclude some faces from extrude... but one can append a face to every shape then exclude it from extrude then remove new faces after extrude!

image

And result is good:

image

@satabol satabol merged commit d0d5217 into master Sep 25, 2023
1 check passed
@satabol satabol deleted the fix_3288_Extrude_region_node_keep_original branch September 25, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extrude region node - keep original
2 participants