Forum archiveIssue archiveVisualization and 3D Viewer

Archived discussion

AIS_Trihedron different behavior for two project

Visualization and 3D ViewerFri, 01/20/2023 - 15:066 replies

Browse this forum
QuestionAuthor

Hello everyone,

I have two project and one of them is written with c#, for this project I use OCCTProxy. Other project is written with c++ and I have a problem with AIS_Trihedron.

For c# project for width of each axis on Trihedron I use these code parts below:

gnomon_->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(width);
gnomon_->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetWidth(width);
gnomon_->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetWidth(width);

And it works, can see the changes but these lines don't work at all on c++ project side? I don't know how to deal with width of trihedron axis lines. Does anybody have any idea for that?

Thanks in advance.

Discussion

6 archived replies

Posts are displayed in their archived order.

01Commenter-1

I guess that the other 'C++ project' creates OpenGL Core Profile, which doesn't support line width other than 1 pixel. Only OpenGL Compatible Profile supports thick lines.

02Author

Is there a way to set the opengl as compatible version to my application for setting width of axes line?

03Commenter-1

I guess so - don't know how your application configures OpenGL context.

04Author

I have tried again in your c++ opengl sample project and it didn't work neither. So maybe if possible, you would try that on your computer.

Sample project name: occt-qopenglwidget-samle

05Commenter-1

That's because of OpenGL Core Profile. You may tune it by changing variable myIsCoreProfile.

06Author

omg, how is that possible to know everything man?!?!? That works! So many thanks!!!