几何尺寸与公差论坛------致力于产品几何量公差标准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, 04:21 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】start-end- Points Of A Line After Zoom

start-/end- points of a line after zoom?
start-/end- points of a line after zoom?
is there a way to locate start point and end point of a line after a dxf have been enlarged (zoom)?
i have opened a simple drawing in a mfc application i抦 working on. i can zoom using a window (rubber band) or i just click to enlarge it. if i zoom-click then the drawing will be zoomed 2x around the point where i clicked. it抯 now i need to find line starts and ends for lines chosen by the user, after i抳e zoomed. i have been looking at this for some time now and i抳e tried different approaches, so fare i抳e not been successful so please help me!
regards
kennet
hello kennet,
not sure of exactly what your trying to work out here:
if the line geometry for example in a drawing is 10.0f, 10.0f, 0.0f -> 20.0f, 10.0f, 0.0f
and then you zoom in, the geometry remains the same, the zoom is generally applied to the view (ie think of a camera moving forward in the real world, the object does not change in size, you just moved closer to the object, and hence now looks bigger.)
so therefore the geometry remains exactly the same.
hope this helps.
cheers
jason
okay, i抦 afraid that my question might have been a bit blurred, i抦 sorry for that.
i know that when something is zoomed a 搗irtual camera?is moved, closing in on the object. the coordinates remain the same it抯 just the image that get抯 enlarged on screen.
below a sample of what i had hoped to fix somehow.
let抯 say i have a line that reach almost from the left end of the client area to the right like the image to the left below (zoom 1x). i have the x and y coordinates no problem.
now i zoom the image to 2x. i have a line that reach from the left to right that cover the same length as the client area. the coordinates are still the same it抯 only the camera that has moved closer.
now we are down to my question.
is there a way to keep track of the coordinates for the end-points sticking out to the left respectively to the right of the screen, p1 and p2? this preferably relative screen or client coordinates.
code:
zoom 1x zoom 2x
┌─────────┐ ┌─────────┐
│ │ │ │
│ ─────── │ p1 ───│─────────│─── p2
│ │ │ │
└─────────┘ └─────────┘why i need to find p1 and p2 is a long story.
i hope this have cleared things a little bit.
regards
kennet
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to export hideline data yang686526 DirectDWG 0 2009-05-06 02:35 PM
[求助]请教高手,这段程序能否简化一下呢? yang686526 ObjectARX(AutoLISP) 0 2009-04-26 02:45 PM
【转帖】[原创]曲线打断于交点 yang686526 ObjectARX(VB.NET/C#) 0 2009-04-20 03:19 PM


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


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