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#

class downloads.MaterialTuningExampleInputFiles(experiment_data_file: str, material_configuration_file: str, thermal_properties_lookup_file: str, characteristic_width_lookup_file: str)#

Container for the example material tuning process inputs.

Parameters:
experiment_data_filestr

Path to the experiment data file (CSV).

material_configuration_filestr

Path to the material configuration file (JSON).

thermal_properties_lookup_filestr

Path to the thermal properties lookup file (CSV).

characteristic_width_lookup_filestr

Path to the characteristic width lookup file (CSV).

Overview#

experiment_data_file

Path to the experiment data file (CSV).)

material_configuration_file

Path to the material configuration file (JSON).

thermal_properties_lookup_file

Path to the thermal properties lookup file (CSV).

characteristic_width_lookup_file

Path to the characteristic width lookup file (CSV).

Import detail#

from ansys.additive.core.examples.downloads import MaterialTuningExampleInputFiles

Property detail#

property MaterialTuningExampleInputFiles.experiment_data_file#

Path to the experiment data file (CSV).)

property MaterialTuningExampleInputFiles.material_configuration_file#

Path to the material configuration file (JSON).

property MaterialTuningExampleInputFiles.thermal_properties_lookup_file#

Path to the thermal properties lookup file (CSV).

property MaterialTuningExampleInputFiles.characteristic_width_lookup_file#

Path to the characteristic width lookup file (CSV).

class MaterialTuningExampleInputFiles.CustomMaterialExampleFiles(material_configuration_file: str, thermal_properties_lookup_file: str, characteristic_width_lookup_file: str)#

Holds the files associated with a custom material definition.

Parameters:
material_configuration_filestr

Path to the material configuration file.

thermal_properties_lookup_filestr

Path to the thermal properties lookup file.

characteristic_width_lookup_filestr

Path to the characteristic width lookup file.

Overview#

material_configuration_file

Path to the material configuration file.

thermal_properties_lookup_file

Path to the thermal properties lookup file.

characteristic_width_lookup_file

Path to the characteristic width lookup file.

Import detail#

from ansys.additive.core.examples.downloads import CustomMaterialExampleFiles

Property detail#

property CustomMaterialExampleFiles.material_configuration_file#

Path to the material configuration file.

property CustomMaterialExampleFiles.thermal_properties_lookup_file#

Path to the thermal properties lookup file.

property CustomMaterialExampleFiles.characteristic_width_lookup_file#

Path to the characteristic width lookup file.

CustomMaterialExampleFiles.delete_downloads()#

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

CustomMaterialExampleFiles.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.

CustomMaterialExampleFiles.download_10mm_cube()#

Download an STL file describing a 10-millimeter cube.

CustomMaterialExampleFiles.download_small_wedge_slm_build_file()#

Download an SLM build file for a small wedge part.

CustomMaterialExampleFiles.download_material_tuning_input() MaterialTuningExampleInputFiles#

Download the input files for the material tuning example.

CustomMaterialExampleFiles.download_custom_material() CustomMaterialExampleFiles#

Download the files describing a custom material.

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

URI for the example data repository.

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

Folder containing example parts.

CustomMaterialExampleFiles.BUILD_FILES_FOLDER = 'pyadditive/buildfiles'#

Folder containing example build files.

CustomMaterialExampleFiles.MATERIAL_TUNING_FOLDER = 'pyadditive/material_tuning_input'#

Folder containing example material tuning input files.

CustomMaterialExampleFiles.CUSTOM_MATERIAL_FOLDER = 'pyadditive/custom_material_data'#

Folder containing example custom material data files.