Jump to content
Developer Wiki and Function Reference Links ×

problem with Rotate3D command


Steve Cox

Recommended Posts

hello,

I'm not sure why it's not working. here is a small script which is working on my machine. you may need to give the rotate command before the duplicate, so there is no confusion as to what object is to be rotated.

PROCEDURE Rotate;

BEGIN

Beginxtrd(0,1);

Rect(0,2,2,0);

EndXtrd;

Rotate3d(-90,0,0);

Duplicate(2,2);

END;

RUN(Rotate);

i hope THIS helps.

-jason

Link to comment

Jason, thanks for that. I tried your script, and after a lot of tweaking came up with this one.

PROCEDURE Rotate3;

BEGIN

Beginxtrd(0,6); {draw shape}

Rect(0,0,2,1);

EndXtrd;

Duplicate(6,0);

Rotate3d(-90,0,0);

Duplicate(6,0);

Rotate3d(0,0,90);

END;

RUN(Rotate3);

This seems to always rotate the first shape, but duplicates the duplicate, so I think I am not selecting the right object to rotate. When I work out how to do that I may have got it sorted.

Then I tried this, to duplicate and rotate the selected object in the drawing.

PROCEDURE Rotate4;

BEGIN

Duplicate(6,0);

Rotate3d(-90,0,0);

Duplicate(6,0);

Rotate3d(0,0,90);

END;

RUN(Rotate4);

This doesn't rotate any shape, but duplicates the original OK

All I was trying to do was generate 3rd angle views of an object in my drawing. Perhaps as a non-programmer I should have stuck to the simple method. :-)

Steve

Link to comment

hello steve,

here's the deal. the Rotate3D works on the last created object, and the Duplicate works on all selected objects. to make matters more complicated, the computer does not recognize duplicated objects as new objects. here's a script that i think will solve your problem.

PROCEDURE Rotate5;

VAR

h:HANDLE;

BEGIN

BeginXtrd(0,1);

Rect(0,2,2,0);

EndXtrd;

h:=LnewObj;

Rotate3D(45,0,0);

{Rotate 1st then duplicate then rotate back}

Duplicate(4,0);

Rotate3D(-45,0,0);

{the following allows the process to be repeated without the above duplicate being duplicated again.}

DSelectall;

SetSelect(h);

{Second Duplication}

Rotate3D(0,-45,0);

Duplicate(-4,0);

Rotate3D(0,-45,0);

DSelectall;

SetSelect(h);

{repeat if needed}

END;

RUN(Rotate5);

I hope this helps.

-jason

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