查看单个帖子
旧 2009-05-04, 05:23 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)