this.slicePlanesSlatSlices.destroyPlanes();
this.slicePlanesSlatSlices.empty();
//clear all slots
for (int j = 0; j < this.getSlicePlanesY().size(); j++) {
SlicePlane tempPlane = this.getSlicePlanesY().get(j);
tempPlane.getSketch().getSlots().empty();
}
//what does this do?
for (int s = 0; s < this.crossSliceSelections.l.size(); s++) {
CrossSliceSelection crossSliceSelection;
crossSliceSelection = (CrossSliceSelection) this.crossSliceSelections.l
.get(s);
//destroy selection
if (crossSliceSelection.path != null
&& crossSliceSelection.path.isDestroying() == true)
crossSliceSelection.destroy(null);
Object sketch = crossSliceSelection.path;
SketchShape guideSpline = (SketchShape) sketch;
//if (guideSpline == null || guideSpline.size() < 2)
// return;
if (crossSliceSelection != null
&& crossSliceSelection.type == CrossSliceSelection.SLICES
|| crossSliceSelection.type == CrossSliceSelection.LEG
|| crossSliceSelection.type == CrossSliceSelection.SINGLE_SLICE)
GeometryOperations.generateSlices(this.slicePlanesY,
this.slicePlanesSlatSlices, crossSliceSelection,
guideSpline);
if (crossSliceSelection != null
&& (crossSliceSelection.type == CrossSliceSelection.PLANE_ON_EDGE || crossSliceSelection.type == CrossSliceSelection.PLANE))
GeometryOperations.generateSlat(this.slicePlanesY,
this.slicePlanesSlatSlices, crossSliceSelection,
guideSpline, this);
if (crossSliceSelection != null
&& crossSliceSelection.type == CrossSliceSelection.SLATSLICES)
GeometryOperations.generateSlatSlices(this.slicePlanesY,
this.slicePlanesSlatSlices, crossSliceSelection,
guideSpline, this);
}
//this.slicePlanesSlatSlices.checkForCollisions();
if (SETTINGS.useSliceCollisionDetection)
this.slicePlanesY.checkForCollisions();
selectedPlanes.empty();
for (int i = 0; i < slicePlanesSlatSlices.size(); i++) {
SlicePlane plane = slicePlanesSlatSlices.get(i);
if(plane.getCrossSliceSelection() != null && plane.getCrossSliceSelection().selected){
selectedPlanes.add(plane);
}else{
plane.unselect();
}
}
for (int i = 0; i < slicePlanesY.size(); i++) {
SlicePlane plane = slicePlanesY.get(i);
if(plane.isSelected()){
selectedPlanes.add(plane);
}else{
plane.unselect();
}
}
//this.slicePlanesSlatSlices.unselectAll();