From: <adr...@us...> - 2011-01-12 09:43:56
|
Revision: 3997 http://reprap.svn.sourceforge.net/reprap/?rev=3997&view=rev Author: adrian-bowyer Date: 2011-01-12 09:43:49 +0000 (Wed, 12 Jan 2011) Log Message: ----------- Minor improvement to the multiple outline code. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java Added Paths: ----------- trunk/software/host/lib/reprap.ico Added: trunk/software/host/lib/reprap.ico =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/reprap.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java 2011-01-12 04:53:18 UTC (rev 3996) +++ trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java 2011-01-12 09:43:49 UTC (rev 3997) @@ -136,8 +136,17 @@ } if(outline) { - for(int shell = 0; shell < shells; shell++) - result.add(get(i).offset(-multiplier*((double)shell + 0.5)*e.getExtrusionSize())); + int shell = 0; + boolean carryOn = true; + while(carryOn && shell < shells) + { + BooleanGrid thisOne = get(i).offset(-multiplier*((double)shell + 0.5)*e.getExtrusionSize()); + if(thisOne.isEmpty()) + carryOn = false; + else + result.add(thisOne); + shell++; + } } else { // Must be a hatch. Only do it if the gap is +ve or we're building the foundation @@ -150,7 +159,7 @@ offSize = 3; else offSize = -multiplier*((double)shells + 0.5)*e.getExtrusionSize() + ife.getInfillOverlap(); - if (e.getExtrusionInfillWidth() > 0 || foundation) // Z valuesn't mattere here + if (e.getExtrusionInfillWidth() > 0 || foundation) // Z value doesn't matter here result.add(get(i).offset(offSize)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |