Display 3D curve with the highest priority?

In my project, i want to display an 3D curve with the highest priority. I tried to use this code:

void PK_OCC2DSegment::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode)
aPresentation->SetDisplayPriority(10);// highest priority like transparent objects


But, in my model with some shaded 3D shapes, i couldn't to see my 3D curve if it go through my 3D shapes or my 3D shapes overlaped on it (at current projection).

Paul Jimenez's picture

Exactly the same question I was about to ask. Hopefully someone will be able to answer it this time.

From the name of the class it seems I am trying to achieve exactly the same thing: I want to have lines drawn that are always visible regardless of other shapes in shaded mode being in front of them. Just like the OP, I cannot find a way to do it.

m-aronsson's picture

Settings the priority just define the order to render the shapes, if the other shapes have lower depth values they might hide/overlap the high priority shapes.

Not sure how to do that with OCC, in OpenGL you would just render the objects on top at the end and disable depth testing while rendering them.

Paul Jimenez's picture

Thanks for your explanation.

I was delving a little bit into the code, and it looks like there is not a mechanism to achieve that from the Compute method. Maybe I could play a little bit more with layers, but they are not always re-painted. I could just forget about it also... in the meanwhile.