I'd like to draw the bounding box of a selected entity. I can have it done by drawing line by line, however, I see it offer the BoundingBox but I cannot get it to work. I am not sure how it can add the box
to theModel
so it can be drawn.
theModel.SelectionChanged += (s, e) =>
{
foreach(var selecteditem in e.AddedItems)
if(selecteditem.Item is Entity entity)
selectedEntities.Add(entity);
foreach (var selecteditem in e.RemovedItems)
if (selecteditem.Item is Entity entity)
selectedEntities.Remove(entity);
foreach(var ent in selectedEntities)
{
if(ent is Brep brep)
{
brep = (Brep)ent;
var box = new BoundingBox(font, 6666, true, false, brep.BoxMin, brep.BoxMax);
}
}
theModel.Invalidate();
};