
Thu, 09/21/2023 - 10:45
Forums:
i use AIS_Shape and AIS_TextLab set cullingsize.when Mousewheel,the ais_shape won't be rendered,but the text will.there is any way make text affect.
Handle(AIS_InteractiveContext)thcontext=...;
Handle(V3d_Viewer) theViwer=...;
Graphic3d_ZLayerSetting aSetting=theViwer->ZLayerSetting(Graphic3d_ZLayerId_Default);
aSetting.SetCullingSize(100);
theViwer->SetZLayerSettings(Graphic3d_ZLayerId_Default,aSetting);
TopoDS_Shape shape=BrepBUilderAPI_MakeEdge(gp_Circ(gp::XOY(),5));
Handle(AIS_TextLabel) text=new AIS_TextLabel();
text->SetPosition(gp_Pnt());
text->settext("1");
thcontext->Display(text,true);
thcontext->Display(new AIS_Shape(shape),true);
Sun, 10/08/2023 - 05:16
hello! anyone can reply?
Sun, 10/08/2023 - 10:46
AIS_Shape
is usually used to display a fixed-height text label, which size doesn't depend on camera view. Size culling is designed to clip objects by their size - hence, these two things go into logical conflict.Distance culling could work, though (within perspective camera). But for the moment culling logic will be enabled only for oriented text labels
AIS_TextLabel::SetOrientation3D()
.Mon, 10/09/2023 - 05:38
Hi gkv311 n ,thanks for your reply! i try your code in my computer,but it still didnt work.my environment is windows and OCCT 7.6.0