Slicing with a Cone

Dear Paraview users,

First of all I would like to point out that I am a beginner in Paraview, therefore please excuse my lack of depth in the field.

I am dealing with a vtk file which contains the (x, y, z) components of a current density vectorial field that is defined within a rectangular box. What I would like to do is to slice that input data, not with a plane or the other available slice types, but with a Cone strategically placed.
The actual set of data is pretty heavy, so in order to illustrate my problem, I built a dummy set of data:

Let’s assume that the dots represent a component of the current density field within space. In a nutshell I am trying to extract the components of that field that lie on the surface of the Cone.
I am a bit puzzled on to how to attack this problem properly. I did try a few things around the Resample to Dataset filter but without any success.

Any advice or help is welcome !

Hello,

If you really want to sample the field data onto a cylinder, the cylinder filled with isotropic mesh would be preferable. However, creating an isotropic mesh in ParaView is somewhat difficult. So, an easy way is to firstly make the cylinder isotropically refined with external tools like
instant-meshes. Then load it into ParaView and perform resampling operation.

For your reference I attached a cylinder mesh and state file:
map_to_cone.zip (96.7 KB)

Hi Kenichiro,

Thank you for your answer !
I will sure give it a try as it seems pretty straightforward.

I have an extra question at this stage :

  • As it is very unlikely that the two meshes coincide perfectly, what will happen during the resampling operation ?
    => Case 1: Certain nodes of the cone’s mesh do not have any data point from the input field that fall onto it.
    => Case 2: The contrary, that is to say a data point from the field is present on the Cone’s theoretical surface but does not coincide with a node of the Cone’s mesh.

I am sorry if my questions seem naive. It is actually yet unclear to me of what happens during the resampling operaton.

Hello Yannick,

The answer is Case 1. The Resampling operation is mainly based on some of the interpolation methods.

Incidentally, could you tell me what type of data set is in vtk file? If the vtk data is 3D volume mesh such as vtkRectilinearGrid, vtkStructuredGrid, or vtkUnstructuredGrid, you can use the “Resample To DataSet” filter to resample the 3D volume onto a cone surface by means of the linear interpolation. If data is a point cloud, you would need to apply the “Point Dataset Interpolator” filter to interpolate point cloud to the cone surface.

Hello Kenichiro,

Thank you for your answer.
I have to admit that I am not entirely sure of the exact vtk file type.
The fact is that :

  • First a 3D simulator produces a .dis file containing various physical field, including the current
  • Then a conversion of that .dis file is done in order to produce a .vtk file to allow an analysis of the physical fields through Paraview. However I do not know which type of vtk file is actually produced.

In order to check, what should I do ? Maybe it is as simple as checking the vtk file itself, the information being possibly written in the headers (though for disk space management reasons, the vtk files are systematically removed once the analysis has been carried out, which I can obviously deal with by altering slightly the main code handling the whole procedure) ?

Hello Yannick,

I’m sorry I didn’t explain it enough.

Would you take a look at the information tab? In the statistics box, the data type will be shown.

Hi Kenichiro,

Sorry for my late reply.
After checking the file, it appears to be an UnstructuredGrid vtk file, therefore based on your previous message I can apply a “Resample to DataSet” filter in principle.
Again, thanks for your inputs, it really helps.