Dear experts,
I have a 3D domain in the form of a tube (see the following figure). I would like to know if there is a way to extract the outer boundary of my tube and show it in the form of a rectangular 2D surface. This will help a lot in demonstrating my results.
mwestphal
(Mathieu Westphal (Kitware))
September 15, 2022, 11:37am
2
Hi @mohsen.rock ,
A screenshot of what you want to do would be nice.
Maybe FeatureEdges ?
Hi @mwestphal
Thanks for the quick response. Here is a sketch of what I would like to do (sorry for the awful drawing).
mwestphal
(Mathieu Westphal (Kitware))
September 15, 2022, 11:50am
4
You are looking for a Silhouette filter, sadly none have been integrated in ParaView yet. You can find an (old) discussion about it here: [Paraview] Contribution : Silhouette edges filter
Indeed, very sad. Thank you anyway.
spyridon97
(Spiros Tsalikis (Kitware))
September 16, 2022, 1:36pm
6
It just needs to be exposed in ParaView? I see https://vtk.org/doc/nightly/html/classvtkPolyDataSilhouette.html . If yes, @cory.quammen would you like me to do that?
cory.quammen
(Cory Quammen (Kitware))
September 16, 2022, 1:44pm
7
Correct me if I am wrong, but this looks like you want to unwrap the cylinder, i.e., cut it down its length and then flatten it out.
mwestphal
(Mathieu Westphal (Kitware))
September 16, 2022, 1:57pm
8
Maybe ? I’m not entirely sure.
@spyridon97 my understanding is that this filter needs access to the camera, which ParaView cant provide.
Yes exactly. I managed to do it by using the calculator and transforming the coordinates of the tube outer surface into a rectangular plane.
1 Like
roland
(roland)
September 22, 2022, 10:41am
10
Hi @mohsen.rock ,
In this post I explain my steps whenever I need to unwrap cylinder. Maybe it is of use to you too.
Can it be that your surface is folded back on it self because you use an atan function instead of atan2?
I don’t know if atan2 is available now, but it wasn’t before, so I used to calculate it myself with a Calculator filter:
if(coordsX>0,atan(coordsY/coordsX), if(coordsX<0, if(coordsY<0,atan(coordsY/coordsX)-4*atan(1),atan(coordsY/coordsX) +4 *atan(1)), if(coordsY>0, 2 *atan(1), if(coordsY<0, -2 *atan(1),0))))
Then apply a [-pi, pi] threshold on the resulting angle (which I called theta).
…
Kind regards,
Roland