Skip to main content

surface-roughness

Surface roughness is a library that processes 3D surface STL data and produces oriented roughness metrics.

Citation

If you wish to use this work, please cite this paper according to CITATION.cff.

Installation

Installation is completed by

pip install surface-roughness

Usage

Roughness mapping

from surface_roughness import Surface, SampleWindow, roughness_map

# Load Surface STL File into Python
surface = Surface(path="example_surface.stl")

# Specify SampleWindow parameters
w = SampleWindow(is_circle=True,radius=2) # in units of STL mesh

# Generate roughness map object based on method presented in Magsipoc & Grasselli (2023) with parameters
map = roughness_map(
    surface,        # surface object required to interact with library
    'delta_t',      # Method for analyzing roughness
    w,              # SampleWindow object
    0.5,            # Distance between windows in mesh units
    1               # Number of vertices for mesh facet to be included in window sampling
    )

# Start subsampling process
map.sample()

# Evaluate roughness of subsamples
map.evaluate()

# Analyze directional roughness statistics
map.analyze_directional_roughness('delta_t')
map.analyze_directional_roughness('delta*_t')

# Pickle map to save analysis (optional)
with ('example_surface_r2_s0.5.pickle','wb') as f:
    pickle.dump(map, f)

# Save data to VTK for visualization
map.to_vtk('example_surface_r2_s0.5','delta_t')

Directional Roughness

from surface_roughness import Surface
import matplotlib.pyplot as plt     # For plotting graphs

surface = Surface('example_surface.stl')

# Calculate roughness from Tatone and Grasselli (2009) doi: 10.1063/1.3266964
surface.evaluate_thetamax_cp1()
az = surface.thetamax_cp1('az') # Get azimuth correlating with analysis
thetamaxcp1_roughness = surface.thetamax_cp1('thetamax_cp1')

# Plot surface roughness
plt.figure()
plt.polar(az,thetamaxcp1_roughness,label=r'$\theta^*_{max}/(C+1)$')
plt.legend()

# Calculate roughness from Babanouri and Karami Nasab (2017) doi: 10.1007/s00603-016-1139-1
surface.evaluate_delta_t()
az_t = s.delta_t('az')
delta_t = s.delta_t('delta_t')

az_a = s.delta_a('az')
delta_a = s.delta_a('delta_a')

az_n = s.delta_n('az')
delta_n = s.delta_n('delta_n')


plt.figure()
plt.polar(az_t,delta_t,label='$\Delta_T$')
plt.polar(az_a,delta_a,label='$\Delta_A$')
plt.polar(az_n,delta_n,label='$\Delta_N$')
plt.legend()

License

MIT

Metadata

Release files for surface-roughness 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for surface-roughness 0.0.3
File Size Uploaded
surface_roughness-0.0.3.tar.gz 37.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for surface-roughness 0.0.3
File
surface_roughness-0.0.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
surface_roughness-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
surface_roughness-0.0.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
surface_roughness-0.0.3-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
surface_roughness-0.0.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
surface_roughness-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
surface_roughness-0.0.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
surface_roughness-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
surface_roughness-0.0.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
surface_roughness-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
surface_roughness-0.0.3-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
surface_roughness-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
surface_roughness-0.0.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
surface_roughness-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
surface_roughness-0.0.3-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
surface_roughness-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details

Total release size: 4.7 MB

Release files / surface_roughness-0.0.3.tar.gz

Download URL surface_roughness-0.0.3.tar.gz
Size 37.7 kB
Tags Source
SHA-256 checksum
How to use checksums
68d3fa00fdb1987a046263c5c9e9e8dbe59c50b9c75cb9877d2ab5992e2052c3
BLAKE2b-256 checksum
How to use checksums
42f60e9523094983c6ab0fa4b2668fdb341c38ab5fd3decac40c34d4a2f63672
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp312-cp312-win_amd64.whl

Download URL surface_roughness-0.0.3-cp312-cp312-win_amd64.whl
Size 239.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c1176473473ae16a0a3240279e247024b1d0fd332b5d7e868089e5750d1dd0b8
BLAKE2b-256 checksum
How to use checksums
b262119ec7a8cd7f80b3cb207a453a5f3ee4de45a2b6f2d356abefe3ae72ef81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL surface_roughness-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 383.1 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
01d38d2747f694fa2656eb8f6efa889ef2c8476cbec6d3769bcead5355740355
BLAKE2b-256 checksum
How to use checksums
f20fd6aa6679fff0dedcc0930ce608e9f83b35b1a311675a14067e288d29f32f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL surface_roughness-0.0.3-cp312-cp312-macosx_11_0_arm64.whl
Size 263.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ee1be8143c1f4f710d00d13680677217988abb29526e6a0da4701dd9234e980a
BLAKE2b-256 checksum
How to use checksums
82d155b4c7743cf79bdc49d8a0fbacb6d166091bad3ec14b744f1e5946050b76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp312-cp312-macosx_10_9_x86_64.whl

