PDA

View Full Version : a bit strange for me...

 prettyPixel01-05-2006, 02:22 PMif I use: polyOp.getFacesUsingEdge \$ #{x} maxscript return the 2 faces used the edge x... and it's correct (the edge x of my object is common to 2 faces) but if I use meshOp.getFacesUsingEdge \$ #{x} maxscript return only 1 face. but my edge x is common to 2 faces !! I don't understand... Can you point me how to find all faces ? Thanks!
prettyPixel
01-05-2006, 03:00 PM
Oh I see... There are 2 edges at the same place in a mesh.
The structure is realy different to a poly...

sorry for this stupid question ;)

Bobo
01-05-2006, 03:39 PM
Oh I see... There are 2 edges at the same place in a mesh.
The structure is realy different to a poly...

sorry for this stupid question ;)

Yep, edges in Editable Poly are a main construction element of the topology ("Winged Edges", remember?). An edge in EPoly can have 0 to 2 polygons.

An edge in Editable Mesh does not exist as construction element at all, it is implicitly defined by the face definition.
It is defined as the line connecting two vertices of a face, where the edge connecting vertex 1 with 2 is the first edge, the one between 2 and 3 is the second and the one between 3 and 1 is the 3rd. There is a flag in the face definition controlling the edge visibility, and in any EMesh, there are 3 times as many edges as faces (because each face has 3 of them!). Two adjacent faces do not share an edge, they have their own, they only share the visibility of the two overlapping edges, so if you change the visibility of the one in the UI of Max, the other edge is set internally to the same value, too.
In a word, Mesh Edges are fake ;)

prettyPixel
01-05-2006, 04:21 PM
Thanks Bobo

An edge in EPoly can have 0 to 2 polygons.

Really 0 ? So I can create an edge with 2 isolated vertices. yeaah... of course, That does not have any utility ^_^

In a word, Mesh Edges are fake ;)

I realize that's similar to the mapEdges. Just a fake of the modifier Unwrap.

If somebody is interested, here a solution
fn getFacesUsingEdge2 obj theEdge = (
local edgeVerts=meshOp.getVertsUsingEdge obj #{theEdge}
local commonEdges=meshOp.getEdgesUsingVert obj edgeVerts
local sameEdges=#{}
for e in commonEdges where (((meshOp.getVertsUsingEdge obj #{e})*edgeVerts).numberset==2) do sameEdges[e]=true
(meshOp.getFacesUsingEdge obj sameEdges)
)

CGTalk Moderation
01-05-2006, 04:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.