Steve Cox Posted September 9, 2005 Share Posted September 9, 2005 I've created an object in a function by adding path extrudes, then creating a group. When I try to move the object with Move3DObj(handle,100,100,100) only one NURBS surface moves. If I try rotate3D(90,0,0) again only one surface rotates - but not the same one! I know that rotate3D acts on the last object created, so is a group creation treated differently? How do I get a handle to the group? It appears the handle is to one NURBS surface only? Any advice gratefully received thanks, Steve Quote Link to comment
ccroft Posted September 10, 2005 Share Posted September 10, 2005 Don't know much about nurbs, but how bout GetParent? Hopefully they're not orphans. Charles Quote Link to comment
Steve Cox Posted September 12, 2005 Author Share Posted September 12, 2005 Thanks Charles, I've now got a handle on it. :-) moving on slightly, how would you rotate the object on the X or Y axis? I need the equivalent of an HRotate3D(handle,x,y,z); command. The Rotate3D(x,y,z); command still rotates just one surface within the group. Steve Quote Link to comment
ccroft Posted September 14, 2005 Share Posted September 14, 2005 Steve I may not have the complete picture here, but it sounds like HRotate would take care of X/Y for you. c Quote Link to comment
MullinRJ Posted September 14, 2005 Share Posted September 14, 2005 Steve, Check out this old thread. http://techboard.nemetschek.net/ubb/ultimatebb.php?ubb=get_topic;f=21;t=000163 Raymond Quote Link to comment
Steve Cox Posted September 14, 2005 Author Share Posted September 14, 2005 Charles, in essence I have a log lying on the ground. I want it rotate it to be standing up like a telegraph pole. my problem is HRotate rotates around the z axis, so the log is still lying in the ground Steve Quote Link to comment
Steve Cox Posted September 14, 2005 Author Share Posted September 14, 2005 Raymond, I found that thread when I did a search for 'rotate' before I first posted, but I didn't see how it might help me Steve Quote Link to comment
ccroft Posted September 14, 2005 Share Posted September 14, 2005 And Rotate doesn't work because it's view dependant? Quote Link to comment
MullinRJ Posted September 15, 2005 Share Posted September 15, 2005 Sorry Steve, You're right, that's not the right routine, it's for vectors. You need to use SetRot3D. Here's some code that rotates an object around its center point and even corrects a bug in the call. You should be able to adjust the parameters to suit your needs. HTH, Raymond code: procedure StandItUp; VAR Hnd :Handle; X, Y, Z, Xcen, Ycen, Zcen :Real; BEGIN Hnd := FSActLayer; Get3DCntr(Hnd, Xcen, Ycen, Zcen); { find the center point } SetRot3D(Hnd, 90, 0, 0, Xcen, Ycen, Zcen); { absolute rotation on X-axis } Get3DCntr(Hnd, X, Y, Z); { go find it } Move3DObj(Hnd, Xcen-X, Ycen-Y, Zcen-Z); { move it back } END; Run(StandItUp);[/code] Quote Link to comment
Steve Cox Posted September 15, 2005 Author Share Posted September 15, 2005 Charles, yes. I tried using DoMenuTextByName to change the view and that caused VW to crash. Raymond, you're a star. Thats works fine. I looked at SetRot3D before, but couldn't get it to work. I think I should downgrade my member status a level. Thanks for all your help. Steve Quote Link to comment
Steve Cox Posted September 16, 2005 Author Share Posted September 16, 2005 Make that two levels. This morning my PIO draws the object but it doesn't rotate it unless I change a parameter in the OIP to force a redraw. Steve Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.