AFDesign Posted February 24, 2011 Share Posted February 24, 2011 Hi, i can't solve this problem: I have a loop that create many extrusions, and i want to rotate every single extrusion with the value "protx". The problem is that all my object is rotated (see attachment) for n:=1 to pnumero+1 do begin hprogressiva:=(n-1)*(hspazi+pspessore); BeginXtrd(hprogressiva,hprogressiva+pspessore); Rect(0,pProfondita,lunghezza,0); EndXtrd; Rotate3D(protx,0,0); end; Somebody could help me? thanks, sorry for my english! Andrea Quote Link to comment
MullinRJ Posted February 24, 2011 Share Posted February 24, 2011 Ciao Andrea, ???Your code rotates the most recently created object around the User Origin and not around the object's center. Try replacing your line: Rotate3D(protx,0,0); with: Get3DCntr(LNewObj, Xcen, Ycen, Zcen); Set3DRot(LNewObj, protx, 0, 0, Xcen, Ycen, Zcen); If it works, it will get the center of each extrude as it is created and use that point for the rotation center. I haven't tested it, so it may not work. Write back if you need more help. Raymond Quote Link to comment
AFDesign Posted February 25, 2011 Author Share Posted February 25, 2011 Thanks Raymond !!! It works Thank you very much Andrea 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.