NX Second Development - Creating CSYS coordinate system UF_CSYS_create_csys

. 1      NX9 + VS2012
 2  
3  
. 4      #include <uf.h>
 . 5      #include <uf_csys.h>
 . 6      #include <uf_mtx.h>
 . 7  
. 8  
. 9      UF_initialize ();
 10  
. 11      // input vector Y outputs a vector X * 3 3 matrix 
12 is      Double XVEC [ . 3 ] = { 0.0 , 0.0 , 1.0 };
 13 is      Double Yvec [ . 3 ] = { 0.0 , 1.0 , 0.0 };
 14      Double Mtx [ . 9 ];
 15     UF_MTX3_initialize (XVEC, Yvec, Mtx);
 16  
. 17      // create a 3 x 3 matrix 
18 is      tag_t matrixID = NULL_TAG;
 . 19      UF_CSYS_create_matrix (Mtx, & matrixID);
 20 is  
21 is  
22 is      // or written 
23 is      Double MatrixValues [ . 9 ] = { 1.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 , 0.0 , 1.0 };
 24      tag_t MatrixID1 = NULL_TAG;
 25     UF_CSYS_create_matrix(MatrixValues, &MatrixID1);
26 
27     //创建CSYS坐标系
28     double CsysOrigin[3] = {0.0, 0.0, 0.0};
29     tag_t CsysId = NULL_TAG;
30     UF_CSYS_create_csys(CsysOrigin, MatrixID, &CsysId);
31 
32 
33     UF_terminate();

 

Guess you like

Origin www.cnblogs.com/nxopen2018/p/10957177.html