Clifford Wolf:

Added 2d render() support



git-svn-id: http://svn.clifford.at/openscad/trunk@207 b57f626f-c46c-0410-a088-ec61d464b74c
stl_dim
clifford 2010-01-06 01:40:28 +00:00
parent 6f2f0016d1
commit e71c3ce4c9
1 changed files with 11 additions and 4 deletions

View File

@ -156,10 +156,14 @@ CSGTerm *RenderNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights
delete pd;
}
PolySet *ps = NULL;
if (N.dim == 2)
{
// FIXME
return NULL;
DxfData dd(N);
ps = new PolySet();
ps->is2d = true;
dxf_tesselate(ps, &dd, 0, true, 0);
}
if (N.dim == 3)
@ -169,8 +173,7 @@ CSGTerm *RenderNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights
return NULL;
}
PolySet *ps = new PolySet();
ps->convexity = convexity;
ps = new PolySet();
CGAL_Polyhedron P;
N.p3.convert_to_Polyhedron(P);
@ -192,7 +195,11 @@ CSGTerm *RenderNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights
ps->append_vertex(x, y, z);
} while (hc != hc_end);
}
}
if (ps)
{
ps->convexity = convexity;
PolySet::ps_cache.insert(key, new PolySetPtr(ps->link()));
CSGTerm *term = new CSGTerm(ps, m, QString("n%1").arg(idx));