CutContext
The cut-context instance.
#CutContext()
Please use the Engine .getCutContext() method to instantiate.
#.clearup()
Clear the drawing data of the cut view
Kind: instance method of CutContext
Returns: void - returns nothing
#.dispose()
Safely release memory when you don’t need this instance
Kind: instance method of CutContext
Returns: void - returns nothing
#.draw(prod)
Draw the roll cut info of the specified product
Kind: instance method of CutContext
Returns: void - returns nothing
| Param | Type | Description |
|---|---|---|
| prod | String | Product id |
| estArea | String | optional tab shape id, or phase name. (only works when estimate by tab or by phase) |
#.getRollCutList(prod)
Get the roll cut sheet info of the specified product
Kind: instance method of CutContext
Returns: Array | null - returns the roll cut info (see RollEstimateResult) or null
| Param | Type | Description |
|---|---|---|
| prod | String | Product id |
example:
[
{
"estArea": "Default*",
"rolls": [
{
"label": "#1",
"length": "150'0\"",
"rollCuts": [
{
"label": "A",
"length": "7'9\"",
"pieceCuts": [
{
"label": "A.1",
"size": ["13'6\"", "7'9\""],
"shapeLabel": "Rm1"
}
]
}
]
}
]
}
]
#.getRootNode()
Get the root node about cut view
Kind: instance method of CutContext
Returns: HTMLDivElement - returns the root node
#.refresh()
Redraw the cut view
Kind: instance method of CutContext
Returns: void - returns nothing
#.resize()
Fit the size and redraw
Kind: instance method of CutContext
Returns: void - returns nothing
#RollEstimateResult : Object
The roll cut information
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| estArea | String |
tab shape id, or phase name | |
| rolls | Array |
[] |
used Roll list |
#Roll : Object
The used roll information
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| label | String |
roll label | |
| length | String |
roll length | |
| rollCuts | Array |
[] |
the RollCut list |
#RollCut : Object
The roll cut info in one roll
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| label | String |
roll cut label | |
| length | String |
roll cut length | |
| pieceCuts | Array |
[] |
the PieceCut list |
#PieceCut : Object
The piece cut info in one roll cut
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| label | String |
piece cut label | |
| size | Array |
[] |
piece cut size, the first item is width ,the second item is height |
| shapeLabel | String |
owner shape's name, to mark which room it is in |