Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Anton Gladky
Is it difficult to make normal highlight (like BOXes do), and chameleon
make like an option?

What files should I inspect for that?

Thank you



2009/8/13 Václav Šmilauer eudo...@arcig.cz


  It works very interesting, Facets change their color all the time :)

 Well, the point of highlighting is to make a body visible among bunch of
 other bodies.



 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Václav Šmilauer

 Is it difficult to make normal highlight (like BOXes do), and
 chameleon make like an option?

There is no special box highlight... The only highlight it the
chameleon one, the rest is picking brighter color for that body in
question.




___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Václav Šmilauer
ok, I get your point. That is caused by the way openGL rendering code is
written; somehow boxes have glossy surface and facets don't. I am in no
way familiar with opengl, it is mostly code Olivier has written in the
prehistoric (= pre-python) period. If you know something about opengl,
go for it, if you don't or don't have time, you can file bug about that.

Once I was trying to make specular light used, but then I gave up. The
chameleon highlight is made by changing periodically the ambient light,
the color of bodies doesn't have to be changed that way.

V.

 
 from yade import utils
 o=Omega()
 kw_facets={'frictionAngle':0.3,'young':37e9,'wire':False,'dynamic':False,'highlight':False}
 q1 = Quaternion(Vector3(0,0,1),0)
 o1,o_angl = q1.ToAxisAngle()
 id=o.bodies.append(utils.facetBox((0,0,0),(1,1,1),(o1[2],o1[0],o1[1],o_angl),exampleNumber=10,color=(1,1,0.1),**kw_facets))
 o.bodies.append(utils.box(center=[0,2,0],orientation=[o1[2], o1[0],
 o1[1], o_angl],extents=[1,1,1],color=[1,1,0.1]))
 from yade import qt
 qt.View()


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Václav Šmilauer
In another words: box's color depends on its relative orientation to the
light source, with facets, the color is always the same regardless of
orientation WRT the light source. It makes facet's surfaces much less 3d
actually.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Anton Gladky
Ok, thanks for information. It is interesting, and I will try to find out
how it was made.

Actually, what is the difference between  Blueprints and Bugs?
Blueprints are proposals? So, maybe it is a blueprint?



2009/8/26 Václav Šmilauer eudo...@arcig.cz

 In another words: box's color depends on its relative orientation to the
 light source, with facets, the color is always the same regardless of
 orientation WRT the light source. It makes facet's surfaces much less 3d
 actually.



 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Anton Gladky
https://blueprints.launchpad.net/yade/+spec/facets-shadow


2009/8/26 Václav Šmilauer eudo...@arcig.cz

  Actually, what is the difference between  Blueprints and Bugs?
  Blueprints are proposals? So, maybe it is a blueprint?
 Oh yes, that's right. (I would use bugs for small things, but this is
 definitely a bigger one.)



 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-26 Thread Václav Šmilauer
 Actually, what is the difference between  Blueprints and Bugs?
 Blueprints are proposals? So, maybe it is a blueprint?
Oh yes, that's right. (I would use bugs for small things, but this is
definitely a bigger one.)



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-13 Thread Anton Gladky
It works very interesting, Facets change their color all the time :)

Like chameleon
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/12 Václav Šmilauer eudo...@arcig.cz


  I have tried this, but it does not highlight facets.
 
  Please, check the attached script.

 Eh, you are passing highlight to utils.facet... that is something
 different from what I said. I added that parameter in r1939 though so it
 works now as you expect.

 The trick is that the **kw params are passed to
 Body::physicalParameters, whereas highlight is property of
 Body::geometricalModel, therefor has to be passed separately.

 Anyways, I would like to remove the obnoxious difference of
 GeometricalModel and InteractingGeometry at some point... But that would
 need larger discussion.

 V.


 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-13 Thread Václav Šmilauer

 It works very interesting, Facets change their color all the time :)

Well, the point of highlighting is to make a body visible among bunch of
other bodies.



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-12 Thread Anton Gladky
I have tried this, but it does not highlight facets.

Please, check the attached script.
__
[ENG] Best Regards
[GER] Mit freundlichen Grüßen
[RUS] С наилучшими пожеланиями
[UKR] З найкращими побажаннями

Anton Gladkyy


2009/8/11 Václav Šmilauer eudo...@arcig.cz


  Is it possible to highlight facets like boxes do?

 Yes, but the facet must not be drawn as wire. If #3 is facet, do
 something like this:

 bs=O.bodies[3].shape
 shape['wire']=False
 shape['highlight']=True

 (translated straightforwardly to c++)

 Note that if you define onBodySelected function in python, it is called
 as callback when you select a body with shift+right mouse button:
 scripts/simple-scene.py shows that. In that functions, you can do other
 things; I used it to dump all interaction properties of that body to the
 console etc, for debugging.

 HTH, Vaclav

  __
  [ENG] Best Regards
  [GER] Mit freundlichen Grüßen
  [RUS] С наилучшими пожеланиями
  [UKR] З найкращими побажаннями
 
  Anton Gladkyy
  ___
  Mailing list: 
  https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
  Post to : yade-dev@lists.launchpad.net
  Unsubscribe : 
  https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
  More help   : https://help.launchpad.net/ListHelp


 ___
 Mailing list: 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : 
 https://launchpad.net/~yade-devhttps://launchpad.net/%7Eyade-dev
 More help   : https://help.launchpad.net/ListHelp



fp.tgz
Description: GNU Zip compressed data
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-12 Thread Václav Šmilauer

 I have tried this, but it does not highlight facets.
 
 Please, check the attached script.

Eh, you are passing highlight to utils.facet... that is something
different from what I said. I added that parameter in r1939 though so it
works now as you expect.

The trick is that the **kw params are passed to
Body::physicalParameters, whereas highlight is property of
Body::geometricalModel, therefor has to be passed separately.

Anyways, I would like to remove the obnoxious difference of
GeometricalModel and InteractingGeometry at some point... But that would
need larger discussion.

V.


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Facet Highlight

2009-08-11 Thread Václav Šmilauer

 Is it possible to highlight facets like boxes do?

Yes, but the facet must not be drawn as wire. If #3 is facet, do
something like this:

bs=O.bodies[3].shape
shape['wire']=False
shape['highlight']=True

(translated straightforwardly to c++)

Note that if you define onBodySelected function in python, it is called
as callback when you select a body with shift+right mouse button:
scripts/simple-scene.py shows that. In that functions, you can do other
things; I used it to dump all interaction properties of that body to the
console etc, for debugging.

HTH, Vaclav

 __
 [ENG] Best Regards
 [GER] Mit freundlichen Grüßen
 [RUS] С наилучшими пожеланиями
 [UKR] З найкращими побажаннями
 
 Anton Gladkyy
 ___
 Mailing list: https://launchpad.net/~yade-dev
 Post to : yade-dev@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~yade-dev
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp