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

clipping path in rasterimageproc
clipping path in rasterimageproc
hi,
during vectorization, for raster images having clipping paths we get the uvboundary parameter in rasterimageproc() as non-null and also the numboundpts parameter > 0. the uvboundary is null for non-clipped images.
however for both clipped and non-clipped images, following the call to rasterimageproc(), we always get a call to our polylineproc() (with image boundary in case of non-clipped images and the clipping path in case clipped images). is this behavior because of the kind of files we are creating or are we guarenteed to get this sequence of calls always?
the reason i ask this is: in our application, in case of clipping, we are applying the clipping path to the image in rasterimageproc() itself. so for clipped images we end up with 1 raster image + 1 clipping path + 1 non-clipping path. while for non-clipped images we only get 1 raster image + 1 non-clipping path.
so i was wondering whether this was the right way to go, or should we modify the polylineproc() to make the path clipping in case of raster images. this would give us a more consisent behavior in our app as we'd always get 1 raster image + 1 path (clipping or non-clipping) for each image in the drawing.
we don't want to lose the clipping information and hence would only like do this if we're guarented a call to polylineproc() in the said case.
thanks

quote:
however for both clipped and non-clipped images, following the call to rasterimageproc(), we always get a call to our polylineproc() (with image boundary in case of non-clipped images and the clipping path in case clipped images). is this behavior because of the kind of files we are creating or are we guarenteed to get this sequence of calls always?
it depends on raster variables, associated with the database (see dbrastervariables.h). depending on imageframe() raster variable, image frame may be turned off, may be drawn below or above the raster image.
quote:
the reason i ask this is: in our application, in case of clipping, we are applying the clipping path to the image in rasterimageproc() itself. so for clipped images we end up with 1 raster image + 1 clipping path + 1 non-clipping path.
it seems i missed to understand something.
in this case you should end up with 1 raster image + 1 clipping path (you should get it through polylineproc). where from are you getting 1 non-clipping path? from vectorization pipeline? if so, does odamfcapp renders this sample correctly?
also, what is the your task? (rendering? import?)
sincerely yours,
george udov
hi george,
imageframe raster variable is what we were looking for. thanks a lot for the pointer.
we're performing import and not render.
the problem we face is that if the imageframe is turned off, then all we get is the rasterimageproc() call (no polylineproc() call). in that case to implement the clipping we have to generate a new clipping path in the rasterimageproc() itself. anyway, thats more of a design issue specific to our application.
while implementing this we also ran into a small trouble that the clipping coordinates passed are off by -0.5. for example in the attached file, the image is 179x176 and has simply show clipped set to yes in autocad (no explicit clipping coordinates were given). the parameters passed to rasterimageproc() were:
numboundpts = 2
uvboundary = {(-0.5, -0.5), (178.5, 175.5)}
when what we really were expecting were
uvboundary = {(0, 0), (179, 176)}
any thoughts?
thanks
attached files (12.4 kb, 3 views)


quote:
while implementing this we also ran into a small trouble that the clipping coordinates passed are off by -0.5.
it is a feature of autocad, that we've reproduced.
rasterproc() implementation in our gs devices (e.g. exgigdigeometry::rasterimageproc) shifts coordinates by (0.5, 0.5) before "real using".
sincerely yours,
george udov
thanks.
we'd already got it working by using 0.5 shift. just wanted to know if there was a more elegent solution.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】2.0.2 crashes in rasterimageproc yang686526 DirectDWG 0 2009-05-04 02:51 PM
利用vla函数如何重新指定externalreference的path yang686526 ObjectARX(AutoLISP) 0 2009-04-26 05:47 PM
【求助】批量外部块对象选择问题 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 03:57 PM
【转帖】selected plane name and path yang686526 SolidWorks二次开发 0 2009-04-12 10:21 PM
【转帖】selected plane name and path yang686526 SolidWorks二次开发 0 2009-04-12 07:33 PM


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


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