|
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。! J7 Y/ o% A% `& ]/ ?
4 I p: a; P0 W
- theSession->ListingWindow()->Open();9 }) ]% r" i) U4 z: F9 M
- NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();# C: V( k( B( y3 }% v9 ~2 U
- std::ostringstream tempstring;
4 _- e6 V% t: Y1 Z q - tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n"
# @0 T. \/ V1 m6 I - <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
! Y4 r( j1 s+ ~4 m( c - <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";2 a' I3 a0 X5 U& a% r
- std::string covervalue = tempstring.str();
6 Y0 o& k& ?! Z, G2 P; e3 S - theSession->ListingWindow()->WriteFullline( covervalue );
复制代码 # \, r. v5 { f1 ^) l1 i
. s! q5 U8 U% m( n6 C2 L
: a( R3 \! Y) u! f* r* i' a0 t8 s: d |
|