<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p> On 2015-10-14 18:10, Cory Quammen wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">
<div dir="ltr"><span style="font-size: 12.8px;">Maybe try inserting a vtkTriangleFilter in front of your STL writer?</span></div>
</blockquote>
<div dir="ltr">Perfect - many many thanks!</div>
<div dir="ltr"> </div>
<div dir="ltr">It worked on the triangle mesh AND on the ruled surface. Both STL files read into other apps just fine. The ruled surface output is appreciably higher quality even than a very high poly count mesh.</div>
<div dir="ltr"> </div>
<div dir="ltr">For the record...</div>
<div dir="ltr"> </div>
<div dir="ltr">/<span style="font-family: 'courier new', courier;">/ write out a STL file</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">// run a triangle filter ruled surface to create polys</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">vtkSmartPointer<vtkTriangleFilter></span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">tris = vtkTriangleFilter::New();</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">tris->SetInputConnection(ruled->GetOutputPort());</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">vtkSmartPointer<vtkSTLWriter></span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">stlWriter = vtkSmartPointer<vtkSTLWriter>::New();</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">stlWriter->SetFileName("Ruled.stl");</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">stlWriter->SetInputConnection(tris->GetOutputPort());</span></div>
<div dir="ltr"><span style="font-family: 'courier new', courier;"></span><span style="font-family: 'courier new', courier;">stlWriter->Write();</span></div>
<div dir="ltr">
<p>And</p>
<p>// write out a STL file<br /> // run a triangle filter on the mesh to create polys<br /> vtkSmartPointer<vtkTriangleFilter><br /> tris = vtkTriangleFilter::New();<br /> tris->SetInputConnection(ruled->GetOutputPort());</p>
<p>vtkSmartPointer<vtkSTLWriter></p>
<p>stlWriter = vtkSmartPointer<vtkSTLWriter>::New();</p>
<p>stlWriter->SetFileName("Mesh.stl");<br /> stlWriter->SetInputConnection(tris->GetOutputPort());<br /> stlWriter->Write();</p>
<p>--</p>
<p>Piers Barber                   (-=:LogicMonkey:=-)</p>
</div>
</body></html>