Tn_Pink Posted November 3, 2014 Share Posted November 3, 2014 (edited) I am creating edit program. * object (NurbsCurve) is already existing. I want to do: 1) Get current location points. 2) Move object (NurbsCurve) point using mouse. 3) Get new location points. Sample Code: PROCEDURE EditTest; VAR {Location Point} CurrentStartPtX, CurrentStartPtY, CurrentStartPtZ : REAL; CurrentEndPtX, CurrentEndPtY, CurrentEndPtZ : REAL; NewStartPtX, NewStartPtY, NewStartPtZ : REAL; NewEndPtX, NewEndPtY, NewEndPtZ : REAL; BEGIN {Get Current Points} NurbsGetPt3D(FSActLayer, 0, 0, CurrentStartPtX, CurrentStartPtY, CurrentStartPtZ); NurbsGetPt3D(FSActLayer, 0, 1, CurrentEndPtX, CurrentEndPtY, CurrentEndPtZ); {Alert Dialog} AlrtDialog('Please Modify Object.'); ********************************************************************************* I need function that will allow the user to move the point using mouse. Do you have any suggestions for what type of FUNCTION to use? ********************************************************************************* {Get New Points} NurbsGetPt3D(FSActLayer, 0, 0, NewStartPtX, NewStartPtY, NewStartPtZ); NurbsGetPt3D(FSActLayer, 0, 1, NewEndPtX, NewEndPtY, NewEndPtZ); END; RUN(EditTest); {End of Code.} Can someone help me or is it impossible? Thanks much in advance. Edited November 3, 2014 by Tn_Pink Quote Link to comment
Pat Stanford Posted November 4, 2014 Share Posted November 4, 2014 Check out the User Interactive section of the Vectorscript function reference. Depending on how you want the script to operate, the TrackObject, GetPtL, GetPt, GetMouse and/or MouseDown function all offer some ability to get a point on the screen. Actually since you are working with Nurbs, you probably want to look at GetPt3D or GetPtL3d. You probably want to start with GetPtL as this one call will get you the X/Y coordinates of two points. I hope this is a starting point for you. Pat Quote Link to comment
JBenghiat Posted November 4, 2014 Share Posted November 4, 2014 I think you want to use CallTool with the Reshape tool. http://developer.vectorworks.net/index.php/VS:CallTool Note, 2D Reshape will actually work with NURBS. HTH, Josh 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.