高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】oddbordinatedimension neglecting setorigin90
oddbordinatedimension neglecting setorigin()
oddbordinatedimension neglecting setorigin()
hi,
i am trying to use oddbordinatedimension::setorigin( ) function to set originpoint. but when i try to get the ::measurement() value for the dimension, it returns distance between (0, 0, 0) and definingpoint(ie. either x or y co-ordinate of definingpoint). i expected it to return distance between originpoint and definingpoint along x/y axis. any work around for this?
thx.
this bug is already fixed in 1.14.02 pre-release code.
1.14.02 is going to be released in nearest days.
the workaround is: (odordinatedimrecomputor.cpp)
code:
void odordinatedimrecomputor::getdimparams(const oddbdimension* pdim)
{
oddimrecomputor::getdimparams(pdim);
oddbordinatedimensionptr pdimptr(pdim);
m_defpoint1 = pdimptr->definingpoint();
m_defpoint2 = pdimptr->leaderendpoint();
m_bxord = pdimptr->isusingxaxis();
m_dimlinedefpt = pdimptr->origin();
}
void odordinatedimrecomputor::setdimparams(oddbdimension* pdim) const
{
oddimrecomputor::setdimparams(pdim);
oddbordinatedimensionptr pdimptr(pdim);
pdimptr->setdefiningpoint(m_defpoint1);
pdimptr->setleaderendpoint(m_defpoint2);
pdimptr->setorigin(m_dimlinedefpt);
if(m_bxord)
pdimptr->usexaxis();
else
pdimptr->useyaxis();
}
sincerely yours,
george udov
|