PDA

View Full Version : HowTo move Edge or Vertices in a EditMesh Modifier ?


Klonsemann
05-02-2008, 09:50 PM
I would like to move an Edge or its 2 Verts upwards.
Its important to keep the stack intact, the base Box width is driven via wired parameters.

I tried to impelment both ways, intact and collapsted stack.
There is an if state to switch.


if false then (
--keep box and add modifier to Stack. WindowWidth is wired to BoxWidth
paramWire.connect window.baseObject[#width] FB.baseObject[#width] "width+4"
addModifier FB (edit_mesh())
--howto get the Edge in the modifier and move it 3.5cm upwards ?
) else (
--convert to EditPoly for moving Edge, but loosing controll over width
convertToPoly(FB)
polyop.setEdgeSelection FB #{2}
FB.movetoplane [0,1,0] 3.5 #Edge
)


The collapsed case work, but its my goal to keep the stack intact in order to have an easy controll over the boxwidth.

Can someone help me to move the Edge or its Vertices ?

Klonsemann
05-06-2008, 05:38 PM
Nobody here to help me ? Or missed i something very easy, so that noone likes to answere ? :(

MoonDoggie
05-06-2008, 06:31 PM
I'm not sure actually, I'll have to take a look later and see if I can figure it out. Sorry for the no replies.

thatoneguy
05-06-2008, 06:40 PM
Eureka! Well... not really. But I found a hack.

Apply a "Turn to Mesh" modifier above the EditMesh and then do all your operations. Then collapse the Turn To Mesh down onto the Edit Mesh.... and voila!

I would be interested to hear the 'correct' way to do it though. Surely you can do Mesh and Poly ops directly on an Edit Mesh or Edit Poly right?

MoonDoggie
05-06-2008, 07:03 PM
Here's what I could find in 5minutes, doubt it'll help but maybe.


(
b = box()
em = Edit_Mesh()
max modify mode
addmodifier b em

setEdgeSelection b em #{16}

-- lookup TriMesh and you can reference some editable_mesh commands using b.mesh, but I can't find the methods for it.

update b
)

Zbuffer
05-07-2008, 07:13 AM
Hi,

-- lookup TriMesh and you can reference some editable_mesh commands using b.mesh, but I can't find the methods for it.

there is no access to <Edit_Mesh>.mesh ...

I found working with Edit_Poly MUCH easier,

EM = edit_Poly()
addModifier FB EM
max modify mode
modPanel.setCurrentObject EM
subobjectLevel = 2
EM.Select #Edge #{12}
EM.MoveSelection [0,3.5,0]
EM.commit()
subobjectLevel = 0

Hope this helps

Klonsemann
05-07-2008, 06:59 PM
Very thanks for you answers. Ill test this soon.

Klonsemann
05-07-2008, 07:53 PM
Zbuffer, your code works well, but i got suck in some strange behavior.
(
FB = box ()
EM = edit_Poly()
addModifier FB EM
max modify mode
modPanel.setCurrentObject EM
subobjectLevel = 2
EM.Select #Edge #{2}
EM.MoveSelection [0,3.5,0]
EM.commit()
subobjectLevel = 0
)

If you put this in brackes as in for-loops for example, MoveSelection will move the hole box instead of the selected edge. Where does that come from ?

CGTalk Moderation
05-07-2008, 07:53 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.