예제 #1
0
        void AppendFooter_StandardRepRap()
        {
            UpdateProgress(100);

            Builder.AddCommentLine("End of print");
            ShowMessage("Done!");

            DisableFan();
            SetExtruderTargetTemp(0, "extruder off");
            SetBedTargetTemp(0, "bed off");

            BeginRetractRelativeDist(currentPos, 300, -1, "final retract");

            Vector3d zup = currentPos;

            zup.z = Math.Min(Settings.Machine.MaxHeightMM, zup.z + 50);
            AppendMoveToE(zup, 9000, ExtruderA - 5.0, "move up and retract");

            Builder.BeginGLine(28, "home x/y").AppendI("X", 0).AppendI("Y", 0);
            currentPos.x = currentPos.y = 0;

            Builder.BeginMLine(84, "turn off steppers");

            Builder.EndLine();                          // need to force this
        }
예제 #2
0
        private void AppendFooter_StandardRepRap()
        {
            UpdateProgress(100);

            Builder.AddCommentLine("End of print");
            ShowMessage("Done!");

            Builder.BeginMLine(30, "end program");

            Builder.EndLine();      // need to force this
        }
예제 #3
0
        private void AppendFooter_Replicator2()
        {
            double MaxHeight = 155;

            Builder.AddCommentLine("End of print");

            // final retract
            if (InRetract == false)
            {
                BeginRetract(NozzlePosition, Settings.RetractSpeed,
                             ExtruderA - Settings.RetractDistanceMM, "Final Retract");
            }

            //G1 X-9.119 Y10.721 Z0.200 F1500 A61.36007; Retract

            Builder.BeginMLine(127, "(Fan Off)").AppendI("T", 0);
            Builder.BeginMLine(18, "(Turn off A and B Steppers)").AppendL("A").AppendL("B");

            // move bed to max height
            Builder.BeginGLine(1).AppendF("Z", MaxHeight).AppendI("F", 900);

            // home steppers and turn off
            Builder.BeginGLine(162).AppendL("X").AppendL("Y").AppendI("F", 2000);
            Builder.BeginMLine(18, "(Turn off steppers)").AppendL("X").AppendL("Y").AppendL("Z");

            // set temp to 0
            Builder.BeginMLine(104, "set target tool temperature").AppendI("S", 0).AppendI("T", 0);

            if (Settings.Machine.HasHeatedBed)
            {
                Builder.BeginMLine(140, "set heated bed temperature")
                .AppendI("S", 0).AppendI("T", 0);
            }

            // set built-in status message
            Builder.BeginMLine(70, "// Cotangent //").AppendI("P", 5);

            // skip song
            //Builder.BeginMLine(72).AppendI("P",1);

            UpdateProgress(100);

            Builder.BeginMLine(137, "(build end notification)");

            Builder.EndLine();      // need to force this
        }
예제 #4
0
 public override void ShowMessage(string s)
 {
     Builder.AddCommentLine(s);
 }
예제 #5
0
        void AppendHeader_Replicator2()
        {
            base.AddStandardHeader(Settings);
            Builder.AddCommentLine("; Model: Makerbot " + Settings.ModelEnum.ToString());

            Vector2d BackRight = new Vector2d(152, 75);
            Vector2d FrontLeft = new Vector2d(-141, -74);

            Vector2d PrimeFrontRight = new Vector2d(105.4, -74);
            double   PrimeHeight     = 0.270;



            Builder.BeginMLine(136, "(enable build)");

            // reset build percentage
            UpdateProgress(0);

            Builder.BeginGLine(162, "(home XY axes maximum)")
            .AppendL("X").AppendL("Y").AppendI("F", 2000);

            Builder.BeginGLine(161, "(home Z axis minimum)")
            .AppendL("Z").AppendI("F", 900);

            Builder.BeginGLine(92, "(set Z to -5)").
            AppendI("X", 0).AppendI("Y", 0).AppendI("Z", -5).AppendI("A", 0).AppendI("B", 0);
            currentPos = new Vector3d(0, 0, -5);
            extruderA  = 0;

            Builder.BeginGLine(1, "(move Z to '0')")
            .AppendI("Z", 0).AppendI("F", 900);
            currentPos.z = 0;

            Builder.BeginGLine(161, "(home Z axis minimum)")
            .AppendL("Z").AppendI("F", 100);

            Builder.BeginMLine(132, "(Recall stored home offsets for XYZAB axis)").
            AppendL("X").AppendL("Y").AppendL("Z").AppendL("A").AppendL("B");

            Builder.BeginGLine(92).
            AppendF("X", BackRight.x).AppendF("Y", BackRight.y).AppendI("Z", 0).AppendI("A", 0).AppendI("B", 0);
            currentPos = new Vector3d(BackRight.x, BackRight.y, 0);
            extruderA  = 0;

            Builder.BeginGLine(1, "(move to waiting position)").
            AppendF("X", FrontLeft.x).AppendF("Y", FrontLeft.y).AppendI("Z", 40).AppendI("F", 3300);
            currentPos = new Vector3d(FrontLeft.x, FrontLeft.y, 40);

            Builder.BeginGLine(130, "(Lower stepper Vrefs while heating)").
            AppendI("X", 20).AppendI("Y", 20).AppendI("A", 20).AppendI("B", 20);

            // set tool
            Builder.BeginMLine(135).AppendI("T", 0);

            // set target temperature
            Builder.BeginMLine(104).AppendI("S", Settings.ExtruderTempC).AppendI("T", 0);

            // wait to heat
            Builder.BeginMLine(133).AppendI("T", 0);

            Builder.BeginGLine(130, "(Set Stepper motor Vref to defaults)").
            AppendI("X", 127).AppendI("Y", 127).AppendI("A", 127).AppendI("B", 127);


            // thick line along front of bed, at start of print
            BeginTravel();
            AppendMoveTo(PrimeFrontRight.x, PrimeFrontRight.y, PrimeHeight, 9000, "(Extruder Prime Dry Move)");
            EndTravel();
            AppendMoveToE(FrontLeft.x, FrontLeft.y, PrimeHeight, 1800, 25, "(Extruder Prime Start)");

            Builder.BeginGLine(92, "(Reset after prime)").AppendI("A", 0).AppendI("B", 0);
            extruderA = 0;

            // move to z=0
            Builder.BeginGLine(1).AppendI("Z", 0).AppendI("F", 1000);
            currentPos.z = 0;

            // move to front-left corner
            AppendMoveToE(FrontLeft.x, FrontLeft.y, 0, 1000, 0);

            // reset E/A stepper
            Builder.BeginGLine(92).AppendI("E", 0);
            extruderA = 0;

            // should do this at higher level...
            //AppendMoveToA(FrontLeft.x, FrontLeft.y, 0, 1500, -1.3, "Retract");
            //AppendMoveTo(FrontLeft.x, FrontLeft.y, 0, 3000);		// what is this line for??
            //AppendMoveTo(FrontLeft.x, FrontLeft.y, LayerHeight, 1380, "Next Layer");

            in_retract = false;
            in_travel  = false;

            UpdateProgress(0);
        }
예제 #6
0
        void AppendHeader_StandardRepRap()
        {
            base.AddStandardHeader(Settings);
            Builder.AddCommentLine("; Model: " + Settings.Machine.ManufacturerName + " " + Settings.Machine.ModelIdentifier);

            HeaderCustomizerF(HeaderState.AfterComments, Builder);

            // M190
            if (Settings.Machine.HasHeatedBed)
            {
                if (Settings.HeatedBedTempC > 0)
                {
                    SetBedTargetTempAndWait(Settings.HeatedBedTempC);
                }
                else
                {
                    SetBedTargetTemp(0, "disable heated bed");
                }
            }

            // M109
            SetExtruderTargetTempAndWait(Settings.ExtruderTempC);

            HeaderCustomizerF(HeaderState.AfterTemperature, Builder);

            Builder.BeginGLine(21, "units=mm");
            Builder.BeginGLine(90, "absolute positions");
            Builder.BeginMLine(82, "absolute extruder position");

            DisableFan();

            HeaderCustomizerF(HeaderState.BeforeHome, Builder);

            Builder.BeginGLine(28, "home x/y").AppendI("X", 0).AppendI("Y", 0);
            currentPos.x  = currentPos.y = 0;
            PositionShift = 0.5 * new Vector2d(Settings.Machine.BedSizeXMM, Settings.Machine.BedSizeYMM);

            Builder.BeginGLine(28, "home z").AppendI("Z", 0);
            currentPos.z = 0;


            HeaderCustomizerF(HeaderState.BeforePrime, Builder);

            // extruder prime by drawing line across front of bed
            double   PrimeHeight = Settings.LayerHeightMM * 1.35;
            double   PrimeWidth  = 2 * Settings.Machine.NozzleDiamMM;
            Vector3d frontRight  = new Vector3d(Settings.Machine.BedSizeXMM / 2, -Settings.Machine.BedSizeYMM / 2, PrimeHeight);

            frontRight.x -= 10;
            frontRight.y += 5;
            Vector3d frontLeft = frontRight; frontLeft.x = -frontRight.x;
            double   primeLen  = frontRight.Distance(frontLeft);

            double PrimeFeedRate  = 1800;
            double prime_feed_len = AssemblerUtil.CalculateExtrudedFilament(
                PrimeWidth, PrimeHeight, primeLen, Settings.Machine.FilamentDiamMM);

            Builder.BeginGLine(92, "reset extruded length").AppendI("E", 0);
            BeginTravel();
            AppendMoveTo(frontRight, 9000, "start prime");
            EndTravel();
            AppendExtrudeTo(frontLeft, PrimeFeedRate, prime_feed_len, "prime");


            // [RMS] this does not extrude very much and does not seem to work?
            //Builder.BeginGLine(1, "move platform down").AppendF("Z", 15).AppendI("F", 9000);
            //currentPos.z = 15;
            //Builder.BeginGLine(92, "reset extruded length").AppendI("E", 0);
            //extruderA = 0;
            //Builder.BeginGLine(1, "extrude blob").AppendI("F", 200).AppendI("E", 3);
            //Builder.BeginGLine(92, "reset extruded length again").AppendI("E", 0);
            //extruderA = 0;
            //Builder.BeginGLine(1, "reset speed").AppendI("F", 9000);

            // move to z=0
            BeginTravel();
            AppendMoveTo(new Vector3d(NozzlePosition.x, NozzlePosition.y, 0), Settings.ZTravelSpeed, "reset z");
            EndTravel();

            ShowMessage("Print Started");

            in_retract = false;
            in_travel  = false;

            UpdateProgress(0);
        }