Handling UCS and WCS

Kevin Nehls

Usenet Archive
Joined
Jul 3, 2003
Messages
52
Reaction score
0
How to you guys handle UCS and WCS? Do you program your routines to just work in WCS or do you program to translate all points to one coordinate system or the other?

So far I've only worked in WCS and that's where my programs work. But we've ran into a couple of drawings that were set to some odd-ball UCS and the programs still worked, but they were either drawing notes 1000s of units outside the border or inserting blocks in a completely different location than they were suppose to, etc, etc.

The solution has been to just have my users swtich back to WCS with a simple issue of UCS > Enter. For any routine that uses points, should I take the extra care and time to translate all points from UCS to WCS or WCS to UCS depending on the function?
 
I usually consider the UCS when programming.
Sometimes my programs create a temp UCS, and then issue a "UCS, Previous" before they exit.

I also make use of the TRANS function in lisp.
 
Yeah I think I answered my question when answering yours "on the dark side".

Just never took it into consideration here and I probably should TRANS everything into the UCS coordinate system when getting points. Like getting the insertion point of a block from the DXF codes returns the OCS point but not the UCS point.... So basing an insert off of the OCS could throw everything way off if the user isn't in WCS at the time.

One more thing to add to the list of "fixes/updates/patches/etc/etc/etc"

Thanks for the feedback
 
Mostly via (trans). When I'm lazy, I progamatically switch to WCS and put things back when done. But if you do that, then watch out for UCSFOLLOW.
 

Latest threads

Back
Top