Metadata-Version: 2.5
Name: trytond_print3d_ultimaker
Version: 8.0.0.4
Summary: Ultimaker material profiles module of the print3d 3D printing management group
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: 3d printing,guid,material,profile,tryton,ultimaker
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: trytond-party<8.1,>=8.0
Requires-Dist: trytond-print3d-filament<8.1,>=8.0
Requires-Dist: trytond-print3d<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Ultimaker Hardware, Connector and Materials
===========================================

The ``print3d_ultimaker`` module holds the Ultimaker side of a print3d
deployment: the hardware of an S-series printer, the connector of its local
API and the vendor data of a filament material.  It extends the registry of
the printers of the ``print3d`` core with the print cores, the material
positions and the connector of the machine, the vendor neutral material
profile of ``print3d_filament`` with the setting keys and the print
profiles the Ultimaker material database carries, and the registry of the
spool tags of ``print3d_filament`` with the layout of the NFC tags the
Material Station reads.

Features
--------

- **Print cores**: a print core is a component of the printer of type
  ``print_core``, extended with the core type - an AA, a BB or a CC core -
  and the hours it has fed, which is the service life counter the
  maintenance module of the group reads.
- **Material positions**: ``print3d.ultimaker.material.station.bay`` is a
  place of the machine that holds one spool.  It is either a bay of a
  Material Station - a component of the printer of type
  ``material_station`` that carries six of them, named by the *Station* of
  the position and a slot from 1 to 6 - or the external spool holder at the
  back of the machine, which belongs to no station and is the slot ``0``.
  A spool is assigned to a position from either side - the *Position* field
  of the spool moves it into the position - and the assignment is refused
  when the machine can not print the spool: one of another diameter than
  the filament the print cores take, or a support material on a machine
  that carries no BB core.
- **Printer configuration**: the printer form of the core gains a
  *Configuration* page that shows the material positions with the material,
  the colour and the remaining length of the spool each of them holds, the
  print cores of the machine and the materials the positions are configured
  for.
- **Local API connector**: the connector of the module drives an S-series
  printer over its local ``/api/v1`` API.  It authenticates with the
  Digital Factory user of the machine, reads the state, the job, the print
  cores, the material station and the system back into the core, drives the
  print job and the maintenance, and downloads the image of the camera.
  The connector is named in the ``connector`` selection of a printer and
  registered in the registry of the group, so the registry of the printers
  never depends on the module that talks to them.
- **Position sync and reconciliation**: a poll writes what the machine
  reports about a position - the material, the colour, the length and the
  state - beside the stock of the spool it holds and never over it.  A
  spool the printer, its tag and its stock record disagree about is flagged
  with a material, a colour and a length drift, and the *Reconcile* action
  weighs the spool in from the length the printer reports, booking what the
  weighing took from the spool as a correction.
- **Camera**: the image the camera of the machine answers with is
  downloaded on a schedule, attached to the printer as
  ``print3d.ultimaker.printer.image`` and pruned by the retention of the
  printer, so a print stays answerable from the frames that were taken
  while it ran.
- **Setting keys**: ``print3d.ultimaker.material.setting.key`` is one entry
  of the material database, named as the database spells it (``print
  temperature``, ``retraction amount``) and typed as a material setting or
  a CURA setting.  The two are separate namespaces of the database, tagged
  ``setting`` and ``cura:setting``, so the type and the key together are
  what identifies a key.
- **Settings**: ``print3d.ultimaker.material.setting`` is the value of one
  key for one material.  The value applies either to the material itself, to
  a machine the material is printed on, or to one hotend of that machine, as
  the database carries a machine independent block, a block per machine
  product and a block per hotend of a product.  The value is kept as text,
  because the database mixes numbers, ``yes``/``no`` flags and lists of
  points in the same element.
- **Material profiles**: the material form of the filament stock gains an
  *Ultimaker* page with the family the database files the profile under, the
  version of the profile it was imported from, and its settings.
- **Spool tags**: the registry of the NFC tags of the spools gains the
  format ``ultimaker_ntag213``, which is the layout the community tool
  *Spool-Maker* writes and the Material Station of an S-series printer
  reads.  The image of the tag is four NDEF records - the material of the
  spool, a signature, and the quantities twice - written raw from the
  fourth page of the memory of the tag and padded to a whole number of
  pages: 228 bytes, that is 57 pages.  It is larger than the 144 bytes of
  user memory an NTAG213 carries, so a spool tag is written on an NTAG216,
  which is the tag Spool-Maker asks for.
- **Import**: *Import Materials* reads the official Ultimaker material
  files, one ``*.fdm_material`` per material, from the path of a file or of
  the whole directory of the database.  It takes the vendor neutral profile
  of each file into ``print3d.filament.material``, the settings into
  ``print3d.ultimaker.material.setting``, and matches a material by its
  GUID: a GUID that is already known updates the record, or is skipped when
  updating is off, and a GUID that is not is created.  A file that can not
  be imported is written to the log of the result and does not stop the run.

Dependencies
------------

- Tryton modules: ``ir``, ``res``, ``party``, ``print3d``, ``print3d_filament``.

``party`` is required because a material names the brand that made it, and
the brand of a profile is created as a party by the import when it is not
known.  ``print3d`` is required because the hardware of the machine extends
the registry of the printers and the print cores of the core and the
connector of the module implements the connector framework, and
``print3d_filament`` because the vendor data of a material extends the
material profile and a position holds a spool.  The filament stock itself
depends on no module of the group: a deployment may keep the spools without
a printer being configured.

Models
------

- ``print3d.printer.component`` (extended): the component registry of the
  core, with the core type and the feed hours of a print core and the bays
  of a Material Station.
- ``print3d.printer`` (extended): the printer of the core, with the bays,
  the print cores and the configured materials of the machine, the firmware
  and the maintenance state the connector reads, and the camera settings
  and the images of the machine.
- ``print3d.filament.spool`` (extended): the spool of the filament stock,
  with the material position it sits in.
- ``print3d.ultimaker.material.station.bay``: one material position - a bay
  of a Material Station or the external spool holder - with the spool it
  holds, what the printer reported about it and the drift between the two.
- ``print3d.ultimaker.printer.image``: one image the camera of a printer
  answered with, kept until the retention of the printer drops it.
- ``print3d.filament.material`` (extended): the profile of the filament
  stock, with the Ultimaker family, the profile version and the settings.
- ``print3d.ultimaker.material.setting.key``: one entry of the material
  database.
- ``print3d.ultimaker.material.setting``: the value of one key for one
  material, in the scope it applies to.
- ``print3d.filament.spool.tag`` (extended): the registry of the NFC tags
  of the spools, with the ``ultimaker_ntag213`` format and the codec that
  reads and writes it.

Security
--------

- ``group_print3d_ultimaker``: the read-only group.  It browses the
  printers, the components, the material positions, the camera images, the
  profiles, the keys and the settings but does not change them.
- ``group_print3d_ultimaker_admin``: full control over the module, including
  the printer components the hardware is recorded in, the material positions
  of a Material Station, the camera of a printer, the material form of the
  filament stock the settings are written through and the import of the
  material database.
- The administration of the deployment (``res.group_admin``) is offered the
  screens as well, but not the write permissions of the module.

Documentation
-------------

The full documentation of the module is in ``doc/index.rst``, under
*Ultimaker Hardware, Connector and Materials*.