Download URL surface_roughness-0.0.3-cp312-cp312-macosx_10_9_x86_64.whl
Size 289.8 kB
Tags CPython 3.12 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
1b383a8360b96453b79b3021ca478a1aa6f7a0587994515eea34e187c15999b2
BLAKE2b-256 checksum
How to use checksums
67465f0f914b87341f362e223d249432dc6460dfc9877b2c1f5c58519cc56978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp311-cp311-win_amd64.whl

Download URL surface_roughness-0.0.3-cp311-cp311-win_amd64.whl
Size 239.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
128dccfc837c0ea81c146a55268baac11ff76798e6fb610e45c23369fdecf18a
BLAKE2b-256 checksum
How to use checksums
45b9a674c655eee0061fe411e15e56521db8f2f51ca364cfe383a3857421af23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL surface_roughness-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 382.9 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
89747959b5c611a6625fdee7c9aaeff6e3e6ab2a073680572cc6889f078c3e9b
BLAKE2b-256 checksum
How to use checksums
a5fd78ead0ee646f00ccdfaf86b75793fe8042684e17a73578b5e8f4232a3281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL surface_roughness-0.0.3-cp311-cp311-macosx_11_0_arm64.whl
Size 262.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e3d1f2712bb19f70f88911fd4d892f2b72f6d9aa88f1239a7b1eeaa9b5df010b
BLAKE2b-256 checksum
How to use checksums
ec5e112141ec6dc4604e144a967e76a57e22df612fddbc4248ee3ebefd4a0ea3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl

Download URL surface_roughness-0.0.3-cp311-cp311-macosx_10_9_x86_64.whl
Size 289.4 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
efe2ee0b490811b21762ec5dd7e54f3146281c266d42140f5c08b40acd680b69
BLAKE2b-256 checksum
How to use checksums
2341001fe81e8b590f161be0af67eade19bedcec28b8a8a45700c11c0c09781e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp310-cp310-win_amd64.whl

Download URL surface_roughness-0.0.3-cp310-cp310-win_amd64.whl
Size 238.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
01077b0126bae0c5d50741c134c16de0fed8ddfe9298e39377e1ac026b2ae84e
BLAKE2b-256 checksum
How to use checksums
dee83dbc403aa9138d9dc10e6106e6d1f5d5e7b13332f49ed5f194b0763879c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL surface_roughness-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 382.2 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
092b2364fef54edcf741829861e779eb78a4457f7f1ca2a5cb194590f73443bd
BLAKE2b-256 checksum
How to use checksums
062acc9d2657166093d15b995d64150fb2d991dccbd5623f1bd89895209f4594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp310-cp310-macosx_11_0_arm64.whl

Download URL surface_roughness-0.0.3-cp310-cp310-macosx_11_0_arm64.whl
Size 261.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9fc750d9bf7d004cbb7ee9ad8d08d99e4b01904d3d68268e3799c758852967cf
BLAKE2b-256 checksum
How to use checksums
486760e0f009c9fa72f8b2cecabb4099d5bde368f139d4e26eaf59a8f86a6713
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl

Download URL surface_roughness-0.0.3-cp310-cp310-macosx_10_9_x86_64.whl
Size 287.9 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
269ba1054b20b32bd4df68bcff3ee6a150a7c15b2465bc58565032e1c7d5d126
BLAKE2b-256 checksum
How to use checksums
731e21aae2941b842789f5f3cb07a8a198617c90976f9bbbe3227ea4b0c11ede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp39-cp39-win_amd64.whl

Download URL surface_roughness-0.0.3-cp39-cp39-win_amd64.whl
Size 236.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
c0189a5069e807938e917a7b3449af12366f44ad7094dec82a399c49b8fa4c7e
BLAKE2b-256 checksum
How to use checksums
3b43ae9e746e693f0eaf5128c99bf312413eee6ed902b168e7a961cc32c78a78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL surface_roughness-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 382.3 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b2086183b10fba637234969ee9351fcfd53bd03c0d67a180c8099f1a80e36ebf
BLAKE2b-256 checksum
How to use checksums
d7750728739c353d0fb5411f1ae31e46d4814fd030e2829a38f69e81cecf7785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp39-cp39-macosx_11_0_arm64.whl

Download URL surface_roughness-0.0.3-cp39-cp39-macosx_11_0_arm64.whl
Size 261.5 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8d483dba6bd89a3973c2a2847b87185cbf11397f148224faf8e677e0958f0080
BLAKE2b-256 checksum
How to use checksums
87a16b0691e85153986b9c91fac83e236dc0113d64299739919986c383a96fb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / surface_roughness-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl

Download URL surface_roughness-0.0.3-cp39-cp39-macosx_10_9_x86_64.whl
Size 287.9 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d3255f45d950b14863a87bad483cb8f9143efe9db23ff988c3145b23eafba075
BLAKE2b-256 checksum
How to use checksums
0935f69bd805d616bdf7fa9725c223ddec8fabc9ae23f68ad4d841f946eba8d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

17 release files

0.0.2

19 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page