Jump to content
Developer Wiki and Function Reference Links ×

handling NURBS in groups


Steve Cox

Recommended Posts

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

Link to comment

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]

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...