ObjectARX

Reply
Valued Contributor
54 Posts
2 Kudos
Registered: ‎11-25-2001
Post 1 of 3

current matrix Object ?

127 Views, 2 Replies
03-04-2008 11:48 PM
how can I read the current matrix (position and rotation) about a solid ? (or entity ..)
I know that I can move it and rotate any entity with transformby but I need to know his position and rotation before change it.
thanks in advance!
Valued Contributor
54 Posts
0 Kudos
Registered: ‎09-29-2007
Post 2 of 3

Re: current matrix Object ?

03-05-2008 02:19 PM in reply to: bikelink
I have a few suggestions for you, but first of all understand that solids don't have an intrinsic position and rotation per se. Their position and rotation is really whatever you want them to be.

However, take a look at AcDb3dSolid::getMassProp...you'll probably need to research what some of these return values mean, but perhaps you can derive something like rotation relative to the x y and z axes using one or more of them. And of course 'centroid' should give you a useable position. You'll also need to derive some kind of normal vector for rotation to mean anything.

My second suggestion is to simply put the solid into a block right after you create it, or make a "helper" block that's transformed whenever you transform the solid, and then the block itself can give you a position, normal, and rotation.
Valued Contributor
54 Posts
2 Kudos
Registered: ‎11-25-2001
Post 3 of 3

Re: current matrix Object ?

04-01-2008 05:36 AM in reply to: bikelink
Thank You.
with a reactor i catch the movement..matrix etc... isn't simple but it's works
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!