
Mon, 03/29/2010 - 18:57
Forums:
Hi all,
I would like to use another form of hilighting my selected objects. Since my Objects have quite a lot of edges, i would like to stop drawing contour lines of all edges.
The reason for this is the way my objects are displayerd when zoomed away: the Objects base colors are almost invisible since the selection lines are all rendered, no matter on what zoom level.
Can this behaviour be changed?
Could i just modify the base color of the selection instead?
Would the latter be possible without modification of OCCT's sources?
My only other idea of a workaround is to disable Selection altogether, do my own picking and manging selection states of my objects with application code. This will be cumbersome.
Mon, 07/19/2010 - 18:55
I solved this one (kinda):
with a valid Handle(Ais_Shape):
myAis_Shape->SetHilightMode(3);
Leads to Highlighting (and selection marking) of the entire Shape with a single color.
While this looks not to well for transparent areas, it at least reduces the lag when a lot of objects are highligthed.
As it is not directly mentioned in the Documentation, i post a list of hilighting modes available:
Mon, 08/02/2010 - 23:16
Hi, Tilman:
Very helpful, but how to change the highlight color?
By the way, as the documentation you mentioned, is it "Reference Documentation" you got after installation of OCC? I had hard time to browse/search through it.
Thanks,
James
Tue, 08/03/2010 - 17:57
Hi James,
On changing the hilight color:
you can use AIS_InteractiveContext::SetHilightColor(Quantity_NOC_YELLOW)
and
AIS_InteractiveContext::SetSelectionColor(Quantity_NOC_RED)
Be prepared however that you will find some issues of colors not correctly set back to what tehy where if you keep automatic hilighting enabled.
You may find this helpfull in that case:
http://www.opencascade.org/org/forum/thread_17791/
The reference documentation is a seperate download from the occ download center, located here
http://www.opencascade.org/getocc/download/loadocc/
Tue, 08/03/2010 - 19:29
Thanks a lot for your kind help, Tilman.