几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 03:48 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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-&gt;setxline1point(4.519309,2.091594);
dim-&gt;setxline2point(7.494854,5.986679);
dim-&gt;setcenterpoint(5.721700,5.758996);
dim-&gt;setarcpoint(5.994943,2.091594);
dim-&gt;usesettextposition();
dim-&gt;settextposition(7.421235,2.497695);
dim-&gt;setdimensiontext("140");
then an unhandled exception is thrown from within recomputedimblock(). if i use :
dim-&gt;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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to handle the dimension block reference yang686526 DirectDWG 0 2009-05-06 02:50 PM
【转帖】grouping in svg based on block hierarchy yang686526 DirectDWG 0 2009-05-05 11:41 AM
【转帖】cloning a block yang686526 DirectDWG 0 2009-05-04 05:50 PM
【转帖】an angular dimension error yang686526 DirectDWG 0 2009-05-04 03:57 PM
【转帖】a dimension error yang686526 DirectDWG 0 2009-05-04 03:05 PM


所有的时间均为北京时间。 现在的时间是 08:06 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多