示例#1
0
        /// <summary>
        /// Shows a thin, wire box around the piece.
        /// </summary>
        public void ShowWireFrame()
        {
            this.wireFrame.Color     = Colors.Yellow;
            this.wireFrame.Thickness = .5;

            WireBase         wirebase = wireFrame as WireBase;
            GeometryModel3D  model    = wirebase.Content as GeometryModel3D;
            MaterialGroup    matgrp   = model.Material as MaterialGroup;
            EmissiveMaterial mat      = matgrp.Children[1] as EmissiveMaterial;
            SolidColorBrush  brush    = mat.Brush as SolidColorBrush;

            brush.Opacity = .7;
        }
示例#2
0
        private static void SetColor(WireBase wireBase, IEntity3D entity2D)
        {
            switch (entity2D.PlotStyle)
            {
            default:
            case EnumPlotStyle.Element:
            {
                wireBase.Color     = Colors.Green;
                wireBase.Thickness = 1.5;
            } break;

            case EnumPlotStyle.RapidMove:
            {
                wireBase.Color     = Colors.Coral;
                wireBase.Thickness = 1.2;
            } break;

            case EnumPlotStyle.SelectedElement:
            {
                wireBase.Color     = Colors.Red;
                wireBase.Thickness = 1.8;
            } break;

            case EnumPlotStyle.Path:
            {
                wireBase.Color     = Colors.PowderBlue;
                wireBase.Thickness = .7;
            } break;

            case EnumPlotStyle.Arc:
            {
                wireBase.Color     = Colors.CornflowerBlue;
                wireBase.Thickness = .7;
            } break;

            case EnumPlotStyle.SelectedPath:
            {
                wireBase.Color     = Colors.CornflowerBlue;
                wireBase.Thickness = .7;
            } break;

            case EnumPlotStyle.TrimPath:
            {
                wireBase.Color     = Colors.GreenYellow;
                wireBase.Thickness = 1.2;
            } break;
            }
        }
示例#3
0
        private void AddWireElement(WireBase wireBase)
        {
            wireBase.Recalculate();

            view.Add(wireBase);
        }