This document discusses improvements to the STL file format slicing algorithm used in rapid prototyping. It proposes optimizing the algorithm to reduce memory usage and file size by only processing facets that intersect the cutting plane, rather than all facets. It also details using tail-to-head searching and nearest distance analysis to construct error-free contours from the sliced facets by ensuring line segments are consecutive with matching heads and tails. The proposed algorithm aims to directly slice STL models with defects to produce closed, error-free contours for layer manufacturing.