gerardo2m Posted January 18, 2018 Share Posted January 18, 2018 Hi. My problem is following: I have an INSERT entity with nameDXF "X". I have an nested INSERT (inside "X") with nameDXF "F". Finally, I have a sphere that makes up the INSERT Block reference "F", the property "Position" is (0 0 0). In the drawing the position of the sphere is outside the origin of the WCS. I need to transform the coordinates of the "Position" property of the sphere to the WCS. I thought that this would have a result: (setq T (trans ptoPosition F X)) (trans T X 0) But I get nil in both cases. Any comments on how I should use the TRANS function? Greetings. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 18, 2018 Share Posted January 18, 2018 You will need to transform the coordinates of the center of the sphere using a transformation matrix calculated by multiplying the transformation matrices for each parent block reference - here is a similar example used in an existing program, written to account for any level of nesting. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.