SurfaceBoundary sb2 = (SurfaceBoundary) surface22.getBoundary();
Ring exterior = sb2.getExterior();
List<Ring> interiors2 = sb2.getInteriors();
Collection<? extends Primitive> extCurve = exterior.getElements();
Iterator<? extends Primitive> iter = extCurve.iterator();
PointArray samplePoints = null;
while (iter.hasNext()) {
Curve curve2 = (Curve) iter.next();
List<? extends CurveSegment> segs2 = curve2.getSegments();
Iterator<? extends CurveSegment> iter2 = segs2.iterator();
while (iter2.hasNext()) {
if (samplePoints == null) {
samplePoints = iter2.next().getSamplePoints();
}
else {
samplePoints.addAll(iter2.next().getSamplePoints());
}
}
}
}