ModelValidator
- class pyslm.geometry.ModelValidator
Bases:
object
ModelValidator takes the data structures in pyslm.geometry such as a list of
Layer
andModel
and validates their input for consistency when utilised together to form a machine build file prior to exporting using libSLM. Basic consistency checks include:Validating each
BuildStyle
used in eachModel
, including individual laser parametersReferences to a correct
BuildStyle
via its (bid
) for eachLayerGeometry
includedReferences to a correct
Model
via its (mid
) for eachLayerGeometry
includedEnsure there are unique
BuildStyle
entries for eachModel
included
The key function that can be called is
validateBuild()
, which is recommened to be called before attempting to export the layer and model information to a libSLM machine build file translator. Additional sub-functions are also available for checking specific objects used to construct the build-file.Methods Summary
validateBuild
(models, layers)Validates an AM Build which compromises of a list of models and layers
validateBuildStyle
(bstyle)Validates a single
BuildStyle
ensuring that its individual parameters are not malformed.validateModel
(model)Validates a single
Model
ensuring that its individual BuildStyles are not malformed.Methods Documentation
- static validateBuild(models, layers)
Validates an AM Build which compromises of a list of models and layers
- static validateBuildStyle(bstyle)
Validates a single
BuildStyle
ensuring that its individual parameters are not malformed.- Parameters:
bstyle (
BuildStyle
) – The BuildStyle to validate- Raises:
Exception – When an invalid BuildStyle is provided