Ejemplo n.º 1
0
        public NcMachine(ControllerType controllerType, MachineGeometry machineGeometry)
        {
            ControllerType  = controllerType;
            MachineGeometry = machineGeometry;

            HomePosition         = new MachinePosition();
            ProgStartPosition    = new MachinePosition();
            MachineCode          = new CNCMachineCode();
            commandDictionary    = new CommandDictionary();
            FeedrateUnits        = FeedrateUnits.InPerMin;
            InverseFeedrateUnits = FeedrateUnits.InverseMins;
        }
Ejemplo n.º 2
0
        public override string AsNcString(INcMachine ncMachine)
        {
            try
            {
                string line = ncMachine.MachineCode.LineNumberPrefix + LineNumber.ToString() + " ";

                if (Feedrate.Inverted)
                {
                    line += ncMachine.MachineCode.InverseFeed + " ";
                }
                line += ncMachine.MoveGCode(this.moveType, this.blockType) + " ";
                line += MachinePosition.AsNcString(ncMachine, prevPosition, blockType, moveType) + " " + Feedrate.AsNcString(ncMachine);
                return(line);
            }
            catch (Exception)
            {
                throw;
            }
        }