|
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。5 O3 |6 u6 u7 P* j6 N, u6 Y
! E5 G" Z6 b8 |3 h& R; v
- theSession->ListingWindow()->Open();
% I4 h+ n2 |: i/ [ - NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();/ z" P, {- [7 c9 b- ]3 a+ L" P- A
- std::ostringstream tempstring;- R W% i8 H; \ c
- tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n"* p# ^4 Z( u! w/ p" Z- S
- <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
* ], E3 A' a8 b! }+ z7 V" s$ v - <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";
j7 p6 m) [3 _" b% @, y8 ? - std::string covervalue = tempstring.str();" x- l \3 j7 L! Y" j- u0 l
- theSession->ListingWindow()->WriteFullline( covervalue );
复制代码
2 j) ?9 H2 p3 U/ Z4 S0 ~6 Q6 @1 X& W( W8 {2 C* L! E
' T' X1 ?! r0 P: c7 v |
|