vector<Poly> Clipping::getOffset(const Poly &poly, double distance, JoinType jtype, double miterdist) { CL::Polygons cpolys(1); cpolys[0]=getClipperPolygon(poly); CL::Polygons offset = CLOffset(cpolys, CL_FACTOR*distance, CLType(jtype), miterdist); return getPolys(offset, poly.getZ(), poly.getExtrusionFactor()); }
void Printlines::addPoly(const Poly poly, int startindex, double speed, double movespeed) { vector<Vector2d> pvert; poly.getLines(pvert,startindex); assert(pvert.size() % 2 == 0); for (uint i=0; i<pvert.size();i+=2){ addLine(pvert[i], pvert[i+1], speed, movespeed, poly.getExtrusionFactor()); } }
void Clipping::addPoly(const Poly &poly, PolyType type) { clpr.AddPolygon(getClipperPolygon(poly),CLType(type)); lastZ = poly.getZ(); lastExtrF = poly.getExtrusionFactor(); }