<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Microsoft JhengHei";
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@Microsoft JhengHei";
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US'>Good idea, but SetCappingOff or SetCappingOn do not change the underlying problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><b><span style='font-size:11.0pt'>Von:</span></b><span style='font-size:11.0pt'> lihouxing [mailto:lihouxing@yeah.net] <br><b>Gesendet:</b> Dienstag, 19. Juli 2016 11:02<br><b>An:</b> max.wormser@gmx.de; vtkusers@vtk.org<br><b>Betreff:</b> Re:[vtkusers] vtkTubeFilter doesn't create a closed loop<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:35.4pt'>maybe you should set "capping off"<span style='font-size:12.0pt'><o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:35.4pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:35.4pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:35.4pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:35.4pt'><span style='font-family:"Microsoft JhengHei",sans-serif'>发自我的小米手机</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:35.4pt'><span style='font-family:"MS Gothic"'>在</span> Maximilian Wormser <<a href="mailto:max.wormser@gmx.de">max.wormser@gmx.de</a>><span style='font-family:"MS Gothic"'>,</span>2016<span style='font-family:"MS Gothic"'>年</span>7<span style='font-family:"MS Gothic"'>月</span>19<span style='font-family:"MS Gothic"'>日</span> <span style='font-family:"MS Gothic"'>下午</span>3:51<span style='font-family:"MS Gothic"'>写道:</span><o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'>Hey all,</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'>I want to create closed loops with vtkTubeFilter, but at the point where the first and the last point meet there is always a misconnection. vtkStripper and vtkCleanPolyData do not help in this case. I already posted my problem to stackoverflow, but without any solutions so far. Here is a link to my submission: <a href="http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter">http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter</a></span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'>Here’s a minimal working example to reproduce the behavior:</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>import vtk</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>def rendering(mapper):</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    """Takes mapper and handles the rendering."""</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    actor = vtk.vtkActor()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    actor.SetMapper(mapper)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    # Create a renderer, render window, and interactor</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    </span><span style='font-family:"Courier New"'>renderer = vtk.vtkRenderer()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span style='font-family:"Courier New"'>    renderWindow = vtk.vtkRenderWindow()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span style='font-family:"Courier New"'>    </span><span lang=EN-US style='font-family:"Courier New"'>renderWindow.AddRenderer(renderer)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    renderWindowInteractor = vtk.vtkRenderWindowInteractor()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    renderWindowInteractor.SetRenderWindow(renderWindow)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    # Add the actors to the scene</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    renderer.AddActor(actor)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    # Render and interact</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    renderWindow.Render()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    renderWindowInteractor.Start()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>    return</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>pts = vtk.vtkPoints()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>pts.SetNumberOfPoints(4)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>pts.SetPoint(0, 0.5, 0, 0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>pts.SetPoint(1, 1, 0.5, 0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span style='font-family:"Courier New"'>pts.SetPoint(2, 0.5, 1, 0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>pts.SetPoint(3, 0, 0.5, 0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines = vtk.vtkCellArray()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertNextCell(5)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertCellPoint(0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertCellPoint(1)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertCellPoint(2)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertCellPoint(3)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>lines.InsertCellPoint(0)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>poly = vtk.vtkPolyData()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>poly.SetPoints(pts)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>poly.SetLines(lines)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes = vtk.vtkTubeFilter()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.SetInputData(poly)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.CappingOn()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.SidesShareVerticesOff()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.SetNumberOfSides(4)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.SetRadius(0.1)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>tubes.Update()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>mapper = vtk.vtkPolyDataMapper()</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>mapper.SetInputData(tubes.GetOutput())</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>rendering(mapper)</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-family:"Courier New"'>Thanks in advance for any help!</span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'> </span><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p></o:p></span></p></div></blockquote></div></div></body></html>