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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-07, 12:37 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】reading spatial filters

reading spatial filters
reading spatial filters
i wish to read spatial filters from a dwg file. i found how to get some of the information, but cannot see how to get the tranform which is at the end of the object in a dxf file (the one described as "this matrix transforms points into the coordinate system of the clip boundary " in autocad's dxf docs). am i missing something or is that not yet available.
i think it makes sense to add such function to oddbspatialfilter interface but it can be contructed from normal and elevation returned by getdefinition():
odgematrix3d::worldtoplane(normal) * odgematrix3d::translation(odgevector3d(0.,0.,-elevation)),
sergey slezkin
more on transforms
thank you. i now think i need the other (inverse block insertion) transform (probably as well-i don't think i really understand the way the transforms work yet)!
what i need is the boundary in either the coordinates of the block being inserted (assume that i've clipped a block insertion with the xclip command) or in the coordinates of the drawing (wcs). if i get one of those i can get the other using the current transform for the block insertion, which may not be the same as that included (as an inverse) in the spatial filter.
the case i want to "work" is that i have a block reference (in my case to an xref) with non-zero rotation. i apply a clipping rectangle to it, and then select it and rotate it (this is what makes the 2 "block insertion" tranforms different-the clipping rectangle is now not). the result of this is a clipping rectangle which is not aligned with the x-y axes.
i see. the matrix which is the inverse of the original block reference transformation is required if block reference transformation was changed after creating spatial filter.
we'll add methods to get both spatial filter matrices.
sergey slezkin

hi sergey,
i have a problem about transforming the spatial filter boundary into wcs. actually i have a file with only one block ref and i get some coordinates but none of the retrieved transformations can move them where they should be. i put some debug output window content here:
item=spatial
origin: (0.000000, 0.000000, 0.000000) // p->origin ()
normal: (0.000000, 0.000000, 1.000000) // p->normal ()
pt[0] = (-30048.018507, 61747.955593)// p->boundary ()
pt[1] = (-16313.461306, 79717.294142)
// p->getdefinition () data
origin: (0.000000, 0.000000, 0.000000)
normal: (0.000000, 0.000000, 1.000000)
transformation from model to clip space:
origin: (0.000000, 0.000000, 0.000000)
x axis: (1.000000, 0.000000, 0.000000)
y axis: (0.000000, 1.000000, 0.000000)
z axis: (0.000000, 0.000000, 1.000000)
transformation from block space to world:
origin: (9715842.031662, 5158644.595362, 0.000000)
x axis: (1.000000, 0.000000, 0.000000)
y axis: (0.000000, 1.000000, 0.000000)
z axis: (0.000000, 0.000000, 1.000000)
pt[0] = (-30048.018507, 61747.955593)
pt[1] = (-16313.461306, 79717.294142)
but the boundary box should be about (83000,19000) to (97000,36000)
could you help me? if you need the file to find it out i'll send it.
thank you
tibor
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】applying spatial filters yang686526 DirectDWG 0 2009-05-04 04:07 PM
【转帖】selection filters are turned off after inserting bom yang686526 SolidWorks二次开发 0 2009-04-13 02:12 PM
【公告】Spatial 高校论文奖励计划 yogy ACIS 0 2007-09-06 10:47 AM
Spatial 推出 3D组件组合ACIS造型器和InterOp转换器的R17版本 yogy ACIS 0 2007-05-21 10:00 AM
Spatial recruitment >Email to WU Min [Min.WU@Spatial.Com] huangyhg ACIS 0 2006-11-13 09:32 AM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多