高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】odgematrix3dsettoaligncoordsys troubles
odgematrix3d::settoaligncoordsys troubles
odgematrix3d::settoaligncoordsys troubles
dear sirs!
i've found some strange behaviour of odmatrix3d::settoaligncoordsys(). it seems that it does not function well. the sample code is:
code:
oddbobjectid newlayerid = addlayer(pdb, "test");
oddbblocktablerecordptr pms = pdb->getmodelspaceid().safeopenobject(oddb::kforwrite);
oddblineptr pline1 = oddbline::createobject();
pms->appendoddbentity(pline1);
pline1->setstartpoint(odgepoint3d(0, 0, 0));
pline1->setendpoint(odgepoint3d(1, 1, 0));
pline1->transformby(odgematrix3d().settoaligncoordsysfff">(odgepoint3d(0, 0, 0),
odgevector3d(1, 0, 0),
odgevector3d(0, 1, 0),
odgevector3d(0, 0, 1),
odgepoint3d(0, 0, 0),
odgevector3d(1, 0, 0),
odgevector3d(0, 0, -1),
odgevector3d(0, 1, 0)fff">));
pline1->setlayer(newlayerid);
oddblineptr pline2 = oddbline::createobject();
pms->appendoddbentity(pline2);
pline2->setstartpoint(odgepoint3d(0, 0, 0));
pline2->setendpoint(odgepoint3d(1, 1, 0));
pline2->transformby(odgematrix3d().settorotation(odapi2, odgevector3d(1, 0, 0)));
pline2->setlayer(newlayerid);
i think that poth lines shult have the save coordinates, but they are different . the similar arx code produces predictable and expectable results.
with best regards
sorry. settoaligncoordsys is not implemented yet.
its implementation will be available in 1.13
btw, two matrices would be the same if you use rotation by -odapi2:
settorotation( - odapi2, odgevector3d(1, 0, 0))
sergey slezkin
last edited by mmuratov; 31st march 2005 at 04:03 amfff">.
|