<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>See code below.</div><div>What I am trying to do is to connect a piece of cone to a cylinder. To do this I cut the top of the cone using an implicit cylinder with the same radius as real cylinder.</div><div>However, the radius of the cut cone top is not equal to the radius of the real cylinder.</div><div>What am I doing wrong?</div><div><br></div><div>Does this have to do with how the clip values in the points are interpolated? And should I refine the triangulation of the cone to get a better result?<br></div><div><br></div><div>Thanks - Maarten<br></div><div><br></div><div>vtkSmartPointer<vtkConeSource> startcone = vtkConeSource::New();<br> startcone->SetResolution( 30 );<br> startcone->SetHeight( this->EntryLength );<br> startcone->SetRadius(
this->EntryRadius );<br> startcone->SetCenter( 0.0, -0.5*this->Length + 0.5*this->EntryLength, 0.0 );<br> startcone->SetDirection( 0.0, 1.0, 0.0 );<br> startcone->CappingOff();<br> <br> vtkSmartPointer<vtkCylinderSource> cylinder = vtkCylinderSource::New();<br> cylinder->SetResolution( 30 );<br> cylinder->SetRadius( this->CylinderRadius );<br> cylinder->SetHeight( this->Length );<br> cylinder->SetCenter( 0.0, 0.0, 0.0 );<br> cylinder->CappingOff();<br> <br> vtkSmartPointer<vtkCylinder> cyl = vtkCylinder::New();<br> cyl->SetRadius( this->CylinderRadius );<br> cyl->SetCenter( 0.0, 0.5*this->Length, 0.0 );<br> <br> vtkSmartPointer<vtkClipPolyData> clipper1 = vtkClipPolyData::New();<br> clipper1->SetClipFunction( cyl );<br> clipper1->SetInputConnection(
startcone->GetOutputPort() );<br> <br> vtkSmartPointer<vtkAppendPolyData> append = vtkAppendPolyData::New();<br> append->AddInput( clipper1->GetOutput() );<br> append->AddInput( cylinder->GetOutput() );<br></div></div></body></html>