<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>By the way, I do not have the issue if I do not call setLineWidth(...).</div><div><br></div><div>Thanks.</div><div><br></div><div>Mathieu</div><br><div><div>On 5-Nov-08, at 11:44 AM, Mathieu Coursolle wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi VTK users,<div><br></div><div>I have a 2D scene in which I display a circle polydata generated using vtkRegularPolygonSource. I want the thickness to always be the same in pixels.</div><div><br></div><div>It works fine, except that I have some strange artifacts, like missing pieces in 4 opposite locations (see picture attached).</div><div><br></div><div>Is there anything wrong in this code?</div><div><br></div><div>Thanks!</div><div><br></div><div>Mathieu</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">vtkSmartPointer<vtkRegularPolygonSource> circleSource = vtkSmartPointer<vtkRegularPolygonSource>::New();</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->SetCenter(0.0, 0.0, 0.0);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->SetNumberOfSides(360);<span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" size="2"></font></span></span></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" size="2">circleSource->SetNormal(0.0, 0.0, 1.0);</font></span></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->SetRadius(15.0); // 15 mm radius</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->SetGeneratePolygon(</span></font><span style="color: #1046da"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">FALSE</span></font></span><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->SetGeneratePolyline(</span></font><span style="color: #1046da"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">TRUE</span></font></span><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleSource->Update();</span></font></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">                        </span></font></span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">vtkSmartPointer<vtkPolyDataMapper> circleMapper = vtkSmartPointer<vtkPolyDataMapper>::New();<span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" size="2">        </font></span></span></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" size="2">circleMapper->SetInput(circleSource->GetOutput());</font></span></span></font></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">                        <span class="Apple-style-span" style="white-space: normal; "></span></span></font></span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><span class="Apple-style-span" style="white-space: normal; ">vtkSmartPointer<vtkActor> circleActor = vtkSmartPointer<vtkActor>::New();</span></span></font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleActor->SetMapper(circleMapper);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleActor->GetProperty()->SetLineWidth(20); // 20 pixels thick</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;">circleActor->GetProperty()->SetOpacity(0.9);</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><br></span></font></div></div><div><span><Picture 1.png></span></div></div>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></body></html>