Skip to content

Commit e2a45ff

Browse files
committed
Providing sample data
1 parent 2f69578 commit e2a45ff

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following publications have been produced as part of the Parametric Rock Mas
1717

1818

1919
## Supplementary data
20-
Due to size limitations on Github, large data has to be moved to other repositories. Two external datasets are currently connected to the repository:
20+
Due to size limitations on Github, large data has to be moved to other repositories. Exemplary sample data from PDD1 sample with ID 151763271961 can be found in the folder 'sample_data'. Two external datasets are currently connected to the repository:
2121

2222
- The original **Parametric Discontinuity Dataset 1 (PDD1)**: the dataset was created as part of Erharter (2024). It consists of 5000 meshes that comprise synthetic rock mass models in the form of 10 x 10 x 10 m cubes with discontinuities. It can be found on *Zenodo* under this link: https://doi.org/10.5281/zenodo.15835130
2323
- The **raster models of PDD1** that were created as part of Erharter and Elmo (2025). All 5000 models of PDD1 were rastered at resolutions of 0.25, 0.2, 0.15, 0.1 and 0.05 m. Total = 25 000 rasters. The dataset can be found on *Zenodo* under this link: https://doi.org/10.5281/zenodo.15570244
@@ -36,6 +36,7 @@ Parametric_Rockmass_Studies
3636
│ ├── PDD1_0.xlsx - result excel file containing input parameters for PDD1 generation from Erharter (2024) and compiled Grasshopper analyses
3737
│ ├── PDD1_1.xlsx - result excel file extended from PDD1_0.xlsx that also contains basic voxel data parameters
3838
│ ├── PDD1_2.xlsx - final result excel file extended from PDD1_1.xlsx that also contains advanced complexity analyses parameters
39+
├── sample_data - folder with exemplary synthetic rock mass models as meshes
3940
├── src - folder with Python scripts
4041
│ ├── A_compiler.py - Script that compiles the recorded data from samples of the discrete discontinuity networks and creates excel files PDD1_0.xlsx and PDD1_1.xlsx for further processing.
4142
│ ├── B_analyzer.py - Script that processes the compiled records of the discrete discontinuity dataset, computes additional and complexity parameters. Output: PDD1_2.xlsx
55 MB
Binary file not shown.
2.54 MB
Binary file not shown.

src/D_Voxel_export.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@
88
Script that saves a mesh of a rastered sample. For visualization purposes only.
99
"""
1010

11+
import os
12+
1113
import trimesh
1214

13-
RESOLUTIONS = [0.25, 0.2, 0.15, 0.1, 0.05] # 3D grid resolution
15+
SAMPLE = 151763271961 # sample with ID to process
16+
RESOLUTIONS = [0.25, 0.2, 0.15, 0.1, 0.05] # 3D voxel resolution
17+
18+
# get the directory where the current python file is
19+
script_dir = os.path.dirname(os.path.abspath(__file__))
1420

15-
sample = 151763271961
1621

1722
for resolution in RESOLUTIONS:
18-
fp = fr"..\combinations\{sample}_discontinuities.stl"
23+
fp = os.path.abspath(os.path.join(script_dir, '..', fr'sample_data\{SAMPLE}_discontinuities.stl'))
1924
discontinuity_mesh = trimesh.load_mesh(fp)
2025
discontinuity_voxels = discontinuity_mesh.voxelized(pitch=resolution)
2126
voxel_mesh = discontinuity_voxels.as_boxes()
22-
voxel_mesh.export(fr'..\output\{sample}_{resolution}_voxel_mesh.stl')
27+
fp = os.path.abspath(os.path.join(script_dir, '..', fr'sample_data\{SAMPLE}_{resolution}_voxel_mesh.stl'))
28+
voxel_mesh.export(fp)

0 commit comments

Comments
 (0)