Remove any Perl related code from libslic3r

This commit is contained in:
Alessandro Ranellucci 2015-12-08 00:39:54 +01:00
parent 3fac8cd77e
commit 4913e90e10
105 changed files with 907 additions and 1066 deletions

View file

@ -405,52 +405,6 @@ TriangleMesh::require_shared_vertices()
if (this->stl.v_shared == NULL) stl_generate_shared_vertices(&(this->stl));
}
#ifdef SLIC3RXS
REGISTER_CLASS(TriangleMesh, "TriangleMesh");
SV*
TriangleMesh::to_SV() {
SV* sv = newSV(0);
sv_setref_pv( sv, perl_class_name(this), (void*)this );
return sv;
}
void TriangleMesh::ReadFromPerl(SV* vertices, SV* facets)
{
stl.error = 0;
stl.stats.type = inmemory;
// count facets and allocate memory
AV* facets_av = (AV*)SvRV(facets);
stl.stats.number_of_facets = av_len(facets_av)+1;
stl.stats.original_num_facets = stl.stats.number_of_facets;
stl_allocate(&stl);
// read geometry
AV* vertices_av = (AV*)SvRV(vertices);
for (int i = 0; i < stl.stats.number_of_facets; i++) {
AV* facet_av = (AV*)SvRV(*av_fetch(facets_av, i, 0));
stl_facet facet;
facet.normal.x = 0;
facet.normal.y = 0;
facet.normal.z = 0;
for (unsigned int v = 0; v <= 2; v++) {
AV* vertex_av = (AV*)SvRV(*av_fetch(vertices_av, SvIV(*av_fetch(facet_av, v, 0)), 0));
facet.vertex[v].x = SvNV(*av_fetch(vertex_av, 0, 0));
facet.vertex[v].y = SvNV(*av_fetch(vertex_av, 1, 0));
facet.vertex[v].z = SvNV(*av_fetch(vertex_av, 2, 0));
}
facet.extra[0] = 0;
facet.extra[1] = 0;
stl.facet_start[i] = facet;
}
stl_get_size(&(this->stl));
}
#endif
void
TriangleMeshSlicer::slice(const std::vector<float> &z, std::vector<Polygons>* layers)
{