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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】createfrustum (http://www.dimcax.com/hust/showthread.php?t=15567)

yang686526 2009-05-04 06:45 PM

【转帖】createfrustum
 
createfrustum...
createfrustum...
im using the following code
code:
void chsucsicon::viewportdraw(odgiviewportdraw* pvd) const
{
oddb3dsolidptr psolid=oddb3dsolid::createobject();
psolid->createfrustum(10,3,3,3);
pvd->geometry().draw(psolid.get());
}
i get a crash on the draw. any ideas what i've done wrong?
thanks,
tyler
crash on second geometry().draw(psolid) call...
alexander,
i've implemented what you suggested...as well as several variations. unfortunately, i get a crash on the second geometry().draw(psolid) call. the first call works fine, but i never get past the second one. its not as if the first call is corrupting the data (i tried a single oddb3dsolid in my odgidrawableimpl) but that had the same problem. creating a new one each time exhibits the same behavior...
suggestions?
tyler
also, please, try call with clear solid :
oddb3dsolidptr psolid = oddb3dsolid::createobject();
pvd->geometry().draw(psolid.get());
have you any crashes ?
dd 1.13.04
yes it crashes on the empty as well:
code:
oddb3dsolidptr psolid=oddb3dsolid::createobject();
geometry.draw(psolid);
however... this doesn't:
code:
oddblineptr pline=oddbline::createobject();
geometry.draw(pline);
tyler
also try next... it is only for debug :
code:
oddb3dsolidptr psolid = oddb3dsolid::createobject();
oddbblocktablerecordptr pblock = ownerid().safeopenobject(oddb::kforwrite);
odstreambufptr m = odmemorystream::createnew();
odstring s = createfrustum( 10,3,3,3 );
m->putbytes( s.c_str(), s.getlength() );
m->rewind();
psolid->acisin(m);
pblock->appendoddbentity(psolid);
pvd->geometry().draw(psolid.get());
psolid->erase(true);
alexander,
the regentype()==odgirendercommand...
tyler
do you have an idea of when a new version of dd will be released (either to ftp or general?
thanks,
tyler


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