几何尺寸与公差论坛------致力于产品几何量公差标准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 向着好的方向发展
默认 【转帖】odgiconveyorgeometry question

odgiconveyorgeometry question

odgiconveyorgeometry question
hi all,
making my own drawing function i subclassed odgiconveyorgeometry.
now subclassing drawing functions (plineproc, circleproc, circulararcproc, ecc) i have a great problem:
how can i get layer information about item i'm drawing?
i need only layer name and color, but i don't know where getting them
thank you in advance
greetings
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar
# 25th may 2006, 09:23 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

when traits are modified, your vectorization device gets notification ontraitsmodified() about this. see exsimpleview:ntraitsmodified() as sample.
sincerely yours,
george udov

george udov
# 25th may 2006, 09:28 am

registered user join date: feb 2006
location: pisa
posts: 69

quote:
originally posted by george udov
when traits are modified, your vectorization device gets notification ontraitsmodified() about this. see exsimpleview:ntraitsmodified() as sample.
ok, but how can i get the informations in conveyor?
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar
# 25th may 2006, 09:33 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

e.g. this way:
put your final conveyor node smartpointer to your view override.
override ontraitsmodified in your view override.
in ontraitsmodified, propagate traits to your final conveyor node.
sincerely yours,
george udov

george udov
# 26th may 2006, 12:35 am

registered user join date: feb 2006
location: pisa
posts: 69

quote:
originally posted by george udov
e.g. this way:
put your final conveyor node smartpointer to your view override.
how can i put it there? the successive steps you subjest me are right, but this point is quite difficult...
thank you for the great help you are giving to me....
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar
# 26th may 2006, 02:28 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

