0

我想绘制选定实体的边界框。我可以通过逐行绘制来完成它,但是,我看到它提供了 BoundingBox 但我无法让它工作。我不确定它如何添加boxtheModel以便可以绘制。

 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();
            
             };
4

1 回答 1

1

BoundingBox 类仅针对模型的边界框设置而设计。

于 2020-11-13T07:59:24.140 回答