Convert doxygen to rst for UM3NetworkPrinting

This commit is contained in:
Nino van Hooff 2020-05-15 15:05:38 +02:00
parent de82406782
commit 5eb5ffd916
38 changed files with 797 additions and 487 deletions

View file

@ -9,29 +9,35 @@ from cura.PrinterOutput.Models.MaterialOutputModel import MaterialOutputModel
from ..BaseModel import BaseModel
## Class representing a cloud cluster printer configuration
class ClusterPrinterConfigurationMaterial(BaseModel):
"""Class representing a cloud cluster printer configuration"""
## Creates a new material configuration model.
# \param brand: The brand of material in this print core, e.g. 'Ultimaker'.
# \param color: The color of material in this print core, e.g. 'Blue'.
# \param guid: he GUID of the material in this print core, e.g. '506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9'.
# \param material: The type of material in this print core, e.g. 'PLA'.
def __init__(self, brand: Optional[str] = None, color: Optional[str] = None, guid: Optional[str] = None,
material: Optional[str] = None, **kwargs) -> None:
"""Creates a new material configuration model.
:param brand: The brand of material in this print core, e.g. 'Ultimaker'.
:param color: The color of material in this print core, e.g. 'Blue'.
:param guid: he GUID of the material in this print core, e.g. '506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9'.
:param material: The type of material in this print core, e.g. 'PLA'.
"""
self.guid = guid
self.brand = brand
self.color = color
self.material = material
super().__init__(**kwargs)
## Creates a material output model based on this cloud printer material.
#
# A material is chosen that matches the current GUID. If multiple such
# materials are available, read-only materials are preferred and the
# material with the earliest alphabetical name will be selected.
# \return A material output model that matches the current GUID.
def createOutputModel(self) -> MaterialOutputModel:
"""Creates a material output model based on this cloud printer material.
A material is chosen that matches the current GUID. If multiple such
materials are available, read-only materials are preferred and the
material with the earliest alphabetical name will be selected.
:return: A material output model that matches the current GUID.
"""
container_registry = ContainerRegistry.getInstance()
same_guid = container_registry.findInstanceContainersMetadata(GUID = self.guid)
if same_guid: