几何尺寸与公差论坛------致力于产品几何量公差标准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-07, 06:12 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】vc== Project Setup Vc== For 3d Extrusion Create Region

vc++ project setup vc++ for 3d extrusion\ create region
vc++ project setup vc++ for 3d extrusion\ create region
hello,
iam new to this library and i am trying to create a 3d extrusion using the code below:
odrxobjectptrarray curves;
odrxobjectptrarray regions;
oddb3dsolidptr psolid = oddb3dsolid::createobject();
oddbcircleptr pcircle = oddbcircle::createobject();
pcircle->setcenter(odgepoint3d(3,3,0));
pcircle->setradius(1.);
pcircle->setnormal(odgevector3d(0,0,1));
curves.push_back(pcircle.get());
odresult res;
oddbregionptr preg;
res = preg->createfromcurves(curves, regions);
the following error message appears on the last line. i have checked my vc++ project settings but
can't detect any errors. i have no problem drawing other 3d objects?
error lnk2001: unresolved external symbol "public: static enum odresult __cdecl oddbregion::createfromcurves(class odarray<class odrxobjectptr,class odobjectsallocator<class odrxobjectptr> > const &,class odarray<class odrxobjectptr,clas
s odobjectsallocator<class odrxobjectptr> > &)" (?createfromcurves@oddbregion@@sa?aw4odresult@@abv ?$odarray@vodrxobjectptr@@v?$odobjectsallocator@vo drxobjectptr@@@@@@aav3@@z)
debug/3dsolid.exe : fatal error lnk1120: 1 unresolved externals
any ideas?
using
code:
findstr /m /i /s /c:"createfromcurves" *.lib
i found
code:
lib\vc2003md\dd_acisbuilder_dll.lib
lib\vc2003md\dd_vc2003md_acisbuilder.lib
lib\vc2003md\dd_vc2003md_db.lib
lib\vc2003md\dd_vc2003md_modelergeometry.lib
lib\vc2003ml\dd_vc2003ml_acisbuilder.lib
lib\vc2003ml\dd_vc2003ml_db.lib
lib\vc2003ml\dd_vc2003ml_modelergeometry.lib
lib\vc2003mt\dd_vc2003mt_acisbuilder.lib
lib\vc2003mt\dd_vc2003mt_db.lib
lib\vc2003mt\dd_vc2003mt_modelergeometry.lib
you might try linking the appropriate library.

these libraries are already specified in the project.
i have upgraded to version opendwg1.12.04 and this resolved the issue.
iterated then through the regions to extrude:
odrxobjectptrarray curves;
odrxobjectptrarray regions;
double dradius = 3.0;
odgepoint3d centerpt;
centerpt.x = 1.0;
centerpt.y = 1.0;
centerpt.z = 1.0;
oddbobjectid blockid = pdb->getmodelspaceid();
oddbblocktablerecordptr pblock = blockid.safeopenobject(oddb::kforwrite);
oddbcircleptr pcirc = oddbcircle::createobject();
pcirc->setcenter(centerpt);
pcirc->setradius(dradius);
oddb3dsolidptr psolid = oddb3dsolid::createobject();
curves.push_back(pcirc.get());
odresult res = oddbregion::createfromcurves(curves, regions);
odrxobjectptrarray::iterator pit = regions.begin();
odrxobjectptrarray::iterator pend = regions.end();
while(pit != pend)
{
if (psolid->extrude(oddbregionptr(oddbentity::cast(*pit)), 50, 0) == eok)
{
pblock->appendoddbentity(psolid);
}
++pit;
}
hello,
i’m try code above for create 3dsolid, but
odresult res = oddbregion::createfromcurves(curves, regions);
returns enointerface.
i’m using directdwg 1.12.04, static libraries.
how solve this problem?
may be some other way for create 3dsolid exist?
vitali.
hi
first lines in oddbregion::createfromcurves are
odrxclassptr pservice = odrxgetmodelergeometrycreatorservice();
if (!pservice.get())
return enointerface;
odmodelergeometrycreatorptr pcreator = pservice->create();
if (!pcreator.get())
return enointerface;
it seems that you forgot modeler library ? look at ... and around
odrx_declare_static_module_entry_point(modelermodu le)
in odamfcapp.cpp.
limitation of createfromcurves:
curves (i) an array of curves, containing pointers to
oddb3dpolyline
oddbarc
oddbcircle
oddbellipse
oddbline
oddbpolyline
oddbspline
the curves must be ordered by start/end points (the end point of
each curve must be equal to start point of the next curve, and
the last end point should be equal to the first start point).
all curves must be in the same plane.
also it support only one loop ( doesnt support holes; one array - one ordered loop - one output region )
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to finding wheter a region is inside another region yang686526 DirectDWG 0 2009-05-06 02:37 PM
【转帖】how to create region with hole yang686526 DirectDWG 0 2009-05-06 02:26 PM
【转帖】cannot create a region from closed curve segments containing yang686526 DirectDWG 0 2009-05-04 05:26 PM
【转帖】setup project for developed addin yang686526 SolidWorks二次开发 0 2009-04-13 02:15 PM
【转帖】how do i create an installer api projec yang686526 SolidWorks二次开发 0 2009-04-13 11:50 AM


所有的时间均为北京时间。 现在的时间是 02:40 AM.


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