|
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。
) G% r& E3 \+ p) x: T
X1 }3 `7 q& t- theSession->ListingWindow()->Open();
6 a; n* C0 @3 o- Z/ c - NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();
* S* j" p. y0 ?9 e# t: V- l7 d6 n - std::ostringstream tempstring;
1 S S( j3 \/ n- y* z - tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n"7 h1 L7 }( O' U3 |
- <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
: N' a6 W( O- r, b3 }$ L% B - <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";
/ p L. _0 y" A/ m3 X% d- j - std::string covervalue = tempstring.str();9 P& j3 K) s# \. r. W7 c
- theSession->ListingWindow()->WriteFullline( covervalue );
复制代码 ( Z1 T5 m5 Z3 e% N: D4 N
& j& L8 v5 {, R) }3 o0 \8 d
. ?6 s. n7 u' ^' U8 O4 H. t* J. Q
|
|