Esempio n. 1
0
void
ClipperPolygons_to_Slic3rPolygons(const ClipperLib::Polygons &input, Slic3r::Polygons &output)
{
    output.clear();
    for (ClipperLib::Polygons::const_iterator it = input.begin(); it != input.end(); ++it) {
        Slic3r::Polygon p;
        ClipperPolygon_to_Slic3rPolygon(*it, p);
        output.push_back(p);
    }
}
Esempio n. 2
0
void
scaleClipperPolygons(ClipperLib::Polygons &polygons, const double scale)
{
    for (ClipperLib::Polygons::iterator it = polygons.begin(); it != polygons.end(); ++it) {
        for (ClipperLib::Polygon::iterator pit = (*it).begin(); pit != (*it).end(); ++pit) {
            (*pit).X *= scale;
            (*pit).Y *= scale;
        }
    }
}
Esempio n. 3
0
//--------------------------------------------------------------
void ofxClipper::polygons_to_ofxPolylines(ClipperLib::Polygons& polygons,ofxPolylines& polylines) {
    vector<ClipperLib::Polygon>::iterator iter;
    for(iter = polygons.begin(); iter != polygons.end(); iter++) {
        polylines.push_back(polygon_to_ofPolyline((*iter)));
    }
}