Discussions about SOFTIMAGEs© Interactive Creative Environment©
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 03 Jun 2011, 19:51
It seems like a very basic operation, but I can't figure out how to do it. The collapse edge node collapses the edge to a point and thus changes all the polygons. I simply want to delete the edge.
Go from this:
To this:
-
Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 22:38
- Location: St. Thomas, Ontario
Post
by Daniel Brassard » 04 Jun 2011, 03:10
Just a though,
If before you have two polygons and 6 vertices and, assuming you cannot delete the vertices because they are connected to other (not shown) polygons, would it not be as simple as deleting the two polygons and making a new (one polygons) from the vertices index in CCW order?
I would also check the capHole compoung from Guillaume, maybe the answer is in it.
$ifndef "Softimage"
set "Softimage" "true"
$endif
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 04 Jun 2011, 08:46
Deleting a vertex with more than two edges does funky things* Deleting a vertex with two edges however works great. So I'd just need to get rid of that connecting edge, then I can delete both vertices.
Your idea is good, but unfortunately it will only work if the area is surrounded by polygons. In many cases that's what I need, but whatever method I pick has to also work in situations with boundary edges. Imagine one free-floating square polygon with a split in the middle. If I delete both polygons, nothing will be left. I guess I could make a tree that takes all possibilities into account, but including the capping logic this will be one huge and slow tree for what's supposed to be a simple operation
*Edit: I just realized it may actually work if I delete both vertices. Will have to check.
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 04 Jun 2011, 09:19
Right, so deleting both vertices gets rid of the edge if none of the vertices is a boundary vertex. If it is a boundary vertex, the deletion behaves differently. I'd have to add logic for lots of different situations.

-
Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 22:38
- Location: St. Thomas, Ontario
Post
by Daniel Brassard » 04 Jun 2011, 20:39
How do you rebuild the affected polygon description of the topology?
in your last example, what happen if you delete vertex 6 first instead of 7?
$ifndef "Softimage"
set "Softimage" "true"
$endif
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 04 Jun 2011, 23:09
Hi Daniel,
After more testing I have found that using the Delete Vertex is not possible because it's completely unpredictable. The new edges will snap to a random point, so this method is useless for deleting an edge.
I am currently trying your suggestion of deleting both polygons and then rebuilding them using only one polygon.
I first get the polygon on either side of the unwanted edge and get all the vertices they are made up of. I reorder them, store their positions, then delete both polygons. Then I add new vertices at the stored positions and draw a new polygon using those vertices. Then I filter points that are right on top of each other and merge them. I found it majorly challenging just to get this working. I've built a bunch of little test trees that all work on their own, but I still need to combine them into one Delete Edge tree and hope it works. Will do that tomorrow.
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Post
by Hirazi Blue » 05 Jun 2011, 10:10
Silly idea probably (forgive me, I'm new at this...

),
but wouldn't merging the two adjacent polygons do the trick?
Stay safe, sane & healthy!
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 05 Jun 2011, 12:35
Hirazi Blue wrote:but wouldn't merging the two adjacent polygons do the trick?
Yes, but I don't believe there is a node for that?
And what's more, it feels so darn good to build a working tool, I don't want there to be an easier solution now because I did it.. woohoo
The compound takes an edge index and removes it. There is also a toggle for performing cleanup. In the first picture you see how the two vertices that made up the edge are deleted. They are deleted because the deletion doesn't change the shape of any polygon. In the second and third pictures no vertices are removed because that would change the shape of some polygons.

You do not have the required permissions to view the files attached to this post.
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Post
by Hirazi Blue » 05 Jun 2011, 13:43
Chris_TC wrote:Hirazi Blue wrote:but wouldn't merging the two adjacent polygons do the trick?
Yes, but I don't believe there is a node for that?
Task Tab > Topology > Apply Merge Polygon?
Stay safe, sane & healthy!
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 05 Jun 2011, 14:01
Darn. So there's an easy way to do it after all. Thank you for showing me the light...
I feel silly now for posting my compound in the compound section. Can you delete that thread? The compound is not very useful because it contains way more logic than necessary.
Moderator edit - I deleted the other thread per your request
(although it wasn't my intention to diminish the value of your endeavor in any way!!!) - HB
-
origin
- Posts: 619
- Joined: 09 Jun 2009, 09:59
- Location: warsaw
Post
by origin » 05 Jun 2011, 14:23
Hehe ;) Leave the compound - it's always good learning resource. Nice work anyways. Merge polygon island's name is abit confusing.
-
Chris_TC
- Posts: 411
- Joined: 22 Mar 2010, 16:43
Post
by Chris_TC » 05 Jun 2011, 16:25
Yes, I'll leave the compound online in this thread for people wanting to check it out.
And just in case anybody wants to compare, here is the simplified version.
You do not have the required permissions to view the files attached to this post.