<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi all,</div><div><br></div><div>I am trying to generate a triangulated surface from cones and cylinders. Where a cone meets a cylinder I want to clip both surface with each other so they nicely 'touch' each other without .</div><div>However the radius of vtkCylinder doesn't seem to be the same as the radius of vtkCylinderSource.</div><div><br></div><div>The code looks like the following:</div><div><br></div><div>vtkSmartPointer&lt;vtkConeSource&gt; cone = vtkConeSource::New();</div><div>cone-&gt;SetResolution(30);</div><div>cone-&gt;SetHeight( coneheight );</div><div>cone-&gt;SetRadius( coneradius );</div><div>cone-&gt;SetCenter( 0.0, 0.5*coneheight, 0.0 ); // so the bottom of the cone of in the x-z plane</div><div>cone-&gt;SetDirection( 0.0, 1.0, 0.0 ); // so the cone axis is parallel to y-axis, like with the
 cylinder</div><div>cone-&gt;CappingOff();<br></div><div><br></div><div>vtkSmartPointer&lt;vtkCylinderSource&gt; cylinder = vtkCylinderSource::New();</div><div>cylinder-&gt;SetResolution(30);</div><div>cylinder-&gt;SetRadius( cylradius ); // cylradius &lt; coneradius</div><div>cylinder-&gt;SetHeight( cyllength );</div><div>cylinder-&gt;SetCenter( 0.0, 0.5*cyllength, 0.0 );</div><div>cylinder-&gt;CappingOff();</div><div><br></div><div>vtkSmartPointer&lt;vtkCylinder&gt; cyl = vtkCylinder::New();</div><div>cyl-&gt;SetRadius( cylradius ); // same value as for vtkCylinderSource</div><div>cyl-&gt;SetCenter( 0.0, 0.5*cyllength, 0.0 );</div><div><br></div><div>vtkSmartPointer&lt;vtkClipPolyData&gt; clipper = vtkClipPolyData::New();</div><div>clipper-&gt;SetClipFunction( cyl );</div><div>clipper-&gt;SetInputConnection( cone-&gt;GetOutputPort() );</div><div><br></div><div>vtkSmartPointer&lt;vtkAppendPolyData&gt; append =
 vtkAppendPolyData::New();</div><div>append-&gt;AddInput( cylinder-&gt;GetOutput() );</div><div>append-&gt;AddInput( clipper-&gt;GetOutput() );</div><div><br></div><div>vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapper = vtkPolyDataMapper::new();</div><div>mapper-&gt;SetInput( append-&gt;GetOutput() );</div><div><br></div><div>vtkSmartPointer&lt;vtkActor&gt; actor = vtkActor::New();</div><div>actor-&gt;SetMapper( mapper );</div><div><br></div><div>actor gets the added to a renderer...</div><div><br></div><div>The radius of the hole in the tip of the cone appears to be smaller than the radius of the cylinder.</div><div>What would be the reason for this?<br></div><div><br></div><div>Thanks - Maarten</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></body></html>