|
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。" {5 c8 i$ ]1 L3 k$ } J! ~& ^+ u) N
4 x4 ~7 @2 L4 S# S$ {
- theSession->ListingWindow()->Open();% {9 y9 g) p' d" i8 G3 _
- NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();. { i. s( W5 P$ t' t. x
- std::ostringstream tempstring;5 B% B& J( X% s$ R8 s
- tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n"
( R5 S, {; k2 b5 _4 b5 \0 G0 ~7 ? - <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
; S" r* l& b8 N9 `/ K - <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";# @& p5 t' L% H' ?1 w/ u
- std::string covervalue = tempstring.str();8 a7 o* \1 a B6 O
- theSession->ListingWindow()->WriteFullline( covervalue );
复制代码 ( c' D8 x5 i. ^2 h' ^4 v: m; h/ A
# J8 E0 {4 S4 t A+ J4 h \/ f6 b
3 x( _9 I$ H. A9 q: f; y |
|