@classcad/react-cad 3.0.0-beta.20261120101705 → 3.0.0-beta.20261120102655
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/CHANGELOG.md +5 -3
- package/build/components/UI/CAD/ViewPlugButtons.d.ts +2 -2
- package/build/components/UI/editors/LiveField.d.ts +15 -0
- package/build/icons/sheets.d.ts +1 -0
- package/build/icons/ui.d.ts +2 -0
- package/build/icons.cjs.js +2 -0
- package/build/icons.js +2 -0
- package/build/index.cjs.js +1688 -506
- package/build/index.d.ts +2 -1
- package/build/index.js +1662 -481
- package/build/plugins/SectionView/Root.d.ts +11 -0
- package/build/plugins/SectionView/View.d.ts +11 -0
- package/build/plugins/SectionView/caps.d.ts +25 -0
- package/build/plugins/SectionView/index.d.ts +30 -0
- package/build/plugins/SectionView/state.d.ts +36 -0
- package/build/utils/conversionUtils.d.ts +1 -1
- package/doc/api/icons.md +3 -1
- package/doc/api/panels.md +2 -2
- package/doc/api/tool-plugins.md +20 -0
- package/package.json +3 -3
- package/typedoc.json +2 -6
package/build/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import { getDrawing, createGraphicItem, MemberType, MathUtils, api, showMessage,
|
|
|
8
8
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
9
9
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
10
10
|
import { useFrame, useThree, createPortal, extend } from '@react-three/fiber';
|
|
11
|
-
import { Html, useCursor, Text, Merged, Grid } from '@react-three/drei';
|
|
11
|
+
import { Html, useCursor, Text, Merged, Grid, PivotControls } from '@react-three/drei';
|
|
12
12
|
import { useStore, create } from 'zustand';
|
|
13
13
|
import { createStore } from 'zustand/vanilla';
|
|
14
|
-
import { Menu as Menu$2, Mentions as Mentions$2, Button as Button$1, Tooltip as Tooltip$1, Input as Input$2, Select as Select$1, Slider as Slider$1, Checkbox as Checkbox$1, Collapse as Collapse$2, Tag, AutoComplete as AutoComplete$1, Alert as Alert$1, Tabs as Tabs$1, Dropdown as Dropdown$1, Badge as Badge$1, Modal, Skeleton } from 'antd';
|
|
14
|
+
import { Menu as Menu$2, Mentions as Mentions$2, Button as Button$1, Tooltip as Tooltip$1, Input as Input$2, Select as Select$1, Slider as Slider$1, Checkbox as Checkbox$1, Collapse as Collapse$2, Tag, AutoComplete as AutoComplete$1, Alert as Alert$1, Tabs as Tabs$1, Dropdown as Dropdown$1, Divider as Divider$1, Badge as Badge$1, Modal, Skeleton } from 'antd';
|
|
15
15
|
import DOMPurify from 'dompurify';
|
|
16
16
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/esm/objectDestructuringEmpty';
|
|
17
17
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
@@ -19,6 +19,8 @@ import { v4 } from 'uuid';
|
|
|
19
19
|
import { LineGeometry } from 'three/addons/lines/LineGeometry.js';
|
|
20
20
|
import styled, { css, createGlobalStyle } from 'styled-components';
|
|
21
21
|
import { shallow } from 'zustand/shallow';
|
|
22
|
+
import { uniformArray, renderGroup, cameraProjectionMatrix, vec4, mix, vec3, float, Fn, Loop, If, min, select as select$1, uniform, texture, screenUV, frontFacing, positionView, abs, materialColor, cameraWorldMatrix, fwidth, smoothstep, fract, clamp as clamp$1 } from 'three/tsl';
|
|
23
|
+
import { NodeMaterial, RendererUtils, MeshLambertNodeMaterial } from 'three/webgpu';
|
|
22
24
|
import { RgbaColorPicker } from 'react-colorful';
|
|
23
25
|
import { extname, basename } from 'path-browserify';
|
|
24
26
|
import { Pass, Selection as Selection$1, CopyMaterial, Effect, EffectAttribute, BlendFunction, ClearPass, ShaderPass } from 'postprocessing';
|
|
@@ -77,8 +79,8 @@ function useDrawingStr(drawingId, selector) {
|
|
|
77
79
|
return res || EMPTYSTR;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
function ownKeys$
|
|
81
|
-
function _objectSpread$
|
|
82
|
+
function ownKeys$H(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; }
|
|
83
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
82
84
|
function getGraphicId(tree, refOrObjId) {
|
|
83
85
|
const res = {
|
|
84
86
|
graphicId: refOrObjId,
|
|
@@ -141,7 +143,7 @@ function useSelectedItems(drawingId, refOrObjIds) {
|
|
|
141
143
|
// TODO: !!!Important!!! This may not properly create a graphic item for BuerliGeometry in assembly mode, but currently it isn't needed to.
|
|
142
144
|
const prodId = getDrawing(drawingId).structure.currentProduct;
|
|
143
145
|
const createSelItem = React__default.useCallback(element => {
|
|
144
|
-
return createGraphicItem(prodId, _objectSpread$
|
|
146
|
+
return createGraphicItem(prodId, _objectSpread$H(_objectSpread$H({}, element), {}, {
|
|
145
147
|
productId: prodId
|
|
146
148
|
}));
|
|
147
149
|
}, [prodId]);
|
|
@@ -166,7 +168,7 @@ function useSelectedItems(drawingId, refOrObjIds) {
|
|
|
166
168
|
if (grIds && grIds.length > 0) {
|
|
167
169
|
const elem = cont.map[Number(grIds[0])];
|
|
168
170
|
if (elem) {
|
|
169
|
-
elems.push(_objectSpread$
|
|
171
|
+
elems.push(_objectSpread$H(_objectSpread$H({}, elem), {}, {
|
|
170
172
|
graphicId: contId,
|
|
171
173
|
type: cont.type
|
|
172
174
|
}));
|
|
@@ -890,6 +892,8 @@ const ui = sheet$1({
|
|
|
890
892
|
measure: [['tone', 'M12.6 3 17 7.4 7.4 17 3 12.6Z'], ['', 'M12.6 3 17 7.4 7.4 17 3 12.6ZM9.9 5.7l2 2M7.2 8.4l2 2']],
|
|
891
893
|
/** A block in a dashed cube: the bounding box. */
|
|
892
894
|
bbox: [['sub-dash', cube.lines], ['tone', inner.top], ['', inner.lines]],
|
|
895
|
+
/** A block cut through by a plane: the section view. */
|
|
896
|
+
section: [['sub-dash', 'M10 3.4v13.2'], ['tone', rect(3.6, 5, 6.4, 10, 1.2)], ['', rect(3.6, 5, 6.4, 10, 1.2) + 'M10 5h5.2c.7 0 1.2.5 1.2 1.2v7.6c0 .7-.5 1.2-1.2 1.2H10']],
|
|
893
897
|
// ---- the view: all of it in the frame; along a plane's normal; how a body looks
|
|
894
898
|
/** Corners around a square: zoom to fit. */
|
|
895
899
|
zoomFit: [['', 'M3.5 7V3.5H7M13 3.5h3.5V7M16.5 13v3.5H13M7 16.5H3.5V13'], ['tone', rect(7.2, 7.2, 5.6, 5.6, 1)], ['', rect(7.2, 7.2, 5.6, 5.6, 1)]],
|
|
@@ -1898,8 +1902,8 @@ const mates = sheet$1({
|
|
|
1898
1902
|
gear: [['sub', circle(BIG[0], BIG[1], 4.6) + circle(LITTLE[0], LITTLE[1], 3.3)], ['sub-fill', dot$1(BIG, 1.1) + dot$1(LITTLE, 1.1)], ['', turn(BIG, 7.2, 7.2, 100, 185, 2.4) + turn(LITTLE, 5.8, 5.8, -80, -165, 2.4)]]
|
|
1899
1903
|
});
|
|
1900
1904
|
|
|
1901
|
-
function ownKeys$
|
|
1902
|
-
function _objectSpread$
|
|
1905
|
+
function ownKeys$G(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; }
|
|
1906
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1903
1907
|
|
|
1904
1908
|
// what stands in for a drawing that is not there: a dashed square. It is meant to be seen.
|
|
1905
1909
|
const missing = sheet$1({
|
|
@@ -1934,7 +1938,7 @@ const missing = sheet$1({
|
|
|
1934
1938
|
*
|
|
1935
1939
|
* @category Icons
|
|
1936
1940
|
*/
|
|
1937
|
-
const drawings = _objectSpread$
|
|
1941
|
+
const drawings = _objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G(_objectSpread$G({}, missing), ui), glyphs$1), mates), params), axes$1), sketch), refs), features);
|
|
1938
1942
|
|
|
1939
1943
|
/**
|
|
1940
1944
|
* The name of one of the app's drawings: a key of {@link icons}, such as `'extrusion'`.
|
|
@@ -1952,8 +1956,8 @@ const drawingOf = name => {
|
|
|
1952
1956
|
return (_name = drawings[name]) != null ? _name : drawings.missing;
|
|
1953
1957
|
};
|
|
1954
1958
|
|
|
1955
|
-
function ownKeys$
|
|
1956
|
-
function _objectSpread$
|
|
1959
|
+
function ownKeys$F(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; }
|
|
1960
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1957
1961
|
const PREFIX = 'rcad:';
|
|
1958
1962
|
|
|
1959
1963
|
/**
|
|
@@ -2060,7 +2064,7 @@ const Icon$1 = /*#__PURE__*/React__default.memo(function Icon({
|
|
|
2060
2064
|
viewBox: "0 0 20 20",
|
|
2061
2065
|
width: size,
|
|
2062
2066
|
height: size,
|
|
2063
|
-
style: _objectSpread$
|
|
2067
|
+
style: _objectSpread$F({
|
|
2064
2068
|
['--w']: weight(size) * 20 / size
|
|
2065
2069
|
}, style),
|
|
2066
2070
|
role: title ? 'img' : undefined,
|
|
@@ -2260,7 +2264,7 @@ function iconSvg(name, inks, size = 20, seenAt = size) {
|
|
|
2260
2264
|
*/
|
|
2261
2265
|
const iconDataUrl = (name, inks, size = 20, seenAt = size) => 'data:image/svg+xml;utf8,' + encodeURIComponent(iconSvg(name, inks, size, seenAt));
|
|
2262
2266
|
|
|
2263
|
-
const _excluded$
|
|
2267
|
+
const _excluded$8 = ["children", "format", "className"],
|
|
2264
2268
|
_excluded2 = ["children", "iconSrc", "titleText", "className"],
|
|
2265
2269
|
_excluded3 = ["children", "className"],
|
|
2266
2270
|
_excluded4 = ["className"],
|
|
@@ -2292,7 +2296,7 @@ function Group(_ref) {
|
|
|
2292
2296
|
format,
|
|
2293
2297
|
className
|
|
2294
2298
|
} = _ref,
|
|
2295
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2299
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2296
2300
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
2297
2301
|
className: cx('rcad-el rcad-el-group', className),
|
|
2298
2302
|
"data-format": format === 'Columns' ? 'columns' : 'rows'
|
|
@@ -2750,8 +2754,8 @@ const Wrapper = ({
|
|
|
2750
2754
|
}, children));
|
|
2751
2755
|
};
|
|
2752
2756
|
|
|
2753
|
-
function ownKeys$
|
|
2754
|
-
function _objectSpread$
|
|
2757
|
+
function ownKeys$E(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; }
|
|
2758
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2755
2759
|
const getTextContent = element => {
|
|
2756
2760
|
var _element$textContent;
|
|
2757
2761
|
return ((_element$textContent = element.textContent) == null ? void 0 : _element$textContent.replace(/\xa0/g, ' ')) || '';
|
|
@@ -3142,7 +3146,7 @@ const Mentions = ({
|
|
|
3142
3146
|
index = Number((indexClass == null ? void 0 : indexClass.slice(16)) || '-1');
|
|
3143
3147
|
}
|
|
3144
3148
|
if (index !== -1) {
|
|
3145
|
-
selRangeRef.current = _objectSpread$
|
|
3149
|
+
selRangeRef.current = _objectSpread$E({}, linkRangesRef.current[index]);
|
|
3146
3150
|
selRangeRef.current.start = selRangeRef.current.start + 6;
|
|
3147
3151
|
restoreSelection(ref, selRangeRef.current.start, selRangeRef.current.end);
|
|
3148
3152
|
setCurExprLink(index);
|
|
@@ -3713,8 +3717,8 @@ const isDiameter = dim => ccUtils.base.isA(dim.class, ScgClassType.CCDiameterDim
|
|
|
3713
3717
|
*/
|
|
3714
3718
|
const isTreeInstance = clazz => ccUtils.base.isA(clazz, ScgClassType.IProductReference) || ccUtils.base.isA(clazz, ScgClassType.CCAssembly);
|
|
3715
3719
|
|
|
3716
|
-
function ownKeys$
|
|
3717
|
-
function _objectSpread$
|
|
3720
|
+
function ownKeys$D(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; }
|
|
3721
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3718
3722
|
const isFeatureActive = drawingId => {
|
|
3719
3723
|
const activePlugin = getDrawing(drawingId).plugin.active.feature;
|
|
3720
3724
|
if (activePlugin) {
|
|
@@ -3780,8 +3784,8 @@ const appApi = (set, get) => ({
|
|
|
3780
3784
|
const curInstance = api.getState().drawing.refs[drawingId].structure.currentInstance;
|
|
3781
3785
|
res = state.assemblyTree.prodStack;
|
|
3782
3786
|
curInstance && res.push(curInstance);
|
|
3783
|
-
return _objectSpread$
|
|
3784
|
-
assemblyTree: _objectSpread$
|
|
3787
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3788
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3785
3789
|
prodStack: [...res]
|
|
3786
3790
|
})
|
|
3787
3791
|
});
|
|
@@ -3800,8 +3804,8 @@ const appApi = (set, get) => ({
|
|
|
3800
3804
|
set(state => {
|
|
3801
3805
|
const res = state.assemblyTree.prodStack;
|
|
3802
3806
|
res.pop();
|
|
3803
|
-
return _objectSpread$
|
|
3804
|
-
assemblyTree: _objectSpread$
|
|
3807
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3808
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3805
3809
|
prodStack: [...res]
|
|
3806
3810
|
})
|
|
3807
3811
|
});
|
|
@@ -3812,8 +3816,8 @@ const appApi = (set, get) => ({
|
|
|
3812
3816
|
}).catch(console.warn);
|
|
3813
3817
|
},
|
|
3814
3818
|
clearProdStack: () => {
|
|
3815
|
-
set(state => _objectSpread$
|
|
3816
|
-
assemblyTree: _objectSpread$
|
|
3819
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3820
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3817
3821
|
prodStack: []
|
|
3818
3822
|
})
|
|
3819
3823
|
}));
|
|
@@ -3823,7 +3827,7 @@ const appApi = (set, get) => ({
|
|
|
3823
3827
|
return;
|
|
3824
3828
|
}
|
|
3825
3829
|
const visibleMap = get().assemblyTree.visibleMap;
|
|
3826
|
-
const visibleMapNew = _objectSpread$
|
|
3830
|
+
const visibleMapNew = _objectSpread$D({}, visibleMap);
|
|
3827
3831
|
instanceIds.forEach((instanceId, index) => {
|
|
3828
3832
|
const objIds = objIdsArr[index];
|
|
3829
3833
|
const visible = visibleMap[instanceId];
|
|
@@ -3838,8 +3842,8 @@ const appApi = (set, get) => ({
|
|
|
3838
3842
|
});
|
|
3839
3843
|
visibleMapNew[instanceId] = visibleNew;
|
|
3840
3844
|
});
|
|
3841
|
-
set(state => _objectSpread$
|
|
3842
|
-
assemblyTree: _objectSpread$
|
|
3845
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3846
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3843
3847
|
visibleMap: visibleMapNew
|
|
3844
3848
|
})
|
|
3845
3849
|
}));
|
|
@@ -3850,7 +3854,7 @@ const appApi = (set, get) => ({
|
|
|
3850
3854
|
return;
|
|
3851
3855
|
}
|
|
3852
3856
|
set(state => {
|
|
3853
|
-
const ofDrawing = _objectSpread$
|
|
3857
|
+
const ofDrawing = _objectSpread$D({}, state.assemblyTree.expanded[drawingId]);
|
|
3854
3858
|
instanceIds.forEach(id => {
|
|
3855
3859
|
if (value) {
|
|
3856
3860
|
ofDrawing[id] = true;
|
|
@@ -3858,11 +3862,11 @@ const appApi = (set, get) => ({
|
|
|
3858
3862
|
delete ofDrawing[id];
|
|
3859
3863
|
}
|
|
3860
3864
|
});
|
|
3861
|
-
const expanded = _objectSpread$
|
|
3865
|
+
const expanded = _objectSpread$D(_objectSpread$D({}, state.assemblyTree.expanded), {}, {
|
|
3862
3866
|
[drawingId]: ofDrawing
|
|
3863
3867
|
});
|
|
3864
|
-
return _objectSpread$
|
|
3865
|
-
assemblyTree: _objectSpread$
|
|
3868
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3869
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3866
3870
|
expanded
|
|
3867
3871
|
})
|
|
3868
3872
|
});
|
|
@@ -3895,10 +3899,10 @@ const appApi = (set, get) => ({
|
|
|
3895
3899
|
/** Folds every row of a drawing. */
|
|
3896
3900
|
clearExpanded: drawingId => {
|
|
3897
3901
|
set(state => {
|
|
3898
|
-
const expanded = _objectSpread$
|
|
3902
|
+
const expanded = _objectSpread$D({}, state.assemblyTree.expanded);
|
|
3899
3903
|
delete expanded[drawingId];
|
|
3900
|
-
return _objectSpread$
|
|
3901
|
-
assemblyTree: _objectSpread$
|
|
3904
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3905
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3902
3906
|
expanded
|
|
3903
3907
|
})
|
|
3904
3908
|
});
|
|
@@ -3907,7 +3911,7 @@ const appApi = (set, get) => ({
|
|
|
3907
3911
|
},
|
|
3908
3912
|
blankDiv: {
|
|
3909
3913
|
show: callback => {
|
|
3910
|
-
set(state => _objectSpread$
|
|
3914
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3911
3915
|
blankDiv: {
|
|
3912
3916
|
isActive: true,
|
|
3913
3917
|
onClose: callback
|
|
@@ -3915,7 +3919,7 @@ const appApi = (set, get) => ({
|
|
|
3915
3919
|
}));
|
|
3916
3920
|
},
|
|
3917
3921
|
hide: () => {
|
|
3918
|
-
set(state => _objectSpread$
|
|
3922
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3919
3923
|
blankDiv: {
|
|
3920
3924
|
isActive: false,
|
|
3921
3925
|
onClose: undefined
|
|
@@ -4032,8 +4036,8 @@ const BlankDiv = () => {
|
|
|
4032
4036
|
}) : null;
|
|
4033
4037
|
};
|
|
4034
4038
|
|
|
4035
|
-
function ownKeys$
|
|
4036
|
-
function _objectSpread$
|
|
4039
|
+
function ownKeys$C(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; }
|
|
4040
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4037
4041
|
|
|
4038
4042
|
/**
|
|
4039
4043
|
* The theme's mode: light, or dark.
|
|
@@ -4052,7 +4056,7 @@ function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
4052
4056
|
* @category Theme
|
|
4053
4057
|
*/
|
|
4054
4058
|
|
|
4055
|
-
const withLegacy = (t, rgb) => _objectSpread$
|
|
4059
|
+
const withLegacy = (t, rgb) => _objectSpread$C(_objectSpread$C({}, t), {}, {
|
|
4056
4060
|
background: t.chrome,
|
|
4057
4061
|
text: t.ink,
|
|
4058
4062
|
textSecondary: t.mute,
|
|
@@ -4344,8 +4348,8 @@ const setRCadThemeMode = (mode, options) => useThemeStore.getState().setMode(mod
|
|
|
4344
4348
|
/** Hook returning the canvas label background color (numeric, for measure/dimension labels). */
|
|
4345
4349
|
const useCanvasLabelBg = () => useThemeStore(s => s.colors.canvasLabelBg);
|
|
4346
4350
|
|
|
4347
|
-
function ownKeys$
|
|
4348
|
-
function _objectSpread$
|
|
4351
|
+
function ownKeys$B(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; }
|
|
4352
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4349
4353
|
|
|
4350
4354
|
/**
|
|
4351
4355
|
* The colours of what is drawn on the stage: the model, what lies over it, a sketch on its sheet.
|
|
@@ -4357,7 +4361,7 @@ function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
4357
4361
|
* @category Theme
|
|
4358
4362
|
*/
|
|
4359
4363
|
|
|
4360
|
-
const stageOf = (t, rest) => _objectSpread$
|
|
4364
|
+
const stageOf = (t, rest) => _objectSpread$B({
|
|
4361
4365
|
body: t.geoBody,
|
|
4362
4366
|
edge: t.geoEdge,
|
|
4363
4367
|
hover: t.geoHover,
|
|
@@ -5404,7 +5408,7 @@ class ErrorBoundary extends React__default.Component {
|
|
|
5404
5408
|
}
|
|
5405
5409
|
}
|
|
5406
5410
|
|
|
5407
|
-
function ViewImpl$
|
|
5411
|
+
function ViewImpl$e({
|
|
5408
5412
|
drawingId,
|
|
5409
5413
|
pluginId
|
|
5410
5414
|
}) {
|
|
@@ -5431,17 +5435,17 @@ function ViewImpl$d({
|
|
|
5431
5435
|
*
|
|
5432
5436
|
* @internal
|
|
5433
5437
|
*/
|
|
5434
|
-
function View$
|
|
5438
|
+
function View$o({
|
|
5435
5439
|
drawingId,
|
|
5436
5440
|
pluginId
|
|
5437
5441
|
}) {
|
|
5438
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
5442
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$e, {
|
|
5439
5443
|
drawingId: drawingId,
|
|
5440
5444
|
pluginId: pluginId
|
|
5441
5445
|
}));
|
|
5442
5446
|
}
|
|
5443
5447
|
|
|
5444
|
-
function RootImpl$
|
|
5448
|
+
function RootImpl$K({
|
|
5445
5449
|
drawingId,
|
|
5446
5450
|
pluginId
|
|
5447
5451
|
}) {
|
|
@@ -5471,11 +5475,11 @@ function RootImpl$J({
|
|
|
5471
5475
|
*
|
|
5472
5476
|
* @internal
|
|
5473
5477
|
*/
|
|
5474
|
-
const Root$
|
|
5478
|
+
const Root$K = ({
|
|
5475
5479
|
drawingId,
|
|
5476
5480
|
pluginId
|
|
5477
5481
|
}) => {
|
|
5478
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
5482
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$K, {
|
|
5479
5483
|
drawingId: drawingId,
|
|
5480
5484
|
pluginId: pluginId
|
|
5481
5485
|
}));
|
|
@@ -5511,7 +5515,7 @@ const Root$J = ({
|
|
|
5511
5515
|
*
|
|
5512
5516
|
* @internal
|
|
5513
5517
|
*/
|
|
5514
|
-
const description$
|
|
5518
|
+
const description$K = {
|
|
5515
5519
|
name: 'Dimensions',
|
|
5516
5520
|
version: '1.0.0',
|
|
5517
5521
|
author: 'Ledas',
|
|
@@ -5522,11 +5526,11 @@ const description$J = {
|
|
|
5522
5526
|
}
|
|
5523
5527
|
};
|
|
5524
5528
|
|
|
5525
|
-
var index$
|
|
5529
|
+
var index$K = /*#__PURE__*/Object.freeze({
|
|
5526
5530
|
__proto__: null,
|
|
5527
|
-
Root: Root$
|
|
5528
|
-
View: View$
|
|
5529
|
-
description: description$
|
|
5531
|
+
Root: Root$K,
|
|
5532
|
+
View: View$o,
|
|
5533
|
+
description: description$K
|
|
5530
5534
|
});
|
|
5531
5535
|
|
|
5532
5536
|
// The names the field and tool icons had as image files (@buerli.io/icons/SVG/<name>.svg), each now
|
|
@@ -5848,7 +5852,7 @@ function useRefsParam(drawingId, objId, memberName) {
|
|
|
5848
5852
|
|
|
5849
5853
|
/**
|
|
5850
5854
|
* Checks if the drawing's active feature is a sketch (`CC_Sketch`): {@link useIsSketchActive}, outside of a component.
|
|
5851
|
-
*
|
|
5855
|
+
*
|
|
5852
5856
|
* @param drawingId The drawing id.
|
|
5853
5857
|
* @returns True if CC_Sketch is active, false otherwise.
|
|
5854
5858
|
*/
|
|
@@ -6597,8 +6601,8 @@ const useEditMode = drawingId => {
|
|
|
6597
6601
|
}, [rootClass, currProdClass]);
|
|
6598
6602
|
};
|
|
6599
6603
|
|
|
6600
|
-
function ownKeys$
|
|
6601
|
-
function _objectSpread$
|
|
6604
|
+
function ownKeys$A(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; }
|
|
6605
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6602
6606
|
|
|
6603
6607
|
/**
|
|
6604
6608
|
* The selection scope of a mate picked into an assembly constraint's field: a work coordinate system of an instance.
|
|
@@ -6713,7 +6717,7 @@ function useMateSelection(drawingId, path, csysId) {
|
|
|
6713
6717
|
}));
|
|
6714
6718
|
const handlers = React__default.useMemo(() => {
|
|
6715
6719
|
if (isSelectable) {
|
|
6716
|
-
return _objectSpread$
|
|
6720
|
+
return _objectSpread$A(_objectSpread$A({}, hHandlers), sHandlers);
|
|
6717
6721
|
}
|
|
6718
6722
|
return {};
|
|
6719
6723
|
}, [isSelectable, hHandlers, sHandlers]);
|
|
@@ -6981,8 +6985,8 @@ const MultiSelect = ({
|
|
|
6981
6985
|
}, children);
|
|
6982
6986
|
};
|
|
6983
6987
|
|
|
6984
|
-
function ownKeys$
|
|
6985
|
-
function _objectSpread$
|
|
6988
|
+
function ownKeys$z(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; }
|
|
6989
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6986
6990
|
|
|
6987
6991
|
/**
|
|
6988
6992
|
* The selection scope of a structure object picked into a field: a feature, a sketch, a work plane, an instance.
|
|
@@ -7111,7 +7115,7 @@ function useSelect(drawingId, objId, objectPath) {
|
|
|
7111
7115
|
multiSelect(objId);
|
|
7112
7116
|
return;
|
|
7113
7117
|
}
|
|
7114
|
-
const interactionInfo = createInfo(_objectSpread$
|
|
7118
|
+
const interactionInfo = createInfo(_objectSpread$z({
|
|
7115
7119
|
objectId: objId,
|
|
7116
7120
|
prodRefId: productId
|
|
7117
7121
|
}, objectPath ? {
|
|
@@ -7144,7 +7148,7 @@ function useHover(drawingId, objId, objectPath) {
|
|
|
7144
7148
|
return;
|
|
7145
7149
|
}
|
|
7146
7150
|
stopPropagation == null || stopPropagation();
|
|
7147
|
-
const interactionInfo = createInfo(_objectSpread$
|
|
7151
|
+
const interactionInfo = createInfo(_objectSpread$z({
|
|
7148
7152
|
objectId: objId,
|
|
7149
7153
|
prodRefId: productId
|
|
7150
7154
|
}, objectPath ? {
|
|
@@ -7259,7 +7263,7 @@ function useTreeObjInteraction(drawingId, objId, objectPath) {
|
|
|
7259
7263
|
const isGSelected = useIsGSelected(drawingId, objId);
|
|
7260
7264
|
const isSHovered = useIsSHovered(drawingId, objId);
|
|
7261
7265
|
const isSSelected = useIsSSelected(drawingId, objId);
|
|
7262
|
-
const handlers = React__default.useMemo(() => _objectSpread$
|
|
7266
|
+
const handlers = React__default.useMemo(() => _objectSpread$z(_objectSpread$z({}, hHandlers), sHandlers), [hHandlers, sHandlers]);
|
|
7263
7267
|
return React__default.useMemo(() => {
|
|
7264
7268
|
// If the handlers are switched off immediately after the selection (workplane selection for the sketcher), then hovered would keep being equal to true, making the mesh color wrong.
|
|
7265
7269
|
// Thus, we don't want hovered and selected to be true if the object is not selectable.
|
|
@@ -7810,7 +7814,7 @@ const PluginBounds = ({
|
|
|
7810
7814
|
}, children));
|
|
7811
7815
|
};
|
|
7812
7816
|
|
|
7813
|
-
const _excluded$
|
|
7817
|
+
const _excluded$7 = ["children"];
|
|
7814
7818
|
// The tooltip is not laid out while it is closed, so its width is assumed: 250, and 10 off its element.
|
|
7815
7819
|
const TOOLTIP_WIDTH = 260;
|
|
7816
7820
|
const PluginTooltip = _ref => {
|
|
@@ -7818,7 +7822,7 @@ const PluginTooltip = _ref => {
|
|
|
7818
7822
|
let {
|
|
7819
7823
|
children
|
|
7820
7824
|
} = _ref,
|
|
7821
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7825
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
7822
7826
|
const ref = React__default.useRef(null);
|
|
7823
7827
|
const pluginBoundsRef = (_React$useContext = React__default.useContext(PBContext)) == null ? void 0 : _React$useContext.pluginBoundsRef;
|
|
7824
7828
|
const [, setStateChanged] = React__default.useState(0); // We want to trigger a rerender when the tooltip is opened
|
|
@@ -8765,8 +8769,8 @@ const FtPluginValidator = ({
|
|
|
8765
8769
|
}, children);
|
|
8766
8770
|
};
|
|
8767
8771
|
|
|
8768
|
-
function ownKeys$
|
|
8769
|
-
function _objectSpread$
|
|
8772
|
+
function ownKeys$y(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; }
|
|
8773
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8770
8774
|
const flipTypesMap = {
|
|
8771
8775
|
[0]: 'X',
|
|
8772
8776
|
[1]: '-X',
|
|
@@ -8806,7 +8810,7 @@ const reorientTypesMap = {
|
|
|
8806
8810
|
* ```
|
|
8807
8811
|
*/
|
|
8808
8812
|
const mateV1 = mateV0 => {
|
|
8809
|
-
return _objectSpread$
|
|
8813
|
+
return _objectSpread$y(_objectSpread$y({}, mateV0), {}, {
|
|
8810
8814
|
/** Which of the coordinate system's axes is the mate's main one, and which way. */
|
|
8811
8815
|
flip: flipTypesMap[mateV0.flip],
|
|
8812
8816
|
/** How far the mate is turned about its main axis, in degrees. */
|
|
@@ -8898,7 +8902,7 @@ function useBoolTypeStore(drawingId, objId) {
|
|
|
8898
8902
|
isChanged
|
|
8899
8903
|
});
|
|
8900
8904
|
}
|
|
8901
|
-
function RootImpl$
|
|
8905
|
+
function RootImpl$J({
|
|
8902
8906
|
drawingId,
|
|
8903
8907
|
pluginId
|
|
8904
8908
|
}) {
|
|
@@ -8953,14 +8957,14 @@ function RootImpl$I({
|
|
|
8953
8957
|
*
|
|
8954
8958
|
* @internal
|
|
8955
8959
|
*/
|
|
8956
|
-
const Root$
|
|
8960
|
+
const Root$J = ({
|
|
8957
8961
|
drawingId,
|
|
8958
8962
|
pluginId
|
|
8959
8963
|
}) => {
|
|
8960
8964
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
8961
8965
|
drawingId: drawingId,
|
|
8962
8966
|
pluginId: pluginId
|
|
8963
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
8967
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$J, {
|
|
8964
8968
|
drawingId: drawingId,
|
|
8965
8969
|
pluginId: pluginId
|
|
8966
8970
|
}));
|
|
@@ -9002,7 +9006,7 @@ const Root$I = ({
|
|
|
9002
9006
|
*
|
|
9003
9007
|
* @internal
|
|
9004
9008
|
*/
|
|
9005
|
-
const description$
|
|
9009
|
+
const description$J = {
|
|
9006
9010
|
name: 'Boolean',
|
|
9007
9011
|
version: '1.0.0',
|
|
9008
9012
|
author: 'Ledas',
|
|
@@ -9019,14 +9023,14 @@ const description$I = {
|
|
|
9019
9023
|
}
|
|
9020
9024
|
};
|
|
9021
9025
|
|
|
9022
|
-
var index$
|
|
9026
|
+
var index$J = /*#__PURE__*/Object.freeze({
|
|
9023
9027
|
__proto__: null,
|
|
9024
|
-
Root: Root$
|
|
9025
|
-
description: description$
|
|
9028
|
+
Root: Root$J,
|
|
9029
|
+
description: description$J
|
|
9026
9030
|
});
|
|
9027
9031
|
|
|
9028
|
-
function ownKeys$
|
|
9029
|
-
function _objectSpread$
|
|
9032
|
+
function ownKeys$x(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; }
|
|
9033
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9030
9034
|
function parseVal(val) {
|
|
9031
9035
|
const float = Number(val);
|
|
9032
9036
|
if (!isNaN(float)) {
|
|
@@ -9146,13 +9150,13 @@ const PointEditor = ({
|
|
|
9146
9150
|
newVals[i] = val;
|
|
9147
9151
|
}
|
|
9148
9152
|
});
|
|
9149
|
-
return _objectSpread$
|
|
9153
|
+
return _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9150
9154
|
displayVals: newVals
|
|
9151
9155
|
});
|
|
9152
9156
|
})).catch();
|
|
9153
9157
|
} else {
|
|
9154
9158
|
const value = defaults;
|
|
9155
|
-
setDisplayState(state => _objectSpread$
|
|
9159
|
+
setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9156
9160
|
displayVals: [value.x, value.y, value.z]
|
|
9157
9161
|
}));
|
|
9158
9162
|
}
|
|
@@ -9169,7 +9173,7 @@ const PointEditor = ({
|
|
|
9169
9173
|
editMode: false,
|
|
9170
9174
|
displayVals: point !== null ? [point.x, point.y, point.z] : [...state.displayVals]
|
|
9171
9175
|
}));
|
|
9172
|
-
}).catch(() => setDisplayState(state => _objectSpread$
|
|
9176
|
+
}).catch(() => setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9173
9177
|
editMode: false
|
|
9174
9178
|
})));
|
|
9175
9179
|
} else {
|
|
@@ -9197,7 +9201,7 @@ const PointEditor = ({
|
|
|
9197
9201
|
// its three numbers as one field: a click takes it up
|
|
9198
9202
|
React__default.createElement("div", {
|
|
9199
9203
|
className: "rcad-point",
|
|
9200
|
-
onClick: () => setDisplayState(state => _objectSpread$
|
|
9204
|
+
onClick: () => setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9201
9205
|
editMode: true
|
|
9202
9206
|
}))
|
|
9203
9207
|
}, components.map(([value, isExpr, prefix], i) => /*#__PURE__*/React__default.createElement(PluginTooltip, {
|
|
@@ -9340,8 +9344,8 @@ function useBoolParam(drawingId, objId, memberName) {
|
|
|
9340
9344
|
});
|
|
9341
9345
|
}
|
|
9342
9346
|
|
|
9343
|
-
function ownKeys$
|
|
9344
|
-
function _objectSpread$
|
|
9347
|
+
function ownKeys$w(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; }
|
|
9348
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9345
9349
|
var Members$A = /*#__PURE__*/function (Members) {
|
|
9346
9350
|
Members["Type"] = "extrudeType";
|
|
9347
9351
|
Members["Direction"] = "extrudeDir";
|
|
@@ -9401,7 +9405,7 @@ function useExtBoolTypeStore(drawingId, objId) {
|
|
|
9401
9405
|
isChanged
|
|
9402
9406
|
});
|
|
9403
9407
|
}
|
|
9404
|
-
const RootImpl$
|
|
9408
|
+
const RootImpl$I = ({
|
|
9405
9409
|
drawingId,
|
|
9406
9410
|
pluginId
|
|
9407
9411
|
}) => {
|
|
@@ -9448,10 +9452,10 @@ const RootImpl$H = ({
|
|
|
9448
9452
|
cur.setUserValue(next);
|
|
9449
9453
|
if (next !== NEW_BODY$1) capEndsRef.current.setUserValue(true);
|
|
9450
9454
|
}, []);
|
|
9451
|
-
const capEndsProxy = React__default.useMemo(() => _objectSpread$
|
|
9455
|
+
const capEndsProxy = React__default.useMemo(() => _objectSpread$w(_objectSpread$w({}, capEnds), {}, {
|
|
9452
9456
|
setUserValue: setCapEndsWrapped
|
|
9453
9457
|
}), [capEnds, setCapEndsWrapped]);
|
|
9454
|
-
const boolTypeProxy = React__default.useMemo(() => _objectSpread$
|
|
9458
|
+
const boolTypeProxy = React__default.useMemo(() => _objectSpread$w(_objectSpread$w({}, boolType), {}, {
|
|
9455
9459
|
setUserValue: setBoolTypeWrapped
|
|
9456
9460
|
}), [boolType, setBoolTypeWrapped]);
|
|
9457
9461
|
const sketchId = React__default.useRef(NOCCID);
|
|
@@ -9599,14 +9603,14 @@ const RootImpl$H = ({
|
|
|
9599
9603
|
*
|
|
9600
9604
|
* @internal
|
|
9601
9605
|
*/
|
|
9602
|
-
const Root$
|
|
9606
|
+
const Root$I = ({
|
|
9603
9607
|
drawingId,
|
|
9604
9608
|
pluginId
|
|
9605
9609
|
}) => {
|
|
9606
9610
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
9607
9611
|
drawingId: drawingId,
|
|
9608
9612
|
pluginId: pluginId
|
|
9609
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
9613
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$I, {
|
|
9610
9614
|
drawingId: drawingId,
|
|
9611
9615
|
pluginId: pluginId
|
|
9612
9616
|
}));
|
|
@@ -9897,7 +9901,7 @@ const HUD$1 = ({
|
|
|
9897
9901
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, createPortal(/*#__PURE__*/React__default.createElement("group", null, children), layer.scene));
|
|
9898
9902
|
};
|
|
9899
9903
|
|
|
9900
|
-
function ViewImpl$
|
|
9904
|
+
function ViewImpl$d({
|
|
9901
9905
|
drawingId,
|
|
9902
9906
|
pluginId
|
|
9903
9907
|
}) {
|
|
@@ -9928,7 +9932,7 @@ function ViewImpl$c({
|
|
|
9928
9932
|
*
|
|
9929
9933
|
* @internal
|
|
9930
9934
|
*/
|
|
9931
|
-
const View$
|
|
9935
|
+
const View$n = ({
|
|
9932
9936
|
drawingId,
|
|
9933
9937
|
pluginId
|
|
9934
9938
|
}) => {
|
|
@@ -9936,7 +9940,7 @@ const View$m = ({
|
|
|
9936
9940
|
drawingId: drawingId,
|
|
9937
9941
|
pluginId: pluginId,
|
|
9938
9942
|
inCanvas: true
|
|
9939
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
9943
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$d, {
|
|
9940
9944
|
drawingId: drawingId,
|
|
9941
9945
|
pluginId: pluginId
|
|
9942
9946
|
}));
|
|
@@ -9983,7 +9987,7 @@ const View$m = ({
|
|
|
9983
9987
|
*
|
|
9984
9988
|
* @internal
|
|
9985
9989
|
*/
|
|
9986
|
-
const description$
|
|
9990
|
+
const description$I = {
|
|
9987
9991
|
name: 'Extrusion',
|
|
9988
9992
|
version: '1.0.0',
|
|
9989
9993
|
author: 'Ledas',
|
|
@@ -9998,11 +10002,11 @@ const description$H = {
|
|
|
9998
10002
|
disableToggleView: true // if true, toggling the visiblity (eye icon) of the View component of this plugin is disabled
|
|
9999
10003
|
};
|
|
10000
10004
|
|
|
10001
|
-
var index$
|
|
10005
|
+
var index$I = /*#__PURE__*/Object.freeze({
|
|
10002
10006
|
__proto__: null,
|
|
10003
|
-
Root: Root$
|
|
10004
|
-
View: View$
|
|
10005
|
-
description: description$
|
|
10007
|
+
Root: Root$I,
|
|
10008
|
+
View: View$n,
|
|
10009
|
+
description: description$I
|
|
10006
10010
|
});
|
|
10007
10011
|
|
|
10008
10012
|
var Members$z = /*#__PURE__*/function (Members) {
|
|
@@ -10031,7 +10035,7 @@ const typesCaptions$4 = {
|
|
|
10031
10035
|
[ExtrusionType$1.SYMMETRIC]: 'Type: Symmetric',
|
|
10032
10036
|
[ExtrusionType$1.UP]: 'Type: Up'
|
|
10033
10037
|
};
|
|
10034
|
-
const RootImpl$
|
|
10038
|
+
const RootImpl$H = ({
|
|
10035
10039
|
drawingId,
|
|
10036
10040
|
pluginId
|
|
10037
10041
|
}) => {
|
|
@@ -10186,20 +10190,20 @@ const RootImpl$G = ({
|
|
|
10186
10190
|
*
|
|
10187
10191
|
* @internal
|
|
10188
10192
|
*/
|
|
10189
|
-
const Root$
|
|
10193
|
+
const Root$H = ({
|
|
10190
10194
|
drawingId,
|
|
10191
10195
|
pluginId
|
|
10192
10196
|
}) => {
|
|
10193
10197
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
10194
10198
|
drawingId: drawingId,
|
|
10195
10199
|
pluginId: pluginId
|
|
10196
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
10200
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$H, {
|
|
10197
10201
|
drawingId: drawingId,
|
|
10198
10202
|
pluginId: pluginId
|
|
10199
10203
|
}));
|
|
10200
10204
|
};
|
|
10201
10205
|
|
|
10202
|
-
function ViewImpl$
|
|
10206
|
+
function ViewImpl$c({
|
|
10203
10207
|
drawingId,
|
|
10204
10208
|
pluginId
|
|
10205
10209
|
}) {
|
|
@@ -10230,7 +10234,7 @@ function ViewImpl$b({
|
|
|
10230
10234
|
*
|
|
10231
10235
|
* @internal
|
|
10232
10236
|
*/
|
|
10233
|
-
const View$
|
|
10237
|
+
const View$m = ({
|
|
10234
10238
|
drawingId,
|
|
10235
10239
|
pluginId
|
|
10236
10240
|
}) => {
|
|
@@ -10238,7 +10242,7 @@ const View$l = ({
|
|
|
10238
10242
|
drawingId: drawingId,
|
|
10239
10243
|
pluginId: pluginId,
|
|
10240
10244
|
inCanvas: true
|
|
10241
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
10245
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$c, {
|
|
10242
10246
|
drawingId: drawingId,
|
|
10243
10247
|
pluginId: pluginId
|
|
10244
10248
|
}));
|
|
@@ -10283,7 +10287,7 @@ const View$l = ({
|
|
|
10283
10287
|
*
|
|
10284
10288
|
* @internal
|
|
10285
10289
|
*/
|
|
10286
|
-
const description$
|
|
10290
|
+
const description$H = {
|
|
10287
10291
|
name: 'Twist',
|
|
10288
10292
|
version: '1.0.0',
|
|
10289
10293
|
author: 'Ledas',
|
|
@@ -10298,15 +10302,15 @@ const description$G = {
|
|
|
10298
10302
|
disableToggleView: true // if true, toggling the visiblity (eye icon) of the View component of this plugin is disabled
|
|
10299
10303
|
};
|
|
10300
10304
|
|
|
10301
|
-
var index$
|
|
10305
|
+
var index$H = /*#__PURE__*/Object.freeze({
|
|
10302
10306
|
__proto__: null,
|
|
10303
|
-
Root: Root$
|
|
10304
|
-
View: View$
|
|
10305
|
-
description: description$
|
|
10307
|
+
Root: Root$H,
|
|
10308
|
+
View: View$m,
|
|
10309
|
+
description: description$H
|
|
10306
10310
|
});
|
|
10307
10311
|
|
|
10308
|
-
function ownKeys$
|
|
10309
|
-
function _objectSpread$
|
|
10312
|
+
function ownKeys$v(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; }
|
|
10313
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10310
10314
|
var Members$y = /*#__PURE__*/function (Members) {
|
|
10311
10315
|
Members["Axis"] = "references";
|
|
10312
10316
|
Members["Inverted"] = "inverted";
|
|
@@ -10352,7 +10356,7 @@ function useRevBoolTypeStore(drawingId, objId) {
|
|
|
10352
10356
|
isChanged
|
|
10353
10357
|
});
|
|
10354
10358
|
}
|
|
10355
|
-
const RootImpl$
|
|
10359
|
+
const RootImpl$G = ({
|
|
10356
10360
|
drawingId,
|
|
10357
10361
|
pluginId
|
|
10358
10362
|
}) => {
|
|
@@ -10385,7 +10389,7 @@ const RootImpl$F = ({
|
|
|
10385
10389
|
const next = typeof v === 'function' ? v(cur.userValue) : v;
|
|
10386
10390
|
cur.setUserValue(next);
|
|
10387
10391
|
}, []);
|
|
10388
|
-
const boolTypeProxy = React__default.useMemo(() => _objectSpread$
|
|
10392
|
+
const boolTypeProxy = React__default.useMemo(() => _objectSpread$v(_objectSpread$v({}, boolType), {}, {
|
|
10389
10393
|
setUserValue: setBoolTypeWrapped
|
|
10390
10394
|
}), [boolType, setBoolTypeWrapped]);
|
|
10391
10395
|
const sketchId = React__default.useRef(NOCCID);
|
|
@@ -10484,14 +10488,14 @@ const RootImpl$F = ({
|
|
|
10484
10488
|
*
|
|
10485
10489
|
* @internal
|
|
10486
10490
|
*/
|
|
10487
|
-
const Root$
|
|
10491
|
+
const Root$G = ({
|
|
10488
10492
|
drawingId,
|
|
10489
10493
|
pluginId
|
|
10490
10494
|
}) => {
|
|
10491
10495
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
10492
10496
|
drawingId: drawingId,
|
|
10493
10497
|
pluginId: pluginId
|
|
10494
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
10498
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$G, {
|
|
10495
10499
|
drawingId: drawingId,
|
|
10496
10500
|
pluginId: pluginId
|
|
10497
10501
|
}));
|
|
@@ -10531,7 +10535,7 @@ const Root$F = ({
|
|
|
10531
10535
|
*
|
|
10532
10536
|
* @internal
|
|
10533
10537
|
*/
|
|
10534
|
-
const description$
|
|
10538
|
+
const description$G = {
|
|
10535
10539
|
name: 'Revolve',
|
|
10536
10540
|
version: '1.0.0',
|
|
10537
10541
|
author: 'Ledas',
|
|
@@ -10540,10 +10544,10 @@ const description$F = {
|
|
|
10540
10544
|
global: false
|
|
10541
10545
|
};
|
|
10542
10546
|
|
|
10543
|
-
var index$
|
|
10547
|
+
var index$G = /*#__PURE__*/Object.freeze({
|
|
10544
10548
|
__proto__: null,
|
|
10545
|
-
Root: Root$
|
|
10546
|
-
description: description$
|
|
10549
|
+
Root: Root$G,
|
|
10550
|
+
description: description$G
|
|
10547
10551
|
});
|
|
10548
10552
|
|
|
10549
10553
|
/**
|
|
@@ -10613,7 +10617,7 @@ var Members$x = /*#__PURE__*/function (Members) {
|
|
|
10613
10617
|
Members["Length"] = "length";
|
|
10614
10618
|
return Members;
|
|
10615
10619
|
}(Members$x || {});
|
|
10616
|
-
function RootImpl$
|
|
10620
|
+
function RootImpl$F({
|
|
10617
10621
|
drawingId,
|
|
10618
10622
|
pluginId
|
|
10619
10623
|
}) {
|
|
@@ -10693,14 +10697,14 @@ function RootImpl$E({
|
|
|
10693
10697
|
*
|
|
10694
10698
|
* @internal
|
|
10695
10699
|
*/
|
|
10696
|
-
const Root$
|
|
10700
|
+
const Root$F = ({
|
|
10697
10701
|
drawingId,
|
|
10698
10702
|
pluginId
|
|
10699
10703
|
}) => {
|
|
10700
10704
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
10701
10705
|
drawingId: drawingId,
|
|
10702
10706
|
pluginId: pluginId
|
|
10703
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
10707
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$F, {
|
|
10704
10708
|
drawingId: drawingId,
|
|
10705
10709
|
pluginId: pluginId
|
|
10706
10710
|
}));
|
|
@@ -10737,7 +10741,7 @@ const Root$E = ({
|
|
|
10737
10741
|
*
|
|
10738
10742
|
* @internal
|
|
10739
10743
|
*/
|
|
10740
|
-
const description$
|
|
10744
|
+
const description$F = {
|
|
10741
10745
|
name: 'Box',
|
|
10742
10746
|
version: '1.0.0',
|
|
10743
10747
|
author: 'Ledas',
|
|
@@ -10746,10 +10750,10 @@ const description$E = {
|
|
|
10746
10750
|
global: false
|
|
10747
10751
|
};
|
|
10748
10752
|
|
|
10749
|
-
var index$
|
|
10753
|
+
var index$F = /*#__PURE__*/Object.freeze({
|
|
10750
10754
|
__proto__: null,
|
|
10751
|
-
Root: Root$
|
|
10752
|
-
description: description$
|
|
10755
|
+
Root: Root$F,
|
|
10756
|
+
description: description$F
|
|
10753
10757
|
});
|
|
10754
10758
|
|
|
10755
10759
|
var Members$w = /*#__PURE__*/function (Members) {
|
|
@@ -10757,7 +10761,7 @@ var Members$w = /*#__PURE__*/function (Members) {
|
|
|
10757
10761
|
Members["Radius"] = "radius";
|
|
10758
10762
|
return Members;
|
|
10759
10763
|
}(Members$w || {});
|
|
10760
|
-
function RootImpl$
|
|
10764
|
+
function RootImpl$E({
|
|
10761
10765
|
drawingId,
|
|
10762
10766
|
pluginId
|
|
10763
10767
|
}) {
|
|
@@ -10811,14 +10815,14 @@ function RootImpl$D({
|
|
|
10811
10815
|
*
|
|
10812
10816
|
* @internal
|
|
10813
10817
|
*/
|
|
10814
|
-
const Root$
|
|
10818
|
+
const Root$E = ({
|
|
10815
10819
|
drawingId,
|
|
10816
10820
|
pluginId
|
|
10817
10821
|
}) => {
|
|
10818
10822
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
10819
10823
|
drawingId: drawingId,
|
|
10820
10824
|
pluginId: pluginId
|
|
10821
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
10825
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$E, {
|
|
10822
10826
|
drawingId: drawingId,
|
|
10823
10827
|
pluginId: pluginId
|
|
10824
10828
|
}));
|
|
@@ -10856,7 +10860,7 @@ const Root$D = ({
|
|
|
10856
10860
|
*
|
|
10857
10861
|
* @internal
|
|
10858
10862
|
*/
|
|
10859
|
-
const description$
|
|
10863
|
+
const description$E = {
|
|
10860
10864
|
name: 'Sphere',
|
|
10861
10865
|
version: '1.0.0',
|
|
10862
10866
|
author: 'Ledas',
|
|
@@ -10865,10 +10869,10 @@ const description$D = {
|
|
|
10865
10869
|
global: false
|
|
10866
10870
|
};
|
|
10867
10871
|
|
|
10868
|
-
var index$
|
|
10872
|
+
var index$E = /*#__PURE__*/Object.freeze({
|
|
10869
10873
|
__proto__: null,
|
|
10870
|
-
Root: Root$
|
|
10871
|
-
description: description$
|
|
10874
|
+
Root: Root$E,
|
|
10875
|
+
description: description$E
|
|
10872
10876
|
});
|
|
10873
10877
|
|
|
10874
10878
|
var Members$v = /*#__PURE__*/function (Members) {
|
|
@@ -10877,7 +10881,7 @@ var Members$v = /*#__PURE__*/function (Members) {
|
|
|
10877
10881
|
Members["Height"] = "height";
|
|
10878
10882
|
return Members;
|
|
10879
10883
|
}(Members$v || {});
|
|
10880
|
-
function RootImpl$
|
|
10884
|
+
function RootImpl$D({
|
|
10881
10885
|
drawingId,
|
|
10882
10886
|
pluginId
|
|
10883
10887
|
}) {
|
|
@@ -10944,14 +10948,14 @@ function RootImpl$C({
|
|
|
10944
10948
|
*
|
|
10945
10949
|
* @internal
|
|
10946
10950
|
*/
|
|
10947
|
-
const Root$
|
|
10951
|
+
const Root$D = ({
|
|
10948
10952
|
drawingId,
|
|
10949
10953
|
pluginId
|
|
10950
10954
|
}) => {
|
|
10951
10955
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
10952
10956
|
drawingId: drawingId,
|
|
10953
10957
|
pluginId: pluginId
|
|
10954
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
10958
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$D, {
|
|
10955
10959
|
drawingId: drawingId,
|
|
10956
10960
|
pluginId: pluginId
|
|
10957
10961
|
}));
|
|
@@ -10989,7 +10993,7 @@ const Root$C = ({
|
|
|
10989
10993
|
*
|
|
10990
10994
|
* @internal
|
|
10991
10995
|
*/
|
|
10992
|
-
const description$
|
|
10996
|
+
const description$D = {
|
|
10993
10997
|
name: 'Cylinder',
|
|
10994
10998
|
version: '1.0.0',
|
|
10995
10999
|
author: 'Ledas',
|
|
@@ -10998,17 +11002,17 @@ const description$C = {
|
|
|
10998
11002
|
global: false
|
|
10999
11003
|
};
|
|
11000
11004
|
|
|
11001
|
-
var index$
|
|
11005
|
+
var index$D = /*#__PURE__*/Object.freeze({
|
|
11002
11006
|
__proto__: null,
|
|
11003
|
-
Root: Root$
|
|
11004
|
-
description: description$
|
|
11007
|
+
Root: Root$D,
|
|
11008
|
+
description: description$D
|
|
11005
11009
|
});
|
|
11006
11010
|
|
|
11007
11011
|
var Members$u = /*#__PURE__*/function (Members) {
|
|
11008
11012
|
Members["References"] = "references";
|
|
11009
11013
|
return Members;
|
|
11010
11014
|
}(Members$u || {});
|
|
11011
|
-
const RootImpl$
|
|
11015
|
+
const RootImpl$C = ({
|
|
11012
11016
|
drawingId,
|
|
11013
11017
|
pluginId
|
|
11014
11018
|
}) => {
|
|
@@ -11065,14 +11069,14 @@ const RootImpl$B = ({
|
|
|
11065
11069
|
*
|
|
11066
11070
|
* @internal
|
|
11067
11071
|
*/
|
|
11068
|
-
const Root$
|
|
11072
|
+
const Root$C = ({
|
|
11069
11073
|
drawingId,
|
|
11070
11074
|
pluginId
|
|
11071
11075
|
}) => {
|
|
11072
11076
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11073
11077
|
drawingId: drawingId,
|
|
11074
11078
|
pluginId: pluginId
|
|
11075
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11079
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$C, {
|
|
11076
11080
|
drawingId: drawingId,
|
|
11077
11081
|
pluginId: pluginId
|
|
11078
11082
|
}));
|
|
@@ -11180,7 +11184,7 @@ const CompositeCurveObj = ({
|
|
|
11180
11184
|
})));
|
|
11181
11185
|
};
|
|
11182
11186
|
|
|
11183
|
-
const ViewImpl$
|
|
11187
|
+
const ViewImpl$b = ({
|
|
11184
11188
|
drawingId,
|
|
11185
11189
|
pluginId
|
|
11186
11190
|
}) => {
|
|
@@ -11218,7 +11222,7 @@ const ViewImpl$a = ({
|
|
|
11218
11222
|
*
|
|
11219
11223
|
* @internal
|
|
11220
11224
|
*/
|
|
11221
|
-
const View$
|
|
11225
|
+
const View$l = ({
|
|
11222
11226
|
drawingId,
|
|
11223
11227
|
pluginId
|
|
11224
11228
|
}) => {
|
|
@@ -11226,7 +11230,7 @@ const View$k = ({
|
|
|
11226
11230
|
drawingId: drawingId,
|
|
11227
11231
|
pluginId: pluginId,
|
|
11228
11232
|
inCanvas: true
|
|
11229
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
11233
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$b, {
|
|
11230
11234
|
drawingId: drawingId,
|
|
11231
11235
|
pluginId: pluginId
|
|
11232
11236
|
}));
|
|
@@ -11264,7 +11268,7 @@ const View$k = ({
|
|
|
11264
11268
|
*
|
|
11265
11269
|
* @internal
|
|
11266
11270
|
*/
|
|
11267
|
-
const description$
|
|
11271
|
+
const description$C = {
|
|
11268
11272
|
name: 'CompositeCurve',
|
|
11269
11273
|
version: '1.0.0',
|
|
11270
11274
|
author: 'AWV',
|
|
@@ -11273,11 +11277,11 @@ const description$B = {
|
|
|
11273
11277
|
global: false
|
|
11274
11278
|
};
|
|
11275
11279
|
|
|
11276
|
-
var index$
|
|
11280
|
+
var index$C = /*#__PURE__*/Object.freeze({
|
|
11277
11281
|
__proto__: null,
|
|
11278
|
-
Root: Root$
|
|
11279
|
-
View: View$
|
|
11280
|
-
description: description$
|
|
11282
|
+
Root: Root$C,
|
|
11283
|
+
View: View$l,
|
|
11284
|
+
description: description$C
|
|
11281
11285
|
});
|
|
11282
11286
|
|
|
11283
11287
|
var Members$t = /*#__PURE__*/function (Members) {
|
|
@@ -11287,7 +11291,7 @@ var Members$t = /*#__PURE__*/function (Members) {
|
|
|
11287
11291
|
Members["Height"] = "height";
|
|
11288
11292
|
return Members;
|
|
11289
11293
|
}(Members$t || {});
|
|
11290
|
-
function RootImpl$
|
|
11294
|
+
function RootImpl$B({
|
|
11291
11295
|
drawingId,
|
|
11292
11296
|
pluginId
|
|
11293
11297
|
}) {
|
|
@@ -11367,14 +11371,14 @@ function RootImpl$A({
|
|
|
11367
11371
|
*
|
|
11368
11372
|
* @internal
|
|
11369
11373
|
*/
|
|
11370
|
-
const Root$
|
|
11374
|
+
const Root$B = ({
|
|
11371
11375
|
drawingId,
|
|
11372
11376
|
pluginId
|
|
11373
11377
|
}) => {
|
|
11374
11378
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11375
11379
|
drawingId: drawingId,
|
|
11376
11380
|
pluginId: pluginId
|
|
11377
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11381
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$B, {
|
|
11378
11382
|
drawingId: drawingId,
|
|
11379
11383
|
pluginId: pluginId
|
|
11380
11384
|
}));
|
|
@@ -11413,7 +11417,7 @@ const Root$A = ({
|
|
|
11413
11417
|
*
|
|
11414
11418
|
* @internal
|
|
11415
11419
|
*/
|
|
11416
|
-
const description$
|
|
11420
|
+
const description$B = {
|
|
11417
11421
|
name: 'Cone',
|
|
11418
11422
|
version: '1.0.0',
|
|
11419
11423
|
author: 'Ledas',
|
|
@@ -11422,10 +11426,10 @@ const description$A = {
|
|
|
11422
11426
|
global: false
|
|
11423
11427
|
};
|
|
11424
11428
|
|
|
11425
|
-
var index$
|
|
11429
|
+
var index$B = /*#__PURE__*/Object.freeze({
|
|
11426
11430
|
__proto__: null,
|
|
11427
|
-
Root: Root$
|
|
11428
|
-
description: description$
|
|
11431
|
+
Root: Root$B,
|
|
11432
|
+
description: description$B
|
|
11429
11433
|
});
|
|
11430
11434
|
|
|
11431
11435
|
var Members$s = /*#__PURE__*/function (Members) {
|
|
@@ -11433,7 +11437,7 @@ var Members$s = /*#__PURE__*/function (Members) {
|
|
|
11433
11437
|
Members["Radius"] = "radius";
|
|
11434
11438
|
return Members;
|
|
11435
11439
|
}(Members$s || {});
|
|
11436
|
-
const RootImpl$
|
|
11440
|
+
const RootImpl$A = ({
|
|
11437
11441
|
drawingId,
|
|
11438
11442
|
pluginId
|
|
11439
11443
|
}) => {
|
|
@@ -11477,14 +11481,14 @@ const RootImpl$z = ({
|
|
|
11477
11481
|
*
|
|
11478
11482
|
* @internal
|
|
11479
11483
|
*/
|
|
11480
|
-
const Root$
|
|
11484
|
+
const Root$A = ({
|
|
11481
11485
|
drawingId,
|
|
11482
11486
|
pluginId
|
|
11483
11487
|
}) => {
|
|
11484
11488
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11485
11489
|
drawingId: drawingId,
|
|
11486
11490
|
pluginId: pluginId
|
|
11487
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11491
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$A, {
|
|
11488
11492
|
drawingId: drawingId,
|
|
11489
11493
|
pluginId: pluginId
|
|
11490
11494
|
}));
|
|
@@ -11522,7 +11526,7 @@ const Root$z = ({
|
|
|
11522
11526
|
*
|
|
11523
11527
|
* @internal
|
|
11524
11528
|
*/
|
|
11525
|
-
const description$
|
|
11529
|
+
const description$A = {
|
|
11526
11530
|
name: 'Fillet',
|
|
11527
11531
|
version: '1.0.0',
|
|
11528
11532
|
author: 'Ledas',
|
|
@@ -11531,10 +11535,10 @@ const description$z = {
|
|
|
11531
11535
|
global: false
|
|
11532
11536
|
};
|
|
11533
11537
|
|
|
11534
|
-
var index$
|
|
11538
|
+
var index$A = /*#__PURE__*/Object.freeze({
|
|
11535
11539
|
__proto__: null,
|
|
11536
|
-
Root: Root$
|
|
11537
|
-
description: description$
|
|
11540
|
+
Root: Root$A,
|
|
11541
|
+
description: description$A
|
|
11538
11542
|
});
|
|
11539
11543
|
|
|
11540
11544
|
var Members$r = /*#__PURE__*/function (Members) {
|
|
@@ -11555,7 +11559,7 @@ const typesCaptions$3 = {
|
|
|
11555
11559
|
[ChamferType.EQUAL_DISTANCE]: 'Type: Equal distance',
|
|
11556
11560
|
[ChamferType.TWO_DISTANCES]: 'Type: Two distances'
|
|
11557
11561
|
};
|
|
11558
|
-
const RootImpl$
|
|
11562
|
+
const RootImpl$z = ({
|
|
11559
11563
|
drawingId,
|
|
11560
11564
|
pluginId
|
|
11561
11565
|
}) => {
|
|
@@ -11638,14 +11642,14 @@ const RootImpl$y = ({
|
|
|
11638
11642
|
*
|
|
11639
11643
|
* @internal
|
|
11640
11644
|
*/
|
|
11641
|
-
const Root$
|
|
11645
|
+
const Root$z = ({
|
|
11642
11646
|
drawingId,
|
|
11643
11647
|
pluginId
|
|
11644
11648
|
}) => {
|
|
11645
11649
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11646
11650
|
drawingId: drawingId,
|
|
11647
11651
|
pluginId: pluginId
|
|
11648
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11652
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$z, {
|
|
11649
11653
|
drawingId: drawingId,
|
|
11650
11654
|
pluginId: pluginId
|
|
11651
11655
|
}));
|
|
@@ -11683,7 +11687,7 @@ const Root$y = ({
|
|
|
11683
11687
|
*
|
|
11684
11688
|
* @internal
|
|
11685
11689
|
*/
|
|
11686
|
-
const description$
|
|
11690
|
+
const description$z = {
|
|
11687
11691
|
name: 'Chamfer',
|
|
11688
11692
|
version: '1.0.0',
|
|
11689
11693
|
author: 'Ledas',
|
|
@@ -11692,10 +11696,10 @@ const description$y = {
|
|
|
11692
11696
|
global: false
|
|
11693
11697
|
};
|
|
11694
11698
|
|
|
11695
|
-
var index$
|
|
11699
|
+
var index$z = /*#__PURE__*/Object.freeze({
|
|
11696
11700
|
__proto__: null,
|
|
11697
|
-
Root: Root$
|
|
11698
|
-
description: description$
|
|
11701
|
+
Root: Root$z,
|
|
11702
|
+
description: description$z
|
|
11699
11703
|
});
|
|
11700
11704
|
|
|
11701
11705
|
var Members$q = /*#__PURE__*/function (Members) {
|
|
@@ -11705,7 +11709,7 @@ var Members$q = /*#__PURE__*/function (Members) {
|
|
|
11705
11709
|
Members["Inverted"] = "inverted";
|
|
11706
11710
|
return Members;
|
|
11707
11711
|
}(Members$q || {});
|
|
11708
|
-
function RootImpl$
|
|
11712
|
+
function RootImpl$y({
|
|
11709
11713
|
drawingId,
|
|
11710
11714
|
pluginId
|
|
11711
11715
|
}) {
|
|
@@ -11767,14 +11771,14 @@ function RootImpl$x({
|
|
|
11767
11771
|
*
|
|
11768
11772
|
* @internal
|
|
11769
11773
|
*/
|
|
11770
|
-
const Root$
|
|
11774
|
+
const Root$y = ({
|
|
11771
11775
|
drawingId,
|
|
11772
11776
|
pluginId
|
|
11773
11777
|
}) => {
|
|
11774
11778
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11775
11779
|
drawingId: drawingId,
|
|
11776
11780
|
pluginId: pluginId
|
|
11777
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11781
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$y, {
|
|
11778
11782
|
drawingId: drawingId,
|
|
11779
11783
|
pluginId: pluginId
|
|
11780
11784
|
}));
|
|
@@ -11812,7 +11816,7 @@ const Root$x = ({
|
|
|
11812
11816
|
*
|
|
11813
11817
|
* @internal
|
|
11814
11818
|
*/
|
|
11815
|
-
const description$
|
|
11819
|
+
const description$y = {
|
|
11816
11820
|
name: 'Translate',
|
|
11817
11821
|
version: '1.0.0',
|
|
11818
11822
|
author: 'Ledas',
|
|
@@ -11822,10 +11826,10 @@ const description$x = {
|
|
|
11822
11826
|
initialState: {}
|
|
11823
11827
|
};
|
|
11824
11828
|
|
|
11825
|
-
var index$
|
|
11829
|
+
var index$y = /*#__PURE__*/Object.freeze({
|
|
11826
11830
|
__proto__: null,
|
|
11827
|
-
Root: Root$
|
|
11828
|
-
description: description$
|
|
11831
|
+
Root: Root$y,
|
|
11832
|
+
description: description$y
|
|
11829
11833
|
});
|
|
11830
11834
|
|
|
11831
11835
|
var Members$p = /*#__PURE__*/function (Members) {
|
|
@@ -11835,7 +11839,7 @@ var Members$p = /*#__PURE__*/function (Members) {
|
|
|
11835
11839
|
Members["Inverted"] = "inverted";
|
|
11836
11840
|
return Members;
|
|
11837
11841
|
}(Members$p || {});
|
|
11838
|
-
function RootImpl$
|
|
11842
|
+
function RootImpl$x({
|
|
11839
11843
|
drawingId,
|
|
11840
11844
|
pluginId
|
|
11841
11845
|
}) {
|
|
@@ -11899,14 +11903,14 @@ function RootImpl$w({
|
|
|
11899
11903
|
*
|
|
11900
11904
|
* @internal
|
|
11901
11905
|
*/
|
|
11902
|
-
const Root$
|
|
11906
|
+
const Root$x = ({
|
|
11903
11907
|
drawingId,
|
|
11904
11908
|
pluginId
|
|
11905
11909
|
}) => {
|
|
11906
11910
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
11907
11911
|
drawingId: drawingId,
|
|
11908
11912
|
pluginId: pluginId
|
|
11909
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
11913
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$x, {
|
|
11910
11914
|
drawingId: drawingId,
|
|
11911
11915
|
pluginId: pluginId
|
|
11912
11916
|
}));
|
|
@@ -11944,7 +11948,7 @@ const Root$w = ({
|
|
|
11944
11948
|
*
|
|
11945
11949
|
* @internal
|
|
11946
11950
|
*/
|
|
11947
|
-
const description$
|
|
11951
|
+
const description$x = {
|
|
11948
11952
|
name: 'Rotate',
|
|
11949
11953
|
version: '1.0.0',
|
|
11950
11954
|
author: 'Ledas',
|
|
@@ -11954,10 +11958,10 @@ const description$w = {
|
|
|
11954
11958
|
initialState: {}
|
|
11955
11959
|
};
|
|
11956
11960
|
|
|
11957
|
-
var index$
|
|
11961
|
+
var index$x = /*#__PURE__*/Object.freeze({
|
|
11958
11962
|
__proto__: null,
|
|
11959
|
-
Root: Root$
|
|
11960
|
-
description: description$
|
|
11963
|
+
Root: Root$x,
|
|
11964
|
+
description: description$x
|
|
11961
11965
|
});
|
|
11962
11966
|
|
|
11963
11967
|
var Members$o = /*#__PURE__*/function (Members) {
|
|
@@ -11965,7 +11969,7 @@ var Members$o = /*#__PURE__*/function (Members) {
|
|
|
11965
11969
|
Members["CsysReferences"] = "references";
|
|
11966
11970
|
return Members;
|
|
11967
11971
|
}(Members$o || {});
|
|
11968
|
-
function RootImpl$
|
|
11972
|
+
function RootImpl$w({
|
|
11969
11973
|
drawingId,
|
|
11970
11974
|
pluginId
|
|
11971
11975
|
}) {
|
|
@@ -12023,14 +12027,14 @@ function RootImpl$v({
|
|
|
12023
12027
|
*
|
|
12024
12028
|
* @internal
|
|
12025
12029
|
*/
|
|
12026
|
-
const Root$
|
|
12030
|
+
const Root$w = ({
|
|
12027
12031
|
drawingId,
|
|
12028
12032
|
pluginId
|
|
12029
12033
|
}) => {
|
|
12030
12034
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12031
12035
|
drawingId: drawingId,
|
|
12032
12036
|
pluginId: pluginId
|
|
12033
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12037
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$w, {
|
|
12034
12038
|
drawingId: drawingId,
|
|
12035
12039
|
pluginId: pluginId
|
|
12036
12040
|
}));
|
|
@@ -12068,7 +12072,7 @@ const Root$v = ({
|
|
|
12068
12072
|
*
|
|
12069
12073
|
* @internal
|
|
12070
12074
|
*/
|
|
12071
|
-
const description$
|
|
12075
|
+
const description$w = {
|
|
12072
12076
|
name: 'TransformByCsys',
|
|
12073
12077
|
version: '1.0.0',
|
|
12074
12078
|
author: 'Ledas',
|
|
@@ -12078,10 +12082,10 @@ const description$v = {
|
|
|
12078
12082
|
initialState: {}
|
|
12079
12083
|
};
|
|
12080
12084
|
|
|
12081
|
-
var index$
|
|
12085
|
+
var index$w = /*#__PURE__*/Object.freeze({
|
|
12082
12086
|
__proto__: null,
|
|
12083
|
-
Root: Root$
|
|
12084
|
-
description: description$
|
|
12087
|
+
Root: Root$w,
|
|
12088
|
+
description: description$w
|
|
12085
12089
|
});
|
|
12086
12090
|
|
|
12087
12091
|
var Members$n = /*#__PURE__*/function (Members) {
|
|
@@ -12090,7 +12094,7 @@ var Members$n = /*#__PURE__*/function (Members) {
|
|
|
12090
12094
|
Members["WorkPlaneReference"] = "workPlaneReference";
|
|
12091
12095
|
return Members;
|
|
12092
12096
|
}(Members$n || {});
|
|
12093
|
-
function RootImpl$
|
|
12097
|
+
function RootImpl$v({
|
|
12094
12098
|
drawingId,
|
|
12095
12099
|
pluginId
|
|
12096
12100
|
}) {
|
|
@@ -12143,14 +12147,14 @@ function RootImpl$u({
|
|
|
12143
12147
|
*
|
|
12144
12148
|
* @internal
|
|
12145
12149
|
*/
|
|
12146
|
-
const Root$
|
|
12150
|
+
const Root$v = ({
|
|
12147
12151
|
drawingId,
|
|
12148
12152
|
pluginId
|
|
12149
12153
|
}) => {
|
|
12150
12154
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12151
12155
|
drawingId: drawingId,
|
|
12152
12156
|
pluginId: pluginId
|
|
12153
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12157
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$v, {
|
|
12154
12158
|
drawingId: drawingId,
|
|
12155
12159
|
pluginId: pluginId
|
|
12156
12160
|
}));
|
|
@@ -12187,7 +12191,7 @@ const Root$u = ({
|
|
|
12187
12191
|
*
|
|
12188
12192
|
* @internal
|
|
12189
12193
|
*/
|
|
12190
|
-
const description$
|
|
12194
|
+
const description$v = {
|
|
12191
12195
|
name: 'Slice',
|
|
12192
12196
|
version: '1.0.0',
|
|
12193
12197
|
author: 'Ledas',
|
|
@@ -12197,10 +12201,10 @@ const description$u = {
|
|
|
12197
12201
|
initialState: {}
|
|
12198
12202
|
};
|
|
12199
12203
|
|
|
12200
|
-
var index$
|
|
12204
|
+
var index$v = /*#__PURE__*/Object.freeze({
|
|
12201
12205
|
__proto__: null,
|
|
12202
|
-
Root: Root$
|
|
12203
|
-
description: description$
|
|
12206
|
+
Root: Root$v,
|
|
12207
|
+
description: description$v
|
|
12204
12208
|
});
|
|
12205
12209
|
|
|
12206
12210
|
var Members$m = /*#__PURE__*/function (Members) {
|
|
@@ -12209,7 +12213,7 @@ var Members$m = /*#__PURE__*/function (Members) {
|
|
|
12209
12213
|
Members["SheetBody"] = "sheetBody";
|
|
12210
12214
|
return Members;
|
|
12211
12215
|
}(Members$m || {});
|
|
12212
|
-
function RootImpl$
|
|
12216
|
+
function RootImpl$u({
|
|
12213
12217
|
drawingId,
|
|
12214
12218
|
pluginId
|
|
12215
12219
|
}) {
|
|
@@ -12265,14 +12269,14 @@ function RootImpl$t({
|
|
|
12265
12269
|
*
|
|
12266
12270
|
* @internal
|
|
12267
12271
|
*/
|
|
12268
|
-
const Root$
|
|
12272
|
+
const Root$u = ({
|
|
12269
12273
|
drawingId,
|
|
12270
12274
|
pluginId
|
|
12271
12275
|
}) => {
|
|
12272
12276
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12273
12277
|
drawingId: drawingId,
|
|
12274
12278
|
pluginId: pluginId
|
|
12275
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12279
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$u, {
|
|
12276
12280
|
drawingId: drawingId,
|
|
12277
12281
|
pluginId: pluginId
|
|
12278
12282
|
}));
|
|
@@ -12310,7 +12314,7 @@ const Root$t = ({
|
|
|
12310
12314
|
*
|
|
12311
12315
|
* @internal
|
|
12312
12316
|
*/
|
|
12313
|
-
const description$
|
|
12317
|
+
const description$u = {
|
|
12314
12318
|
name: 'SliceBySheet',
|
|
12315
12319
|
version: '1.0.0',
|
|
12316
12320
|
author: 'AWV',
|
|
@@ -12320,10 +12324,10 @@ const description$t = {
|
|
|
12320
12324
|
initialState: {}
|
|
12321
12325
|
};
|
|
12322
12326
|
|
|
12323
|
-
var index$
|
|
12327
|
+
var index$u = /*#__PURE__*/Object.freeze({
|
|
12324
12328
|
__proto__: null,
|
|
12325
|
-
Root: Root$
|
|
12326
|
-
description: description$
|
|
12329
|
+
Root: Root$u,
|
|
12330
|
+
description: description$u
|
|
12327
12331
|
});
|
|
12328
12332
|
|
|
12329
12333
|
var Members$l = /*#__PURE__*/function (Members) {
|
|
@@ -12339,7 +12343,7 @@ var Members$l = /*#__PURE__*/function (Members) {
|
|
|
12339
12343
|
Members["Merged"] = "merged";
|
|
12340
12344
|
return Members;
|
|
12341
12345
|
}(Members$l || {});
|
|
12342
|
-
function RootImpl$
|
|
12346
|
+
function RootImpl$t({
|
|
12343
12347
|
drawingId,
|
|
12344
12348
|
pluginId
|
|
12345
12349
|
}) {
|
|
@@ -12464,14 +12468,14 @@ function RootImpl$s({
|
|
|
12464
12468
|
*
|
|
12465
12469
|
* @internal
|
|
12466
12470
|
*/
|
|
12467
|
-
const Root$
|
|
12471
|
+
const Root$t = ({
|
|
12468
12472
|
drawingId,
|
|
12469
12473
|
pluginId
|
|
12470
12474
|
}) => {
|
|
12471
12475
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12472
12476
|
drawingId: drawingId,
|
|
12473
12477
|
pluginId: pluginId
|
|
12474
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12478
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$t, {
|
|
12475
12479
|
drawingId: drawingId,
|
|
12476
12480
|
pluginId: pluginId
|
|
12477
12481
|
}));
|
|
@@ -12510,7 +12514,7 @@ const Root$s = ({
|
|
|
12510
12514
|
*
|
|
12511
12515
|
* @internal
|
|
12512
12516
|
*/
|
|
12513
|
-
const description$
|
|
12517
|
+
const description$t = {
|
|
12514
12518
|
name: 'Linear pattern',
|
|
12515
12519
|
version: '1.0.0',
|
|
12516
12520
|
author: 'Ledas',
|
|
@@ -12520,10 +12524,10 @@ const description$s = {
|
|
|
12520
12524
|
initialState: {}
|
|
12521
12525
|
};
|
|
12522
12526
|
|
|
12523
|
-
var index$
|
|
12527
|
+
var index$t = /*#__PURE__*/Object.freeze({
|
|
12524
12528
|
__proto__: null,
|
|
12525
|
-
Root: Root$
|
|
12526
|
-
description: description$
|
|
12529
|
+
Root: Root$t,
|
|
12530
|
+
description: description$t
|
|
12527
12531
|
});
|
|
12528
12532
|
|
|
12529
12533
|
var Members$k = /*#__PURE__*/function (Members) {
|
|
@@ -12535,7 +12539,7 @@ var Members$k = /*#__PURE__*/function (Members) {
|
|
|
12535
12539
|
Members["Merged"] = "merged";
|
|
12536
12540
|
return Members;
|
|
12537
12541
|
}(Members$k || {});
|
|
12538
|
-
function RootImpl$
|
|
12542
|
+
function RootImpl$s({
|
|
12539
12543
|
drawingId,
|
|
12540
12544
|
pluginId
|
|
12541
12545
|
}) {
|
|
@@ -12618,14 +12622,14 @@ function RootImpl$r({
|
|
|
12618
12622
|
*
|
|
12619
12623
|
* @internal
|
|
12620
12624
|
*/
|
|
12621
|
-
const Root$
|
|
12625
|
+
const Root$s = ({
|
|
12622
12626
|
drawingId,
|
|
12623
12627
|
pluginId
|
|
12624
12628
|
}) => {
|
|
12625
12629
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12626
12630
|
drawingId: drawingId,
|
|
12627
12631
|
pluginId: pluginId
|
|
12628
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12632
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$s, {
|
|
12629
12633
|
drawingId: drawingId,
|
|
12630
12634
|
pluginId: pluginId
|
|
12631
12635
|
}));
|
|
@@ -12663,7 +12667,7 @@ const Root$r = ({
|
|
|
12663
12667
|
*
|
|
12664
12668
|
* @internal
|
|
12665
12669
|
*/
|
|
12666
|
-
const description$
|
|
12670
|
+
const description$s = {
|
|
12667
12671
|
name: 'Circular pattern',
|
|
12668
12672
|
version: '1.0.0',
|
|
12669
12673
|
author: 'Ledas',
|
|
@@ -12673,10 +12677,10 @@ const description$r = {
|
|
|
12673
12677
|
initialState: {}
|
|
12674
12678
|
};
|
|
12675
12679
|
|
|
12676
|
-
var index$
|
|
12680
|
+
var index$s = /*#__PURE__*/Object.freeze({
|
|
12677
12681
|
__proto__: null,
|
|
12678
|
-
Root: Root$
|
|
12679
|
-
description: description$
|
|
12682
|
+
Root: Root$s,
|
|
12683
|
+
description: description$s
|
|
12680
12684
|
});
|
|
12681
12685
|
|
|
12682
12686
|
var Members$j = /*#__PURE__*/function (Members) {
|
|
@@ -12684,7 +12688,7 @@ var Members$j = /*#__PURE__*/function (Members) {
|
|
|
12684
12688
|
Members["FaceReferences"] = "references";
|
|
12685
12689
|
return Members;
|
|
12686
12690
|
}(Members$j || {});
|
|
12687
|
-
const RootImpl$
|
|
12691
|
+
const RootImpl$r = ({
|
|
12688
12692
|
drawingId,
|
|
12689
12693
|
pluginId
|
|
12690
12694
|
}) => {
|
|
@@ -12730,14 +12734,14 @@ const RootImpl$q = ({
|
|
|
12730
12734
|
*
|
|
12731
12735
|
* @internal
|
|
12732
12736
|
*/
|
|
12733
|
-
const Root$
|
|
12737
|
+
const Root$r = ({
|
|
12734
12738
|
drawingId,
|
|
12735
12739
|
pluginId
|
|
12736
12740
|
}) => {
|
|
12737
12741
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
12738
12742
|
drawingId: drawingId,
|
|
12739
12743
|
pluginId: pluginId
|
|
12740
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
12744
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$r, {
|
|
12741
12745
|
drawingId: drawingId,
|
|
12742
12746
|
pluginId: pluginId
|
|
12743
12747
|
}));
|
|
@@ -12774,7 +12778,7 @@ const Root$q = ({
|
|
|
12774
12778
|
*
|
|
12775
12779
|
* @internal
|
|
12776
12780
|
*/
|
|
12777
|
-
const description$
|
|
12781
|
+
const description$r = {
|
|
12778
12782
|
name: 'Mirror',
|
|
12779
12783
|
version: '1.0.0',
|
|
12780
12784
|
author: 'AWV',
|
|
@@ -12784,10 +12788,10 @@ const description$q = {
|
|
|
12784
12788
|
initialState: {}
|
|
12785
12789
|
};
|
|
12786
12790
|
|
|
12787
|
-
var index$
|
|
12791
|
+
var index$r = /*#__PURE__*/Object.freeze({
|
|
12788
12792
|
__proto__: null,
|
|
12789
|
-
Root: Root$
|
|
12790
|
-
description: description$
|
|
12793
|
+
Root: Root$r,
|
|
12794
|
+
description: description$r
|
|
12791
12795
|
});
|
|
12792
12796
|
|
|
12793
12797
|
const defaultNumberOfDigits = 3;
|
|
@@ -12865,10 +12869,10 @@ const Digits = ({
|
|
|
12865
12869
|
|
|
12866
12870
|
const vectorToString = (point, digits) => `${point.toArray().map(n => MathUtils.round(n, digits)).join(', ')}`;
|
|
12867
12871
|
|
|
12868
|
-
function ownKeys$
|
|
12869
|
-
function _objectSpread$
|
|
12872
|
+
function ownKeys$u(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; }
|
|
12873
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12870
12874
|
const Excluded = [ScgGraphicType.LOOP].concat(EntityTypes);
|
|
12871
|
-
const RootImpl$
|
|
12875
|
+
const RootImpl$q = ({
|
|
12872
12876
|
drawingId,
|
|
12873
12877
|
pluginId
|
|
12874
12878
|
}) => {
|
|
@@ -12935,7 +12939,7 @@ const Output = ({
|
|
|
12935
12939
|
const {
|
|
12936
12940
|
value
|
|
12937
12941
|
} = res.measureData;
|
|
12938
|
-
return _objectSpread$
|
|
12942
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12939
12943
|
asString: MathUtils.round(value, digits)
|
|
12940
12944
|
});
|
|
12941
12945
|
}
|
|
@@ -12945,13 +12949,13 @@ const Output = ({
|
|
|
12945
12949
|
const {
|
|
12946
12950
|
value
|
|
12947
12951
|
} = res.measureData;
|
|
12948
|
-
return _objectSpread$
|
|
12952
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12949
12953
|
asString: vectorToString(value, digits)
|
|
12950
12954
|
});
|
|
12951
12955
|
}
|
|
12952
12956
|
}
|
|
12953
12957
|
}
|
|
12954
|
-
return _objectSpread$
|
|
12958
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12955
12959
|
asString: ''
|
|
12956
12960
|
});
|
|
12957
12961
|
});
|
|
@@ -12993,11 +12997,11 @@ const Output = ({
|
|
|
12993
12997
|
*
|
|
12994
12998
|
* @internal
|
|
12995
12999
|
*/
|
|
12996
|
-
const Root$
|
|
13000
|
+
const Root$q = ({
|
|
12997
13001
|
drawingId,
|
|
12998
13002
|
pluginId
|
|
12999
13003
|
}) => {
|
|
13000
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
13004
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$q, {
|
|
13001
13005
|
drawingId: drawingId,
|
|
13002
13006
|
pluginId: pluginId
|
|
13003
13007
|
}));
|
|
@@ -13193,7 +13197,7 @@ const Vector = ({
|
|
|
13193
13197
|
}));
|
|
13194
13198
|
};
|
|
13195
13199
|
|
|
13196
|
-
function ViewImpl$
|
|
13200
|
+
function ViewImpl$a({
|
|
13197
13201
|
drawingId,
|
|
13198
13202
|
pluginId
|
|
13199
13203
|
}) {
|
|
@@ -13270,11 +13274,11 @@ function ViewImpl$9({
|
|
|
13270
13274
|
*
|
|
13271
13275
|
* @internal
|
|
13272
13276
|
*/
|
|
13273
|
-
const View$
|
|
13277
|
+
const View$k = ({
|
|
13274
13278
|
drawingId,
|
|
13275
13279
|
pluginId
|
|
13276
13280
|
}) => {
|
|
13277
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
13281
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$a, {
|
|
13278
13282
|
drawingId: drawingId,
|
|
13279
13283
|
pluginId: pluginId
|
|
13280
13284
|
}));
|
|
@@ -13310,7 +13314,7 @@ const View$j = ({
|
|
|
13310
13314
|
*
|
|
13311
13315
|
* @internal
|
|
13312
13316
|
*/
|
|
13313
|
-
const description$
|
|
13317
|
+
const description$q = {
|
|
13314
13318
|
name: 'Measure',
|
|
13315
13319
|
version: '0.0.1',
|
|
13316
13320
|
author: 'AWV',
|
|
@@ -13322,11 +13326,11 @@ const description$p = {
|
|
|
13322
13326
|
}
|
|
13323
13327
|
};
|
|
13324
13328
|
|
|
13325
|
-
var index$
|
|
13329
|
+
var index$q = /*#__PURE__*/Object.freeze({
|
|
13326
13330
|
__proto__: null,
|
|
13327
|
-
Root: Root$
|
|
13328
|
-
View: View$
|
|
13329
|
-
description: description$
|
|
13331
|
+
Root: Root$q,
|
|
13332
|
+
View: View$k,
|
|
13333
|
+
description: description$q
|
|
13330
13334
|
});
|
|
13331
13335
|
|
|
13332
13336
|
// TODO use it as key in object
|
|
@@ -13390,7 +13394,7 @@ const deltaTolerance = 4;
|
|
|
13390
13394
|
*
|
|
13391
13395
|
* @internal
|
|
13392
13396
|
*/
|
|
13393
|
-
const description$
|
|
13397
|
+
const description$p = {
|
|
13394
13398
|
name: 'Sketcher',
|
|
13395
13399
|
version: '1.0.0',
|
|
13396
13400
|
author: 'Ledas',
|
|
@@ -13439,14 +13443,14 @@ const description$o = {
|
|
|
13439
13443
|
|
|
13440
13444
|
function getSketchState(drawingId, pluginId) {
|
|
13441
13445
|
const plugin = getPlugin(drawingId, pluginId);
|
|
13442
|
-
if (!plugin || plugin.name !== description$
|
|
13446
|
+
if (!plugin || plugin.name !== description$p.name) {
|
|
13443
13447
|
window.console.error('Wrong arguments are passed into getSketchState.');
|
|
13444
13448
|
}
|
|
13445
13449
|
return plugin.state;
|
|
13446
13450
|
}
|
|
13447
13451
|
|
|
13448
|
-
function ownKeys$
|
|
13449
|
-
function _objectSpread$
|
|
13452
|
+
function ownKeys$t(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; }
|
|
13453
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13450
13454
|
function CreateAngle(drawingId, pluginId) {
|
|
13451
13455
|
const {
|
|
13452
13456
|
set
|
|
@@ -13487,8 +13491,8 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13487
13491
|
set(state_ => {
|
|
13488
13492
|
const tmpAngularDimension = state_.tmpObjects[tmpDimensionId];
|
|
13489
13493
|
return {
|
|
13490
|
-
tmpObjects: _objectSpread$
|
|
13491
|
-
[tmpDimensionId]: _objectSpread$
|
|
13494
|
+
tmpObjects: _objectSpread$t(_objectSpread$t({}, state_.tmpObjects), {}, {
|
|
13495
|
+
[tmpDimensionId]: _objectSpread$t(_objectSpread$t({}, tmpAngularDimension), params)
|
|
13492
13496
|
})
|
|
13493
13497
|
};
|
|
13494
13498
|
});
|
|
@@ -13514,7 +13518,7 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13514
13518
|
const dir1 = linesInfo.dir1;
|
|
13515
13519
|
const center = linesInfo.center;
|
|
13516
13520
|
const dimPos = center.clone().addScaledVector(dir0.clone().add(dir1).normalize(), 10);
|
|
13517
|
-
const tmpAngularDimension = _objectSpread$
|
|
13521
|
+
const tmpAngularDimension = _objectSpread$t(_objectSpread$t({
|
|
13518
13522
|
class: TmpObjClasses.AngularDimension,
|
|
13519
13523
|
id: tmpDimensionId
|
|
13520
13524
|
}, linesInfo), {}, {
|
|
@@ -13600,8 +13604,8 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13600
13604
|
};
|
|
13601
13605
|
}
|
|
13602
13606
|
|
|
13603
|
-
function ownKeys$
|
|
13604
|
-
function _objectSpread$
|
|
13607
|
+
function ownKeys$s(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; }
|
|
13608
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13605
13609
|
let timerId;
|
|
13606
13610
|
const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
13607
13611
|
const {
|
|
@@ -13625,7 +13629,7 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13625
13629
|
const highlightedNonGeom = highlighted.filter(id => id !== hoveredId && (is2DConstraint(tree[id]) || isSketchRegion(tree[id])));
|
|
13626
13630
|
return {
|
|
13627
13631
|
highlighted: [...highlightedNonGeom, hoveredId, ...entities],
|
|
13628
|
-
interaction: _objectSpread$
|
|
13632
|
+
interaction: _objectSpread$s(_objectSpread$s({}, state_.interaction), {}, {
|
|
13629
13633
|
cycle,
|
|
13630
13634
|
objects
|
|
13631
13635
|
})
|
|
@@ -13634,12 +13638,12 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13634
13638
|
} else {
|
|
13635
13639
|
const linked = Object.values(tree).filter(obj => is2DConstraint(obj) || isSketchRegion(obj)).filter(obj => getEntities(drawingId, obj.id).some(entityId => entityId === hoveredId)).map(obj => obj.id);
|
|
13636
13640
|
const state = getSketchState(drawingId, pluginId);
|
|
13637
|
-
const constraintsToGeometry = _objectSpread$
|
|
13641
|
+
const constraintsToGeometry = _objectSpread$s({}, state.interaction.constraintsToGeometry);
|
|
13638
13642
|
linked.forEach(id => {
|
|
13639
13643
|
constraintsToGeometry[id] = hoveredId;
|
|
13640
13644
|
});
|
|
13641
13645
|
const prevHoveredId = state.interaction.objects[state.interaction.cycle % state.interaction.objects.length];
|
|
13642
|
-
const lastHoveredPos = _objectSpread$
|
|
13646
|
+
const lastHoveredPos = _objectSpread$s({}, state.interaction.lastHoveredPos);
|
|
13643
13647
|
if (!hoverPos) {
|
|
13644
13648
|
linked.forEach(id => delete lastHoveredPos[id]);
|
|
13645
13649
|
} else if (hoveredId !== prevHoveredId) {
|
|
@@ -13667,7 +13671,7 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13667
13671
|
const highlightedNonGeom = highlighted.filter(id => is2DConstraint(tree[id]) || isSketchRegion(tree[id]));
|
|
13668
13672
|
return {
|
|
13669
13673
|
highlighted: highlightedNonGeom,
|
|
13670
|
-
interaction: _objectSpread$
|
|
13674
|
+
interaction: _objectSpread$s(_objectSpread$s({}, state_.interaction), {}, {
|
|
13671
13675
|
cycle,
|
|
13672
13676
|
objects
|
|
13673
13677
|
})
|
|
@@ -14480,8 +14484,8 @@ const snapDraggedPoints = (diff, drawingId) => {
|
|
|
14480
14484
|
return snapResult;
|
|
14481
14485
|
};
|
|
14482
14486
|
|
|
14483
|
-
function ownKeys$
|
|
14484
|
-
function _objectSpread$
|
|
14487
|
+
function ownKeys$r(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; }
|
|
14488
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14485
14489
|
|
|
14486
14490
|
// Artificial delay in 16 ms.
|
|
14487
14491
|
const artifDelay = 16;
|
|
@@ -14679,7 +14683,7 @@ function Drag(drawingId, pluginId, camControls) {
|
|
|
14679
14683
|
name: HandlersList.DRAG,
|
|
14680
14684
|
filter,
|
|
14681
14685
|
onDeactivate,
|
|
14682
|
-
pointerHandlers: _objectSpread$
|
|
14686
|
+
pointerHandlers: _objectSpread$r({
|
|
14683
14687
|
onPointerDown,
|
|
14684
14688
|
onPointerUp,
|
|
14685
14689
|
onPointerMove
|
|
@@ -14691,8 +14695,8 @@ function Drag(drawingId, pluginId, camControls) {
|
|
|
14691
14695
|
};
|
|
14692
14696
|
}
|
|
14693
14697
|
|
|
14694
|
-
function ownKeys$
|
|
14695
|
-
function _objectSpread$
|
|
14698
|
+
function ownKeys$q(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; }
|
|
14699
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14696
14700
|
function DrawPoint(drawingId, pluginId) {
|
|
14697
14701
|
const {
|
|
14698
14702
|
set
|
|
@@ -14737,7 +14741,7 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14737
14741
|
}).then(() => {
|
|
14738
14742
|
// Remove the old temporary point once a permanent one is created in its place
|
|
14739
14743
|
set(state => {
|
|
14740
|
-
const tmpObjects_ = _objectSpread$
|
|
14744
|
+
const tmpObjects_ = _objectSpread$q({}, state.tmpObjects);
|
|
14741
14745
|
delete tmpObjects_[curPointId];
|
|
14742
14746
|
return {
|
|
14743
14747
|
tmpObjects: tmpObjects_
|
|
@@ -14750,8 +14754,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14750
14754
|
set(state => {
|
|
14751
14755
|
const tmpPoint = state.tmpObjects[curPointId];
|
|
14752
14756
|
return {
|
|
14753
|
-
tmpObjects: _objectSpread$
|
|
14754
|
-
[tmpPointId]: _objectSpread$
|
|
14757
|
+
tmpObjects: _objectSpread$q(_objectSpread$q({}, state.tmpObjects), {}, {
|
|
14758
|
+
[tmpPointId]: _objectSpread$q(_objectSpread$q({}, tmpPoint), {}, {
|
|
14755
14759
|
id: tmpPointId,
|
|
14756
14760
|
position: tmpPoint.position.clone()
|
|
14757
14761
|
})
|
|
@@ -14768,8 +14772,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14768
14772
|
const tmpPoint = state.tmpObjects[tmpPointId];
|
|
14769
14773
|
return {
|
|
14770
14774
|
mousePos,
|
|
14771
|
-
tmpObjects: _objectSpread$
|
|
14772
|
-
[tmpPointId]: _objectSpread$
|
|
14775
|
+
tmpObjects: _objectSpread$q(_objectSpread$q({}, state.tmpObjects), {}, {
|
|
14776
|
+
[tmpPointId]: _objectSpread$q(_objectSpread$q({}, tmpPoint), {}, {
|
|
14773
14777
|
position: mousePos
|
|
14774
14778
|
})
|
|
14775
14779
|
})
|
|
@@ -14789,8 +14793,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14789
14793
|
};
|
|
14790
14794
|
}
|
|
14791
14795
|
|
|
14792
|
-
function ownKeys$
|
|
14793
|
-
function _objectSpread$
|
|
14796
|
+
function ownKeys$p(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; }
|
|
14797
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14794
14798
|
function DrawLine(drawingId, pluginId) {
|
|
14795
14799
|
// Global hooks:
|
|
14796
14800
|
const {
|
|
@@ -14867,7 +14871,7 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14867
14871
|
isConstruction: e.ctrlKey
|
|
14868
14872
|
};
|
|
14869
14873
|
return {
|
|
14870
|
-
tmpObjects: _objectSpread$
|
|
14874
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14871
14875
|
[tmpStartP.id]: tmpStartP,
|
|
14872
14876
|
[tmpLine.id]: tmpLine
|
|
14873
14877
|
})
|
|
@@ -14888,7 +14892,7 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14888
14892
|
promise.then(() => {
|
|
14889
14893
|
// Remove the old temporary line and its points once a permanent one is created in its place
|
|
14890
14894
|
set(state => {
|
|
14891
|
-
const tmpObjects_ = _objectSpread$
|
|
14895
|
+
const tmpObjects_ = _objectSpread$p({}, state.tmpObjects);
|
|
14892
14896
|
delete tmpObjects_[curStartPId];
|
|
14893
14897
|
delete tmpObjects_[curEndPId];
|
|
14894
14898
|
delete tmpObjects_[curLineId];
|
|
@@ -14908,16 +14912,16 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14908
14912
|
const tmpEndP = state.tmpObjects[curEndPId];
|
|
14909
14913
|
const tmpLine = state.tmpObjects[curLineId];
|
|
14910
14914
|
return {
|
|
14911
|
-
tmpObjects: _objectSpread$
|
|
14912
|
-
[tmpStartPId]: _objectSpread$
|
|
14915
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14916
|
+
[tmpStartPId]: _objectSpread$p(_objectSpread$p({}, tmpStartP), {}, {
|
|
14913
14917
|
id: tmpStartPId,
|
|
14914
14918
|
position: tmpEndP.position.clone()
|
|
14915
14919
|
}),
|
|
14916
|
-
[tmpEndPId]: _objectSpread$
|
|
14920
|
+
[tmpEndPId]: _objectSpread$p(_objectSpread$p({}, tmpEndP), {}, {
|
|
14917
14921
|
id: tmpEndPId,
|
|
14918
14922
|
position: tmpEndP.position.clone()
|
|
14919
14923
|
}),
|
|
14920
|
-
[tmpLineId]: _objectSpread$
|
|
14924
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, tmpLine), {}, {
|
|
14921
14925
|
id: tmpLineId,
|
|
14922
14926
|
startPId: tmpStartPId,
|
|
14923
14927
|
endPId: tmpEndPId
|
|
@@ -14936,8 +14940,8 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14936
14940
|
const tmpEndP = state.tmpObjects[tmpEndPId];
|
|
14937
14941
|
return {
|
|
14938
14942
|
mousePos,
|
|
14939
|
-
tmpObjects: _objectSpread$
|
|
14940
|
-
[tmpEndPId]: _objectSpread$
|
|
14943
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14944
|
+
[tmpEndPId]: _objectSpread$p(_objectSpread$p({}, tmpEndP), {}, {
|
|
14941
14945
|
position: mousePos
|
|
14942
14946
|
})
|
|
14943
14947
|
})
|
|
@@ -14947,9 +14951,9 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14947
14951
|
};
|
|
14948
14952
|
const keydown = e => {
|
|
14949
14953
|
if (firstPointIsSet && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
14950
|
-
set(state => _objectSpread$
|
|
14951
|
-
tmpObjects: _objectSpread$
|
|
14952
|
-
[tmpLineId]: _objectSpread$
|
|
14954
|
+
set(state => _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
14955
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14956
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, state.tmpObjects[tmpLineId]), {}, {
|
|
14953
14957
|
isConstruction: true
|
|
14954
14958
|
})
|
|
14955
14959
|
})
|
|
@@ -14958,9 +14962,9 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14958
14962
|
};
|
|
14959
14963
|
const keyup = e => {
|
|
14960
14964
|
if (firstPointIsSet && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
14961
|
-
set(state => _objectSpread$
|
|
14962
|
-
tmpObjects: _objectSpread$
|
|
14963
|
-
[tmpLineId]: _objectSpread$
|
|
14965
|
+
set(state => _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
14966
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14967
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, state.tmpObjects[tmpLineId]), {}, {
|
|
14964
14968
|
isConstruction: false
|
|
14965
14969
|
})
|
|
14966
14970
|
})
|
|
@@ -14984,8 +14988,8 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14984
14988
|
};
|
|
14985
14989
|
}
|
|
14986
14990
|
|
|
14987
|
-
function ownKeys$
|
|
14988
|
-
function _objectSpread$
|
|
14991
|
+
function ownKeys$o(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; }
|
|
14992
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14989
14993
|
function DrawRectangle(drawingId, pluginId, rectType) {
|
|
14990
14994
|
const {
|
|
14991
14995
|
set
|
|
@@ -15062,7 +15066,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15062
15066
|
isCentered: rectType === HandlersList.DRAWRECTCENTER,
|
|
15063
15067
|
isConstruction: e.ctrlKey
|
|
15064
15068
|
};
|
|
15065
|
-
const newTmpObjects = _objectSpread$
|
|
15069
|
+
const newTmpObjects = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15066
15070
|
[tmpRect.id]: tmpRect
|
|
15067
15071
|
});
|
|
15068
15072
|
delete newTmpObjects[tmpPointId];
|
|
@@ -15096,7 +15100,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15096
15100
|
}).then(() => {
|
|
15097
15101
|
// Remove the old temporary rectangle once a permanent one is created in its place
|
|
15098
15102
|
set(state => {
|
|
15099
|
-
const tmpObjects = _objectSpread$
|
|
15103
|
+
const tmpObjects = _objectSpread$o({}, state.tmpObjects);
|
|
15100
15104
|
delete tmpObjects[curRectId];
|
|
15101
15105
|
return {
|
|
15102
15106
|
tmpObjects
|
|
@@ -15114,7 +15118,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15114
15118
|
position: tmpRect_.end.clone()
|
|
15115
15119
|
};
|
|
15116
15120
|
return {
|
|
15117
|
-
tmpObjects: _objectSpread$
|
|
15121
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15118
15122
|
[tmpPoint.id]: tmpPoint
|
|
15119
15123
|
})
|
|
15120
15124
|
};
|
|
@@ -15130,19 +15134,19 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15130
15134
|
let newTmpObjs = null;
|
|
15131
15135
|
if (additionIndex === 0) {
|
|
15132
15136
|
const tmpPoint = state.tmpObjects[tmpPointId];
|
|
15133
|
-
newTmpObjs = _objectSpread$
|
|
15134
|
-
[tmpPointId]: _objectSpread$
|
|
15137
|
+
newTmpObjs = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15138
|
+
[tmpPointId]: _objectSpread$o(_objectSpread$o({}, tmpPoint), {}, {
|
|
15135
15139
|
position: snappedPos
|
|
15136
15140
|
})
|
|
15137
15141
|
});
|
|
15138
15142
|
} else {
|
|
15139
|
-
newTmpObjs = _objectSpread$
|
|
15140
|
-
[tmpRectId]: _objectSpread$
|
|
15143
|
+
newTmpObjs = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15144
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15141
15145
|
end: new THREE.Vector3(snappedPos.x, snappedPos.y, 0)
|
|
15142
15146
|
})
|
|
15143
15147
|
});
|
|
15144
15148
|
}
|
|
15145
|
-
return _objectSpread$
|
|
15149
|
+
return _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15146
15150
|
tmpObjects: newTmpObjs,
|
|
15147
15151
|
mousePos: snappedPos
|
|
15148
15152
|
});
|
|
@@ -15153,9 +15157,9 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15153
15157
|
const shiftUp = e.code === 'ShiftLeft' || e.code === 'ShiftRight';
|
|
15154
15158
|
const ctrlUp = e.code === 'ControlLeft' || e.code === 'ControlRight';
|
|
15155
15159
|
if (additionIndex > 0 && (shiftUp || ctrlUp)) {
|
|
15156
|
-
set(state => _objectSpread$
|
|
15157
|
-
tmpObjects: _objectSpread$
|
|
15158
|
-
[tmpRectId]: _objectSpread$
|
|
15160
|
+
set(state => _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15161
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15162
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15159
15163
|
isSquare: shiftUp ? true : state.tmpObjects[tmpRectId].isSquare,
|
|
15160
15164
|
isConstruction: ctrlUp ? true : state.tmpObjects[tmpRectId].isConstruction
|
|
15161
15165
|
})
|
|
@@ -15167,9 +15171,9 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15167
15171
|
const shiftUp = e.code === 'ShiftLeft' || e.code === 'ShiftRight';
|
|
15168
15172
|
const ctrlUp = e.code === 'ControlLeft' || e.code === 'ControlRight';
|
|
15169
15173
|
if (additionIndex > 0 && (shiftUp || ctrlUp)) {
|
|
15170
|
-
set(state => _objectSpread$
|
|
15171
|
-
tmpObjects: _objectSpread$
|
|
15172
|
-
[tmpRectId]: _objectSpread$
|
|
15174
|
+
set(state => _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15175
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15176
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15173
15177
|
isSquare: shiftUp ? false : state.tmpObjects[tmpRectId].isSquare,
|
|
15174
15178
|
isConstruction: ctrlUp ? false : state.tmpObjects[tmpRectId].isConstruction
|
|
15175
15179
|
})
|
|
@@ -15194,8 +15198,8 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15194
15198
|
};
|
|
15195
15199
|
}
|
|
15196
15200
|
|
|
15197
|
-
function ownKeys$
|
|
15198
|
-
function _objectSpread$
|
|
15201
|
+
function ownKeys$n(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; }
|
|
15202
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15199
15203
|
function DrawArc(drawingId, pluginId, arcType) {
|
|
15200
15204
|
// Global hooks:
|
|
15201
15205
|
const {
|
|
@@ -15245,7 +15249,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15245
15249
|
} else if (additionIndex === 1 || additionIndex === 2 && arcType === HandlersList.DRAWARCTANGENT) {
|
|
15246
15250
|
additionIndex = 0;
|
|
15247
15251
|
set(state => {
|
|
15248
|
-
const tmpStartP = _objectSpread$
|
|
15252
|
+
const tmpStartP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpStartPId]), {}, {
|
|
15249
15253
|
position: lastMousePos.clone()
|
|
15250
15254
|
});
|
|
15251
15255
|
return {
|
|
@@ -15258,20 +15262,20 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15258
15262
|
additionIndex = 1;
|
|
15259
15263
|
set(state => {
|
|
15260
15264
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
15261
|
-
const tmpEndP = _objectSpread$
|
|
15265
|
+
const tmpEndP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpEndPId]), {}, {
|
|
15262
15266
|
position: lastMousePos.clone()
|
|
15263
15267
|
});
|
|
15264
15268
|
const centerPos = calculateCenterPoint(tmpStartP.position, lastMousePos, lastMousePos);
|
|
15265
|
-
const tmpCenterP = _objectSpread$
|
|
15269
|
+
const tmpCenterP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpCenterPId]), {}, {
|
|
15266
15270
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15267
15271
|
});
|
|
15268
|
-
const tmpArc = _objectSpread$
|
|
15272
|
+
const tmpArc = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15269
15273
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15270
15274
|
drawAsLine: centerPos === undefined,
|
|
15271
15275
|
clockwise: false
|
|
15272
15276
|
});
|
|
15273
15277
|
return {
|
|
15274
|
-
tmpObjects: _objectSpread$
|
|
15278
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15275
15279
|
[tmpEndP.id]: tmpEndP,
|
|
15276
15280
|
[tmpCenterP.id]: tmpCenterP,
|
|
15277
15281
|
[tmpArc.id]: tmpArc
|
|
@@ -15382,7 +15386,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15382
15386
|
isConstruction: e.ctrlKey
|
|
15383
15387
|
};
|
|
15384
15388
|
return {
|
|
15385
|
-
tmpObjects: _objectSpread$
|
|
15389
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15386
15390
|
[tmpEndP.id]: tmpEndP,
|
|
15387
15391
|
[tmpCenterP.id]: tmpCenterP,
|
|
15388
15392
|
[tmpArc.id]: tmpArc
|
|
@@ -15412,7 +15416,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15412
15416
|
isConstruction: e.ctrlKey
|
|
15413
15417
|
};
|
|
15414
15418
|
return {
|
|
15415
|
-
tmpObjects: _objectSpread$
|
|
15419
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15416
15420
|
[tmpCenterP.id]: tmpCenterP,
|
|
15417
15421
|
[tmpArc.id]: tmpArc
|
|
15418
15422
|
})
|
|
@@ -15437,7 +15441,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15437
15441
|
promise.then(() => {
|
|
15438
15442
|
// Remove the old temporary arc and its points once a permanent one is created in its place
|
|
15439
15443
|
set(state => {
|
|
15440
|
-
const tmpObjects_ = _objectSpread$
|
|
15444
|
+
const tmpObjects_ = _objectSpread$n({}, state.tmpObjects);
|
|
15441
15445
|
delete tmpObjects_[curStartPId];
|
|
15442
15446
|
delete tmpObjects_[curEndPId];
|
|
15443
15447
|
delete tmpObjects_[curCenterPId];
|
|
@@ -15467,20 +15471,20 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15467
15471
|
const tmpCenterP = state.tmpObjects[curCenterPId];
|
|
15468
15472
|
const tmpArcP = state.tmpObjects[curArcId];
|
|
15469
15473
|
return {
|
|
15470
|
-
tmpObjects: _objectSpread$
|
|
15471
|
-
[tmpStartPId]: _objectSpread$
|
|
15474
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15475
|
+
[tmpStartPId]: _objectSpread$n(_objectSpread$n({}, tmpStartP), {}, {
|
|
15472
15476
|
id: tmpStartPId,
|
|
15473
15477
|
position: tmpEndP.position.clone()
|
|
15474
15478
|
}),
|
|
15475
|
-
[tmpEndPId]: _objectSpread$
|
|
15479
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15476
15480
|
id: tmpEndPId,
|
|
15477
15481
|
position: tmpEndP.position.clone()
|
|
15478
15482
|
}),
|
|
15479
|
-
[tmpCenterPId]: _objectSpread$
|
|
15483
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15480
15484
|
id: tmpCenterPId,
|
|
15481
15485
|
position: tmpEndP.position.clone()
|
|
15482
15486
|
}),
|
|
15483
|
-
[tmpArcId]: _objectSpread$
|
|
15487
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArcP), {}, {
|
|
15484
15488
|
id: tmpArcId,
|
|
15485
15489
|
startPId: tmpStartPId,
|
|
15486
15490
|
endPId: tmpEndPId,
|
|
@@ -15502,8 +15506,8 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15502
15506
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
15503
15507
|
return {
|
|
15504
15508
|
mousePos: lastMousePos,
|
|
15505
|
-
tmpObjects: _objectSpread$
|
|
15506
|
-
[tmpStartPId]: _objectSpread$
|
|
15509
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15510
|
+
[tmpStartPId]: _objectSpread$n(_objectSpread$n({}, tmpStartP), {}, {
|
|
15507
15511
|
position: lastMousePos.clone()
|
|
15508
15512
|
})
|
|
15509
15513
|
})
|
|
@@ -15516,14 +15520,14 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15516
15520
|
const centerPos = calculateCenterPoint(tmpStartP.position, lastMousePos, lastMousePos);
|
|
15517
15521
|
return {
|
|
15518
15522
|
mousePos: lastMousePos,
|
|
15519
|
-
tmpObjects: _objectSpread$
|
|
15520
|
-
[tmpEndPId]: _objectSpread$
|
|
15523
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15524
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15521
15525
|
position: lastMousePos.clone()
|
|
15522
15526
|
}),
|
|
15523
|
-
[tmpCenterPId]: _objectSpread$
|
|
15527
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15524
15528
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15525
15529
|
}),
|
|
15526
|
-
[tmpArcId]: _objectSpread$
|
|
15530
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArc), {}, {
|
|
15527
15531
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15528
15532
|
drawAsLine: centerPos === undefined,
|
|
15529
15533
|
clockwise: false
|
|
@@ -15538,14 +15542,14 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15538
15542
|
const centerPos = calculateCenterPoint(tmpStartP.position, tmpEndP.position, lastMousePos);
|
|
15539
15543
|
return {
|
|
15540
15544
|
mousePos: lastMousePos,
|
|
15541
|
-
tmpObjects: _objectSpread$
|
|
15542
|
-
[tmpEndPId]: _objectSpread$
|
|
15545
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15546
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15543
15547
|
position: arcType === HandlersList.DRAWARCTANGENT ? lastMousePos.clone() : tmpEndP.position
|
|
15544
15548
|
}),
|
|
15545
|
-
[tmpCenterPId]: _objectSpread$
|
|
15549
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15546
15550
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15547
15551
|
}),
|
|
15548
|
-
[tmpArcId]: _objectSpread$
|
|
15552
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArc), {}, {
|
|
15549
15553
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15550
15554
|
drawAsLine: centerPos === undefined,
|
|
15551
15555
|
clockwise: evaluateClockwise(tmpStartP.position, tmpEndP.position, lastMousePos)
|
|
@@ -15558,9 +15562,9 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15558
15562
|
};
|
|
15559
15563
|
const keydown = e => {
|
|
15560
15564
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15561
|
-
set(state => _objectSpread$
|
|
15562
|
-
tmpObjects: _objectSpread$
|
|
15563
|
-
[tmpArcId]: _objectSpread$
|
|
15565
|
+
set(state => _objectSpread$n(_objectSpread$n({}, state), {}, {
|
|
15566
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15567
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15564
15568
|
isConstruction: true
|
|
15565
15569
|
})
|
|
15566
15570
|
})
|
|
@@ -15569,9 +15573,9 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15569
15573
|
};
|
|
15570
15574
|
const keyup = e => {
|
|
15571
15575
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15572
|
-
set(state => _objectSpread$
|
|
15573
|
-
tmpObjects: _objectSpread$
|
|
15574
|
-
[tmpArcId]: _objectSpread$
|
|
15576
|
+
set(state => _objectSpread$n(_objectSpread$n({}, state), {}, {
|
|
15577
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15578
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15575
15579
|
isConstruction: false
|
|
15576
15580
|
})
|
|
15577
15581
|
})
|
|
@@ -15595,8 +15599,8 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15595
15599
|
};
|
|
15596
15600
|
}
|
|
15597
15601
|
|
|
15598
|
-
function ownKeys$
|
|
15599
|
-
function _objectSpread$
|
|
15602
|
+
function ownKeys$m(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; }
|
|
15603
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15600
15604
|
function DrawCircle(drawingId, pluginId) {
|
|
15601
15605
|
const {
|
|
15602
15606
|
set
|
|
@@ -15640,7 +15644,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15640
15644
|
} else {
|
|
15641
15645
|
additionIndex = 0;
|
|
15642
15646
|
set(state => {
|
|
15643
|
-
const tmpCenterP = _objectSpread$
|
|
15647
|
+
const tmpCenterP = _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCenterPId]), {}, {
|
|
15644
15648
|
position: lastMousePos.clone()
|
|
15645
15649
|
});
|
|
15646
15650
|
return {
|
|
@@ -15670,7 +15674,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15670
15674
|
isConstruction: e.ctrlKey
|
|
15671
15675
|
};
|
|
15672
15676
|
return {
|
|
15673
|
-
tmpObjects: _objectSpread$
|
|
15677
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15674
15678
|
[tmpCenterP.id]: tmpCenterP,
|
|
15675
15679
|
[tmpCircle.id]: tmpCircle
|
|
15676
15680
|
})
|
|
@@ -15690,7 +15694,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15690
15694
|
}).then(() => {
|
|
15691
15695
|
// Remove the old temporary circle and its center point once a permanent one is created in its place
|
|
15692
15696
|
set(state => {
|
|
15693
|
-
const tmpObjects_ = _objectSpread$
|
|
15697
|
+
const tmpObjects_ = _objectSpread$m({}, state.tmpObjects);
|
|
15694
15698
|
delete tmpObjects_[curCenterPId];
|
|
15695
15699
|
delete tmpObjects_[curCircleId];
|
|
15696
15700
|
return {
|
|
@@ -15705,8 +15709,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15705
15709
|
set(state => {
|
|
15706
15710
|
const tmpCenterP = state.tmpObjects[curCenterPId];
|
|
15707
15711
|
return {
|
|
15708
|
-
tmpObjects: _objectSpread$
|
|
15709
|
-
[tmpCenterPId]: _objectSpread$
|
|
15712
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15713
|
+
[tmpCenterPId]: _objectSpread$m(_objectSpread$m({}, tmpCenterP), {}, {
|
|
15710
15714
|
id: tmpCenterPId,
|
|
15711
15715
|
position: e.point.clone().applyMatrix4(getGlobalToLocalMatrix(drawingId, sketchId))
|
|
15712
15716
|
})
|
|
@@ -15726,8 +15730,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15726
15730
|
const tmpCenterP = state.tmpObjects[tmpCenterPId];
|
|
15727
15731
|
return {
|
|
15728
15732
|
mousePos: lastMousePos,
|
|
15729
|
-
tmpObjects: _objectSpread$
|
|
15730
|
-
[tmpCenterPId]: _objectSpread$
|
|
15733
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15734
|
+
[tmpCenterPId]: _objectSpread$m(_objectSpread$m({}, tmpCenterP), {}, {
|
|
15731
15735
|
position: snappedPos || localPos
|
|
15732
15736
|
})
|
|
15733
15737
|
})
|
|
@@ -15737,8 +15741,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15737
15741
|
const tmpCircle = state.tmpObjects[tmpCircleId];
|
|
15738
15742
|
return {
|
|
15739
15743
|
mousePos: lastMousePos,
|
|
15740
|
-
tmpObjects: _objectSpread$
|
|
15741
|
-
[tmpCircleId]: _objectSpread$
|
|
15744
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15745
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, tmpCircle), {}, {
|
|
15742
15746
|
radius: Math.max(tmpCenterP.position.distanceTo(localPos), 0.001)
|
|
15743
15747
|
})
|
|
15744
15748
|
})
|
|
@@ -15749,9 +15753,9 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15749
15753
|
};
|
|
15750
15754
|
const keydown = e => {
|
|
15751
15755
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15752
|
-
set(state => _objectSpread$
|
|
15753
|
-
tmpObjects: _objectSpread$
|
|
15754
|
-
[tmpCircleId]: _objectSpread$
|
|
15756
|
+
set(state => _objectSpread$m(_objectSpread$m({}, state), {}, {
|
|
15757
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15758
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCircleId]), {}, {
|
|
15755
15759
|
isConstruction: true
|
|
15756
15760
|
})
|
|
15757
15761
|
})
|
|
@@ -15760,9 +15764,9 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15760
15764
|
};
|
|
15761
15765
|
const keyup = e => {
|
|
15762
15766
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15763
|
-
set(state => _objectSpread$
|
|
15764
|
-
tmpObjects: _objectSpread$
|
|
15765
|
-
[tmpCircleId]: _objectSpread$
|
|
15767
|
+
set(state => _objectSpread$m(_objectSpread$m({}, state), {}, {
|
|
15768
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15769
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCircleId]), {}, {
|
|
15766
15770
|
isConstruction: false
|
|
15767
15771
|
})
|
|
15768
15772
|
})
|
|
@@ -15786,8 +15790,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15786
15790
|
};
|
|
15787
15791
|
}
|
|
15788
15792
|
|
|
15789
|
-
function ownKeys$
|
|
15790
|
-
function _objectSpread$
|
|
15793
|
+
function ownKeys$l(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; }
|
|
15794
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15791
15795
|
|
|
15792
15796
|
// TODO: reconsider these limits?
|
|
15793
15797
|
// Interpolation spline - 20 limit for performance reasons (there can be a lot of NxN SLAE solve calls from LGS)
|
|
@@ -15852,14 +15856,14 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15852
15856
|
} else if (additionIndex === 1) {
|
|
15853
15857
|
additionIndex = 0;
|
|
15854
15858
|
set(state => {
|
|
15855
|
-
const tmpObjects_ = _objectSpread$
|
|
15859
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15856
15860
|
const tmpNurbs = state.tmpObjects[tmpNurbsId];
|
|
15857
15861
|
const tmpOldEndPId = tmpNurbs.pointIds[1];
|
|
15858
15862
|
delete tmpObjects_[tmpOldEndPId];
|
|
15859
15863
|
delete tmpObjects_[tmpNurbsId];
|
|
15860
15864
|
return {
|
|
15861
|
-
tmpObjects: _objectSpread$
|
|
15862
|
-
[tmpStartPId]: _objectSpread$
|
|
15865
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, tmpObjects_), {}, {
|
|
15866
|
+
[tmpStartPId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpStartPId]), {}, {
|
|
15863
15867
|
position: lastMousePos.clone()
|
|
15864
15868
|
})
|
|
15865
15869
|
})
|
|
@@ -15868,17 +15872,17 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15868
15872
|
} else {
|
|
15869
15873
|
additionIndex--;
|
|
15870
15874
|
set(state => {
|
|
15871
|
-
const tmpObjects_ = _objectSpread$
|
|
15875
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15872
15876
|
const tmpNurbs = state.tmpObjects[tmpNurbsId];
|
|
15873
15877
|
const tmpOldEndPId = tmpNurbs.pointIds[tmpNurbs.pointIds.length - 1];
|
|
15874
15878
|
const tmpNewEndPId = tmpNurbs.pointIds[tmpNurbs.pointIds.length - 2];
|
|
15875
15879
|
delete tmpObjects_[tmpOldEndPId];
|
|
15876
15880
|
return {
|
|
15877
|
-
tmpObjects: _objectSpread$
|
|
15878
|
-
[tmpNewEndPId]: _objectSpread$
|
|
15881
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, tmpObjects_), {}, {
|
|
15882
|
+
[tmpNewEndPId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNewEndPId]), {}, {
|
|
15879
15883
|
position: lastMousePos.clone()
|
|
15880
15884
|
}),
|
|
15881
|
-
[tmpNurbsId]: _objectSpread$
|
|
15885
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
15882
15886
|
drawAsLine: additionIndex < 2,
|
|
15883
15887
|
pointIds: tmpNurbs.pointIds.slice(0, -1),
|
|
15884
15888
|
points: [...tmpNurbs.points.slice(0, -2), lastMousePos.clone()],
|
|
@@ -15924,7 +15928,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15924
15928
|
isConstruction: e.ctrlKey
|
|
15925
15929
|
};
|
|
15926
15930
|
return {
|
|
15927
|
-
tmpObjects: _objectSpread$
|
|
15931
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
15928
15932
|
[tmpP2.id]: tmpP2,
|
|
15929
15933
|
[tmpNurbs.id]: tmpNurbs
|
|
15930
15934
|
})
|
|
@@ -15969,7 +15973,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15969
15973
|
promise.then(() => {
|
|
15970
15974
|
// Remove the old temporary curve and its points once a permanent one is created in its place
|
|
15971
15975
|
set(state => {
|
|
15972
|
-
const tmpObjects_ = _objectSpread$
|
|
15976
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15973
15977
|
pointIds.forEach(pId => {
|
|
15974
15978
|
delete tmpObjects_[pId];
|
|
15975
15979
|
});
|
|
@@ -15990,7 +15994,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15990
15994
|
const tmpP2Id = v4();
|
|
15991
15995
|
const tmpNurbs = state.tmpObjects[curNurbsId];
|
|
15992
15996
|
return {
|
|
15993
|
-
tmpObjects: _objectSpread$
|
|
15997
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
15994
15998
|
[tmpStartPId]: {
|
|
15995
15999
|
class: TmpObjClasses.Point,
|
|
15996
16000
|
id: tmpStartPId,
|
|
@@ -16001,7 +16005,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16001
16005
|
id: tmpP2Id,
|
|
16002
16006
|
position: tmpEndP.position.clone()
|
|
16003
16007
|
},
|
|
16004
|
-
[tmpNurbsId]: _objectSpread$
|
|
16008
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
16005
16009
|
id: tmpNurbsId,
|
|
16006
16010
|
drawAsLine: true,
|
|
16007
16011
|
pointIds: [tmpStartPId, tmpP2Id],
|
|
@@ -16030,8 +16034,8 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16030
16034
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
16031
16035
|
return {
|
|
16032
16036
|
mousePos: lastMousePos,
|
|
16033
|
-
tmpObjects: _objectSpread$
|
|
16034
|
-
[tmpStartPId]: _objectSpread$
|
|
16037
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16038
|
+
[tmpStartPId]: _objectSpread$l(_objectSpread$l({}, tmpStartP), {}, {
|
|
16035
16039
|
position: lastMousePos.clone()
|
|
16036
16040
|
})
|
|
16037
16041
|
})
|
|
@@ -16043,13 +16047,13 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16043
16047
|
const points = [...tmpNurbs.points.slice(0, additionIndex), lastMousePos.clone()];
|
|
16044
16048
|
return {
|
|
16045
16049
|
mousePos: lastMousePos,
|
|
16046
|
-
tmpObjects: _objectSpread$
|
|
16050
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16047
16051
|
[tmpEndPId]: {
|
|
16048
16052
|
class: TmpObjClasses.Point,
|
|
16049
16053
|
id: tmpEndPId,
|
|
16050
16054
|
position: lastMousePos.clone()
|
|
16051
16055
|
},
|
|
16052
|
-
[tmpNurbsId]: _objectSpread$
|
|
16056
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
16053
16057
|
drawAsLine: additionIndex < 2,
|
|
16054
16058
|
pointIds,
|
|
16055
16059
|
points,
|
|
@@ -16064,9 +16068,9 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16064
16068
|
};
|
|
16065
16069
|
const keydown = e => {
|
|
16066
16070
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
16067
|
-
set(state => _objectSpread$
|
|
16068
|
-
tmpObjects: _objectSpread$
|
|
16069
|
-
[tmpNurbsId]: _objectSpread$
|
|
16071
|
+
set(state => _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
16072
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16073
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNurbsId]), {}, {
|
|
16070
16074
|
isConstruction: true
|
|
16071
16075
|
})
|
|
16072
16076
|
})
|
|
@@ -16075,9 +16079,9 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16075
16079
|
};
|
|
16076
16080
|
const keyup = e => {
|
|
16077
16081
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
16078
|
-
set(state => _objectSpread$
|
|
16079
|
-
tmpObjects: _objectSpread$
|
|
16080
|
-
[tmpNurbsId]: _objectSpread$
|
|
16082
|
+
set(state => _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
16083
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16084
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNurbsId]), {}, {
|
|
16081
16085
|
isConstruction: false
|
|
16082
16086
|
})
|
|
16083
16087
|
})
|
|
@@ -16805,7 +16809,7 @@ const bezierSplitAtHalf = p => {
|
|
|
16805
16809
|
|
|
16806
16810
|
/**
|
|
16807
16811
|
* Calculates the approximate length of a nurbs span.
|
|
16808
|
-
*
|
|
16812
|
+
*
|
|
16809
16813
|
* @param points An array of control points.
|
|
16810
16814
|
* @param segmentsCount The number of segments to divide the nurbs span into.
|
|
16811
16815
|
* @param weights Optional Bézier control-point weights (rational curve). Defaults to unit weights.
|
|
@@ -17985,8 +17989,8 @@ function Use(drawingId, pluginId, useType) {
|
|
|
17985
17989
|
};
|
|
17986
17990
|
}
|
|
17987
17991
|
|
|
17988
|
-
function ownKeys$
|
|
17989
|
-
function _objectSpread$
|
|
17992
|
+
function ownKeys$k(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; }
|
|
17993
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17990
17994
|
function SSelect(drawingId, pluginId) {
|
|
17991
17995
|
const hoverHandler = Hover(drawingId, pluginId);
|
|
17992
17996
|
const filter = object => true;
|
|
@@ -18037,10 +18041,10 @@ function SSelect(drawingId, pluginId) {
|
|
|
18037
18041
|
name: HandlersList.SSELECT,
|
|
18038
18042
|
filter,
|
|
18039
18043
|
onDeactivate,
|
|
18040
|
-
pointerHandlers: _objectSpread$
|
|
18044
|
+
pointerHandlers: _objectSpread$k({
|
|
18041
18045
|
onClick
|
|
18042
18046
|
}, hoverHandler.pointerHandlers),
|
|
18043
|
-
keyHandlers: _objectSpread$
|
|
18047
|
+
keyHandlers: _objectSpread$k({}, hoverHandler.keyHandlers)
|
|
18044
18048
|
};
|
|
18045
18049
|
}
|
|
18046
18050
|
|
|
@@ -18069,7 +18073,7 @@ const HandlersConstructors = {
|
|
|
18069
18073
|
|
|
18070
18074
|
function useSketchState(drawingId, pluginId, sel, equalityFn) {
|
|
18071
18075
|
return usePlugin(drawingId, pluginId, plugin => {
|
|
18072
|
-
if (plugin && plugin.name === description$
|
|
18076
|
+
if (plugin && plugin.name === description$p.name) {
|
|
18073
18077
|
return sel(plugin.state);
|
|
18074
18078
|
} else {
|
|
18075
18079
|
window.console.error('Wrong arguments are passed into useSketchState.');
|
|
@@ -21171,8 +21175,8 @@ const TmpGraphics = () => {
|
|
|
21171
21175
|
}));
|
|
21172
21176
|
};
|
|
21173
21177
|
|
|
21174
|
-
function ownKeys$
|
|
21175
|
-
function _objectSpread$
|
|
21178
|
+
function ownKeys$j(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; }
|
|
21179
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21176
21180
|
|
|
21177
21181
|
/*
|
|
21178
21182
|
* !polygonOffset!
|
|
@@ -21223,7 +21227,7 @@ const CCLine = props => {
|
|
|
21223
21227
|
end: end,
|
|
21224
21228
|
isConstruction: isConstruction_,
|
|
21225
21229
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21226
|
-
meshProps: _objectSpread$
|
|
21230
|
+
meshProps: _objectSpread$j(_objectSpread$j({
|
|
21227
21231
|
renderOrder
|
|
21228
21232
|
}, handlers), {}, {
|
|
21229
21233
|
userData
|
|
@@ -21274,7 +21278,7 @@ const CCPoint = props => {
|
|
|
21274
21278
|
// so we have to increase size of hovered or selected point to make the point not occluded buy other ones
|
|
21275
21279
|
,
|
|
21276
21280
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21277
|
-
meshProps: _objectSpread$
|
|
21281
|
+
meshProps: _objectSpread$j(_objectSpread$j({
|
|
21278
21282
|
renderOrder
|
|
21279
21283
|
}, handlers), {}, {
|
|
21280
21284
|
userData
|
|
@@ -21332,7 +21336,7 @@ const CCArc = props => {
|
|
|
21332
21336
|
clockwise: clockwise,
|
|
21333
21337
|
isConstruction: isConstruction_,
|
|
21334
21338
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21335
|
-
meshProps: _objectSpread$
|
|
21339
|
+
meshProps: _objectSpread$j({
|
|
21336
21340
|
renderOrder,
|
|
21337
21341
|
userData
|
|
21338
21342
|
}, handlers),
|
|
@@ -21378,7 +21382,7 @@ const CCCircle = props => {
|
|
|
21378
21382
|
radius: radius,
|
|
21379
21383
|
isConstruction: isConstruction_,
|
|
21380
21384
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21381
|
-
meshProps: _objectSpread$
|
|
21385
|
+
meshProps: _objectSpread$j({
|
|
21382
21386
|
renderOrder,
|
|
21383
21387
|
userData
|
|
21384
21388
|
}, handlers),
|
|
@@ -21451,7 +21455,7 @@ const CCSpline = props => {
|
|
|
21451
21455
|
weights: span.weights,
|
|
21452
21456
|
isConstruction: isConstruction_,
|
|
21453
21457
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21454
|
-
meshProps: _objectSpread$
|
|
21458
|
+
meshProps: _objectSpread$j({
|
|
21455
21459
|
renderOrder,
|
|
21456
21460
|
userData
|
|
21457
21461
|
}, handlers),
|
|
@@ -21496,7 +21500,7 @@ const CCBezier = props => {
|
|
|
21496
21500
|
points: points,
|
|
21497
21501
|
isConstruction: isConstruction_,
|
|
21498
21502
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21499
|
-
meshProps: _objectSpread$
|
|
21503
|
+
meshProps: _objectSpread$j({
|
|
21500
21504
|
renderOrder,
|
|
21501
21505
|
userData
|
|
21502
21506
|
}, handlers),
|
|
@@ -21749,8 +21753,8 @@ const MousePosition = () => {
|
|
|
21749
21753
|
}, `${mousePos.x.toFixed(2)}, ${mousePos.y.toFixed(2)}`)) : null;
|
|
21750
21754
|
};
|
|
21751
21755
|
|
|
21752
|
-
function ownKeys$
|
|
21753
|
-
function _objectSpread$
|
|
21756
|
+
function ownKeys$i(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; }
|
|
21757
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21754
21758
|
|
|
21755
21759
|
/**
|
|
21756
21760
|
* The colours a geometry override gives the bodies it is for.
|
|
@@ -21761,12 +21765,12 @@ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
21761
21765
|
const useGeometryOverridesStore = create()((set, get) => ({
|
|
21762
21766
|
overrides: {},
|
|
21763
21767
|
addOverride: (name, override) => set(state => ({
|
|
21764
|
-
overrides: _objectSpread$
|
|
21768
|
+
overrides: _objectSpread$i(_objectSpread$i({}, state.overrides), {}, {
|
|
21765
21769
|
[name]: override
|
|
21766
21770
|
})
|
|
21767
21771
|
})),
|
|
21768
21772
|
removeOverride: name => set(state => {
|
|
21769
|
-
const overrides_ = _objectSpread$
|
|
21773
|
+
const overrides_ = _objectSpread$i({}, state.overrides);
|
|
21770
21774
|
delete overrides_[name];
|
|
21771
21775
|
return {
|
|
21772
21776
|
overrides: overrides_
|
|
@@ -21963,8 +21967,8 @@ const GeometryOverridesManager = ({
|
|
|
21963
21967
|
return null;
|
|
21964
21968
|
};
|
|
21965
21969
|
|
|
21966
|
-
function ownKeys$
|
|
21967
|
-
function _objectSpread$
|
|
21970
|
+
function ownKeys$h(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; }
|
|
21971
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21968
21972
|
const ConstraintManager = ({
|
|
21969
21973
|
drawingId,
|
|
21970
21974
|
pluginId,
|
|
@@ -21983,7 +21987,7 @@ const ConstraintManager = ({
|
|
|
21983
21987
|
const {
|
|
21984
21988
|
overdefined
|
|
21985
21989
|
} = getSketchState(drawingId, pluginId);
|
|
21986
|
-
const overdefinedNew = _objectSpread$
|
|
21990
|
+
const overdefinedNew = _objectSpread$h({}, overdefined);
|
|
21987
21991
|
entities_.forEach(id => {
|
|
21988
21992
|
var _overdefined$id;
|
|
21989
21993
|
const entityConstrArr = ((_overdefined$id = overdefined[id]) == null ? void 0 : _overdefined$id.filter(cId => cId !== constraintId)) || [];
|
|
@@ -22001,7 +22005,7 @@ const ConstraintManager = ({
|
|
|
22001
22005
|
const {
|
|
22002
22006
|
overdefined
|
|
22003
22007
|
} = getSketchState(drawingId, pluginId);
|
|
22004
|
-
const overdefinedNew = _objectSpread$
|
|
22008
|
+
const overdefinedNew = _objectSpread$h({}, overdefined);
|
|
22005
22009
|
entities_.forEach(id => {
|
|
22006
22010
|
if (!overdefined[id]) {
|
|
22007
22011
|
return;
|
|
@@ -22361,7 +22365,7 @@ const ViewOnlyMode = ({
|
|
|
22361
22365
|
objId: sketchId
|
|
22362
22366
|
})));
|
|
22363
22367
|
};
|
|
22364
|
-
const ViewImpl$
|
|
22368
|
+
const ViewImpl$9 = ({
|
|
22365
22369
|
drawingId,
|
|
22366
22370
|
pluginId
|
|
22367
22371
|
}) => {
|
|
@@ -22402,7 +22406,7 @@ const ViewImpl$8 = ({
|
|
|
22402
22406
|
*
|
|
22403
22407
|
* @internal
|
|
22404
22408
|
*/
|
|
22405
|
-
const View$
|
|
22409
|
+
const View$j = ({
|
|
22406
22410
|
drawingId,
|
|
22407
22411
|
pluginId
|
|
22408
22412
|
}) => {
|
|
@@ -22410,7 +22414,7 @@ const View$i = ({
|
|
|
22410
22414
|
drawingId: drawingId,
|
|
22411
22415
|
pluginId: pluginId,
|
|
22412
22416
|
inCanvas: true
|
|
22413
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
22417
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$9, {
|
|
22414
22418
|
drawingId: drawingId,
|
|
22415
22419
|
pluginId: pluginId
|
|
22416
22420
|
}));
|
|
@@ -22477,7 +22481,7 @@ const SketchGroup = ({
|
|
|
22477
22481
|
}, children));
|
|
22478
22482
|
};
|
|
22479
22483
|
|
|
22480
|
-
const _excluded$
|
|
22484
|
+
const _excluded$6 = ["angle", "defaultValue", "setValue"];
|
|
22481
22485
|
const rigidSetFilter = (drawingId, sketchId) => (scope, data) => {
|
|
22482
22486
|
if (scope !== TreeObjScope) {
|
|
22483
22487
|
return false;
|
|
@@ -22541,7 +22545,7 @@ const Input = _ref => {
|
|
|
22541
22545
|
defaultValue,
|
|
22542
22546
|
setValue
|
|
22543
22547
|
} = _ref,
|
|
22544
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
22548
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
22545
22549
|
const {
|
|
22546
22550
|
Input: BInput
|
|
22547
22551
|
} = useBuerli(buerli => buerli.options.elements);
|
|
@@ -23270,9 +23274,9 @@ const PlaneSelection = ({
|
|
|
23270
23274
|
}));
|
|
23271
23275
|
};
|
|
23272
23276
|
|
|
23273
|
-
const _excluded$
|
|
23274
|
-
function ownKeys$
|
|
23275
|
-
function _objectSpread$
|
|
23277
|
+
const _excluded$5 = ["items", "menuInfo", "caption", "icon", "onHide", "children"];
|
|
23278
|
+
function ownKeys$g(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; }
|
|
23279
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23276
23280
|
|
|
23277
23281
|
/**
|
|
23278
23282
|
* What a {@link ContextMenu} is opened on: the SDK's interaction info of the thing.
|
|
@@ -23324,7 +23328,7 @@ const finalizeMenuElement = (menuElement, menuInfo) => {
|
|
|
23324
23328
|
if (!menuElement) {
|
|
23325
23329
|
return null;
|
|
23326
23330
|
}
|
|
23327
|
-
const menuElement_ = _objectSpread$
|
|
23331
|
+
const menuElement_ = _objectSpread$g({}, menuElement);
|
|
23328
23332
|
if (menuElement_.children) {
|
|
23329
23333
|
const children = typeof menuElement_.children === 'function' ? menuElement_.children(menuInfo) : menuElement_.children;
|
|
23330
23334
|
menuElement_.children = children.map(child => finalizeMenuElement(child, menuInfo));
|
|
@@ -23339,7 +23343,7 @@ const menuElementToItem = menuElement => {
|
|
|
23339
23343
|
}
|
|
23340
23344
|
|
|
23341
23345
|
// the element's fields of whichever kind it is (antd's item kinds exclude one another)
|
|
23342
|
-
const menuItem = _objectSpread$
|
|
23346
|
+
const menuItem = _objectSpread$g({}, menuElement);
|
|
23343
23347
|
if (menuItem.onClick) {
|
|
23344
23348
|
delete menuItem.onClick;
|
|
23345
23349
|
}
|
|
@@ -23420,7 +23424,7 @@ const ContextMenu = _ref => {
|
|
|
23420
23424
|
onHide,
|
|
23421
23425
|
children
|
|
23422
23426
|
} = _ref,
|
|
23423
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
23427
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
23424
23428
|
const menuElements = React__default.useMemo(() => items.map(item => finalizeMenuElement(item, menuInfo)), [items, menuInfo]);
|
|
23425
23429
|
const menuItems = React__default.useMemo(() => menuElements.map(element => menuElementToItem(element)), [menuElements]);
|
|
23426
23430
|
const {
|
|
@@ -23493,8 +23497,8 @@ const ContextMenu = _ref => {
|
|
|
23493
23497
|
}), children);
|
|
23494
23498
|
};
|
|
23495
23499
|
|
|
23496
|
-
function ownKeys$
|
|
23497
|
-
function _objectSpread$
|
|
23500
|
+
function ownKeys$f(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; }
|
|
23501
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23498
23502
|
const inputRegex$1 = /^\w*$/;
|
|
23499
23503
|
const nameRegex$2 = /^[a-zA-Z_]\w*$/;
|
|
23500
23504
|
const NameEdit = ({
|
|
@@ -23538,7 +23542,7 @@ const NameEdit = ({
|
|
|
23538
23542
|
const zIndex = showBlankDiv ? blankZIndex + 1 : 0;
|
|
23539
23543
|
return /*#__PURE__*/React__default.createElement(Input$2, {
|
|
23540
23544
|
className: "rcad-name-edit",
|
|
23541
|
-
style: _objectSpread$
|
|
23545
|
+
style: _objectSpread$f(_objectSpread$f({}, style), {}, {
|
|
23542
23546
|
zIndex
|
|
23543
23547
|
}),
|
|
23544
23548
|
ref: ref,
|
|
@@ -23644,7 +23648,7 @@ function useRevealWhenPicked(row, picked_) {
|
|
|
23644
23648
|
}, [picked_, row]);
|
|
23645
23649
|
}
|
|
23646
23650
|
|
|
23647
|
-
const _excluded$
|
|
23651
|
+
const _excluded$4 = ["hovered", "bordered", "blocked", "active", "selected", "off", "reveal", "className"];
|
|
23648
23652
|
styled.div`
|
|
23649
23653
|
display: flex;
|
|
23650
23654
|
flex-direction: row;
|
|
@@ -23680,7 +23684,7 @@ const HoveredDiv = /*#__PURE__*/React__default.forwardRef(function HoveredDiv(_r
|
|
|
23680
23684
|
reveal = selected,
|
|
23681
23685
|
className
|
|
23682
23686
|
} = _ref,
|
|
23683
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
23687
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
23684
23688
|
const own = React__default.useRef(null);
|
|
23685
23689
|
const setRef = React__default.useCallback(el => {
|
|
23686
23690
|
own.current = el;
|
|
@@ -24719,7 +24723,7 @@ const SketchMode = ({
|
|
|
24719
24723
|
onClick: onClick
|
|
24720
24724
|
}, /*#__PURE__*/React__default.createElement(Handlers, null), /*#__PURE__*/React__default.createElement(Constraints$1, null), /*#__PURE__*/React__default.createElement(CopyPatterns, null), /*#__PURE__*/React__default.createElement(Details, null), /*#__PURE__*/React__default.createElement(Regions, null), /*#__PURE__*/React__default.createElement(Position, null)));
|
|
24721
24725
|
};
|
|
24722
|
-
const RootImpl$
|
|
24726
|
+
const RootImpl$p = ({
|
|
24723
24727
|
drawingId,
|
|
24724
24728
|
pluginId
|
|
24725
24729
|
}) => {
|
|
@@ -24755,14 +24759,14 @@ const RootImpl$o = ({
|
|
|
24755
24759
|
*
|
|
24756
24760
|
* @internal
|
|
24757
24761
|
*/
|
|
24758
|
-
const Root$
|
|
24762
|
+
const Root$p = ({
|
|
24759
24763
|
drawingId,
|
|
24760
24764
|
pluginId
|
|
24761
24765
|
}) => {
|
|
24762
24766
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
24763
24767
|
drawingId: drawingId,
|
|
24764
24768
|
pluginId: pluginId
|
|
24765
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
24769
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$p, {
|
|
24766
24770
|
drawingId: drawingId,
|
|
24767
24771
|
pluginId: pluginId
|
|
24768
24772
|
}));
|
|
@@ -24800,11 +24804,11 @@ const Root$o = ({
|
|
|
24800
24804
|
* @module
|
|
24801
24805
|
*/
|
|
24802
24806
|
|
|
24803
|
-
var index$
|
|
24807
|
+
var index$p = /*#__PURE__*/Object.freeze({
|
|
24804
24808
|
__proto__: null,
|
|
24805
|
-
Root: Root$
|
|
24806
|
-
View: View$
|
|
24807
|
-
description: description$
|
|
24809
|
+
Root: Root$p,
|
|
24810
|
+
View: View$j,
|
|
24811
|
+
description: description$p
|
|
24808
24812
|
});
|
|
24809
24813
|
|
|
24810
24814
|
function useRefsReset(type, refs) {
|
|
@@ -24846,7 +24850,7 @@ const typesCaptions$2 = {
|
|
|
24846
24850
|
[WorkAxisType.WA_USERDEFINED]: 'Type: Custom'
|
|
24847
24851
|
};
|
|
24848
24852
|
const readOnlyTypes$4 = [WorkAxisType.WA_FIXED];
|
|
24849
|
-
const RootImpl$
|
|
24853
|
+
const RootImpl$o = ({
|
|
24850
24854
|
drawingId,
|
|
24851
24855
|
pluginId
|
|
24852
24856
|
}) => {
|
|
@@ -24946,14 +24950,14 @@ const RootImpl$n = ({
|
|
|
24946
24950
|
*
|
|
24947
24951
|
* @internal
|
|
24948
24952
|
*/
|
|
24949
|
-
const Root$
|
|
24953
|
+
const Root$o = ({
|
|
24950
24954
|
drawingId,
|
|
24951
24955
|
pluginId
|
|
24952
24956
|
}) => {
|
|
24953
24957
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
24954
24958
|
drawingId: drawingId,
|
|
24955
24959
|
pluginId: pluginId
|
|
24956
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
24960
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$o, {
|
|
24957
24961
|
drawingId: drawingId,
|
|
24958
24962
|
pluginId: pluginId
|
|
24959
24963
|
}));
|
|
@@ -25018,7 +25022,7 @@ function getBaseColor(direction, type, stage) {
|
|
|
25018
25022
|
return stage.datum;
|
|
25019
25023
|
}
|
|
25020
25024
|
}
|
|
25021
|
-
const ViewImpl$
|
|
25025
|
+
const ViewImpl$8 = ({
|
|
25022
25026
|
drawingId,
|
|
25023
25027
|
pluginId
|
|
25024
25028
|
}) => {
|
|
@@ -25054,7 +25058,7 @@ const ViewImpl$7 = ({
|
|
|
25054
25058
|
*
|
|
25055
25059
|
* @internal
|
|
25056
25060
|
*/
|
|
25057
|
-
const View$
|
|
25061
|
+
const View$i = ({
|
|
25058
25062
|
drawingId,
|
|
25059
25063
|
pluginId
|
|
25060
25064
|
}) => {
|
|
@@ -25062,7 +25066,7 @@ const View$h = ({
|
|
|
25062
25066
|
drawingId: drawingId,
|
|
25063
25067
|
pluginId: pluginId,
|
|
25064
25068
|
inCanvas: true
|
|
25065
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
25069
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$8, {
|
|
25066
25070
|
drawingId: drawingId,
|
|
25067
25071
|
pluginId: pluginId
|
|
25068
25072
|
}));
|
|
@@ -25101,7 +25105,7 @@ const View$h = ({
|
|
|
25101
25105
|
*
|
|
25102
25106
|
* @internal
|
|
25103
25107
|
*/
|
|
25104
|
-
const description$
|
|
25108
|
+
const description$o = {
|
|
25105
25109
|
name: 'WorkAxis',
|
|
25106
25110
|
version: '1.0.0',
|
|
25107
25111
|
author: 'Ledas',
|
|
@@ -25110,11 +25114,11 @@ const description$n = {
|
|
|
25110
25114
|
global: false
|
|
25111
25115
|
};
|
|
25112
25116
|
|
|
25113
|
-
var index$
|
|
25117
|
+
var index$o = /*#__PURE__*/Object.freeze({
|
|
25114
25118
|
__proto__: null,
|
|
25115
|
-
Root: Root$
|
|
25116
|
-
View: View$
|
|
25117
|
-
description: description$
|
|
25119
|
+
Root: Root$o,
|
|
25120
|
+
View: View$i,
|
|
25121
|
+
description: description$o
|
|
25118
25122
|
});
|
|
25119
25123
|
|
|
25120
25124
|
function linePlaneAngle(drawingId, refsParam) {
|
|
@@ -25212,7 +25216,7 @@ const typesCaptions$1 = {
|
|
|
25212
25216
|
[WorkPlaneType.WP_POINTFACE]: 'Type: Point and plane',
|
|
25213
25217
|
[WorkPlaneType.WP_LINEPLANEANGLE]: 'Type: Line, plane and angle'
|
|
25214
25218
|
};
|
|
25215
|
-
const RootImpl$
|
|
25219
|
+
const RootImpl$n = ({
|
|
25216
25220
|
drawingId,
|
|
25217
25221
|
pluginId
|
|
25218
25222
|
}) => {
|
|
@@ -25399,14 +25403,14 @@ const RootImpl$m = ({
|
|
|
25399
25403
|
*
|
|
25400
25404
|
* @internal
|
|
25401
25405
|
*/
|
|
25402
|
-
const Root$
|
|
25406
|
+
const Root$n = ({
|
|
25403
25407
|
drawingId,
|
|
25404
25408
|
pluginId
|
|
25405
25409
|
}) => {
|
|
25406
25410
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
25407
25411
|
drawingId: drawingId,
|
|
25408
25412
|
pluginId: pluginId
|
|
25409
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
25413
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$n, {
|
|
25410
25414
|
drawingId: drawingId,
|
|
25411
25415
|
pluginId: pluginId
|
|
25412
25416
|
}));
|
|
@@ -25505,7 +25509,7 @@ const WorkPlaneObj = ({
|
|
|
25505
25509
|
})));
|
|
25506
25510
|
};
|
|
25507
25511
|
|
|
25508
|
-
const ViewImpl$
|
|
25512
|
+
const ViewImpl$7 = ({
|
|
25509
25513
|
drawingId,
|
|
25510
25514
|
pluginId
|
|
25511
25515
|
}) => {
|
|
@@ -25544,7 +25548,7 @@ const ViewImpl$6 = ({
|
|
|
25544
25548
|
*
|
|
25545
25549
|
* @internal
|
|
25546
25550
|
*/
|
|
25547
|
-
const View$
|
|
25551
|
+
const View$h = ({
|
|
25548
25552
|
drawingId,
|
|
25549
25553
|
pluginId
|
|
25550
25554
|
}) => {
|
|
@@ -25552,7 +25556,7 @@ const View$g = ({
|
|
|
25552
25556
|
drawingId: drawingId,
|
|
25553
25557
|
pluginId: pluginId,
|
|
25554
25558
|
inCanvas: true
|
|
25555
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
25559
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$7, {
|
|
25556
25560
|
drawingId: drawingId,
|
|
25557
25561
|
pluginId: pluginId
|
|
25558
25562
|
}));
|
|
@@ -25592,7 +25596,7 @@ const View$g = ({
|
|
|
25592
25596
|
*
|
|
25593
25597
|
* @internal
|
|
25594
25598
|
*/
|
|
25595
|
-
const description$
|
|
25599
|
+
const description$n = {
|
|
25596
25600
|
name: 'WorkPlane',
|
|
25597
25601
|
version: '1.0.0',
|
|
25598
25602
|
author: 'Ledas',
|
|
@@ -25601,11 +25605,11 @@ const description$m = {
|
|
|
25601
25605
|
global: false
|
|
25602
25606
|
};
|
|
25603
25607
|
|
|
25604
|
-
var index$
|
|
25608
|
+
var index$n = /*#__PURE__*/Object.freeze({
|
|
25605
25609
|
__proto__: null,
|
|
25606
|
-
Root: Root$
|
|
25607
|
-
View: View$
|
|
25608
|
-
description: description$
|
|
25610
|
+
Root: Root$n,
|
|
25611
|
+
View: View$h,
|
|
25612
|
+
description: description$n
|
|
25609
25613
|
});
|
|
25610
25614
|
|
|
25611
25615
|
var Members$f = /*#__PURE__*/function (Members) {
|
|
@@ -25636,7 +25640,7 @@ const typesCaptions = {
|
|
|
25636
25640
|
[WorkPointType.WPT_INTERSECTION]: 'Type: Intersection',
|
|
25637
25641
|
[WorkPointType.WPT_USERDEFINED]: 'Type: Custom'
|
|
25638
25642
|
};
|
|
25639
|
-
const RootImpl$
|
|
25643
|
+
const RootImpl$m = ({
|
|
25640
25644
|
drawingId,
|
|
25641
25645
|
pluginId
|
|
25642
25646
|
}) => {
|
|
@@ -25742,14 +25746,14 @@ const RootImpl$l = ({
|
|
|
25742
25746
|
*
|
|
25743
25747
|
* @internal
|
|
25744
25748
|
*/
|
|
25745
|
-
const Root$
|
|
25749
|
+
const Root$m = ({
|
|
25746
25750
|
drawingId,
|
|
25747
25751
|
pluginId
|
|
25748
25752
|
}) => {
|
|
25749
25753
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
25750
25754
|
drawingId: drawingId,
|
|
25751
25755
|
pluginId: pluginId
|
|
25752
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
25756
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$m, {
|
|
25753
25757
|
drawingId: drawingId,
|
|
25754
25758
|
pluginId: pluginId
|
|
25755
25759
|
}));
|
|
@@ -25820,7 +25824,7 @@ const WorkPointObj = ({
|
|
|
25820
25824
|
}));
|
|
25821
25825
|
};
|
|
25822
25826
|
|
|
25823
|
-
const ViewImpl$
|
|
25827
|
+
const ViewImpl$6 = ({
|
|
25824
25828
|
drawingId,
|
|
25825
25829
|
pluginId
|
|
25826
25830
|
}) => {
|
|
@@ -25853,7 +25857,7 @@ const ViewImpl$5 = ({
|
|
|
25853
25857
|
*
|
|
25854
25858
|
* @internal
|
|
25855
25859
|
*/
|
|
25856
|
-
const View$
|
|
25860
|
+
const View$g = ({
|
|
25857
25861
|
drawingId,
|
|
25858
25862
|
pluginId
|
|
25859
25863
|
}) => {
|
|
@@ -25861,7 +25865,7 @@ const View$f = ({
|
|
|
25861
25865
|
drawingId: drawingId,
|
|
25862
25866
|
pluginId: pluginId,
|
|
25863
25867
|
inCanvas: true
|
|
25864
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
25868
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$6, {
|
|
25865
25869
|
drawingId: drawingId,
|
|
25866
25870
|
pluginId: pluginId
|
|
25867
25871
|
}));
|
|
@@ -25901,7 +25905,7 @@ const View$f = ({
|
|
|
25901
25905
|
*
|
|
25902
25906
|
* @internal
|
|
25903
25907
|
*/
|
|
25904
|
-
const description$
|
|
25908
|
+
const description$m = {
|
|
25905
25909
|
name: 'WorkPoint',
|
|
25906
25910
|
version: '1.0.0',
|
|
25907
25911
|
author: 'Ledas',
|
|
@@ -25910,15 +25914,15 @@ const description$l = {
|
|
|
25910
25914
|
global: false
|
|
25911
25915
|
};
|
|
25912
25916
|
|
|
25913
|
-
var index$
|
|
25917
|
+
var index$m = /*#__PURE__*/Object.freeze({
|
|
25914
25918
|
__proto__: null,
|
|
25915
|
-
Root: Root$
|
|
25916
|
-
View: View$
|
|
25917
|
-
description: description$
|
|
25919
|
+
Root: Root$m,
|
|
25920
|
+
View: View$g,
|
|
25921
|
+
description: description$m
|
|
25918
25922
|
});
|
|
25919
25923
|
|
|
25920
|
-
function ownKeys$
|
|
25921
|
-
function _objectSpread$
|
|
25924
|
+
function ownKeys$e(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; }
|
|
25925
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25922
25926
|
// One coordinate: its axis' letter at the field's head, then its number.
|
|
25923
25927
|
const NumInput = ({
|
|
25924
25928
|
onChange,
|
|
@@ -25993,7 +25997,7 @@ const CSysEditor = ({
|
|
|
25993
25997
|
}, [defaults, csysRow]);
|
|
25994
25998
|
React__default.useEffect(() => {
|
|
25995
25999
|
setUserValue(val => {
|
|
25996
|
-
const newVal = [_objectSpread$
|
|
26000
|
+
const newVal = [_objectSpread$e({}, val[0]), _objectSpread$e({}, val[1]), _objectSpread$e({}, val[2]), _objectSpread$e({}, val[3])];
|
|
25997
26001
|
newVal[csysRow] = {
|
|
25998
26002
|
x,
|
|
25999
26003
|
y,
|
|
@@ -26118,7 +26122,7 @@ const getObjectDirection$1 = (drawingId, obj) => {
|
|
|
26118
26122
|
const matrix = getDrawing(drawingId).api.structure.calculateGlobalTransformation(obj.id);
|
|
26119
26123
|
return dir.applyMatrix4(matrix).normalize();
|
|
26120
26124
|
};
|
|
26121
|
-
function RootImpl$
|
|
26125
|
+
function RootImpl$l({
|
|
26122
26126
|
drawingId,
|
|
26123
26127
|
pluginId
|
|
26124
26128
|
}) {
|
|
@@ -26387,14 +26391,14 @@ function RootImpl$k({
|
|
|
26387
26391
|
*
|
|
26388
26392
|
* @internal
|
|
26389
26393
|
*/
|
|
26390
|
-
const Root$
|
|
26394
|
+
const Root$l = ({
|
|
26391
26395
|
drawingId,
|
|
26392
26396
|
pluginId
|
|
26393
26397
|
}) => {
|
|
26394
26398
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
26395
26399
|
drawingId: drawingId,
|
|
26396
26400
|
pluginId: pluginId
|
|
26397
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
26401
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$l, {
|
|
26398
26402
|
drawingId: drawingId,
|
|
26399
26403
|
pluginId: pluginId
|
|
26400
26404
|
}));
|
|
@@ -26465,7 +26469,7 @@ const calcluateTransform$1 = (originPos, xDir, yDir, offset, rotation, inverted)
|
|
|
26465
26469
|
const mGlobal = new THREE.Matrix4().makeBasis(xAxis, yAxis, zAxis).setPosition(originPos);
|
|
26466
26470
|
return mGlobal.clone().multiply(mLocal);
|
|
26467
26471
|
};
|
|
26468
|
-
function ViewImpl$
|
|
26472
|
+
function ViewImpl$5({
|
|
26469
26473
|
drawingId,
|
|
26470
26474
|
pluginId
|
|
26471
26475
|
}) {
|
|
@@ -26520,7 +26524,7 @@ function ViewImpl$4({
|
|
|
26520
26524
|
*
|
|
26521
26525
|
* @internal
|
|
26522
26526
|
*/
|
|
26523
|
-
const View$
|
|
26527
|
+
const View$f = ({
|
|
26524
26528
|
drawingId,
|
|
26525
26529
|
pluginId
|
|
26526
26530
|
}) => {
|
|
@@ -26528,7 +26532,7 @@ const View$e = ({
|
|
|
26528
26532
|
drawingId: drawingId,
|
|
26529
26533
|
pluginId: pluginId,
|
|
26530
26534
|
inCanvas: true
|
|
26531
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
26535
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$5, {
|
|
26532
26536
|
drawingId: drawingId,
|
|
26533
26537
|
pluginId: pluginId
|
|
26534
26538
|
}));
|
|
@@ -26577,7 +26581,7 @@ const View$e = ({
|
|
|
26577
26581
|
*
|
|
26578
26582
|
* @internal
|
|
26579
26583
|
*/
|
|
26580
|
-
const description$
|
|
26584
|
+
const description$l = {
|
|
26581
26585
|
name: 'WorkCoordSystem',
|
|
26582
26586
|
version: '1.0.0',
|
|
26583
26587
|
author: 'Ledas',
|
|
@@ -26593,11 +26597,11 @@ const description$k = {
|
|
|
26593
26597
|
}
|
|
26594
26598
|
};
|
|
26595
26599
|
|
|
26596
|
-
var index$
|
|
26600
|
+
var index$l = /*#__PURE__*/Object.freeze({
|
|
26597
26601
|
__proto__: null,
|
|
26598
|
-
Root: Root$
|
|
26599
|
-
View: View$
|
|
26600
|
-
description: description$
|
|
26602
|
+
Root: Root$l,
|
|
26603
|
+
View: View$f,
|
|
26604
|
+
description: description$l
|
|
26601
26605
|
});
|
|
26602
26606
|
|
|
26603
26607
|
var Members$d = /*#__PURE__*/function (Members) {
|
|
@@ -26640,7 +26644,7 @@ const getObjectDirection = (drawingId, obj) => {
|
|
|
26640
26644
|
const matrix = getDrawing(drawingId).api.structure.calculateGlobalTransformation(obj.id);
|
|
26641
26645
|
return dir.applyMatrix4(matrix).normalize();
|
|
26642
26646
|
};
|
|
26643
|
-
function RootImpl$
|
|
26647
|
+
function RootImpl$k({
|
|
26644
26648
|
drawingId,
|
|
26645
26649
|
pluginId
|
|
26646
26650
|
}) {
|
|
@@ -26889,14 +26893,14 @@ function RootImpl$j({
|
|
|
26889
26893
|
*
|
|
26890
26894
|
* @internal
|
|
26891
26895
|
*/
|
|
26892
|
-
const Root$
|
|
26896
|
+
const Root$k = ({
|
|
26893
26897
|
drawingId,
|
|
26894
26898
|
pluginId
|
|
26895
26899
|
}) => {
|
|
26896
26900
|
return /*#__PURE__*/React__default.createElement(FtPluginValidator, {
|
|
26897
26901
|
drawingId: drawingId,
|
|
26898
26902
|
pluginId: pluginId
|
|
26899
|
-
}, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
26903
|
+
}, /*#__PURE__*/React__default.createElement(RootImpl$k, {
|
|
26900
26904
|
drawingId: drawingId,
|
|
26901
26905
|
pluginId: pluginId
|
|
26902
26906
|
}));
|
|
@@ -26963,7 +26967,7 @@ const calcluateTransform = (originPos, xDir, yDir, offset, rotation, inverted) =
|
|
|
26963
26967
|
const mGlobal = new THREE.Matrix4().makeBasis(xAxis, yAxis, zAxis).setPosition(originPos);
|
|
26964
26968
|
return mGlobal.clone().multiply(mLocal);
|
|
26965
26969
|
};
|
|
26966
|
-
function ViewImpl$
|
|
26970
|
+
function ViewImpl$4({
|
|
26967
26971
|
drawingId,
|
|
26968
26972
|
pluginId
|
|
26969
26973
|
}) {
|
|
@@ -27018,7 +27022,7 @@ function ViewImpl$3({
|
|
|
27018
27022
|
*
|
|
27019
27023
|
* @internal
|
|
27020
27024
|
*/
|
|
27021
|
-
const View$
|
|
27025
|
+
const View$e = ({
|
|
27022
27026
|
drawingId,
|
|
27023
27027
|
pluginId
|
|
27024
27028
|
}) => {
|
|
@@ -27026,7 +27030,7 @@ const View$d = ({
|
|
|
27026
27030
|
drawingId: drawingId,
|
|
27027
27031
|
pluginId: pluginId,
|
|
27028
27032
|
inCanvas: true
|
|
27029
|
-
}, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
27033
|
+
}, /*#__PURE__*/React__default.createElement(ViewImpl$4, {
|
|
27030
27034
|
drawingId: drawingId,
|
|
27031
27035
|
pluginId: pluginId
|
|
27032
27036
|
}));
|
|
@@ -27073,7 +27077,7 @@ const View$d = ({
|
|
|
27073
27077
|
*
|
|
27074
27078
|
* @internal
|
|
27075
27079
|
*/
|
|
27076
|
-
const description$
|
|
27080
|
+
const description$k = {
|
|
27077
27081
|
name: 'WorkCSys',
|
|
27078
27082
|
version: '1.0.0',
|
|
27079
27083
|
author: 'Ledas',
|
|
@@ -27089,11 +27093,11 @@ const description$j = {
|
|
|
27089
27093
|
}
|
|
27090
27094
|
};
|
|
27091
27095
|
|
|
27092
|
-
var index$
|
|
27096
|
+
var index$k = /*#__PURE__*/Object.freeze({
|
|
27093
27097
|
__proto__: null,
|
|
27094
|
-
Root: Root$
|
|
27095
|
-
View: View$
|
|
27096
|
-
description: description$
|
|
27098
|
+
Root: Root$k,
|
|
27099
|
+
View: View$e,
|
|
27100
|
+
description: description$k
|
|
27097
27101
|
});
|
|
27098
27102
|
|
|
27099
27103
|
const Caption = ({
|
|
@@ -27116,7 +27120,7 @@ const Caption = ({
|
|
|
27116
27120
|
}
|
|
27117
27121
|
}, text)));
|
|
27118
27122
|
};
|
|
27119
|
-
function ViewImpl$
|
|
27123
|
+
function ViewImpl$3({
|
|
27120
27124
|
drawingId,
|
|
27121
27125
|
pluginId
|
|
27122
27126
|
}) {
|
|
@@ -27357,11 +27361,11 @@ function ViewImpl$2({
|
|
|
27357
27361
|
*
|
|
27358
27362
|
* @internal
|
|
27359
27363
|
*/
|
|
27360
|
-
function View$
|
|
27364
|
+
function View$d({
|
|
27361
27365
|
drawingId,
|
|
27362
27366
|
pluginId
|
|
27363
27367
|
}) {
|
|
27364
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$
|
|
27368
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$3, {
|
|
27365
27369
|
drawingId: drawingId,
|
|
27366
27370
|
pluginId: pluginId
|
|
27367
27371
|
}));
|
|
@@ -27399,7 +27403,7 @@ const Extents = ({
|
|
|
27399
27403
|
"data-strong": "true"
|
|
27400
27404
|
}, box ? (box.max[axis] - box.min[axis]).toFixed(2) : /*#__PURE__*/React__default.createElement("i", null, "\u2013")))));
|
|
27401
27405
|
};
|
|
27402
|
-
function RootImpl$
|
|
27406
|
+
function RootImpl$j({
|
|
27403
27407
|
drawingId,
|
|
27404
27408
|
pluginId
|
|
27405
27409
|
}) {
|
|
@@ -27438,11 +27442,11 @@ function RootImpl$i({
|
|
|
27438
27442
|
*
|
|
27439
27443
|
* @internal
|
|
27440
27444
|
*/
|
|
27441
|
-
function Root$
|
|
27445
|
+
function Root$j({
|
|
27442
27446
|
drawingId,
|
|
27443
27447
|
pluginId
|
|
27444
27448
|
}) {
|
|
27445
|
-
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$
|
|
27449
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$j, {
|
|
27446
27450
|
drawingId: drawingId,
|
|
27447
27451
|
pluginId: pluginId
|
|
27448
27452
|
}));
|
|
@@ -27479,7 +27483,7 @@ function Root$i({
|
|
|
27479
27483
|
*
|
|
27480
27484
|
* @internal
|
|
27481
27485
|
*/
|
|
27482
|
-
const description$
|
|
27486
|
+
const description$j = {
|
|
27483
27487
|
name: 'BoundingBoxInfo',
|
|
27484
27488
|
version: '1.0.0',
|
|
27485
27489
|
author: 'Ledas',
|
|
@@ -27491,6 +27495,1084 @@ const description$i = {
|
|
|
27491
27495
|
}
|
|
27492
27496
|
};
|
|
27493
27497
|
|
|
27498
|
+
var index$j = /*#__PURE__*/Object.freeze({
|
|
27499
|
+
__proto__: null,
|
|
27500
|
+
Root: Root$j,
|
|
27501
|
+
View: View$d,
|
|
27502
|
+
description: description$j
|
|
27503
|
+
});
|
|
27504
|
+
|
|
27505
|
+
const _excluded$3 = ["value", "same", "onWrite"];
|
|
27506
|
+
/** One mount of an editor, on fixed defaults: the stock editors do not follow defaults that change while they are up. */
|
|
27507
|
+
function FieldMount({
|
|
27508
|
+
value: base,
|
|
27509
|
+
same,
|
|
27510
|
+
accept,
|
|
27511
|
+
onWrite,
|
|
27512
|
+
changed,
|
|
27513
|
+
options,
|
|
27514
|
+
render
|
|
27515
|
+
}) {
|
|
27516
|
+
const alive = React__default.useRef(true);
|
|
27517
|
+
const touched = React__default.useRef(false);
|
|
27518
|
+
// (what was typed: the editors show it when they fold up)
|
|
27519
|
+
const [userValue, setTyped] = React__default.useState(base);
|
|
27520
|
+
// (the editors write their defaults back as they unmount: by then the value has moved on)
|
|
27521
|
+
React__default.useLayoutEffect(() => () => {
|
|
27522
|
+
alive.current = false;
|
|
27523
|
+
}, []);
|
|
27524
|
+
const setUserValue = React__default.useCallback(value => {
|
|
27525
|
+
if (!alive.current) return;
|
|
27526
|
+
setTyped(value);
|
|
27527
|
+
// (no expressions)
|
|
27528
|
+
if (!accept(value)) return;
|
|
27529
|
+
// (the editors echo their defaults as they mount: only what the user typed is written)
|
|
27530
|
+
if (!touched.current && same(value, base)) return;
|
|
27531
|
+
touched.current = true;
|
|
27532
|
+
onWrite(value);
|
|
27533
|
+
}, [accept, same, onWrite, base]);
|
|
27534
|
+
const isChanged = React__default.useCallback(() => changed, [changed]);
|
|
27535
|
+
const param = useParam({
|
|
27536
|
+
userValue,
|
|
27537
|
+
setUserValue,
|
|
27538
|
+
defaults: base,
|
|
27539
|
+
isChanged
|
|
27540
|
+
}, undefined, undefined, options);
|
|
27541
|
+
return render(param);
|
|
27542
|
+
}
|
|
27543
|
+
|
|
27544
|
+
/** An editor of a value that may change from elsewhere (a gizmo): it is mounted anew when it does. */
|
|
27545
|
+
function LiveField(_ref) {
|
|
27546
|
+
let {
|
|
27547
|
+
value,
|
|
27548
|
+
same,
|
|
27549
|
+
onWrite
|
|
27550
|
+
} = _ref,
|
|
27551
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
27552
|
+
const [mount, setMount] = React__default.useState(() => ({
|
|
27553
|
+
rev: 0,
|
|
27554
|
+
base: value
|
|
27555
|
+
}));
|
|
27556
|
+
const written = React__default.useRef(value);
|
|
27557
|
+
React__default.useEffect(() => {
|
|
27558
|
+
if (same(value, written.current)) return;
|
|
27559
|
+
written.current = value;
|
|
27560
|
+
setMount(m => ({
|
|
27561
|
+
rev: m.rev + 1,
|
|
27562
|
+
base: value
|
|
27563
|
+
}));
|
|
27564
|
+
}, [value, same]);
|
|
27565
|
+
const write = React__default.useCallback(v => {
|
|
27566
|
+
written.current = v;
|
|
27567
|
+
onWrite(v);
|
|
27568
|
+
}, [onWrite]);
|
|
27569
|
+
return /*#__PURE__*/React__default.createElement(FieldMount, _extends({
|
|
27570
|
+
key: mount.rev
|
|
27571
|
+
}, props, {
|
|
27572
|
+
value: mount.base,
|
|
27573
|
+
same: same,
|
|
27574
|
+
onWrite: write
|
|
27575
|
+
}));
|
|
27576
|
+
}
|
|
27577
|
+
|
|
27578
|
+
function ownKeys$d(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; }
|
|
27579
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27580
|
+
const Divider = props => {
|
|
27581
|
+
return /*#__PURE__*/React__default.createElement(Divider$1, _extends({}, props, {
|
|
27582
|
+
style: _objectSpread$d({
|
|
27583
|
+
margin: '0'
|
|
27584
|
+
}, props.style)
|
|
27585
|
+
}));
|
|
27586
|
+
};
|
|
27587
|
+
|
|
27588
|
+
/** As many planes as a section has at most: as many as the caps take into account, and hardware clipping. */
|
|
27589
|
+
const MAX_PLANES = 8;
|
|
27590
|
+
|
|
27591
|
+
/** A section plane: a point on it, its normal (pointing to what is cut away), and how its gizmo is turned. */
|
|
27592
|
+
|
|
27593
|
+
/** Which solids are cut: only the picked ones, or all but them. */
|
|
27594
|
+
let SectionMode = /*#__PURE__*/function (SectionMode) {
|
|
27595
|
+
SectionMode[SectionMode["Include"] = 0] = "Include";
|
|
27596
|
+
SectionMode[SectionMode["Exclude"] = 1] = "Exclude";
|
|
27597
|
+
return SectionMode;
|
|
27598
|
+
}({});
|
|
27599
|
+
const setState = (drawingId, pluginId, state) => {
|
|
27600
|
+
var _getPlugin;
|
|
27601
|
+
return (_getPlugin = getPlugin(drawingId, pluginId)) == null ? void 0 : _getPlugin.set(state);
|
|
27602
|
+
};
|
|
27603
|
+
const Z = new THREE.Vector3(0, 0, 1);
|
|
27604
|
+
const round = v => Math.round(v * 1e6) / 1e6;
|
|
27605
|
+
const toVec3T = v => [round(v.x), round(v.y), round(v.z)];
|
|
27606
|
+
|
|
27607
|
+
/** A plane through `position`; `normal` is kept as given (a typed one is not rewritten), its unit for the gizmo. */
|
|
27608
|
+
const planeAt = (position, normal) => {
|
|
27609
|
+
const q = new THREE.Quaternion().setFromUnitVectors(Z, normal.clone().normalize());
|
|
27610
|
+
return {
|
|
27611
|
+
position: toVec3T(position),
|
|
27612
|
+
normal: toVec3T(normal),
|
|
27613
|
+
rotation: [q.x, q.y, q.z, q.w]
|
|
27614
|
+
};
|
|
27615
|
+
};
|
|
27616
|
+
const planeFromMatrix = matrix => {
|
|
27617
|
+
const p = new THREE.Vector3();
|
|
27618
|
+
const q = new THREE.Quaternion();
|
|
27619
|
+
matrix.decompose(p, q, new THREE.Vector3());
|
|
27620
|
+
return {
|
|
27621
|
+
position: toVec3T(p),
|
|
27622
|
+
normal: toVec3T(Z.clone().applyQuaternion(q)),
|
|
27623
|
+
rotation: [q.x, q.y, q.z, q.w]
|
|
27624
|
+
};
|
|
27625
|
+
};
|
|
27626
|
+
const planeMatrix = plane => new THREE.Matrix4().compose(new THREE.Vector3(...plane.position), new THREE.Quaternion(...plane.rotation), new THREE.Vector3(1, 1, 1));
|
|
27627
|
+
|
|
27628
|
+
/** The model's centre, cut horizontally: what a new section starts as. */
|
|
27629
|
+
const defaultPlane = drawingId => {
|
|
27630
|
+
var _getDrawing;
|
|
27631
|
+
const bounds = (_getDrawing = getDrawing(drawingId)) == null ? void 0 : _getDrawing.geometry.bounds;
|
|
27632
|
+
const finite = bounds && Number.isFinite(bounds.min.length()) && Number.isFinite(bounds.max.length());
|
|
27633
|
+
const center = finite ? bounds.min.clone().add(bounds.max).multiplyScalar(0.5) : new THREE.Vector3();
|
|
27634
|
+
return planeAt(center, Z);
|
|
27635
|
+
};
|
|
27636
|
+
|
|
27637
|
+
function ownKeys$c(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; }
|
|
27638
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27639
|
+
const useCPState$1 = (drawingId, pluginId, sel) => usePlugin(drawingId, pluginId, p => sel(p.state));
|
|
27640
|
+
const modeCaptions = {
|
|
27641
|
+
[SectionMode.Include]: 'Mode: Include',
|
|
27642
|
+
[SectionMode.Exclude]: 'Mode: Exclude'
|
|
27643
|
+
};
|
|
27644
|
+
const unchanged = () => false;
|
|
27645
|
+
const toPoint = ([x, y, z]) => ({
|
|
27646
|
+
x,
|
|
27647
|
+
y,
|
|
27648
|
+
z
|
|
27649
|
+
});
|
|
27650
|
+
const samePoint = (a, b) => Math.abs(a.x - b.x) < 1e-5 && Math.abs(a.y - b.y) < 1e-5 && Math.abs(a.z - b.z) < 1e-5;
|
|
27651
|
+
const isPoint = v => typeof v === 'object' && v !== null && [v.x, v.y, v.z].every(Number.isFinite);
|
|
27652
|
+
const pickFilter = (scope, data) => planeFilter(scope, data) || workPlaneFilter(scope, data);
|
|
27653
|
+
|
|
27654
|
+
/** The plane of a picked work plane or planar face, in world coordinates. */
|
|
27655
|
+
function planeOfItem(drawingId, item) {
|
|
27656
|
+
var _face$geometry, _face$geometry2;
|
|
27657
|
+
const drawing = getDrawing(drawingId);
|
|
27658
|
+
if (item.scope === TreeObjScope) {
|
|
27659
|
+
var _obj$members, _obj$members2, _obj$members3;
|
|
27660
|
+
const obj = drawing.structure.tree[item.data.object.id];
|
|
27661
|
+
const pos = (obj == null || (_obj$members = obj.members) == null ? void 0 : _obj$members.curPosition) || (obj == null || (_obj$members2 = obj.members) == null ? void 0 : _obj$members2.Position);
|
|
27662
|
+
const normal = obj == null || (_obj$members3 = obj.members) == null ? void 0 : _obj$members3.Normal;
|
|
27663
|
+
if (!obj || !pos || !normal) return undefined;
|
|
27664
|
+
const matrix = drawing.api.structure.calculateGlobalTransformation(obj.id);
|
|
27665
|
+
return planeAt(convertToVector(pos).applyMatrix4(matrix), convertToVector(normal).transformDirection(matrix));
|
|
27666
|
+
}
|
|
27667
|
+
const element = item.data;
|
|
27668
|
+
const [face] = Measure.transform([element], drawingId);
|
|
27669
|
+
if (!(face != null && face.normal)) return undefined;
|
|
27670
|
+
const matrix = drawing.api.structure.calculateGlobalTransformation(element.productId);
|
|
27671
|
+
// (the surface's normal may run against the face's: the mesh shows which way the face looks)
|
|
27672
|
+
const normal = face.normal.clone();
|
|
27673
|
+
const normals = (_face$geometry = face.geometry) == null ? void 0 : _face$geometry.getAttribute('normal');
|
|
27674
|
+
if (normals && normals.count > 0) {
|
|
27675
|
+
const meshNormal = new THREE.Vector3().fromBufferAttribute(normals, 0);
|
|
27676
|
+
if (meshNormal.transformDirection(matrix).dot(normal) < 0) normal.negate();
|
|
27677
|
+
}
|
|
27678
|
+
// (on the face, at its middle: pointOnPlane may lie far from it)
|
|
27679
|
+
const position = (_face$geometry2 = face.geometry) == null ? void 0 : _face$geometry2.getAttribute('position');
|
|
27680
|
+
if (!position) return planeAt(face.pointOnPlane, normal);
|
|
27681
|
+
const center = new THREE.Box3().setFromBufferAttribute(position).getCenter(new THREE.Vector3());
|
|
27682
|
+
const onFace = new THREE.Plane().setFromNormalAndCoplanarPoint(normal, face.pointOnPlane).projectPoint(center.applyMatrix4(matrix), new THREE.Vector3());
|
|
27683
|
+
return planeAt(onFace, normal);
|
|
27684
|
+
}
|
|
27685
|
+
|
|
27686
|
+
/** Sets the selected plane from a work plane or planar face the user picks next, through a selector of its own. */
|
|
27687
|
+
const PlanePick = ({
|
|
27688
|
+
drawingId,
|
|
27689
|
+
pluginId
|
|
27690
|
+
}) => {
|
|
27691
|
+
const {
|
|
27692
|
+
Button
|
|
27693
|
+
} = useBuerli(buerli => buerli.options.elements);
|
|
27694
|
+
const pickId = `ClippingPlane|${pluginId}|plane`;
|
|
27695
|
+
const picking = useDrawing(drawingId, d => d.selection.active === pickId) || false;
|
|
27696
|
+
const remove = React__default.useRef(undefined);
|
|
27697
|
+
const stop = React__default.useCallback(() => {
|
|
27698
|
+
remove.current == null || remove.current();
|
|
27699
|
+
remove.current = undefined;
|
|
27700
|
+
}, []);
|
|
27701
|
+
|
|
27702
|
+
// (another field took over the pointer)
|
|
27703
|
+
React__default.useEffect(() => {
|
|
27704
|
+
!picking && stop();
|
|
27705
|
+
}, [picking, stop]);
|
|
27706
|
+
React__default.useEffect(() => stop, [stop]);
|
|
27707
|
+
React__default.useEffect(() => {
|
|
27708
|
+
if (!picking) return;
|
|
27709
|
+
const onKey = e => e.key === 'Escape' && stop();
|
|
27710
|
+
window.addEventListener('keydown', onKey);
|
|
27711
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
27712
|
+
}, [picking, stop]);
|
|
27713
|
+
const start = () => {
|
|
27714
|
+
if (picking) {
|
|
27715
|
+
stop();
|
|
27716
|
+
return;
|
|
27717
|
+
}
|
|
27718
|
+
const onPick = (_selId, _items, diff) => {
|
|
27719
|
+
const plane = diff[0] && planeOfItem(drawingId, diff[0]);
|
|
27720
|
+
plane && setState(drawingId, pluginId, s => s.selected === undefined ? {} : {
|
|
27721
|
+
planes: s.planes.map((p, i) => i === s.selected ? plane : p)
|
|
27722
|
+
});
|
|
27723
|
+
// (not from inside the selector's own select)
|
|
27724
|
+
window.setTimeout(stop);
|
|
27725
|
+
};
|
|
27726
|
+
remove.current = getDrawing(drawingId).api.selection.createSelector(pickId, pickFilter, true, [], 1, onPick);
|
|
27727
|
+
};
|
|
27728
|
+
return (
|
|
27729
|
+
/*#__PURE__*/
|
|
27730
|
+
// (a control fills its row; in the form's column that would squash it below its height)
|
|
27731
|
+
React__default.createElement(Button, {
|
|
27732
|
+
block: true,
|
|
27733
|
+
type: picking ? 'primary' : 'default',
|
|
27734
|
+
style: {
|
|
27735
|
+
flex: 'none'
|
|
27736
|
+
},
|
|
27737
|
+
onClick: start
|
|
27738
|
+
}, picking ? 'Pick a work plane or a planar face … (Esc)' : 'Set from plane')
|
|
27739
|
+
);
|
|
27740
|
+
};
|
|
27741
|
+
const SelectedPlane = ({
|
|
27742
|
+
drawingId,
|
|
27743
|
+
pluginId,
|
|
27744
|
+
index,
|
|
27745
|
+
plane
|
|
27746
|
+
}) => {
|
|
27747
|
+
const position = React__default.useMemo(() => toPoint(plane.position), [plane.position]);
|
|
27748
|
+
const normal$1 = React__default.useMemo(() => toPoint(plane.normal), [plane.normal]);
|
|
27749
|
+
const write = React__default.useCallback(change => setState(drawingId, pluginId, s => {
|
|
27750
|
+
const next = s.planes[index] && change(s.planes[index]);
|
|
27751
|
+
return next ? {
|
|
27752
|
+
planes: s.planes.map((p, i) => i === index ? next : p)
|
|
27753
|
+
} : {};
|
|
27754
|
+
}), [drawingId, pluginId, index]);
|
|
27755
|
+
const writePosition = React__default.useCallback(v => write(p => _objectSpread$c(_objectSpread$c({}, p), {}, {
|
|
27756
|
+
position: [v.x, v.y, v.z]
|
|
27757
|
+
})), [write]);
|
|
27758
|
+
const writeNormal = React__default.useCallback(v => {
|
|
27759
|
+
const n = new THREE.Vector3(v.x, v.y, v.z);
|
|
27760
|
+
if (n.lengthSq() < 1e-18) return;
|
|
27761
|
+
write(p => planeAt(new THREE.Vector3(...p.position), n));
|
|
27762
|
+
}, [write]);
|
|
27763
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(LiveField, {
|
|
27764
|
+
value: position,
|
|
27765
|
+
same: samePoint,
|
|
27766
|
+
accept: isPoint,
|
|
27767
|
+
onWrite: writePosition,
|
|
27768
|
+
changed: false,
|
|
27769
|
+
render: p => /*#__PURE__*/React__default.createElement(PointEditor, {
|
|
27770
|
+
drawingId: drawingId,
|
|
27771
|
+
param: p,
|
|
27772
|
+
iconUrl: position3d,
|
|
27773
|
+
caption: "Point on plane"
|
|
27774
|
+
})
|
|
27775
|
+
}), /*#__PURE__*/React__default.createElement(LiveField, {
|
|
27776
|
+
value: normal$1,
|
|
27777
|
+
same: samePoint,
|
|
27778
|
+
accept: isPoint,
|
|
27779
|
+
onWrite: writeNormal,
|
|
27780
|
+
changed: false,
|
|
27781
|
+
render: p => /*#__PURE__*/React__default.createElement(PointEditor, {
|
|
27782
|
+
drawingId: drawingId,
|
|
27783
|
+
param: p,
|
|
27784
|
+
iconUrl: normal,
|
|
27785
|
+
caption: "Normal"
|
|
27786
|
+
})
|
|
27787
|
+
}), /*#__PURE__*/React__default.createElement(PlanePick, {
|
|
27788
|
+
drawingId: drawingId,
|
|
27789
|
+
pluginId: pluginId
|
|
27790
|
+
}));
|
|
27791
|
+
};
|
|
27792
|
+
const Planes = ({
|
|
27793
|
+
drawingId,
|
|
27794
|
+
pluginId
|
|
27795
|
+
}) => {
|
|
27796
|
+
const {
|
|
27797
|
+
Button
|
|
27798
|
+
} = useBuerli(buerli => buerli.options.elements);
|
|
27799
|
+
const planes = useCPState$1(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
27800
|
+
const selected = useCPState$1(drawingId, pluginId, s => s.selected);
|
|
27801
|
+
const index = selected !== undefined && selected < planes.length ? selected : undefined;
|
|
27802
|
+
const select = i => setState(drawingId, pluginId, {
|
|
27803
|
+
selected: i
|
|
27804
|
+
});
|
|
27805
|
+
|
|
27806
|
+
// (right after the selected plane)
|
|
27807
|
+
const add = () => setState(drawingId, pluginId, s => {
|
|
27808
|
+
const at = s.selected !== undefined && s.planes[s.selected] ? s.selected + 1 : s.planes.length;
|
|
27809
|
+
return {
|
|
27810
|
+
planes: [...s.planes.slice(0, at), defaultPlane(drawingId), ...s.planes.slice(at)],
|
|
27811
|
+
selected: at
|
|
27812
|
+
};
|
|
27813
|
+
});
|
|
27814
|
+
const remove = () => setState(drawingId, pluginId, s => {
|
|
27815
|
+
if (s.selected === undefined) return {};
|
|
27816
|
+
const rest = s.planes.filter((_, i) => i !== s.selected);
|
|
27817
|
+
return {
|
|
27818
|
+
planes: rest,
|
|
27819
|
+
selected: rest.length > 0 ? Math.min(s.selected, rest.length - 1) : undefined
|
|
27820
|
+
};
|
|
27821
|
+
});
|
|
27822
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
27823
|
+
iconUrl: workplane,
|
|
27824
|
+
caption: "Plane"
|
|
27825
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
27826
|
+
className: "rcad-ed-pld-nav"
|
|
27827
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
27828
|
+
className: "rcad-ed-pld-step"
|
|
27829
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
27830
|
+
type: "button",
|
|
27831
|
+
disabled: index === undefined || index === 0,
|
|
27832
|
+
"aria-label": "Previous plane",
|
|
27833
|
+
onClick: () => index !== undefined && select(index - 1)
|
|
27834
|
+
}, /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
27835
|
+
name: "chevronLeft",
|
|
27836
|
+
size: 14
|
|
27837
|
+
})), /*#__PURE__*/React__default.createElement("span", {
|
|
27838
|
+
className: "rcad-ed-pld-idx"
|
|
27839
|
+
}, index === undefined ? 0 : index + 1, " / ", planes.length), /*#__PURE__*/React__default.createElement("button", {
|
|
27840
|
+
type: "button",
|
|
27841
|
+
disabled: index === undefined || index >= planes.length - 1,
|
|
27842
|
+
"aria-label": "Next plane",
|
|
27843
|
+
onClick: () => index !== undefined && select(index + 1)
|
|
27844
|
+
}, /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
27845
|
+
name: "chevronRight",
|
|
27846
|
+
size: 14
|
|
27847
|
+
}))), /*#__PURE__*/React__default.createElement(Button, {
|
|
27848
|
+
disabled: planes.length >= MAX_PLANES,
|
|
27849
|
+
onClick: add
|
|
27850
|
+
}, "Add"), /*#__PURE__*/React__default.createElement(Button, {
|
|
27851
|
+
disabled: index === undefined,
|
|
27852
|
+
onClick: remove
|
|
27853
|
+
}, "Delete"))), index !== undefined ? /*#__PURE__*/React__default.createElement(SelectedPlane
|
|
27854
|
+
// (another plane: its fields are mounted anew)
|
|
27855
|
+
, {
|
|
27856
|
+
key: `${index}/${planes.length}`,
|
|
27857
|
+
drawingId: drawingId,
|
|
27858
|
+
pluginId: pluginId,
|
|
27859
|
+
index: index,
|
|
27860
|
+
plane: planes[index]
|
|
27861
|
+
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
27862
|
+
className: "rcad-ed-pld-hint"
|
|
27863
|
+
}, "No section plane. Add one."));
|
|
27864
|
+
};
|
|
27865
|
+
|
|
27866
|
+
/** The solids the mode is about; the picker keeps them as product and solid. */
|
|
27867
|
+
const Solids$1 = ({
|
|
27868
|
+
drawingId,
|
|
27869
|
+
pluginId,
|
|
27870
|
+
mode
|
|
27871
|
+
}) => {
|
|
27872
|
+
const {
|
|
27873
|
+
Selection
|
|
27874
|
+
} = useBuerli(buerli => buerli.options.elements);
|
|
27875
|
+
|
|
27876
|
+
// (as the stage picks a solid: one of its faces, standing for it)
|
|
27877
|
+
const initialItems = React__default.useMemo(() => {
|
|
27878
|
+
var _plugin$refs$pluginId;
|
|
27879
|
+
const {
|
|
27880
|
+
geometry,
|
|
27881
|
+
plugin
|
|
27882
|
+
} = getDrawing(drawingId);
|
|
27883
|
+
const solids = ((_plugin$refs$pluginId = plugin.refs[pluginId]) == null || (_plugin$refs$pluginId = _plugin$refs$pluginId.state) == null ? void 0 : _plugin$refs$pluginId.solids) || [];
|
|
27884
|
+
return solids.map(({
|
|
27885
|
+
productId,
|
|
27886
|
+
containerId
|
|
27887
|
+
}) => {
|
|
27888
|
+
const container = geometry.cache[containerId];
|
|
27889
|
+
const face = container == null ? void 0 : container.meshes[0];
|
|
27890
|
+
return face ? createGraphicItem(productId, _objectSpread$c(_objectSpread$c({}, face), {}, {
|
|
27891
|
+
type: container.type,
|
|
27892
|
+
graphicId: containerId
|
|
27893
|
+
})) : null;
|
|
27894
|
+
}).filter(Boolean);
|
|
27895
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27896
|
+
}, []);
|
|
27897
|
+
const onChange = React__default.useCallback(items => setState(drawingId, pluginId, {
|
|
27898
|
+
solids: items.map(item => ({
|
|
27899
|
+
productId: item.data.productId,
|
|
27900
|
+
containerId: item.data.graphicId
|
|
27901
|
+
}))
|
|
27902
|
+
}), [drawingId, pluginId]);
|
|
27903
|
+
return /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
27904
|
+
iconUrl: instances,
|
|
27905
|
+
caption: mode === SectionMode.Include ? 'Solids to cut' : 'Solids not to cut'
|
|
27906
|
+
}, /*#__PURE__*/React__default.createElement(Selection, {
|
|
27907
|
+
drawingId: drawingId,
|
|
27908
|
+
filter: solidFilter,
|
|
27909
|
+
initialItems: initialItems,
|
|
27910
|
+
onChange: onChange
|
|
27911
|
+
}));
|
|
27912
|
+
};
|
|
27913
|
+
function RootImpl$i({
|
|
27914
|
+
drawingId,
|
|
27915
|
+
pluginId
|
|
27916
|
+
}) {
|
|
27917
|
+
var _useCPState;
|
|
27918
|
+
const mode = (_useCPState = useCPState$1(drawingId, pluginId, s => s.mode)) != null ? _useCPState : SectionMode.Exclude;
|
|
27919
|
+
const alive = React__default.useRef(true);
|
|
27920
|
+
// (the type editor writes its defaults back as it unmounts: the mode is kept for the next time)
|
|
27921
|
+
React__default.useLayoutEffect(() => () => {
|
|
27922
|
+
alive.current = false;
|
|
27923
|
+
}, []);
|
|
27924
|
+
const setMode = React__default.useCallback(value => {
|
|
27925
|
+
if (!alive.current) return;
|
|
27926
|
+
setState(drawingId, pluginId, s => ({
|
|
27927
|
+
mode: typeof value === 'function' ? value(s.mode) : value
|
|
27928
|
+
}));
|
|
27929
|
+
}, [drawingId, pluginId]);
|
|
27930
|
+
const modeParam = useParam({
|
|
27931
|
+
userValue: mode,
|
|
27932
|
+
setUserValue: setMode,
|
|
27933
|
+
defaults: SectionMode.Exclude,
|
|
27934
|
+
isChanged: unchanged
|
|
27935
|
+
});
|
|
27936
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
27937
|
+
className: "rcad-form"
|
|
27938
|
+
}, /*#__PURE__*/React__default.createElement(TypeWrapper, null, /*#__PURE__*/React__default.createElement(TypeEditor, {
|
|
27939
|
+
param: modeParam,
|
|
27940
|
+
types: modeCaptions
|
|
27941
|
+
})), /*#__PURE__*/React__default.createElement(Solids$1, {
|
|
27942
|
+
drawingId: drawingId,
|
|
27943
|
+
pluginId: pluginId,
|
|
27944
|
+
mode: mode
|
|
27945
|
+
}), /*#__PURE__*/React__default.createElement(Divider, null), /*#__PURE__*/React__default.createElement(Planes, {
|
|
27946
|
+
drawingId: drawingId,
|
|
27947
|
+
pluginId: pluginId
|
|
27948
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27949
|
+
className: "rcad-ed-pld-hint"
|
|
27950
|
+
}, "A plane cuts away what its normal points to; with more planes, what is kept is what all of them keep. Drag a gizmo to move or turn its plane; click a plane's origin to select it."));
|
|
27951
|
+
}
|
|
27952
|
+
|
|
27953
|
+
/**
|
|
27954
|
+
* The panel: which solids are cut, and the section planes.
|
|
27955
|
+
*
|
|
27956
|
+
* @internal
|
|
27957
|
+
*/
|
|
27958
|
+
const Root$i = ({
|
|
27959
|
+
drawingId,
|
|
27960
|
+
pluginId
|
|
27961
|
+
}) => {
|
|
27962
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(RootImpl$i, {
|
|
27963
|
+
drawingId: drawingId,
|
|
27964
|
+
pluginId: pluginId
|
|
27965
|
+
}));
|
|
27966
|
+
};
|
|
27967
|
+
|
|
27968
|
+
const NONE = 1e30;
|
|
27969
|
+
// (a plane that decides nothing: no normal, everything on its kept side)
|
|
27970
|
+
const UNUSED = new THREE.Vector4(0, 0, 0, 1);
|
|
27971
|
+
|
|
27972
|
+
/**
|
|
27973
|
+
* The cut drawn closed. Where the eye's ray enters what all planes keep, inside a cut body, that body shows a face:
|
|
27974
|
+
* its cap. Each frame the cut bodies are drawn, unclipped, in targets of their own: first the nearest back face
|
|
27975
|
+
* beyond that point, and whose it is; then that body alone is counted up to the point, its front faces adding one
|
|
27976
|
+
* and its back faces taking one away, so that a count of one says the point is inside it. (Counted alone, a body
|
|
27977
|
+
* another overlaps, as a thread in its hole, keeps its cap; drawn as one shell per colour, its shells count
|
|
27978
|
+
* together.) Then that body's back faces draw the cap at the point's depth. Only for WebGPURenderer.
|
|
27979
|
+
*/
|
|
27980
|
+
|
|
27981
|
+
/** A mesh that draws a body's geometry, whichever it has now; `place` puts it where the body is. */
|
|
27982
|
+
function follower(body, material) {
|
|
27983
|
+
const mesh = new THREE.Mesh(undefined, material);
|
|
27984
|
+
Object.defineProperty(mesh, 'geometry', {
|
|
27985
|
+
get: () => body.geometry,
|
|
27986
|
+
set: () => undefined,
|
|
27987
|
+
configurable: true
|
|
27988
|
+
});
|
|
27989
|
+
mesh.matrixAutoUpdate = false;
|
|
27990
|
+
mesh.matrixWorldAutoUpdate = false;
|
|
27991
|
+
mesh.renderOrder = body.renderOrder;
|
|
27992
|
+
mesh.raycast = () => undefined;
|
|
27993
|
+
return mesh;
|
|
27994
|
+
}
|
|
27995
|
+
const isShown = (object, scene) => {
|
|
27996
|
+
for (let o = object; o; o = o.parent) {
|
|
27997
|
+
if (!o.visible) return false;
|
|
27998
|
+
if (o === scene) return true;
|
|
27999
|
+
}
|
|
28000
|
+
return false;
|
|
28001
|
+
};
|
|
28002
|
+
function createSection() {
|
|
28003
|
+
// (the planes in view space, as three's clipping has them: kept where dot(p, xyz) <= w)
|
|
28004
|
+
const planes = Array.from({
|
|
28005
|
+
length: MAX_PLANES
|
|
28006
|
+
}, () => UNUSED.clone());
|
|
28007
|
+
const list = uniformArray(planes).setGroup(renderGroup);
|
|
28008
|
+
|
|
28009
|
+
// Along the fragment's ray from the eye (from afar, for an orthographic camera).
|
|
28010
|
+
const p = positionView;
|
|
28011
|
+
// (1 for a perspective camera, 0 for an orthographic one: the projection's w of a view direction)
|
|
28012
|
+
const perspective = cameraProjectionMatrix.mul(vec4(0, 0, -1, 0)).w;
|
|
28013
|
+
const direction = mix(vec3(0, 0, -1), p.normalize(), perspective);
|
|
28014
|
+
const origin = mix(vec3(p.x, p.y, 0), vec3(0), perspective);
|
|
28015
|
+
const start = mix(float(-NONE), float(0), perspective);
|
|
28016
|
+
/** How far along it the fragment is. */
|
|
28017
|
+
const at = p.sub(origin).dot(direction);
|
|
28018
|
+
/** The depth buffer's value for the point `t` along it, as the camera projects it. */
|
|
28019
|
+
const depthAt = t => {
|
|
28020
|
+
const clip = cameraProjectionMatrix.mul(vec4(origin.add(direction.mul(t)), 1));
|
|
28021
|
+
const ndc = clip.z.div(clip.w);
|
|
28022
|
+
return Fn(builder => builder.renderer.coordinateSystem === THREE.WebGPUCoordinateSystem ? ndc : ndc.mul(0.5).add(0.5))();
|
|
28023
|
+
};
|
|
28024
|
+
/** Where it enters what all planes keep (w, NONE for nowhere), and that plane's view normal, towards the eye. */
|
|
28025
|
+
const entry = Fn(() => {
|
|
28026
|
+
const enter = float(start).toVar();
|
|
28027
|
+
const leave = float(NONE).toVar();
|
|
28028
|
+
const normal = vec3(0, 0, 1).toVar();
|
|
28029
|
+
Loop(MAX_PLANES, ({
|
|
28030
|
+
i
|
|
28031
|
+
}) => {
|
|
28032
|
+
// (the array's elements are untyped)
|
|
28033
|
+
const plane = list.element(i);
|
|
28034
|
+
const along = direction.dot(plane.xyz);
|
|
28035
|
+
const side = origin.dot(plane.xyz).sub(plane.w);
|
|
28036
|
+
const crossing = side.negate().div(along);
|
|
28037
|
+
If(along.lessThan(-1e-6), () => {
|
|
28038
|
+
If(crossing.greaterThan(enter), () => {
|
|
28039
|
+
enter.assign(crossing);
|
|
28040
|
+
normal.assign(plane.xyz);
|
|
28041
|
+
});
|
|
28042
|
+
}).ElseIf(along.greaterThan(1e-6), () => {
|
|
28043
|
+
leave.assign(min(leave, crossing));
|
|
28044
|
+
}).ElseIf(side.greaterThan(0), () => {
|
|
28045
|
+
leave.assign(-NONE);
|
|
28046
|
+
});
|
|
28047
|
+
});
|
|
28048
|
+
// (no plane entered: the eye is on the kept side of all of them, and sees no cut)
|
|
28049
|
+
const cut = enter.greaterThan(start).and(enter.lessThan(leave));
|
|
28050
|
+
return vec4(normal.normalize(), select$1(cut, enter, float(NONE)));
|
|
28051
|
+
});
|
|
28052
|
+
const nearest = new THREE.RenderTarget(1, 1, {
|
|
28053
|
+
type: THREE.FloatType,
|
|
28054
|
+
depthBuffer: true,
|
|
28055
|
+
minFilter: THREE.NearestFilter,
|
|
28056
|
+
magFilter: THREE.NearestFilter
|
|
28057
|
+
});
|
|
28058
|
+
// (added up, so of a blendable type)
|
|
28059
|
+
const counts = new THREE.RenderTarget(1, 1, {
|
|
28060
|
+
type: THREE.HalfFloatType,
|
|
28061
|
+
depthBuffer: false,
|
|
28062
|
+
minFilter: THREE.NearestFilter,
|
|
28063
|
+
magFilter: THREE.NearestFilter
|
|
28064
|
+
});
|
|
28065
|
+
const measured = new THREE.Scene();
|
|
28066
|
+
measured.matrixWorldAutoUpdate = false;
|
|
28067
|
+
const counted = new THREE.Scene();
|
|
28068
|
+
counted.matrixWorldAutoUpdate = false;
|
|
28069
|
+
const size = new THREE.Vector2();
|
|
28070
|
+
let state;
|
|
28071
|
+
|
|
28072
|
+
// The body a drawn mesh belongs to, by a label (0 is none); a body's shells share it.
|
|
28073
|
+
const labelOf = new Map();
|
|
28074
|
+
const labels = new WeakMap();
|
|
28075
|
+
const label = uniform(0).onObjectUpdate(({
|
|
28076
|
+
object
|
|
28077
|
+
}) => object && labels.get(object) || 0);
|
|
28078
|
+
const near = texture(nearest.texture, screenUV);
|
|
28079
|
+
const isNear = which => near.a.greaterThan(0.5).and(abs(near.b.sub(which)).lessThan(0.5));
|
|
28080
|
+
|
|
28081
|
+
// The nearest back face of a cut body beyond the cut: how far (r), whose (b), 1 in a if any.
|
|
28082
|
+
const measurer = new NodeMaterial();
|
|
28083
|
+
measurer.name = 'buerli-section-nearest';
|
|
28084
|
+
measurer.side = THREE.BackSide;
|
|
28085
|
+
measurer.fragmentNode = Fn(() => {
|
|
28086
|
+
entry().w.greaterThanEqual(at).discard();
|
|
28087
|
+
return vec4(at, 0, label, 1);
|
|
28088
|
+
})();
|
|
28089
|
+
|
|
28090
|
+
// That body's faces before the cut: a front face adds one, a back face takes one away.
|
|
28091
|
+
const counter = new NodeMaterial();
|
|
28092
|
+
counter.name = 'buerli-section-count';
|
|
28093
|
+
counter.fragmentNode = vec4(select$1(at.lessThan(entry().w).and(isNear(label)), select$1(frontFacing, float(1), float(-1)), float(0)), 0, 0, 1);
|
|
28094
|
+
Object.assign(counter, {
|
|
28095
|
+
side: THREE.DoubleSide,
|
|
28096
|
+
transparent: true,
|
|
28097
|
+
forceSinglePass: true,
|
|
28098
|
+
depthTest: false,
|
|
28099
|
+
depthWrite: false,
|
|
28100
|
+
blending: THREE.CustomBlending,
|
|
28101
|
+
blendEquation: THREE.AddEquation,
|
|
28102
|
+
blendSrc: THREE.OneFactor,
|
|
28103
|
+
blendDst: THREE.OneFactor,
|
|
28104
|
+
blendEquationAlpha: THREE.AddEquation,
|
|
28105
|
+
blendSrcAlpha: THREE.OneFactor,
|
|
28106
|
+
blendDstAlpha: THREE.OneFactor
|
|
28107
|
+
});
|
|
28108
|
+
const inside = texture(counts.texture, screenUV).r.greaterThan(0.5);
|
|
28109
|
+
const spacing = uniform(10);
|
|
28110
|
+
/** The hatch on the plane the ray enters at `cut`: diagonal lines in the plane, `spacing` apart, a pixel wide. */
|
|
28111
|
+
const hatchOf = cut => {
|
|
28112
|
+
const point = cameraWorldMatrix.mul(vec4(origin.add(direction.mul(cut.w)), 1)).xyz;
|
|
28113
|
+
const normal = cameraWorldMatrix.mul(vec4(cut.xyz, 0)).xyz;
|
|
28114
|
+
const up = select$1(abs(normal.y).lessThan(0.9), vec3(0, 1, 0), vec3(1, 0, 0));
|
|
28115
|
+
const tangent = normal.cross(up).normalize();
|
|
28116
|
+
const k = point.dot(tangent.add(normal.cross(tangent))).div(spacing);
|
|
28117
|
+
const w = fwidth(k);
|
|
28118
|
+
// (gone where the lines are closer than pixels)
|
|
28119
|
+
const line = float(1).sub(smoothstep(w.mul(0.6), w.mul(1.4), abs(fract(k).sub(0.5)))).mul(clamp$1(float(1).sub(w.mul(2)), 0, 1));
|
|
28120
|
+
return mix(float(1), float(0.82), line);
|
|
28121
|
+
};
|
|
28122
|
+
const capOf = (body, own) => {
|
|
28123
|
+
var _source$color;
|
|
28124
|
+
const source = body.material;
|
|
28125
|
+
const material = new MeshLambertNodeMaterial({
|
|
28126
|
+
color: (_source$color = source.color) == null ? void 0 : _source$color.clone().multiplyScalar(0.85),
|
|
28127
|
+
side: THREE.BackSide
|
|
28128
|
+
});
|
|
28129
|
+
material.name = 'buerli-section-cap';
|
|
28130
|
+
const cut = entry();
|
|
28131
|
+
// (the pixel is decided by what its centre measured: every sample this body's back faces cover takes the cap,
|
|
28132
|
+
// whichever face covers it, so that a crease or a silhouette among them leaves no sample out)
|
|
28133
|
+
material.normalNode = cut.xyz;
|
|
28134
|
+
material.maskNode = cut.w.lessThan(at).and(isNear(float(own))).and(inside);
|
|
28135
|
+
// (at the point on the plane, projected as the camera projects: its near and far need not be what made that)
|
|
28136
|
+
material.depthNode = depthAt(cut.w);
|
|
28137
|
+
material.colorNode = materialColor.mul(hatchOf(cut));
|
|
28138
|
+
const cap = follower(body, material);
|
|
28139
|
+
cap.name = 'section-cap';
|
|
28140
|
+
return cap;
|
|
28141
|
+
};
|
|
28142
|
+
const copies = new Map();
|
|
28143
|
+
const remove = body => {
|
|
28144
|
+
const copy = copies.get(body);
|
|
28145
|
+
if (!copy) return;
|
|
28146
|
+
copy.cap.removeFromParent();
|
|
28147
|
+
copy.cap.material.dispose();
|
|
28148
|
+
copy.measurer.removeFromParent();
|
|
28149
|
+
copy.counter.removeFromParent();
|
|
28150
|
+
copies.delete(body);
|
|
28151
|
+
};
|
|
28152
|
+
return {
|
|
28153
|
+
update(clipping, camera) {
|
|
28154
|
+
planes.forEach((plane, i) => {
|
|
28155
|
+
if (!clipping[i]) {
|
|
28156
|
+
plane.copy(UNUSED);
|
|
28157
|
+
return;
|
|
28158
|
+
}
|
|
28159
|
+
const view = clipping[i].clone().applyMatrix4(camera.matrixWorldInverse);
|
|
28160
|
+
plane.set(-view.normal.x, -view.normal.y, -view.normal.z, view.constant);
|
|
28161
|
+
});
|
|
28162
|
+
},
|
|
28163
|
+
count(renderer, scene, camera) {
|
|
28164
|
+
copies.forEach(({
|
|
28165
|
+
cap,
|
|
28166
|
+
measurer: m,
|
|
28167
|
+
counter: c
|
|
28168
|
+
}, body) => {
|
|
28169
|
+
const shown = isShown(body, scene);
|
|
28170
|
+
for (const mesh of [cap, m, c]) {
|
|
28171
|
+
mesh.visible = shown;
|
|
28172
|
+
mesh.matrixWorld.copy(body.matrixWorld);
|
|
28173
|
+
}
|
|
28174
|
+
});
|
|
28175
|
+
renderer.getDrawingBufferSize(size);
|
|
28176
|
+
for (const t of [nearest, counts]) if (t.width !== size.x || t.height !== size.y) t.setSize(size.x, size.y);
|
|
28177
|
+
// (made on the first call, reused after)
|
|
28178
|
+
state = RendererUtils.resetRendererState(renderer, state);
|
|
28179
|
+
try {
|
|
28180
|
+
renderer.setClearColor(0x000000, 0);
|
|
28181
|
+
renderer.autoClear = true;
|
|
28182
|
+
renderer.setRenderTarget(nearest);
|
|
28183
|
+
renderer.render(measured, camera);
|
|
28184
|
+
renderer.setRenderTarget(counts);
|
|
28185
|
+
renderer.render(counted, camera);
|
|
28186
|
+
} finally {
|
|
28187
|
+
RendererUtils.restoreRendererState(renderer, state);
|
|
28188
|
+
}
|
|
28189
|
+
},
|
|
28190
|
+
add(body, root, key) {
|
|
28191
|
+
if (copies.has(body)) return;
|
|
28192
|
+
let own = labelOf.get(key);
|
|
28193
|
+
if (!own) labelOf.set(key, own = labelOf.size + 1);
|
|
28194
|
+
const copy = {
|
|
28195
|
+
cap: capOf(body, own),
|
|
28196
|
+
measurer: follower(body, measurer),
|
|
28197
|
+
counter: follower(body, counter)
|
|
28198
|
+
};
|
|
28199
|
+
labels.set(copy.measurer, own);
|
|
28200
|
+
labels.set(copy.counter, own);
|
|
28201
|
+
root.add(copy.cap);
|
|
28202
|
+
measured.add(copy.measurer);
|
|
28203
|
+
counted.add(copy.counter);
|
|
28204
|
+
copies.set(body, copy);
|
|
28205
|
+
},
|
|
28206
|
+
setHatch(units) {
|
|
28207
|
+
spacing.value = units;
|
|
28208
|
+
},
|
|
28209
|
+
remove,
|
|
28210
|
+
bodies: () => [...copies.keys()],
|
|
28211
|
+
dispose() {
|
|
28212
|
+
[...copies.keys()].forEach(remove);
|
|
28213
|
+
measurer.dispose();
|
|
28214
|
+
counter.dispose();
|
|
28215
|
+
nearest.dispose();
|
|
28216
|
+
counts.dispose();
|
|
28217
|
+
}
|
|
28218
|
+
};
|
|
28219
|
+
}
|
|
28220
|
+
|
|
28221
|
+
const useCPState = (drawingId, pluginId, sel) => usePlugin(drawingId, pluginId, p => sel(p.state));
|
|
28222
|
+
const IDLE = '#8a909b';
|
|
28223
|
+
const idleAxes = [IDLE, IDLE, IDLE];
|
|
28224
|
+
// (only the normal in colour: the in-plane axes just slide and turn it)
|
|
28225
|
+
const IN_PLANE = '#6f6f6f';
|
|
28226
|
+
const activeAxes = [IN_PLANE, IN_PLANE, '#2080ff'];
|
|
28227
|
+
|
|
28228
|
+
/**
|
|
28229
|
+
* Three's ClippingGroup (WebGPURenderer) is any group with these: a solid's own group gets them, so that its
|
|
28230
|
+
* geometry is clipped without being moved under another parent. WebGLRenderer ignores them.
|
|
28231
|
+
*/
|
|
28232
|
+
|
|
28233
|
+
const clipKeys = ['isClippingGroup', 'enabled', 'clippingPlanes', 'clipIntersection', 'clipShadows'];
|
|
28234
|
+
|
|
28235
|
+
// (on its kept side everywhere: with what any plane cuts cut away, it changes nothing)
|
|
28236
|
+
const NEUTRAL$1 = new THREE.Plane(new THREE.Vector3(0, 0, 1), 1e9);
|
|
28237
|
+
// (the caps' hatch: this many lines over the model's extent)
|
|
28238
|
+
const HATCH_LINES = 15;
|
|
28239
|
+
const isDrawn = o => o.isMesh || o.isLine || o.isPoints;
|
|
28240
|
+
|
|
28241
|
+
// (as three walks a tree: an object that answers false keeps its children out)
|
|
28242
|
+
function descend(object, raycaster, intersects) {
|
|
28243
|
+
if (object.layers.test(raycaster.layers) && object.raycast(raycaster, intersects) === false) return;
|
|
28244
|
+
object.children.forEach(child => descend(child, raycaster, intersects));
|
|
28245
|
+
}
|
|
28246
|
+
|
|
28247
|
+
/**
|
|
28248
|
+
* The pointer passes through what is cut away. On the solid's group, so that whatever is drawn under it later is
|
|
28249
|
+
* covered too: its objects are hit here, the hits in the cut dropped, and three is told not to walk them again.
|
|
28250
|
+
*/
|
|
28251
|
+
function clippedRaycast(raycaster, intersects) {
|
|
28252
|
+
var _this$clippingPlanes;
|
|
28253
|
+
const start = intersects.length;
|
|
28254
|
+
this.children.forEach(child => descend(child, raycaster, intersects));
|
|
28255
|
+
const planes = this.enabled ? (_this$clippingPlanes = this.clippingPlanes) != null ? _this$clippingPlanes : [] : [];
|
|
28256
|
+
for (let i = intersects.length - 1; i >= start; i--) {
|
|
28257
|
+
const {
|
|
28258
|
+
point
|
|
28259
|
+
} = intersects[i];
|
|
28260
|
+
if (planes.some(plane => plane.distanceToPoint(point) < 0)) intersects.splice(i, 1);
|
|
28261
|
+
}
|
|
28262
|
+
return false;
|
|
28263
|
+
}
|
|
28264
|
+
function unclip(group) {
|
|
28265
|
+
clipKeys.forEach(key => delete group[key]);
|
|
28266
|
+
delete group.raycast;
|
|
28267
|
+
}
|
|
28268
|
+
|
|
28269
|
+
/** A body the cut shows the inside of: opaque faces. */
|
|
28270
|
+
const isCappable = o => {
|
|
28271
|
+
const material = o.material;
|
|
28272
|
+
return !!o.isMesh && !!material && !Array.isArray(material) && !material.transparent && !material.wireframe;
|
|
28273
|
+
};
|
|
28274
|
+
|
|
28275
|
+
/** The group of the solid a drawn object of the model belongs to (react's Product), else its parent. */
|
|
28276
|
+
function solidGroupOf(object) {
|
|
28277
|
+
const {
|
|
28278
|
+
containerId
|
|
28279
|
+
} = object.userData;
|
|
28280
|
+
for (let o = object.parent; o; o = o.parent) {
|
|
28281
|
+
var _o$userData;
|
|
28282
|
+
if (((_o$userData = o.userData) == null ? void 0 : _o$userData.id) === containerId) return o;
|
|
28283
|
+
}
|
|
28284
|
+
return object.parent;
|
|
28285
|
+
}
|
|
28286
|
+
|
|
28287
|
+
/** Clips the solids the mode says by the planes, as long as the view is up. */
|
|
28288
|
+
function useClipping(drawingId, pluginId) {
|
|
28289
|
+
var _useCPState;
|
|
28290
|
+
const {
|
|
28291
|
+
scene,
|
|
28292
|
+
invalidate,
|
|
28293
|
+
gl
|
|
28294
|
+
} = useThree();
|
|
28295
|
+
|
|
28296
|
+
// (the caps are drawn where no clipping group clips them)
|
|
28297
|
+
const [capsRoot] = React__default.useState(() => new THREE.Group());
|
|
28298
|
+
const [section, setSection] = React__default.useState(null);
|
|
28299
|
+
React__default.useEffect(() => {
|
|
28300
|
+
if (!gl.isWebGPURenderer) return;
|
|
28301
|
+
const made = createSection();
|
|
28302
|
+
scene.add(capsRoot);
|
|
28303
|
+
setSection(made);
|
|
28304
|
+
return () => {
|
|
28305
|
+
made.dispose();
|
|
28306
|
+
capsRoot.removeFromParent();
|
|
28307
|
+
setSection(null);
|
|
28308
|
+
};
|
|
28309
|
+
}, [gl, scene, capsRoot]);
|
|
28310
|
+
const planes = useCPState(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
28311
|
+
const mode = (_useCPState = useCPState(drawingId, pluginId, s => s.mode)) != null ? _useCPState : SectionMode.Exclude;
|
|
28312
|
+
const solids = useCPState(drawingId, pluginId, s => s.solids) || EMPTYARRAY;
|
|
28313
|
+
const stamp = useDrawing(drawingId, d => d.geometry.stamp);
|
|
28314
|
+
const tree = useDrawing(drawingId, d => d.structure.tree);
|
|
28315
|
+
// (the overlays of what is hovered and selected are drawn then, tagged with their solid: cut like it)
|
|
28316
|
+
const hovered = useDrawing(drawingId, d => d.interaction.hovered);
|
|
28317
|
+
const selected = useDrawing(drawingId, d => d.interaction.selected);
|
|
28318
|
+
const clipping = React__default.useRef([]);
|
|
28319
|
+
const clipped = React__default.useRef(new Set());
|
|
28320
|
+
const salted = React__default.useRef(false);
|
|
28321
|
+
const planesFor = () => salted.current ? [...clipping.current, NEUTRAL$1] : clipping.current;
|
|
28322
|
+
|
|
28323
|
+
// (the planes are changed in place while their number stays: no group is visited for a drag)
|
|
28324
|
+
React__default.useLayoutEffect(() => {
|
|
28325
|
+
var _getDrawing;
|
|
28326
|
+
// (a hair more is cut, so a face lying in a plane goes whole, not pixel by pixel as rounding has it)
|
|
28327
|
+
const bounds = (_getDrawing = getDrawing(drawingId)) == null ? void 0 : _getDrawing.geometry.bounds;
|
|
28328
|
+
const extent = bounds && bounds.max.clone().sub(bounds.min).length();
|
|
28329
|
+
const hair = extent && Number.isFinite(extent) ? extent * 1e-5 : 1e-4;
|
|
28330
|
+
section == null || section.setHatch(extent && Number.isFinite(extent) ? extent / HATCH_LINES : 10);
|
|
28331
|
+
const next = planes.map(p => {
|
|
28332
|
+
const plane = new THREE.Plane().setFromNormalAndCoplanarPoint(new THREE.Vector3(...p.normal).normalize().negate(), new THREE.Vector3(...p.position));
|
|
28333
|
+
plane.constant -= hair;
|
|
28334
|
+
return plane;
|
|
28335
|
+
});
|
|
28336
|
+
if (next.length === clipping.current.length) {
|
|
28337
|
+
next.forEach((plane, i) => clipping.current[i].copy(plane));
|
|
28338
|
+
} else {
|
|
28339
|
+
clipping.current = next;
|
|
28340
|
+
const groupPlanes = planesFor();
|
|
28341
|
+
clipped.current.forEach(group => group.clippingPlanes = groupPlanes);
|
|
28342
|
+
}
|
|
28343
|
+
invalidate();
|
|
28344
|
+
}, [drawingId, planes, invalidate, section]);
|
|
28345
|
+
React__default.useEffect(() => {
|
|
28346
|
+
const cuts = (productId, containerId) => solids.some(s => s.productId === productId && s.containerId === containerId) === (mode === SectionMode.Include);
|
|
28347
|
+
const apply = () => {
|
|
28348
|
+
const wanted = new Set();
|
|
28349
|
+
const bodies = new Map();
|
|
28350
|
+
scene.traverse(object => {
|
|
28351
|
+
var _object$userData;
|
|
28352
|
+
const {
|
|
28353
|
+
productId,
|
|
28354
|
+
containerId
|
|
28355
|
+
} = (_object$userData = object.userData) != null ? _object$userData : {};
|
|
28356
|
+
if (containerId === undefined || !isDrawn(object) || !cuts(productId, containerId)) return;
|
|
28357
|
+
const group = solidGroupOf(object);
|
|
28358
|
+
if (!group) return;
|
|
28359
|
+
wanted.add(group);
|
|
28360
|
+
// (the shells of one solid, one per colour, are one body to the caps)
|
|
28361
|
+
if (isCappable(object)) bodies.set(object, `${productId}|${containerId}`);
|
|
28362
|
+
});
|
|
28363
|
+
clipped.current.forEach(group => !wanted.has(group) && unclip(group));
|
|
28364
|
+
if (section) {
|
|
28365
|
+
// (a body no longer cut, or drawn anew, which takes the old one out of the scene)
|
|
28366
|
+
section.bodies().forEach(body => !bodies.has(body) && section.remove(body));
|
|
28367
|
+
bodies.forEach((key, body) => section.add(body, capsRoot, key));
|
|
28368
|
+
}
|
|
28369
|
+
// (three shares a clipped shader with the planes of the group it was built for: rebuild it from live groups)
|
|
28370
|
+
const same = wanted.size === clipped.current.size && [...wanted].every(group => clipped.current.has(group));
|
|
28371
|
+
if (!same) salted.current = !salted.current;
|
|
28372
|
+
const groupPlanes = planesFor();
|
|
28373
|
+
wanted.forEach(group => {
|
|
28374
|
+
Object.assign(group, {
|
|
28375
|
+
isClippingGroup: true,
|
|
28376
|
+
enabled: true,
|
|
28377
|
+
clippingPlanes: groupPlanes,
|
|
28378
|
+
// (what any plane cuts is cut: what is kept is what all planes keep)
|
|
28379
|
+
clipIntersection: false,
|
|
28380
|
+
clipShadows: false
|
|
28381
|
+
});
|
|
28382
|
+
group.raycast = clippedRaycast;
|
|
28383
|
+
});
|
|
28384
|
+
clipped.current = wanted;
|
|
28385
|
+
invalidate();
|
|
28386
|
+
};
|
|
28387
|
+
apply();
|
|
28388
|
+
// (a solid that came with the change is drawn a moment later)
|
|
28389
|
+
const timer = window.setTimeout(apply, 100);
|
|
28390
|
+
return () => window.clearTimeout(timer);
|
|
28391
|
+
}, [scene, invalidate, mode, solids, stamp, tree, hovered, selected, section, capsRoot]);
|
|
28392
|
+
|
|
28393
|
+
// Before the stage draws: the caps where their bodies are, and the bodies counted for them.
|
|
28394
|
+
useFrame(({
|
|
28395
|
+
camera
|
|
28396
|
+
}) => {
|
|
28397
|
+
if (!section || section.bodies().length === 0) return;
|
|
28398
|
+
scene.updateMatrixWorld();
|
|
28399
|
+
camera.updateMatrixWorld();
|
|
28400
|
+
section.update(clipping.current, camera);
|
|
28401
|
+
section.count(gl, scene, camera);
|
|
28402
|
+
});
|
|
28403
|
+
React__default.useEffect(() => () => {
|
|
28404
|
+
clipped.current.forEach(unclip);
|
|
28405
|
+
clipped.current.clear();
|
|
28406
|
+
invalidate();
|
|
28407
|
+
}, [invalidate]);
|
|
28408
|
+
}
|
|
28409
|
+
|
|
28410
|
+
/** A plane's origin: clicked, the plane is selected. */
|
|
28411
|
+
const Origin = ({
|
|
28412
|
+
drawingId,
|
|
28413
|
+
pluginId,
|
|
28414
|
+
index,
|
|
28415
|
+
plane,
|
|
28416
|
+
color
|
|
28417
|
+
}) => {
|
|
28418
|
+
const stage = useStage();
|
|
28419
|
+
const [hovered, setHovered] = React__default.useState(false);
|
|
28420
|
+
useCursor(hovered);
|
|
28421
|
+
const position = React__default.useMemo(() => new THREE.Vector3(...plane.position), [plane.position]);
|
|
28422
|
+
const ref = useConstantSize(position, sf => [4 * sf, 4 * sf, 4 * sf]);
|
|
28423
|
+
const onClick = React__default.useCallback(e => {
|
|
28424
|
+
if (e.delta > deltaTolerance) return;
|
|
28425
|
+
e.stopPropagation();
|
|
28426
|
+
setState(drawingId, pluginId, {
|
|
28427
|
+
selected: index
|
|
28428
|
+
});
|
|
28429
|
+
}, [drawingId, pluginId, index]);
|
|
28430
|
+
return /*#__PURE__*/React__default.createElement("mesh", {
|
|
28431
|
+
ref: ref,
|
|
28432
|
+
position: position,
|
|
28433
|
+
renderOrder: 700,
|
|
28434
|
+
userData: {
|
|
28435
|
+
onHUD: true
|
|
28436
|
+
},
|
|
28437
|
+
onClick: onClick,
|
|
28438
|
+
onPointerOver: e => {
|
|
28439
|
+
e.stopPropagation();
|
|
28440
|
+
setHovered(true);
|
|
28441
|
+
},
|
|
28442
|
+
onPointerOut: e => {
|
|
28443
|
+
e.stopPropagation();
|
|
28444
|
+
setHovered(false);
|
|
28445
|
+
}
|
|
28446
|
+
}, /*#__PURE__*/React__default.createElement("sphereGeometry", {
|
|
28447
|
+
args: [1, 12, 12]
|
|
28448
|
+
}), /*#__PURE__*/React__default.createElement("meshBasicMaterial", {
|
|
28449
|
+
color: hovered ? stage.hover : color,
|
|
28450
|
+
depthTest: false,
|
|
28451
|
+
transparent: true
|
|
28452
|
+
}));
|
|
28453
|
+
};
|
|
28454
|
+
|
|
28455
|
+
/** The gizmo of a plane: all of it for the selected one, its normal alone (in grey) for the others. */
|
|
28456
|
+
const PlaneGizmo = ({
|
|
28457
|
+
drawingId,
|
|
28458
|
+
pluginId,
|
|
28459
|
+
index,
|
|
28460
|
+
plane,
|
|
28461
|
+
active
|
|
28462
|
+
}) => {
|
|
28463
|
+
const stage = useStage();
|
|
28464
|
+
|
|
28465
|
+
// (a new matrix every time: PivotControls takes the object itself as its matrix)
|
|
28466
|
+
const matrix = React__default.useMemo(() => planeMatrix(plane), [plane]);
|
|
28467
|
+
const onDrag = React__default.useCallback(l => setState(drawingId, pluginId, s => ({
|
|
28468
|
+
planes: s.planes.map((p, i) => i === index ? planeFromMatrix(l) : p)
|
|
28469
|
+
})), [drawingId, pluginId, index]);
|
|
28470
|
+
const idle = active ? {
|
|
28471
|
+
axisColors: activeAxes
|
|
28472
|
+
} : {
|
|
28473
|
+
activeAxes: [false, false, true],
|
|
28474
|
+
disableSliders: true,
|
|
28475
|
+
disableRotations: true,
|
|
28476
|
+
axisColors: idleAxes
|
|
28477
|
+
};
|
|
28478
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Origin, {
|
|
28479
|
+
drawingId: drawingId,
|
|
28480
|
+
pluginId: pluginId,
|
|
28481
|
+
index: index,
|
|
28482
|
+
plane: plane,
|
|
28483
|
+
color: active ? stage.select : IDLE
|
|
28484
|
+
}), /*#__PURE__*/React__default.createElement(PivotControls, _extends({
|
|
28485
|
+
matrix: matrix,
|
|
28486
|
+
autoTransform: false,
|
|
28487
|
+
fixed: true,
|
|
28488
|
+
scale: 96,
|
|
28489
|
+
lineWidth: 3.5,
|
|
28490
|
+
hoveredColor: stage.select
|
|
28491
|
+
// (drei 10's prop; the drei 9 types some installs resolve do not know it)
|
|
28492
|
+
,
|
|
28493
|
+
disableScaling: true
|
|
28494
|
+
}, idle, {
|
|
28495
|
+
annotations: false,
|
|
28496
|
+
userData: {
|
|
28497
|
+
onHUD: true
|
|
28498
|
+
},
|
|
28499
|
+
onDragStart: () => !active && setState(drawingId, pluginId, {
|
|
28500
|
+
selected: index
|
|
28501
|
+
}),
|
|
28502
|
+
onDrag: onDrag
|
|
28503
|
+
})));
|
|
28504
|
+
};
|
|
28505
|
+
function ViewImpl$2({
|
|
28506
|
+
drawingId,
|
|
28507
|
+
pluginId
|
|
28508
|
+
}) {
|
|
28509
|
+
useClipping(drawingId, pluginId);
|
|
28510
|
+
const planes = useCPState(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
28511
|
+
const selected = useCPState(drawingId, pluginId, s => s.selected);
|
|
28512
|
+
return /*#__PURE__*/React__default.createElement(HUD$1, null, planes.map((plane, i) => /*#__PURE__*/React__default.createElement(PlaneGizmo, {
|
|
28513
|
+
key: i,
|
|
28514
|
+
drawingId: drawingId,
|
|
28515
|
+
pluginId: pluginId,
|
|
28516
|
+
index: i,
|
|
28517
|
+
plane: plane,
|
|
28518
|
+
active: i === selected
|
|
28519
|
+
})));
|
|
28520
|
+
}
|
|
28521
|
+
|
|
28522
|
+
/**
|
|
28523
|
+
* The section in the scene: the solids cut, and a gizmo for each plane.
|
|
28524
|
+
*
|
|
28525
|
+
* @internal
|
|
28526
|
+
*/
|
|
28527
|
+
const View$c = ({
|
|
28528
|
+
drawingId,
|
|
28529
|
+
pluginId
|
|
28530
|
+
}) => {
|
|
28531
|
+
return /*#__PURE__*/React__default.createElement(ErrorBoundary, null, /*#__PURE__*/React__default.createElement(ViewImpl$2, {
|
|
28532
|
+
drawingId: drawingId,
|
|
28533
|
+
pluginId: pluginId
|
|
28534
|
+
}));
|
|
28535
|
+
};
|
|
28536
|
+
|
|
28537
|
+
/**
|
|
28538
|
+
* A section view: the model cut by planes, to see inside it.
|
|
28539
|
+
*
|
|
28540
|
+
* It is a global plugin: an app adds it to `init`'s `globalPlugins`, and the `ViewPlugButtons` have a button that opens
|
|
28541
|
+
* it. While it is open, each plane cuts away what its normal points to, from the picked solids only (Include) or from
|
|
28542
|
+
* all but them (Exclude). A plane is moved and turned with its gizmo, typed in, or set from a work plane or a planar
|
|
28543
|
+
* face. The cut is drawn by `WebGPURenderer` (Buerligons' stage); `WebGLRenderer` draws the model whole.
|
|
28544
|
+
*
|
|
28545
|
+
* @example
|
|
28546
|
+
* ```tsx
|
|
28547
|
+
* import { init, WASMClient } from '@buerli.io/classcad'
|
|
28548
|
+
* import { SectionView, elements } from '@buerli.io/react-cad'
|
|
28549
|
+
*
|
|
28550
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), { elements, globalPlugins: [SectionView] })
|
|
28551
|
+
* ```
|
|
28552
|
+
*
|
|
28553
|
+
* @category Tool Plugins
|
|
28554
|
+
* @module
|
|
28555
|
+
*/
|
|
28556
|
+
|
|
28557
|
+
/**
|
|
28558
|
+
* The plugin's description for buerli's plugin system.
|
|
28559
|
+
*
|
|
28560
|
+
* @internal
|
|
28561
|
+
*/
|
|
28562
|
+
const description$i = {
|
|
28563
|
+
name: 'SectionView',
|
|
28564
|
+
version: '1.0.0',
|
|
28565
|
+
author: 'AWV',
|
|
28566
|
+
persistent: true,
|
|
28567
|
+
global: true,
|
|
28568
|
+
initialState: {
|
|
28569
|
+
planes: [],
|
|
28570
|
+
selected: undefined,
|
|
28571
|
+
mode: SectionMode.Exclude,
|
|
28572
|
+
solids: []
|
|
28573
|
+
}
|
|
28574
|
+
};
|
|
28575
|
+
|
|
27494
28576
|
var index$i = /*#__PURE__*/Object.freeze({
|
|
27495
28577
|
__proto__: null,
|
|
27496
28578
|
Root: Root$i,
|
|
@@ -31978,6 +33060,92 @@ const editorsStyle = css`
|
|
|
31978
33060
|
.rcad-ed-limited .ant-slider-dot {
|
|
31979
33061
|
display: none;
|
|
31980
33062
|
}
|
|
33063
|
+
|
|
33064
|
+
/* ---- an advanced polyline: the selected point, which of them it is, and a hint */
|
|
33065
|
+
.rcad-ed-pld-nav {
|
|
33066
|
+
display: flex;
|
|
33067
|
+
flex: 1 1 0;
|
|
33068
|
+
align-items: center;
|
|
33069
|
+
gap: 4px;
|
|
33070
|
+
width: 100%;
|
|
33071
|
+
min-width: 0;
|
|
33072
|
+
}
|
|
33073
|
+
/* (previous, which, next: one control, its parts parted by rules) */
|
|
33074
|
+
.rcad-ed-pld-step {
|
|
33075
|
+
display: flex;
|
|
33076
|
+
flex: none;
|
|
33077
|
+
align-items: stretch;
|
|
33078
|
+
height: var(--rcad-ctl-h);
|
|
33079
|
+
border: 1px solid var(--rcad-line);
|
|
33080
|
+
border-radius: var(--rcad-r-ctl);
|
|
33081
|
+
background: var(--rcad-panel-2);
|
|
33082
|
+
overflow: hidden;
|
|
33083
|
+
transition: border-color 0.15s;
|
|
33084
|
+
}
|
|
33085
|
+
.rcad-ed-pld-step:hover {
|
|
33086
|
+
border-color: var(--rcad-line-2);
|
|
33087
|
+
}
|
|
33088
|
+
.rcad-ed-pld-step > button {
|
|
33089
|
+
display: grid;
|
|
33090
|
+
flex: none;
|
|
33091
|
+
place-items: center;
|
|
33092
|
+
width: calc(var(--rcad-ctl-h) - 4px);
|
|
33093
|
+
padding: 0;
|
|
33094
|
+
border: 0;
|
|
33095
|
+
background: transparent;
|
|
33096
|
+
color: var(--rcad-mute);
|
|
33097
|
+
cursor: pointer;
|
|
33098
|
+
transition:
|
|
33099
|
+
background-color 0.15s,
|
|
33100
|
+
color 0.15s;
|
|
33101
|
+
}
|
|
33102
|
+
.rcad-ed-pld-step > button:hover:not(:disabled) {
|
|
33103
|
+
background: var(--rcad-hover);
|
|
33104
|
+
color: var(--rcad-ink);
|
|
33105
|
+
}
|
|
33106
|
+
.rcad-ed-pld-step > button:focus-visible {
|
|
33107
|
+
outline: 2px solid var(--rcad-accent-line);
|
|
33108
|
+
outline-offset: -2px;
|
|
33109
|
+
}
|
|
33110
|
+
.rcad-ed-pld-step > button:disabled {
|
|
33111
|
+
color: var(--rcad-dim);
|
|
33112
|
+
opacity: 0.5;
|
|
33113
|
+
cursor: default;
|
|
33114
|
+
}
|
|
33115
|
+
/* (as wide for "1 / 1" as for "999 / 999": the digits are as wide as each other) */
|
|
33116
|
+
.rcad-ed-pld-idx {
|
|
33117
|
+
display: grid;
|
|
33118
|
+
flex: none;
|
|
33119
|
+
place-items: center;
|
|
33120
|
+
width: 55px;
|
|
33121
|
+
border-right: 1px solid var(--rcad-line);
|
|
33122
|
+
border-left: 1px solid var(--rcad-line);
|
|
33123
|
+
color: var(--rcad-ink);
|
|
33124
|
+
font: 500 11px/1 var(--rcad-font-mono);
|
|
33125
|
+
font-variant-numeric: tabular-nums;
|
|
33126
|
+
white-space: nowrap;
|
|
33127
|
+
}
|
|
33128
|
+
.rcad-ed-pld-hint {
|
|
33129
|
+
color: var(--rcad-dim);
|
|
33130
|
+
font-size: 11px;
|
|
33131
|
+
}
|
|
33132
|
+
html:root .rcad-ed-pld-nav > .rcad-ed-pld-type.ant-select {
|
|
33133
|
+
flex: 1 1 0;
|
|
33134
|
+
width: auto;
|
|
33135
|
+
min-width: 0;
|
|
33136
|
+
height: var(--rcad-ctl-h);
|
|
33137
|
+
}
|
|
33138
|
+
html:root .rcad-ed-pld-nav > .rcad-el.ant-btn {
|
|
33139
|
+
flex: 1 1 0;
|
|
33140
|
+
min-width: 0;
|
|
33141
|
+
height: var(--rcad-ctl-h);
|
|
33142
|
+
padding: 0 6px;
|
|
33143
|
+
}
|
|
33144
|
+
.rcad-ed-pld-actions {
|
|
33145
|
+
display: grid;
|
|
33146
|
+
grid-template-columns: 1fr 1fr;
|
|
33147
|
+
gap: 6px;
|
|
33148
|
+
}
|
|
31981
33149
|
`;
|
|
31982
33150
|
|
|
31983
33151
|
/**
|
|
@@ -33535,6 +34703,10 @@ const globals = {
|
|
|
33535
34703
|
name: 'Bounding box',
|
|
33536
34704
|
icon: 'bbox'
|
|
33537
34705
|
},
|
|
34706
|
+
SectionView: {
|
|
34707
|
+
name: 'Section view',
|
|
34708
|
+
icon: 'section'
|
|
34709
|
+
},
|
|
33538
34710
|
'Appearance Editor': {
|
|
33539
34711
|
name: 'Appearance',
|
|
33540
34712
|
icon: 'appearance'
|
|
@@ -36780,8 +37952,8 @@ const useGPluginId = (drawingId, pluginName) => {
|
|
|
36780
37952
|
*/
|
|
36781
37953
|
|
|
36782
37954
|
/**
|
|
36783
|
-
* Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box,
|
|
36784
|
-
* Management.
|
|
37955
|
+
* Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box, Section view,
|
|
37956
|
+
* Session Management.
|
|
36785
37957
|
*
|
|
36786
37958
|
* A button is there only where the drawing has the plugin (`init`'s `globalPlugins`); it switches the plugin on and
|
|
36787
37959
|
* off, and its window is one of the {@link GlobalPlugins}. The Session Management button is not shown to a guest of a
|
|
@@ -36816,6 +37988,7 @@ const ViewPlugButtons = ({
|
|
|
36816
37988
|
const dimensionsId = useGPluginId(drawingId, 'Dimensions');
|
|
36817
37989
|
const measureId = useGPluginId(drawingId, 'Measure');
|
|
36818
37990
|
const bbInfoId = useGPluginId(drawingId, 'BoundingBoxInfo');
|
|
37991
|
+
const sectionId = useGPluginId(drawingId, 'SectionView');
|
|
36819
37992
|
const smId = useGPluginId(drawingId, 'Session Management');
|
|
36820
37993
|
const isGuest = Boolean(getInviteFromUrl());
|
|
36821
37994
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, dimensionsId && /*#__PURE__*/React__default.createElement(ViewPlugButton, {
|
|
@@ -36842,6 +38015,14 @@ const ViewPlugButtons = ({
|
|
|
36842
38015
|
size: 18
|
|
36843
38016
|
}),
|
|
36844
38017
|
title: "Bounding box"
|
|
38018
|
+
}), sectionId && /*#__PURE__*/React__default.createElement(ViewPlugButton, {
|
|
38019
|
+
drawingId: drawingId,
|
|
38020
|
+
pId: sectionId,
|
|
38021
|
+
icon: /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
38022
|
+
name: "section",
|
|
38023
|
+
size: 18
|
|
38024
|
+
}),
|
|
38025
|
+
title: "Section view"
|
|
36845
38026
|
}), !isGuest && smId && /*#__PURE__*/React__default.createElement(ViewPlugButton, {
|
|
36846
38027
|
drawingId: drawingId,
|
|
36847
38028
|
pId: smId,
|
|
@@ -44797,4 +45978,4 @@ const StageLook = ({
|
|
|
44797
45978
|
return null;
|
|
44798
45979
|
};
|
|
44799
45980
|
|
|
44800
|
-
export { AppStyle, index$g as AppearanceEditor, Badge, index$
|
|
45981
|
+
export { AppStyle, index$g as AppearanceEditor, Badge, index$J as Boolean, index$j as BoundingBoxInfo, index$F as Box, CADApi, CSysDisplay, CSysDisplayMode, index$z as Chamfer, index$s as CircularPattern, index$5 as CircularPatternConstraint, index$C as CompositeCurve, CompositeCurveObj, index$B as Cone, Constraints, ContextMenu, index$D as Cylinder, index$b as Cylindrical, index$K as Dimensions, Drawing, EditMode, index$2 as EntityDeletion, index$h as Expressions, index$I as Extrusion, index$e as Fastened, index$f as FastenedOrigin, FeaturePlugin, FieldContext, index$A as Fillet, FtVisibilityController$1 as FtVisibilityController, index$4 as Gear, GeometryOverridesManager, GlobalPlugins, index$7 as Group, HUD$1 as HUD, HoveredConstraintDisplay, Icon$1 as Icon, index$3 as Import, index$t as LinearPattern, index$6 as LinearPatternConstraint, MateScope, index$q as Measure, Menu, Messages, index$r as Mirror, ModelTree, Outline, index$9 as Parallel, index$a as Planar, PluginGeometryBounds, index$1 as ProductManagement, Readfile$1 as Readfile, index$c as Revolute, index$G as Revolve, index$x as Rotate, index$i as SectionView, SelectedMateObj, index as SessionManagement, SideBar, index$p as Sketch, index$v as Slice, index$u as SliceBySheet, index$d as Slider, Solids, index$E as Sphere, index$8 as Spherical, StageLook, ThemeToggle, ToolBar, index$w as TransformByCsys, index$y as Translate, TreeObjScope, index$H as Twist, ViewOptionButtons, ViewPlugButtons, index$o as WorkAxis, WorkAxisObj, index$k as WorkCSys, WorkCSysObj, index$l as WorkCoordSystem, WorkCoordSystemObj, index$n as WorkPlane, WorkPlaneObj, index$m as WorkPoint, WorkPointObj, conversionUtils, createTreeObjSelItem, darkStage, darkTheme, elements, getCADState, getMateRefIds, getStage, getViewOptions, iconDataUrl, iconRef, iconSvg, drawings as icons, lightStage, lightTheme, mateUtils, nurbsUtils, sessionClient, setRCadThemeMode, setViewOptions, sketchIntersectionUtils, sketchUtils, stageColors, monoStage as stageFont, useAllObjects, useCADStore, useEditMode, useHasPending, useIsExpanded, useIsLoading, useIsSketchActive, useIsVisible, useOperationSequence, useOverrideGeometryColor, useRCadTheme, useRCadThemeMode, useThemeStore as useRCadThemeStore, useStage, useVisibleMap, useVisibleSolids, viewpoints$1 as viewpoints };
|