查看单个帖子
旧 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自动化论坛(仅游客可见)