//-------------------------------------------------------------------------------------------------- #endregion #region Updating public void UpdateShape() { if (_AisShape == null) { _EnsureAisObject(); _UpdateInteractivityStatus(); } else { var ocShape = OverrideBrep ?? _ShapeSource.GetTransformedBRep(); if (ocShape != null) { if (_AisShape.Shape().ShapeType() != ocShape.ShapeType()) { // If shape type changes, recompute can lead to crashes. It's better to redisplay AIS_Shape Remove(); UpdateShape(); } else { _AisShape.Set(ocShape); _UpdatePresentation(); AisContext.RecomputeSelectionOnly(_AisShape); _UpdateSelectionSensitivity(); } } else { _UpdateMarker(); } } }