same way with odvectorizeex.
exgssimpledevice contains m_pdestgeometry member. this is an implementor of odgiconveyorgeometry interface. output is directed to this conveyor node in exgssimpledevice::createview (line pmyview->output().setdestgeometry(*m_pdestgeometry).
you can put your geometry receiver as such smartptr. then you can make accessor for this smartptr in your device (endgeometry(), e.g., method).
then in your view ontraitsmodified override you can access your geometry receiver by
device()->endgeometry()
then you can design traits methods in your geometry receiver as it is more comfortable for you. e.g. you can introduce methods draw_color, draw_layer, etc. in this case you'll need to call in your view:ntraitsmodified
device()->endgeometry()->draw_layer(...)
device()->endgeometry()->draw_color(...)
sincerely yours,
george udov

george udov
# 26th may 2006, 02:43 am

registered user join date: feb 2006
location: pisa
posts: 69

quote:
originally posted by george udov
then in your view ontraitsmodified override you can access your geometry receiver by
device()->endgeometry()
then you can design traits methods in your geometry receiver as it is more comfortable for you. e.g. you can introduce methods draw_color, draw_layer, etc. in this case you'll need to call in your view:ntraitsmodified
device()->endgeometry()->draw_layer(...)
device()->endgeometry()->draw_color(...)
there is a problem.....
endgeometry()
seems to not exist!
i searched in odvectorizeex example, but i cannot find it
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar
# 26th may 2006, 02:47 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

i mind - this is a method you should introduce
sincerely yours,
george udov

george udov
# 26th may 2006, 02:54 am

registered user join date: feb 2006
location: pisa
posts: 69

quote:
originally posted by george udov
i mind - this is a method you should introduce
ok (i'm becoming sad, i don't understand simpliest thing)
correct me if i am wrong:
endgeometry()
should return m_pdestgeometry, right?
i hope to be at the end of this coding......
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar
# 26th may 2006, 03:01 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

yes, you're right.
sincerely yours,
george udov

george udov
# 26th may 2006, 03:27 am

registered user join date: feb 2006
location: pisa
posts: 69

perfect! it works!!!

thank you again a lot
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

myzhar

none
? | ?
thread tools



display modes
linear mode


search this thread

rate this thread
excellent
good
average
bad
terrible

posting rules
you may post new threads
you may post replies
you may post attachments
you may edit your posts
is on
are on
code is off
html code is off
forum jump
user control panel private messages subscriptions who's online search forums forums home general topics news questions and remarks business issues industry commentary general software issues documentation issues future directions dwg libraries dwgdirect.net dwgdirect, c++ version dwgdirectx, activex version adtdirect/c3ddirect opendwg toolkit/viewkit dgn libraries dgndirect, c++ version (2.x+) dgndirect libraries (legacy 0.99xx)
all times are gmt -7. the time now is 11:10 pmfff">.
- - -
copyright ?2000 - 2009, jelsoft enterprises ltd.
copyright 1998-2008 open design alliance inc.

when traits are modified, your vectorization device gets notification ontraitsmodified() about this. see exsimpleview:ntraitsmodified() as sample.
sincerely yours,
george udov

quote:
originally posted by george udov
when traits are modified, your vectorization device gets notification ontraitsmodified() about this. see exsimpleview:ntraitsmodified() as sample.
ok, but how can i get the informations in conveyor?
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

e.g. this way:
put your final conveyor node smartpointer to your view override.
override ontraitsmodified in your view override.
in ontraitsmodified, propagate traits to your final conveyor node.
sincerely yours,
george udov

quote:
originally posted by george udov
e.g. this way:
put your final conveyor node smartpointer to your view override.
how can i put it there? the successive steps you subjest me are right, but this point is quite difficult...
thank you for the great help you are giving to me....
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

same way with odvectorizeex.
exgssimpledevice contains m_pdestgeometry member. this is an implementor of odgiconveyorgeometry interface. output is directed to this conveyor node in exgssimpledevice::createview (line pmyview->output().setdestgeometry(*m_pdestgeometry).
you can put your geometry receiver as such smartptr. then you can make accessor for this smartptr in your device (endgeometry(), e.g., method).
then in your view ontraitsmodified override you can access your geometry receiver by
device()->endgeometry()
then you can design traits methods in your geometry receiver as it is more comfortable for you. e.g. you can introduce methods draw_color, draw_layer, etc. in this case you'll need to call in your view:ntraitsmodified
device()->endgeometry()->draw_layer(...)
device()->endgeometry()->draw_color(...)
sincerely yours,
george udov

quote:
originally posted by george udov
then in your view ontraitsmodified override you can access your geometry receiver by
device()->endgeometry()
then you can design traits methods in your geometry receiver as it is more comfortable for you. e.g. you can introduce methods draw_color, draw_layer, etc. in this case you'll need to call in your view:ntraitsmodified
device()->endgeometry()->draw_layer(...)
device()->endgeometry()->draw_color(...)
there is a problem.....
endgeometry()
seems to not exist!
i searched in odvectorizeex example, but i cannot find it
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

i mind - this is a method you should introduce
sincerely yours,
george udov

quote:
originally posted by george udov
i mind - this is a method you should introduce
ok (i'm becoming sad, i don't understand simpliest thing)
correct me if i am wrong:
endgeometry()
should return m_pdestgeometry, right?
i hope to be at the end of this coding......
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============

yes, you're right.
sincerely yours,
george udov

perfect! it works!!!

thank you again a lot
walter
myzhar
==============
ing. walter lucetti
geomind srl
pisa - italy
==============
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】oddbleader question yang686526 DirectDWG 0 2009-05-06 07:51 PM
【转帖】autodesk, odx and arxdbx question yang686526 DirectDWG 0 2009-05-04 04:32 PM
【转帖】acis question yang686526 DirectDWG 0 2009-05-04 03:38 PM
【转帖】assembly drawing bom change question yang686526 American standards 0 2009-04-29 06:31 PM
【转帖】video card driver question yang686526 SolidWorks二次开发 0 2009-04-13 03:16 PM


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


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