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

retrieving 3dsolid data
retrieving 3dsolid data
i have created several 3dsolid in acad (cylinder, box, extrude).
i want to import this entity in my cad.
my code working only for solid type of cylinder
code:

...
odrxinitmodelergeometry();
....
static void improddb3dsolid(oddb3dsolid* psolid)
{
odmemorystreamptr mem = odmemorystream::createnew();
psolid->acisout(mem, kaftypeascii|kafver400);
int len=mem->length();
if (!len)
return;
odbinarydata data;
data.resize(mem->length());
mem->seek(0, oddb::kseekfromstart);
mem->getbytes(data.asarrayptr(), mem->length());
odbrbrep brep;
odbrerrorstatus es=brep.set((const char*)data.asarrayptr());
if (es != odbrok)
return ;
odbrbrepedgetraverser bet(brep);
while (!bet.done())
{
odbredge edg;
bet.getedge(edg);
odgecurve3d* thecurve = null;
if (edg.getcurve(thecurve) != odbrok)
return ;
impcurve3d(thecurve, psolid);
bet.next();
}
}
i can't get edge for extrude or box.
help me, please.
attached files
try next :
...
odrxinitmodelergeometry();
....
static void improddb3dsolid(oddb3dsolid* psolid)
{
if (!psolid)
return;
odbrbrep brep;
psolid->brep(brep);
odbrbrepedgetraverser bet(brep);
while (!bet.done())
{
odbredge edg;
bet.getedge(edg);
odgecurve3d* thecurve = null;
if (edg.getcurve(thecurve) != odbrok)
return ;
impcurve3d(thecurve, psolid);
bet.next();
}
}
i get error---->'brep' : is not a member of 'oddb3dsolid'
what kind of ddt version do you use?
quote:
originally posted by alexander rumyantsev
what kind of ddt version do you use?
dwgdirect 1.10, 1/23/2004
oddb3dsolid::brep was added in 1.11.
i cannot reproduce your situation in 1.10. it is very strange that one 3dsolid works normaly, and other didn't work. can you tell me in what place you have error (code line) ?
btw : 1.11 is available, try to use new ddt version. 1.11 is much better than 1.10 for acis/solid support.
last edited by sslezkin; 17th june 2004 at 04:53 amfff">.
no any error.
just for any solid no edge.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)