|
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。8 K) o( t( {& t( B4 S
5 x& a) C$ m; |0 B* e- theSession->ListingWindow()->Open();/ N7 k0 z r' u0 j) |, S" ^0 r
- NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();# q* d$ Y# k$ |3 k- Z" ~* F+ K; ?
- std::ostringstream tempstring;1 }5 L' N3 k* D" Q0 [8 b( v
- tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n". n* Y1 d* C) K7 w! B
- <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
6 b( w- ]# p2 k4 \) T - <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";- _ {2 C( {5 e1 W, o% P: i
- std::string covervalue = tempstring.str();
) \3 b' r/ F! e. Z/ A- n7 g - theSession->ListingWindow()->WriteFullline( covervalue );
复制代码
8 L: o2 F4 U% s* w8 q4 E: ~ }1 I) Z5 y5 q8 Z3 r+ S/ W$ U
: `) N# n$ P/ _( n |
|