Speed up 3D hull() slightly by avoiding converting the result to Nef

master
Oskar Linde 2014-05-22 14:32:59 +02:00
parent 943e98ae80
commit 35c2a5e5ca
1 changed files with 7 additions and 4 deletions

View File

@ -99,11 +99,14 @@ GeometryEvaluator::ResultObject GeometryEvaluator::applyToChildren3D(const Abstr
if (op == OPENSCAD_HULL) {
CGAL_Polyhedron P;
if (CGALUtils::applyHull(children, P)) {
return ResultObject(new CGAL_Nef_polyhedron(new CGAL_Nef_polyhedron3(P)));
}
else {
return ResultObject();
PolySet *ps = new PolySet(3);
if (!createPolySetFromPolyhedron(P, *ps)) {
return ResultObject(ps);
}
delete ps;
}
return ResultObject();
}
// Only one child -> this is a noop