高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】incorrect generation of dimension block
incorrect generation of dimension block
incorrect generation of dimension block
hello!
i have a problem with generation dimension block for oddb3pointangulardimension. i don抰 know, may be with problem present on other type of dimension too.
i want to get dimension without text and suppress outside-extensions dimension lines. but in autocad it looks with text and with arrows outside extension lines. but if i just click any property (in autocad property window) and select the same value (this action may be cause recompute dim block) the dimension start display right.
here is sample code:
[code]
oddbarcptr pacarc = oddbarc::createobject();
if(pacarc.isnull()) return false;
if(pacblock->appendoddbentity(pacarc).isnull()) return false;
pacdim->setdimensionstyle(m_db->getdimstylestandardid());
pacdim->setxline1point(... coords ...);
pacdim->setxline2point(... coords ...);
pacdim->setcenterpoint(... coords ...);
pacdim->setarcpoint(... coords ...);
pacdim->settextposition(pacdim->arcpoint());
pacdim->setdimensiontext(".");
pacdim->setdimsoxd(true);
</pre><hr></blockquote>
[ june 04, 2003: message edited by: dark star ]</p>
best regards,
ivan obraztsov
it's a bug in dd. we'll try to fix it asap.
sergey slezkin
pity,
is any way to be notified about fix this bug?
best regards,
ivan obraztsov
recomputedimblock() is quite complex and sophisticated function; for each kind of dimension its result depends on about 80 dimension variables, dimension data, etc. even on coords that you haven't wrote :-)
the best way to catch bugs in it - create dwg file with only dimension entity, call recompute dimension block using odamfcapp application, and compare result with autocad's one. if something goes wrong - mail file to me (gudov sobaka softdev tochka spb tochka ru - address coded with anti-spam purpose).
some issues in angular dimensions i fixed today (missing extlines, incorrect text string handling), but i'm not sure that it is all you complained of.
sincerely yours,
george udov
thank you.
i抣l start work with other dimensions today. if i find bugs, i抣l send to you sample file.
best regards,
ivan obraztsov
hi there.
i've had a similar problem with 3 point angular dimensions. if i use these values :
dim->setxline1point(4.519309,2.091594);
dim->setxline2point(7.494854,5.986679);
dim->setcenterpoint(5.721700,5.758996);
dim->setarcpoint(5.994943,2.091594);
dim->usesettextposition();
dim->settextposition(7.421235,2.497695);
dim->setdimensiontext("140");
then an unhandled exception is thrown from within recomputedimblock(). if i use :
dim->usedefaulttextposition();
then the exception isnt thrown but the dimension block gets generated incorrectly. reading the output file into autocad and messing in the dimension properties window regenerates the dimension and it gets displayed correctly.
is this fixed by the fixes you mentioned above and if so, do you know when its likely to make it into a release?
on current code i cannot reproduce any exceptions thrown from recomputedimblock().
but in both cases dimension block has 2 small differences with one generated by autocad - too small break in arc and end of one extension line's place.
i'll fix these defects today.
sincerely yours,
george udov
thanks for looking at this.
i think the exceptions may have been thrown because of some confusion on my part over what length units were being used. my input data was in mm and (i think) dwgdirect operates in inches by default? i seemed to get very small dimension text/arrow heads using the standard dimstyle, but when i scaled my data into inches i got much better results and no exceptions.
some comments on measurement issues:
oddbhostappservices::createdatabase() and oddbdatabase::initialize() have a parameter specifying english or metric units are to used in the drawing. it effects initial value of some system variables and some values of default objects like default dimension style.
btw, default dimension style in metric database has "iso-25" name. default style is the first in dimstyle table.
sergey slezkin
|