查看单个帖子
旧 2009-05-07, 03:25 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】saving A Solid Using Acisin90 - Extents Question

saving a solid using acisin() - 'extents' question
saving a solid using acisin() - 'extents' question
i'm attempting to add a 3dsolid to a dwg filem using the following code ('pdb' is my open database) ...
const odchar* psatfilename = satfilename;
if(:dsystemservices()->accessfile(psatfilename, oda::kfileread))
{
odrdfilebuf satfile(psatfilename);
oddb3dsolidptr p3dsolid = oddb3dsolid::createobject();
p3dsolid->acisin(&satfile);
oddbblocktablerecordptr pms = pdb->getmodelspaceid().safeopenobject(oddb::kforwrite) ;
oddbobjectid exentid = pms->appendoddbentity(p3dsolid);
}
after i save the dwg file, it does successfully put the 3dsolid in the file, but i can't see it when i use autocad or autodesk's dwgviewer. when i open the file in odamfcapp, everything looks ok, except that when i look at the <acdbblockbegin> for the *model_space block, the last 'string' in the block has a 'value' of "getgeomextents() : invalid extents". when i look at the <acdb3dsolid>, the last 'string' has a 'value' of "getgeomextents() : null extents"
it appears to me that i need to be providing these extents, but i don't see anything in any of the "save a solid" examples which does this.
any ideas? thanks in advance.
pete
i did make one change that seems to help. the sat data was being saved as r15. when i switched to r7, the 3dsolid now has valid extents and the saved dwg file does now come into autocad and dwgviewer!
don't know why, but i'm glad it works!
thanks for listening...
pete
is your sat has 20800 in sat header ? if yes - it is autocad internal sat format, i dont know viewers, which can show it. you should save sat to v7.
i can help you with extents problem, if you attach some files or email it to me (arumyantsev@softdev.spb.ru)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)