Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Direction through KWA

Status
Not open for further replies.

LWolf

Automotive
Mar 20, 2007
504
0
16
SE
why doesn't this statement yield the x-component of the direction vector?...
direction(Line.2)->GetAttributeReal("X")​
I have constructed Line.2 in XY plane, with 45deg to x-axis. A "Measure Item" of the line reveals the correct unit vector components (.707, .707, 0)
However, when I try the GetAttributeReal of the Direction command, I get(0,0,1) as components (for respective direction)...
Moreover, when I try to see what Real Attributes that are supported [direction(Line.2).ListAttributeNames("Real",false)] I don't see those, instead I see RatioX, RatioY and RatioZ, which seem odd, least to say...


regards,
LWolf
 
Replies continue below

Recommended for you

ok i have the same result in V5...last solution I could think of is: from the line you create 2 points and get the vector from the 2 points, normalize it then you'll have the value you're looking for.





Eric N.
indocti discant et ament meminisse periti
 
thx Eric, the math is not a problem[lipstick2]. It is just that I'd like to understand what is happening... or why I don't get to do the Vector method, or what/why I get 0,0,1 as a result?...

regards,
LWolf
 
you can open an SR if you want to know about XRatio = 0, but you can also post on the community from DS maybe someone from R&D will check it.
The Vector thing might be because you're in V5, the code I gave you is from 3DX.


Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.
Back
Top