Implemented Slic3r::ExtrusionLoop

This commit is contained in:
Alessandro Ranellucci 2013-07-15 16:21:09 +02:00
parent c9749ca3b3
commit d0701cdcd4
10 changed files with 145 additions and 88 deletions

View file

@ -29,6 +29,16 @@ perl2polygon(SV* poly_sv, Polygon& poly)
}
}
void
perl2polygon_check(SV* poly_sv, Polygon& poly)
{
if (sv_isobject(poly_sv) && (SvTYPE(SvRV(poly_sv)) == SVt_PVMG)) {
poly = *(Polygon*)SvIV((SV*)SvRV( poly_sv ));
} else {
perl2polygon(poly_sv, poly);
}
}
SV*
polygon2perl(Polygon& poly) {
const unsigned int num_points = poly.points.size();

View file

@ -68,6 +68,16 @@ perl2polyline(SV* poly_sv, Polyline& poly)
}
}
void
perl2polyline_check(SV* poly_sv, Polyline& poly)
{
if (sv_isobject(poly_sv) && (SvTYPE(SvRV(poly_sv)) == SVt_PVMG)) {
poly = *(Polyline*)SvIV((SV*)SvRV( poly_sv ));
} else {
perl2polyline(poly_sv, poly);
}
}
SV*
polyline2perl(Polyline& poly) {
const unsigned int num_points = poly.points.size();