V3D_Trihedron line width

Hello everyone,

I create a trihedron with code below but could not set line width of axes. Anybody knows how to set line width of axes?

v3d_view_->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_BLACK, margin_rate_);

Normally AIS_Trihedron has a attribute which is DatumAspect() and we can set width for each axis line. But V3d_Trihedrion doesn't have. Is there any other solution to set line width?

gnomon_ = new AIS_Trihedron(placement);
gnomon_->Attributes()->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetWidth(width);

Thanks.

gkv311 n's picture

Why don't you use AIS_Trihedron? As for V3d_Trihedron, the code might look like this:

v3d_view_->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_BLACK, margin_rate_);
Handle(V3d_Trihedron) aTrih = v3d_view_->Trihedron();
aTrih->ArrowAspect(V3d_X)->Aspect()->SetLineWidth(2.0f);
aTrih->ArrowAspect(V3d_Y)->Aspect()->SetLineWidth(1.0f);
aTrih->ArrowAspect(V3d_Z)->Aspect()->SetLineWidth(3.0f);
Batuhan Cengiz's picture

I don't know, have you already tried that but it doesn't work when I set the line widths like that.

Maybe question might be, how to set position as fixed on the view like v3d_trihedron. Because we create AIS_Trihedron with Handle_Geom_Axis2Placement which means I define that on the view with X,Y,Z but I want to fix position on left bottom corner.

Did you get what is the problem, or should I define one more time? :)

Batuhan Cengiz's picture

I did that using AIS_Trihedron and problem solved. I set transform persistence like in v3d_trihedron. So thanks :)

gkv311 n's picture

I don't know, have you already tried that but it doesn't work when I set the line widths like that.

Yes, I've checked the code snippet in Draw Harness environment. But anyway, AIS_Trihedron should be more flexible in many aspects, while V3d_Trihedron is here mostly for historical reasons.

Batuhan Cengiz's picture

https://dev.opencascade.org/content/aistrihedron-different-behavior-two-...

I started a new topic in case you don't look at the comments, but width thickening doesn't work in my project. Do you have any idea?