ModelValidator

class pyslm.geometry.ModelValidator

Bases: object

ModelValidator takes the pyslm.geometry data structures such as a list of Layer and Model and validates their input for consistency when utilised together to form a build file prior to exporting using libSLM. Basic checks include:

The key function that can be called is validateBuild() which ideally should 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

Parameters:
  • models (List[Model]) – A list of Model used in the build

  • layers (List[Layer]) – A list of Layer used in the build

Raises:

Exception – When an invalid BuildStyle is provided

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

static validateModel(model)

Validates a single Model ensuring that its individual BuildStyles are not malformed.

Parameters:

model (Model) – The Model to validate

Raises:

Exception – When an invalid BuildStyle is provided