PDA

View Full Version : Which end?


Moosley
03-17-2006, 10:21 AM
When inserting a vertex into an edge using polyop.divideEdge how does it work out which end of the edge to go from?

For example I want to insert a vert 25% along from A to B, how does max know to insert it 25% from A and not 25% from B?

j-man
03-17-2006, 12:05 PM
I would presume by the order of the vertices. Poly obects are still tri-mesh's, and each face is defined by three vertices. The order of these vertices defines the direction of edges, and the direction of the face.


J.

Rivendale
03-17-2006, 12:39 PM
Hey, polyop.getEdgeVerts $ edge will give you an array of the verts in the order of the edge.

jman - that would not work exactly since two faces can share an edge and have opposite directions in the way the verts are laid out.

cheers,
CML

Moosley
03-20-2006, 08:24 PM
Cheers! polyop.getEdgeVerts worked a treat, I was using polyop.getVertsUsingEdge before.

j-man
03-21-2006, 11:33 AM
jman - that would not work exactly since two faces can share an edge and have opposite directions in the way the verts are laid out.

Yes, but we already know which edge is being used.

getVertsUsingEdge returns a bitarray which by nature, is ordered from lowest to highest which is why it didn't work.

J.

CGTalk Moderation
03-21-2006, 11:33 AM
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.