kitchen-simulator 5.0.0-test.3 → 5.0.0-test.4
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/es/KitchenConfigurator.js +1 -1
- package/es/KitchenConfigurator.js.map +1 -1
- package/package.json +8 -12
- package/src/KitchenConfigurator.jsx +1 -1
- package/lib/@history.js +0 -11
- package/lib/@history.js.map +0 -1
- package/lib/AppContext.js +0 -11
- package/lib/AppContext.js.map +0 -1
- package/lib/KitchenConfigurator.js +0 -1353
- package/lib/KitchenConfigurator.js.map +0 -1
- package/lib/KitchenConfiguratorApp.js +0 -539
- package/lib/KitchenConfiguratorApp.js.map +0 -1
- package/lib/actions/area-actions.js +0 -22
- package/lib/actions/area-actions.js.map +0 -1
- package/lib/actions/export.js +0 -44
- package/lib/actions/export.js.map +0 -1
- package/lib/actions/groups-actions.js +0 -108
- package/lib/actions/groups-actions.js.map +0 -1
- package/lib/actions/holes-actions.js +0 -141
- package/lib/actions/holes-actions.js.map +0 -1
- package/lib/actions/items-actions.js +0 -365
- package/lib/actions/items-actions.js.map +0 -1
- package/lib/actions/lines-actions.js +0 -98
- package/lib/actions/lines-actions.js.map +0 -1
- package/lib/actions/project-actions.js +0 -333
- package/lib/actions/project-actions.js.map +0 -1
- package/lib/actions/scene-actions.js +0 -44
- package/lib/actions/scene-actions.js.map +0 -1
- package/lib/actions/user-actions.js +0 -69
- package/lib/actions/user-actions.js.map +0 -1
- package/lib/actions/vertices-actions.js +0 -36
- package/lib/actions/vertices-actions.js.map +0 -1
- package/lib/actions/viewer2d-actions.js +0 -74
- package/lib/actions/viewer2d-actions.js.map +0 -1
- package/lib/actions/viewer3d-actions.js +0 -33
- package/lib/actions/viewer3d-actions.js.map +0 -1
- package/lib/catalog/areas/area/planner-element.js +0 -47
- package/lib/catalog/areas/area/planner-element.js.map +0 -1
- package/lib/catalog/catalog.js +0 -283
- package/lib/catalog/catalog.js.map +0 -1
- package/lib/catalog/factories/area-factory-3d.js +0 -192
- package/lib/catalog/factories/area-factory-3d.js.map +0 -1
- package/lib/catalog/factories/area-factory.js +0 -90
- package/lib/catalog/factories/area-factory.js.map +0 -1
- package/lib/catalog/factories/export.js +0 -26
- package/lib/catalog/factories/export.js.map +0 -1
- package/lib/catalog/factories/wall-factory-3d.js +0 -213
- package/lib/catalog/factories/wall-factory-3d.js.map +0 -1
- package/lib/catalog/factories/wall-factory.js +0 -279
- package/lib/catalog/factories/wall-factory.js.map +0 -1
- package/lib/catalog/holes/door-closet/planner-element.js +0 -232
- package/lib/catalog/holes/door-closet/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-double/planner-element.js +0 -325
- package/lib/catalog/holes/door-double/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-exterior/planner-element.js +0 -225
- package/lib/catalog/holes/door-exterior/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-interior/planner-element.js +0 -237
- package/lib/catalog/holes/door-interior/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-panic/planner-element.js +0 -513
- package/lib/catalog/holes/door-panic/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-panic-double/planner-element.js +0 -473
- package/lib/catalog/holes/door-panic-double/planner-element.js.map +0 -1
- package/lib/catalog/holes/door-sliding/planner-element.js +0 -235
- package/lib/catalog/holes/door-sliding/planner-element.js.map +0 -1
- package/lib/catalog/holes/doorway-framed/planner-element.js +0 -155
- package/lib/catalog/holes/doorway-framed/planner-element.js.map +0 -1
- package/lib/catalog/holes/doorway-frameless/planner-element.js +0 -114
- package/lib/catalog/holes/doorway-frameless/planner-element.js.map +0 -1
- package/lib/catalog/holes/window-clear/planner-element.js +0 -176
- package/lib/catalog/holes/window-clear/planner-element.js.map +0 -1
- package/lib/catalog/holes/window-cross/planner-element.js +0 -175
- package/lib/catalog/holes/window-cross/planner-element.js.map +0 -1
- package/lib/catalog/holes/window-double-hung/planner-element.js +0 -313
- package/lib/catalog/holes/window-double-hung/planner-element.js.map +0 -1
- package/lib/catalog/holes/window-vertical/planner-element.js +0 -286
- package/lib/catalog/holes/window-vertical/planner-element.js.map +0 -1
- package/lib/catalog/lines/wall/planner-element.js +0 -77
- package/lib/catalog/lines/wall/planner-element.js.map +0 -1
- package/lib/catalog/molding/molding-dcm/planner-element.js +0 -39
- package/lib/catalog/molding/molding-dcm/planner-element.js.map +0 -1
- package/lib/catalog/molding/molding-fbm/planner-element.js +0 -39
- package/lib/catalog/molding/molding-fbm/planner-element.js.map +0 -1
- package/lib/catalog/molding/molding-lrm/planner-element.js +0 -39
- package/lib/catalog/molding/molding-lrm/planner-element.js.map +0 -1
- package/lib/catalog/properties/export.js +0 -82
- package/lib/catalog/properties/export.js.map +0 -1
- package/lib/catalog/properties/property-checkbox.js +0 -79
- package/lib/catalog/properties/property-checkbox.js.map +0 -1
- package/lib/catalog/properties/property-color.js +0 -47
- package/lib/catalog/properties/property-color.js.map +0 -1
- package/lib/catalog/properties/property-enum.js +0 -63
- package/lib/catalog/properties/property-enum.js.map +0 -1
- package/lib/catalog/properties/property-hidden.js +0 -27
- package/lib/catalog/properties/property-hidden.js.map +0 -1
- package/lib/catalog/properties/property-lenght-measure.js +0 -109
- package/lib/catalog/properties/property-lenght-measure.js.map +0 -1
- package/lib/catalog/properties/property-length-measure.js +0 -93
- package/lib/catalog/properties/property-length-measure.js.map +0 -1
- package/lib/catalog/properties/property-length-measure_hole.js +0 -109
- package/lib/catalog/properties/property-length-measure_hole.js.map +0 -1
- package/lib/catalog/properties/property-number.js +0 -56
- package/lib/catalog/properties/property-number.js.map +0 -1
- package/lib/catalog/properties/property-read-only.js +0 -34
- package/lib/catalog/properties/property-read-only.js.map +0 -1
- package/lib/catalog/properties/property-string.js +0 -56
- package/lib/catalog/properties/property-string.js.map +0 -1
- package/lib/catalog/properties/property-toggle.js +0 -47
- package/lib/catalog/properties/property-toggle.js.map +0 -1
- package/lib/catalog/properties/shared-property-style.js +0 -21
- package/lib/catalog/properties/shared-property-style.js.map +0 -1
- package/lib/catalog/utils/FuseUtils.js +0 -89
- package/lib/catalog/utils/FuseUtils.js.map +0 -1
- package/lib/catalog/utils/exporter.js +0 -156
- package/lib/catalog/utils/exporter.js.map +0 -1
- package/lib/catalog/utils/geom-utils.js +0 -206
- package/lib/catalog/utils/geom-utils.js.map +0 -1
- package/lib/catalog/utils/item-loader.js +0 -1534
- package/lib/catalog/utils/item-loader.js.map +0 -1
- package/lib/catalog/utils/load-obj.js +0 -100
- package/lib/catalog/utils/load-obj.js.map +0 -1
- package/lib/catalog/utils/mtl-loader.js +0 -360
- package/lib/catalog/utils/mtl-loader.js.map +0 -1
- package/lib/catalog/utils/obj-loader.js +0 -479
- package/lib/catalog/utils/obj-loader.js.map +0 -1
- package/lib/class/FuseUtils.js +0 -89
- package/lib/class/FuseUtils.js.map +0 -1
- package/lib/class/area.js +0 -151
- package/lib/class/area.js.map +0 -1
- package/lib/class/export.js +0 -97
- package/lib/class/export.js.map +0 -1
- package/lib/class/group.js +0 -446
- package/lib/class/group.js.map +0 -1
- package/lib/class/guide.js +0 -68
- package/lib/class/guide.js.map +0 -1
- package/lib/class/hole.js +0 -935
- package/lib/class/hole.js.map +0 -1
- package/lib/class/item.js +0 -1894
- package/lib/class/item.js.map +0 -1
- package/lib/class/layer.js +0 -673
- package/lib/class/layer.js.map +0 -1
- package/lib/class/line.js +0 -1296
- package/lib/class/line.js.map +0 -1
- package/lib/class/project.js +0 -829
- package/lib/class/project.js.map +0 -1
- package/lib/class/vertex.js +0 -272
- package/lib/class/vertex.js.map +0 -1
- package/lib/components/atoms/Snackbar/index.js +0 -57
- package/lib/components/atoms/Snackbar/index.js.map +0 -1
- package/lib/components/atoms/radio-button/index.js +0 -33
- package/lib/components/atoms/radio-button/index.js.map +0 -1
- package/lib/components/atoms/radio-button/styles.js +0 -12
- package/lib/components/atoms/radio-button/styles.js.map +0 -1
- package/lib/components/button/MainButton.js +0 -98
- package/lib/components/button/MainButton.js.map +0 -1
- package/lib/components/button/ToggleMeasureButton.js +0 -63
- package/lib/components/button/ToggleMeasureButton.js.map +0 -1
- package/lib/components/catalog-view/catalog-breadcrumb.js +0 -61
- package/lib/components/catalog-view/catalog-breadcrumb.js.map +0 -1
- package/lib/components/catalog-view/catalog-item.js +0 -233
- package/lib/components/catalog-view/catalog-item.js.map +0 -1
- package/lib/components/catalog-view/catalog-list.js +0 -189
- package/lib/components/catalog-view/catalog-list.js.map +0 -1
- package/lib/components/catalog-view/catalog-page-item.js +0 -137
- package/lib/components/catalog-view/catalog-page-item.js.map +0 -1
- package/lib/components/catalog-view/catalog-turn-back-page-item.js +0 -113
- package/lib/components/catalog-view/catalog-turn-back-page-item.js.map +0 -1
- package/lib/components/configurator/custom-configurator.js +0 -101
- package/lib/components/configurator/custom-configurator.js.map +0 -1
- package/lib/components/configurator/project-configurator.js +0 -138
- package/lib/components/configurator/project-configurator.js.map +0 -1
- package/lib/components/content.js +0 -132
- package/lib/components/content.js.map +0 -1
- package/lib/components/export.js +0 -90
- package/lib/components/export.js.map +0 -1
- package/lib/components/firstsetting/button/styles.js +0 -34
- package/lib/components/firstsetting/button/styles.js.map +0 -1
- package/lib/components/firstsetting/export.js +0 -16
- package/lib/components/firstsetting/export.js.map +0 -1
- package/lib/components/firstsetting/firstsetting-content-button.js +0 -224
- package/lib/components/firstsetting/firstsetting-content-button.js.map +0 -1
- package/lib/components/firstsetting/firstsetting-toggle-button.js +0 -133
- package/lib/components/firstsetting/firstsetting-toggle-button.js.map +0 -1
- package/lib/components/firstsetting/firstsetting.js +0 -633
- package/lib/components/firstsetting/firstsetting.js.map +0 -1
- package/lib/components/footerbar/button/ControlButton.js +0 -79
- package/lib/components/footerbar/button/ControlButton.js.map +0 -1
- package/lib/components/footerbar/button/DirectionButton.js +0 -76
- package/lib/components/footerbar/button/DirectionButton.js.map +0 -1
- package/lib/components/footerbar/button/DirectionPanSpinButton.js +0 -57
- package/lib/components/footerbar/button/DirectionPanSpinButton.js.map +0 -1
- package/lib/components/footerbar/button/ToggleButton.js +0 -83
- package/lib/components/footerbar/button/ToggleButton.js.map +0 -1
- package/lib/components/footerbar/button/ToggleConvertButton.js +0 -80
- package/lib/components/footerbar/button/ToggleConvertButton.js.map +0 -1
- package/lib/components/footerbar/button/ToggleMeasureButton.js +0 -59
- package/lib/components/footerbar/button/ToggleMeasureButton.js.map +0 -1
- package/lib/components/footerbar/button/styles.js +0 -29
- package/lib/components/footerbar/button/styles.js.map +0 -1
- package/lib/components/footerbar/export.js +0 -16
- package/lib/components/footerbar/export.js.map +0 -1
- package/lib/components/footerbar/footer-content-button.js +0 -224
- package/lib/components/footerbar/footer-content-button.js.map +0 -1
- package/lib/components/footerbar/footer-toggle-button.js +0 -133
- package/lib/components/footerbar/footer-toggle-button.js.map +0 -1
- package/lib/components/footerbar/footerbar.js +0 -808
- package/lib/components/footerbar/footerbar.js.map +0 -1
- package/lib/components/footerbar/styles.js +0 -41
- package/lib/components/footerbar/styles.js.map +0 -1
- package/lib/components/header/button/MenuButton.js +0 -77
- package/lib/components/header/button/MenuButton.js.map +0 -1
- package/lib/components/header/button/SaveButton.js +0 -57
- package/lib/components/header/button/SaveButton.js.map +0 -1
- package/lib/components/header/button/styles.js +0 -68
- package/lib/components/header/button/styles.js.map +0 -1
- package/lib/components/header/export.js +0 -12
- package/lib/components/header/export.js.map +0 -1
- package/lib/components/header/header.js +0 -556
- package/lib/components/header/header.js.map +0 -1
- package/lib/components/header/styles.js +0 -47
- package/lib/components/header/styles.js.map +0 -1
- package/lib/components/login/Login.js +0 -94
- package/lib/components/login/Login.js.map +0 -1
- package/lib/components/login/LoginForm/index.js +0 -140
- package/lib/components/login/LoginForm/index.js.map +0 -1
- package/lib/components/login/Register.js +0 -104
- package/lib/components/login/Register.js.map +0 -1
- package/lib/components/login/RegisterForm/index.js +0 -237
- package/lib/components/login/RegisterForm/index.js.map +0 -1
- package/lib/components/login/jwtService.js +0 -239
- package/lib/components/login/jwtService.js.map +0 -1
- package/lib/components/molecules/slider/index.js +0 -22
- package/lib/components/molecules/slider/index.js.map +0 -1
- package/lib/components/molecules/slider/styles.js +0 -2
- package/lib/components/molecules/slider/styles.js.map +0 -1
- package/lib/components/myprojects/export.js +0 -12
- package/lib/components/myprojects/export.js.map +0 -1
- package/lib/components/myprojects/index.js +0 -453
- package/lib/components/myprojects/index.js.map +0 -1
- package/lib/components/myprojects/styles.js +0 -31
- package/lib/components/myprojects/styles.js.map +0 -1
- package/lib/components/sidebar/custom-accordion.js +0 -45
- package/lib/components/sidebar/custom-accordion.js.map +0 -1
- package/lib/components/sidebar/export.js +0 -50
- package/lib/components/sidebar/export.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js +0 -74
- package/lib/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js +0 -124
- package/lib/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js +0 -135
- package/lib/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js +0 -260
- package/lib/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js +0 -84
- package/lib/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/element-editor.js +0 -884
- package/lib/components/sidebar/panel-element-editor/element-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js +0 -2
- package/lib/components/sidebar/panel-element-editor/multi-elements-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/panel-element-editor.js +0 -56
- package/lib/components/sidebar/panel-element-editor/panel-element-editor.js.map +0 -1
- package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js +0 -125
- package/lib/components/sidebar/panel-element-editor/panel-multi-elements-editor.js.map +0 -1
- package/lib/components/sidebar/panel-group-editor.js +0 -218
- package/lib/components/sidebar/panel-group-editor.js.map +0 -1
- package/lib/components/sidebar/panel-groups.js +0 -274
- package/lib/components/sidebar/panel-groups.js.map +0 -1
- package/lib/components/sidebar/panel-guides.js +0 -192
- package/lib/components/sidebar/panel-guides.js.map +0 -1
- package/lib/components/sidebar/panel-layer-elements.js +0 -258
- package/lib/components/sidebar/panel-layer-elements.js.map +0 -1
- package/lib/components/sidebar/panel-layers.js +0 -347
- package/lib/components/sidebar/panel-layers.js.map +0 -1
- package/lib/components/sidebar/panel.js +0 -110
- package/lib/components/sidebar/panel.js.map +0 -1
- package/lib/components/sidebar/sidebar.js +0 -117
- package/lib/components/sidebar/sidebar.js.map +0 -1
- package/lib/components/sidebar/toolbar-panel.js +0 -171
- package/lib/components/sidebar/toolbar-panel.js.map +0 -1
- package/lib/components/sign/export.js +0 -18
- package/lib/components/sign/export.js.map +0 -1
- package/lib/components/sign/main/index.js +0 -567
- package/lib/components/sign/main/index.js.map +0 -1
- package/lib/components/sign/main/styles.js +0 -27
- package/lib/components/sign/main/styles.js.map +0 -1
- package/lib/components/style/button.js +0 -121
- package/lib/components/style/button.js.map +0 -1
- package/lib/components/style/cancel-button.js +0 -30
- package/lib/components/style/cancel-button.js.map +0 -1
- package/lib/components/style/content-container.js +0 -41
- package/lib/components/style/content-container.js.map +0 -1
- package/lib/components/style/content-title.js +0 -38
- package/lib/components/style/content-title.js.map +0 -1
- package/lib/components/style/delete-button.js +0 -35
- package/lib/components/style/delete-button.js.map +0 -1
- package/lib/components/style/export.js +0 -122
- package/lib/components/style/export.js.map +0 -1
- package/lib/components/style/form-block.js +0 -32
- package/lib/components/style/form-block.js.map +0 -1
- package/lib/components/style/form-color-input.js +0 -35
- package/lib/components/style/form-color-input.js.map +0 -1
- package/lib/components/style/form-label.js +0 -34
- package/lib/components/style/form-label.js.map +0 -1
- package/lib/components/style/form-number-input.js +0 -197
- package/lib/components/style/form-number-input.js.map +0 -1
- package/lib/components/style/form-number-input_2.js +0 -214
- package/lib/components/style/form-number-input_2.js.map +0 -1
- package/lib/components/style/form-select.js +0 -30
- package/lib/components/style/form-select.js.map +0 -1
- package/lib/components/style/form-slider.js +0 -53
- package/lib/components/style/form-slider.js.map +0 -1
- package/lib/components/style/form-submit-button.js +0 -36
- package/lib/components/style/form-submit-button.js.map +0 -1
- package/lib/components/style/form-text-input.js +0 -84
- package/lib/components/style/form-text-input.js.map +0 -1
- package/lib/components/toolbar/button/ControlButton.js +0 -76
- package/lib/components/toolbar/button/ControlButton.js.map +0 -1
- package/lib/components/toolbar/button/DirectionButton.js +0 -57
- package/lib/components/toolbar/button/DirectionButton.js.map +0 -1
- package/lib/components/toolbar/button/RightButton.js +0 -140
- package/lib/components/toolbar/button/RightButton.js.map +0 -1
- package/lib/components/toolbar/button/ToggleButton.js +0 -66
- package/lib/components/toolbar/button/ToggleButton.js.map +0 -1
- package/lib/components/toolbar/button/index.js +0 -94
- package/lib/components/toolbar/button/index.js.map +0 -1
- package/lib/components/toolbar/button/styles.js +0 -21
- package/lib/components/toolbar/button/styles.js.map +0 -1
- package/lib/components/toolbar/components/DoorStyleMenu.js +0 -112
- package/lib/components/toolbar/components/DoorStyleMenu.js.map +0 -1
- package/lib/components/toolbar/components/Pricing.js +0 -110
- package/lib/components/toolbar/components/Pricing.js.map +0 -1
- package/lib/components/toolbar/components/ReviewForQuote.js +0 -485
- package/lib/components/toolbar/components/ReviewForQuote.js.map +0 -1
- package/lib/components/toolbar/export.js +0 -50
- package/lib/components/toolbar/export.js.map +0 -1
- package/lib/components/toolbar/main/Alert.js +0 -132
- package/lib/components/toolbar/main/Alert.js.map +0 -1
- package/lib/components/toolbar/main/TakePictureModal.js +0 -109
- package/lib/components/toolbar/main/TakePictureModal.js.map +0 -1
- package/lib/components/toolbar/main/confirm-popup.js +0 -95
- package/lib/components/toolbar/main/confirm-popup.js.map +0 -1
- package/lib/components/toolbar/main/index.js +0 -4619
- package/lib/components/toolbar/main/index.js.map +0 -1
- package/lib/components/toolbar/main/myComponents.js +0 -125
- package/lib/components/toolbar/main/myComponents.js.map +0 -1
- package/lib/components/toolbar/main/styles.js +0 -73
- package/lib/components/toolbar/main/styles.js.map +0 -1
- package/lib/components/toolbar/plugin-item.js +0 -156
- package/lib/components/toolbar/plugin-item.js.map +0 -1
- package/lib/components/toolbar/popup/appliance/appliance-category/index.js +0 -86
- package/lib/components/toolbar/popup/appliance/appliance-category/index.js.map +0 -1
- package/lib/components/toolbar/popup/appliance/choose-appliance/index.js +0 -85
- package/lib/components/toolbar/popup/appliance/choose-appliance/index.js.map +0 -1
- package/lib/components/toolbar/popup/appliance/index.js +0 -89
- package/lib/components/toolbar/popup/appliance/index.js.map +0 -1
- package/lib/components/toolbar/popup/autosaveprompt/index.js +0 -99
- package/lib/components/toolbar/popup/autosaveprompt/index.js.map +0 -1
- package/lib/components/toolbar/popup/autosaveprompt/styles.js +0 -16
- package/lib/components/toolbar/popup/autosaveprompt/styles.js.map +0 -1
- package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js +0 -86
- package/lib/components/toolbar/popup/cabinet/cabinet-category/index.js.map +0 -1
- package/lib/components/toolbar/popup/cabinet/choose-product/index.js +0 -107
- package/lib/components/toolbar/popup/cabinet/choose-product/index.js.map +0 -1
- package/lib/components/toolbar/popup/cabinet/index.js +0 -91
- package/lib/components/toolbar/popup/cabinet/index.js.map +0 -1
- package/lib/components/toolbar/popup/doorStyle/choose-style/index.js +0 -59
- package/lib/components/toolbar/popup/doorStyle/choose-style/index.js.map +0 -1
- package/lib/components/toolbar/popup/doorStyle/index.js +0 -68
- package/lib/components/toolbar/popup/doorStyle/index.js.map +0 -1
- package/lib/components/toolbar/popup/doorStyle/style-category/index.js +0 -152
- package/lib/components/toolbar/popup/doorStyle/style-category/index.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -9
- package/lib/components/toolbar/popup/downloadsummary/downloadSummaryContext.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js +0 -128
- package/lib/components/toolbar/popup/downloadsummary/downloadSummaryTemp.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/index.js +0 -572
- package/lib/components/toolbar/popup/downloadsummary/index.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js +0 -60
- package/lib/components/toolbar/popup/downloadsummary/show2D/show2DView.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js +0 -200
- package/lib/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js +0 -254
- package/lib/components/toolbar/popup/downloadsummary/show3D/show3DView.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js +0 -1762
- package/lib/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -96
- package/lib/components/toolbar/popup/downloadsummary/showCabinetInfo.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js +0 -125
- package/lib/components/toolbar/popup/downloadsummary/showElevation/showElevationView.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js +0 -1713
- package/lib/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js +0 -184
- package/lib/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/showWarranty.js +0 -115
- package/lib/components/toolbar/popup/downloadsummary/showWarranty.js.map +0 -1
- package/lib/components/toolbar/popup/downloadsummary/styles.js +0 -47
- package/lib/components/toolbar/popup/downloadsummary/styles.js.map +0 -1
- package/lib/components/toolbar/popup/finishingtouch/category/index.js +0 -44
- package/lib/components/toolbar/popup/finishingtouch/category/index.js.map +0 -1
- package/lib/components/toolbar/popup/finishingtouch/index.js +0 -54
- package/lib/components/toolbar/popup/finishingtouch/index.js.map +0 -1
- package/lib/components/toolbar/popup/finishingtouch/material-edit.js +0 -163
- package/lib/components/toolbar/popup/finishingtouch/material-edit.js.map +0 -1
- package/lib/components/toolbar/popup/finishingtouch/product/index.js +0 -65
- package/lib/components/toolbar/popup/finishingtouch/product/index.js.map +0 -1
- package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js +0 -124
- package/lib/components/toolbar/popup/floorplan/choose-floor/confirm-popup.js.map +0 -1
- package/lib/components/toolbar/popup/floorplan/choose-floor/index.js +0 -255
- package/lib/components/toolbar/popup/floorplan/choose-floor/index.js.map +0 -1
- package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -20
- package/lib/components/toolbar/popup/floorplan/choose-floor/styles.js.map +0 -1
- package/lib/components/toolbar/popup/floorplan/floor-category/index.js +0 -99
- package/lib/components/toolbar/popup/floorplan/floor-category/index.js.map +0 -1
- package/lib/components/toolbar/popup/floorplan/index.js +0 -56
- package/lib/components/toolbar/popup/floorplan/index.js.map +0 -1
- package/lib/components/toolbar/popup/index.js +0 -195
- package/lib/components/toolbar/popup/index.js.map +0 -1
- package/lib/components/toolbar/popup/newproject/index.js +0 -75
- package/lib/components/toolbar/popup/newproject/index.js.map +0 -1
- package/lib/components/toolbar/popup/newproject/styles.js +0 -16
- package/lib/components/toolbar/popup/newproject/styles.js.map +0 -1
- package/lib/components/toolbar/popup/product/appliance.js +0 -73
- package/lib/components/toolbar/popup/product/appliance.js.map +0 -1
- package/lib/components/toolbar/popup/product/cabinetproduct.js +0 -33
- package/lib/components/toolbar/popup/product/cabinetproduct.js.map +0 -1
- package/lib/components/toolbar/popup/product/doorstyle.js +0 -59
- package/lib/components/toolbar/popup/product/doorstyle.js.map +0 -1
- package/lib/components/toolbar/popup/product/doorstyleproduct.js +0 -59
- package/lib/components/toolbar/popup/product/doorstyleproduct.js.map +0 -1
- package/lib/components/toolbar/popup/product/floor.js +0 -59
- package/lib/components/toolbar/popup/product/floor.js.map +0 -1
- package/lib/components/toolbar/popup/product/floorproduct.js +0 -68
- package/lib/components/toolbar/popup/product/floorproduct.js.map +0 -1
- package/lib/components/toolbar/popup/product/index.js +0 -59
- package/lib/components/toolbar/popup/product/index.js.map +0 -1
- package/lib/components/toolbar/popup/product/primary.js +0 -71
- package/lib/components/toolbar/popup/product/primary.js.map +0 -1
- package/lib/components/toolbar/popup/product/productline.js +0 -128
- package/lib/components/toolbar/popup/product/productline.js.map +0 -1
- package/lib/components/toolbar/popup/product/reviewItem.js +0 -346
- package/lib/components/toolbar/popup/product/reviewItem.js.map +0 -1
- package/lib/components/toolbar/popup/product/reviewMolding.js +0 -291
- package/lib/components/toolbar/popup/product/reviewMolding.js.map +0 -1
- package/lib/components/toolbar/popup/product/styles.js +0 -79
- package/lib/components/toolbar/popup/product/styles.js.map +0 -1
- package/lib/components/toolbar/popup/savedesign/FullPictureForm.js +0 -169
- package/lib/components/toolbar/popup/savedesign/FullPictureForm.js.map +0 -1
- package/lib/components/toolbar/popup/savedesign/index.js +0 -516
- package/lib/components/toolbar/popup/savedesign/index.js.map +0 -1
- package/lib/components/toolbar/popup/savedesign/styles.js +0 -26
- package/lib/components/toolbar/popup/savedesign/styles.js.map +0 -1
- package/lib/components/toolbar/popup/setDoorStyleOption/index.js +0 -64
- package/lib/components/toolbar/popup/setDoorStyleOption/index.js.map +0 -1
- package/lib/components/toolbar/popup/styles.js +0 -104
- package/lib/components/toolbar/popup/styles.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js +0 -166
- package/lib/components/toolbar/popup/submitforquote/AddToCartOptions.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js +0 -93
- package/lib/components/toolbar/popup/submitforquote/CustomerRequestsForm.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js +0 -45
- package/lib/components/toolbar/popup/submitforquote/SkipDesignerReview.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/StepDots.js +0 -40
- package/lib/components/toolbar/popup/submitforquote/StepDots.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/cart-choice.js +0 -141
- package/lib/components/toolbar/popup/submitforquote/cart-choice.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -50
- package/lib/components/toolbar/popup/submitforquote/doorstyle-menus.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/index.js +0 -698
- package/lib/components/toolbar/popup/submitforquote/index.js.map +0 -1
- package/lib/components/toolbar/popup/submitforquote/styles.js +0 -38
- package/lib/components/toolbar/popup/submitforquote/styles.js.map +0 -1
- package/lib/components/toolbar/popup/submitprompt/index.js +0 -79
- package/lib/components/toolbar/popup/submitprompt/index.js.map +0 -1
- package/lib/components/toolbar/popup/submitprompt/styles.js +0 -16
- package/lib/components/toolbar/popup/submitprompt/styles.js.map +0 -1
- package/lib/components/toolbar/toolbar-button.js +0 -111
- package/lib/components/toolbar/toolbar-button.js.map +0 -1
- package/lib/components/toolbar/toolbar-load-button.js +0 -36
- package/lib/components/toolbar/toolbar-load-button.js.map +0 -1
- package/lib/components/toolbar/toolbar-save-button.js +0 -34
- package/lib/components/toolbar/toolbar-save-button.js.map +0 -1
- package/lib/components/tutorial-view/Modal.js +0 -503
- package/lib/components/tutorial-view/Modal.js.map +0 -1
- package/lib/components/tutorial-view/styles.js +0 -13
- package/lib/components/tutorial-view/styles.js.map +0 -1
- package/lib/components/viewer2d/area.js +0 -90
- package/lib/components/viewer2d/area.js.map +0 -1
- package/lib/components/viewer2d/export.js +0 -122
- package/lib/components/viewer2d/export.js.map +0 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -45
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js.map +0 -1
- package/lib/components/viewer2d/grids/grid-streak.js +0 -45
- package/lib/components/viewer2d/grids/grid-streak.js.map +0 -1
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -45
- package/lib/components/viewer2d/grids/grid-vertical-streak.js.map +0 -1
- package/lib/components/viewer2d/grids/grids.js +0 -45
- package/lib/components/viewer2d/grids/grids.js.map +0 -1
- package/lib/components/viewer2d/group.js +0 -63
- package/lib/components/viewer2d/group.js.map +0 -1
- package/lib/components/viewer2d/item.js +0 -522
- package/lib/components/viewer2d/item.js.map +0 -1
- package/lib/components/viewer2d/layer.js +0 -172
- package/lib/components/viewer2d/layer.js.map +0 -1
- package/lib/components/viewer2d/line.js +0 -899
- package/lib/components/viewer2d/line.js.map +0 -1
- package/lib/components/viewer2d/ruler.js +0 -108
- package/lib/components/viewer2d/ruler.js.map +0 -1
- package/lib/components/viewer2d/rulerDist.js +0 -154
- package/lib/components/viewer2d/rulerDist.js.map +0 -1
- package/lib/components/viewer2d/rulerX.js +0 -159
- package/lib/components/viewer2d/rulerX.js.map +0 -1
- package/lib/components/viewer2d/rulerY.js +0 -161
- package/lib/components/viewer2d/rulerY.js.map +0 -1
- package/lib/components/viewer2d/scene.js +0 -148
- package/lib/components/viewer2d/scene.js.map +0 -1
- package/lib/components/viewer2d/snap.js +0 -84
- package/lib/components/viewer2d/snap.js.map +0 -1
- package/lib/components/viewer2d/state.js +0 -88
- package/lib/components/viewer2d/state.js.map +0 -1
- package/lib/components/viewer2d/utils.js +0 -174
- package/lib/components/viewer2d/utils.js.map +0 -1
- package/lib/components/viewer2d/vertex.js +0 -76
- package/lib/components/viewer2d/vertex.js.map +0 -1
- package/lib/components/viewer2d/viewer2d.js +0 -1409
- package/lib/components/viewer2d/viewer2d.js.map +0 -1
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -2598
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js.map +0 -1
- package/lib/components/viewer3d/dcm.js +0 -408
- package/lib/components/viewer3d/dcm.js.map +0 -1
- package/lib/components/viewer3d/fbm.js +0 -421
- package/lib/components/viewer3d/fbm.js.map +0 -1
- package/lib/components/viewer3d/front3D.js +0 -76
- package/lib/components/viewer3d/front3D.js.map +0 -1
- package/lib/components/viewer3d/grid-creator.js +0 -35
- package/lib/components/viewer3d/grid-creator.js.map +0 -1
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +0 -45
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js.map +0 -1
- package/lib/components/viewer3d/grids/grid-streak.js +0 -36
- package/lib/components/viewer3d/grids/grid-streak.js.map +0 -1
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +0 -45
- package/lib/components/viewer3d/grids/grid-vertical-streak.js.map +0 -1
- package/lib/components/viewer3d/libs/first-person-controls.js +0 -75
- package/lib/components/viewer3d/libs/first-person-controls.js.map +0 -1
- package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1288
- package/lib/components/viewer3d/libs/helvetiker_regular.typeface.js.map +0 -1
- package/lib/components/viewer3d/libs/mtl-loader.js +0 -360
- package/lib/components/viewer3d/libs/mtl-loader.js.map +0 -1
- package/lib/components/viewer3d/libs/obj-loader.js +0 -465
- package/lib/components/viewer3d/libs/obj-loader.js.map +0 -1
- package/lib/components/viewer3d/libs/orbit-controls.js +0 -701
- package/lib/components/viewer3d/libs/orbit-controls.js.map +0 -1
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +0 -48
- package/lib/components/viewer3d/libs/pointer-lock-controls.js.map +0 -1
- package/lib/components/viewer3d/lrm.js +0 -312
- package/lib/components/viewer3d/lrm.js.map +0 -1
- package/lib/components/viewer3d/model.js +0 -715
- package/lib/components/viewer3d/model.js.map +0 -1
- package/lib/components/viewer3d/pointer-lock-navigation.js +0 -123
- package/lib/components/viewer3d/pointer-lock-navigation.js.map +0 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +0 -69
- package/lib/components/viewer3d/ruler-utils/itemRect.js.map +0 -1
- package/lib/components/viewer3d/ruler-utils/layer3D.js +0 -503
- package/lib/components/viewer3d/ruler-utils/layer3D.js.map +0 -1
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +0 -235
- package/lib/components/viewer3d/ruler-utils/ruler3D.js.map +0 -1
- package/lib/components/viewer3d/ruler-utils/scene3D.js +0 -70
- package/lib/components/viewer3d/ruler-utils/scene3D.js.map +0 -1
- package/lib/components/viewer3d/ruler-utils/state3D.js +0 -26
- package/lib/components/viewer3d/ruler-utils/state3D.js.map +0 -1
- package/lib/components/viewer3d/scene-creator.js +0 -3641
- package/lib/components/viewer3d/scene-creator.js.map +0 -1
- package/lib/components/viewer3d/three-memory-cleaner.js +0 -61
- package/lib/components/viewer3d/three-memory-cleaner.js.map +0 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +0 -321
- package/lib/components/viewer3d/viewer3d-first-person.js.map +0 -1
- package/lib/components/viewer3d/viewer3d.js +0 -2508
- package/lib/components/viewer3d/viewer3d.js.map +0 -1
- package/lib/components/wizardstep/button/styles.js +0 -67
- package/lib/components/wizardstep/button/styles.js.map +0 -1
- package/lib/components/wizardstep/export.js +0 -12
- package/lib/components/wizardstep/export.js.map +0 -1
- package/lib/components/wizardstep/index.js +0 -978
- package/lib/components/wizardstep/index.js.map +0 -1
- package/lib/components/wizardstep/styles.js +0 -68
- package/lib/components/wizardstep/styles.js.map +0 -1
- package/lib/components/wizardstep/wizardstep-content-button.js +0 -224
- package/lib/components/wizardstep/wizardstep-content-button.js.map +0 -1
- package/lib/components/wizardstep/wizardstep-toggle-button.js +0 -133
- package/lib/components/wizardstep/wizardstep-toggle-button.js.map +0 -1
- package/lib/constants.js +0 -646
- package/lib/constants.js.map +0 -1
- package/lib/hooks/useCheckCart.js +0 -60
- package/lib/hooks/useCheckCart.js.map +0 -1
- package/lib/hooks/useGetPricesBySku.js +0 -81
- package/lib/hooks/useGetPricesBySku.js.map +0 -1
- package/lib/hooks/useValidateToken.js +0 -207
- package/lib/hooks/useValidateToken.js.map +0 -1
- package/lib/index.js +0 -102
- package/lib/index.js.map +0 -1
- package/lib/models.js +0 -518
- package/lib/models.js.map +0 -1
- package/lib/plugins/SVGLoader.js +0 -1418
- package/lib/plugins/SVGLoader.js.map +0 -1
- package/lib/plugins/autosave.js +0 -40
- package/lib/plugins/autosave.js.map +0 -1
- package/lib/plugins/console-debugger.js +0 -45
- package/lib/plugins/console-debugger.js.map +0 -1
- package/lib/plugins/export.js +0 -34
- package/lib/plugins/export.js.map +0 -1
- package/lib/plugins/keyboard.js +0 -108
- package/lib/plugins/keyboard.js.map +0 -1
- package/lib/reducers/areas-reducer.js +0 -19
- package/lib/reducers/areas-reducer.js.map +0 -1
- package/lib/reducers/export.js +0 -98
- package/lib/reducers/export.js.map +0 -1
- package/lib/reducers/groups-reducer.js +0 -45
- package/lib/reducers/groups-reducer.js.map +0 -1
- package/lib/reducers/holes-reducer.js +0 -69
- package/lib/reducers/holes-reducer.js.map +0 -1
- package/lib/reducers/items-reducer.js +0 -147
- package/lib/reducers/items-reducer.js.map +0 -1
- package/lib/reducers/lines-reducer.js +0 -52
- package/lib/reducers/lines-reducer.js.map +0 -1
- package/lib/reducers/project-reducer.js +0 -136
- package/lib/reducers/project-reducer.js.map +0 -1
- package/lib/reducers/reducer.js +0 -27
- package/lib/reducers/reducer.js.map +0 -1
- package/lib/reducers/scene-reducer.js +0 -35
- package/lib/reducers/scene-reducer.js.map +0 -1
- package/lib/reducers/user-reducer.js +0 -48
- package/lib/reducers/user-reducer.js.map +0 -1
- package/lib/reducers/vertices-reducer.js +0 -26
- package/lib/reducers/vertices-reducer.js.map +0 -1
- package/lib/reducers/viewer2d-reducer.js +0 -83
- package/lib/reducers/viewer2d-reducer.js.map +0 -1
- package/lib/reducers/viewer3d-reducer.js +0 -64
- package/lib/reducers/viewer3d-reducer.js.map +0 -1
- package/lib/shared-style.js +0 -73
- package/lib/shared-style.js.map +0 -1
- package/lib/styles/export.js +0 -14
- package/lib/styles/export.js.map +0 -1
- package/lib/translator/en.js +0 -111
- package/lib/translator/en.js.map +0 -1
- package/lib/translator/it.js +0 -86
- package/lib/translator/it.js.map +0 -1
- package/lib/translator/ru.js +0 -86
- package/lib/translator/ru.js.map +0 -1
- package/lib/translator/translator.js +0 -91
- package/lib/translator/translator.js.map +0 -1
- package/lib/utils/browser.js +0 -41
- package/lib/utils/browser.js.map +0 -1
- package/lib/utils/email-validator.js +0 -11
- package/lib/utils/email-validator.js.map +0 -1
- package/lib/utils/export.js +0 -57
- package/lib/utils/export.js.map +0 -1
- package/lib/utils/geometry.js +0 -2329
- package/lib/utils/geometry.js.map +0 -1
- package/lib/utils/get-edges-of-subgraphs.js +0 -29
- package/lib/utils/get-edges-of-subgraphs.js.map +0 -1
- package/lib/utils/graph-cycles.js +0 -241
- package/lib/utils/graph-cycles.js.map +0 -1
- package/lib/utils/graph-inner-cycles.js +0 -55
- package/lib/utils/graph-inner-cycles.js.map +0 -1
- package/lib/utils/graph.js +0 -152
- package/lib/utils/graph.js.map +0 -1
- package/lib/utils/helper.js +0 -360
- package/lib/utils/helper.js.map +0 -1
- package/lib/utils/history.js +0 -37
- package/lib/utils/history.js.map +0 -1
- package/lib/utils/id-broker.js +0 -26
- package/lib/utils/id-broker.js.map +0 -1
- package/lib/utils/logger.js +0 -15
- package/lib/utils/logger.js.map +0 -1
- package/lib/utils/math.js +0 -58
- package/lib/utils/math.js.map +0 -1
- package/lib/utils/molding.js +0 -864
- package/lib/utils/molding.js.map +0 -1
- package/lib/utils/name-generator.js +0 -24
- package/lib/utils/name-generator.js.map +0 -1
- package/lib/utils/objects-utils.js +0 -61
- package/lib/utils/objects-utils.js.map +0 -1
- package/lib/utils/phone-validator.js +0 -11
- package/lib/utils/phone-validator.js.map +0 -1
- package/lib/utils/process-black-list.js +0 -25
- package/lib/utils/process-black-list.js.map +0 -1
- package/lib/utils/react-if.js +0 -25
- package/lib/utils/react-if.js.map +0 -1
- package/lib/utils/snap-scene.js +0 -106
- package/lib/utils/snap-scene.js.map +0 -1
- package/lib/utils/snap.js +0 -250
- package/lib/utils/snap.js.map +0 -1
- package/lib/utils/threeCSG.es6.js +0 -504
- package/lib/utils/threeCSG.es6.js.map +0 -1
- package/lib/version.js +0 -8
- package/lib/version.js.map +0 -1
package/lib/utils/molding.js
DELETED
|
@@ -1,864 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createMonldingGroup = createMonldingGroup;
|
|
8
|
-
exports.getAllMoldingGroups = getAllMoldingGroups;
|
|
9
|
-
exports.getItemGroupFromMolding = getItemGroupFromMolding;
|
|
10
|
-
exports.getItemRect = getItemRect;
|
|
11
|
-
exports.getLinesFromItems = getLinesFromItems;
|
|
12
|
-
exports.getLinesFromItems2 = getLinesFromItems2;
|
|
13
|
-
exports.getLinesOfItem = getLinesOfItem;
|
|
14
|
-
exports.hasMoldingLayout = hasMoldingLayout;
|
|
15
|
-
exports.isEnableItemForMolding = isEnableItemForMolding;
|
|
16
|
-
exports.isItemSameItemByLocation = isItemSameItemByLocation;
|
|
17
|
-
exports.isItemSnappedGroup = isItemSnappedGroup;
|
|
18
|
-
exports.isItemSnappedItem = isItemSnappedItem;
|
|
19
|
-
exports.isLinesOverlapped = isLinesOverlapped;
|
|
20
|
-
exports.isSameMoldingLayoutpos = isSameMoldingLayoutpos;
|
|
21
|
-
exports.mergeOverlappedLines = mergeOverlappedLines;
|
|
22
|
-
exports.sortItemsByDistance = sortItemsByDistance;
|
|
23
|
-
exports.tryMergeMDItem = tryMergeMDItem;
|
|
24
|
-
var _constants = require("../constants");
|
|
25
|
-
var Three = _interopRequireWildcard(require("three"));
|
|
26
|
-
var _convertUnits = _interopRequireDefault(require("convert-units"));
|
|
27
|
-
var _idBroker = _interopRequireDefault(require("./id-broker"));
|
|
28
|
-
var _utils = require("../components/viewer2d/utils");
|
|
29
|
-
var _export = require("./export");
|
|
30
|
-
var _helper = require("./helper");
|
|
31
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
32
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
33
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
36
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
37
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
38
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
39
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
41
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
42
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
43
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
44
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
45
|
-
function getItemRect(item) {
|
|
46
|
-
var x = item.x;
|
|
47
|
-
var y = item.y;
|
|
48
|
-
var rotRad = item.rotation / 180 * Math.PI;
|
|
49
|
-
var itemWidth = item.properties.get('width').get('_length');
|
|
50
|
-
var itemWidthUnit = item.properties.get('width').get('_unit') || 'cm';
|
|
51
|
-
itemWidth = (0, _convertUnits["default"])(itemWidth / 2).from(itemWidthUnit).to('cm');
|
|
52
|
-
var itemDepth = item.properties.get('depth').get('_length');
|
|
53
|
-
var itemDepthUnit = item.properties.get('depth').get('_unit') || 'cm';
|
|
54
|
-
itemDepth = (0, _convertUnits["default"])(itemDepth / 2).from(itemDepthUnit).to('cm');
|
|
55
|
-
var mx = x - itemWidth * Math.cos(rotRad);
|
|
56
|
-
var my = y - itemWidth * Math.sin(rotRad);
|
|
57
|
-
var x0 = mx + itemDepth * Math.sin(rotRad);
|
|
58
|
-
var y0 = my - itemDepth * Math.cos(rotRad);
|
|
59
|
-
var x3 = mx * 2 - x0;
|
|
60
|
-
var y3 = my * 2 - y0;
|
|
61
|
-
var x1 = x * 2 - x3;
|
|
62
|
-
var y1 = y * 2 - y3;
|
|
63
|
-
var x2 = x * 2 - x0;
|
|
64
|
-
var y2 = y * 2 - y0;
|
|
65
|
-
return {
|
|
66
|
-
rect: [{
|
|
67
|
-
x: x0,
|
|
68
|
-
y: y0
|
|
69
|
-
}, {
|
|
70
|
-
x: x1,
|
|
71
|
-
y: y1
|
|
72
|
-
}, {
|
|
73
|
-
x: x2,
|
|
74
|
-
y: y2
|
|
75
|
-
}, {
|
|
76
|
-
x: x3,
|
|
77
|
-
y: y3
|
|
78
|
-
}]
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function hasMoldingLayout(molding, layoutpos) {
|
|
82
|
-
var types = molding === null || molding === void 0 ? void 0 : molding.molding_type;
|
|
83
|
-
return (Array.isArray(types) || typeof types === 'string') && types.includes(layoutpos);
|
|
84
|
-
}
|
|
85
|
-
function isEnableItemForMolding(layer, selItem) {
|
|
86
|
-
var molding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
87
|
-
var allLineRects = _export.GeometryUtils.buildRectFromLines(layer, _export.GeometryUtils.getAllLines(layer));
|
|
88
|
-
var result = !(0, _helper.isEmpty)(selItem) && selItem.category === 'cabinet' && (selItem.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && !_export.GeometryUtils.isSnappedLine(getItemRect(selItem), allLineRects) || (selItem.layoutpos === _constants.WALL_CABINET_LAYOUTPOS || selItem.layoutpos === _constants.TALL_CABINET_LAYOUTPOS) && _export.GeometryUtils.isSnappedLine(getItemRect(selItem), allLineRects));
|
|
89
|
-
|
|
90
|
-
// check this item is enable for any molding
|
|
91
|
-
if ((0, _helper.isEmpty)(molding)) return result;
|
|
92
|
-
// check this item is enable for specified molding
|
|
93
|
-
else return result && hasMoldingLayout(molding, selItem.layoutpos);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Check two line segments are overlap. The direction of the two line segments must be opposite.
|
|
98
|
-
* s1 c2 s2 c1
|
|
99
|
-
* |--------|------|-----------|
|
|
100
|
-
* Decision Formular: L(s1,c1) + L(s2, c2) = L(s1, s2) + L(c1, c2)
|
|
101
|
-
* @param {*} selRectPos1
|
|
102
|
-
* @param {*} selRectPos2
|
|
103
|
-
* @param {*} curRectPos1
|
|
104
|
-
* @param {*} curRectPos2
|
|
105
|
-
* @returns L(s1,c1) + L(s2, c2) - L(s1, s2) - L(c1, c2)
|
|
106
|
-
*/
|
|
107
|
-
function getDelta(selRectPos1, selRectPos2, curRectPos1, curRectPos2) {
|
|
108
|
-
return (
|
|
109
|
-
// GeometryUtils.verticesDistance(curRectPos1, selRectPos2) +
|
|
110
|
-
// GeometryUtils.verticesDistance(selRectPos1, curRectPos2) -
|
|
111
|
-
// Math.abs(
|
|
112
|
-
// GeometryUtils.verticesDistance(curRectPos2, curRectPos1) -
|
|
113
|
-
// GeometryUtils.verticesDistance(selRectPos1, selRectPos2)
|
|
114
|
-
// )
|
|
115
|
-
Math.abs(_export.GeometryUtils.verticesDistance(curRectPos1, selRectPos1) + _export.GeometryUtils.verticesDistance(selRectPos2, curRectPos2) - _export.GeometryUtils.verticesDistance(curRectPos2, curRectPos1) - _export.GeometryUtils.verticesDistance(selRectPos1, selRectPos2))
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
function isItemSnappedItem(selItem, curItem) {
|
|
119
|
-
var selRect = getItemRect(selItem).rect;
|
|
120
|
-
var curRect = getItemRect(curItem).rect;
|
|
121
|
-
var flag30 = getDelta(selRect[3], selRect[0], curRect[1], curRect[2]) < _constants.EPSILON;
|
|
122
|
-
var flag21 = getDelta(selRect[2], selRect[1], curRect[0], curRect[3]) < _constants.EPSILON;
|
|
123
|
-
var flag23 = getDelta(selRect[2], selRect[3], curRect[2], curRect[3]) < _constants.EPSILON;
|
|
124
|
-
var flag01 = getDelta(selRect[1], selRect[0], curRect[0], curRect[3]) < _constants.EPSILON;
|
|
125
|
-
var flag03 = getDelta(selRect[0], selRect[3], curRect[1], curRect[0]) < _constants.EPSILON;
|
|
126
|
-
return flag30 || flag21 || flag23 || flag01 || flag03;
|
|
127
|
-
}
|
|
128
|
-
function isItemSnappedGroup(selItem, itemGroup) {
|
|
129
|
-
return itemGroup.some(function (curItem) {
|
|
130
|
-
return isItemSnappedItem(selItem, curItem);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function sortItemsByDistance(items, selItem) {
|
|
134
|
-
items.sort(function (a, b) {
|
|
135
|
-
return _export.GeometryUtils.pointsDistance(a.x, a.y, selItem.x, selItem.y) - _export.GeometryUtils.pointsDistance(b.x, b.y, selItem.x, selItem.y);
|
|
136
|
-
});
|
|
137
|
-
return items;
|
|
138
|
-
}
|
|
139
|
-
function isSameMoldingLayoutpos(curItem, item) {
|
|
140
|
-
return curItem.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && curItem.layoutpos === item.layoutpos || [_constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS].includes(curItem.layoutpos) && [_constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS].includes(item.layoutpos);
|
|
141
|
-
}
|
|
142
|
-
function isItemSameItemByLocation(item1, item2, location) {
|
|
143
|
-
var item1Altitude = item1.properties.get('altitude').get('_length');
|
|
144
|
-
var item1AltitudeUnit = item1.properties.get('altitude').get('_unit');
|
|
145
|
-
item1Altitude = (0, _convertUnits["default"])(item1Altitude).from(item1AltitudeUnit).to('cm');
|
|
146
|
-
var item1Height = item1.properties.get('height').get('_length');
|
|
147
|
-
var item1HeightUnit = item1.properties.get('height').get('_unit');
|
|
148
|
-
item1Height = (0, _convertUnits["default"])(item1Height).from(item1HeightUnit).to('cm');
|
|
149
|
-
var item2Altitude = item2.properties.get('altitude').get('_length');
|
|
150
|
-
var item2AltitudeUnit = item2.properties.get('altitude').get('_unit');
|
|
151
|
-
item2Altitude = (0, _convertUnits["default"])(item2Altitude).from(item2AltitudeUnit).to('cm');
|
|
152
|
-
var item2Height = item2.properties.get('height').get('_length');
|
|
153
|
-
var item2HeightUnit = item2.properties.get('height').get('_unit');
|
|
154
|
-
item2Height = (0, _convertUnits["default"])(item2Height).from(item2HeightUnit).to('cm');
|
|
155
|
-
var flag = false;
|
|
156
|
-
switch (location) {
|
|
157
|
-
case _constants.TOP_MOLDING_LOCATION:
|
|
158
|
-
if (_export.GeometryUtils.sameDistances(item1Altitude + item1Height, item2Altitude + item2Height)) flag = true;
|
|
159
|
-
break;
|
|
160
|
-
case _constants.MIDDLE_MOLDING_LOCATION:
|
|
161
|
-
if (_export.GeometryUtils.sameDistances(item1Altitude + item1Height / 2, item2Altitude + item2Height / 2)) flag = true;
|
|
162
|
-
break;
|
|
163
|
-
case _constants.BOTTOM_MOLDING_LOCATION:
|
|
164
|
-
if (_export.GeometryUtils.sameDistances(item1Altitude, item2Altitude)) flag = true;
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
return flag;
|
|
168
|
-
}
|
|
169
|
-
function tryMergeMDItem(layer, selItem, curItem, itemGroup, molding) {
|
|
170
|
-
return isSameMoldingLayoutpos(selItem, curItem) && isEnableItemForMolding(layer, curItem, molding) && isItemSnappedGroup(curItem, itemGroup) && !itemGroup.some(function (item) {
|
|
171
|
-
return item.id === curItem.id;
|
|
172
|
-
}) && isItemSameItemByLocation(selItem, curItem, molding.location_type);
|
|
173
|
-
}
|
|
174
|
-
function getItemGroupFromMolding(layer, curItem, molding) {
|
|
175
|
-
var selectedItem = layer.getIn(['items', layer.selected.toJS().items[0]]);
|
|
176
|
-
var itemGroup = [curItem];
|
|
177
|
-
var temp_layer_items = layer.items.toArray().filter(function (item) {
|
|
178
|
-
return item.category === 'cabinet' && item.id !== curItem.id && item.id !== (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id);
|
|
179
|
-
});
|
|
180
|
-
temp_layer_items = sortItemsByDistance(temp_layer_items, curItem);
|
|
181
|
-
for (var idx = 0; idx < temp_layer_items.length; idx++) {
|
|
182
|
-
if (tryMergeMDItem(layer, curItem, temp_layer_items[idx], itemGroup, molding)) {
|
|
183
|
-
itemGroup.push(temp_layer_items[idx]);
|
|
184
|
-
idx = 0;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return itemGroup;
|
|
188
|
-
}
|
|
189
|
-
function tryMergeItemWithLocation(curItem, itemGroup, location) {
|
|
190
|
-
return itemGroup.some(function (item) {
|
|
191
|
-
return isItemSnappedItem(curItem, item) && isItemSameItemByLocation(curItem, item, location);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function getAllMoldingGroups(layer) {
|
|
195
|
-
var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
196
|
-
if (items === null) items = layer.items.toArray();
|
|
197
|
-
var itemGroups = [];
|
|
198
|
-
items.forEach(function (curItem) {
|
|
199
|
-
// let allLineRects = GeometryUtils.buildRectFromLines(
|
|
200
|
-
// layer,
|
|
201
|
-
// GeometryUtils.getAllLines(layer)
|
|
202
|
-
// );
|
|
203
|
-
// if (
|
|
204
|
-
// (curItem.category === 'cabinet' &&
|
|
205
|
-
// curItem.layoutpos === BASE_CABINET_LAYOUTPOS &&
|
|
206
|
-
// !GeometryUtils.isSnappedLine(getItemRect(curItem), allLineRects)) ||
|
|
207
|
-
// ((curItem.layoutpos === WALL_CABINET_LAYOUTPOS ||
|
|
208
|
-
// curItem.layoutpos === TALL_CABINET_LAYOUTPOS) &&
|
|
209
|
-
// GeometryUtils.isSnappedLine(getItemRect(curItem), allLineRects))
|
|
210
|
-
// ) {
|
|
211
|
-
if (curItem.category === 'cabinet') {
|
|
212
|
-
var temp_items = items.filter(function (it) {
|
|
213
|
-
return it.category === 'cabinet' && isSameMoldingLayoutpos(curItem, it) && it.id !== curItem.id;
|
|
214
|
-
});
|
|
215
|
-
temp_items = sortItemsByDistance(temp_items, curItem);
|
|
216
|
-
_constants.MOLDING_LOCATIONS.forEach(function (location) {
|
|
217
|
-
if (!itemGroups.some(function (ig) {
|
|
218
|
-
return ig.items.some(function (it) {
|
|
219
|
-
return it.id === curItem.id;
|
|
220
|
-
}) && ig.location_type === location;
|
|
221
|
-
})) {
|
|
222
|
-
var itemGroup = [curItem];
|
|
223
|
-
for (var idx = 0; idx < temp_items.length; idx++) {
|
|
224
|
-
if (tryMergeItemWithLocation(temp_items[idx], itemGroup, location)) {
|
|
225
|
-
itemGroup.push(temp_items[idx]);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
itemGroups.push({
|
|
229
|
-
id: _idBroker["default"].acquireID(),
|
|
230
|
-
items: itemGroup,
|
|
231
|
-
location_type: location,
|
|
232
|
-
molding: null,
|
|
233
|
-
lines: null,
|
|
234
|
-
pointGroups: null,
|
|
235
|
-
meshes: [],
|
|
236
|
-
rot: 0,
|
|
237
|
-
pos: 0
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
// }
|
|
243
|
-
});
|
|
244
|
-
return itemGroups;
|
|
245
|
-
}
|
|
246
|
-
function getLinesOfItem(item, allLineRects, catalog) {
|
|
247
|
-
var lines = [];
|
|
248
|
-
var outline = null;
|
|
249
|
-
var element = catalog.elements[item.get('type')];
|
|
250
|
-
if (!element) element = catalog.elements[(0, _utils.returnReplaceableDeepSearchType)(item.get('type'))];
|
|
251
|
-
// get edge lines
|
|
252
|
-
var newWidth = item.properties.get('width').get('_length');
|
|
253
|
-
var wUnit = item.properties.get('width').get('_unit') || 'cm';
|
|
254
|
-
newWidth = (0, _convertUnits["default"])(newWidth).from(wUnit).to('cm');
|
|
255
|
-
var newDepth = item.properties.get('depth').get('_length');
|
|
256
|
-
var hUnit = item.properties.get('depth').get('_unit') || 'cm';
|
|
257
|
-
newDepth = (0, _convertUnits["default"])(newDepth).from(hUnit).to('cm');
|
|
258
|
-
if (item) {
|
|
259
|
-
// Get Outline Data of Selected Item
|
|
260
|
-
outline = element.info.outline;
|
|
261
|
-
if (outline) {
|
|
262
|
-
// Extract Points from `outline`
|
|
263
|
-
var outlinePaths = outline.paths;
|
|
264
|
-
var outlineWidth = outline.svgWidth;
|
|
265
|
-
var outlineHeight = outline.svgHeight;
|
|
266
|
-
var outlinePoints = []; // Hold Points Of SVG
|
|
267
|
-
var _iterator = _createForOfIteratorHelper(outlinePaths),
|
|
268
|
-
_step;
|
|
269
|
-
try {
|
|
270
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
271
|
-
var path = _step.value;
|
|
272
|
-
var _iterator2 = _createForOfIteratorHelper(path.subPaths),
|
|
273
|
-
_step2;
|
|
274
|
-
try {
|
|
275
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
276
|
-
var subPath = _step2.value;
|
|
277
|
-
outlinePoints = outlinePoints.concat(subPath.getPoints());
|
|
278
|
-
}
|
|
279
|
-
} catch (err) {
|
|
280
|
-
_iterator2.e(err);
|
|
281
|
-
} finally {
|
|
282
|
-
_iterator2.f();
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
} catch (err) {
|
|
286
|
-
_iterator.e(err);
|
|
287
|
-
} finally {
|
|
288
|
-
_iterator.f();
|
|
289
|
-
}
|
|
290
|
-
outline.reverse && outlinePoints.reverse();
|
|
291
|
-
for (var i = 0; i < outlinePoints.length - 1; i++) {
|
|
292
|
-
lines.push([_export.GeometryUtils.rotatePointAroundPoint((outlinePoints[i].x / outlineWidth - 0.5) * newWidth + item.x, (outlinePoints[i].y / outlineHeight - 0.5) * newDepth + item.y, item.x, item.y, item.rotation + 90), _export.GeometryUtils.rotatePointAroundPoint((outlinePoints[i + 1].x / outlineWidth - 0.5) * newWidth + item.x, (outlinePoints[i + 1].y / outlineHeight - 0.5) * newDepth + item.y, item.x, item.y, item.rotation + 90), _idBroker["default"].acquireID()]);
|
|
293
|
-
}
|
|
294
|
-
} else {
|
|
295
|
-
var pos = [[-1, -1], [1, -1], [1, 1], [-1, 1]];
|
|
296
|
-
for (var _i = 0; _i < 4; _i++) {
|
|
297
|
-
lines.push([_export.GeometryUtils.rotatePointAroundPoint(pos[_i][0] * newWidth / 2 + item.x, pos[_i][1] * newDepth / 2 + item.y, item.x, item.y, item.rotation), _export.GeometryUtils.rotatePointAroundPoint(pos[(_i + 1) % 4][0] * newWidth / 2 + item.x, pos[(_i + 1) % 4][1] * newDepth / 2 + item.y, item.x, item.y, item.rotation), _idBroker["default"].acquireID()]);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
if (item.layoutpos !== _constants.BASE_CABINET_LAYOUTPOS) {
|
|
302
|
-
lines = lines.filter(function (line) {
|
|
303
|
-
return !_export.GeometryUtils.isSnappedLine({
|
|
304
|
-
rect: [{
|
|
305
|
-
x: 0,
|
|
306
|
-
y: 0
|
|
307
|
-
}, {
|
|
308
|
-
x: 0,
|
|
309
|
-
y: 0
|
|
310
|
-
}, line[0], line[1]]
|
|
311
|
-
}, allLineRects);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
return lines;
|
|
315
|
-
}
|
|
316
|
-
function isParallelLines(line1, line2) {
|
|
317
|
-
var isParallel = false;
|
|
318
|
-
if (Math.abs(line1[0].y - line1[1].y) <= _constants.EPSILON && Math.abs(line2[0].y - line2[1].y) <= _constants.EPSILON) isParallel = true;
|
|
319
|
-
if (Math.abs(line1[0].x - line1[1].x) <= _constants.EPSILON && Math.abs(line2[0].x - line2[1].x) <= _constants.EPSILON) isParallel = true;
|
|
320
|
-
if (Math.abs((line1[0].x - line1[1].x) / (line1[0].y - line1[1].y) - (line2[0].x - line2[1].x) / (line2[0].y - line2[1].y)) <= _constants.EPSILON) isParallel = true;
|
|
321
|
-
if (isParallel) {
|
|
322
|
-
return true;
|
|
323
|
-
}
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
function isLinesOverlapped(line1, line2) {
|
|
327
|
-
return isParallelLines(line1, line2) && line1.some(function (l1) {
|
|
328
|
-
return line2.some(function (l2) {
|
|
329
|
-
return _export.GeometryUtils.samePoints(l1, l2);
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
function mergeOverlappedLines(line1, line2) {
|
|
334
|
-
var line1_idx = 0,
|
|
335
|
-
line2_idx = 0;
|
|
336
|
-
line1.forEach(function (l1, idx1) {
|
|
337
|
-
if (idx1 !== line1.length - 1) {
|
|
338
|
-
line2.forEach(function (l2, idx2) {
|
|
339
|
-
if (idx2 !== line2.length - 1) {
|
|
340
|
-
if (_export.GeometryUtils.samePoints(l1, l2)) {
|
|
341
|
-
line1_idx = idx1;
|
|
342
|
-
line2_idx = idx2;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
//If line1 's end point and line2 's start point is same, two lines merge into a line with
|
|
349
|
-
//the line1's start point as the start point and line2's end point as the end point.
|
|
350
|
-
if (line1_idx === 1) {
|
|
351
|
-
return [line1[1 - line1_idx], line2[1 - line2_idx], _idBroker["default"].acquireID()];
|
|
352
|
-
} else {
|
|
353
|
-
return [line2[1 - line2_idx], line1[1 - line1_idx], _idBroker["default"].acquireID()];
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Get the contour line array of moldingGroup items
|
|
359
|
-
* @param {*} moldingGroup
|
|
360
|
-
* @param {*} layer
|
|
361
|
-
* @param {*} catalog
|
|
362
|
-
* @returns contour line array of moldingGroup items
|
|
363
|
-
*/
|
|
364
|
-
function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
365
|
-
// wall lines
|
|
366
|
-
var allLineRects = _export.GeometryUtils.buildRectFromLines(layer, _export.GeometryUtils.getAllLines(layer));
|
|
367
|
-
var MGlines = [];
|
|
368
|
-
var MGlinesOtherSnapped = [];
|
|
369
|
-
var items = _toConsumableArray(moldingGroup.items);
|
|
370
|
-
// The other item's lines (these items are snapped to the moldingGroup items)
|
|
371
|
-
var itemsOtherSnapped = layer.items.toArray().filter(function (item) {
|
|
372
|
-
if (items.some(function (it) {
|
|
373
|
-
return item.id === it.id;
|
|
374
|
-
})) return false;
|
|
375
|
-
if (isItemSnappedGroup(item, items)) {
|
|
376
|
-
var itemLines = getLinesOfItem(item, allLineRects, catalog);
|
|
377
|
-
var itemAltitude = item.properties.get('altitude').get('_length');
|
|
378
|
-
var itemAltitudeUnit = item.properties.get('altitude').get('_unit');
|
|
379
|
-
itemAltitude = (0, _convertUnits["default"])(itemAltitude).from(itemAltitudeUnit).to('cm');
|
|
380
|
-
var itemHeight = item.properties.get('height').get('_length');
|
|
381
|
-
var itemHeightUnit = item.properties.get('height').get('_unit');
|
|
382
|
-
itemHeight = (0, _convertUnits["default"])(itemHeight).from(itemHeightUnit).to('cm');
|
|
383
|
-
itemLines.forEach(function (line) {
|
|
384
|
-
line.push({
|
|
385
|
-
altitude: itemAltitude,
|
|
386
|
-
height: itemHeight
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
MGlinesOtherSnapped = [].concat(_toConsumableArray(MGlinesOtherSnapped), _toConsumableArray(itemLines));
|
|
390
|
-
return true;
|
|
391
|
-
} else return false;
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
// get all lines of moldingGroup items
|
|
395
|
-
items.forEach(function (item) {
|
|
396
|
-
var itemAltitude = item.properties.get('altitude').get('_length');
|
|
397
|
-
var itemAltitudeUnit = item.properties.get('altitude').get('_unit');
|
|
398
|
-
itemAltitude = (0, _convertUnits["default"])(itemAltitude).from(itemAltitudeUnit).to('cm');
|
|
399
|
-
var itemHeight = item.properties.get('height').get('_length');
|
|
400
|
-
var itemHeightUnit = item.properties.get('height').get('_unit');
|
|
401
|
-
itemHeight = (0, _convertUnits["default"])(itemHeight).from(itemHeightUnit).to('cm');
|
|
402
|
-
var itemLines = getLinesOfItem(item, allLineRects, catalog);
|
|
403
|
-
|
|
404
|
-
// remove the edge that overlapped with other snapped items
|
|
405
|
-
itemLines = itemLines.filter(function (itLine) {
|
|
406
|
-
var ret = true;
|
|
407
|
-
var srcLine = {
|
|
408
|
-
x1: itLine[0].x,
|
|
409
|
-
y1: itLine[0].y,
|
|
410
|
-
x2: itLine[1].x,
|
|
411
|
-
y2: itLine[1].y
|
|
412
|
-
};
|
|
413
|
-
for (var j = 0; j < MGlinesOtherSnapped.length; j++) {
|
|
414
|
-
var bCheck = false;
|
|
415
|
-
switch (moldingGroup.location_type) {
|
|
416
|
-
case _constants.TOP_MOLDING_LOCATION:
|
|
417
|
-
bCheck = MGlinesOtherSnapped[j][3].altitude + MGlinesOtherSnapped[j][3].height > itemAltitude + itemHeight;
|
|
418
|
-
break;
|
|
419
|
-
case _constants.MIDDLE_MOLDING_LOCATION:
|
|
420
|
-
bCheck = true;
|
|
421
|
-
break;
|
|
422
|
-
case _constants.BOTTOM_MOLDING_LOCATION:
|
|
423
|
-
bCheck = MGlinesOtherSnapped[j][3].altitude < itemAltitude;
|
|
424
|
-
break;
|
|
425
|
-
}
|
|
426
|
-
if (item.category !== 'cabinet' || ![_constants.BASE_CABINET_LAYOUTPOS, _constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS].includes(item.layoutpos)) bCheck = true;
|
|
427
|
-
if (bCheck) {
|
|
428
|
-
var destLine = {
|
|
429
|
-
x1: MGlinesOtherSnapped[j][0].x,
|
|
430
|
-
y1: MGlinesOtherSnapped[j][0].y,
|
|
431
|
-
x2: MGlinesOtherSnapped[j][1].x,
|
|
432
|
-
y2: MGlinesOtherSnapped[j][1].y
|
|
433
|
-
};
|
|
434
|
-
var rst = _export.GeometryUtils.relationshipOfTwoOverlappedLines(srcLine, destLine);
|
|
435
|
-
if (rst.result === _constants.OVERLAP_SAME || rst.result === _constants.OVERLAP_INCLUDED) {
|
|
436
|
-
ret = false;
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
return ret;
|
|
442
|
-
});
|
|
443
|
-
MGlines = [].concat(_toConsumableArray(MGlines), _toConsumableArray(itemLines));
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
// Filtering overlapped edges and get contour edges
|
|
447
|
-
var removeLineIds = []; // remove the edge that fully overlapped to other edge
|
|
448
|
-
var newLines = []; // new countour edge segment that except the overlapped part
|
|
449
|
-
var _loop = function _loop(i) {
|
|
450
|
-
var srcLine = {
|
|
451
|
-
x1: MGlines[i][0].x,
|
|
452
|
-
y1: MGlines[i][0].y,
|
|
453
|
-
x2: MGlines[i][1].x,
|
|
454
|
-
y2: MGlines[i][1].y
|
|
455
|
-
};
|
|
456
|
-
var _loop3 = function _loop3(j) {
|
|
457
|
-
if (i === j) return 0; // continue
|
|
458
|
-
var destLine = {
|
|
459
|
-
x1: MGlines[j][0].x,
|
|
460
|
-
y1: MGlines[j][0].y,
|
|
461
|
-
x2: MGlines[j][1].x,
|
|
462
|
-
y2: MGlines[j][1].y
|
|
463
|
-
};
|
|
464
|
-
var rst = _export.GeometryUtils.relationshipOfTwoOverlappedLines(srcLine, destLine);
|
|
465
|
-
if (rst.result === _constants.OVERLAP_SAME || rst.result === _constants.OVERLAP_INCLUDED) {
|
|
466
|
-
removeLineIds.push(i);
|
|
467
|
-
return 1; // break
|
|
468
|
-
} else if (rst.result === _constants.OVERLAP_SOME) {
|
|
469
|
-
removeLineIds.push(i);
|
|
470
|
-
var lineSegs = getTrimmedContourLineSegs(rst.trimmedSegs, MGlines.filter(function (v, idx) {
|
|
471
|
-
return idx !== i && idx !== j;
|
|
472
|
-
}), 0);
|
|
473
|
-
if (lineSegs.length > 0) newLines = [].concat(_toConsumableArray(newLines), _toConsumableArray(lineSegs));
|
|
474
|
-
return 1; // break
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
_ret2;
|
|
478
|
-
for (var j = 0; j < MGlines.length; j++) {
|
|
479
|
-
_ret2 = _loop3(j);
|
|
480
|
-
if (_ret2 === 0) continue;
|
|
481
|
-
if (_ret2 === 1) break;
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
for (var i = 0; i < MGlines.length; i++) {
|
|
485
|
-
_loop(i);
|
|
486
|
-
}
|
|
487
|
-
MGlines = MGlines.filter(function (line, idx) {
|
|
488
|
-
return !removeLineIds.some(function (id) {
|
|
489
|
-
return idx === id;
|
|
490
|
-
});
|
|
491
|
-
});
|
|
492
|
-
if (newLines.length > 0) MGlines = [].concat(_toConsumableArray(MGlines), _toConsumableArray(newLines));
|
|
493
|
-
|
|
494
|
-
// merge the collinear linked lines to one line
|
|
495
|
-
var newMGlines = [];
|
|
496
|
-
var filteredMGlines = MGlines;
|
|
497
|
-
var _loop2 = function _loop2(_i2) {
|
|
498
|
-
if (filteredMGlines.length < 1) return 0; // break
|
|
499
|
-
if (!filteredMGlines.some(function (v) {
|
|
500
|
-
return v[2] === MGlines[_i2][2];
|
|
501
|
-
})) return 1; // continue
|
|
502
|
-
var mergedResult = getMergedLine(MGlines[_i2], filteredMGlines);
|
|
503
|
-
newMGlines.push(mergedResult.mergedLine);
|
|
504
|
-
filteredMGlines = mergedResult.filteredMGlines;
|
|
505
|
-
},
|
|
506
|
-
_ret;
|
|
507
|
-
for (var _i2 = 0; _i2 < MGlines.length; _i2++) {
|
|
508
|
-
_ret = _loop2(_i2);
|
|
509
|
-
if (_ret === 0) break;
|
|
510
|
-
if (_ret === 1) continue;
|
|
511
|
-
}
|
|
512
|
-
return newMGlines;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Get the line that colinear linked with [line], and merge them to a new line
|
|
517
|
-
* @param {*} line
|
|
518
|
-
* @param {*} MGlines
|
|
519
|
-
* @returns
|
|
520
|
-
* - returns merged new line
|
|
521
|
-
* - returns filtered new line group (remove linked line from [MGlines])
|
|
522
|
-
*/
|
|
523
|
-
function getMergedLine(line, MGlines) {
|
|
524
|
-
var newMGlines = MGlines.filter(function (v) {
|
|
525
|
-
return line[2] !== v[2];
|
|
526
|
-
});
|
|
527
|
-
var mergeResult = {
|
|
528
|
-
mergedLine: line,
|
|
529
|
-
filteredMGlines: newMGlines
|
|
530
|
-
};
|
|
531
|
-
var srcLine = {
|
|
532
|
-
x1: line[0].x,
|
|
533
|
-
y1: line[0].y,
|
|
534
|
-
x2: line[1].x,
|
|
535
|
-
y2: line[1].y
|
|
536
|
-
};
|
|
537
|
-
var _loop4 = function _loop4(i) {
|
|
538
|
-
var destLine = {
|
|
539
|
-
x1: newMGlines[i][0].x,
|
|
540
|
-
y1: newMGlines[i][0].y,
|
|
541
|
-
x2: newMGlines[i][1].x,
|
|
542
|
-
y2: newMGlines[i][1].y
|
|
543
|
-
};
|
|
544
|
-
var rst = _export.GeometryUtils.relationshipOfTwoOverlappedLines(srcLine, destLine);
|
|
545
|
-
if (rst.result === _constants.OVERLAP_LINK) {
|
|
546
|
-
var mergedLine = [{
|
|
547
|
-
x: rst.linkedLine.x1,
|
|
548
|
-
y: rst.linkedLine.y1
|
|
549
|
-
}, {
|
|
550
|
-
x: rst.linkedLine.x2,
|
|
551
|
-
y: rst.linkedLine.y2
|
|
552
|
-
}, _idBroker["default"].acquireID()];
|
|
553
|
-
mergeResult = getMergedLine(mergedLine, newMGlines.filter(function (v, idx) {
|
|
554
|
-
return idx !== i;
|
|
555
|
-
}));
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
for (var i = 0; i < newMGlines.length; i++) {
|
|
559
|
-
_loop4(i);
|
|
560
|
-
}
|
|
561
|
-
return mergeResult;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* Get the contour line segments from [lineSegs]
|
|
566
|
-
* @param {*} lineSegs
|
|
567
|
-
* @param {*} otherLines
|
|
568
|
-
* @returns
|
|
569
|
-
*/
|
|
570
|
-
function getTrimmedContourLineSegs(lineSegs, otherLines, cnt) {
|
|
571
|
-
try {
|
|
572
|
-
cnt++;
|
|
573
|
-
if (cnt > 5000) return [];
|
|
574
|
-
var returnSegs = [];
|
|
575
|
-
for (var i = 0; i < lineSegs.length; i++) {
|
|
576
|
-
var srcLine = {
|
|
577
|
-
x1: lineSegs[i].x1,
|
|
578
|
-
y1: lineSegs[i].y1,
|
|
579
|
-
x2: lineSegs[i].x2,
|
|
580
|
-
y2: lineSegs[i].y2
|
|
581
|
-
};
|
|
582
|
-
var bContourSeg = true;
|
|
583
|
-
var _loop5 = function _loop5(j) {
|
|
584
|
-
var destLine = {
|
|
585
|
-
x1: otherLines[j][0].x,
|
|
586
|
-
y1: otherLines[j][0].y,
|
|
587
|
-
x2: otherLines[j][1].x,
|
|
588
|
-
y2: otherLines[j][1].y
|
|
589
|
-
};
|
|
590
|
-
var rst = _export.GeometryUtils.relationshipOfTwoOverlappedLines(srcLine, destLine);
|
|
591
|
-
if (rst.result == _constants.OVERLAP_SAME || rst.result == _constants.OVERLAP_INCLUDED) {
|
|
592
|
-
bContourSeg = false;
|
|
593
|
-
return 0; // break
|
|
594
|
-
} else if (rst.result == _constants.OVERLAP_SOME) {
|
|
595
|
-
var tLineSegs = getTrimmedContourLineSegs(rst.trimmedSegs, otherLines.filter(function (v, idx) {
|
|
596
|
-
return idx !== j;
|
|
597
|
-
}), cnt);
|
|
598
|
-
if (tLineSegs.length > 0) returnSegs = [].concat(_toConsumableArray(returnSegs), _toConsumableArray(tLineSegs));
|
|
599
|
-
bContourSeg = false;
|
|
600
|
-
return 0; // break
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
_ret3;
|
|
604
|
-
for (var j = 0; j < otherLines.length; j++) {
|
|
605
|
-
_ret3 = _loop5(j);
|
|
606
|
-
if (_ret3 === 0) break;
|
|
607
|
-
}
|
|
608
|
-
if (bContourSeg) returnSegs.push([{
|
|
609
|
-
x: lineSegs[i].x1,
|
|
610
|
-
y: lineSegs[i].y1
|
|
611
|
-
}, {
|
|
612
|
-
x: lineSegs[i].x2,
|
|
613
|
-
y: lineSegs[i].y2
|
|
614
|
-
}, _idBroker["default"].acquireID()]);
|
|
615
|
-
}
|
|
616
|
-
return returnSegs;
|
|
617
|
-
} catch (e) {
|
|
618
|
-
console.log('molding catched :', e);
|
|
619
|
-
return [];
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function getLinesFromItems(moldingGroup, layer, catalog) {
|
|
623
|
-
var allLineRects = _export.GeometryUtils.buildRectFromLines(layer, _export.GeometryUtils.getAllLines(layer));
|
|
624
|
-
var items = _toConsumableArray(moldingGroup.items);
|
|
625
|
-
var MGlines = getLinesOfItem(items[0], allLineRects, catalog);
|
|
626
|
-
items = sortItemsByDistance(items, items[0]);
|
|
627
|
-
var _loop6 = function _loop6() {
|
|
628
|
-
var itemLines = getLinesOfItem(items[i], allLineRects, catalog);
|
|
629
|
-
var temp_MGLines = [];
|
|
630
|
-
MGlines.forEach(function (line) {
|
|
631
|
-
var idx = itemLines.findIndex(function (itemLine) {
|
|
632
|
-
return isLinesOverlapped(line, itemLine);
|
|
633
|
-
});
|
|
634
|
-
var curItemLine = itemLines[idx];
|
|
635
|
-
if (idx > -1) {
|
|
636
|
-
if (!(_export.GeometryUtils.samePoints(line[0], curItemLine[0]) && _export.GeometryUtils.samePoints(line[1], curItemLine[1]) || _export.GeometryUtils.samePoints(line[0], curItemLine[1]) && _export.GeometryUtils.samePoints(line[1], curItemLine[0]))) {
|
|
637
|
-
var MGLine = mergeOverlappedLines(line, curItemLine);
|
|
638
|
-
temp_MGLines.push(MGLine);
|
|
639
|
-
}
|
|
640
|
-
itemLines.splice(idx, 1);
|
|
641
|
-
} else {
|
|
642
|
-
temp_MGLines.push(line);
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
itemLines.forEach(function (itemLine) {
|
|
646
|
-
return temp_MGLines.push(itemLine);
|
|
647
|
-
});
|
|
648
|
-
MGlines = [].concat(temp_MGLines);
|
|
649
|
-
};
|
|
650
|
-
for (var i = 1; i < items.length; i++) {
|
|
651
|
-
_loop6();
|
|
652
|
-
}
|
|
653
|
-
// return MGlines;
|
|
654
|
-
var snapped_other_items = layer.items.toArray().filter(function (item) {
|
|
655
|
-
if (items.some(function (it) {
|
|
656
|
-
return item.id === it.id;
|
|
657
|
-
})) return false;
|
|
658
|
-
return isItemSnappedGroup(item, items);
|
|
659
|
-
});
|
|
660
|
-
snapped_other_items.forEach(function (item) {
|
|
661
|
-
var itemAltitude = item.properties.get('altitude').get('_length');
|
|
662
|
-
var itemAltitudeUnit = item.properties.get('altitude').get('_unit');
|
|
663
|
-
itemAltitude = (0, _convertUnits["default"])(itemAltitude).from(itemAltitudeUnit).to('cm');
|
|
664
|
-
var itemHeight = item.properties.get('height').get('_length');
|
|
665
|
-
var itemHeightUnit = item.properties.get('height').get('_unit');
|
|
666
|
-
itemHeight = (0, _convertUnits["default"])(itemHeight).from(itemHeightUnit).to('cm');
|
|
667
|
-
var mgroupAltitude = items[0].properties.get('altitude').get('_length');
|
|
668
|
-
var mgroupAltitudeUnit = items[0].properties.get('altitude').get('_unit');
|
|
669
|
-
mgroupAltitude = (0, _convertUnits["default"])(mgroupAltitude).from(mgroupAltitudeUnit).to('cm');
|
|
670
|
-
var mgroupHeight = items[0].properties.get('height').get('_length');
|
|
671
|
-
var mgroupHeightUnit = items[0].properties.get('height').get('_unit');
|
|
672
|
-
mgroupHeight = (0, _convertUnits["default"])(mgroupHeight).from(mgroupHeightUnit).to('cm');
|
|
673
|
-
var flag = false;
|
|
674
|
-
switch (moldingGroup.location_type) {
|
|
675
|
-
case _constants.TOP_MOLDING_LOCATION:
|
|
676
|
-
flag = itemAltitude + itemHeight > mgroupAltitude + mgroupHeight;
|
|
677
|
-
break;
|
|
678
|
-
case _constants.MIDDLE_MOLDING_LOCATION:
|
|
679
|
-
flag = true;
|
|
680
|
-
break;
|
|
681
|
-
case _constants.BOTTOM_MOLDING_LOCATION:
|
|
682
|
-
flag = itemAltitude < mgroupAltitude;
|
|
683
|
-
break;
|
|
684
|
-
}
|
|
685
|
-
if (item.category !== 'cabinet' || ![_constants.BASE_CABINET_LAYOUTPOS, _constants.WALL_CABINET_LAYOUTPOS, _constants.TALL_CABINET_LAYOUTPOS].includes(item.layoutpos)) flag = true;
|
|
686
|
-
if (flag) {
|
|
687
|
-
var itemLines = getLinesOfItem(item, allLineRects, catalog);
|
|
688
|
-
var temp_MGLines = [];
|
|
689
|
-
MGlines.forEach(function (mgl) {
|
|
690
|
-
var idx = itemLines.findIndex(function (itl) {
|
|
691
|
-
return isLinesOverlapped(mgl, itl);
|
|
692
|
-
});
|
|
693
|
-
var curITL = itemLines[idx];
|
|
694
|
-
if (idx > -1) {
|
|
695
|
-
if (getDelta(mgl[0], mgl[1], curITL[1], curITL[0]) < _constants.EPSILON || getDelta(mgl[0], mgl[1], curITL[0], curITL[1]) < _constants.EPSILON) {
|
|
696
|
-
if (_export.GeometryUtils.verticesDistance(mgl[0], mgl[1]) > _export.GeometryUtils.verticesDistance(curITL[0], curITL[1])) {
|
|
697
|
-
var MGLine = mergeOverlappedLines(mgl, curITL);
|
|
698
|
-
temp_MGLines.push(MGLine);
|
|
699
|
-
}
|
|
700
|
-
itemLines.splice(idx, 1);
|
|
701
|
-
} else {
|
|
702
|
-
temp_MGLines.push(mgl);
|
|
703
|
-
}
|
|
704
|
-
} else {
|
|
705
|
-
temp_MGLines.push(mgl);
|
|
706
|
-
}
|
|
707
|
-
});
|
|
708
|
-
MGlines = [].concat(temp_MGLines);
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
return MGlines;
|
|
712
|
-
}
|
|
713
|
-
function getMDPoints(newMD) {
|
|
714
|
-
if (newMD.lines.length < 1) return _objectSpread(_objectSpread({}, newMD), {}, {
|
|
715
|
-
pointGroups: []
|
|
716
|
-
});
|
|
717
|
-
// let maxX = newMD.lines[0][0].x,
|
|
718
|
-
var maxX = newMD.lines[0][0].x,
|
|
719
|
-
minX = newMD.lines[0][0].x;
|
|
720
|
-
var maxY = newMD.lines[0][0].y,
|
|
721
|
-
minY = newMD.lines[0][0].y;
|
|
722
|
-
newMD.lines.forEach(function (line) {
|
|
723
|
-
if (line[0].x > maxX) {
|
|
724
|
-
maxX = line[0].x;
|
|
725
|
-
}
|
|
726
|
-
if (line[0].x < minX) {
|
|
727
|
-
minX = line[0].x;
|
|
728
|
-
}
|
|
729
|
-
if (line[1].x > maxX) {
|
|
730
|
-
maxX = line[1].x;
|
|
731
|
-
}
|
|
732
|
-
if (line[1].x < minX) {
|
|
733
|
-
minX = line[1].x;
|
|
734
|
-
}
|
|
735
|
-
if (line[0].y > maxY) {
|
|
736
|
-
maxY = line[0].y;
|
|
737
|
-
}
|
|
738
|
-
if (line[0].y < minY) {
|
|
739
|
-
minY = line[0].y;
|
|
740
|
-
}
|
|
741
|
-
if (line[1].y > maxY) {
|
|
742
|
-
maxY = line[1].y;
|
|
743
|
-
}
|
|
744
|
-
if (line[1].y < minY) {
|
|
745
|
-
minY = line[1].y;
|
|
746
|
-
}
|
|
747
|
-
});
|
|
748
|
-
var cPos = {
|
|
749
|
-
x: (maxX + minX) / 2,
|
|
750
|
-
y: (maxY + minY) / 2
|
|
751
|
-
};
|
|
752
|
-
var newSize = _objectSpread(_objectSpread({}, newMD.size), {}, {
|
|
753
|
-
width: maxX - minX,
|
|
754
|
-
depth: maxY - minY
|
|
755
|
-
});
|
|
756
|
-
|
|
757
|
-
// get vertex points
|
|
758
|
-
var MDlines = _toConsumableArray(newMD.lines);
|
|
759
|
-
var pointGroups = [[]];
|
|
760
|
-
var flag = 1;
|
|
761
|
-
var i = 0;
|
|
762
|
-
var _loop7 = function _loop7() {
|
|
763
|
-
if (pointGroups[i].length === 0) {
|
|
764
|
-
pointGroups[i].push(new Three.Vector2(MDlines[0][0].x - cPos.x, MDlines[0][0].y - cPos.y), new Three.Vector2(MDlines[0][1].x - cPos.x, MDlines[0][1].y - cPos.y));
|
|
765
|
-
MDlines.splice(0, 1);
|
|
766
|
-
} else {
|
|
767
|
-
if (flag) {
|
|
768
|
-
var lastPoint = pointGroups[i][pointGroups[i].length - 1];
|
|
769
|
-
var res = MDlines.findIndex(function (a) {
|
|
770
|
-
return _export.GeometryUtils.samePoints({
|
|
771
|
-
x: a[0].x - cPos.x,
|
|
772
|
-
y: a[0].y - cPos.y
|
|
773
|
-
}, lastPoint) || _export.GeometryUtils.samePoints({
|
|
774
|
-
x: a[1].x - cPos.x,
|
|
775
|
-
y: a[1].y - cPos.y
|
|
776
|
-
}, lastPoint);
|
|
777
|
-
});
|
|
778
|
-
if (res > -1) {
|
|
779
|
-
var newPos = {
|
|
780
|
-
x: MDlines[res][0].x - cPos.x,
|
|
781
|
-
y: MDlines[res][0].y - cPos.y
|
|
782
|
-
};
|
|
783
|
-
if (_export.GeometryUtils.samePoints(newPos, lastPoint)) {
|
|
784
|
-
newPos = {
|
|
785
|
-
x: MDlines[res][1].x - cPos.x,
|
|
786
|
-
y: MDlines[res][1].y - cPos.y
|
|
787
|
-
};
|
|
788
|
-
}
|
|
789
|
-
pointGroups[i].push(new Three.Vector2(newPos.x, newPos.y));
|
|
790
|
-
MDlines.splice(res, 1);
|
|
791
|
-
} else {
|
|
792
|
-
flag = 0;
|
|
793
|
-
}
|
|
794
|
-
} else {
|
|
795
|
-
var firstPoint = pointGroups[i][0];
|
|
796
|
-
var _res = MDlines.findIndex(function (a) {
|
|
797
|
-
return _export.GeometryUtils.samePoints({
|
|
798
|
-
x: a[0].x - cPos.x,
|
|
799
|
-
y: a[0].y - cPos.y
|
|
800
|
-
}, firstPoint) || _export.GeometryUtils.samePoints({
|
|
801
|
-
x: a[1].x - cPos.x,
|
|
802
|
-
y: a[1].y - cPos.y
|
|
803
|
-
}, firstPoint);
|
|
804
|
-
});
|
|
805
|
-
if (_res > -1) {
|
|
806
|
-
var _newPos = {
|
|
807
|
-
x: MDlines[_res][0].x - cPos.x,
|
|
808
|
-
y: MDlines[_res][0].y - cPos.y
|
|
809
|
-
};
|
|
810
|
-
if (_export.GeometryUtils.samePoints(_newPos, firstPoint)) {
|
|
811
|
-
_newPos = {
|
|
812
|
-
x: MDlines[_res][1].x - cPos.x,
|
|
813
|
-
y: MDlines[_res][1].y - cPos.y
|
|
814
|
-
};
|
|
815
|
-
}
|
|
816
|
-
pointGroups[i] = [new Three.Vector2(_newPos.x, _newPos.y)].concat(_toConsumableArray(pointGroups[i]));
|
|
817
|
-
MDlines.splice(_res, 1);
|
|
818
|
-
} else {
|
|
819
|
-
flag = 1;
|
|
820
|
-
i++;
|
|
821
|
-
if (MDlines.length !== 0) pointGroups.push([]);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
while (MDlines.length !== 0) {
|
|
827
|
-
_loop7();
|
|
828
|
-
}
|
|
829
|
-
var z = newMD.items[0].properties.get('altitude').get('_length');
|
|
830
|
-
var zUnit = newMD.items[0].properties.get('altitude').get('_unit') || 'cm';
|
|
831
|
-
z = (0, _convertUnits["default"])(z).from(zUnit).to('cm');
|
|
832
|
-
var height = newMD.items[0].properties.get('height').get('_length');
|
|
833
|
-
var heightUnit = newMD.items[0].properties.get('height').get('_unit') || 'cm';
|
|
834
|
-
height = (0, _convertUnits["default"])(height).from(heightUnit).to('cm');
|
|
835
|
-
switch (newMD.location_type) {
|
|
836
|
-
case _constants.TOP_MOLDING_LOCATION:
|
|
837
|
-
z += height;
|
|
838
|
-
break;
|
|
839
|
-
case _constants.MIDDLE_MOLDING_LOCATION:
|
|
840
|
-
z += height / 2;
|
|
841
|
-
break;
|
|
842
|
-
case _constants.BOTTOM_MOLDING_LOCATION:
|
|
843
|
-
z += 0;
|
|
844
|
-
break;
|
|
845
|
-
default:
|
|
846
|
-
break;
|
|
847
|
-
}
|
|
848
|
-
return _objectSpread(_objectSpread({}, newMD), {}, {
|
|
849
|
-
pointGroups: pointGroups,
|
|
850
|
-
pos: _objectSpread(_objectSpread({}, cPos), {}, {
|
|
851
|
-
z: z
|
|
852
|
-
}),
|
|
853
|
-
size: newSize
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
function createMonldingGroup(oldMG, layer, molding, catalog) {
|
|
857
|
-
var newMG = _objectSpread({}, oldMG);
|
|
858
|
-
newMG.molding = molding;
|
|
859
|
-
newMG.lines = getLinesFromItems2(oldMG, layer, catalog);
|
|
860
|
-
newMG.lines.reverse();
|
|
861
|
-
newMG = getMDPoints(newMG);
|
|
862
|
-
return newMG;
|
|
863
|
-
}
|
|
864
|
-
//# sourceMappingURL=molding.js.map
|