# Measuring Cross-Sectional Area of Slice

**URL:** https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099
**Category:** ParaView Support
**Created:** [April 28, 2021, 6:38pm UTC](https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099 "2021-04-28T18:38:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bears](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ee59a6/32.png) [@Bears](https://discourse.paraview.org/u/Bears)
#### Post date: [April 28, 2021, 6:38pm UTC](https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099/1 "2021-04-28T18:38:56Z")

</div>

Hello All,

I have exported surface meshes from ITK-snap and am trying to measure the cross-sectional area of an arbitrary slice. This is a surface mesh so there is no interior points, so when taking a slice only the external surface of the mesh remains, leaving a continuous boundary. Is there a way I can measure the area enclosed by the boundary?

When I apply the ‘IntegrateVariables’ filter and switch to CellData I am only given the length of the line that represents the boundary. The cross sections are arbitrarily shaped.

Thanks!  
Bears

---

<div class="post-metadata">

### Author: ![Devin\_Pettigrew](https://discourse.paraview.org/user_avatar/discourse.paraview.org/devin_pettigrew/32/6419_2.png) [@Devin\_Pettigrew](https://discourse.paraview.org/u/Devin_Pettigrew)
#### Post date: [May 17, 2021, 10:30pm UTC](https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099/2 "2021-05-17T22:30:03Z")

</div>

Interestingly I would like to measure the boundary of an object from a head-on view (cross-sectional perimeter). I used the tutorial found here to measure the cross-sectional area: [How to determine the coefficient drag in Paraview - Fluid Flow / CFD - SimScale CAE Forum](https://www.simscale.com/forum/t/how-to-determine-the-coefficient-drag-in-paraview/64753)

@Bears that might help you.

Say I want to measure the perimeter, how do I extract just the boundary and measure its length?

---

<div class="post-metadata">

### Author: ![Bears](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ee59a6/32.png) [@Bears](https://discourse.paraview.org/u/Bears)
#### Post date: [September 9, 2021, 4:57pm UTC](https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099/4 "2021-09-09T16:57:51Z")

</div>

Hey Guys,

Thanks for the advice @Devin_Pettigrew!

@frothiestbike I ended up exporting the 2D slices in an STL format and then writing a Matlab script to calculate the cross-sectional area. In my case, I was able to align the model so that the area calculations were a little easier. For a generic orientation, the Matlab script becomes more complex but still do able. Hope that helps!

---

<div class="post-metadata">

### Author: ![JosephCranfill](https://discourse.paraview.org/user_avatar/discourse.paraview.org/josephcranfill/32/9496_2.png) [@JosephCranfill](https://discourse.paraview.org/u/JosephCranfill)
#### Post date: [June 23, 2022, 12:10am UTC](https://discourse.paraview.org/t/measuring-cross-sectional-area-of-slice/7099/5 "2022-06-23T00:10:12Z")

</div>

@Bears

Hello,  
Is there any way you would share your Matlab script with me @Bears. I am trying to design a Matlab script that takes an STL file and takes 2d slices of it while calculating the cross-sectional area of each slice. I would then use the cross-sectional area to calculate the torsional rigidity of any STL file. Any help in how you wrote the Matlab script would be helpful.

Thanks
