![]() |
【转帖】how to implement odgematrix3daligncoordsystem90
how to implement odgematrix3d::aligncoordsystem()
how to implement odgematrix3d::aligncoordsystem() it seems that this function is not implemented. can someone please help me in implementing it? i need to convert 3d coordinates from ucs to wcs and this function seems the ideal candidate to do it... thanks in advance for any help. regards chudomir quote: originally posted by chudo i need to convert 3d coordinates from ucs to wcs and this function seems the ideal candidate to do it... i think the ideal candidate to convert 3d coordinates from ucs to wcs is function setcoordsystem(). such matrix is built in cdwgviewer::getworldstartendpoints function, that used in append line sample. code: oddbdatabase* pdb = database(); odgepoint3d ucsorigin; odgevector3d ucsxaxis, ucsyaxis; if(pdb->gettilemode()) { ucsorigin = pdb->getucsorg(); ucsxaxis = pdb->getucsxdir(); ucsyaxis = pdb->getucsydir(); } else { ucsorigin = pdb->getpucsorg(); ucsxaxis = pdb->getpucsxdir(); ucsyaxis = pdb->getpucsydir(); } odgematrix3d ucs2wcs; ucs2wcs.setcoordsystem(ucsorigin, ucsxaxis, ucsyaxis, odgevector3d()); sincerely yours, george udov thank you george, this works! but why is the last argumtnt an empty vector odgevector3d()? i passed the real ucs normal and it seemed ok... thanks again. regards chudomir quote: originally posted by chudo but why is the last argumtnt an empty vector odgevector3d()? i passed the real ucs normal and it seemed ok... if you pass ucsxaxis.crossproduct(ucsyaxis), it will take z coordinate of input points into account. if an empty vector odgevector3d() - it won't. thats single difference. sincerely yours, george udov thanlks for your help. regards chudomir |
所有的时间均为北京时间。 现在的时间是 05:31 PM. |