summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CGALEvaluator.cc10
-rw-r--r--src/CGAL_Nef_polyhedron_DxfData.cc2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index 406614f..7c483cb 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -181,9 +181,11 @@ CGAL_Nef_polyhedron CGALEvaluator::applyHull(const CgaladvNode &node)
CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node)
{
- // Based on resize() in Giles Bathgate's RapCAD (but not exactly)
+ // Based on resize() in Giles Bathgate's RapCAD (but not exactly)
CGAL_Nef_polyhedron N;
- N = applyToChildren(node, CGE_UNION);
+ N = applyToChildren(node, CGE_UNION);
+
+ if ( N.isNull() || N.isEmpty() ) return N;
for (int i=0;i<3;i++) {
if (node.newsize[i]<0) {
@@ -309,9 +311,7 @@ Response CGALEvaluator::visit(State &state, const TransformNode &node)
PRINT("Warning: Transformation matrix contains Not-a-Number and/or Infinity - removing object.");
N.reset();
}
- else {
- N.transform( node.matrix );
- }
+ N.transform( node.matrix );
}
else {
N = CGALCache::instance()->get(this->tree.getIdString(node));
diff --git a/src/CGAL_Nef_polyhedron_DxfData.cc b/src/CGAL_Nef_polyhedron_DxfData.cc
index f7ff7f3..0388fe5 100644
--- a/src/CGAL_Nef_polyhedron_DxfData.cc
+++ b/src/CGAL_Nef_polyhedron_DxfData.cc
@@ -128,7 +128,7 @@ void CGAL_Nef_polyhedron::transform( const Transform3d &matrix )
Tree nulltree;
CGALEvaluator tmpeval(nulltree);
CGAL_Nef_polyhedron N = tmpeval.evaluateCGALMesh(ps);
- this->p2.reset( new CGAL_Nef_polyhedron2( *N.p2 ) );
+ if ( N.p2 ) this->p2.reset( new CGAL_Nef_polyhedron2( *N.p2 ) );
delete dd;
}
}
contact: Jan Huwald // Impressum