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

oddbviewport vectorization
oddbviewport vectorization
hi support,
i ran odvectorizeex on the attached simple.dwg and i got the attached dump.txt.
i do not understand why the dump of acdbviewport does not contain the clipped line segment (you can see ot if you open simple.dwg in autocad).
is there a way to dump the clipped entities displayed in a viewport ?
attached files
*model_space is displayed through the viewport.
line is not clipped, it is completely visible.
vladimir

ok the segment is visible in the model space and in the viewport.
so why does not it appear in the viewport dump ?
in the dump you see 3 gs views
start drawing <acdblayout>. . . . . . [51] (overall viewport (paperspace entities))
start drawing *model_space. . . . . . [1f] (viewport contents)
start drawing *paper_space. . . . . . [50] (viewport borders)
the last of these views is temporary, created to ensure correct draw order of viewport borders and viewport entities (drawviewportsfirst flag).
(try to insert several viewports in the active layout and compare dumps.)
vladimir

my purpose is to get the geometric primitives of what is visible in an oddbviewport.
i first tried the odgetgeomex sample on a viewport but of course only the viewport borders were dumped.
i then tried odvectorizeex but it dumps the whole file and i don't know how to sort the information i need from your sample.
i would like to write something like that :
myoddbviewport->worlddraw(myodgibasevectorizer) ;
and then receive the geometric primitives in odgibasevectorizer::circulararc,
odgibasevectorizer:olyline,etc.
what do you suggest ?
the simplest solution would be to hide all the gs views but one after setupactivelayouts is called.
odgsbasevectorizeview has members called 'viewportid', and 'hide', and odgsdevice can enumerate views (numviews + viewat).
vladimir

if you read the dump.txt in my previous post, the segment coordinates are
vertex[0] . . . . . . . . . . [144,1 323,9 0,0]
vertex[1] . . . . . . . . . . [855,9 676,1 0,0]
but if you read simple.dwg in autocad and check the segment coordinates in the viewport, they are :
[28.13 ; 49.55] [238.56 ; 153.64]
how should i modify exsimpleview::update() to dump the same coordinates as in autocad paperspace ?
perhaps you speak about paper space world coordinates?
i cannot imagine what for you may need them (speaking about viewport contetnts).
change eyetoscreenmatrix, if it is indeed what you need...
vladimir

you will find attached 20456.dwg, containing a viewport in which a circle is visible, and 20456.txt, the oddbvectorizeex dump of this dwg.
i wonder why the circle is dumped as a polyline and not as a circle ?
attached files (50.6 kb, 4 views)
(116.1 kb, 3 views)

search the sample for the string "reduced elliparc data" (from the dump file)
vladimir

is there a way to avoid exploding curves into several dashes when they have a non continuous linetype ?
i fear, there is no simple way to achieve that.
the "correct" way is to create plot style table with overridden linetype and attach it to the drawing. this is rather complex.
more easy is to always set continuous linetype id to active entity traits (subentitytraits) before calling base vectorizer. (in plineproc(), etc. )
vladimir

it works ! thank you very much !
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】is there a way to cancel vectorization yang686526 DirectDWG 0 2009-05-06 04:19 PM
【转帖】incorrect vectorization of 2d solid yang686526 DirectDWG 0 2009-05-06 03:50 PM
【转帖】different vectorization of same file on windows and mac yang686526 DirectDWG 0 2009-05-04 07:29 PM
【转帖】color problem with hatch while vectorization yang686526 DirectDWG 0 2009-05-04 05:55 PM
【转帖】3d to 2d vectorization yang686526 DirectDWG 0 2009-05-04 03:03 PM


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


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