From: <adr...@us...> - 2011-03-22 23:21:30
|
Revision: 4064 http://reprap.svn.sourceforge.net/reprap/?rev=4064&view=rev Author: adrian-bowyer Date: 2011-03-22 23:21:23 +0000 (Tue, 22 Mar 2011) Log Message: ----------- Nozzle lifts going properly. (Maybe...) Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/Producer.java trunk/software/host/src/org/reprap/machines/GenericRepRap.java Modified: trunk/software/host/src/org/reprap/geometry/Producer.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/Producer.java 2011-03-22 18:50:21 UTC (rev 4063) +++ trunk/software/host/src/org/reprap/geometry/Producer.java 2011-03-22 23:21:23 UTC (rev 4064) @@ -338,7 +338,6 @@ } } - LayerProducer lp = new LayerProducer(allPolygons, layerRules, simulationPlot); layerRules.setFirstAndLast(allPolygons); @@ -352,10 +351,7 @@ reprap.setTop(reprap.getX(), reprap.getY(), reprap.getZ()); firstTimeRound = false; } - //layer = null; - //slice = null; - - //slice.finalize(); + allSTLs.destroyLayer(); layerRules.step(reprap.getExtruder()); Modified: trunk/software/host/src/org/reprap/machines/GenericRepRap.java =================================================================== --- trunk/software/host/src/org/reprap/machines/GenericRepRap.java 2011-03-22 18:50:21 UTC (rev 4063) +++ trunk/software/host/src/org/reprap/machines/GenericRepRap.java 2011-03-22 23:21:23 UTC (rev 4064) @@ -905,8 +905,18 @@ // The startup procedure has already done that if(lc.getMachineLayer() > 0 && Preferences.loadGlobalBool("InterLayerCooling")) + { + double liftZ = -1; + for(int i = 0; i < extruders.length; i++) + if(extruders[i].getLift() > liftZ) + liftZ = extruders[i].getLift(); + double currentZ = getZ(); + if(liftZ > 0) + singleMove(getX(), getY(), currentZ + liftZ, getFastFeedrateZ()); homeToZeroXYE(); - else + if(liftZ > 0) + singleMove(getX(), getY(), currentZ, getFastFeedrateZ()); + } else { int extruderNow = extruder; for(int i = 0; i < extruders.length; i++) @@ -1089,95 +1099,12 @@ statusWindow.setCancelled(isCancelled); } - /** - * @return the X stepper - */ -// public GenericStepperMotor getXMotor() -// { -// return motorX; -// } -// -// /** -// * @return the Y stepper -// */ -// public GenericStepperMotor getYMotor() -// { -// return motorY; -// } -// -// /** -// * @return the Z stepper -// */ -// public GenericStepperMotor getZMotor() -// { -// return motorZ; -// } public int getFoundationLayers() { return foundationLayers; } -// //TODO: MAKE THIS WORK! -// // Works for me! - AB -// public int convertFeedrateToSpeedXY(double feedrate) -// { -// //Debug.d("feedrate: " + feedrate); -// -// //pretty straightforward -// double stepsPerMinute = feedrate * scaleX; -// //Debug.d("steps/min: " + stepsPerMinute); -// -// //ticks per minute divided by the steps we need to take. -// double ticksBetweenSteps = 60000000.0 / (256.0 * stepsPerMinute); -// //Debug.d("ticks between steps: " + ticksBetweenSteps); -// -// int picTimer = 256 - (int)Math.round(ticksBetweenSteps); -// //Debug.d("pic timer: " + picTimer); -// -// //bounds checking. -// picTimer = Math.min(255, picTimer); -// picTimer = Math.max(0, picTimer); -// -// return picTimer; -// } -// -// -// //TODO: MAKE THIS WORK! -// public int convertFeedrateToSpeedZ(double feedrate) -// { -// //pretty straightforward -// double stepsPerMinute = feedrate * scaleZ; -// -// //ticks per minute divided by the steps we need to take. -//// long ticksBetweenSteps = Math.round(60000000 / 256 / stepsPerMinute); -//// int picTimer = (256 - (int)ticksBetweenSteps); -// double ticksBetweenSteps = 60000000.0 / (256.0 * stepsPerMinute); -// //Debug.d("ticks between steps: " + ticksBetweenSteps); -// -// //System.out.println("Z ticksBetweenSteps = " + ticksBetweenSteps); -// -// int picTimer = 256 - (int)Math.round(ticksBetweenSteps); -// -// //bounds checking. -// picTimer = Math.min(255, picTimer); -// picTimer = Math.max(0, picTimer); -// -// return picTimer; -// } -// -// public double getXStepsPerMM() -// { -// return scaleX; -// } -// public double getYStepsPerMM() -// { -// return scaleY; -// } -// public double getZStepsPerMM() -// { -// return scaleZ; -// } /** * Load an STL file to be made. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |