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

get regenabort() to work.
get regenabort() to work.
in the sample odamfcapp the cdwgviewer class
implements "bool regenabort() const". i tried to do
this as well in the singledoc sample, but there it
does not work. i really do not understand why this is.
regards, jeroen posch.
hi,
i've inserted
bool csingledocview::regenabort() const
{
return false;
}
and it's called from vectorization (i got there in debugger).
or do you mean you copy implementation of regenabort() from odamfcapp to singledoc sample..? then you should copy other related functions e.g.:
afx_msg lresult cdwgviewer:nredraw(wparam wparam, lparam lparam),
void cdwgviewer:npaint().
what behaviour of singledoc do you want to achieve ?
regenabort in simpledoc sample app
hi dmitry,
i modified the singledoc sample to do the vecorisation in
a thread (like in the odamfcapp sample) so i can do zoom
in/out and panning using the scroll wheel and things like that, and then interrupt the vectorisation when a new
wheel/move message is received while the vectorisation is
still in progress. the threaded vectorisation i got to work
perfectly.
i then added "bool regenabort(void) const" to the header file, and an implementation to the source file where i return the value of a "volatile bool m_babortregen" which
is set when required so the vectorisation will be
interrupted if required. it did not work (?).
i am now working at home and have an unmodified version
of all the example sources here and did the same here as
you say yo did. to my shame i must admit that indeed it
does work now ;-(.
i do not have the modified sources from the office with me now, so it is a bit hard for me to find out what i did wrong.
i will get back on that monday.
what i want to do with the singledoc sample is find out
how i can integrate the vectorisation/rasterisation of the
library into our own products. these are dredging support navigation programs for hopper/cutter/backhoe dredgers.
for that purpose i only need to be able to vectorize/ rasterize a dwg to a memorydc/bitmap for off-screen display preperation. i think i have found out how i can do that with the wingdi sample vectorizer but i needed to be able to abort the proces, i must have overlooked something.
one other thing i need to be able to do is have the vectorizer only re-process a small rectangular area
(in pixel space) of the drawing. i now do that by telling
the vectorizer the size of the vectorisation area has
changed with the funtion onsize() and then adjusting the world to device conversion with odgsbasevectorizeview::setview(). this works ok, but it results in small shifts of pixels in the resulting image.
--> is there a way to leave the size of the image the same as when the original vectorisation took place, but have the
vectorizer only re-vectorize a part of the image where that part is based on a rectangle in pixel space? thus setting
"world clipping limits" for the vectorizer/rasterizer. remember i only process 2d entities.
i find it very hard to find this out from the documentation.
looking through the forum i saw someone asking about the possibility to simplify the contents of a dwg into lines,
polylines, (filled) polygons, arcs and circles. i think this would be a very good idea because my code for rasterizing
polyline/polygon based drawings is much faster then the
wingdi sample. this is probably because i only handle 2d
entities and thus do not need the extra geometry conversion for handling the more complex 3d to display translation required for a general dwg file.
if you have a suggestion on how the achieve the conversion of a dwg (including texts) to lines, polylines, polygons, arc and circles easily i would be very gratefull.
kind regards,
jeroen posch.
hi jeroen,
we rejected separate thread rendering and modified odamfcapp to render in the main thread because of complexity of proper thread synchronization and other problems with third-party code (e.g. ole).
i'm sorry but i can't say what's wrong with your code...
quote:
originally posted by jepo
--> is there a way to leave the size of the image the same as when the original vectorisation took place, but have the
vectorizer only re-vectorize a part of the image where that part is based on a rectangle in pixel space
1. the logical view and viewport parameters must be left original.
2. hdc must be clipped to enable modification of required part only.
3. in odgsview::update() only geometry intersecting requested area should be queried to redraw.
but it can be done only inside wingdi gs implementation, i see no way to do it outside.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】value of drawing check yang686526 American standards 0 2009-05-04 11:08 AM
【转帖】notes on drawings not being read yang686526 American standards 0 2009-04-29 09:00 PM
【转帖】decimal dimensioningfractional equivalents yang686526 American standards 0 2009-04-29 07:28 PM
【转帖】can a 32 bit solidworks add-in work with 64 bi yang686526 SolidWorks二次开发 0 2009-04-13 09:28 AM


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


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