<div dir="ltr">Hi,<div><br></div><div>I have a simple example to show a problem I need help resolving. I'm very new to VTK and have copied the TubesFromSplines example C++ code to almost what I need, but one issue remains to be solved.</div><div><br></div><div>The intent is to have a program where I can add multiple splines/tubes and then output the combined form to an STL file.</div><div><br></div><div>The example program I have attached generates the correct model in the render window, and I get one spline in the output STL. </div><div><br></div><div>But I would like all programmed splines to be merged and output to the STL file. I need to merge them before calling the STLWriter. This is where I am unclear.</div><div><br></div><div>The example code shows a working example, and what I thought would work but is failing and marked 'BROKEN',</div><div><br></div><div>{code}</div><div><div> //---------------------------------------</div><div>// stlWriter->SetInputConnection(appendFilter->GetOutputPort()); // BROKEN</div><div>// </div><div>// ERROR: In /Users/ali/code/VTK-7.1.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 810</div><div>// vtkCompositeDataPipeline (0x7f987670c630): Input for connection index 0 on input port index 0 for</div><div>// algorithm vtkSTLWriter(0x7f9876709f40) is of type vtkUnstructuredGrid, but a vtkPolyData is required.</div><div> </div><div> stlWriter->SetInputConnection(triangleFilter->GetOutputPort()); // WORKS</div><div> //---------------------------------------</div></div><div>{/code}</div><div><br></div><div><br></div><div>I suspect there is something easy I'm missing, and would appreciate any help.</div><div><br></div><div>I've also attached some screenshots showing how the render window and STL output look.</div><div><br></div><div>And yes the code is ugly and repeats itself, but I'm just trying to understand the basic concept first then can add a function for adding each spline, etc...</div><div><br></div><div>Thanks!</div><div><br></div><div>Sean</div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Sean Harre</div><div><a href="mailto:seanharre@gmail.com" target="_blank">seanharre@gmail.com</a></div><div><br></div></div>
</div></div>