PDA

View Full Version : Face Push & Pull


MerlinEl
11-04-2009, 06:00 PM
Good Evening My Friends :-)

Im trying to move a face by her normal + -
How I can determinate if mouse in view is moving out from face or inverse?
And along which axis?

http://img503.imageshack.us/img503/5302/dtagtest.jpg



tool DragTest
(
local b,p1,tm,verts, d = [12,25,36], f = 2
on start do
(
b = convertTopoly (box pos:[0,0,0] dir:d)
select b
max modify mode
subobjectlevel = 4
polyOp.setFaceSelection b f
tm = matrixFromNormal (polyOp.getFaceNormal b f)
verts = polyOp.getVertsUsingFace b f
)
on mousePoint clickno do
(
p1 = worldPoint
)
on mouseMove clickno do
(
p2 = worldPoint

in coordsys tm for v in verts do
(
p = polyOp.getVert b v
p.z = -p2.y
polyOp.setVert b v p
)
)
)
startTool DragTest

denisT
11-04-2009, 06:12 PM
Good Evening My Friends :-)

Im trying to move a face by her normal + -
How I can determinate if mouse in view is moving out from face or inverse?
And along which axis?

http://img503.imageshack.us/img503/5302/dtagtest.jpg



tool DragTest
(
local b,p1,tm,verts, d = [12,25,36], f = 2
on start do
(
b = convertTopoly (box pos:[0,0,0] dir:d)
select b
max modify mode
subobjectlevel = 4
polyOp.setFaceSelection b f
tm = matrixFromNormal (polyOp.getFaceNormal b f)
verts = polyOp.getVertsUsingFace b f
)
on mousePoint clickno do
(
p1 = worldPoint
)
on mouseMove clickno do
(
p2 = worldPoint

in coordsys tm for v in verts do
(
p = polyOp.getVert b v
p.z = -p2.y
polyOp.setVert b v p
)
)
)
startTool DragTest


eh... this is why you should stay with simpleManipulators

MerlinEl
11-04-2009, 07:21 PM
yes Denis , thats true... , SimpleManipulators is a good way.
But I dont know them to much you know :-)

If some kind soul will help me to convert which I done with gw... Sketch3D_for_3Dsmax.ms (http://uploadrobots.com/FDKHfE#)
to manipulators , it will help me to learn more about them.

MerlinEl
11-05-2009, 08:11 AM
Two more reasons why I cant use these Manipulators.

1) this.addGizmoText http://img213.imageshack.us/img213/1922/manip8.jpg

2) plugin simpleManipulator -- unfortunetly can't be run from a dialog like a Tool
http://img513.imageshack.us/img513/3564/manip9.jpg


who know?....maybe is because I don know to use this plugin, but maybe not

CGTalk Moderation
11-05-2009, 08:11 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.