Fix #109236: Split Edges node skips loose edges #109262

Merged
Hans Goudey merged 4 commits from HooglyBoogly/blender:fix-split-edges-loose-edges into blender-v3.6-release 2023-06-23 17:07:11 +02:00
Member

With the previous fix to the node, 8a11f0f3a2, the new edge
indices are build with the changed corner verts from a previous step in
the algorithm. That doesn't work for loose edges though, since they
aren't used by any face corners. The best solution I could come up with
was adding a second loop over the split vertices that adjusts the vertex
indices of loose edges. This can be skippe when there are none.

With the previous fix to the node, 8a11f0f3a23ef9b3c11c, the new edge indices are build with the changed corner verts from a previous step in the algorithm. That doesn't work for loose edges though, since they aren't used by any face corners. The best solution I could come up with was adding a second loop over the split vertices that adjusts the vertex indices of loose edges. This can be skippe when there are none.
Hans Goudey added 1 commit 2023-06-22 23:26:36 +02:00
48783109cf Fix #109236: Split Edges node skips loose edges
With the previous fix to the node, 8a11f0f3a2, the new edge
indices are build with the changed corner verts from a previous step in
the algorithm. That doesn't work for loose edges though, since they
aren't used by any face corners. The best solution I could come up with
was adding a second loop over the split vertices that adjusts the vertex
indices of loose edges. This can be skippe when there are none.
Hans Goudey requested review from Wannes Malfait 2023-06-22 23:26:50 +02:00
Hans Goudey added this to the Nodes & Physics project 2023-06-22 23:26:57 +02:00
Hans Goudey added this to the 3.6 LTS milestone 2023-06-22 23:27:02 +02:00
Hans Goudey added the
Interest
Geometry Nodes
label 2023-06-22 23:27:07 +02:00
Wannes Malfait reviewed 2023-06-23 13:03:50 +02:00
@ -180,6 +180,32 @@ static void split_vertex_per_fan(const int vertex,
}
}
static void split_vertex_loose_edges(const int vertex,
Member

I would add a comment here explaining what this function does. For me, based on the naming of the previous function, I would think that this function is responsible for splitting the vertices of loose edges (i.e. somehow changing the vertex maps). In fact it is more the opposite, this function is responsible for assigning correct vertices to the the loose edges. I don't know if you agree with this. Something like this?

Assign the newly created duplicates to the loose edges around this vertex.
I would add a comment here explaining what this function does. For me, based on the naming of the previous function, I would think that this function is responsible for splitting the vertices of loose edges (i.e. somehow changing the vertex maps). In fact it is more the opposite, this function is responsible for assigning correct vertices to the the loose edges. I don't know if you agree with this. Something like this? ``` Assign the newly created duplicates to the loose edges around this vertex. ```
Author
Member

Yeah, good point. I also renamed the function reassign_loose_edge_verts

Yeah, good point. I also renamed the function `reassign_loose_edge_verts`
Wannes Malfait reviewed 2023-06-23 13:06:38 +02:00
@ -439,6 +465,23 @@ void split_edges(Mesh &mesh,
add_new_vertices(mesh, new_to_old_verts_map);
Member

Apparently I can't select lines that weren't changed, but the numbering in the Step XXX comments is now wrong (step 4 is gone). This seems to be from a previous PR, but since the ordering of the steps has changed in this PR as well, I think it still makes sense to update these comments here.

Apparently I can't select lines that weren't changed, but the numbering in the `Step XXX` comments is now wrong (step 4 is gone). This seems to be from a previous PR, but since the ordering of the steps has changed in this PR as well, I think it still makes sense to update these comments here.
Wannes Malfait approved these changes 2023-06-23 13:08:03 +02:00
Wannes Malfait left a comment
Member

In terms of code, everything seems fine to me. The logic checks out. Just some small remarks about the comments. Since this code is not the easiest to understand, I think it is important to keep the comments up to date with the changes, so that they can guide future readers of the code.

In terms of code, everything seems fine to me. The logic checks out. Just some small remarks about the comments. Since this code is not the easiest to understand, I think it is important to keep the comments up to date with the changes, so that they can guide future readers of the code.
Hans Goudey added 3 commits 2023-06-23 14:34:59 +02:00
Author
Member

I added and improved more comments, and also removed the step numbers, since they weren't that helpful anyway IMO. Maybe you'd like to take a look at the comments, just in case?

I added and improved more comments, and also removed the step numbers, since they weren't that helpful anyway IMO. Maybe you'd like to take a look at the comments, just in case?
Wannes Malfait approved these changes 2023-06-23 15:02:53 +02:00
Wannes Malfait left a comment
Member

These comments look better than the original ones, and removing the numbers makes it easier for code changes in the future. Thanks

These comments look better than the original ones, and removing the numbers makes it easier for code changes in the future. Thanks
Author
Member

@blender-bot build

@blender-bot build
Hans Goudey merged commit b226c115e2 into blender-v3.6-release 2023-06-23 17:07:11 +02:00
Hans Goudey deleted branch fix-split-edges-loose-edges 2023-06-23 17:07:15 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109262
No description provided.