Hello everyone,
I have created a disk by cutting a plane source with 2 cylinders. Then created a Hollow cylinder using an Extrusion filter. When I tried to cut a hole in the cylinder using vtkCylinder, it doesn’t work. What is the best way to cut a hole in this case?
When I use cylinder1a.SetCenter(30 , 0 , 0); it creates a semicircle at the border i.e. cut at the border works. But inside it does not work.
I think you need to extrude the disc with resolution in z otherwise there won’t be vertices on the cylinder surface. (also, you can use vtkDiskSource you don’t need to cut a plane). E.g.:
Is the problem that the cylinder walls are “open” where they are cut? So you need the clipper to generate new polygons that seal the cut? That is a feature that vtkClipPolyData does not provide.
Thanks David. What one can achieve with vedo (and pyvista) is to quickly check/debug an idea without having to worry too much about renderers and interactors… then one can go back to the pure vtk to implement it in a more performant way.
E.g. trying to cap the holes:
I used vtkLinearExtrusionFilter with extrusion type as VectorExtrusion because I wanted to extrude along a particular vector. Now I will use vtkRotationalExtrusionFilter for the generation of vertices in the extrusion direction and then rotate the cylinder in the required direction.