Shading does not follow the wireframe exactly

In the 3d graphic view using AIS, the shaded model does not follow the wireframe exactly in some cases (specially after the fillet operation). How do I improve the resolution of the shading model for it to follow the wireframe?

Chanaka Mallikarachchi's picture

file attached.

JuryS's picture

Hi ! In my program I'm hide same objects in Shading and show in Wireframe . For the sample you may use filter for your objects

prs->Remove(Standard_True); //for hide

prs->Display(Standard_True); //for showing

Chanaka Mallikarachchi's picture

But how do I get the shading model to follow the wireframe shape? The wire frame shape is the accurate shape and the shading does a poor job in shading the surface in this case.

Arjan Schouten's picture


Maybe you could try with AIS_InteractiveContext::SetDeviationCoefficient or other functions that infulence the resulting triangulation.


Chanaka Mallikarachchi's picture

Thanks Arjan. I tried that but it does not improve the resolution. Well, when I loosen the value (to 1.0) it make the shading deviate more from the wire frame but tightening (I tried down to 1.0e-6) does not improve :-(