几何尺寸与公差论坛------致力于产品几何量公差标准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-05, 10:19 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】exploding oddbbody problems

exploding oddbbody problems
exploding oddbbody problems
i get a ecannotexplode result when i try to explode an oddbbody..
code:
oddbbodyptr pbody = pent;
cstring strentity = pbody->isa()->name();
odrxobjectptrarray entityset;
odresult result = handleodresult(pbody->explode(entityset));
gc_assert(result == eok);
what am i doing wrong?
hi,
it seems that you tried to explode body like full sphere. it cannot be exploded to something. there are no trmming loops like in region, for example. ( region will be exploded to enum of lines, circles, ect... )
quote:
originally posted by alexander rumyantsev
hi,
it seems that you tried to explode body like full sphere. it cannot be exploded to something. there are no trmming loops like in region, for example. ( region will be exploded to enum of lines, circles, ect... )
thanks alexander for your quick response .
i guess my next question would be how to get at that information. would i use some odbrbrep transverser?
well, you will get odgesphere object only from brep using. is it what you need ?

i'm now having issues with the brep class..
code:
odbrbrep br;
pbody->brep(br);
oduint32 num = 0;
odbrbrepfacetraverser bft;
bft.setbrep(br);fff"> // throws an odexception "invalid index
what i'm i doing wrong here?
last edited by grizzdaddy; 2nd may 2005 at 10:15 amfff">.
bump.. bump
anyone?
when i call pbody->brep(br); the odbrbrep object does not change.. and for some reason testing br.isvalid returns false.. i can load this fine in 1.12 odamfcapp too.
last edited by grizzdaddy; 2nd may 2005 at 01:06 pmfff">.
hi,
sorry for delay, celebrations were here. please, attach file. i will check it.
is exception odbrinvalidinput or invalidindex?
also, could you check, is modelergeometry.drx loaded into your application?
does next string return something ?
odrxclassptr pservice = odrxservicedictionary()->getat("odmodelergeometrycreator");
quote:
originally posted by alexander rumyantsev
also, could you check, is modelergeometry.drx loaded into your application?
does next string return something ?
odrxclassptr pservice = odrxservicedictionary()->getat("odmodelergeometrycreator");
i checked and no it is not, which would explain my issues..
how do i load it into my application? do i include it like the other dd libraries?
thanks,
graham
for lib project you need add next strings + link library
// define module map for statically linked modules:
#ifndef _toolkit_in_dll_
odrx_declare_static_module_entry_point(modelermodu le);
odrx_begin_static_module_map()
odrx_define_static_application("modelergeometry", modelermodule)
odrx_end_static_module_map()
#endif
for dll project call ( check for file modelergeometry.drx )
#define rx_modeler_geometry_appname "modelergeometry"
odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp(rx_modeler_geometry_appname);
where do i stick the odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp("modelergeometry"); code?
i've tried it in different locations and i still can't brep information!?!?
this doesn't work
code:
odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp("modelergeometry");
odrxclassptr pservice =
odrxservicedictionary()->getat(
"odmodelergeometrycreator"); // returns null

p3dsolid->brep(br);
oduint32 num = 0;
if (br.isvalid()) // returns false
i've also made pmodule a member variable and called the loadapp function early on at the beginning of my reader.. .but no luck..
this is really getting frustrating .
hi,
is pmodule equal null too ? is modelergeometry.drx in folder with app.exe ?
when you call .brep(brep), toolkit automaticaly call modelergeometry loading inside brep() function. it can fail only in one case, when it cannot locate modelergeometry.drx.
btw :
odamfcappdll, odwriteex_dll, odreadexdll samples use modelergeometry for solid reading\creation.
last edited by sslezkin; 6th may 2005 at 01:37 amfff">.
quote:
originally posted by alexander rumyantsev
hi,
is pmodule equal null too ? is modelergeometry.drx in folder with app.exe ?
yep odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp("modelergeometry") always returns null..
i've copied and pasted modelergeometry.drx into my debug directory, project directory, subproject directory, roots of c: and d:, and other locations.. i've even hardcoded the path to modelergeometry.drx and still it's always null.
is there something else i'm neglecting to do?
the code using dwgdirect is in a subproject of our application and is dll.. however our application is an exe.
i'm uploading the only file i have that has acis objects in it. i doubt it's the file though because the objects load fine in odamfcapp.exe
attached files (69.5 kb, 4 views)

please check return value of next ( after odinitialize(&svcs); ):
odrxdynamiclinkerptr plinker = odrxdynamiclinker();
odrxsystemservicesptr psystemservices = :drxsystemservices();
odstring modulename = psystemservices->findmodule("modelergeometry");
odrxmoduleptr pmodule = psystemservices->loadmodule(modulename, true);
do you have define _toolkit_in_dll_ in your app ?
last edited by sslezkin; 10th may 2005 at 01:03 amfff">.
quote:
do you have define _toolkit_in_dll_ in your app ?
i tried at one point and all i hundreds of linker errors.. gave up.
code:
odrxdynamiclinkerptr plinker = odrxdynamiclinker(); // good
odrxsystemservicesptr psystemservices = :drxsystemservices(); // good
odstring modulename =
psystemservices->findmodule("modelergeometry"); // finds the module
odrxmoduleptr pmodule =
psystemservices->loadmodule(modulename, true); // still null
last edited by grizzdaddy; 10th may 2005 at 04:30 pmfff">.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】dwf printing problems yang686526 DirectDWG 0 2009-05-05 07:51 AM


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


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