Esempio n. 1
0
        public static toolPos[] getToolCordinates()
        {
            if (!init_done)        //|| !Properties.Settings.Default.importGCTool
            {
                return(null);
            }
            toolPos[] newpos = new toolPos[toolTableArray.Length];
            int       index  = 0;

            foreach (toolProp tool in toolTableArray)
            {
                if (tool.toolnr >= 0)
                {
                    newpos[index].toolnr = tool.toolnr;
                    newpos[index].name   = tool.name;
                    newpos[index].X      = tool.X + (float)Properties.Settings.Default.toolTableOffsetX;
                    newpos[index].Y      = tool.Y + (float)Properties.Settings.Default.toolTableOffsetY;
                    newpos[index].Z      = tool.Z + (float)Properties.Settings.Default.toolTableOffsetZ;
                    newpos[index].A      = tool.A + (float)Properties.Settings.Default.toolTableOffsetA;
                    index++;
                }
            }
            Array.Resize(ref newpos, index);
            return(newpos);
        }
Esempio n. 2
0
        public static toolPos[] getToolCordinates()
        {
            if (!Properties.Settings.Default.importGCTool || !init_done)
            {
                return(null);
            }
            toolPos[] newpos = new toolPos[svgToolTable.Length];
            int       index  = 0;

            foreach (toolProp tool in svgToolTable)
            {
                if (tool.toolnr >= 0)
                {
                    newpos[index].toolnr = tool.toolnr;
                    newpos[index].name   = tool.name;
                    newpos[index].X      = tool.X + (float)Properties.Settings.Default.toolOffX;
                    newpos[index].Y      = tool.Y + (float)Properties.Settings.Default.toolOffY;
                    index++;
                }
            }
            Array.Resize(ref newpos, index);
            return(newpos);
        }