//-------------------------------------------------------------------------------------------------- #endregion #region Visualization void _UpdateAisShape() { try { if (_AisShape != null) { // Remove AIS Shape WorkspaceController.Workspace.AisContext.Remove(_AisShape, false); WorkspaceController.Workspace.AisContext.Erase(_AisShape, false); _AisShape = null; } var ocShape = SelectedNode?.BrepShape; var trsf = SelectedShape?.GetTransformation(); if (ocShape != null && trsf != null) { // Init AIS Shape _AisShape = new AIS_Shape(ocShape); _AisShape.SetLocalTransformation(trsf.Value); _AisShape.SetZLayer(-2); // Graphic3d_ZLayerId_Top _AisShape.SetColor(Quantity_NameOfColor.Quantity_NOC_BLUE1.ToColor()); _AisShape.Attributes().LineAspect().SetColor(Quantity_NameOfColor.Quantity_NOC_BLUE1.ToColor()); _AisShape.SetWidth(3); _AisShape.Attributes().PointAspect().SetScale(3); WorkspaceController.Workspace.AisContext.Display(_AisShape, false); WorkspaceController.Workspace.AisContext.Deactivate(_AisShape); } } catch (Exception e) { Console.WriteLine(e); } WorkspaceController.Invalidate(); }