几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】can not get the correct point array from oddbspatialfilter (http://www.dimcax.com/hust/showthread.php?t=15338)

yang686526 2009-05-04 05:23 PM

【转帖】can not get the correct point array from oddbspatialfilter
 
can not get the correct point array from oddbspatialfilter
can not get the correct point array from oddbspatialfilter
my code as follow:
oddbblockreferenceptr insert =(oddbblockreferenceptr)pmsent;
oddbspatialfilterptr pfilt = oddbindexfiltermanager::getfilter(insert,
oddbspatialfilter::desc(), oddb::kforread);
if (pfilt.get())
{
odgepoint2darray points;
odgepoint2darray points1;
odgevector3d normal;
double elevation, frontclip, backclip;
bool enabled;
pfilt->boundary(points1);
pfilt->getdefinition(points, normal, elevation, frontclip, backclip, enabled);//the points.size is 32. elevation =0;normal =(0,0,1).but it seems that all of the points are not right.should i do some transform???fff"> frontclip = pfilt->frontclipdist();
backclip = pfilt->backclipdist();
odgepoint3d origin0 = pfilt->origin();
int ptsize = points.size();
}
spatial filter also contains a couple matrices. you can get them from odgiclipboundary using.
code:
odgiclipboundary boundary;
bool benabled;
pspfilter->getdefinition(boundary, benabled);transformation matrix for boundary points to block's space would be:
code:
odgematrix3d toblockspace = boundary.m_xinverseblockrefxform * boundary.m_xtoclipspace.inverse();note that m_xinverseblockrefxform is inverse matrix for block reference at the moment spatial filter was created.
sergey slezkin


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