From: <adr...@us...> - 2011-03-23 11:22:04
|
Revision: 4067 http://reprap.svn.sourceforge.net/reprap/?rev=4067&view=rev Author: adrian-bowyer Date: 2011-03-23 11:21:58 +0000 (Wed, 23 Mar 2011) Log Message: ----------- Work on improving the construction of unsupported bridges. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-03-23 10:44:08 UTC (rev 4066) +++ trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-03-23 11:21:58 UTC (rev 4067) @@ -736,8 +736,8 @@ BooleanGridList adjacentSlices = slice(stl, layer+1, layerConditions); adjacentSlices = BooleanGridList.intersections(slice(stl, layer+2, layerConditions), adjacentSlices); //adjacentSlices = BooleanGridList.intersections(slice(stl, layer+3, layerConditions), adjacentSlices); - BooleanGridList justBelow = slice(stl, layer-1, layerConditions); - adjacentSlices = BooleanGridList.intersections(justBelow, adjacentSlices); + BooleanGridList supportBeneath = slice(stl, layer-1, layerConditions); + adjacentSlices = BooleanGridList.intersections(supportBeneath, adjacentSlices); adjacentSlices = BooleanGridList.intersections(slice(stl, layer-2, layerConditions), adjacentSlices); //adjacentSlices = BooleanGridList.intersections(slice(stl, layer-3, layerConditions), adjacentSlices); BooleanGridList insides = null; @@ -747,23 +747,33 @@ // We grow the outsides just into the insides (nowhere else) to // ensure that they go a little way into the inside infill. - BooleanGridList outsides = slice; + BooleanGridList nothingAbove = slice; + BooleanGridList unSupported = null; if(adjacentSlices != null && layerConditions.getModelLayer() > 1) { insides = BooleanGridList.intersections(slice, adjacentSlices); - outsides = BooleanGridList.differences(slice, adjacentSlices); - outsides = outsides.offset(layerConditions, false, -2); - outsides = BooleanGridList.intersections(outsides, slice); + nothingAbove = BooleanGridList.differences(slice, adjacentSlices); + unSupported = BooleanGridList.differences(nothingAbove, supportBeneath); + nothingAbove = BooleanGridList.differences(nothingAbove, unSupported); + nothingAbove = nothingAbove.offset(layerConditions, false, -2); + nothingAbove = BooleanGridList.intersections(nothingAbove, slice); + unSupported = unSupported.offset(layerConditions, false, -2); // -2 indents us a little into the inside volume + unSupported = BooleanGridList.intersections(unSupported, slice); } - outsides = outsides.offset(layerConditions, false, 1); + nothingAbove = nothingAbove.offset(layerConditions, false, 1); + if(unSupported != null) + unSupported = unSupported.offset(layerConditions, false, 1); if(insides != null) { insides = insides.offset(layerConditions, false, 1); - insides = BooleanGridList.differences(insides, outsides); + insides = BooleanGridList.differences(insides, nothingAbove); // Don't overplot the indented area + insides = BooleanGridList.differences(insides, unSupported); } - RrPolygonList hatchedPolygons = outsides.hatch(layerConditions, true); + RrPolygonList hatchedPolygons = nothingAbove.hatch(layerConditions, true); + if(unSupported != null) + hatchedPolygons.add(unSupported.hatch(layerConditions, true)); if(insides != null) hatchedPolygons.add(insides.hatch(layerConditions, false)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |