几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 03:00 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】how to obtain the uom for wcs units

how to obtain the uom for wcs units
how to obtain the uom for wcs units
how can i find out the unit of measure being used for wcs measurements? for example, how can i determine if the odgeextents3d value returned by getgeomextents() for an oddblayout object is in feet, yards, meters, or altogether something else? i can't find anything in the documentation that gives me this information. thanks for your help.
more details
i would like to provide details on my post. i read other posts saying that we can assume 1 wcs unit = 1" if the measurement is in english instead of metric. however, i have not seen this to be consistent. for example, in the attached .dxf file, getgeomextents() for the model layout returns the following extents with min of 0, 1284 and a max of 1920, 0, which makes the drawing 1920x1284 in size. however, the numbers don't seem to make sense. when i display the drawing after zoomextents(), there's no way that what's being displayed is 1920 inches x 1284 inches. of course, i'm assuming that what's being displayed after doing zoomextents() corresponds to the same area referred by getgeomextents() of the layout. can anyone help me understand what i'm doing wrong? thanks.
attached files (375.0 kb, 2 views)

last edited by than; 27th november 2006 at 05:05 pmfff">.
world coordinates do not have associated units other than in/cm, they may be regarded as a dimensionless quantity.
there is an insunits variable that control scaling of inserted blocks. it may be regarded as drawing units in some context.
vladimir
what about the value returned from getgeomextents?
ok. i understand that the units can be either cm or inches depending on whether it's metric or not. i guess the more important question is whether i can rely on the value being returned from getgeomextents() for the oddblayout object. when i do a zoomextents() on the view, is the view showing me the area specificed by oddblayout::getgeomextents()? if not, what is the area that zoomextents() is showing me?
oddblayout::getgeomextents() for modelspace just returns {limmin,limmax} (which may be invalid).
zoomextents() takes into account hidden layers/entities, etc. it is supposed to work exactly like corresponding acad command
vladimir
how do i get the wcs extents of zoomextents()?
ok... it's what i suspected... basically, there's no real correlation between layout extents and zoomextents(). now, what i want to do is to tell the user the width and height of what they're looking at in the view, in wcs units. how do i get that? my only guess is to do the following:
1) get the display width and height using oddbabstractviewpe::viewextents()
2) get the matrix that transforms the display to wcs using oddbabstractviewpe::eyetoworld()
3) transform the result of viewextents() using the matrix from eyetoworld(), which should give me the width and height of the view in wcs
is my assumption correct? anything i missed? thanks.
it looks like a correct way.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to get the units of a drawing file yang686526 DirectDWG 0 2009-05-06 02:48 PM
【转帖】asme美国机械工程师标准目录2 huangyhg American standards 5 2009-04-26 02:38 PM
【转帖】units macro usless in 09 yang686526 SolidWorks二次开发 0 2009-04-12 10:43 PM


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


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