Exemple #1
0
        public bool AddToolOffset(GCToolOffset token)
        {
            var tool = toolTable.Where(t => t.Code == token.H.ToString()).FirstOrDefault();

            if (tool != null)
            {
                foreach (int i in AxisFlags.All.ToIndices())
                {
                    toolOffsets[i] += tool.Values[i];
                }
            }

            return(tool != null);
        }
Exemple #2
0
        public bool SetToolOffset(GCToolOffset token)
        {
            var tool = SelectedTool;

            if (token.H != 0)
            {
                tool = toolTable.Where(t => t.Code == token.H.ToString()).FirstOrDefault();
            }
            if (tool != null && tool.Code != 0.ToString())
            {
                foreach (int i in AxisFlags.All.ToIndices())
                {
                    toolOffsets[i] = tool.Values[i];
                }
            }

            return(tool != null);
        }