@jetta/blocks-allocator 0.2.1 → 0.2.3-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetta/blocks-allocator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3-0",
|
|
4
4
|
"description": "Blocks wall allocation library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"license": "ISC",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@jetta/axle-load-calculator": "^0.4.1",
|
|
44
|
-
"@jetta/empty-spaces-manager": "^0.1.2
|
|
44
|
+
"@jetta/empty-spaces-manager": "^0.1.2",
|
|
45
45
|
"@jetta/item-amount-controller": "0.1.0-0",
|
|
46
46
|
"@jetta/logger": "^2.0.1",
|
|
47
47
|
"@jetta/lp-framework": "2.1.0-6",
|
|
48
|
-
"@jetta/number-compare": "^3.0.
|
|
48
|
+
"@jetta/number-compare": "^3.0.3",
|
|
49
49
|
"@jetta/stacking-constraints": "^1.1.0",
|
|
50
|
-
"@jetta/tie-ratio-block-creator-core": "1.2.2
|
|
50
|
+
"@jetta/tie-ratio-block-creator-core": "^1.2.2",
|
|
51
51
|
"@jetta/z-intersected-block-creator": "^0.0.1-42",
|
|
52
52
|
"@jettacargo/single-item-block-creator-core": "2.0.1-0",
|
|
53
53
|
"@jettacargo/spiral-block-creator-core": "2.1.2",
|
|
@@ -25,6 +25,12 @@ function create_config()
|
|
|
25
25
|
config.allocate_remainder_as_partial_blocks = true
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
const length_tolerance_m = Config.tie_ratio_length_tolerance_m()
|
|
29
|
+
if (length_tolerance_m !== undefined)
|
|
30
|
+
{
|
|
31
|
+
config.length_tolerance_m = length_tolerance_m
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
return config
|
|
29
35
|
}
|
|
30
36
|
|
|
@@ -414,6 +414,21 @@ class Cargo_Profile
|
|
|
414
414
|
return str_to_bool(this.#instance[key], false)
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
/**
|
|
418
|
+
* Length tolerance in meters for a tie-ratio pair.
|
|
419
|
+
* Undefined keeps the creator default of 0.005 m.
|
|
420
|
+
* @returns {number|undefined}
|
|
421
|
+
*/
|
|
422
|
+
static tie_ratio_length_tolerance_m()
|
|
423
|
+
{
|
|
424
|
+
if (Cargo_Profile.#instance === null)
|
|
425
|
+
{
|
|
426
|
+
return undefined
|
|
427
|
+
}
|
|
428
|
+
const key = 'allocation.blocks.tie_ratio.length_tolerance_m'
|
|
429
|
+
return non_negative_length_tolerance_m(this.#instance[key])
|
|
430
|
+
}
|
|
431
|
+
|
|
417
432
|
static stack_loose_on_tie_ratio_blocks()
|
|
418
433
|
{
|
|
419
434
|
if (Cargo_Profile.#instance === null)
|
|
@@ -457,4 +472,18 @@ class Cargo_Profile
|
|
|
457
472
|
}
|
|
458
473
|
}
|
|
459
474
|
|
|
475
|
+
/**
|
|
476
|
+
* @param {unknown} raw
|
|
477
|
+
* @returns {number|undefined}
|
|
478
|
+
*/
|
|
479
|
+
function non_negative_length_tolerance_m(raw)
|
|
480
|
+
{
|
|
481
|
+
const value = optional_finite_float_from_string_or_number(raw)
|
|
482
|
+
if (value === undefined || value < 0)
|
|
483
|
+
{
|
|
484
|
+
return undefined
|
|
485
|
+
}
|
|
486
|
+
return value
|
|
487
|
+
}
|
|
488
|
+
|
|
460
489
|
module.exports = Cargo_Profile
|