aboutsummaryrefslogtreecommitdiff
path: root/schemas/opcut.yaml
blob: 8dadb93c774068f7282bd331447d4137bdbf2c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
"$schema": "http://json-schema.org/schema#"
id: "opcut://opcut.yaml#"
definitions:
    params:
        type: object
        description: |
            calculation input parameters independent of calculation method
        required:
            - cut_width
            - panels
            - items
        properties:
            cut_width:
                type: number
                description: |
                    width of the guillotine cut
            min_initial_usage:
                type: boolean
                description: |
                    minimize usage of initial panels
            panels:
                type: object
                description: |
                    input panels (keys represent unique panel identifiers)
                patternProperties:
                    ".+":
                        "$ref": "opcut://opcut.yaml#/definitions/panel"
            items:
                type: object
                description: |
                    required items (keys represent unique item identifiers)
                patternProperties:
                    ".+":
                        "$ref": "opcut://opcut.yaml#/definitions/item"
    result:
        type: object
        description: |
            calculation result
        required:
            - params
            - used
            - unused
        properties:
            params:
                "$ref": "opcut://opcut.yaml#"
            used:
                type: array
                description: |
                    resulting panels associated with required items
                items:
                    "$ref": "opcut://opcut.yaml#/definitions/used"
            unused:
                type: array
                description: |
                    resulting unused panels
                items:
                    "$ref": "opcut://opcut.yaml#/definitions/unused"
    panel:
        type: object
        description: |
            single input panel
        required:
            - width
            - height
        properties:
            width:
                type: number
                description: |
                    panel's initial width
            height:
                type: number
                description: |
                    panel's initial height
    item:
        type: object
        description: |
            single required item
        required:
            - width
            - height
            - can_rotate
        properties:
            width:
                type: number
                description: |
                    items's width
            height:
                type: number
                description: |
                    items's height
            can_rotate:
                type: boolean
                description: |
                    can item be rotated (is grain direction irrelevant)
    used:
        type: object
        description: |
            single resulting panels associated with required item
        required:
            - panel
            - item
            - x
            - y
            - rotate
        properties:
            panel:
                type: string
                description: |
                    input panel identifier
            item:
                type: string
                description: |
                    matching required item identifier
            x:
                type: number
                description: |
                    used panel location based on input panel's width offset
            y:
                type: number
                description: |
                    used panel location based on input panel's height offset
            rotate:
                type: boolean
                description: |
                    is resulting panel rotated
    unused:
        type: object
        description: |
            single unused resulting panel
        required:
            - panel
            - width
            - height
            - x
            - y
        properties:
            panel:
                type: string
                description: |
                    input panel identifier
            width:
                type: number
                description: |
                    unused resulting panel's width
            height:
                type: number
                description: |
                    unused resulting panel's height
            x:
                type: number
                description: |
                    used panel location based on input panel's width offset
            y:
                type: number
                description: |
                    used panel location based on input panel's height offset
...