Jump to content
Developer Wiki and Function Reference Links ×

Function that will allow the user to move the point using mouse


Tn_Pink

Recommended Posts

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 by Tn_Pink
Link to comment

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

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...