
Tue, 01/17/2023 - 03:33
Hello,
I displaying an arrow in a Graphic3d_ArrayOfTriangles.
Handle(Graphic3d_Structure) arrow3DStructure = new Graphic3d_Structure(myViewer()->StructureManager());
Handle(Graphic3d_Group) group = arrow3DStructure->NewGroup();
group->SetGroupPrimitivesAspect(arrowAspects());
group->AddPrimitiveArray(arrowPrimitive);
arrow3DStructure->Display();
activeArrowGroup() = group; //NCollection_Haft<Handle(Graphic3d_Group)>
Then I've also got this which is called when I want to clear that arrow:
void Viewer::ClearTemporaryGraphics()
{
if (!activeArrowGroup().IsNull())
{
activeArrowGroup()->Remove();
}
}
This does not clear it. It persists forever. I have also tried adding a NCollection_Haft<Handle(Graphic3d_Structure)> for the structure and assigning it and calling Remove and Erase on it.