Author Topic: Ask: converts point p1 expressed in the current UCS to the WCS and vice versa  (Read 2154 times)

0 Members and 1 Guest are viewing this topic.

RAYAKMAL

  • Guest
I have no idea how to do these: converts point pt1 expressed in the current UCS to the WCS and WCS to UCS with Autolisp.
Tried with (trans pt1 0 1) and (trans pt1 1 0) don't work as expected with nested objects.
« Last Edit: September 23, 2011, 07:06:31 PM by RAYAKMAL »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
They should work.
Please post some more of your code.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12928
  • London, England
I have no idea how to do these: converts point pt1 expressed in the current UCS to the WCS and WCS to UCS with Autolisp.
Tried with (trans pt1 0 1) and (trans pt1 1 0) don't work as expected with nested objects.

Nested objects will have coordinates expressed relative to the block definition in which they are nested. To transform these coordiates you will need to either use the transformation matrix returned by the nentsel function following a selection of a nested object, or construct a transformation matrix based on the normal, rotation and scale of the Insert in which the object is nested.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Good catch Lee.  8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12928
  • London, England

RAYAKMAL

  • Guest
Ok..I understand now...Thx for your elaboration guys :)