[Closed] HowTo move Edge or Vertices in a EditMesh Modifier ?
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 ?
Nobody here to help me ? Or missed i something very easy, so that noone likes to answere ?
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.
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?
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
)
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
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 ?