几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】clipping blockreference problem (http://www.dimcax.com/hust/showthread.php?t=15410)

yang686526 2009-05-04 05:48 PM

【转帖】clipping blockreference problem
 
clipping blockreference problem.
clipping blockreference problem.
for the attached drawing i apply:
code:

oddbdatabaseptr pdatabase = ...;

oddbblocktablerecordptr pmodelspace = pdatabase->getmodelspaceid().openobject();
oddbobjectiteratorptr pit = pmodelspace->newiterator();
oddbblockreferenceptr pblockreference = oddbblockreferenceptr();
for (pit->start(); !pit->done(); pit->step()){
oddbentityptr pent = pit->entity();
if ( pent->isa() == oddbblockreference::desc() ){
pblockreference = pent;
}
}
oddbspatialfilterptr pfilt = oddbspatialfilter::createobject();
odgepoint2darray points;
points.clear();
points.push_back(odgepoint2d(7311.9157 , -182.7977));
points.push_back(odgepoint2d(-5788.6003 , 3351.2947));
points.push_back(odgepoint2d(-6946.3186 , -2741.9681));
points.push_back(odgepoint2d(7311.9157 , -182.7977));

pfilt->setdefinition(points, odgematrix3d::kidentity,
oddb_infinite_xclip_depth, oddb_infinite_xclip_depth, true);

oddbindexfiltermanager::addfilter(pblockreference,pfilt);
the system crashes.
please check this!
thanks,
mihail.
attached files


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