For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Invisible but selectbale AIS_object

Gerrit Bette's picture
Forums: 

Hi,

Is it possible to create an Interractive object, lets say a box which can be picked and selected, but is not drawn except as outlines when detected/selected?

Gerrit Bette's picture

reading the reference makes me smarter :)

Tha solution is:
m_Shp->SetDisplayMode(AIS_ExactHLR);

li's picture

hi, Tilman and any one else
i come accross the same problem too.
what you said really working. but im not really understand what does AIS_ExactHLR mean.
however , when i tried AIS_Line but it failed.

can you(anyone) explain it with more detail?

thanks very much.

li's picture

sorry,
it seems little funny.

i think it is not "m_Shp->SetDisplayMode(AIS_ExactHLR);" worked in my project but "myAISContext->setdisplaymode(m_shp,3,0)". i havent map any texture.

thanks

Gerrit Bette's picture

Hi,

Strange, indeed. "m_Shp->SetDisplayMode(AIS_ExactHLR);" works as i request.
I have to myAISContext->Redisplay the shape if it was already visible, though.

thank you for your input

Yuriy Sinithin's picture

It's cool options ! You're awesome. But how you know about this ???

And please ! You may help me with HLR options ! How I can hide lines for more that one shape !

Thank you !

li's picture

hi Tilman:

really strange. can you post your code about hidden shapes here? i come across making invisible but selectable object.

it sucks that it doesn't work for me, so im thinking if i got something wrong in my code.

thanks very much.

Gerrit Bette's picture

it looks like this:

m_Shp = new AIS_Shape(myTopoDS_Solid);
m_Shp->SetDisplayMode(AIS_ExactHLR);
myAISContext->Display(m_Shp, false);

I just create myTOpoDS_Solid as a Prism with thickness 0.001, as i just need a Frame around a custom object of mine.

li's picture

hi Tilman:
thanks,
i will try to get it work.
thanks very much!

li's picture

hi Tilman,

really i come across another big problem, about edit topology of shapes such as move a vertex of any shape to another place, have you ever come across such problem or have some suggestion ? i have read some posts about this, such as the "edit topology" and "modify shape" topics, however i'm still not so clear about this.

thanks.

Gerrit Bette's picture

You will probably have to explore the shape you want to modify using the TopExp_Explorer-class, identify the vertices you want to modify and rebuild your shapes from these modified vertices using the builder api.

At least that's the way i would do it.

I do not know if it is possible to modify topology directly, but then i consider myself to be more of an amatuer in using occ than an expert.

li's picture

hello Tilman:

i mean to do this, and i can edit a vertex on edge now, but cann't go further.
thats because the problem posted here :
http://www.opencascade.org/org/forum/thread_18351/

thanks very much for patience and suggestions about this.