Paolo Posted November 23, 2007 Share Posted November 23, 2007 Hi all, Is it possible to get the extrusion value of an extruded object in VectorScript? I have checked the VectorScript Reference but found nothing appropriate. Thanks for your help! Quote Link to comment
Petri Posted November 23, 2007 Share Posted November 23, 2007 Maybe the combination of Get3DOrientation, Get3DInfo and Set3DRot would work? Quote Link to comment
Paolo Posted November 23, 2007 Author Share Posted November 23, 2007 Your suggestion has been the key! Thank you! Here's a procedure to increase all the extruded object in a selection of a user given value: [font:Courier New]procedure increaseExtr; {the goal is to increase extruded objects in the selection of a user requested value} var oggetto:HANDLE; increaseValue : REAL; FUNCTION increase(h:HANDLE):BOOLEAN; var height,width,depth:REAL; xRot, yRot, zRot:REAL; p0X, p0Y, p0Z: REAL; p1X, p1Y, p1Z: REAL; result, isMirroredXY: BOOLEAN; begin {check if the obj is an extrusion} if (GetType(h) = 24) then BEGIN result := Get3DOrientation(h, xRot, yRot, zRot, isMirroredXY); Get3DCntr(h, p0X, p0Y, p0Z); SetRot3D(h, 0,0,0 , 0,0,0); {here depth = extrusion value} Get3DInfo(h, height,width,depth); {I increase the depth} Set3DInfo(h, height,width,depth+increaseValue); Set3DRot(h, xRot, yRot, zRot , 0,0,0); Get3DCntr(h, p1X, p1Y, p1Z); {move of the misplacement p0-p1} Move3DObj(h, p0X-p1X, p0Y-p1Y, p0Z-p1Z); Get3DCntr(h, p1X, p1Y, p1Z); END; increase := FALSE; end; begin {ask the value to increase} increaseValue := RealDialog('Increase extrusions in the selection of this value','10'); {apply to the selected set of objects} ForEachObjectInList(increase, 2, 0, oggetto); end; run(increaseExtr);[/font] Quote Link to comment
Petri Posted November 23, 2007 Share Posted November 23, 2007 You're welcome, Paolo. (Hah - it did work!) 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.