NXOpen 座标UI获取 (原点 矩阵变换)

  //获取座标UI值
  PropertyList *csysproperty = coord_system0->GetProperties();
  std::vector<TaggedObject *> getCsys = csysproperty ->GetTaggedObjectVector("SelectedObjects");
  //转换成座标系
  NXOpen::CartesianCoordinateSystem *cartesiancoords = dynamic_cast <NXOpen::CartesianCoordinateSystem *>(getCsys[0]);
  //原点
  Point3d Componentorigin = cartesiancoords->Origin();
  //获取座标矩阵
  NXMatrix *nXMatrix = cartesiancoords->Orientation() ;
  Matrix3x3 matrix1 = nXMatrix->Element();

  double origin1 [ 3 ] = { Componentorigin.X,Componentorigin.Y,Componentorigin.Z };
  double matrix [ 9 ] = {matrix1.Xx,matrix1.Xy,matrix1.Xz,matrix1.Yx,matrix1.Yy,matrix1.Yz,matrix1.Zx,matrix1.Zy,matrix1.Zz};

怡宁塑胶模具设计
原文地址:https://www.cnblogs.com/hqsalanhuang/p/14469085.html