# Extract mesh surfaces from .STL files

**URL:** https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882
**Category:** ParaView Support
**Created:** [December 19, 2024, 11:11am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882 "2024-12-19T11:11:15Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 19, 2024, 11:11am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/1 "2024-12-19T11:11:15Z")

</div>

Hi there!

Very silly problem here. But unfortunately i haven’t founded any solutions yet. I aim to estimate the flow rate at some 2D-surfaces **internal** to my mesh (i.e no boundaries or inlet-outlet patch), using the filter _SurfaceFlow_. Could do it by taking different slices, but in this way it’s going to be too laborious.

I have instead the .STL files of these internal surfaces (made it by FreeCAD). Basically internal circular holes of my burner. Can i so extract surfaces from my computed mesh that coincide with my STL geometry? Following what method, in case?

Hope to have been clear enough.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 19, 2024, 12:11pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/2 "2024-12-19T12:11:00Z")

</div>

ResampleWithDataSet should be what you are looking for.

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 19, 2024, 12:47pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/3 "2024-12-19T12:47:46Z")

</div>

Thank you Matt! Unfortunately i’m not still be able to manage my issue. As you can see my internal surface (.STL, blue circle) is entirely contained in my mesh domain (grey region).

 ![first](https://discourse.paraview.org/uploads/default/original/2X/2/26ad0dc4295db30ae3c31beee905415332a39a15.png)

Then i apply as you have suggested the _ResampleWithDataSet_ command (hopefully in the right way):

![Screenshot from 2024-12-19 13-39-22](https://discourse.paraview.org/uploads/default/original/2X/1/1e51fe41f316f003cf926ca120b1b59a44ad05b3.png)  
 ![Screenshot from 2024-12-19 13-40-27](https://discourse.paraview.org/uploads/default/original/2X/1/137053e1d8b00f6519cc7cee6d7d32201f004b25.png)

Eventually it actually extracts my internal surface. But with no fluid data on it (and therefore i cannot estimate anything).

 ![Screenshot from 2024-12-19 13-41-11](https://discourse.paraview.org/uploads/default/original/2X/2/2224f04ad84b5bd26a22bfd5827c0f04c2d07ac2.png)

Surely i have made a trivial mistake. But i don’t see where.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 19, 2024, 12:48pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/4 "2024-12-19T12:48:25Z")

</div>

Please share your data

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 19, 2024, 12:49pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/5 "2024-12-19T12:49:43Z")

</div>

About what? Have i to upload my complete simulation?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 19, 2024, 12:51pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/6 "2024-12-19T12:51:05Z")

</div>

Yes, you can create an archive and share it on wetransfer.

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 19, 2024, 12:52pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/7 "2024-12-19T12:52:25Z")

</div>

What e-mail address? Should i pay for this service?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 19, 2024, 12:55pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/8 "2024-12-19T12:55:48Z")

</div>

[mathieu.westphal@kitware.com](mailto:mathieu.westphal@kitware.com) (but I dont think its needed). Its free up to 2G I think.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 19, 2024, 4:50pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/9 "2024-12-19T16:50:45Z")

</div>

I confirm that we cannot use ResampleWithDataSet with your volume.

However you can use Slice trivially since your stl is an axis-aligned plane. Just press `P` to position a Y-normaled slice.

Here is the resulting state file:  
[slice.pvsm](https://discourse.paraview.org/uploads/short-url/ilMxcDfSKQZ3n4fdIiQQDScEmUW.pvsm) (1014.4 KB)

 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/2fd0f5e2022f7335b7a3e29785cbff55bcdb088b.jpeg)

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 19, 2024, 5:02pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/10 "2024-12-19T17:02:09Z")

</div>

Gusp 😰! What i’ve posted before were just an example. I have to compute the flow rate for the holes of my burner crown (the circles in the middle):

 ![second](https://discourse.paraview.org/uploads/default/original/2X/5/54e20d0daa9963dfca94650aeaa3a291414b1ee5.png)

Is there a smart way to select one by one each of them?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 20, 2024, 8:13am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/11 "2024-12-20T08:13:26Z")

</div>

Sure, modify the threshold filter or add more threshold to select the right regions

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [December 23, 2024, 8:56pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/12 "2024-12-23T20:56:15Z")

</div>

Thank you very much Matthieu. Your suggestions are always gold, for each of us. Is it okay in your opinion if i manually select these circular surfaces with the command “Select cells on”? Or the “select points on” command instead?

I don’t know what choice could be better if i run “surfaceFlow” aftermath.

PS: merry Christmas to you and to your family!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 30, 2024, 9:20am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/13 "2024-12-30T09:20:31Z")

</div>

> [@Il\_Briga](#):
>
> “Select cells on”

Definitely “SelectCellsOn” here.

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [January 13, 2025, 11:52am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/14 "2025-01-13T11:52:08Z")

</div>

Thank you Mathieu, you are very kind. My last question (then i swear i close the topic), for these tangential holes the ‘surfaceFlow’ filter holds?

I really appreciate your help.

 ![Tangential_holes](https://discourse.paraview.org/uploads/default/original/2X/7/714dd384782022ec1a9a0ad85da566c1fb432368.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 14, 2025, 7:45am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/15 "2025-01-14T07:45:59Z")

</div>

> [@Il\_Briga](#):
>
> for these tangential holes the ‘surfaceFlow’ filter holds?

What is the question here ?

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [January 14, 2025, 10:01am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/16 "2025-01-14T10:01:31Z")

</div>

Hello Mathieu, you’re perfectly right, the question is quite unclear.

From the picture above you can see some holes whose normals are not aligned with the Cartesian coordinates - Y (i.e tangential injectors). If i apply the ‘surfaceFlow’ filter on these holes do i get some reasonable values of the volumetric flow rate? As far as i know the radial and tangential velocity components in polar coordinates are not calculated by default in Paraview.

Apologizes if i has gone off topic with this demand.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 14, 2025, 10:21am UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/17 "2025-01-14T10:21:14Z")

</div>

Im not really following the question, as you should first extract a 2D slice to compute flow on it.

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [January 16, 2025, 12:01pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/18 "2025-01-16T12:01:03Z")

</div>

Hi Mathieu,

Sorry for my late reply. This is the question indeed: does the surfaceFlow filter hold if i apply it on a 2D patch whose normal is not aligned with the three Cartesian directions?

Thanks really a lot!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 16, 2025, 12:24pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/19 "2025-01-16T12:24:32Z")

</div>

As fair as I understand,yes, as it use the cells surface for computation

---

<div class="post-metadata">

### Author: ![Il\_Briga](https://discourse.paraview.org/user_avatar/discourse.paraview.org/il_briga/32/14763_2.png) [@Il\_Briga](https://discourse.paraview.org/u/Il_Briga)
#### Post date: [January 16, 2025, 12:51pm UTC](https://discourse.paraview.org/t/extract-mesh-surfaces-from-stl-files/15882/20 "2025-01-16T12:51:44Z")

</div>

What a great help have you provided me! Thank you and have a good week!
