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

odgsbasevectorizeview:olylineout coordinates
odgsbasevectorizeview:olylineout coordinates
hi,
in what coordinates are coded the input points in the odgsbasevectorizeviewlylineout() function (actually overridable in a odgsbasevectorizeview class)? why they are dependent by the current view settings? is there a way to force it to input world coordinates only?
currently i crack this by calling
m_pmodeltoeyeproc->setworldtoeyetransform(odgematrix3d::kidentity) ;
in each myview::draw(const odgidrawable* pdrawable) call.
thanks in advance for any help.
regards
chudomir
hi chudomir,
you can control output coordinates via odgibasevectoriser::seteyetooutputtransform(). however in your case you just need to get identity world-to-eye-transform. it is set to identity in odgsbasevectorizeview's constructor and is controlled by odgsbasevectorizeview's::setview();
setview(odgepoint3d::korigin - odgevector3d::kzaxis, odgepoint3d::korigin, odgevector3d::kyaxis, fieldwidth, fieldheight, odgsview::kparallel) will set it to identity. fieldwidth, fieldheight affect projection that is not used in common case (on odgsbasevectorizeview level), odgsbasevectorizeview::getnumpixelsinunitsquare() that is used for deviation calculation.
m_pmodeltoeyeproc->setworldtoeyetransform(odgematrix3d::kidentity) ; is probably the shortest way and i don't see any problem you to use it.
last edited by dmitry a. novikov; 18th may 2004 at 06:27 amfff">.
>>currently i crack this by calling
>>m_pmodeltoeyeproc->setworldtoeyetransform(odgematrix3d::kidentity) ;
hi cudomir,
seems this is the better way:
// add eye-to-world transform to get geometry in wcs
seteyetooutputtransform(getworldtoeyetransform().i nverse());
// restore world-to-eye transform
seteyetooutputtransform(odgematrix3d::kidentity);
thank you for your reply,
but where should i call it and restore it?
i call m_pmodeltoeyeproc->setworldtoeyetransform(odgematrix3d::kidentity) ; in the draw() member function, and all seems to work?
regards
chudomir
it probably depends... i do the next to build solid cache on each view:
code:
void exgsopenglvectviewworldcache::update()
{
// temporary caching implementation:
odgematrix3d xw2e = getworldtoeyetransform();
::glmatrixmode( gl_modelview );
::glloadmatrixd((const gldouble*)&xw2e.transpose());
if(!m_list)
{
m_list = ::glgenlists(1);
invalidate();
}
if(!m_blistvalid)
{
::glnewlist(m_list, gl_compile_and_execute);
seteyetooutputtransform(xw2e.inverse());

exgsopenglvectorizeview::update();

// restore world-to-eye transform
seteyetooutputtransform(odgematrix3d::kidentity);

::glendlist();

// set to valid only if fully regenerated
m_blistvalid = !regenabort();
}
else
{
::glcalllist(m_list);
}
::glmatrixmode( gl_modelview );
::glloadidentity();
}
i see. well, in our system we use openinventor - it have a camera object and we have to fill the geometry in world coordinates. the camera takes care for the output.
thanks for your help anyway
regards
chudomir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】ocs coordinates yang686526 DirectDWG 0 2009-05-06 06:49 PM
【转帖】dwg to svg export world coordinates yang686526 DirectDWG 0 2009-05-05 08:09 AM
【转帖】dwg file coordinates to world yang686526 DirectDWG 0 2009-05-05 08:02 AM
【转帖】ransform face coordinates to assembly9global0 coordinates yang686526 SolidWorks二次开发 0 2009-04-12 10:40 PM


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


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