Select3D_SensitiveWire don't work?

eue

Active CAD practitioner
So for my custom AIS_Shape, my overridden Compute is just a simple TopoDS_Wire.
In my overridden ComputeSelection I try to add sensitive entity for the wire so that it will be selectable.
this is what I did:
Code:
void MyAisLine::ComputeSelection(const Handle(SelectMgr_Selection)& theSel, const Standard_Integer theMode)
{

    if (!myshape.IsNull())
    {
        Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this);
        Handle(Select3D_SensitiveWire) i = new Select3D_SensitiveWire(anOwner);
        theSel->Add(i);
    }

}

1659428676269.png
 

natalia

Moderator
Staff member
Hello @eue

You need to fulfill this sensitive with geometry that defines the area. Now in your code, it's empty.
As an example, find the next key: 'new Select3D_SensitiveWire' in OCCT sources. The result will be the 'StdSelect_BRepSelectionTool::ComputeSensitive'.
 
  • Like
Reactions: eue
Top