surfaces.factories.coating_factory

Coating Factory Module

This module contains the CoatingFactory class, which is responsible for generating an appropriate coating instance given an input configuration. The class ensures that coatings are properly assigned based on material properties and optical requirements.

Kramer Harrison, 2025

Classes

CoatingFactory()

Factory class for creating coating instances.

class CoatingFactory[source]

Factory class for creating coating instances.

This class provides a method for generating coatings based on user-defined parameters. It supports both predefined coating instances and dynamically generated coatings based on material interactions.

create_coating(coating
str | BaseCoating, material_pre: BaseMaterial,

material_post: BaseMaterial) -> BaseCoating | None:

Creates a coating instance based on the given input.

static create(coating: str | BaseCoating, material_pre: BaseMaterial, material_post: BaseMaterial) BaseCoating | None[source]

Creates a coating instance based on the given input.

Parameters:
  • coating (str | BaseCoating) – The coating specification. It can be either a string indicating a predefined coating type or an instance of BaseCoating.

  • material_pre (BaseMaterial) – The material before the surface.

  • material_post (BaseMaterial) – The material after the surface.

Returns:

A coating instance if applicable, otherwise None.

Return type:

BaseCoating | None