kitchen-simulator 5.0.0-test.66 → 5.0.0-test.68
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 +1 -1
- package/src/_KitchenConfigurator.jsx +1 -1
- package/src/catalog/factories/wall-factory-3d.js +1 -1
- package/src/catalog/properties/property-lenght-measure.jsx +1 -1
- package/src/catalog/properties/property-length-measure.jsx +1 -1
- package/src/catalog/properties/property-length-measure_hole.jsx +1 -1
- package/src/catalog/utils/exporter.js +1 -1
- package/src/catalog/utils/item-loader.jsx +1 -1
- package/src/class/item.js +1 -1
- package/src/components/viewer2d/area.jsx +1 -1
- package/src/components/viewer2d/grids/grid-horizontal-streak.jsx +1 -1
- package/src/components/viewer2d/grids/grid-streak.jsx +1 -1
- package/src/components/viewer2d/grids/grid-vertical-streak.jsx +1 -1
- package/src/components/viewer2d/item.jsx +1 -1
- package/src/components/viewer2d/ruler.jsx +1 -1
- package/src/components/viewer2d/rulerDist.jsx +1 -1
- package/src/components/viewer2d/viewer2d.jsx +1 -1
- package/src/components/viewer3d/ruler-utils/itemRect.jsx +91 -91
- package/src/components/viewer3d/ruler-utils/layer3D.jsx +528 -528
- package/src/components/viewer3d/ruler-utils/scene3D.jsx +1 -1
- package/src/components/viewer3d/scene-creator.js +1 -1
- package/src/components/viewer3d/viewer3d.jsx +1 -1
- package/src/models.js +1 -1
- package/src/reducers/viewer2d-reducer.js +1 -1
- package/src/reducers/viewer3d-reducer.js +1 -1
- package/src/utils/geometry.js +2 -2
- package/src/utils/graph-inner-cycles.js +1 -1
- package/src/utils/helper.js +1 -1
- package/src/utils/molding.js +973 -973
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ import { isElevationView } from '../../../src/utils/helper';
|
|
|
15
15
|
|
|
16
16
|
import * as SharedStyle from '../../shared-style';
|
|
17
17
|
import { LINE_THICKNESS, UNIT_CENTIMETER } from '../../constants';
|
|
18
|
-
import convert from 'convert-units';
|
|
18
|
+
import * as convert from 'convert-units';
|
|
19
19
|
import ThreeBSP from '../../utils/threeCSG.es6';
|
|
20
20
|
|
|
21
21
|
const params = {
|
package/src/class/item.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import polylabel from 'polylabel';
|
|
4
4
|
import areapolygon from 'area-polygon';
|
|
5
|
-
import convert from 'convert-units';
|
|
5
|
+
import * as convert from 'convert-units';
|
|
6
6
|
import { formatNumber } from '../../utils/math';
|
|
7
7
|
import { DECIMAL_PLACES_2 } from '../../constants';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { List } from 'immutable';
|
|
4
|
-
import convert from 'convert-units';
|
|
4
|
+
import * as convert from 'convert-units';
|
|
5
5
|
|
|
6
6
|
export default function GridHorizontalStreak({ width, height, grid }) {
|
|
7
7
|
let step = grid.properties.get('step');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { List } from 'immutable';
|
|
4
|
-
import convert from 'convert-units';
|
|
4
|
+
import * as convert from 'convert-units';
|
|
5
5
|
|
|
6
6
|
export default function GridStreak({ width, height, grid }) {
|
|
7
7
|
let step = grid.properties.get('step');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { List } from 'immutable';
|
|
4
|
-
import convert from 'convert-units';
|
|
4
|
+
import * as convert from 'convert-units';
|
|
5
5
|
|
|
6
6
|
export default function GridVerticalStreak({ width, height, grid }) {
|
|
7
7
|
let step = grid.properties.get('step');
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import * as PropTypes from 'prop-types';
|
|
4
4
|
import RulerDist from './rulerDist';
|
|
5
|
-
import convert from 'convert-units';
|
|
5
|
+
import * as convert from 'convert-units';
|
|
6
6
|
import { GeometryUtils } from '../../utils/export';
|
|
7
7
|
import { MODE_ROTATING_ITEM, WALL_CABINET_LAYOUTPOS } from '../../constants';
|
|
8
8
|
import { returnReplaceableDeepSearchType } from './utils';
|
|
@@ -23,7 +23,7 @@ import * as SharedStyle from '../../shared-style';
|
|
|
23
23
|
import { RulerX, RulerY } from './export';
|
|
24
24
|
import { GeometryUtils } from '../../utils/export';
|
|
25
25
|
import FormNumberInput from '../../components/style/form-number-input';
|
|
26
|
-
import convert from 'convert-units';
|
|
26
|
+
import * as convert from 'convert-units';
|
|
27
27
|
import { Map } from 'immutable';
|
|
28
28
|
import { formatNumber } from '../../../src/utils/math';
|
|
29
29
|
import { isEmpty } from '../../utils/helper';
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
MODE_BACK_ELEVATION_VIEW,
|
|
4
|
-
MODE_FRONT_ELEVATION_VIEW,
|
|
5
|
-
MODE_LEFT_ELEVATION_VIEW,
|
|
6
|
-
MODE_RIGHT_ELEVATION_VIEW
|
|
7
|
-
} from '../../../constants';
|
|
8
|
-
import convert from 'convert-units';
|
|
9
|
-
|
|
10
|
-
export default function ItemRect({
|
|
11
|
-
scene,
|
|
12
|
-
layer,
|
|
13
|
-
calcrect,
|
|
14
|
-
v0,
|
|
15
|
-
v1,
|
|
16
|
-
mode,
|
|
17
|
-
frontRect,
|
|
18
|
-
scale,
|
|
19
|
-
sideFlag
|
|
20
|
-
}) {
|
|
21
|
-
const { rect } = calcrect;
|
|
22
|
-
const { x: x0, y: y0 } = v0;
|
|
23
|
-
const { x: x1, y: y1 } = v1;
|
|
24
|
-
|
|
25
|
-
const translateY =
|
|
26
|
-
frontRect.height / 2 -
|
|
27
|
-
convert(Math.abs(calcrect.itemInfo.properties.altitude._length))
|
|
28
|
-
.from(calcrect.itemInfo.properties.altitude._unit)
|
|
29
|
-
.to(layer.unit) *
|
|
30
|
-
scale;
|
|
31
|
-
let translateX = -frontRect.width / 2;
|
|
32
|
-
|
|
33
|
-
const itemWidth =
|
|
34
|
-
convert(calcrect.size.width).from(scene.unit).to(layer.unit) * scale;
|
|
35
|
-
const itemDepth =
|
|
36
|
-
convert(calcrect.size.depth).from(scene.unit).to(layer.unit) * scale;
|
|
37
|
-
const itemHeight =
|
|
38
|
-
convert(calcrect.size.height).from(scene.unit).to(layer.unit) * scale;
|
|
39
|
-
|
|
40
|
-
switch (mode) {
|
|
41
|
-
case MODE_FRONT_ELEVATION_VIEW:
|
|
42
|
-
case MODE_BACK_ELEVATION_VIEW:
|
|
43
|
-
translateX +=
|
|
44
|
-
convert(Math.abs(rect[3].x - x0))
|
|
45
|
-
.from(scene.unit)
|
|
46
|
-
.to(layer.unit) * scale;
|
|
47
|
-
break;
|
|
48
|
-
case MODE_RIGHT_ELEVATION_VIEW:
|
|
49
|
-
case MODE_LEFT_ELEVATION_VIEW:
|
|
50
|
-
translateX +=
|
|
51
|
-
convert(Math.abs(rect[3].y - y1))
|
|
52
|
-
.from(scene.unit)
|
|
53
|
-
.to(layer.unit) * scale;
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
let dimension;
|
|
58
|
-
switch (sideFlag) {
|
|
59
|
-
case 0:
|
|
60
|
-
dimension = (
|
|
61
|
-
<polygon
|
|
62
|
-
points={`0,0 0,-${itemHeight} ${itemWidth},-${itemHeight} ${itemWidth},0`}
|
|
63
|
-
fill="none"
|
|
64
|
-
stroke="black"
|
|
65
|
-
/>
|
|
66
|
-
);
|
|
67
|
-
break;
|
|
68
|
-
case 1:
|
|
69
|
-
dimension = (
|
|
70
|
-
<polygon
|
|
71
|
-
points={`0,0 0,-${itemHeight} ${itemDepth},-${itemHeight} ${itemDepth},0`}
|
|
72
|
-
fill="none"
|
|
73
|
-
stroke="black"
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
76
|
-
break;
|
|
77
|
-
case 2:
|
|
78
|
-
dimension = (
|
|
79
|
-
<polygon
|
|
80
|
-
points={`0,0 0,-${itemHeight} -${itemDepth},-${itemHeight} -${itemDepth},0`}
|
|
81
|
-
fill="none"
|
|
82
|
-
stroke="black"
|
|
83
|
-
/>
|
|
84
|
-
);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<g transform={`translate(${translateX}, ${translateY})`}>{dimension}</g>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
MODE_BACK_ELEVATION_VIEW,
|
|
4
|
+
MODE_FRONT_ELEVATION_VIEW,
|
|
5
|
+
MODE_LEFT_ELEVATION_VIEW,
|
|
6
|
+
MODE_RIGHT_ELEVATION_VIEW
|
|
7
|
+
} from '../../../constants';
|
|
8
|
+
import * as convert from 'convert-units';
|
|
9
|
+
|
|
10
|
+
export default function ItemRect({
|
|
11
|
+
scene,
|
|
12
|
+
layer,
|
|
13
|
+
calcrect,
|
|
14
|
+
v0,
|
|
15
|
+
v1,
|
|
16
|
+
mode,
|
|
17
|
+
frontRect,
|
|
18
|
+
scale,
|
|
19
|
+
sideFlag
|
|
20
|
+
}) {
|
|
21
|
+
const { rect } = calcrect;
|
|
22
|
+
const { x: x0, y: y0 } = v0;
|
|
23
|
+
const { x: x1, y: y1 } = v1;
|
|
24
|
+
|
|
25
|
+
const translateY =
|
|
26
|
+
frontRect.height / 2 -
|
|
27
|
+
convert(Math.abs(calcrect.itemInfo.properties.altitude._length))
|
|
28
|
+
.from(calcrect.itemInfo.properties.altitude._unit)
|
|
29
|
+
.to(layer.unit) *
|
|
30
|
+
scale;
|
|
31
|
+
let translateX = -frontRect.width / 2;
|
|
32
|
+
|
|
33
|
+
const itemWidth =
|
|
34
|
+
convert(calcrect.size.width).from(scene.unit).to(layer.unit) * scale;
|
|
35
|
+
const itemDepth =
|
|
36
|
+
convert(calcrect.size.depth).from(scene.unit).to(layer.unit) * scale;
|
|
37
|
+
const itemHeight =
|
|
38
|
+
convert(calcrect.size.height).from(scene.unit).to(layer.unit) * scale;
|
|
39
|
+
|
|
40
|
+
switch (mode) {
|
|
41
|
+
case MODE_FRONT_ELEVATION_VIEW:
|
|
42
|
+
case MODE_BACK_ELEVATION_VIEW:
|
|
43
|
+
translateX +=
|
|
44
|
+
convert(Math.abs(rect[3].x - x0))
|
|
45
|
+
.from(scene.unit)
|
|
46
|
+
.to(layer.unit) * scale;
|
|
47
|
+
break;
|
|
48
|
+
case MODE_RIGHT_ELEVATION_VIEW:
|
|
49
|
+
case MODE_LEFT_ELEVATION_VIEW:
|
|
50
|
+
translateX +=
|
|
51
|
+
convert(Math.abs(rect[3].y - y1))
|
|
52
|
+
.from(scene.unit)
|
|
53
|
+
.to(layer.unit) * scale;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let dimension;
|
|
58
|
+
switch (sideFlag) {
|
|
59
|
+
case 0:
|
|
60
|
+
dimension = (
|
|
61
|
+
<polygon
|
|
62
|
+
points={`0,0 0,-${itemHeight} ${itemWidth},-${itemHeight} ${itemWidth},0`}
|
|
63
|
+
fill="none"
|
|
64
|
+
stroke="black"
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
break;
|
|
68
|
+
case 1:
|
|
69
|
+
dimension = (
|
|
70
|
+
<polygon
|
|
71
|
+
points={`0,0 0,-${itemHeight} ${itemDepth},-${itemHeight} ${itemDepth},0`}
|
|
72
|
+
fill="none"
|
|
73
|
+
stroke="black"
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
break;
|
|
77
|
+
case 2:
|
|
78
|
+
dimension = (
|
|
79
|
+
<polygon
|
|
80
|
+
points={`0,0 0,-${itemHeight} -${itemDepth},-${itemHeight} -${itemDepth},0`}
|
|
81
|
+
fill="none"
|
|
82
|
+
stroke="black"
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<g transform={`translate(${translateX}, ${translateY})`}>{dimension}</g>
|
|
90
|
+
);
|
|
91
|
+
}
|