Cancel
Showing results for 
Search instead for 
Did you mean: 

get Axis of any Object

Pioneer
Pioneer

I want to get Local axis of any entity. Which property is responsible for it?

7 REPLIES 7

Re: get Axis of any Object

Siemens Legend Siemens Legend
Siemens Legend

Hi,

Do you mean the absolute location of the object? if yes, then it is the AbsoluteLocation property.

Re: get Axis of any Object

Pioneer
Pioneer

@OferOhayon ,

 

thanx for reply. Its true that Absolutelocation gives location. But when object is manipulated using placement manipulator, for example object is rotated in X direction, Now world axis and axis of object are not same. If I want to create solid body at any points in axis of object. How can I get two points in the axis of object. I have tried by following code. But here, I got endpoint on the world axis (not on the axis of object)

TxVector startpoint = new TxVector(baselocation.AbsoluteLocation.Translation);
            TxVector endpoint = new TxVector(baselocation.AbsoluteLocation.Translation + new TxVector(0,0,100));

Re: get Axis of any Object

Pioneer
Pioneer

@OferOhayon,

 

Here, I attached a pic with example, where you can see, direction of world axis and direction of axis of object is not same because I gave rotation in Ry. Now, I want to get two vector point on Z axis of object. With absolute location I get one point but then how could I get second point on the same axis of object. As i said before, I have tried with following code, but it gave point on world axis. 

TxVector startpoint = new TxVector(baselocation.AbsoluteLocation.Translation);
            TxVector endpoint = new TxVector(baselocation.AbsoluteLocation.Translation + new TxVector(0,0,100));

Re: get Axis of any Object

Legend
Legend
TxVector endpoint = baselocation.AbsoluteLocation.Transform(new TxVector(0,0,100));

 

Re: get Axis of any Object

Pioneer
Pioneer

@Witalij 

 

Yes, it works

 

Re: get Axis of any Object

Pioneer
Pioneer

@Witalij & @OferOhayon ,

 

I got both points on local axis of object. Now, I select a 3dvector on world coordinate. I want to conver that 3dvector into local cordinate-system of object. How can I convert 3dVector world coordinate to local coordinate?

 

Re: get Axis of any Object

Legend
Legend