Jump to content

How to fix to work with custom UCS?


Recommended Posts

Guest kruuger
Posted

Hello

 

I have a problem with my lisp routine.

When i work with world UCS everything is fine but very often i work with rotated UCS and then lisp doesn't work correct.

 

Probably i need to use trans function. I try this but without good result.

 

Please help

Thanks

kruuger

Xlinedim.lsp

Posted

You will need to transform your user-selected points from UCS to WCS, :

 

(trans <point> 1 0)

Guest kruuger
Posted

aaa, it was so simple :oops:

 

thanks Lee

kruuger

Guest kruuger
Posted

i noticed one thing. whem i rotate UCS with this lisp:

(Defun C:UU ()
 (setq osmode_hold (getvar "OSMODE"))
 (setvar "OSMODE" 512)
 (setq PT1 (getpoint "Select LEFT side of OBJECT which should be horizontal"))
 (command "_UCS" "OB" PT1 "PLAN" "CURRENT" "")
 (setvar "OSMODE" osmode_hold)
 (princ)
);UU
(princ)

and i try my Xlinedim then even with trans command xline are drawn wrong (they only worked at defined UCS North East, West, South)

 

What i can fix?

thanks

Posted

I haven't properly looked at your LISP, but you will have to acount for the UCS rotation by looking at the direction of the UCS X-Axis (UCSXDIR).

Guest kruuger
Posted

great thanks

i need to figured out this.

 

kruuger

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...