|
本帖最后由 Jefft 于 2016-9-1 07:46 编辑
利用NXOpen方式获取当前工作部件里面工作坐标系的矩阵值的方法。
源代码如下:
- theSession->ListingWindow()->Open();
- NXOpen::Matrix3x3 wsmtx = workPart->WCS()->CoordinateSystem()->Orientation()->Element();
- std::ostringstream tempstring;
- tempstring <<wsmtx.Xx<<","<<wsmtx.Xy<<","<<wsmtx.Xz<<"\n"
- <<wsmtx.Yx<<","<<wsmtx.Yy<<","<<wsmtx.Yz<<"\n"
- <<wsmtx.Zx<<","<<wsmtx.Zy<<","<<wsmtx.Zz<<"\n";
- std::string covervalue = tempstring.str();
- theSession->ListingWindow()->WriteFullline( covervalue );
复制代码
|
|