The downloads.py module#

Summary#

MaterialTuningExampleInputFiles

Container for the example material tuning process inputs.

CustomMaterialExampleFiles

Holds the files associated with a custom material definition.

delete_downloads

Delete all downloaded examples to free space or update the files.

decompress

Decompress a ZIP file to the examples directory.

download_10mm_cube

Download an STL file describing a 10-millimeter cube.

download_small_wedge_slm_build_file

Download an SLM build file for a small wedge part.

download_material_tuning_input

Download the input files for the material tuning example.

download_custom_material

Download the files describing a custom material.

EXAMPLES_URI

URI for the example data repository.

PARTS_FOLDER

Folder containing example parts.

BUILD_FILES_FOLDER

Folder containing example build files.

MATERIAL_TUNING_FOLDER

Folder containing example material tuning input files.

CUSTOM_MATERIAL_FOLDER

Folder containing example custom material data files.

Description#

Provides functions for downloading sample datasets from the PyAdditive repository.

Module detail#

downloads.delete_downloads()#

Delete all downloaded examples to free space or update the files.

downloads.decompress(filename, subdir=None) str#

Decompress a ZIP file to the examples directory.

Parameters:
filenamestr

Name of the file.

subdirstr, None

Name of the subdirectory of the examples directory to extract the ZIP file contents to. The default is None.

Returns:
str

Path to the decompressed contents of the ZIP file.

downloads.download_10mm_cube()#

Download an STL file describing a 10-millimeter cube.

downloads.download_small_wedge_slm_build_file()#

Download an SLM build file for a small wedge part.

downloads.download_material_tuning_input() MaterialTuningExampleInputFiles#

Download the input files for the material tuning example.

downloads.download_custom_material() CustomMaterialExampleFiles#

Download the files describing a custom material.

downloads.EXAMPLES_URI = 'https://github.com/ansys/example-data/raw/master'#

URI for the example data repository.

downloads.PARTS_FOLDER = 'pyadditive/part-only'#

Folder containing example parts.

downloads.BUILD_FILES_FOLDER = 'pyadditive/buildfiles'#

Folder containing example build files.

downloads.MATERIAL_TUNING_FOLDER = 'pyadditive/material_tuning_input'#

Folder containing example material tuning input files.

downloads.CUSTOM_MATERIAL_FOLDER = 'pyadditive/custom_material_data'#

Folder containing example custom material data files.