Permalink
Browse files

Added debugFlag and two stl examples that should be slicing flat but …

…aren't.
  • Loading branch information...
1 parent 690d564 commit ae5015fac556f2778d4ecf52228d1b245651ce0c @clothbot clothbot committed Sep 7, 2010
Showing with 11 additions and 7 deletions.
  1. BIN Hole_Calibration.stl
  2. +10 −6 SuperSkein.pde
  3. BIN Z_Bracket.stl
  4. +1 −1 config.txt
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -11,6 +11,7 @@ import java.awt.geom.PathIterator;
float PreScale = 1;
String FileName = "sculpt_dragon.stl";
float XRotate = 0;
+boolean debugFlag=false;
String DXFSliceFilePrefix = "dxf_slice";
@@ -422,25 +423,28 @@ class DXFWriteProc implements Runnable{
ThisSlice = new Slice(STLFile,ZLevel);
// lin = (SSLine) ThisSlice.Lines.get(0);
PathIterator pathIter=ThisSlice.SlicePath.getPathIterator(new AffineTransform());
- float[] newCoords={0.0,0.0};
- float[] prevCoords={0.0,0.0};
+ float[] newCoords={0.0,0.0,0.0,0.0,0.0,0.0};
+ float[] prevCoords={0.0,0.0,0.0,0.0,0.0,0.0};
int segType=pathIter.currentSegment(prevCoords);
pathIter.next();
while(!pathIter.isDone()) {
segType=pathIter.currentSegment(newCoords);
if(segType == PathIterator.SEG_LINETO ) {
// println(" SEG_LINETO: "+newCoords[0]+" "+newCoords[1]+"\n");
- print(".");
+ if(debugFlag) print(".");
pgDxf.line(prevCoords[0],prevCoords[1],newCoords[0],newCoords[1]);
+ segType=pathIter.currentSegment(prevCoords);
} else if( segType==PathIterator.SEG_CLOSE) {
- println(" Slice: "+DXFSliceNum+" SEG_CLOSE: "+newCoords[0]+" "+newCoords[1]+"\n");
+ if(debugFlag) println(" Slice: "+DXFSliceNum+" SEG_CLOSE: "+newCoords[0]+" "+newCoords[1]+"\n");
pgDxf.line(prevCoords[0],prevCoords[1],newCoords[0],newCoords[1]);
+ segType=pathIter.currentSegment(prevCoords);
} else if(segType == PathIterator.SEG_MOVETO) {
- println(" Slice: "+DXFSliceNum+" SEG_MOVETO: "+newCoords[0]+" "+newCoords[1]+"\n");
+ if(debugFlag) println(" Slice: "+DXFSliceNum+" SEG_MOVETO: "+newCoords[0]+" "+newCoords[1]+"\n");
+ segType=pathIter.currentSegment(prevCoords);
} else {
println(" Slice: "+DXFSliceNum+" segType: "+segType+"\n");
+ segType=pathIter.currentSegment(prevCoords);
}
- segType=pathIter.currentSegment(prevCoords);
pathIter.next();
}
output.println(" if(index>="+DXFSliceNum+"&&index<(1+"+DXFSliceNum+")) {");
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -1,6 +1,6 @@
CONFIG_SCALE 1.0
CONFIG_XROTATE 0.34
-CONFIG_STLFILE sculpt_dragon.stl
+CONFIG_STLFILE Z_Bracket.stl
MACHINE_OPTEMP 220
MACHINE_FLOWRATE 190
CONFIG_SINK 2.0

0 comments on commit ae5015f

Please sign in to comment.