From: <adr...@us...> - 2010-11-20 17:06:18
|
Revision: 3893 http://reprap.svn.sourceforge.net/reprap/?rev=3893&view=rev Author: adrian-bowyer Date: 2010-11-20 17:06:12 +0000 (Sat, 20 Nov 2010) Log Message: ----------- Raise Z parameter added to moveToPurge() function, so you can choose whether to lift a bit, or not. Modified Paths: -------------- trunk/software/host/src/org/reprap/Printer.java trunk/software/host/src/org/reprap/devices/GCodeExtruder.java trunk/software/host/src/org/reprap/devices/GenericExtruder.java trunk/software/host/src/org/reprap/machines/GCodeRepRap.java trunk/software/host/src/org/reprap/machines/GenericRepRap.java trunk/software/host/src/org/reprap/machines/Simulator.java Modified: trunk/software/host/src/org/reprap/Printer.java =================================================================== --- trunk/software/host/src/org/reprap/Printer.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/Printer.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -217,7 +217,7 @@ * Move to the purge point * */ - public void moveToPurge(); + public void moveToPurge(boolean raiseZ); /** * @param previewer Modified: trunk/software/host/src/org/reprap/devices/GCodeExtruder.java =================================================================== --- trunk/software/host/src/org/reprap/devices/GCodeExtruder.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/devices/GCodeExtruder.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -34,28 +34,7 @@ //} } - /** - * Purge the extruder - */ - public void purge(boolean homeZ) throws Exception - { - if(purgeTime <= 0) - return; - getPrinter().moveToPurge(); - try - { - if(homeZ) - getPrinter().homeToZeroZ(); - heatOn(true); - setExtrusion(getFastXYFeedrate(), false); - getPrinter().machineWait(purgeTime, false); - setExtrusion(0, false); - } catch (Exception e) - {} - getPrinter().printEndReverse(); - //getPrinter().home(); - zeroExtrudedLength(); - } + public void setTemperature(double temperature, boolean wait) throws Exception { Modified: trunk/software/host/src/org/reprap/devices/GenericExtruder.java =================================================================== --- trunk/software/host/src/org/reprap/devices/GenericExtruder.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/devices/GenericExtruder.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -1338,6 +1338,29 @@ return purgeTime; } + /** + * Purge the extruder + */ + public void purge(boolean homeZ) throws Exception + { + getPrinter().moveToPurge(!homeZ); + try + { + if(homeZ) + getPrinter().homeToZeroZ(); + heatOn(true); + if(purgeTime > 0) + { + setExtrusion(getFastXYFeedrate(), false); + getPrinter().machineWait(purgeTime, false); + setExtrusion(0, false); + getPrinter().printEndReverse(); + zeroExtrudedLength(); + } + } catch (Exception e) + {} + } + /** * If this is true, plot outlines from the middle of their infilling hatch to reduce dribble at * their starts and ends. If false, plot the outline as the outline. Modified: trunk/software/host/src/org/reprap/machines/GCodeRepRap.java =================================================================== --- trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -417,15 +417,6 @@ /** - * Go to the purge point - */ - public void moveToPurge() - { - singleMove(currentX, currentY, currentZ + 1, getFastFeedrateZ()); - singleMove(dumpX, dumpY, currentZ, getExtruder().getFastXYFeedrate()); - } - - /** * Go to the finish point */ public void moveToFinish() Modified: trunk/software/host/src/org/reprap/machines/GenericRepRap.java =================================================================== --- trunk/software/host/src/org/reprap/machines/GenericRepRap.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/machines/GenericRepRap.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -323,15 +323,27 @@ selectExtruder(0); getExtruder().zeroExtrudedLength(); - Debug.d("Homing machine"); - home(); + Debug.d("Homing machine in X and Y"); + homeToZeroX(); + homeToZeroY(); //Debug.d("Setting temperature"); //getExtruder().heatOn(true); + // Move to the purge point, home Z and purge the extruder getExtruder().purge(true); } + /** + * Go to the purge point + */ + public void moveToPurge(boolean raiseZ) + { + if(raiseZ) + singleMove(currentX, currentY, currentZ + 1, getFastFeedrateZ()); + singleMove(dumpX, dumpY, currentZ, getExtruder().getFastXYFeedrate()); + } + /* (non-Javadoc) * @see org.reprap.Printer#calibrate() */ Modified: trunk/software/host/src/org/reprap/machines/Simulator.java =================================================================== --- trunk/software/host/src/org/reprap/machines/Simulator.java 2010-11-18 19:11:20 UTC (rev 3892) +++ trunk/software/host/src/org/reprap/machines/Simulator.java 2010-11-20 17:06:12 UTC (rev 3893) @@ -54,13 +54,6 @@ } - /** - * Go to the purge point - */ - public void moveToPurge() - { - singleMove(dumpX, dumpY, currentZ, getExtruder().getFastXYFeedrate()); - } public void waitTillNotBusy() throws IOException {} public void finishedLayer(int layerNumber) throws Exception {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |