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

odgiconveyorgeometry::rasterimageproc() not being called?
odgiconveyorgeometry::rasterimageproc() not being called?
i compiled odvectorizeex.dsp
the program argument is a drawing containing images from a jpg and bmp.
i debugged throught the code and it does not appear to be calling this function:
void exgssimpledevice::rasterimageproc(const odgepoint3d& origin ...
any idea?
thanks,
codey

such effect may occur because file with raster image was not found.
you can override oddbhostappservices::findfile() and look if it was found.
sincerely yours,
george udov
i did that, overriden findfile() and debugged throught it to see the paths. i tested with fullpath and no path, and made sure the files exist in current directory and the fullpath locations. i tried another application using od2dexportview::rasterimageproc() and it is also not working.
i've attached the dwg, image files, and output txt file. the output txt file should contain "rasterimageproc", but it does not.
i'm using msvc6 and dd 1.3.02
thanks,
codey
attached files (351.3 kb, 18 views)


codey,
do you use lib or dll configuration of dd?
if you use lib, did you declared this (in your static module map section, see example at odamfcapp.cpp):
odrx_declare_static_module_entry_point(exrastermod ule);
odrx_begin_static_module_map()
odrx_define_static_application("rxrasterservices", exrastermodule)
odrx_end_static_module_map()
if you use dll, did you built rxrasterservices.drx?
sincerely yours,
george udov
yep, that works. thanks george.
(1) i added the raster part in odvectorizeex.cpp
// define module map for statically linked modules:
#if !defined(_toolkit_in_dll_) || defined(__mwerks__)
odrx_declare_static_module_entry_point(modelermodu le);
odrx_declare_static_module_entry_point(exrastermod ule);
odrx_begin_static_module_map()
odrx_define_static_application("modelergeometry", modelermodule)
odrx_define_static_application("rxrasterservices", exrastermodule)
odrx_end_static_module_map()
#endif
(2) added dd_vc6md_rxrasterservices.lib in link build settings.
hi,
i was struck in a similar problem and this thread helped me a lot.
one thing i noticed that when i try to run the attached files thru my app, the rasterimageproc() call only comes for the bmp file and not the jpeg file, although both are found in findfile() (same behavior in odvectorizeex). do we need to do something extra for jpeg files and also what other raster file formats are supported? i am using the libs of dd.
thanks

quote:
one thing i noticed that when i try to run the attached files thru my app, the rasterimageproc() call only comes for the bmp file and not the jpeg file, although both are found in findfile() (same behavior in odvectorizeex). do we need to do something extra for jpeg files and also what other raster file formats are supported?
yes, you need to implement your own rxrasterservices module.
exrastermodule (exrasterdll project) is a sample of such module, that support only bmp and jpeg(if compiled appropriately) formats.
sincerely yours,
george udov
so would i be able to work with both bmp and jpeg files if i just build the exraster project with raster_jpeg6b and in my app, link with the generated rxrasterservices.lib?
and if so, does the libs shipped in the release have the jpeg support removed on purpose?

quote:
so would i be able to work with both bmp and jpeg files if i just build the exraster project with raster_jpeg6b and in my app, link with the generated rxrasterservices.lib?
yes. you will also need to link with jpeg-6b library in this case (shipped with dd).
quote:
and if so, does the libs shipped in the release have the jpeg support removed on purpose?
single purpose - to reduce libraries size :-)
sincerely yours,
george udov
thanks.
although i would not have minded the extra size one bit, as i have to do this work now for vc, codewarrior and xcode.
are the projects for codewarrior and xcode for the samples availible for download?

hi george,
we seem to have run into trouble on mac.
we implemented everything in order and its working beautifully on windows. but on mac the rasterimageproc() is not called. the reason being that the image file is not found.
by overriding the findfile() method, we observed that while on windows the search for the file suceeded even when the image file is in the same folder as the file being opened (and not necessarily in the path specified while saving the drawing), on mac it did not even suceed when the file was exactly in the original path specified (say "/volumes/test/jpeg.jpg").
to me it looks like a problem in the implementation of oddbhostappservices::findfile(). could you please help.
we're using codewarrior libs version 1.14.01.
thanks
are you using cw8 or cw9? i tried a simple sample in cw9 giving it the full path of a file, and findfile() seemed to work ok. can you reproduce the problem in a simple sample, by just calling findfile() directly with a hardcoded path?

can reproduce problem on mac with hardcoded path
we're using cw9.
i could get the problem to reproduce with a hardcoded path with:
code:
odstring exhostappservices::findfile(const char* file,
oddbdatabase* pdb, oddbhostappservices::findfilehint hint)
{
char path[] = "/users/user/desktop/ui_1.jpg";
odstring teststr = oddbhostappservices::findfile(path, pdb, hint);
if (teststr.isempty())
{
// throw error alert
}
else
{
// show success alert
}
}
"/users/user/desktop/ui_1.jpg" did exist and could be accessed thru our app.
george shared with me the code for the implementation of findfile() inside oddbhostappservices. and i could get it to work on mac with this hack:
code:
odstring exhostappservices::findfile(const char* file,
oddbdatabase* pdb, oddbhostappservices::findfilehint hint)
{
odstring filepath = oddbhostappservices::findfile(file, pdb, hint);
if (filepath.isempty())
{
odchar platdelim = // get platform delimiter from our application
odchar olddelim = (platdelim == '/' ? '\\' : '/');
filepath = oddbhostappservicesfindfileimpl(file, pdb, hint,
olddelim, platdelim, '/');
}
return filepath;
}
where oddbhostappservicesfindfileimpl() is your implementation of the function, with just the signature modified to accept as additional parameter the referenced values which must have defined somewhere else in your code:
code:
odstring exhostappservices:ddbhostappservicesfindfileimpl(
const char* file,
oddbdatabase* pdb,
oddbhostappservices::findfilehint hint,
odchar oldpathchar,
odchar pathchar,
char separatorchar);
looks to me that the problem might lie in the assigment of odpathchar and/or pathchar.
hope this helps in your investigation. please update me with your findings.
thanks
we were setting the incorrect path characters for our codewarrior builds, as you pointed out. the problem will be corrected in our next maintenance update.

thanks neil.
could you also please verify that it runs properly on xcode. since our app has not yet switched to xcode hence i can't check this on my end, but we'll be doing so a couple of months down the line and i don't want to be bugging you for the same thing with xcode.
btw, when is the next maintainance release of dd planned?
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to determine character set when called yang686526 DirectDWG 0 2009-05-06 02:29 PM
【转帖】exgsopengldevicecreateview is never called why yang686526 DirectDWG 0 2009-05-05 10:05 AM
【转帖】circulararcprocelliparcproc not being called for polylines yang686526 DirectDWG 0 2009-05-04 05:47 PM
【转帖】bigfont.shx font file doesnot to get called with library u yang686526 DirectDWG 0 2009-05-04 04:42 PM


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


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