PUZZLE Overview Image Plugin (9.0.0)

Download OpenAPI specification:Download

Changelog

Component Category Description
Overview Image Plugin 9.0.0 Dependency PUZZLE core version ${puzzle-core.version}.
Improvement Beta: Add additional REST endpoint POST /export/{jobId}.png that allows a Client to demand a customized graphic with a domain specific language
Dependency PUZZLE core version 49.2.0.
Overview Image Plugin 8.1.1 Dependency PUZZLE core version 49.2.0.
Bug The overview image plugin now does render in an linux environment.
Overview Image Plugin 7.1.0 Dependency PUZZLE core version 48.0.0.
Overview Image Plugin 7.0.0 Dependency PUZZLE core version 47.0.0.

Description

Plugin for PUZZLE, that allows a client to create an overview image for a job. The overview image is the composition of the images of the load of each solution of the job.

A client can define the color for the loading device and the colors of the sides of the items. Please see the PUZZLE REST API Documentation for details.

The following figure shows the overview images for all three examples:

Left: Overview image for the pallet example. Middle: Overview image for the carton example. Right: Overview image for the best-fit example

/export/{jobId}.png

Precondition: the state of the job is DONE.

Returns the overview image for the job in the PNG format with HTTP status code 200.

If you specify an unknown jobId, PUZZLE returns an error with HTTP status code 404 (see response samples for 404).

If the job does not have the state expected in the precondition, PUZZLE returns an error with HTTP status code 500 (see response samples for 500).

path Parameters
jobId
required
integer <int64> >= 1

The Id of the job.

Responses

Response samples

Content type
application/json
{
  • "errorMessage": "PUZZLE cannot find job with id 123",
  • "additionalInformation": "",
  • "errorClass": "de.fraunhofer.iml.puzzle.adapter.execution.Exceptions.Rest.PuzzleJobNotFoundException"
}

/export/{jobId}.png

Precondition: the state of the job is DONE.

Returns the overview image for the job in the PNG format with HTTP status code 200.

If you specify an unknown jobId, PUZZLE returns an error with HTTP status code 404 (see response samples for 404).

If the job does not have the state expected in the precondition, PUZZLE returns an error with HTTP status code 500 (see response samples for 500).

Graphic description

With the request body parameter graphicDescription the visualization of each solution can be configured. The following diagrams describe the structure of the DSL (domain specific language) that is used to do this.

  1. SCENE_TYPE describes what you will see (e.g. the whole load unit or just the load without loading device)
  2. There are several optional CONFIGURATIONS
    • If present configurations are indicated in round brackets
    • A flag to show a grid
    • A flag to show only the first layer
    • view defines one of the four corners or a top view
    • dimensions defines or hides arrows with dimension information of the specified SCENE_TYPE
    • texture defines or hides the text that is rendered on top of the packages

Syntax diagram of the graphic description
path Parameters
jobId
required
integer <int64> >= 1

The Id of the job.

Request Body schema: application/json
imageHeight
integer >= 1
Default: 1200

length of the image in pixel

imageWidth
integer >= 1
Default: 1200

width of the image in pixel

graphicDescription
required
string

The format of this value is specified by the DSL (domain specific language) that is described above.

solutionId
integer >= 1
Default: -1

The id of the solution to visualize. If no solution with the given id is present all solutions will be visualized.

Responses

Request samples

Content type
application/json
{
  • "imageHeight": 1200,
  • "imageWidth": 1200,
  • "graphicDescription": "loadUnit(grid, texture=number, dimensions=height, view=front)",
  • "solutionId": 1
}

Response samples

Content type
application/json
{
  • "errorMessage": "PUZZLE cannot find job with id 123",
  • "additionalInformation": "",
  • "errorClass": "de.fraunhofer.iml.puzzle.adapter.execution.Exceptions.Rest.PuzzleJobNotFoundException"
}