/// <summary>
        /// New tool selected from the list.
        /// </summary>
        /// <param name="selected">Selected tool</param>
        public void SelectTool(object selected)
        {
#if TRACE_EVENTS
            log.Debug($"Calculator.Material: SelectTool(bit: {(selected as Bit)})");
#endif

            var b = (selected as Bit);
            if (b == null)
            {
                return;
            }

            // set h?
            tool.D.SetValue(new DoubleST(1.0, "[mm]"));

            // set D.
            var Ds = b.Parameter.ContainsKey("Diameter") ? b.Parameter["Diameter"] : null;
            tool.D.SetValue(DoubleST.Scan(Ds, 1.0, "mm"));

            // set Z.
            var Zs = b.Parameter.ContainsKey("Flutes") ? b.Parameter["Flutes"] : null;
            tool.Z.SetValue(LongST.Scan(Zs, 1L, "tooth"));
        }
 /// <summary>
 /// Tool: information about the tool
 /// </summary>
 public Tool()
 {
     h = new DoubleST(1.0, "[mm]");
     D = new DoubleST(1.0, "[mm]");
     Z = new LongST(1, "[tooth]");
 }