@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.cjs.js
CHANGED
|
@@ -21,6 +21,8 @@ var uuid = require('uuid');
|
|
|
21
21
|
var LineGeometry_js = require('three/addons/lines/LineGeometry.js');
|
|
22
22
|
var styled = require('styled-components');
|
|
23
23
|
var shallow = require('zustand/shallow');
|
|
24
|
+
var tsl = require('three/tsl');
|
|
25
|
+
var webgpu = require('three/webgpu');
|
|
24
26
|
var reactColorful = require('react-colorful');
|
|
25
27
|
var pathBrowserify = require('path-browserify');
|
|
26
28
|
var postprocessing = require('postprocessing');
|
|
@@ -100,8 +102,8 @@ function useDrawingStr(drawingId, selector) {
|
|
|
100
102
|
return res || EMPTYSTR;
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
function ownKeys$
|
|
104
|
-
function _objectSpread$
|
|
105
|
+
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; }
|
|
106
|
+
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; }
|
|
105
107
|
function getGraphicId(tree, refOrObjId) {
|
|
106
108
|
const res = {
|
|
107
109
|
graphicId: refOrObjId,
|
|
@@ -164,7 +166,7 @@ function useSelectedItems(drawingId, refOrObjIds) {
|
|
|
164
166
|
// TODO: !!!Important!!! This may not properly create a graphic item for BuerliGeometry in assembly mode, but currently it isn't needed to.
|
|
165
167
|
const prodId = sdkjs.getDrawing(drawingId).structure.currentProduct;
|
|
166
168
|
const createSelItem = React.useCallback(element => {
|
|
167
|
-
return sdkjs.createGraphicItem(prodId, _objectSpread$
|
|
169
|
+
return sdkjs.createGraphicItem(prodId, _objectSpread$H(_objectSpread$H({}, element), {}, {
|
|
168
170
|
productId: prodId
|
|
169
171
|
}));
|
|
170
172
|
}, [prodId]);
|
|
@@ -189,7 +191,7 @@ function useSelectedItems(drawingId, refOrObjIds) {
|
|
|
189
191
|
if (grIds && grIds.length > 0) {
|
|
190
192
|
const elem = cont.map[Number(grIds[0])];
|
|
191
193
|
if (elem) {
|
|
192
|
-
elems.push(_objectSpread$
|
|
194
|
+
elems.push(_objectSpread$H(_objectSpread$H({}, elem), {}, {
|
|
193
195
|
graphicId: contId,
|
|
194
196
|
type: cont.type
|
|
195
197
|
}));
|
|
@@ -913,6 +915,8 @@ const ui = sheet$1({
|
|
|
913
915
|
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']],
|
|
914
916
|
/** A block in a dashed cube: the bounding box. */
|
|
915
917
|
bbox: [['sub-dash', cube.lines], ['tone', inner.top], ['', inner.lines]],
|
|
918
|
+
/** A block cut through by a plane: the section view. */
|
|
919
|
+
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']],
|
|
916
920
|
// ---- the view: all of it in the frame; along a plane's normal; how a body looks
|
|
917
921
|
/** Corners around a square: zoom to fit. */
|
|
918
922
|
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)]],
|
|
@@ -1921,8 +1925,8 @@ const mates = sheet$1({
|
|
|
1921
1925
|
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)]]
|
|
1922
1926
|
});
|
|
1923
1927
|
|
|
1924
|
-
function ownKeys$
|
|
1925
|
-
function _objectSpread$
|
|
1928
|
+
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; }
|
|
1929
|
+
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; }
|
|
1926
1930
|
|
|
1927
1931
|
// what stands in for a drawing that is not there: a dashed square. It is meant to be seen.
|
|
1928
1932
|
const missing = sheet$1({
|
|
@@ -1957,7 +1961,7 @@ const missing = sheet$1({
|
|
|
1957
1961
|
*
|
|
1958
1962
|
* @category Icons
|
|
1959
1963
|
*/
|
|
1960
|
-
const drawings = _objectSpread$
|
|
1964
|
+
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);
|
|
1961
1965
|
|
|
1962
1966
|
/**
|
|
1963
1967
|
* The name of one of the app's drawings: a key of {@link icons}, such as `'extrusion'`.
|
|
@@ -1975,8 +1979,8 @@ const drawingOf = name => {
|
|
|
1975
1979
|
return (_name = drawings[name]) != null ? _name : drawings.missing;
|
|
1976
1980
|
};
|
|
1977
1981
|
|
|
1978
|
-
function ownKeys$
|
|
1979
|
-
function _objectSpread$
|
|
1982
|
+
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; }
|
|
1983
|
+
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; }
|
|
1980
1984
|
const PREFIX = 'rcad:';
|
|
1981
1985
|
|
|
1982
1986
|
/**
|
|
@@ -2083,7 +2087,7 @@ const Icon$1 = /*#__PURE__*/React.memo(function Icon({
|
|
|
2083
2087
|
viewBox: "0 0 20 20",
|
|
2084
2088
|
width: size,
|
|
2085
2089
|
height: size,
|
|
2086
|
-
style: _objectSpread$
|
|
2090
|
+
style: _objectSpread$F({
|
|
2087
2091
|
['--w']: weight(size) * 20 / size
|
|
2088
2092
|
}, style),
|
|
2089
2093
|
role: title ? 'img' : undefined,
|
|
@@ -2283,7 +2287,7 @@ function iconSvg(name, inks, size = 20, seenAt = size) {
|
|
|
2283
2287
|
*/
|
|
2284
2288
|
const iconDataUrl = (name, inks, size = 20, seenAt = size) => 'data:image/svg+xml;utf8,' + encodeURIComponent(iconSvg(name, inks, size, seenAt));
|
|
2285
2289
|
|
|
2286
|
-
const _excluded$
|
|
2290
|
+
const _excluded$8 = ["children", "format", "className"],
|
|
2287
2291
|
_excluded2 = ["children", "iconSrc", "titleText", "className"],
|
|
2288
2292
|
_excluded3 = ["children", "className"],
|
|
2289
2293
|
_excluded4 = ["className"],
|
|
@@ -2315,7 +2319,7 @@ function Group(_ref) {
|
|
|
2315
2319
|
format,
|
|
2316
2320
|
className
|
|
2317
2321
|
} = _ref,
|
|
2318
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2322
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2319
2323
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
2320
2324
|
className: cx('rcad-el rcad-el-group', className),
|
|
2321
2325
|
"data-format": format === 'Columns' ? 'columns' : 'rows'
|
|
@@ -2773,8 +2777,8 @@ const Wrapper = ({
|
|
|
2773
2777
|
}, children));
|
|
2774
2778
|
};
|
|
2775
2779
|
|
|
2776
|
-
function ownKeys$
|
|
2777
|
-
function _objectSpread$
|
|
2780
|
+
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; }
|
|
2781
|
+
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; }
|
|
2778
2782
|
const getTextContent = element => {
|
|
2779
2783
|
var _element$textContent;
|
|
2780
2784
|
return ((_element$textContent = element.textContent) == null ? void 0 : _element$textContent.replace(/\xa0/g, ' ')) || '';
|
|
@@ -3165,7 +3169,7 @@ const Mentions = ({
|
|
|
3165
3169
|
index = Number((indexClass == null ? void 0 : indexClass.slice(16)) || '-1');
|
|
3166
3170
|
}
|
|
3167
3171
|
if (index !== -1) {
|
|
3168
|
-
selRangeRef.current = _objectSpread$
|
|
3172
|
+
selRangeRef.current = _objectSpread$E({}, linkRangesRef.current[index]);
|
|
3169
3173
|
selRangeRef.current.start = selRangeRef.current.start + 6;
|
|
3170
3174
|
restoreSelection(ref, selRangeRef.current.start, selRangeRef.current.end);
|
|
3171
3175
|
setCurExprLink(index);
|
|
@@ -3736,8 +3740,8 @@ const isDiameter = dim => client.ccUtils.base.isA(dim.class, client.ScgClassType
|
|
|
3736
3740
|
*/
|
|
3737
3741
|
const isTreeInstance = clazz => client.ccUtils.base.isA(clazz, client.ScgClassType.IProductReference) || client.ccUtils.base.isA(clazz, client.ScgClassType.CCAssembly);
|
|
3738
3742
|
|
|
3739
|
-
function ownKeys$
|
|
3740
|
-
function _objectSpread$
|
|
3743
|
+
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; }
|
|
3744
|
+
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; }
|
|
3741
3745
|
const isFeatureActive = drawingId => {
|
|
3742
3746
|
const activePlugin = sdkjs.getDrawing(drawingId).plugin.active.feature;
|
|
3743
3747
|
if (activePlugin) {
|
|
@@ -3803,8 +3807,8 @@ const appApi = (set, get) => ({
|
|
|
3803
3807
|
const curInstance = sdkjs.api.getState().drawing.refs[drawingId].structure.currentInstance;
|
|
3804
3808
|
res = state.assemblyTree.prodStack;
|
|
3805
3809
|
curInstance && res.push(curInstance);
|
|
3806
|
-
return _objectSpread$
|
|
3807
|
-
assemblyTree: _objectSpread$
|
|
3810
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3811
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3808
3812
|
prodStack: [...res]
|
|
3809
3813
|
})
|
|
3810
3814
|
});
|
|
@@ -3823,8 +3827,8 @@ const appApi = (set, get) => ({
|
|
|
3823
3827
|
set(state => {
|
|
3824
3828
|
const res = state.assemblyTree.prodStack;
|
|
3825
3829
|
res.pop();
|
|
3826
|
-
return _objectSpread$
|
|
3827
|
-
assemblyTree: _objectSpread$
|
|
3830
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3831
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3828
3832
|
prodStack: [...res]
|
|
3829
3833
|
})
|
|
3830
3834
|
});
|
|
@@ -3835,8 +3839,8 @@ const appApi = (set, get) => ({
|
|
|
3835
3839
|
}).catch(console.warn);
|
|
3836
3840
|
},
|
|
3837
3841
|
clearProdStack: () => {
|
|
3838
|
-
set(state => _objectSpread$
|
|
3839
|
-
assemblyTree: _objectSpread$
|
|
3842
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3843
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3840
3844
|
prodStack: []
|
|
3841
3845
|
})
|
|
3842
3846
|
}));
|
|
@@ -3846,7 +3850,7 @@ const appApi = (set, get) => ({
|
|
|
3846
3850
|
return;
|
|
3847
3851
|
}
|
|
3848
3852
|
const visibleMap = get().assemblyTree.visibleMap;
|
|
3849
|
-
const visibleMapNew = _objectSpread$
|
|
3853
|
+
const visibleMapNew = _objectSpread$D({}, visibleMap);
|
|
3850
3854
|
instanceIds.forEach((instanceId, index) => {
|
|
3851
3855
|
const objIds = objIdsArr[index];
|
|
3852
3856
|
const visible = visibleMap[instanceId];
|
|
@@ -3861,8 +3865,8 @@ const appApi = (set, get) => ({
|
|
|
3861
3865
|
});
|
|
3862
3866
|
visibleMapNew[instanceId] = visibleNew;
|
|
3863
3867
|
});
|
|
3864
|
-
set(state => _objectSpread$
|
|
3865
|
-
assemblyTree: _objectSpread$
|
|
3868
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3869
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3866
3870
|
visibleMap: visibleMapNew
|
|
3867
3871
|
})
|
|
3868
3872
|
}));
|
|
@@ -3873,7 +3877,7 @@ const appApi = (set, get) => ({
|
|
|
3873
3877
|
return;
|
|
3874
3878
|
}
|
|
3875
3879
|
set(state => {
|
|
3876
|
-
const ofDrawing = _objectSpread$
|
|
3880
|
+
const ofDrawing = _objectSpread$D({}, state.assemblyTree.expanded[drawingId]);
|
|
3877
3881
|
instanceIds.forEach(id => {
|
|
3878
3882
|
if (value) {
|
|
3879
3883
|
ofDrawing[id] = true;
|
|
@@ -3881,11 +3885,11 @@ const appApi = (set, get) => ({
|
|
|
3881
3885
|
delete ofDrawing[id];
|
|
3882
3886
|
}
|
|
3883
3887
|
});
|
|
3884
|
-
const expanded = _objectSpread$
|
|
3888
|
+
const expanded = _objectSpread$D(_objectSpread$D({}, state.assemblyTree.expanded), {}, {
|
|
3885
3889
|
[drawingId]: ofDrawing
|
|
3886
3890
|
});
|
|
3887
|
-
return _objectSpread$
|
|
3888
|
-
assemblyTree: _objectSpread$
|
|
3891
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3892
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3889
3893
|
expanded
|
|
3890
3894
|
})
|
|
3891
3895
|
});
|
|
@@ -3918,10 +3922,10 @@ const appApi = (set, get) => ({
|
|
|
3918
3922
|
/** Folds every row of a drawing. */
|
|
3919
3923
|
clearExpanded: drawingId => {
|
|
3920
3924
|
set(state => {
|
|
3921
|
-
const expanded = _objectSpread$
|
|
3925
|
+
const expanded = _objectSpread$D({}, state.assemblyTree.expanded);
|
|
3922
3926
|
delete expanded[drawingId];
|
|
3923
|
-
return _objectSpread$
|
|
3924
|
-
assemblyTree: _objectSpread$
|
|
3927
|
+
return _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3928
|
+
assemblyTree: _objectSpread$D(_objectSpread$D({}, state.assemblyTree), {}, {
|
|
3925
3929
|
expanded
|
|
3926
3930
|
})
|
|
3927
3931
|
});
|
|
@@ -3930,7 +3934,7 @@ const appApi = (set, get) => ({
|
|
|
3930
3934
|
},
|
|
3931
3935
|
blankDiv: {
|
|
3932
3936
|
show: callback => {
|
|
3933
|
-
set(state => _objectSpread$
|
|
3937
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3934
3938
|
blankDiv: {
|
|
3935
3939
|
isActive: true,
|
|
3936
3940
|
onClose: callback
|
|
@@ -3938,7 +3942,7 @@ const appApi = (set, get) => ({
|
|
|
3938
3942
|
}));
|
|
3939
3943
|
},
|
|
3940
3944
|
hide: () => {
|
|
3941
|
-
set(state => _objectSpread$
|
|
3945
|
+
set(state => _objectSpread$D(_objectSpread$D({}, state), {}, {
|
|
3942
3946
|
blankDiv: {
|
|
3943
3947
|
isActive: false,
|
|
3944
3948
|
onClose: undefined
|
|
@@ -4055,8 +4059,8 @@ const BlankDiv = () => {
|
|
|
4055
4059
|
}) : null;
|
|
4056
4060
|
};
|
|
4057
4061
|
|
|
4058
|
-
function ownKeys$
|
|
4059
|
-
function _objectSpread$
|
|
4062
|
+
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; }
|
|
4063
|
+
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; }
|
|
4060
4064
|
|
|
4061
4065
|
/**
|
|
4062
4066
|
* The theme's mode: light, or dark.
|
|
@@ -4075,7 +4079,7 @@ function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
4075
4079
|
* @category Theme
|
|
4076
4080
|
*/
|
|
4077
4081
|
|
|
4078
|
-
const withLegacy = (t, rgb) => _objectSpread$
|
|
4082
|
+
const withLegacy = (t, rgb) => _objectSpread$C(_objectSpread$C({}, t), {}, {
|
|
4079
4083
|
background: t.chrome,
|
|
4080
4084
|
text: t.ink,
|
|
4081
4085
|
textSecondary: t.mute,
|
|
@@ -4367,8 +4371,8 @@ const setRCadThemeMode = (mode, options) => useThemeStore.getState().setMode(mod
|
|
|
4367
4371
|
/** Hook returning the canvas label background color (numeric, for measure/dimension labels). */
|
|
4368
4372
|
const useCanvasLabelBg = () => useThemeStore(s => s.colors.canvasLabelBg);
|
|
4369
4373
|
|
|
4370
|
-
function ownKeys$
|
|
4371
|
-
function _objectSpread$
|
|
4374
|
+
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; }
|
|
4375
|
+
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; }
|
|
4372
4376
|
|
|
4373
4377
|
/**
|
|
4374
4378
|
* The colours of what is drawn on the stage: the model, what lies over it, a sketch on its sheet.
|
|
@@ -4380,7 +4384,7 @@ function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
4380
4384
|
* @category Theme
|
|
4381
4385
|
*/
|
|
4382
4386
|
|
|
4383
|
-
const stageOf = (t, rest) => _objectSpread$
|
|
4387
|
+
const stageOf = (t, rest) => _objectSpread$B({
|
|
4384
4388
|
body: t.geoBody,
|
|
4385
4389
|
edge: t.geoEdge,
|
|
4386
4390
|
hover: t.geoHover,
|
|
@@ -5427,7 +5431,7 @@ class ErrorBoundary extends React.Component {
|
|
|
5427
5431
|
}
|
|
5428
5432
|
}
|
|
5429
5433
|
|
|
5430
|
-
function ViewImpl$
|
|
5434
|
+
function ViewImpl$e({
|
|
5431
5435
|
drawingId,
|
|
5432
5436
|
pluginId
|
|
5433
5437
|
}) {
|
|
@@ -5454,17 +5458,17 @@ function ViewImpl$d({
|
|
|
5454
5458
|
*
|
|
5455
5459
|
* @internal
|
|
5456
5460
|
*/
|
|
5457
|
-
function View$
|
|
5461
|
+
function View$o({
|
|
5458
5462
|
drawingId,
|
|
5459
5463
|
pluginId
|
|
5460
5464
|
}) {
|
|
5461
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$
|
|
5465
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$e, {
|
|
5462
5466
|
drawingId: drawingId,
|
|
5463
5467
|
pluginId: pluginId
|
|
5464
5468
|
}));
|
|
5465
5469
|
}
|
|
5466
5470
|
|
|
5467
|
-
function RootImpl$
|
|
5471
|
+
function RootImpl$K({
|
|
5468
5472
|
drawingId,
|
|
5469
5473
|
pluginId
|
|
5470
5474
|
}) {
|
|
@@ -5494,11 +5498,11 @@ function RootImpl$J({
|
|
|
5494
5498
|
*
|
|
5495
5499
|
* @internal
|
|
5496
5500
|
*/
|
|
5497
|
-
const Root$
|
|
5501
|
+
const Root$K = ({
|
|
5498
5502
|
drawingId,
|
|
5499
5503
|
pluginId
|
|
5500
5504
|
}) => {
|
|
5501
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$
|
|
5505
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$K, {
|
|
5502
5506
|
drawingId: drawingId,
|
|
5503
5507
|
pluginId: pluginId
|
|
5504
5508
|
}));
|
|
@@ -5534,7 +5538,7 @@ const Root$J = ({
|
|
|
5534
5538
|
*
|
|
5535
5539
|
* @internal
|
|
5536
5540
|
*/
|
|
5537
|
-
const description$
|
|
5541
|
+
const description$K = {
|
|
5538
5542
|
name: 'Dimensions',
|
|
5539
5543
|
version: '1.0.0',
|
|
5540
5544
|
author: 'Ledas',
|
|
@@ -5545,11 +5549,11 @@ const description$J = {
|
|
|
5545
5549
|
}
|
|
5546
5550
|
};
|
|
5547
5551
|
|
|
5548
|
-
var index$
|
|
5552
|
+
var index$K = /*#__PURE__*/Object.freeze({
|
|
5549
5553
|
__proto__: null,
|
|
5550
|
-
Root: Root$
|
|
5551
|
-
View: View$
|
|
5552
|
-
description: description$
|
|
5554
|
+
Root: Root$K,
|
|
5555
|
+
View: View$o,
|
|
5556
|
+
description: description$K
|
|
5553
5557
|
});
|
|
5554
5558
|
|
|
5555
5559
|
// The names the field and tool icons had as image files (@buerli.io/icons/SVG/<name>.svg), each now
|
|
@@ -5871,7 +5875,7 @@ function useRefsParam(drawingId, objId, memberName) {
|
|
|
5871
5875
|
|
|
5872
5876
|
/**
|
|
5873
5877
|
* Checks if the drawing's active feature is a sketch (`CC_Sketch`): {@link useIsSketchActive}, outside of a component.
|
|
5874
|
-
*
|
|
5878
|
+
*
|
|
5875
5879
|
* @param drawingId The drawing id.
|
|
5876
5880
|
* @returns True if CC_Sketch is active, false otherwise.
|
|
5877
5881
|
*/
|
|
@@ -6620,8 +6624,8 @@ const useEditMode = drawingId => {
|
|
|
6620
6624
|
}, [rootClass, currProdClass]);
|
|
6621
6625
|
};
|
|
6622
6626
|
|
|
6623
|
-
function ownKeys$
|
|
6624
|
-
function _objectSpread$
|
|
6627
|
+
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; }
|
|
6628
|
+
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; }
|
|
6625
6629
|
|
|
6626
6630
|
/**
|
|
6627
6631
|
* The selection scope of a mate picked into an assembly constraint's field: a work coordinate system of an instance.
|
|
@@ -6736,7 +6740,7 @@ function useMateSelection(drawingId, path, csysId) {
|
|
|
6736
6740
|
}));
|
|
6737
6741
|
const handlers = React.useMemo(() => {
|
|
6738
6742
|
if (isSelectable) {
|
|
6739
|
-
return _objectSpread$
|
|
6743
|
+
return _objectSpread$A(_objectSpread$A({}, hHandlers), sHandlers);
|
|
6740
6744
|
}
|
|
6741
6745
|
return {};
|
|
6742
6746
|
}, [isSelectable, hHandlers, sHandlers]);
|
|
@@ -7004,8 +7008,8 @@ const MultiSelect = ({
|
|
|
7004
7008
|
}, children);
|
|
7005
7009
|
};
|
|
7006
7010
|
|
|
7007
|
-
function ownKeys$
|
|
7008
|
-
function _objectSpread$
|
|
7011
|
+
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; }
|
|
7012
|
+
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; }
|
|
7009
7013
|
|
|
7010
7014
|
/**
|
|
7011
7015
|
* The selection scope of a structure object picked into a field: a feature, a sketch, a work plane, an instance.
|
|
@@ -7134,7 +7138,7 @@ function useSelect(drawingId, objId, objectPath) {
|
|
|
7134
7138
|
multiSelect(objId);
|
|
7135
7139
|
return;
|
|
7136
7140
|
}
|
|
7137
|
-
const interactionInfo = sdkjs.createInfo(_objectSpread$
|
|
7141
|
+
const interactionInfo = sdkjs.createInfo(_objectSpread$z({
|
|
7138
7142
|
objectId: objId,
|
|
7139
7143
|
prodRefId: productId
|
|
7140
7144
|
}, objectPath ? {
|
|
@@ -7167,7 +7171,7 @@ function useHover(drawingId, objId, objectPath) {
|
|
|
7167
7171
|
return;
|
|
7168
7172
|
}
|
|
7169
7173
|
stopPropagation == null || stopPropagation();
|
|
7170
|
-
const interactionInfo = sdkjs.createInfo(_objectSpread$
|
|
7174
|
+
const interactionInfo = sdkjs.createInfo(_objectSpread$z({
|
|
7171
7175
|
objectId: objId,
|
|
7172
7176
|
prodRefId: productId
|
|
7173
7177
|
}, objectPath ? {
|
|
@@ -7282,7 +7286,7 @@ function useTreeObjInteraction(drawingId, objId, objectPath) {
|
|
|
7282
7286
|
const isGSelected = useIsGSelected(drawingId, objId);
|
|
7283
7287
|
const isSHovered = useIsSHovered(drawingId, objId);
|
|
7284
7288
|
const isSSelected = useIsSSelected(drawingId, objId);
|
|
7285
|
-
const handlers = React.useMemo(() => _objectSpread$
|
|
7289
|
+
const handlers = React.useMemo(() => _objectSpread$z(_objectSpread$z({}, hHandlers), sHandlers), [hHandlers, sHandlers]);
|
|
7286
7290
|
return React.useMemo(() => {
|
|
7287
7291
|
// 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.
|
|
7288
7292
|
// Thus, we don't want hovered and selected to be true if the object is not selectable.
|
|
@@ -7833,7 +7837,7 @@ const PluginBounds = ({
|
|
|
7833
7837
|
}, children));
|
|
7834
7838
|
};
|
|
7835
7839
|
|
|
7836
|
-
const _excluded$
|
|
7840
|
+
const _excluded$7 = ["children"];
|
|
7837
7841
|
// The tooltip is not laid out while it is closed, so its width is assumed: 250, and 10 off its element.
|
|
7838
7842
|
const TOOLTIP_WIDTH = 260;
|
|
7839
7843
|
const PluginTooltip = _ref => {
|
|
@@ -7841,7 +7845,7 @@ const PluginTooltip = _ref => {
|
|
|
7841
7845
|
let {
|
|
7842
7846
|
children
|
|
7843
7847
|
} = _ref,
|
|
7844
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7848
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
7845
7849
|
const ref = React.useRef(null);
|
|
7846
7850
|
const pluginBoundsRef = (_React$useContext = React.useContext(PBContext)) == null ? void 0 : _React$useContext.pluginBoundsRef;
|
|
7847
7851
|
const [, setStateChanged] = React.useState(0); // We want to trigger a rerender when the tooltip is opened
|
|
@@ -8788,8 +8792,8 @@ const FtPluginValidator = ({
|
|
|
8788
8792
|
}, children);
|
|
8789
8793
|
};
|
|
8790
8794
|
|
|
8791
|
-
function ownKeys$
|
|
8792
|
-
function _objectSpread$
|
|
8795
|
+
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; }
|
|
8796
|
+
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; }
|
|
8793
8797
|
const flipTypesMap = {
|
|
8794
8798
|
[0]: 'X',
|
|
8795
8799
|
[1]: '-X',
|
|
@@ -8829,7 +8833,7 @@ const reorientTypesMap = {
|
|
|
8829
8833
|
* ```
|
|
8830
8834
|
*/
|
|
8831
8835
|
const mateV1 = mateV0 => {
|
|
8832
|
-
return _objectSpread$
|
|
8836
|
+
return _objectSpread$y(_objectSpread$y({}, mateV0), {}, {
|
|
8833
8837
|
/** Which of the coordinate system's axes is the mate's main one, and which way. */
|
|
8834
8838
|
flip: flipTypesMap[mateV0.flip],
|
|
8835
8839
|
/** How far the mate is turned about its main axis, in degrees. */
|
|
@@ -8921,7 +8925,7 @@ function useBoolTypeStore(drawingId, objId) {
|
|
|
8921
8925
|
isChanged
|
|
8922
8926
|
});
|
|
8923
8927
|
}
|
|
8924
|
-
function RootImpl$
|
|
8928
|
+
function RootImpl$J({
|
|
8925
8929
|
drawingId,
|
|
8926
8930
|
pluginId
|
|
8927
8931
|
}) {
|
|
@@ -8976,14 +8980,14 @@ function RootImpl$I({
|
|
|
8976
8980
|
*
|
|
8977
8981
|
* @internal
|
|
8978
8982
|
*/
|
|
8979
|
-
const Root$
|
|
8983
|
+
const Root$J = ({
|
|
8980
8984
|
drawingId,
|
|
8981
8985
|
pluginId
|
|
8982
8986
|
}) => {
|
|
8983
8987
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
8984
8988
|
drawingId: drawingId,
|
|
8985
8989
|
pluginId: pluginId
|
|
8986
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
8990
|
+
}, /*#__PURE__*/React.createElement(RootImpl$J, {
|
|
8987
8991
|
drawingId: drawingId,
|
|
8988
8992
|
pluginId: pluginId
|
|
8989
8993
|
}));
|
|
@@ -9025,7 +9029,7 @@ const Root$I = ({
|
|
|
9025
9029
|
*
|
|
9026
9030
|
* @internal
|
|
9027
9031
|
*/
|
|
9028
|
-
const description$
|
|
9032
|
+
const description$J = {
|
|
9029
9033
|
name: 'Boolean',
|
|
9030
9034
|
version: '1.0.0',
|
|
9031
9035
|
author: 'Ledas',
|
|
@@ -9042,14 +9046,14 @@ const description$I = {
|
|
|
9042
9046
|
}
|
|
9043
9047
|
};
|
|
9044
9048
|
|
|
9045
|
-
var index$
|
|
9049
|
+
var index$J = /*#__PURE__*/Object.freeze({
|
|
9046
9050
|
__proto__: null,
|
|
9047
|
-
Root: Root$
|
|
9048
|
-
description: description$
|
|
9051
|
+
Root: Root$J,
|
|
9052
|
+
description: description$J
|
|
9049
9053
|
});
|
|
9050
9054
|
|
|
9051
|
-
function ownKeys$
|
|
9052
|
-
function _objectSpread$
|
|
9055
|
+
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; }
|
|
9056
|
+
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; }
|
|
9053
9057
|
function parseVal(val) {
|
|
9054
9058
|
const float = Number(val);
|
|
9055
9059
|
if (!isNaN(float)) {
|
|
@@ -9169,13 +9173,13 @@ const PointEditor = ({
|
|
|
9169
9173
|
newVals[i] = val;
|
|
9170
9174
|
}
|
|
9171
9175
|
});
|
|
9172
|
-
return _objectSpread$
|
|
9176
|
+
return _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9173
9177
|
displayVals: newVals
|
|
9174
9178
|
});
|
|
9175
9179
|
})).catch();
|
|
9176
9180
|
} else {
|
|
9177
9181
|
const value = defaults;
|
|
9178
|
-
setDisplayState(state => _objectSpread$
|
|
9182
|
+
setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9179
9183
|
displayVals: [value.x, value.y, value.z]
|
|
9180
9184
|
}));
|
|
9181
9185
|
}
|
|
@@ -9192,7 +9196,7 @@ const PointEditor = ({
|
|
|
9192
9196
|
editMode: false,
|
|
9193
9197
|
displayVals: point !== null ? [point.x, point.y, point.z] : [...state.displayVals]
|
|
9194
9198
|
}));
|
|
9195
|
-
}).catch(() => setDisplayState(state => _objectSpread$
|
|
9199
|
+
}).catch(() => setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9196
9200
|
editMode: false
|
|
9197
9201
|
})));
|
|
9198
9202
|
} else {
|
|
@@ -9220,7 +9224,7 @@ const PointEditor = ({
|
|
|
9220
9224
|
// its three numbers as one field: a click takes it up
|
|
9221
9225
|
React.createElement("div", {
|
|
9222
9226
|
className: "rcad-point",
|
|
9223
|
-
onClick: () => setDisplayState(state => _objectSpread$
|
|
9227
|
+
onClick: () => setDisplayState(state => _objectSpread$x(_objectSpread$x({}, state), {}, {
|
|
9224
9228
|
editMode: true
|
|
9225
9229
|
}))
|
|
9226
9230
|
}, components.map(([value, isExpr, prefix], i) => /*#__PURE__*/React.createElement(PluginTooltip, {
|
|
@@ -9363,8 +9367,8 @@ function useBoolParam(drawingId, objId, memberName) {
|
|
|
9363
9367
|
});
|
|
9364
9368
|
}
|
|
9365
9369
|
|
|
9366
|
-
function ownKeys$
|
|
9367
|
-
function _objectSpread$
|
|
9370
|
+
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; }
|
|
9371
|
+
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; }
|
|
9368
9372
|
var Members$A = /*#__PURE__*/function (Members) {
|
|
9369
9373
|
Members["Type"] = "extrudeType";
|
|
9370
9374
|
Members["Direction"] = "extrudeDir";
|
|
@@ -9424,7 +9428,7 @@ function useExtBoolTypeStore(drawingId, objId) {
|
|
|
9424
9428
|
isChanged
|
|
9425
9429
|
});
|
|
9426
9430
|
}
|
|
9427
|
-
const RootImpl$
|
|
9431
|
+
const RootImpl$I = ({
|
|
9428
9432
|
drawingId,
|
|
9429
9433
|
pluginId
|
|
9430
9434
|
}) => {
|
|
@@ -9471,10 +9475,10 @@ const RootImpl$H = ({
|
|
|
9471
9475
|
cur.setUserValue(next);
|
|
9472
9476
|
if (next !== NEW_BODY$1) capEndsRef.current.setUserValue(true);
|
|
9473
9477
|
}, []);
|
|
9474
|
-
const capEndsProxy = React.useMemo(() => _objectSpread$
|
|
9478
|
+
const capEndsProxy = React.useMemo(() => _objectSpread$w(_objectSpread$w({}, capEnds), {}, {
|
|
9475
9479
|
setUserValue: setCapEndsWrapped
|
|
9476
9480
|
}), [capEnds, setCapEndsWrapped]);
|
|
9477
|
-
const boolTypeProxy = React.useMemo(() => _objectSpread$
|
|
9481
|
+
const boolTypeProxy = React.useMemo(() => _objectSpread$w(_objectSpread$w({}, boolType), {}, {
|
|
9478
9482
|
setUserValue: setBoolTypeWrapped
|
|
9479
9483
|
}), [boolType, setBoolTypeWrapped]);
|
|
9480
9484
|
const sketchId = React.useRef(NOCCID);
|
|
@@ -9622,14 +9626,14 @@ const RootImpl$H = ({
|
|
|
9622
9626
|
*
|
|
9623
9627
|
* @internal
|
|
9624
9628
|
*/
|
|
9625
|
-
const Root$
|
|
9629
|
+
const Root$I = ({
|
|
9626
9630
|
drawingId,
|
|
9627
9631
|
pluginId
|
|
9628
9632
|
}) => {
|
|
9629
9633
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
9630
9634
|
drawingId: drawingId,
|
|
9631
9635
|
pluginId: pluginId
|
|
9632
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
9636
|
+
}, /*#__PURE__*/React.createElement(RootImpl$I, {
|
|
9633
9637
|
drawingId: drawingId,
|
|
9634
9638
|
pluginId: pluginId
|
|
9635
9639
|
}));
|
|
@@ -9920,7 +9924,7 @@ const HUD$1 = ({
|
|
|
9920
9924
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fiber.createPortal(/*#__PURE__*/React.createElement("group", null, children), layer.scene));
|
|
9921
9925
|
};
|
|
9922
9926
|
|
|
9923
|
-
function ViewImpl$
|
|
9927
|
+
function ViewImpl$d({
|
|
9924
9928
|
drawingId,
|
|
9925
9929
|
pluginId
|
|
9926
9930
|
}) {
|
|
@@ -9951,7 +9955,7 @@ function ViewImpl$c({
|
|
|
9951
9955
|
*
|
|
9952
9956
|
* @internal
|
|
9953
9957
|
*/
|
|
9954
|
-
const View$
|
|
9958
|
+
const View$n = ({
|
|
9955
9959
|
drawingId,
|
|
9956
9960
|
pluginId
|
|
9957
9961
|
}) => {
|
|
@@ -9959,7 +9963,7 @@ const View$m = ({
|
|
|
9959
9963
|
drawingId: drawingId,
|
|
9960
9964
|
pluginId: pluginId,
|
|
9961
9965
|
inCanvas: true
|
|
9962
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
9966
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$d, {
|
|
9963
9967
|
drawingId: drawingId,
|
|
9964
9968
|
pluginId: pluginId
|
|
9965
9969
|
}));
|
|
@@ -10006,7 +10010,7 @@ const View$m = ({
|
|
|
10006
10010
|
*
|
|
10007
10011
|
* @internal
|
|
10008
10012
|
*/
|
|
10009
|
-
const description$
|
|
10013
|
+
const description$I = {
|
|
10010
10014
|
name: 'Extrusion',
|
|
10011
10015
|
version: '1.0.0',
|
|
10012
10016
|
author: 'Ledas',
|
|
@@ -10021,11 +10025,11 @@ const description$H = {
|
|
|
10021
10025
|
disableToggleView: true // if true, toggling the visiblity (eye icon) of the View component of this plugin is disabled
|
|
10022
10026
|
};
|
|
10023
10027
|
|
|
10024
|
-
var index$
|
|
10028
|
+
var index$I = /*#__PURE__*/Object.freeze({
|
|
10025
10029
|
__proto__: null,
|
|
10026
|
-
Root: Root$
|
|
10027
|
-
View: View$
|
|
10028
|
-
description: description$
|
|
10030
|
+
Root: Root$I,
|
|
10031
|
+
View: View$n,
|
|
10032
|
+
description: description$I
|
|
10029
10033
|
});
|
|
10030
10034
|
|
|
10031
10035
|
var Members$z = /*#__PURE__*/function (Members) {
|
|
@@ -10054,7 +10058,7 @@ const typesCaptions$4 = {
|
|
|
10054
10058
|
[client.ExtrusionType.SYMMETRIC]: 'Type: Symmetric',
|
|
10055
10059
|
[client.ExtrusionType.UP]: 'Type: Up'
|
|
10056
10060
|
};
|
|
10057
|
-
const RootImpl$
|
|
10061
|
+
const RootImpl$H = ({
|
|
10058
10062
|
drawingId,
|
|
10059
10063
|
pluginId
|
|
10060
10064
|
}) => {
|
|
@@ -10209,20 +10213,20 @@ const RootImpl$G = ({
|
|
|
10209
10213
|
*
|
|
10210
10214
|
* @internal
|
|
10211
10215
|
*/
|
|
10212
|
-
const Root$
|
|
10216
|
+
const Root$H = ({
|
|
10213
10217
|
drawingId,
|
|
10214
10218
|
pluginId
|
|
10215
10219
|
}) => {
|
|
10216
10220
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
10217
10221
|
drawingId: drawingId,
|
|
10218
10222
|
pluginId: pluginId
|
|
10219
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
10223
|
+
}, /*#__PURE__*/React.createElement(RootImpl$H, {
|
|
10220
10224
|
drawingId: drawingId,
|
|
10221
10225
|
pluginId: pluginId
|
|
10222
10226
|
}));
|
|
10223
10227
|
};
|
|
10224
10228
|
|
|
10225
|
-
function ViewImpl$
|
|
10229
|
+
function ViewImpl$c({
|
|
10226
10230
|
drawingId,
|
|
10227
10231
|
pluginId
|
|
10228
10232
|
}) {
|
|
@@ -10253,7 +10257,7 @@ function ViewImpl$b({
|
|
|
10253
10257
|
*
|
|
10254
10258
|
* @internal
|
|
10255
10259
|
*/
|
|
10256
|
-
const View$
|
|
10260
|
+
const View$m = ({
|
|
10257
10261
|
drawingId,
|
|
10258
10262
|
pluginId
|
|
10259
10263
|
}) => {
|
|
@@ -10261,7 +10265,7 @@ const View$l = ({
|
|
|
10261
10265
|
drawingId: drawingId,
|
|
10262
10266
|
pluginId: pluginId,
|
|
10263
10267
|
inCanvas: true
|
|
10264
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
10268
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$c, {
|
|
10265
10269
|
drawingId: drawingId,
|
|
10266
10270
|
pluginId: pluginId
|
|
10267
10271
|
}));
|
|
@@ -10306,7 +10310,7 @@ const View$l = ({
|
|
|
10306
10310
|
*
|
|
10307
10311
|
* @internal
|
|
10308
10312
|
*/
|
|
10309
|
-
const description$
|
|
10313
|
+
const description$H = {
|
|
10310
10314
|
name: 'Twist',
|
|
10311
10315
|
version: '1.0.0',
|
|
10312
10316
|
author: 'Ledas',
|
|
@@ -10321,15 +10325,15 @@ const description$G = {
|
|
|
10321
10325
|
disableToggleView: true // if true, toggling the visiblity (eye icon) of the View component of this plugin is disabled
|
|
10322
10326
|
};
|
|
10323
10327
|
|
|
10324
|
-
var index$
|
|
10328
|
+
var index$H = /*#__PURE__*/Object.freeze({
|
|
10325
10329
|
__proto__: null,
|
|
10326
|
-
Root: Root$
|
|
10327
|
-
View: View$
|
|
10328
|
-
description: description$
|
|
10330
|
+
Root: Root$H,
|
|
10331
|
+
View: View$m,
|
|
10332
|
+
description: description$H
|
|
10329
10333
|
});
|
|
10330
10334
|
|
|
10331
|
-
function ownKeys$
|
|
10332
|
-
function _objectSpread$
|
|
10335
|
+
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; }
|
|
10336
|
+
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; }
|
|
10333
10337
|
var Members$y = /*#__PURE__*/function (Members) {
|
|
10334
10338
|
Members["Axis"] = "references";
|
|
10335
10339
|
Members["Inverted"] = "inverted";
|
|
@@ -10375,7 +10379,7 @@ function useRevBoolTypeStore(drawingId, objId) {
|
|
|
10375
10379
|
isChanged
|
|
10376
10380
|
});
|
|
10377
10381
|
}
|
|
10378
|
-
const RootImpl$
|
|
10382
|
+
const RootImpl$G = ({
|
|
10379
10383
|
drawingId,
|
|
10380
10384
|
pluginId
|
|
10381
10385
|
}) => {
|
|
@@ -10408,7 +10412,7 @@ const RootImpl$F = ({
|
|
|
10408
10412
|
const next = typeof v === 'function' ? v(cur.userValue) : v;
|
|
10409
10413
|
cur.setUserValue(next);
|
|
10410
10414
|
}, []);
|
|
10411
|
-
const boolTypeProxy = React.useMemo(() => _objectSpread$
|
|
10415
|
+
const boolTypeProxy = React.useMemo(() => _objectSpread$v(_objectSpread$v({}, boolType), {}, {
|
|
10412
10416
|
setUserValue: setBoolTypeWrapped
|
|
10413
10417
|
}), [boolType, setBoolTypeWrapped]);
|
|
10414
10418
|
const sketchId = React.useRef(NOCCID);
|
|
@@ -10507,14 +10511,14 @@ const RootImpl$F = ({
|
|
|
10507
10511
|
*
|
|
10508
10512
|
* @internal
|
|
10509
10513
|
*/
|
|
10510
|
-
const Root$
|
|
10514
|
+
const Root$G = ({
|
|
10511
10515
|
drawingId,
|
|
10512
10516
|
pluginId
|
|
10513
10517
|
}) => {
|
|
10514
10518
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
10515
10519
|
drawingId: drawingId,
|
|
10516
10520
|
pluginId: pluginId
|
|
10517
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
10521
|
+
}, /*#__PURE__*/React.createElement(RootImpl$G, {
|
|
10518
10522
|
drawingId: drawingId,
|
|
10519
10523
|
pluginId: pluginId
|
|
10520
10524
|
}));
|
|
@@ -10554,7 +10558,7 @@ const Root$F = ({
|
|
|
10554
10558
|
*
|
|
10555
10559
|
* @internal
|
|
10556
10560
|
*/
|
|
10557
|
-
const description$
|
|
10561
|
+
const description$G = {
|
|
10558
10562
|
name: 'Revolve',
|
|
10559
10563
|
version: '1.0.0',
|
|
10560
10564
|
author: 'Ledas',
|
|
@@ -10563,10 +10567,10 @@ const description$F = {
|
|
|
10563
10567
|
global: false
|
|
10564
10568
|
};
|
|
10565
10569
|
|
|
10566
|
-
var index$
|
|
10570
|
+
var index$G = /*#__PURE__*/Object.freeze({
|
|
10567
10571
|
__proto__: null,
|
|
10568
|
-
Root: Root$
|
|
10569
|
-
description: description$
|
|
10572
|
+
Root: Root$G,
|
|
10573
|
+
description: description$G
|
|
10570
10574
|
});
|
|
10571
10575
|
|
|
10572
10576
|
/**
|
|
@@ -10636,7 +10640,7 @@ var Members$x = /*#__PURE__*/function (Members) {
|
|
|
10636
10640
|
Members["Length"] = "length";
|
|
10637
10641
|
return Members;
|
|
10638
10642
|
}(Members$x || {});
|
|
10639
|
-
function RootImpl$
|
|
10643
|
+
function RootImpl$F({
|
|
10640
10644
|
drawingId,
|
|
10641
10645
|
pluginId
|
|
10642
10646
|
}) {
|
|
@@ -10716,14 +10720,14 @@ function RootImpl$E({
|
|
|
10716
10720
|
*
|
|
10717
10721
|
* @internal
|
|
10718
10722
|
*/
|
|
10719
|
-
const Root$
|
|
10723
|
+
const Root$F = ({
|
|
10720
10724
|
drawingId,
|
|
10721
10725
|
pluginId
|
|
10722
10726
|
}) => {
|
|
10723
10727
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
10724
10728
|
drawingId: drawingId,
|
|
10725
10729
|
pluginId: pluginId
|
|
10726
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
10730
|
+
}, /*#__PURE__*/React.createElement(RootImpl$F, {
|
|
10727
10731
|
drawingId: drawingId,
|
|
10728
10732
|
pluginId: pluginId
|
|
10729
10733
|
}));
|
|
@@ -10760,7 +10764,7 @@ const Root$E = ({
|
|
|
10760
10764
|
*
|
|
10761
10765
|
* @internal
|
|
10762
10766
|
*/
|
|
10763
|
-
const description$
|
|
10767
|
+
const description$F = {
|
|
10764
10768
|
name: 'Box',
|
|
10765
10769
|
version: '1.0.0',
|
|
10766
10770
|
author: 'Ledas',
|
|
@@ -10769,10 +10773,10 @@ const description$E = {
|
|
|
10769
10773
|
global: false
|
|
10770
10774
|
};
|
|
10771
10775
|
|
|
10772
|
-
var index$
|
|
10776
|
+
var index$F = /*#__PURE__*/Object.freeze({
|
|
10773
10777
|
__proto__: null,
|
|
10774
|
-
Root: Root$
|
|
10775
|
-
description: description$
|
|
10778
|
+
Root: Root$F,
|
|
10779
|
+
description: description$F
|
|
10776
10780
|
});
|
|
10777
10781
|
|
|
10778
10782
|
var Members$w = /*#__PURE__*/function (Members) {
|
|
@@ -10780,7 +10784,7 @@ var Members$w = /*#__PURE__*/function (Members) {
|
|
|
10780
10784
|
Members["Radius"] = "radius";
|
|
10781
10785
|
return Members;
|
|
10782
10786
|
}(Members$w || {});
|
|
10783
|
-
function RootImpl$
|
|
10787
|
+
function RootImpl$E({
|
|
10784
10788
|
drawingId,
|
|
10785
10789
|
pluginId
|
|
10786
10790
|
}) {
|
|
@@ -10834,14 +10838,14 @@ function RootImpl$D({
|
|
|
10834
10838
|
*
|
|
10835
10839
|
* @internal
|
|
10836
10840
|
*/
|
|
10837
|
-
const Root$
|
|
10841
|
+
const Root$E = ({
|
|
10838
10842
|
drawingId,
|
|
10839
10843
|
pluginId
|
|
10840
10844
|
}) => {
|
|
10841
10845
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
10842
10846
|
drawingId: drawingId,
|
|
10843
10847
|
pluginId: pluginId
|
|
10844
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
10848
|
+
}, /*#__PURE__*/React.createElement(RootImpl$E, {
|
|
10845
10849
|
drawingId: drawingId,
|
|
10846
10850
|
pluginId: pluginId
|
|
10847
10851
|
}));
|
|
@@ -10879,7 +10883,7 @@ const Root$D = ({
|
|
|
10879
10883
|
*
|
|
10880
10884
|
* @internal
|
|
10881
10885
|
*/
|
|
10882
|
-
const description$
|
|
10886
|
+
const description$E = {
|
|
10883
10887
|
name: 'Sphere',
|
|
10884
10888
|
version: '1.0.0',
|
|
10885
10889
|
author: 'Ledas',
|
|
@@ -10888,10 +10892,10 @@ const description$D = {
|
|
|
10888
10892
|
global: false
|
|
10889
10893
|
};
|
|
10890
10894
|
|
|
10891
|
-
var index$
|
|
10895
|
+
var index$E = /*#__PURE__*/Object.freeze({
|
|
10892
10896
|
__proto__: null,
|
|
10893
|
-
Root: Root$
|
|
10894
|
-
description: description$
|
|
10897
|
+
Root: Root$E,
|
|
10898
|
+
description: description$E
|
|
10895
10899
|
});
|
|
10896
10900
|
|
|
10897
10901
|
var Members$v = /*#__PURE__*/function (Members) {
|
|
@@ -10900,7 +10904,7 @@ var Members$v = /*#__PURE__*/function (Members) {
|
|
|
10900
10904
|
Members["Height"] = "height";
|
|
10901
10905
|
return Members;
|
|
10902
10906
|
}(Members$v || {});
|
|
10903
|
-
function RootImpl$
|
|
10907
|
+
function RootImpl$D({
|
|
10904
10908
|
drawingId,
|
|
10905
10909
|
pluginId
|
|
10906
10910
|
}) {
|
|
@@ -10967,14 +10971,14 @@ function RootImpl$C({
|
|
|
10967
10971
|
*
|
|
10968
10972
|
* @internal
|
|
10969
10973
|
*/
|
|
10970
|
-
const Root$
|
|
10974
|
+
const Root$D = ({
|
|
10971
10975
|
drawingId,
|
|
10972
10976
|
pluginId
|
|
10973
10977
|
}) => {
|
|
10974
10978
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
10975
10979
|
drawingId: drawingId,
|
|
10976
10980
|
pluginId: pluginId
|
|
10977
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
10981
|
+
}, /*#__PURE__*/React.createElement(RootImpl$D, {
|
|
10978
10982
|
drawingId: drawingId,
|
|
10979
10983
|
pluginId: pluginId
|
|
10980
10984
|
}));
|
|
@@ -11012,7 +11016,7 @@ const Root$C = ({
|
|
|
11012
11016
|
*
|
|
11013
11017
|
* @internal
|
|
11014
11018
|
*/
|
|
11015
|
-
const description$
|
|
11019
|
+
const description$D = {
|
|
11016
11020
|
name: 'Cylinder',
|
|
11017
11021
|
version: '1.0.0',
|
|
11018
11022
|
author: 'Ledas',
|
|
@@ -11021,17 +11025,17 @@ const description$C = {
|
|
|
11021
11025
|
global: false
|
|
11022
11026
|
};
|
|
11023
11027
|
|
|
11024
|
-
var index$
|
|
11028
|
+
var index$D = /*#__PURE__*/Object.freeze({
|
|
11025
11029
|
__proto__: null,
|
|
11026
|
-
Root: Root$
|
|
11027
|
-
description: description$
|
|
11030
|
+
Root: Root$D,
|
|
11031
|
+
description: description$D
|
|
11028
11032
|
});
|
|
11029
11033
|
|
|
11030
11034
|
var Members$u = /*#__PURE__*/function (Members) {
|
|
11031
11035
|
Members["References"] = "references";
|
|
11032
11036
|
return Members;
|
|
11033
11037
|
}(Members$u || {});
|
|
11034
|
-
const RootImpl$
|
|
11038
|
+
const RootImpl$C = ({
|
|
11035
11039
|
drawingId,
|
|
11036
11040
|
pluginId
|
|
11037
11041
|
}) => {
|
|
@@ -11088,14 +11092,14 @@ const RootImpl$B = ({
|
|
|
11088
11092
|
*
|
|
11089
11093
|
* @internal
|
|
11090
11094
|
*/
|
|
11091
|
-
const Root$
|
|
11095
|
+
const Root$C = ({
|
|
11092
11096
|
drawingId,
|
|
11093
11097
|
pluginId
|
|
11094
11098
|
}) => {
|
|
11095
11099
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11096
11100
|
drawingId: drawingId,
|
|
11097
11101
|
pluginId: pluginId
|
|
11098
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11102
|
+
}, /*#__PURE__*/React.createElement(RootImpl$C, {
|
|
11099
11103
|
drawingId: drawingId,
|
|
11100
11104
|
pluginId: pluginId
|
|
11101
11105
|
}));
|
|
@@ -11203,7 +11207,7 @@ const CompositeCurveObj = ({
|
|
|
11203
11207
|
})));
|
|
11204
11208
|
};
|
|
11205
11209
|
|
|
11206
|
-
const ViewImpl$
|
|
11210
|
+
const ViewImpl$b = ({
|
|
11207
11211
|
drawingId,
|
|
11208
11212
|
pluginId
|
|
11209
11213
|
}) => {
|
|
@@ -11241,7 +11245,7 @@ const ViewImpl$a = ({
|
|
|
11241
11245
|
*
|
|
11242
11246
|
* @internal
|
|
11243
11247
|
*/
|
|
11244
|
-
const View$
|
|
11248
|
+
const View$l = ({
|
|
11245
11249
|
drawingId,
|
|
11246
11250
|
pluginId
|
|
11247
11251
|
}) => {
|
|
@@ -11249,7 +11253,7 @@ const View$k = ({
|
|
|
11249
11253
|
drawingId: drawingId,
|
|
11250
11254
|
pluginId: pluginId,
|
|
11251
11255
|
inCanvas: true
|
|
11252
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
11256
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$b, {
|
|
11253
11257
|
drawingId: drawingId,
|
|
11254
11258
|
pluginId: pluginId
|
|
11255
11259
|
}));
|
|
@@ -11287,7 +11291,7 @@ const View$k = ({
|
|
|
11287
11291
|
*
|
|
11288
11292
|
* @internal
|
|
11289
11293
|
*/
|
|
11290
|
-
const description$
|
|
11294
|
+
const description$C = {
|
|
11291
11295
|
name: 'CompositeCurve',
|
|
11292
11296
|
version: '1.0.0',
|
|
11293
11297
|
author: 'AWV',
|
|
@@ -11296,11 +11300,11 @@ const description$B = {
|
|
|
11296
11300
|
global: false
|
|
11297
11301
|
};
|
|
11298
11302
|
|
|
11299
|
-
var index$
|
|
11303
|
+
var index$C = /*#__PURE__*/Object.freeze({
|
|
11300
11304
|
__proto__: null,
|
|
11301
|
-
Root: Root$
|
|
11302
|
-
View: View$
|
|
11303
|
-
description: description$
|
|
11305
|
+
Root: Root$C,
|
|
11306
|
+
View: View$l,
|
|
11307
|
+
description: description$C
|
|
11304
11308
|
});
|
|
11305
11309
|
|
|
11306
11310
|
var Members$t = /*#__PURE__*/function (Members) {
|
|
@@ -11310,7 +11314,7 @@ var Members$t = /*#__PURE__*/function (Members) {
|
|
|
11310
11314
|
Members["Height"] = "height";
|
|
11311
11315
|
return Members;
|
|
11312
11316
|
}(Members$t || {});
|
|
11313
|
-
function RootImpl$
|
|
11317
|
+
function RootImpl$B({
|
|
11314
11318
|
drawingId,
|
|
11315
11319
|
pluginId
|
|
11316
11320
|
}) {
|
|
@@ -11390,14 +11394,14 @@ function RootImpl$A({
|
|
|
11390
11394
|
*
|
|
11391
11395
|
* @internal
|
|
11392
11396
|
*/
|
|
11393
|
-
const Root$
|
|
11397
|
+
const Root$B = ({
|
|
11394
11398
|
drawingId,
|
|
11395
11399
|
pluginId
|
|
11396
11400
|
}) => {
|
|
11397
11401
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11398
11402
|
drawingId: drawingId,
|
|
11399
11403
|
pluginId: pluginId
|
|
11400
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11404
|
+
}, /*#__PURE__*/React.createElement(RootImpl$B, {
|
|
11401
11405
|
drawingId: drawingId,
|
|
11402
11406
|
pluginId: pluginId
|
|
11403
11407
|
}));
|
|
@@ -11436,7 +11440,7 @@ const Root$A = ({
|
|
|
11436
11440
|
*
|
|
11437
11441
|
* @internal
|
|
11438
11442
|
*/
|
|
11439
|
-
const description$
|
|
11443
|
+
const description$B = {
|
|
11440
11444
|
name: 'Cone',
|
|
11441
11445
|
version: '1.0.0',
|
|
11442
11446
|
author: 'Ledas',
|
|
@@ -11445,10 +11449,10 @@ const description$A = {
|
|
|
11445
11449
|
global: false
|
|
11446
11450
|
};
|
|
11447
11451
|
|
|
11448
|
-
var index$
|
|
11452
|
+
var index$B = /*#__PURE__*/Object.freeze({
|
|
11449
11453
|
__proto__: null,
|
|
11450
|
-
Root: Root$
|
|
11451
|
-
description: description$
|
|
11454
|
+
Root: Root$B,
|
|
11455
|
+
description: description$B
|
|
11452
11456
|
});
|
|
11453
11457
|
|
|
11454
11458
|
var Members$s = /*#__PURE__*/function (Members) {
|
|
@@ -11456,7 +11460,7 @@ var Members$s = /*#__PURE__*/function (Members) {
|
|
|
11456
11460
|
Members["Radius"] = "radius";
|
|
11457
11461
|
return Members;
|
|
11458
11462
|
}(Members$s || {});
|
|
11459
|
-
const RootImpl$
|
|
11463
|
+
const RootImpl$A = ({
|
|
11460
11464
|
drawingId,
|
|
11461
11465
|
pluginId
|
|
11462
11466
|
}) => {
|
|
@@ -11500,14 +11504,14 @@ const RootImpl$z = ({
|
|
|
11500
11504
|
*
|
|
11501
11505
|
* @internal
|
|
11502
11506
|
*/
|
|
11503
|
-
const Root$
|
|
11507
|
+
const Root$A = ({
|
|
11504
11508
|
drawingId,
|
|
11505
11509
|
pluginId
|
|
11506
11510
|
}) => {
|
|
11507
11511
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11508
11512
|
drawingId: drawingId,
|
|
11509
11513
|
pluginId: pluginId
|
|
11510
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11514
|
+
}, /*#__PURE__*/React.createElement(RootImpl$A, {
|
|
11511
11515
|
drawingId: drawingId,
|
|
11512
11516
|
pluginId: pluginId
|
|
11513
11517
|
}));
|
|
@@ -11545,7 +11549,7 @@ const Root$z = ({
|
|
|
11545
11549
|
*
|
|
11546
11550
|
* @internal
|
|
11547
11551
|
*/
|
|
11548
|
-
const description$
|
|
11552
|
+
const description$A = {
|
|
11549
11553
|
name: 'Fillet',
|
|
11550
11554
|
version: '1.0.0',
|
|
11551
11555
|
author: 'Ledas',
|
|
@@ -11554,10 +11558,10 @@ const description$z = {
|
|
|
11554
11558
|
global: false
|
|
11555
11559
|
};
|
|
11556
11560
|
|
|
11557
|
-
var index$
|
|
11561
|
+
var index$A = /*#__PURE__*/Object.freeze({
|
|
11558
11562
|
__proto__: null,
|
|
11559
|
-
Root: Root$
|
|
11560
|
-
description: description$
|
|
11563
|
+
Root: Root$A,
|
|
11564
|
+
description: description$A
|
|
11561
11565
|
});
|
|
11562
11566
|
|
|
11563
11567
|
var Members$r = /*#__PURE__*/function (Members) {
|
|
@@ -11578,7 +11582,7 @@ const typesCaptions$3 = {
|
|
|
11578
11582
|
[client.ChamferType.EQUAL_DISTANCE]: 'Type: Equal distance',
|
|
11579
11583
|
[client.ChamferType.TWO_DISTANCES]: 'Type: Two distances'
|
|
11580
11584
|
};
|
|
11581
|
-
const RootImpl$
|
|
11585
|
+
const RootImpl$z = ({
|
|
11582
11586
|
drawingId,
|
|
11583
11587
|
pluginId
|
|
11584
11588
|
}) => {
|
|
@@ -11661,14 +11665,14 @@ const RootImpl$y = ({
|
|
|
11661
11665
|
*
|
|
11662
11666
|
* @internal
|
|
11663
11667
|
*/
|
|
11664
|
-
const Root$
|
|
11668
|
+
const Root$z = ({
|
|
11665
11669
|
drawingId,
|
|
11666
11670
|
pluginId
|
|
11667
11671
|
}) => {
|
|
11668
11672
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11669
11673
|
drawingId: drawingId,
|
|
11670
11674
|
pluginId: pluginId
|
|
11671
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11675
|
+
}, /*#__PURE__*/React.createElement(RootImpl$z, {
|
|
11672
11676
|
drawingId: drawingId,
|
|
11673
11677
|
pluginId: pluginId
|
|
11674
11678
|
}));
|
|
@@ -11706,7 +11710,7 @@ const Root$y = ({
|
|
|
11706
11710
|
*
|
|
11707
11711
|
* @internal
|
|
11708
11712
|
*/
|
|
11709
|
-
const description$
|
|
11713
|
+
const description$z = {
|
|
11710
11714
|
name: 'Chamfer',
|
|
11711
11715
|
version: '1.0.0',
|
|
11712
11716
|
author: 'Ledas',
|
|
@@ -11715,10 +11719,10 @@ const description$y = {
|
|
|
11715
11719
|
global: false
|
|
11716
11720
|
};
|
|
11717
11721
|
|
|
11718
|
-
var index$
|
|
11722
|
+
var index$z = /*#__PURE__*/Object.freeze({
|
|
11719
11723
|
__proto__: null,
|
|
11720
|
-
Root: Root$
|
|
11721
|
-
description: description$
|
|
11724
|
+
Root: Root$z,
|
|
11725
|
+
description: description$z
|
|
11722
11726
|
});
|
|
11723
11727
|
|
|
11724
11728
|
var Members$q = /*#__PURE__*/function (Members) {
|
|
@@ -11728,7 +11732,7 @@ var Members$q = /*#__PURE__*/function (Members) {
|
|
|
11728
11732
|
Members["Inverted"] = "inverted";
|
|
11729
11733
|
return Members;
|
|
11730
11734
|
}(Members$q || {});
|
|
11731
|
-
function RootImpl$
|
|
11735
|
+
function RootImpl$y({
|
|
11732
11736
|
drawingId,
|
|
11733
11737
|
pluginId
|
|
11734
11738
|
}) {
|
|
@@ -11790,14 +11794,14 @@ function RootImpl$x({
|
|
|
11790
11794
|
*
|
|
11791
11795
|
* @internal
|
|
11792
11796
|
*/
|
|
11793
|
-
const Root$
|
|
11797
|
+
const Root$y = ({
|
|
11794
11798
|
drawingId,
|
|
11795
11799
|
pluginId
|
|
11796
11800
|
}) => {
|
|
11797
11801
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11798
11802
|
drawingId: drawingId,
|
|
11799
11803
|
pluginId: pluginId
|
|
11800
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11804
|
+
}, /*#__PURE__*/React.createElement(RootImpl$y, {
|
|
11801
11805
|
drawingId: drawingId,
|
|
11802
11806
|
pluginId: pluginId
|
|
11803
11807
|
}));
|
|
@@ -11835,7 +11839,7 @@ const Root$x = ({
|
|
|
11835
11839
|
*
|
|
11836
11840
|
* @internal
|
|
11837
11841
|
*/
|
|
11838
|
-
const description$
|
|
11842
|
+
const description$y = {
|
|
11839
11843
|
name: 'Translate',
|
|
11840
11844
|
version: '1.0.0',
|
|
11841
11845
|
author: 'Ledas',
|
|
@@ -11845,10 +11849,10 @@ const description$x = {
|
|
|
11845
11849
|
initialState: {}
|
|
11846
11850
|
};
|
|
11847
11851
|
|
|
11848
|
-
var index$
|
|
11852
|
+
var index$y = /*#__PURE__*/Object.freeze({
|
|
11849
11853
|
__proto__: null,
|
|
11850
|
-
Root: Root$
|
|
11851
|
-
description: description$
|
|
11854
|
+
Root: Root$y,
|
|
11855
|
+
description: description$y
|
|
11852
11856
|
});
|
|
11853
11857
|
|
|
11854
11858
|
var Members$p = /*#__PURE__*/function (Members) {
|
|
@@ -11858,7 +11862,7 @@ var Members$p = /*#__PURE__*/function (Members) {
|
|
|
11858
11862
|
Members["Inverted"] = "inverted";
|
|
11859
11863
|
return Members;
|
|
11860
11864
|
}(Members$p || {});
|
|
11861
|
-
function RootImpl$
|
|
11865
|
+
function RootImpl$x({
|
|
11862
11866
|
drawingId,
|
|
11863
11867
|
pluginId
|
|
11864
11868
|
}) {
|
|
@@ -11922,14 +11926,14 @@ function RootImpl$w({
|
|
|
11922
11926
|
*
|
|
11923
11927
|
* @internal
|
|
11924
11928
|
*/
|
|
11925
|
-
const Root$
|
|
11929
|
+
const Root$x = ({
|
|
11926
11930
|
drawingId,
|
|
11927
11931
|
pluginId
|
|
11928
11932
|
}) => {
|
|
11929
11933
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
11930
11934
|
drawingId: drawingId,
|
|
11931
11935
|
pluginId: pluginId
|
|
11932
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
11936
|
+
}, /*#__PURE__*/React.createElement(RootImpl$x, {
|
|
11933
11937
|
drawingId: drawingId,
|
|
11934
11938
|
pluginId: pluginId
|
|
11935
11939
|
}));
|
|
@@ -11967,7 +11971,7 @@ const Root$w = ({
|
|
|
11967
11971
|
*
|
|
11968
11972
|
* @internal
|
|
11969
11973
|
*/
|
|
11970
|
-
const description$
|
|
11974
|
+
const description$x = {
|
|
11971
11975
|
name: 'Rotate',
|
|
11972
11976
|
version: '1.0.0',
|
|
11973
11977
|
author: 'Ledas',
|
|
@@ -11977,10 +11981,10 @@ const description$w = {
|
|
|
11977
11981
|
initialState: {}
|
|
11978
11982
|
};
|
|
11979
11983
|
|
|
11980
|
-
var index$
|
|
11984
|
+
var index$x = /*#__PURE__*/Object.freeze({
|
|
11981
11985
|
__proto__: null,
|
|
11982
|
-
Root: Root$
|
|
11983
|
-
description: description$
|
|
11986
|
+
Root: Root$x,
|
|
11987
|
+
description: description$x
|
|
11984
11988
|
});
|
|
11985
11989
|
|
|
11986
11990
|
var Members$o = /*#__PURE__*/function (Members) {
|
|
@@ -11988,7 +11992,7 @@ var Members$o = /*#__PURE__*/function (Members) {
|
|
|
11988
11992
|
Members["CsysReferences"] = "references";
|
|
11989
11993
|
return Members;
|
|
11990
11994
|
}(Members$o || {});
|
|
11991
|
-
function RootImpl$
|
|
11995
|
+
function RootImpl$w({
|
|
11992
11996
|
drawingId,
|
|
11993
11997
|
pluginId
|
|
11994
11998
|
}) {
|
|
@@ -12046,14 +12050,14 @@ function RootImpl$v({
|
|
|
12046
12050
|
*
|
|
12047
12051
|
* @internal
|
|
12048
12052
|
*/
|
|
12049
|
-
const Root$
|
|
12053
|
+
const Root$w = ({
|
|
12050
12054
|
drawingId,
|
|
12051
12055
|
pluginId
|
|
12052
12056
|
}) => {
|
|
12053
12057
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12054
12058
|
drawingId: drawingId,
|
|
12055
12059
|
pluginId: pluginId
|
|
12056
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12060
|
+
}, /*#__PURE__*/React.createElement(RootImpl$w, {
|
|
12057
12061
|
drawingId: drawingId,
|
|
12058
12062
|
pluginId: pluginId
|
|
12059
12063
|
}));
|
|
@@ -12091,7 +12095,7 @@ const Root$v = ({
|
|
|
12091
12095
|
*
|
|
12092
12096
|
* @internal
|
|
12093
12097
|
*/
|
|
12094
|
-
const description$
|
|
12098
|
+
const description$w = {
|
|
12095
12099
|
name: 'TransformByCsys',
|
|
12096
12100
|
version: '1.0.0',
|
|
12097
12101
|
author: 'Ledas',
|
|
@@ -12101,10 +12105,10 @@ const description$v = {
|
|
|
12101
12105
|
initialState: {}
|
|
12102
12106
|
};
|
|
12103
12107
|
|
|
12104
|
-
var index$
|
|
12108
|
+
var index$w = /*#__PURE__*/Object.freeze({
|
|
12105
12109
|
__proto__: null,
|
|
12106
|
-
Root: Root$
|
|
12107
|
-
description: description$
|
|
12110
|
+
Root: Root$w,
|
|
12111
|
+
description: description$w
|
|
12108
12112
|
});
|
|
12109
12113
|
|
|
12110
12114
|
var Members$n = /*#__PURE__*/function (Members) {
|
|
@@ -12113,7 +12117,7 @@ var Members$n = /*#__PURE__*/function (Members) {
|
|
|
12113
12117
|
Members["WorkPlaneReference"] = "workPlaneReference";
|
|
12114
12118
|
return Members;
|
|
12115
12119
|
}(Members$n || {});
|
|
12116
|
-
function RootImpl$
|
|
12120
|
+
function RootImpl$v({
|
|
12117
12121
|
drawingId,
|
|
12118
12122
|
pluginId
|
|
12119
12123
|
}) {
|
|
@@ -12166,14 +12170,14 @@ function RootImpl$u({
|
|
|
12166
12170
|
*
|
|
12167
12171
|
* @internal
|
|
12168
12172
|
*/
|
|
12169
|
-
const Root$
|
|
12173
|
+
const Root$v = ({
|
|
12170
12174
|
drawingId,
|
|
12171
12175
|
pluginId
|
|
12172
12176
|
}) => {
|
|
12173
12177
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12174
12178
|
drawingId: drawingId,
|
|
12175
12179
|
pluginId: pluginId
|
|
12176
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12180
|
+
}, /*#__PURE__*/React.createElement(RootImpl$v, {
|
|
12177
12181
|
drawingId: drawingId,
|
|
12178
12182
|
pluginId: pluginId
|
|
12179
12183
|
}));
|
|
@@ -12210,7 +12214,7 @@ const Root$u = ({
|
|
|
12210
12214
|
*
|
|
12211
12215
|
* @internal
|
|
12212
12216
|
*/
|
|
12213
|
-
const description$
|
|
12217
|
+
const description$v = {
|
|
12214
12218
|
name: 'Slice',
|
|
12215
12219
|
version: '1.0.0',
|
|
12216
12220
|
author: 'Ledas',
|
|
@@ -12220,10 +12224,10 @@ const description$u = {
|
|
|
12220
12224
|
initialState: {}
|
|
12221
12225
|
};
|
|
12222
12226
|
|
|
12223
|
-
var index$
|
|
12227
|
+
var index$v = /*#__PURE__*/Object.freeze({
|
|
12224
12228
|
__proto__: null,
|
|
12225
|
-
Root: Root$
|
|
12226
|
-
description: description$
|
|
12229
|
+
Root: Root$v,
|
|
12230
|
+
description: description$v
|
|
12227
12231
|
});
|
|
12228
12232
|
|
|
12229
12233
|
var Members$m = /*#__PURE__*/function (Members) {
|
|
@@ -12232,7 +12236,7 @@ var Members$m = /*#__PURE__*/function (Members) {
|
|
|
12232
12236
|
Members["SheetBody"] = "sheetBody";
|
|
12233
12237
|
return Members;
|
|
12234
12238
|
}(Members$m || {});
|
|
12235
|
-
function RootImpl$
|
|
12239
|
+
function RootImpl$u({
|
|
12236
12240
|
drawingId,
|
|
12237
12241
|
pluginId
|
|
12238
12242
|
}) {
|
|
@@ -12288,14 +12292,14 @@ function RootImpl$t({
|
|
|
12288
12292
|
*
|
|
12289
12293
|
* @internal
|
|
12290
12294
|
*/
|
|
12291
|
-
const Root$
|
|
12295
|
+
const Root$u = ({
|
|
12292
12296
|
drawingId,
|
|
12293
12297
|
pluginId
|
|
12294
12298
|
}) => {
|
|
12295
12299
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12296
12300
|
drawingId: drawingId,
|
|
12297
12301
|
pluginId: pluginId
|
|
12298
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12302
|
+
}, /*#__PURE__*/React.createElement(RootImpl$u, {
|
|
12299
12303
|
drawingId: drawingId,
|
|
12300
12304
|
pluginId: pluginId
|
|
12301
12305
|
}));
|
|
@@ -12333,7 +12337,7 @@ const Root$t = ({
|
|
|
12333
12337
|
*
|
|
12334
12338
|
* @internal
|
|
12335
12339
|
*/
|
|
12336
|
-
const description$
|
|
12340
|
+
const description$u = {
|
|
12337
12341
|
name: 'SliceBySheet',
|
|
12338
12342
|
version: '1.0.0',
|
|
12339
12343
|
author: 'AWV',
|
|
@@ -12343,10 +12347,10 @@ const description$t = {
|
|
|
12343
12347
|
initialState: {}
|
|
12344
12348
|
};
|
|
12345
12349
|
|
|
12346
|
-
var index$
|
|
12350
|
+
var index$u = /*#__PURE__*/Object.freeze({
|
|
12347
12351
|
__proto__: null,
|
|
12348
|
-
Root: Root$
|
|
12349
|
-
description: description$
|
|
12352
|
+
Root: Root$u,
|
|
12353
|
+
description: description$u
|
|
12350
12354
|
});
|
|
12351
12355
|
|
|
12352
12356
|
var Members$l = /*#__PURE__*/function (Members) {
|
|
@@ -12362,7 +12366,7 @@ var Members$l = /*#__PURE__*/function (Members) {
|
|
|
12362
12366
|
Members["Merged"] = "merged";
|
|
12363
12367
|
return Members;
|
|
12364
12368
|
}(Members$l || {});
|
|
12365
|
-
function RootImpl$
|
|
12369
|
+
function RootImpl$t({
|
|
12366
12370
|
drawingId,
|
|
12367
12371
|
pluginId
|
|
12368
12372
|
}) {
|
|
@@ -12487,14 +12491,14 @@ function RootImpl$s({
|
|
|
12487
12491
|
*
|
|
12488
12492
|
* @internal
|
|
12489
12493
|
*/
|
|
12490
|
-
const Root$
|
|
12494
|
+
const Root$t = ({
|
|
12491
12495
|
drawingId,
|
|
12492
12496
|
pluginId
|
|
12493
12497
|
}) => {
|
|
12494
12498
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12495
12499
|
drawingId: drawingId,
|
|
12496
12500
|
pluginId: pluginId
|
|
12497
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12501
|
+
}, /*#__PURE__*/React.createElement(RootImpl$t, {
|
|
12498
12502
|
drawingId: drawingId,
|
|
12499
12503
|
pluginId: pluginId
|
|
12500
12504
|
}));
|
|
@@ -12533,7 +12537,7 @@ const Root$s = ({
|
|
|
12533
12537
|
*
|
|
12534
12538
|
* @internal
|
|
12535
12539
|
*/
|
|
12536
|
-
const description$
|
|
12540
|
+
const description$t = {
|
|
12537
12541
|
name: 'Linear pattern',
|
|
12538
12542
|
version: '1.0.0',
|
|
12539
12543
|
author: 'Ledas',
|
|
@@ -12543,10 +12547,10 @@ const description$s = {
|
|
|
12543
12547
|
initialState: {}
|
|
12544
12548
|
};
|
|
12545
12549
|
|
|
12546
|
-
var index$
|
|
12550
|
+
var index$t = /*#__PURE__*/Object.freeze({
|
|
12547
12551
|
__proto__: null,
|
|
12548
|
-
Root: Root$
|
|
12549
|
-
description: description$
|
|
12552
|
+
Root: Root$t,
|
|
12553
|
+
description: description$t
|
|
12550
12554
|
});
|
|
12551
12555
|
|
|
12552
12556
|
var Members$k = /*#__PURE__*/function (Members) {
|
|
@@ -12558,7 +12562,7 @@ var Members$k = /*#__PURE__*/function (Members) {
|
|
|
12558
12562
|
Members["Merged"] = "merged";
|
|
12559
12563
|
return Members;
|
|
12560
12564
|
}(Members$k || {});
|
|
12561
|
-
function RootImpl$
|
|
12565
|
+
function RootImpl$s({
|
|
12562
12566
|
drawingId,
|
|
12563
12567
|
pluginId
|
|
12564
12568
|
}) {
|
|
@@ -12641,14 +12645,14 @@ function RootImpl$r({
|
|
|
12641
12645
|
*
|
|
12642
12646
|
* @internal
|
|
12643
12647
|
*/
|
|
12644
|
-
const Root$
|
|
12648
|
+
const Root$s = ({
|
|
12645
12649
|
drawingId,
|
|
12646
12650
|
pluginId
|
|
12647
12651
|
}) => {
|
|
12648
12652
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12649
12653
|
drawingId: drawingId,
|
|
12650
12654
|
pluginId: pluginId
|
|
12651
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12655
|
+
}, /*#__PURE__*/React.createElement(RootImpl$s, {
|
|
12652
12656
|
drawingId: drawingId,
|
|
12653
12657
|
pluginId: pluginId
|
|
12654
12658
|
}));
|
|
@@ -12686,7 +12690,7 @@ const Root$r = ({
|
|
|
12686
12690
|
*
|
|
12687
12691
|
* @internal
|
|
12688
12692
|
*/
|
|
12689
|
-
const description$
|
|
12693
|
+
const description$s = {
|
|
12690
12694
|
name: 'Circular pattern',
|
|
12691
12695
|
version: '1.0.0',
|
|
12692
12696
|
author: 'Ledas',
|
|
@@ -12696,10 +12700,10 @@ const description$r = {
|
|
|
12696
12700
|
initialState: {}
|
|
12697
12701
|
};
|
|
12698
12702
|
|
|
12699
|
-
var index$
|
|
12703
|
+
var index$s = /*#__PURE__*/Object.freeze({
|
|
12700
12704
|
__proto__: null,
|
|
12701
|
-
Root: Root$
|
|
12702
|
-
description: description$
|
|
12705
|
+
Root: Root$s,
|
|
12706
|
+
description: description$s
|
|
12703
12707
|
});
|
|
12704
12708
|
|
|
12705
12709
|
var Members$j = /*#__PURE__*/function (Members) {
|
|
@@ -12707,7 +12711,7 @@ var Members$j = /*#__PURE__*/function (Members) {
|
|
|
12707
12711
|
Members["FaceReferences"] = "references";
|
|
12708
12712
|
return Members;
|
|
12709
12713
|
}(Members$j || {});
|
|
12710
|
-
const RootImpl$
|
|
12714
|
+
const RootImpl$r = ({
|
|
12711
12715
|
drawingId,
|
|
12712
12716
|
pluginId
|
|
12713
12717
|
}) => {
|
|
@@ -12753,14 +12757,14 @@ const RootImpl$q = ({
|
|
|
12753
12757
|
*
|
|
12754
12758
|
* @internal
|
|
12755
12759
|
*/
|
|
12756
|
-
const Root$
|
|
12760
|
+
const Root$r = ({
|
|
12757
12761
|
drawingId,
|
|
12758
12762
|
pluginId
|
|
12759
12763
|
}) => {
|
|
12760
12764
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
12761
12765
|
drawingId: drawingId,
|
|
12762
12766
|
pluginId: pluginId
|
|
12763
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
12767
|
+
}, /*#__PURE__*/React.createElement(RootImpl$r, {
|
|
12764
12768
|
drawingId: drawingId,
|
|
12765
12769
|
pluginId: pluginId
|
|
12766
12770
|
}));
|
|
@@ -12797,7 +12801,7 @@ const Root$q = ({
|
|
|
12797
12801
|
*
|
|
12798
12802
|
* @internal
|
|
12799
12803
|
*/
|
|
12800
|
-
const description$
|
|
12804
|
+
const description$r = {
|
|
12801
12805
|
name: 'Mirror',
|
|
12802
12806
|
version: '1.0.0',
|
|
12803
12807
|
author: 'AWV',
|
|
@@ -12807,10 +12811,10 @@ const description$q = {
|
|
|
12807
12811
|
initialState: {}
|
|
12808
12812
|
};
|
|
12809
12813
|
|
|
12810
|
-
var index$
|
|
12814
|
+
var index$r = /*#__PURE__*/Object.freeze({
|
|
12811
12815
|
__proto__: null,
|
|
12812
|
-
Root: Root$
|
|
12813
|
-
description: description$
|
|
12816
|
+
Root: Root$r,
|
|
12817
|
+
description: description$r
|
|
12814
12818
|
});
|
|
12815
12819
|
|
|
12816
12820
|
const defaultNumberOfDigits = 3;
|
|
@@ -12888,10 +12892,10 @@ const Digits = ({
|
|
|
12888
12892
|
|
|
12889
12893
|
const vectorToString = (point, digits) => `${point.toArray().map(n => sdkjs.MathUtils.round(n, digits)).join(', ')}`;
|
|
12890
12894
|
|
|
12891
|
-
function ownKeys$
|
|
12892
|
-
function _objectSpread$
|
|
12895
|
+
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; }
|
|
12896
|
+
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; }
|
|
12893
12897
|
const Excluded = [client.ScgGraphicType.LOOP].concat(sdkjs.EntityTypes);
|
|
12894
|
-
const RootImpl$
|
|
12898
|
+
const RootImpl$q = ({
|
|
12895
12899
|
drawingId,
|
|
12896
12900
|
pluginId
|
|
12897
12901
|
}) => {
|
|
@@ -12958,7 +12962,7 @@ const Output = ({
|
|
|
12958
12962
|
const {
|
|
12959
12963
|
value
|
|
12960
12964
|
} = res.measureData;
|
|
12961
|
-
return _objectSpread$
|
|
12965
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12962
12966
|
asString: sdkjs.MathUtils.round(value, digits)
|
|
12963
12967
|
});
|
|
12964
12968
|
}
|
|
@@ -12968,13 +12972,13 @@ const Output = ({
|
|
|
12968
12972
|
const {
|
|
12969
12973
|
value
|
|
12970
12974
|
} = res.measureData;
|
|
12971
|
-
return _objectSpread$
|
|
12975
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12972
12976
|
asString: vectorToString(value, digits)
|
|
12973
12977
|
});
|
|
12974
12978
|
}
|
|
12975
12979
|
}
|
|
12976
12980
|
}
|
|
12977
|
-
return _objectSpread$
|
|
12981
|
+
return _objectSpread$u(_objectSpread$u({}, res), {}, {
|
|
12978
12982
|
asString: ''
|
|
12979
12983
|
});
|
|
12980
12984
|
});
|
|
@@ -13016,11 +13020,11 @@ const Output = ({
|
|
|
13016
13020
|
*
|
|
13017
13021
|
* @internal
|
|
13018
13022
|
*/
|
|
13019
|
-
const Root$
|
|
13023
|
+
const Root$q = ({
|
|
13020
13024
|
drawingId,
|
|
13021
13025
|
pluginId
|
|
13022
13026
|
}) => {
|
|
13023
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$
|
|
13027
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$q, {
|
|
13024
13028
|
drawingId: drawingId,
|
|
13025
13029
|
pluginId: pluginId
|
|
13026
13030
|
}));
|
|
@@ -13216,7 +13220,7 @@ const Vector = ({
|
|
|
13216
13220
|
}));
|
|
13217
13221
|
};
|
|
13218
13222
|
|
|
13219
|
-
function ViewImpl$
|
|
13223
|
+
function ViewImpl$a({
|
|
13220
13224
|
drawingId,
|
|
13221
13225
|
pluginId
|
|
13222
13226
|
}) {
|
|
@@ -13293,11 +13297,11 @@ function ViewImpl$9({
|
|
|
13293
13297
|
*
|
|
13294
13298
|
* @internal
|
|
13295
13299
|
*/
|
|
13296
|
-
const View$
|
|
13300
|
+
const View$k = ({
|
|
13297
13301
|
drawingId,
|
|
13298
13302
|
pluginId
|
|
13299
13303
|
}) => {
|
|
13300
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$
|
|
13304
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$a, {
|
|
13301
13305
|
drawingId: drawingId,
|
|
13302
13306
|
pluginId: pluginId
|
|
13303
13307
|
}));
|
|
@@ -13333,7 +13337,7 @@ const View$j = ({
|
|
|
13333
13337
|
*
|
|
13334
13338
|
* @internal
|
|
13335
13339
|
*/
|
|
13336
|
-
const description$
|
|
13340
|
+
const description$q = {
|
|
13337
13341
|
name: 'Measure',
|
|
13338
13342
|
version: '0.0.1',
|
|
13339
13343
|
author: 'AWV',
|
|
@@ -13345,11 +13349,11 @@ const description$p = {
|
|
|
13345
13349
|
}
|
|
13346
13350
|
};
|
|
13347
13351
|
|
|
13348
|
-
var index$
|
|
13352
|
+
var index$q = /*#__PURE__*/Object.freeze({
|
|
13349
13353
|
__proto__: null,
|
|
13350
|
-
Root: Root$
|
|
13351
|
-
View: View$
|
|
13352
|
-
description: description$
|
|
13354
|
+
Root: Root$q,
|
|
13355
|
+
View: View$k,
|
|
13356
|
+
description: description$q
|
|
13353
13357
|
});
|
|
13354
13358
|
|
|
13355
13359
|
// TODO use it as key in object
|
|
@@ -13413,7 +13417,7 @@ const deltaTolerance = 4;
|
|
|
13413
13417
|
*
|
|
13414
13418
|
* @internal
|
|
13415
13419
|
*/
|
|
13416
|
-
const description$
|
|
13420
|
+
const description$p = {
|
|
13417
13421
|
name: 'Sketcher',
|
|
13418
13422
|
version: '1.0.0',
|
|
13419
13423
|
author: 'Ledas',
|
|
@@ -13462,14 +13466,14 @@ const description$o = {
|
|
|
13462
13466
|
|
|
13463
13467
|
function getSketchState(drawingId, pluginId) {
|
|
13464
13468
|
const plugin = sdkjs.getPlugin(drawingId, pluginId);
|
|
13465
|
-
if (!plugin || plugin.name !== description$
|
|
13469
|
+
if (!plugin || plugin.name !== description$p.name) {
|
|
13466
13470
|
window.console.error('Wrong arguments are passed into getSketchState.');
|
|
13467
13471
|
}
|
|
13468
13472
|
return plugin.state;
|
|
13469
13473
|
}
|
|
13470
13474
|
|
|
13471
|
-
function ownKeys$
|
|
13472
|
-
function _objectSpread$
|
|
13475
|
+
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; }
|
|
13476
|
+
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; }
|
|
13473
13477
|
function CreateAngle(drawingId, pluginId) {
|
|
13474
13478
|
const {
|
|
13475
13479
|
set
|
|
@@ -13510,8 +13514,8 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13510
13514
|
set(state_ => {
|
|
13511
13515
|
const tmpAngularDimension = state_.tmpObjects[tmpDimensionId];
|
|
13512
13516
|
return {
|
|
13513
|
-
tmpObjects: _objectSpread$
|
|
13514
|
-
[tmpDimensionId]: _objectSpread$
|
|
13517
|
+
tmpObjects: _objectSpread$t(_objectSpread$t({}, state_.tmpObjects), {}, {
|
|
13518
|
+
[tmpDimensionId]: _objectSpread$t(_objectSpread$t({}, tmpAngularDimension), params)
|
|
13515
13519
|
})
|
|
13516
13520
|
};
|
|
13517
13521
|
});
|
|
@@ -13537,7 +13541,7 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13537
13541
|
const dir1 = linesInfo.dir1;
|
|
13538
13542
|
const center = linesInfo.center;
|
|
13539
13543
|
const dimPos = center.clone().addScaledVector(dir0.clone().add(dir1).normalize(), 10);
|
|
13540
|
-
const tmpAngularDimension = _objectSpread$
|
|
13544
|
+
const tmpAngularDimension = _objectSpread$t(_objectSpread$t({
|
|
13541
13545
|
class: TmpObjClasses.AngularDimension,
|
|
13542
13546
|
id: tmpDimensionId
|
|
13543
13547
|
}, linesInfo), {}, {
|
|
@@ -13623,8 +13627,8 @@ function CreateAngle(drawingId, pluginId) {
|
|
|
13623
13627
|
};
|
|
13624
13628
|
}
|
|
13625
13629
|
|
|
13626
|
-
function ownKeys$
|
|
13627
|
-
function _objectSpread$
|
|
13630
|
+
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; }
|
|
13631
|
+
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; }
|
|
13628
13632
|
let timerId;
|
|
13629
13633
|
const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
13630
13634
|
const {
|
|
@@ -13648,7 +13652,7 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13648
13652
|
const highlightedNonGeom = highlighted.filter(id => id !== hoveredId && (is2DConstraint(tree[id]) || isSketchRegion(tree[id])));
|
|
13649
13653
|
return {
|
|
13650
13654
|
highlighted: [...highlightedNonGeom, hoveredId, ...entities],
|
|
13651
|
-
interaction: _objectSpread$
|
|
13655
|
+
interaction: _objectSpread$s(_objectSpread$s({}, state_.interaction), {}, {
|
|
13652
13656
|
cycle,
|
|
13653
13657
|
objects
|
|
13654
13658
|
})
|
|
@@ -13657,12 +13661,12 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13657
13661
|
} else {
|
|
13658
13662
|
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);
|
|
13659
13663
|
const state = getSketchState(drawingId, pluginId);
|
|
13660
|
-
const constraintsToGeometry = _objectSpread$
|
|
13664
|
+
const constraintsToGeometry = _objectSpread$s({}, state.interaction.constraintsToGeometry);
|
|
13661
13665
|
linked.forEach(id => {
|
|
13662
13666
|
constraintsToGeometry[id] = hoveredId;
|
|
13663
13667
|
});
|
|
13664
13668
|
const prevHoveredId = state.interaction.objects[state.interaction.cycle % state.interaction.objects.length];
|
|
13665
|
-
const lastHoveredPos = _objectSpread$
|
|
13669
|
+
const lastHoveredPos = _objectSpread$s({}, state.interaction.lastHoveredPos);
|
|
13666
13670
|
if (!hoverPos) {
|
|
13667
13671
|
linked.forEach(id => delete lastHoveredPos[id]);
|
|
13668
13672
|
} else if (hoveredId !== prevHoveredId) {
|
|
@@ -13690,7 +13694,7 @@ const setHoverState = (drawingId, pluginId, cycle, objects, hoverPos) => {
|
|
|
13690
13694
|
const highlightedNonGeom = highlighted.filter(id => is2DConstraint(tree[id]) || isSketchRegion(tree[id]));
|
|
13691
13695
|
return {
|
|
13692
13696
|
highlighted: highlightedNonGeom,
|
|
13693
|
-
interaction: _objectSpread$
|
|
13697
|
+
interaction: _objectSpread$s(_objectSpread$s({}, state_.interaction), {}, {
|
|
13694
13698
|
cycle,
|
|
13695
13699
|
objects
|
|
13696
13700
|
})
|
|
@@ -14503,8 +14507,8 @@ const snapDraggedPoints = (diff, drawingId) => {
|
|
|
14503
14507
|
return snapResult;
|
|
14504
14508
|
};
|
|
14505
14509
|
|
|
14506
|
-
function ownKeys$
|
|
14507
|
-
function _objectSpread$
|
|
14510
|
+
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; }
|
|
14511
|
+
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; }
|
|
14508
14512
|
|
|
14509
14513
|
// Artificial delay in 16 ms.
|
|
14510
14514
|
const artifDelay = 16;
|
|
@@ -14702,7 +14706,7 @@ function Drag(drawingId, pluginId, camControls) {
|
|
|
14702
14706
|
name: HandlersList.DRAG,
|
|
14703
14707
|
filter,
|
|
14704
14708
|
onDeactivate,
|
|
14705
|
-
pointerHandlers: _objectSpread$
|
|
14709
|
+
pointerHandlers: _objectSpread$r({
|
|
14706
14710
|
onPointerDown,
|
|
14707
14711
|
onPointerUp,
|
|
14708
14712
|
onPointerMove
|
|
@@ -14714,8 +14718,8 @@ function Drag(drawingId, pluginId, camControls) {
|
|
|
14714
14718
|
};
|
|
14715
14719
|
}
|
|
14716
14720
|
|
|
14717
|
-
function ownKeys$
|
|
14718
|
-
function _objectSpread$
|
|
14721
|
+
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; }
|
|
14722
|
+
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; }
|
|
14719
14723
|
function DrawPoint(drawingId, pluginId) {
|
|
14720
14724
|
const {
|
|
14721
14725
|
set
|
|
@@ -14760,7 +14764,7 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14760
14764
|
}).then(() => {
|
|
14761
14765
|
// Remove the old temporary point once a permanent one is created in its place
|
|
14762
14766
|
set(state => {
|
|
14763
|
-
const tmpObjects_ = _objectSpread$
|
|
14767
|
+
const tmpObjects_ = _objectSpread$q({}, state.tmpObjects);
|
|
14764
14768
|
delete tmpObjects_[curPointId];
|
|
14765
14769
|
return {
|
|
14766
14770
|
tmpObjects: tmpObjects_
|
|
@@ -14773,8 +14777,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14773
14777
|
set(state => {
|
|
14774
14778
|
const tmpPoint = state.tmpObjects[curPointId];
|
|
14775
14779
|
return {
|
|
14776
|
-
tmpObjects: _objectSpread$
|
|
14777
|
-
[tmpPointId]: _objectSpread$
|
|
14780
|
+
tmpObjects: _objectSpread$q(_objectSpread$q({}, state.tmpObjects), {}, {
|
|
14781
|
+
[tmpPointId]: _objectSpread$q(_objectSpread$q({}, tmpPoint), {}, {
|
|
14778
14782
|
id: tmpPointId,
|
|
14779
14783
|
position: tmpPoint.position.clone()
|
|
14780
14784
|
})
|
|
@@ -14791,8 +14795,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14791
14795
|
const tmpPoint = state.tmpObjects[tmpPointId];
|
|
14792
14796
|
return {
|
|
14793
14797
|
mousePos,
|
|
14794
|
-
tmpObjects: _objectSpread$
|
|
14795
|
-
[tmpPointId]: _objectSpread$
|
|
14798
|
+
tmpObjects: _objectSpread$q(_objectSpread$q({}, state.tmpObjects), {}, {
|
|
14799
|
+
[tmpPointId]: _objectSpread$q(_objectSpread$q({}, tmpPoint), {}, {
|
|
14796
14800
|
position: mousePos
|
|
14797
14801
|
})
|
|
14798
14802
|
})
|
|
@@ -14812,8 +14816,8 @@ function DrawPoint(drawingId, pluginId) {
|
|
|
14812
14816
|
};
|
|
14813
14817
|
}
|
|
14814
14818
|
|
|
14815
|
-
function ownKeys$
|
|
14816
|
-
function _objectSpread$
|
|
14819
|
+
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; }
|
|
14820
|
+
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; }
|
|
14817
14821
|
function DrawLine(drawingId, pluginId) {
|
|
14818
14822
|
// Global hooks:
|
|
14819
14823
|
const {
|
|
@@ -14890,7 +14894,7 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14890
14894
|
isConstruction: e.ctrlKey
|
|
14891
14895
|
};
|
|
14892
14896
|
return {
|
|
14893
|
-
tmpObjects: _objectSpread$
|
|
14897
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14894
14898
|
[tmpStartP.id]: tmpStartP,
|
|
14895
14899
|
[tmpLine.id]: tmpLine
|
|
14896
14900
|
})
|
|
@@ -14911,7 +14915,7 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14911
14915
|
promise.then(() => {
|
|
14912
14916
|
// Remove the old temporary line and its points once a permanent one is created in its place
|
|
14913
14917
|
set(state => {
|
|
14914
|
-
const tmpObjects_ = _objectSpread$
|
|
14918
|
+
const tmpObjects_ = _objectSpread$p({}, state.tmpObjects);
|
|
14915
14919
|
delete tmpObjects_[curStartPId];
|
|
14916
14920
|
delete tmpObjects_[curEndPId];
|
|
14917
14921
|
delete tmpObjects_[curLineId];
|
|
@@ -14931,16 +14935,16 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14931
14935
|
const tmpEndP = state.tmpObjects[curEndPId];
|
|
14932
14936
|
const tmpLine = state.tmpObjects[curLineId];
|
|
14933
14937
|
return {
|
|
14934
|
-
tmpObjects: _objectSpread$
|
|
14935
|
-
[tmpStartPId]: _objectSpread$
|
|
14938
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14939
|
+
[tmpStartPId]: _objectSpread$p(_objectSpread$p({}, tmpStartP), {}, {
|
|
14936
14940
|
id: tmpStartPId,
|
|
14937
14941
|
position: tmpEndP.position.clone()
|
|
14938
14942
|
}),
|
|
14939
|
-
[tmpEndPId]: _objectSpread$
|
|
14943
|
+
[tmpEndPId]: _objectSpread$p(_objectSpread$p({}, tmpEndP), {}, {
|
|
14940
14944
|
id: tmpEndPId,
|
|
14941
14945
|
position: tmpEndP.position.clone()
|
|
14942
14946
|
}),
|
|
14943
|
-
[tmpLineId]: _objectSpread$
|
|
14947
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, tmpLine), {}, {
|
|
14944
14948
|
id: tmpLineId,
|
|
14945
14949
|
startPId: tmpStartPId,
|
|
14946
14950
|
endPId: tmpEndPId
|
|
@@ -14959,8 +14963,8 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14959
14963
|
const tmpEndP = state.tmpObjects[tmpEndPId];
|
|
14960
14964
|
return {
|
|
14961
14965
|
mousePos,
|
|
14962
|
-
tmpObjects: _objectSpread$
|
|
14963
|
-
[tmpEndPId]: _objectSpread$
|
|
14966
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14967
|
+
[tmpEndPId]: _objectSpread$p(_objectSpread$p({}, tmpEndP), {}, {
|
|
14964
14968
|
position: mousePos
|
|
14965
14969
|
})
|
|
14966
14970
|
})
|
|
@@ -14970,9 +14974,9 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14970
14974
|
};
|
|
14971
14975
|
const keydown = e => {
|
|
14972
14976
|
if (firstPointIsSet && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
14973
|
-
set(state => _objectSpread$
|
|
14974
|
-
tmpObjects: _objectSpread$
|
|
14975
|
-
[tmpLineId]: _objectSpread$
|
|
14977
|
+
set(state => _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
14978
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14979
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, state.tmpObjects[tmpLineId]), {}, {
|
|
14976
14980
|
isConstruction: true
|
|
14977
14981
|
})
|
|
14978
14982
|
})
|
|
@@ -14981,9 +14985,9 @@ function DrawLine(drawingId, pluginId) {
|
|
|
14981
14985
|
};
|
|
14982
14986
|
const keyup = e => {
|
|
14983
14987
|
if (firstPointIsSet && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
14984
|
-
set(state => _objectSpread$
|
|
14985
|
-
tmpObjects: _objectSpread$
|
|
14986
|
-
[tmpLineId]: _objectSpread$
|
|
14988
|
+
set(state => _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
14989
|
+
tmpObjects: _objectSpread$p(_objectSpread$p({}, state.tmpObjects), {}, {
|
|
14990
|
+
[tmpLineId]: _objectSpread$p(_objectSpread$p({}, state.tmpObjects[tmpLineId]), {}, {
|
|
14987
14991
|
isConstruction: false
|
|
14988
14992
|
})
|
|
14989
14993
|
})
|
|
@@ -15007,8 +15011,8 @@ function DrawLine(drawingId, pluginId) {
|
|
|
15007
15011
|
};
|
|
15008
15012
|
}
|
|
15009
15013
|
|
|
15010
|
-
function ownKeys$
|
|
15011
|
-
function _objectSpread$
|
|
15014
|
+
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; }
|
|
15015
|
+
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; }
|
|
15012
15016
|
function DrawRectangle(drawingId, pluginId, rectType) {
|
|
15013
15017
|
const {
|
|
15014
15018
|
set
|
|
@@ -15085,7 +15089,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15085
15089
|
isCentered: rectType === HandlersList.DRAWRECTCENTER,
|
|
15086
15090
|
isConstruction: e.ctrlKey
|
|
15087
15091
|
};
|
|
15088
|
-
const newTmpObjects = _objectSpread$
|
|
15092
|
+
const newTmpObjects = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15089
15093
|
[tmpRect.id]: tmpRect
|
|
15090
15094
|
});
|
|
15091
15095
|
delete newTmpObjects[tmpPointId];
|
|
@@ -15119,7 +15123,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15119
15123
|
}).then(() => {
|
|
15120
15124
|
// Remove the old temporary rectangle once a permanent one is created in its place
|
|
15121
15125
|
set(state => {
|
|
15122
|
-
const tmpObjects = _objectSpread$
|
|
15126
|
+
const tmpObjects = _objectSpread$o({}, state.tmpObjects);
|
|
15123
15127
|
delete tmpObjects[curRectId];
|
|
15124
15128
|
return {
|
|
15125
15129
|
tmpObjects
|
|
@@ -15137,7 +15141,7 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15137
15141
|
position: tmpRect_.end.clone()
|
|
15138
15142
|
};
|
|
15139
15143
|
return {
|
|
15140
|
-
tmpObjects: _objectSpread$
|
|
15144
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15141
15145
|
[tmpPoint.id]: tmpPoint
|
|
15142
15146
|
})
|
|
15143
15147
|
};
|
|
@@ -15153,19 +15157,19 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15153
15157
|
let newTmpObjs = null;
|
|
15154
15158
|
if (additionIndex === 0) {
|
|
15155
15159
|
const tmpPoint = state.tmpObjects[tmpPointId];
|
|
15156
|
-
newTmpObjs = _objectSpread$
|
|
15157
|
-
[tmpPointId]: _objectSpread$
|
|
15160
|
+
newTmpObjs = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15161
|
+
[tmpPointId]: _objectSpread$o(_objectSpread$o({}, tmpPoint), {}, {
|
|
15158
15162
|
position: snappedPos
|
|
15159
15163
|
})
|
|
15160
15164
|
});
|
|
15161
15165
|
} else {
|
|
15162
|
-
newTmpObjs = _objectSpread$
|
|
15163
|
-
[tmpRectId]: _objectSpread$
|
|
15166
|
+
newTmpObjs = _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15167
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15164
15168
|
end: new THREE__namespace.Vector3(snappedPos.x, snappedPos.y, 0)
|
|
15165
15169
|
})
|
|
15166
15170
|
});
|
|
15167
15171
|
}
|
|
15168
|
-
return _objectSpread$
|
|
15172
|
+
return _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15169
15173
|
tmpObjects: newTmpObjs,
|
|
15170
15174
|
mousePos: snappedPos
|
|
15171
15175
|
});
|
|
@@ -15176,9 +15180,9 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15176
15180
|
const shiftUp = e.code === 'ShiftLeft' || e.code === 'ShiftRight';
|
|
15177
15181
|
const ctrlUp = e.code === 'ControlLeft' || e.code === 'ControlRight';
|
|
15178
15182
|
if (additionIndex > 0 && (shiftUp || ctrlUp)) {
|
|
15179
|
-
set(state => _objectSpread$
|
|
15180
|
-
tmpObjects: _objectSpread$
|
|
15181
|
-
[tmpRectId]: _objectSpread$
|
|
15183
|
+
set(state => _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15184
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15185
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15182
15186
|
isSquare: shiftUp ? true : state.tmpObjects[tmpRectId].isSquare,
|
|
15183
15187
|
isConstruction: ctrlUp ? true : state.tmpObjects[tmpRectId].isConstruction
|
|
15184
15188
|
})
|
|
@@ -15190,9 +15194,9 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15190
15194
|
const shiftUp = e.code === 'ShiftLeft' || e.code === 'ShiftRight';
|
|
15191
15195
|
const ctrlUp = e.code === 'ControlLeft' || e.code === 'ControlRight';
|
|
15192
15196
|
if (additionIndex > 0 && (shiftUp || ctrlUp)) {
|
|
15193
|
-
set(state => _objectSpread$
|
|
15194
|
-
tmpObjects: _objectSpread$
|
|
15195
|
-
[tmpRectId]: _objectSpread$
|
|
15197
|
+
set(state => _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
15198
|
+
tmpObjects: _objectSpread$o(_objectSpread$o({}, state.tmpObjects), {}, {
|
|
15199
|
+
[tmpRectId]: _objectSpread$o(_objectSpread$o({}, state.tmpObjects[tmpRectId]), {}, {
|
|
15196
15200
|
isSquare: shiftUp ? false : state.tmpObjects[tmpRectId].isSquare,
|
|
15197
15201
|
isConstruction: ctrlUp ? false : state.tmpObjects[tmpRectId].isConstruction
|
|
15198
15202
|
})
|
|
@@ -15217,8 +15221,8 @@ function DrawRectangle(drawingId, pluginId, rectType) {
|
|
|
15217
15221
|
};
|
|
15218
15222
|
}
|
|
15219
15223
|
|
|
15220
|
-
function ownKeys$
|
|
15221
|
-
function _objectSpread$
|
|
15224
|
+
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; }
|
|
15225
|
+
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; }
|
|
15222
15226
|
function DrawArc(drawingId, pluginId, arcType) {
|
|
15223
15227
|
// Global hooks:
|
|
15224
15228
|
const {
|
|
@@ -15268,7 +15272,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15268
15272
|
} else if (additionIndex === 1 || additionIndex === 2 && arcType === HandlersList.DRAWARCTANGENT) {
|
|
15269
15273
|
additionIndex = 0;
|
|
15270
15274
|
set(state => {
|
|
15271
|
-
const tmpStartP = _objectSpread$
|
|
15275
|
+
const tmpStartP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpStartPId]), {}, {
|
|
15272
15276
|
position: lastMousePos.clone()
|
|
15273
15277
|
});
|
|
15274
15278
|
return {
|
|
@@ -15281,20 +15285,20 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15281
15285
|
additionIndex = 1;
|
|
15282
15286
|
set(state => {
|
|
15283
15287
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
15284
|
-
const tmpEndP = _objectSpread$
|
|
15288
|
+
const tmpEndP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpEndPId]), {}, {
|
|
15285
15289
|
position: lastMousePos.clone()
|
|
15286
15290
|
});
|
|
15287
15291
|
const centerPos = calculateCenterPoint(tmpStartP.position, lastMousePos, lastMousePos);
|
|
15288
|
-
const tmpCenterP = _objectSpread$
|
|
15292
|
+
const tmpCenterP = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpCenterPId]), {}, {
|
|
15289
15293
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15290
15294
|
});
|
|
15291
|
-
const tmpArc = _objectSpread$
|
|
15295
|
+
const tmpArc = _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15292
15296
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15293
15297
|
drawAsLine: centerPos === undefined,
|
|
15294
15298
|
clockwise: false
|
|
15295
15299
|
});
|
|
15296
15300
|
return {
|
|
15297
|
-
tmpObjects: _objectSpread$
|
|
15301
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15298
15302
|
[tmpEndP.id]: tmpEndP,
|
|
15299
15303
|
[tmpCenterP.id]: tmpCenterP,
|
|
15300
15304
|
[tmpArc.id]: tmpArc
|
|
@@ -15405,7 +15409,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15405
15409
|
isConstruction: e.ctrlKey
|
|
15406
15410
|
};
|
|
15407
15411
|
return {
|
|
15408
|
-
tmpObjects: _objectSpread$
|
|
15412
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15409
15413
|
[tmpEndP.id]: tmpEndP,
|
|
15410
15414
|
[tmpCenterP.id]: tmpCenterP,
|
|
15411
15415
|
[tmpArc.id]: tmpArc
|
|
@@ -15435,7 +15439,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15435
15439
|
isConstruction: e.ctrlKey
|
|
15436
15440
|
};
|
|
15437
15441
|
return {
|
|
15438
|
-
tmpObjects: _objectSpread$
|
|
15442
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15439
15443
|
[tmpCenterP.id]: tmpCenterP,
|
|
15440
15444
|
[tmpArc.id]: tmpArc
|
|
15441
15445
|
})
|
|
@@ -15460,7 +15464,7 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15460
15464
|
promise.then(() => {
|
|
15461
15465
|
// Remove the old temporary arc and its points once a permanent one is created in its place
|
|
15462
15466
|
set(state => {
|
|
15463
|
-
const tmpObjects_ = _objectSpread$
|
|
15467
|
+
const tmpObjects_ = _objectSpread$n({}, state.tmpObjects);
|
|
15464
15468
|
delete tmpObjects_[curStartPId];
|
|
15465
15469
|
delete tmpObjects_[curEndPId];
|
|
15466
15470
|
delete tmpObjects_[curCenterPId];
|
|
@@ -15490,20 +15494,20 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15490
15494
|
const tmpCenterP = state.tmpObjects[curCenterPId];
|
|
15491
15495
|
const tmpArcP = state.tmpObjects[curArcId];
|
|
15492
15496
|
return {
|
|
15493
|
-
tmpObjects: _objectSpread$
|
|
15494
|
-
[tmpStartPId]: _objectSpread$
|
|
15497
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15498
|
+
[tmpStartPId]: _objectSpread$n(_objectSpread$n({}, tmpStartP), {}, {
|
|
15495
15499
|
id: tmpStartPId,
|
|
15496
15500
|
position: tmpEndP.position.clone()
|
|
15497
15501
|
}),
|
|
15498
|
-
[tmpEndPId]: _objectSpread$
|
|
15502
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15499
15503
|
id: tmpEndPId,
|
|
15500
15504
|
position: tmpEndP.position.clone()
|
|
15501
15505
|
}),
|
|
15502
|
-
[tmpCenterPId]: _objectSpread$
|
|
15506
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15503
15507
|
id: tmpCenterPId,
|
|
15504
15508
|
position: tmpEndP.position.clone()
|
|
15505
15509
|
}),
|
|
15506
|
-
[tmpArcId]: _objectSpread$
|
|
15510
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArcP), {}, {
|
|
15507
15511
|
id: tmpArcId,
|
|
15508
15512
|
startPId: tmpStartPId,
|
|
15509
15513
|
endPId: tmpEndPId,
|
|
@@ -15525,8 +15529,8 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15525
15529
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
15526
15530
|
return {
|
|
15527
15531
|
mousePos: lastMousePos,
|
|
15528
|
-
tmpObjects: _objectSpread$
|
|
15529
|
-
[tmpStartPId]: _objectSpread$
|
|
15532
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15533
|
+
[tmpStartPId]: _objectSpread$n(_objectSpread$n({}, tmpStartP), {}, {
|
|
15530
15534
|
position: lastMousePos.clone()
|
|
15531
15535
|
})
|
|
15532
15536
|
})
|
|
@@ -15539,14 +15543,14 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15539
15543
|
const centerPos = calculateCenterPoint(tmpStartP.position, lastMousePos, lastMousePos);
|
|
15540
15544
|
return {
|
|
15541
15545
|
mousePos: lastMousePos,
|
|
15542
|
-
tmpObjects: _objectSpread$
|
|
15543
|
-
[tmpEndPId]: _objectSpread$
|
|
15546
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15547
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15544
15548
|
position: lastMousePos.clone()
|
|
15545
15549
|
}),
|
|
15546
|
-
[tmpCenterPId]: _objectSpread$
|
|
15550
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15547
15551
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15548
15552
|
}),
|
|
15549
|
-
[tmpArcId]: _objectSpread$
|
|
15553
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArc), {}, {
|
|
15550
15554
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15551
15555
|
drawAsLine: centerPos === undefined,
|
|
15552
15556
|
clockwise: false
|
|
@@ -15561,14 +15565,14 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15561
15565
|
const centerPos = calculateCenterPoint(tmpStartP.position, tmpEndP.position, lastMousePos);
|
|
15562
15566
|
return {
|
|
15563
15567
|
mousePos: lastMousePos,
|
|
15564
|
-
tmpObjects: _objectSpread$
|
|
15565
|
-
[tmpEndPId]: _objectSpread$
|
|
15568
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15569
|
+
[tmpEndPId]: _objectSpread$n(_objectSpread$n({}, tmpEndP), {}, {
|
|
15566
15570
|
position: arcType === HandlersList.DRAWARCTANGENT ? lastMousePos.clone() : tmpEndP.position
|
|
15567
15571
|
}),
|
|
15568
|
-
[tmpCenterPId]: _objectSpread$
|
|
15572
|
+
[tmpCenterPId]: _objectSpread$n(_objectSpread$n({}, tmpCenterP), {}, {
|
|
15569
15573
|
position: centerPos ? centerPos : lastMousePos.clone()
|
|
15570
15574
|
}),
|
|
15571
|
-
[tmpArcId]: _objectSpread$
|
|
15575
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, tmpArc), {}, {
|
|
15572
15576
|
// In case centerPos couldn't be calculated, the arc should be drawn as a line
|
|
15573
15577
|
drawAsLine: centerPos === undefined,
|
|
15574
15578
|
clockwise: evaluateClockwise(tmpStartP.position, tmpEndP.position, lastMousePos)
|
|
@@ -15581,9 +15585,9 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15581
15585
|
};
|
|
15582
15586
|
const keydown = e => {
|
|
15583
15587
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15584
|
-
set(state => _objectSpread$
|
|
15585
|
-
tmpObjects: _objectSpread$
|
|
15586
|
-
[tmpArcId]: _objectSpread$
|
|
15588
|
+
set(state => _objectSpread$n(_objectSpread$n({}, state), {}, {
|
|
15589
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15590
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15587
15591
|
isConstruction: true
|
|
15588
15592
|
})
|
|
15589
15593
|
})
|
|
@@ -15592,9 +15596,9 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15592
15596
|
};
|
|
15593
15597
|
const keyup = e => {
|
|
15594
15598
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15595
|
-
set(state => _objectSpread$
|
|
15596
|
-
tmpObjects: _objectSpread$
|
|
15597
|
-
[tmpArcId]: _objectSpread$
|
|
15599
|
+
set(state => _objectSpread$n(_objectSpread$n({}, state), {}, {
|
|
15600
|
+
tmpObjects: _objectSpread$n(_objectSpread$n({}, state.tmpObjects), {}, {
|
|
15601
|
+
[tmpArcId]: _objectSpread$n(_objectSpread$n({}, state.tmpObjects[tmpArcId]), {}, {
|
|
15598
15602
|
isConstruction: false
|
|
15599
15603
|
})
|
|
15600
15604
|
})
|
|
@@ -15618,8 +15622,8 @@ function DrawArc(drawingId, pluginId, arcType) {
|
|
|
15618
15622
|
};
|
|
15619
15623
|
}
|
|
15620
15624
|
|
|
15621
|
-
function ownKeys$
|
|
15622
|
-
function _objectSpread$
|
|
15625
|
+
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; }
|
|
15626
|
+
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; }
|
|
15623
15627
|
function DrawCircle(drawingId, pluginId) {
|
|
15624
15628
|
const {
|
|
15625
15629
|
set
|
|
@@ -15663,7 +15667,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15663
15667
|
} else {
|
|
15664
15668
|
additionIndex = 0;
|
|
15665
15669
|
set(state => {
|
|
15666
|
-
const tmpCenterP = _objectSpread$
|
|
15670
|
+
const tmpCenterP = _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCenterPId]), {}, {
|
|
15667
15671
|
position: lastMousePos.clone()
|
|
15668
15672
|
});
|
|
15669
15673
|
return {
|
|
@@ -15693,7 +15697,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15693
15697
|
isConstruction: e.ctrlKey
|
|
15694
15698
|
};
|
|
15695
15699
|
return {
|
|
15696
|
-
tmpObjects: _objectSpread$
|
|
15700
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15697
15701
|
[tmpCenterP.id]: tmpCenterP,
|
|
15698
15702
|
[tmpCircle.id]: tmpCircle
|
|
15699
15703
|
})
|
|
@@ -15713,7 +15717,7 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15713
15717
|
}).then(() => {
|
|
15714
15718
|
// Remove the old temporary circle and its center point once a permanent one is created in its place
|
|
15715
15719
|
set(state => {
|
|
15716
|
-
const tmpObjects_ = _objectSpread$
|
|
15720
|
+
const tmpObjects_ = _objectSpread$m({}, state.tmpObjects);
|
|
15717
15721
|
delete tmpObjects_[curCenterPId];
|
|
15718
15722
|
delete tmpObjects_[curCircleId];
|
|
15719
15723
|
return {
|
|
@@ -15728,8 +15732,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15728
15732
|
set(state => {
|
|
15729
15733
|
const tmpCenterP = state.tmpObjects[curCenterPId];
|
|
15730
15734
|
return {
|
|
15731
|
-
tmpObjects: _objectSpread$
|
|
15732
|
-
[tmpCenterPId]: _objectSpread$
|
|
15735
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15736
|
+
[tmpCenterPId]: _objectSpread$m(_objectSpread$m({}, tmpCenterP), {}, {
|
|
15733
15737
|
id: tmpCenterPId,
|
|
15734
15738
|
position: e.point.clone().applyMatrix4(getGlobalToLocalMatrix(drawingId, sketchId))
|
|
15735
15739
|
})
|
|
@@ -15749,8 +15753,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15749
15753
|
const tmpCenterP = state.tmpObjects[tmpCenterPId];
|
|
15750
15754
|
return {
|
|
15751
15755
|
mousePos: lastMousePos,
|
|
15752
|
-
tmpObjects: _objectSpread$
|
|
15753
|
-
[tmpCenterPId]: _objectSpread$
|
|
15756
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15757
|
+
[tmpCenterPId]: _objectSpread$m(_objectSpread$m({}, tmpCenterP), {}, {
|
|
15754
15758
|
position: snappedPos || localPos
|
|
15755
15759
|
})
|
|
15756
15760
|
})
|
|
@@ -15760,8 +15764,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15760
15764
|
const tmpCircle = state.tmpObjects[tmpCircleId];
|
|
15761
15765
|
return {
|
|
15762
15766
|
mousePos: lastMousePos,
|
|
15763
|
-
tmpObjects: _objectSpread$
|
|
15764
|
-
[tmpCircleId]: _objectSpread$
|
|
15767
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15768
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, tmpCircle), {}, {
|
|
15765
15769
|
radius: Math.max(tmpCenterP.position.distanceTo(localPos), 0.001)
|
|
15766
15770
|
})
|
|
15767
15771
|
})
|
|
@@ -15772,9 +15776,9 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15772
15776
|
};
|
|
15773
15777
|
const keydown = e => {
|
|
15774
15778
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15775
|
-
set(state => _objectSpread$
|
|
15776
|
-
tmpObjects: _objectSpread$
|
|
15777
|
-
[tmpCircleId]: _objectSpread$
|
|
15779
|
+
set(state => _objectSpread$m(_objectSpread$m({}, state), {}, {
|
|
15780
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15781
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCircleId]), {}, {
|
|
15778
15782
|
isConstruction: true
|
|
15779
15783
|
})
|
|
15780
15784
|
})
|
|
@@ -15783,9 +15787,9 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15783
15787
|
};
|
|
15784
15788
|
const keyup = e => {
|
|
15785
15789
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
15786
|
-
set(state => _objectSpread$
|
|
15787
|
-
tmpObjects: _objectSpread$
|
|
15788
|
-
[tmpCircleId]: _objectSpread$
|
|
15790
|
+
set(state => _objectSpread$m(_objectSpread$m({}, state), {}, {
|
|
15791
|
+
tmpObjects: _objectSpread$m(_objectSpread$m({}, state.tmpObjects), {}, {
|
|
15792
|
+
[tmpCircleId]: _objectSpread$m(_objectSpread$m({}, state.tmpObjects[tmpCircleId]), {}, {
|
|
15789
15793
|
isConstruction: false
|
|
15790
15794
|
})
|
|
15791
15795
|
})
|
|
@@ -15809,8 +15813,8 @@ function DrawCircle(drawingId, pluginId) {
|
|
|
15809
15813
|
};
|
|
15810
15814
|
}
|
|
15811
15815
|
|
|
15812
|
-
function ownKeys$
|
|
15813
|
-
function _objectSpread$
|
|
15816
|
+
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; }
|
|
15817
|
+
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; }
|
|
15814
15818
|
|
|
15815
15819
|
// TODO: reconsider these limits?
|
|
15816
15820
|
// Interpolation spline - 20 limit for performance reasons (there can be a lot of NxN SLAE solve calls from LGS)
|
|
@@ -15875,14 +15879,14 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15875
15879
|
} else if (additionIndex === 1) {
|
|
15876
15880
|
additionIndex = 0;
|
|
15877
15881
|
set(state => {
|
|
15878
|
-
const tmpObjects_ = _objectSpread$
|
|
15882
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15879
15883
|
const tmpNurbs = state.tmpObjects[tmpNurbsId];
|
|
15880
15884
|
const tmpOldEndPId = tmpNurbs.pointIds[1];
|
|
15881
15885
|
delete tmpObjects_[tmpOldEndPId];
|
|
15882
15886
|
delete tmpObjects_[tmpNurbsId];
|
|
15883
15887
|
return {
|
|
15884
|
-
tmpObjects: _objectSpread$
|
|
15885
|
-
[tmpStartPId]: _objectSpread$
|
|
15888
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, tmpObjects_), {}, {
|
|
15889
|
+
[tmpStartPId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpStartPId]), {}, {
|
|
15886
15890
|
position: lastMousePos.clone()
|
|
15887
15891
|
})
|
|
15888
15892
|
})
|
|
@@ -15891,17 +15895,17 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15891
15895
|
} else {
|
|
15892
15896
|
additionIndex--;
|
|
15893
15897
|
set(state => {
|
|
15894
|
-
const tmpObjects_ = _objectSpread$
|
|
15898
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15895
15899
|
const tmpNurbs = state.tmpObjects[tmpNurbsId];
|
|
15896
15900
|
const tmpOldEndPId = tmpNurbs.pointIds[tmpNurbs.pointIds.length - 1];
|
|
15897
15901
|
const tmpNewEndPId = tmpNurbs.pointIds[tmpNurbs.pointIds.length - 2];
|
|
15898
15902
|
delete tmpObjects_[tmpOldEndPId];
|
|
15899
15903
|
return {
|
|
15900
|
-
tmpObjects: _objectSpread$
|
|
15901
|
-
[tmpNewEndPId]: _objectSpread$
|
|
15904
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, tmpObjects_), {}, {
|
|
15905
|
+
[tmpNewEndPId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNewEndPId]), {}, {
|
|
15902
15906
|
position: lastMousePos.clone()
|
|
15903
15907
|
}),
|
|
15904
|
-
[tmpNurbsId]: _objectSpread$
|
|
15908
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
15905
15909
|
drawAsLine: additionIndex < 2,
|
|
15906
15910
|
pointIds: tmpNurbs.pointIds.slice(0, -1),
|
|
15907
15911
|
points: [...tmpNurbs.points.slice(0, -2), lastMousePos.clone()],
|
|
@@ -15947,7 +15951,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15947
15951
|
isConstruction: e.ctrlKey
|
|
15948
15952
|
};
|
|
15949
15953
|
return {
|
|
15950
|
-
tmpObjects: _objectSpread$
|
|
15954
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
15951
15955
|
[tmpP2.id]: tmpP2,
|
|
15952
15956
|
[tmpNurbs.id]: tmpNurbs
|
|
15953
15957
|
})
|
|
@@ -15992,7 +15996,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
15992
15996
|
promise.then(() => {
|
|
15993
15997
|
// Remove the old temporary curve and its points once a permanent one is created in its place
|
|
15994
15998
|
set(state => {
|
|
15995
|
-
const tmpObjects_ = _objectSpread$
|
|
15999
|
+
const tmpObjects_ = _objectSpread$l({}, state.tmpObjects);
|
|
15996
16000
|
pointIds.forEach(pId => {
|
|
15997
16001
|
delete tmpObjects_[pId];
|
|
15998
16002
|
});
|
|
@@ -16013,7 +16017,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16013
16017
|
const tmpP2Id = uuid.v4();
|
|
16014
16018
|
const tmpNurbs = state.tmpObjects[curNurbsId];
|
|
16015
16019
|
return {
|
|
16016
|
-
tmpObjects: _objectSpread$
|
|
16020
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16017
16021
|
[tmpStartPId]: {
|
|
16018
16022
|
class: TmpObjClasses.Point,
|
|
16019
16023
|
id: tmpStartPId,
|
|
@@ -16024,7 +16028,7 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16024
16028
|
id: tmpP2Id,
|
|
16025
16029
|
position: tmpEndP.position.clone()
|
|
16026
16030
|
},
|
|
16027
|
-
[tmpNurbsId]: _objectSpread$
|
|
16031
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
16028
16032
|
id: tmpNurbsId,
|
|
16029
16033
|
drawAsLine: true,
|
|
16030
16034
|
pointIds: [tmpStartPId, tmpP2Id],
|
|
@@ -16053,8 +16057,8 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16053
16057
|
const tmpStartP = state.tmpObjects[tmpStartPId];
|
|
16054
16058
|
return {
|
|
16055
16059
|
mousePos: lastMousePos,
|
|
16056
|
-
tmpObjects: _objectSpread$
|
|
16057
|
-
[tmpStartPId]: _objectSpread$
|
|
16060
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16061
|
+
[tmpStartPId]: _objectSpread$l(_objectSpread$l({}, tmpStartP), {}, {
|
|
16058
16062
|
position: lastMousePos.clone()
|
|
16059
16063
|
})
|
|
16060
16064
|
})
|
|
@@ -16066,13 +16070,13 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16066
16070
|
const points = [...tmpNurbs.points.slice(0, additionIndex), lastMousePos.clone()];
|
|
16067
16071
|
return {
|
|
16068
16072
|
mousePos: lastMousePos,
|
|
16069
|
-
tmpObjects: _objectSpread$
|
|
16073
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16070
16074
|
[tmpEndPId]: {
|
|
16071
16075
|
class: TmpObjClasses.Point,
|
|
16072
16076
|
id: tmpEndPId,
|
|
16073
16077
|
position: lastMousePos.clone()
|
|
16074
16078
|
},
|
|
16075
|
-
[tmpNurbsId]: _objectSpread$
|
|
16079
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, tmpNurbs), {}, {
|
|
16076
16080
|
drawAsLine: additionIndex < 2,
|
|
16077
16081
|
pointIds,
|
|
16078
16082
|
points,
|
|
@@ -16087,9 +16091,9 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16087
16091
|
};
|
|
16088
16092
|
const keydown = e => {
|
|
16089
16093
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
16090
|
-
set(state => _objectSpread$
|
|
16091
|
-
tmpObjects: _objectSpread$
|
|
16092
|
-
[tmpNurbsId]: _objectSpread$
|
|
16094
|
+
set(state => _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
16095
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16096
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNurbsId]), {}, {
|
|
16093
16097
|
isConstruction: true
|
|
16094
16098
|
})
|
|
16095
16099
|
})
|
|
@@ -16098,9 +16102,9 @@ function DrawNurbs(drawingId, pluginId, nurbsType) {
|
|
|
16098
16102
|
};
|
|
16099
16103
|
const keyup = e => {
|
|
16100
16104
|
if (additionIndex > 0 && (e.code === 'ControlLeft' || e.code === 'ControlRight')) {
|
|
16101
|
-
set(state => _objectSpread$
|
|
16102
|
-
tmpObjects: _objectSpread$
|
|
16103
|
-
[tmpNurbsId]: _objectSpread$
|
|
16105
|
+
set(state => _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
16106
|
+
tmpObjects: _objectSpread$l(_objectSpread$l({}, state.tmpObjects), {}, {
|
|
16107
|
+
[tmpNurbsId]: _objectSpread$l(_objectSpread$l({}, state.tmpObjects[tmpNurbsId]), {}, {
|
|
16104
16108
|
isConstruction: false
|
|
16105
16109
|
})
|
|
16106
16110
|
})
|
|
@@ -16828,7 +16832,7 @@ const bezierSplitAtHalf = p => {
|
|
|
16828
16832
|
|
|
16829
16833
|
/**
|
|
16830
16834
|
* Calculates the approximate length of a nurbs span.
|
|
16831
|
-
*
|
|
16835
|
+
*
|
|
16832
16836
|
* @param points An array of control points.
|
|
16833
16837
|
* @param segmentsCount The number of segments to divide the nurbs span into.
|
|
16834
16838
|
* @param weights Optional Bézier control-point weights (rational curve). Defaults to unit weights.
|
|
@@ -18008,8 +18012,8 @@ function Use(drawingId, pluginId, useType) {
|
|
|
18008
18012
|
};
|
|
18009
18013
|
}
|
|
18010
18014
|
|
|
18011
|
-
function ownKeys$
|
|
18012
|
-
function _objectSpread$
|
|
18015
|
+
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; }
|
|
18016
|
+
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; }
|
|
18013
18017
|
function SSelect(drawingId, pluginId) {
|
|
18014
18018
|
const hoverHandler = Hover(drawingId, pluginId);
|
|
18015
18019
|
const filter = object => true;
|
|
@@ -18060,10 +18064,10 @@ function SSelect(drawingId, pluginId) {
|
|
|
18060
18064
|
name: HandlersList.SSELECT,
|
|
18061
18065
|
filter,
|
|
18062
18066
|
onDeactivate,
|
|
18063
|
-
pointerHandlers: _objectSpread$
|
|
18067
|
+
pointerHandlers: _objectSpread$k({
|
|
18064
18068
|
onClick
|
|
18065
18069
|
}, hoverHandler.pointerHandlers),
|
|
18066
|
-
keyHandlers: _objectSpread$
|
|
18070
|
+
keyHandlers: _objectSpread$k({}, hoverHandler.keyHandlers)
|
|
18067
18071
|
};
|
|
18068
18072
|
}
|
|
18069
18073
|
|
|
@@ -18092,7 +18096,7 @@ const HandlersConstructors = {
|
|
|
18092
18096
|
|
|
18093
18097
|
function useSketchState(drawingId, pluginId, sel, equalityFn) {
|
|
18094
18098
|
return react.usePlugin(drawingId, pluginId, plugin => {
|
|
18095
|
-
if (plugin && plugin.name === description$
|
|
18099
|
+
if (plugin && plugin.name === description$p.name) {
|
|
18096
18100
|
return sel(plugin.state);
|
|
18097
18101
|
} else {
|
|
18098
18102
|
window.console.error('Wrong arguments are passed into useSketchState.');
|
|
@@ -21194,8 +21198,8 @@ const TmpGraphics = () => {
|
|
|
21194
21198
|
}));
|
|
21195
21199
|
};
|
|
21196
21200
|
|
|
21197
|
-
function ownKeys$
|
|
21198
|
-
function _objectSpread$
|
|
21201
|
+
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; }
|
|
21202
|
+
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; }
|
|
21199
21203
|
|
|
21200
21204
|
/*
|
|
21201
21205
|
* !polygonOffset!
|
|
@@ -21246,7 +21250,7 @@ const CCLine = props => {
|
|
|
21246
21250
|
end: end,
|
|
21247
21251
|
isConstruction: isConstruction_,
|
|
21248
21252
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21249
|
-
meshProps: _objectSpread$
|
|
21253
|
+
meshProps: _objectSpread$j(_objectSpread$j({
|
|
21250
21254
|
renderOrder
|
|
21251
21255
|
}, handlers), {}, {
|
|
21252
21256
|
userData
|
|
@@ -21297,7 +21301,7 @@ const CCPoint = props => {
|
|
|
21297
21301
|
// so we have to increase size of hovered or selected point to make the point not occluded buy other ones
|
|
21298
21302
|
,
|
|
21299
21303
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21300
|
-
meshProps: _objectSpread$
|
|
21304
|
+
meshProps: _objectSpread$j(_objectSpread$j({
|
|
21301
21305
|
renderOrder
|
|
21302
21306
|
}, handlers), {}, {
|
|
21303
21307
|
userData
|
|
@@ -21355,7 +21359,7 @@ const CCArc = props => {
|
|
|
21355
21359
|
clockwise: clockwise,
|
|
21356
21360
|
isConstruction: isConstruction_,
|
|
21357
21361
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21358
|
-
meshProps: _objectSpread$
|
|
21362
|
+
meshProps: _objectSpread$j({
|
|
21359
21363
|
renderOrder,
|
|
21360
21364
|
userData
|
|
21361
21365
|
}, handlers),
|
|
@@ -21401,7 +21405,7 @@ const CCCircle = props => {
|
|
|
21401
21405
|
radius: radius,
|
|
21402
21406
|
isConstruction: isConstruction_,
|
|
21403
21407
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21404
|
-
meshProps: _objectSpread$
|
|
21408
|
+
meshProps: _objectSpread$j({
|
|
21405
21409
|
renderOrder,
|
|
21406
21410
|
userData
|
|
21407
21411
|
}, handlers),
|
|
@@ -21474,7 +21478,7 @@ const CCSpline = props => {
|
|
|
21474
21478
|
weights: span.weights,
|
|
21475
21479
|
isConstruction: isConstruction_,
|
|
21476
21480
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21477
|
-
meshProps: _objectSpread$
|
|
21481
|
+
meshProps: _objectSpread$j({
|
|
21478
21482
|
renderOrder,
|
|
21479
21483
|
userData
|
|
21480
21484
|
}, handlers),
|
|
@@ -21519,7 +21523,7 @@ const CCBezier = props => {
|
|
|
21519
21523
|
points: points,
|
|
21520
21524
|
isConstruction: isConstruction_,
|
|
21521
21525
|
scalePlus: isHovered || isSelected || isHighlighted || isConstrOverdefined,
|
|
21522
|
-
meshProps: _objectSpread$
|
|
21526
|
+
meshProps: _objectSpread$j({
|
|
21523
21527
|
renderOrder,
|
|
21524
21528
|
userData
|
|
21525
21529
|
}, handlers),
|
|
@@ -21772,8 +21776,8 @@ const MousePosition = () => {
|
|
|
21772
21776
|
}, `${mousePos.x.toFixed(2)}, ${mousePos.y.toFixed(2)}`)) : null;
|
|
21773
21777
|
};
|
|
21774
21778
|
|
|
21775
|
-
function ownKeys$
|
|
21776
|
-
function _objectSpread$
|
|
21779
|
+
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; }
|
|
21780
|
+
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; }
|
|
21777
21781
|
|
|
21778
21782
|
/**
|
|
21779
21783
|
* The colours a geometry override gives the bodies it is for.
|
|
@@ -21784,12 +21788,12 @@ function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
21784
21788
|
const useGeometryOverridesStore = zustand.create()((set, get) => ({
|
|
21785
21789
|
overrides: {},
|
|
21786
21790
|
addOverride: (name, override) => set(state => ({
|
|
21787
|
-
overrides: _objectSpread$
|
|
21791
|
+
overrides: _objectSpread$i(_objectSpread$i({}, state.overrides), {}, {
|
|
21788
21792
|
[name]: override
|
|
21789
21793
|
})
|
|
21790
21794
|
})),
|
|
21791
21795
|
removeOverride: name => set(state => {
|
|
21792
|
-
const overrides_ = _objectSpread$
|
|
21796
|
+
const overrides_ = _objectSpread$i({}, state.overrides);
|
|
21793
21797
|
delete overrides_[name];
|
|
21794
21798
|
return {
|
|
21795
21799
|
overrides: overrides_
|
|
@@ -21986,8 +21990,8 @@ const GeometryOverridesManager = ({
|
|
|
21986
21990
|
return null;
|
|
21987
21991
|
};
|
|
21988
21992
|
|
|
21989
|
-
function ownKeys$
|
|
21990
|
-
function _objectSpread$
|
|
21993
|
+
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; }
|
|
21994
|
+
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; }
|
|
21991
21995
|
const ConstraintManager = ({
|
|
21992
21996
|
drawingId,
|
|
21993
21997
|
pluginId,
|
|
@@ -22006,7 +22010,7 @@ const ConstraintManager = ({
|
|
|
22006
22010
|
const {
|
|
22007
22011
|
overdefined
|
|
22008
22012
|
} = getSketchState(drawingId, pluginId);
|
|
22009
|
-
const overdefinedNew = _objectSpread$
|
|
22013
|
+
const overdefinedNew = _objectSpread$h({}, overdefined);
|
|
22010
22014
|
entities_.forEach(id => {
|
|
22011
22015
|
var _overdefined$id;
|
|
22012
22016
|
const entityConstrArr = ((_overdefined$id = overdefined[id]) == null ? void 0 : _overdefined$id.filter(cId => cId !== constraintId)) || [];
|
|
@@ -22024,7 +22028,7 @@ const ConstraintManager = ({
|
|
|
22024
22028
|
const {
|
|
22025
22029
|
overdefined
|
|
22026
22030
|
} = getSketchState(drawingId, pluginId);
|
|
22027
|
-
const overdefinedNew = _objectSpread$
|
|
22031
|
+
const overdefinedNew = _objectSpread$h({}, overdefined);
|
|
22028
22032
|
entities_.forEach(id => {
|
|
22029
22033
|
if (!overdefined[id]) {
|
|
22030
22034
|
return;
|
|
@@ -22384,7 +22388,7 @@ const ViewOnlyMode = ({
|
|
|
22384
22388
|
objId: sketchId
|
|
22385
22389
|
})));
|
|
22386
22390
|
};
|
|
22387
|
-
const ViewImpl$
|
|
22391
|
+
const ViewImpl$9 = ({
|
|
22388
22392
|
drawingId,
|
|
22389
22393
|
pluginId
|
|
22390
22394
|
}) => {
|
|
@@ -22425,7 +22429,7 @@ const ViewImpl$8 = ({
|
|
|
22425
22429
|
*
|
|
22426
22430
|
* @internal
|
|
22427
22431
|
*/
|
|
22428
|
-
const View$
|
|
22432
|
+
const View$j = ({
|
|
22429
22433
|
drawingId,
|
|
22430
22434
|
pluginId
|
|
22431
22435
|
}) => {
|
|
@@ -22433,7 +22437,7 @@ const View$i = ({
|
|
|
22433
22437
|
drawingId: drawingId,
|
|
22434
22438
|
pluginId: pluginId,
|
|
22435
22439
|
inCanvas: true
|
|
22436
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
22440
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$9, {
|
|
22437
22441
|
drawingId: drawingId,
|
|
22438
22442
|
pluginId: pluginId
|
|
22439
22443
|
}));
|
|
@@ -22500,7 +22504,7 @@ const SketchGroup = ({
|
|
|
22500
22504
|
}, children));
|
|
22501
22505
|
};
|
|
22502
22506
|
|
|
22503
|
-
const _excluded$
|
|
22507
|
+
const _excluded$6 = ["angle", "defaultValue", "setValue"];
|
|
22504
22508
|
const rigidSetFilter = (drawingId, sketchId) => (scope, data) => {
|
|
22505
22509
|
if (scope !== TreeObjScope) {
|
|
22506
22510
|
return false;
|
|
@@ -22564,7 +22568,7 @@ const Input = _ref => {
|
|
|
22564
22568
|
defaultValue,
|
|
22565
22569
|
setValue
|
|
22566
22570
|
} = _ref,
|
|
22567
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
22571
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
22568
22572
|
const {
|
|
22569
22573
|
Input: BInput
|
|
22570
22574
|
} = react.useBuerli(buerli => buerli.options.elements);
|
|
@@ -23293,9 +23297,9 @@ const PlaneSelection = ({
|
|
|
23293
23297
|
}));
|
|
23294
23298
|
};
|
|
23295
23299
|
|
|
23296
|
-
const _excluded$
|
|
23297
|
-
function ownKeys$
|
|
23298
|
-
function _objectSpread$
|
|
23300
|
+
const _excluded$5 = ["items", "menuInfo", "caption", "icon", "onHide", "children"];
|
|
23301
|
+
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; }
|
|
23302
|
+
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; }
|
|
23299
23303
|
|
|
23300
23304
|
/**
|
|
23301
23305
|
* What a {@link ContextMenu} is opened on: the SDK's interaction info of the thing.
|
|
@@ -23347,7 +23351,7 @@ const finalizeMenuElement = (menuElement, menuInfo) => {
|
|
|
23347
23351
|
if (!menuElement) {
|
|
23348
23352
|
return null;
|
|
23349
23353
|
}
|
|
23350
|
-
const menuElement_ = _objectSpread$
|
|
23354
|
+
const menuElement_ = _objectSpread$g({}, menuElement);
|
|
23351
23355
|
if (menuElement_.children) {
|
|
23352
23356
|
const children = typeof menuElement_.children === 'function' ? menuElement_.children(menuInfo) : menuElement_.children;
|
|
23353
23357
|
menuElement_.children = children.map(child => finalizeMenuElement(child, menuInfo));
|
|
@@ -23362,7 +23366,7 @@ const menuElementToItem = menuElement => {
|
|
|
23362
23366
|
}
|
|
23363
23367
|
|
|
23364
23368
|
// the element's fields of whichever kind it is (antd's item kinds exclude one another)
|
|
23365
|
-
const menuItem = _objectSpread$
|
|
23369
|
+
const menuItem = _objectSpread$g({}, menuElement);
|
|
23366
23370
|
if (menuItem.onClick) {
|
|
23367
23371
|
delete menuItem.onClick;
|
|
23368
23372
|
}
|
|
@@ -23443,7 +23447,7 @@ const ContextMenu = _ref => {
|
|
|
23443
23447
|
onHide,
|
|
23444
23448
|
children
|
|
23445
23449
|
} = _ref,
|
|
23446
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
23450
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
23447
23451
|
const menuElements = React.useMemo(() => items.map(item => finalizeMenuElement(item, menuInfo)), [items, menuInfo]);
|
|
23448
23452
|
const menuItems = React.useMemo(() => menuElements.map(element => menuElementToItem(element)), [menuElements]);
|
|
23449
23453
|
const {
|
|
@@ -23516,8 +23520,8 @@ const ContextMenu = _ref => {
|
|
|
23516
23520
|
}), children);
|
|
23517
23521
|
};
|
|
23518
23522
|
|
|
23519
|
-
function ownKeys$
|
|
23520
|
-
function _objectSpread$
|
|
23523
|
+
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; }
|
|
23524
|
+
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; }
|
|
23521
23525
|
const inputRegex$1 = /^\w*$/;
|
|
23522
23526
|
const nameRegex$2 = /^[a-zA-Z_]\w*$/;
|
|
23523
23527
|
const NameEdit = ({
|
|
@@ -23561,7 +23565,7 @@ const NameEdit = ({
|
|
|
23561
23565
|
const zIndex = showBlankDiv ? blankZIndex + 1 : 0;
|
|
23562
23566
|
return /*#__PURE__*/React.createElement(antd.Input, {
|
|
23563
23567
|
className: "rcad-name-edit",
|
|
23564
|
-
style: _objectSpread$
|
|
23568
|
+
style: _objectSpread$f(_objectSpread$f({}, style), {}, {
|
|
23565
23569
|
zIndex
|
|
23566
23570
|
}),
|
|
23567
23571
|
ref: ref,
|
|
@@ -23667,7 +23671,7 @@ function useRevealWhenPicked(row, picked_) {
|
|
|
23667
23671
|
}, [picked_, row]);
|
|
23668
23672
|
}
|
|
23669
23673
|
|
|
23670
|
-
const _excluded$
|
|
23674
|
+
const _excluded$4 = ["hovered", "bordered", "blocked", "active", "selected", "off", "reveal", "className"];
|
|
23671
23675
|
styled.div`
|
|
23672
23676
|
display: flex;
|
|
23673
23677
|
flex-direction: row;
|
|
@@ -23703,7 +23707,7 @@ const HoveredDiv = /*#__PURE__*/React.forwardRef(function HoveredDiv(_ref, ref)
|
|
|
23703
23707
|
reveal = selected,
|
|
23704
23708
|
className
|
|
23705
23709
|
} = _ref,
|
|
23706
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
23710
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
23707
23711
|
const own = React.useRef(null);
|
|
23708
23712
|
const setRef = React.useCallback(el => {
|
|
23709
23713
|
own.current = el;
|
|
@@ -24742,7 +24746,7 @@ const SketchMode = ({
|
|
|
24742
24746
|
onClick: onClick
|
|
24743
24747
|
}, /*#__PURE__*/React.createElement(Handlers, null), /*#__PURE__*/React.createElement(Constraints$1, null), /*#__PURE__*/React.createElement(CopyPatterns, null), /*#__PURE__*/React.createElement(Details, null), /*#__PURE__*/React.createElement(Regions, null), /*#__PURE__*/React.createElement(Position, null)));
|
|
24744
24748
|
};
|
|
24745
|
-
const RootImpl$
|
|
24749
|
+
const RootImpl$p = ({
|
|
24746
24750
|
drawingId,
|
|
24747
24751
|
pluginId
|
|
24748
24752
|
}) => {
|
|
@@ -24778,14 +24782,14 @@ const RootImpl$o = ({
|
|
|
24778
24782
|
*
|
|
24779
24783
|
* @internal
|
|
24780
24784
|
*/
|
|
24781
|
-
const Root$
|
|
24785
|
+
const Root$p = ({
|
|
24782
24786
|
drawingId,
|
|
24783
24787
|
pluginId
|
|
24784
24788
|
}) => {
|
|
24785
24789
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
24786
24790
|
drawingId: drawingId,
|
|
24787
24791
|
pluginId: pluginId
|
|
24788
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
24792
|
+
}, /*#__PURE__*/React.createElement(RootImpl$p, {
|
|
24789
24793
|
drawingId: drawingId,
|
|
24790
24794
|
pluginId: pluginId
|
|
24791
24795
|
}));
|
|
@@ -24823,11 +24827,11 @@ const Root$o = ({
|
|
|
24823
24827
|
* @module
|
|
24824
24828
|
*/
|
|
24825
24829
|
|
|
24826
|
-
var index$
|
|
24830
|
+
var index$p = /*#__PURE__*/Object.freeze({
|
|
24827
24831
|
__proto__: null,
|
|
24828
|
-
Root: Root$
|
|
24829
|
-
View: View$
|
|
24830
|
-
description: description$
|
|
24832
|
+
Root: Root$p,
|
|
24833
|
+
View: View$j,
|
|
24834
|
+
description: description$p
|
|
24831
24835
|
});
|
|
24832
24836
|
|
|
24833
24837
|
function useRefsReset(type, refs) {
|
|
@@ -24869,7 +24873,7 @@ const typesCaptions$2 = {
|
|
|
24869
24873
|
[client.WorkAxisType.WA_USERDEFINED]: 'Type: Custom'
|
|
24870
24874
|
};
|
|
24871
24875
|
const readOnlyTypes$4 = [client.WorkAxisType.WA_FIXED];
|
|
24872
|
-
const RootImpl$
|
|
24876
|
+
const RootImpl$o = ({
|
|
24873
24877
|
drawingId,
|
|
24874
24878
|
pluginId
|
|
24875
24879
|
}) => {
|
|
@@ -24969,14 +24973,14 @@ const RootImpl$n = ({
|
|
|
24969
24973
|
*
|
|
24970
24974
|
* @internal
|
|
24971
24975
|
*/
|
|
24972
|
-
const Root$
|
|
24976
|
+
const Root$o = ({
|
|
24973
24977
|
drawingId,
|
|
24974
24978
|
pluginId
|
|
24975
24979
|
}) => {
|
|
24976
24980
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
24977
24981
|
drawingId: drawingId,
|
|
24978
24982
|
pluginId: pluginId
|
|
24979
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
24983
|
+
}, /*#__PURE__*/React.createElement(RootImpl$o, {
|
|
24980
24984
|
drawingId: drawingId,
|
|
24981
24985
|
pluginId: pluginId
|
|
24982
24986
|
}));
|
|
@@ -25041,7 +25045,7 @@ function getBaseColor(direction, type, stage) {
|
|
|
25041
25045
|
return stage.datum;
|
|
25042
25046
|
}
|
|
25043
25047
|
}
|
|
25044
|
-
const ViewImpl$
|
|
25048
|
+
const ViewImpl$8 = ({
|
|
25045
25049
|
drawingId,
|
|
25046
25050
|
pluginId
|
|
25047
25051
|
}) => {
|
|
@@ -25077,7 +25081,7 @@ const ViewImpl$7 = ({
|
|
|
25077
25081
|
*
|
|
25078
25082
|
* @internal
|
|
25079
25083
|
*/
|
|
25080
|
-
const View$
|
|
25084
|
+
const View$i = ({
|
|
25081
25085
|
drawingId,
|
|
25082
25086
|
pluginId
|
|
25083
25087
|
}) => {
|
|
@@ -25085,7 +25089,7 @@ const View$h = ({
|
|
|
25085
25089
|
drawingId: drawingId,
|
|
25086
25090
|
pluginId: pluginId,
|
|
25087
25091
|
inCanvas: true
|
|
25088
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
25092
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$8, {
|
|
25089
25093
|
drawingId: drawingId,
|
|
25090
25094
|
pluginId: pluginId
|
|
25091
25095
|
}));
|
|
@@ -25124,7 +25128,7 @@ const View$h = ({
|
|
|
25124
25128
|
*
|
|
25125
25129
|
* @internal
|
|
25126
25130
|
*/
|
|
25127
|
-
const description$
|
|
25131
|
+
const description$o = {
|
|
25128
25132
|
name: 'WorkAxis',
|
|
25129
25133
|
version: '1.0.0',
|
|
25130
25134
|
author: 'Ledas',
|
|
@@ -25133,11 +25137,11 @@ const description$n = {
|
|
|
25133
25137
|
global: false
|
|
25134
25138
|
};
|
|
25135
25139
|
|
|
25136
|
-
var index$
|
|
25140
|
+
var index$o = /*#__PURE__*/Object.freeze({
|
|
25137
25141
|
__proto__: null,
|
|
25138
|
-
Root: Root$
|
|
25139
|
-
View: View$
|
|
25140
|
-
description: description$
|
|
25142
|
+
Root: Root$o,
|
|
25143
|
+
View: View$i,
|
|
25144
|
+
description: description$o
|
|
25141
25145
|
});
|
|
25142
25146
|
|
|
25143
25147
|
function linePlaneAngle(drawingId, refsParam) {
|
|
@@ -25235,7 +25239,7 @@ const typesCaptions$1 = {
|
|
|
25235
25239
|
[client.WorkPlaneType.WP_POINTFACE]: 'Type: Point and plane',
|
|
25236
25240
|
[client.WorkPlaneType.WP_LINEPLANEANGLE]: 'Type: Line, plane and angle'
|
|
25237
25241
|
};
|
|
25238
|
-
const RootImpl$
|
|
25242
|
+
const RootImpl$n = ({
|
|
25239
25243
|
drawingId,
|
|
25240
25244
|
pluginId
|
|
25241
25245
|
}) => {
|
|
@@ -25422,14 +25426,14 @@ const RootImpl$m = ({
|
|
|
25422
25426
|
*
|
|
25423
25427
|
* @internal
|
|
25424
25428
|
*/
|
|
25425
|
-
const Root$
|
|
25429
|
+
const Root$n = ({
|
|
25426
25430
|
drawingId,
|
|
25427
25431
|
pluginId
|
|
25428
25432
|
}) => {
|
|
25429
25433
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
25430
25434
|
drawingId: drawingId,
|
|
25431
25435
|
pluginId: pluginId
|
|
25432
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
25436
|
+
}, /*#__PURE__*/React.createElement(RootImpl$n, {
|
|
25433
25437
|
drawingId: drawingId,
|
|
25434
25438
|
pluginId: pluginId
|
|
25435
25439
|
}));
|
|
@@ -25528,7 +25532,7 @@ const WorkPlaneObj = ({
|
|
|
25528
25532
|
})));
|
|
25529
25533
|
};
|
|
25530
25534
|
|
|
25531
|
-
const ViewImpl$
|
|
25535
|
+
const ViewImpl$7 = ({
|
|
25532
25536
|
drawingId,
|
|
25533
25537
|
pluginId
|
|
25534
25538
|
}) => {
|
|
@@ -25567,7 +25571,7 @@ const ViewImpl$6 = ({
|
|
|
25567
25571
|
*
|
|
25568
25572
|
* @internal
|
|
25569
25573
|
*/
|
|
25570
|
-
const View$
|
|
25574
|
+
const View$h = ({
|
|
25571
25575
|
drawingId,
|
|
25572
25576
|
pluginId
|
|
25573
25577
|
}) => {
|
|
@@ -25575,7 +25579,7 @@ const View$g = ({
|
|
|
25575
25579
|
drawingId: drawingId,
|
|
25576
25580
|
pluginId: pluginId,
|
|
25577
25581
|
inCanvas: true
|
|
25578
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
25582
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$7, {
|
|
25579
25583
|
drawingId: drawingId,
|
|
25580
25584
|
pluginId: pluginId
|
|
25581
25585
|
}));
|
|
@@ -25615,7 +25619,7 @@ const View$g = ({
|
|
|
25615
25619
|
*
|
|
25616
25620
|
* @internal
|
|
25617
25621
|
*/
|
|
25618
|
-
const description$
|
|
25622
|
+
const description$n = {
|
|
25619
25623
|
name: 'WorkPlane',
|
|
25620
25624
|
version: '1.0.0',
|
|
25621
25625
|
author: 'Ledas',
|
|
@@ -25624,11 +25628,11 @@ const description$m = {
|
|
|
25624
25628
|
global: false
|
|
25625
25629
|
};
|
|
25626
25630
|
|
|
25627
|
-
var index$
|
|
25631
|
+
var index$n = /*#__PURE__*/Object.freeze({
|
|
25628
25632
|
__proto__: null,
|
|
25629
|
-
Root: Root$
|
|
25630
|
-
View: View$
|
|
25631
|
-
description: description$
|
|
25633
|
+
Root: Root$n,
|
|
25634
|
+
View: View$h,
|
|
25635
|
+
description: description$n
|
|
25632
25636
|
});
|
|
25633
25637
|
|
|
25634
25638
|
var Members$f = /*#__PURE__*/function (Members) {
|
|
@@ -25659,7 +25663,7 @@ const typesCaptions = {
|
|
|
25659
25663
|
[client.WorkPointType.WPT_INTERSECTION]: 'Type: Intersection',
|
|
25660
25664
|
[client.WorkPointType.WPT_USERDEFINED]: 'Type: Custom'
|
|
25661
25665
|
};
|
|
25662
|
-
const RootImpl$
|
|
25666
|
+
const RootImpl$m = ({
|
|
25663
25667
|
drawingId,
|
|
25664
25668
|
pluginId
|
|
25665
25669
|
}) => {
|
|
@@ -25765,14 +25769,14 @@ const RootImpl$l = ({
|
|
|
25765
25769
|
*
|
|
25766
25770
|
* @internal
|
|
25767
25771
|
*/
|
|
25768
|
-
const Root$
|
|
25772
|
+
const Root$m = ({
|
|
25769
25773
|
drawingId,
|
|
25770
25774
|
pluginId
|
|
25771
25775
|
}) => {
|
|
25772
25776
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
25773
25777
|
drawingId: drawingId,
|
|
25774
25778
|
pluginId: pluginId
|
|
25775
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
25779
|
+
}, /*#__PURE__*/React.createElement(RootImpl$m, {
|
|
25776
25780
|
drawingId: drawingId,
|
|
25777
25781
|
pluginId: pluginId
|
|
25778
25782
|
}));
|
|
@@ -25843,7 +25847,7 @@ const WorkPointObj = ({
|
|
|
25843
25847
|
}));
|
|
25844
25848
|
};
|
|
25845
25849
|
|
|
25846
|
-
const ViewImpl$
|
|
25850
|
+
const ViewImpl$6 = ({
|
|
25847
25851
|
drawingId,
|
|
25848
25852
|
pluginId
|
|
25849
25853
|
}) => {
|
|
@@ -25876,7 +25880,7 @@ const ViewImpl$5 = ({
|
|
|
25876
25880
|
*
|
|
25877
25881
|
* @internal
|
|
25878
25882
|
*/
|
|
25879
|
-
const View$
|
|
25883
|
+
const View$g = ({
|
|
25880
25884
|
drawingId,
|
|
25881
25885
|
pluginId
|
|
25882
25886
|
}) => {
|
|
@@ -25884,7 +25888,7 @@ const View$f = ({
|
|
|
25884
25888
|
drawingId: drawingId,
|
|
25885
25889
|
pluginId: pluginId,
|
|
25886
25890
|
inCanvas: true
|
|
25887
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
25891
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$6, {
|
|
25888
25892
|
drawingId: drawingId,
|
|
25889
25893
|
pluginId: pluginId
|
|
25890
25894
|
}));
|
|
@@ -25924,7 +25928,7 @@ const View$f = ({
|
|
|
25924
25928
|
*
|
|
25925
25929
|
* @internal
|
|
25926
25930
|
*/
|
|
25927
|
-
const description$
|
|
25931
|
+
const description$m = {
|
|
25928
25932
|
name: 'WorkPoint',
|
|
25929
25933
|
version: '1.0.0',
|
|
25930
25934
|
author: 'Ledas',
|
|
@@ -25933,15 +25937,15 @@ const description$l = {
|
|
|
25933
25937
|
global: false
|
|
25934
25938
|
};
|
|
25935
25939
|
|
|
25936
|
-
var index$
|
|
25940
|
+
var index$m = /*#__PURE__*/Object.freeze({
|
|
25937
25941
|
__proto__: null,
|
|
25938
|
-
Root: Root$
|
|
25939
|
-
View: View$
|
|
25940
|
-
description: description$
|
|
25942
|
+
Root: Root$m,
|
|
25943
|
+
View: View$g,
|
|
25944
|
+
description: description$m
|
|
25941
25945
|
});
|
|
25942
25946
|
|
|
25943
|
-
function ownKeys$
|
|
25944
|
-
function _objectSpread$
|
|
25947
|
+
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; }
|
|
25948
|
+
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; }
|
|
25945
25949
|
// One coordinate: its axis' letter at the field's head, then its number.
|
|
25946
25950
|
const NumInput = ({
|
|
25947
25951
|
onChange,
|
|
@@ -26016,7 +26020,7 @@ const CSysEditor = ({
|
|
|
26016
26020
|
}, [defaults, csysRow]);
|
|
26017
26021
|
React.useEffect(() => {
|
|
26018
26022
|
setUserValue(val => {
|
|
26019
|
-
const newVal = [_objectSpread$
|
|
26023
|
+
const newVal = [_objectSpread$e({}, val[0]), _objectSpread$e({}, val[1]), _objectSpread$e({}, val[2]), _objectSpread$e({}, val[3])];
|
|
26020
26024
|
newVal[csysRow] = {
|
|
26021
26025
|
x,
|
|
26022
26026
|
y,
|
|
@@ -26141,7 +26145,7 @@ const getObjectDirection$1 = (drawingId, obj) => {
|
|
|
26141
26145
|
const matrix = sdkjs.getDrawing(drawingId).api.structure.calculateGlobalTransformation(obj.id);
|
|
26142
26146
|
return dir.applyMatrix4(matrix).normalize();
|
|
26143
26147
|
};
|
|
26144
|
-
function RootImpl$
|
|
26148
|
+
function RootImpl$l({
|
|
26145
26149
|
drawingId,
|
|
26146
26150
|
pluginId
|
|
26147
26151
|
}) {
|
|
@@ -26410,14 +26414,14 @@ function RootImpl$k({
|
|
|
26410
26414
|
*
|
|
26411
26415
|
* @internal
|
|
26412
26416
|
*/
|
|
26413
|
-
const Root$
|
|
26417
|
+
const Root$l = ({
|
|
26414
26418
|
drawingId,
|
|
26415
26419
|
pluginId
|
|
26416
26420
|
}) => {
|
|
26417
26421
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
26418
26422
|
drawingId: drawingId,
|
|
26419
26423
|
pluginId: pluginId
|
|
26420
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
26424
|
+
}, /*#__PURE__*/React.createElement(RootImpl$l, {
|
|
26421
26425
|
drawingId: drawingId,
|
|
26422
26426
|
pluginId: pluginId
|
|
26423
26427
|
}));
|
|
@@ -26488,7 +26492,7 @@ const calcluateTransform$1 = (originPos, xDir, yDir, offset, rotation, inverted)
|
|
|
26488
26492
|
const mGlobal = new THREE__namespace.Matrix4().makeBasis(xAxis, yAxis, zAxis).setPosition(originPos);
|
|
26489
26493
|
return mGlobal.clone().multiply(mLocal);
|
|
26490
26494
|
};
|
|
26491
|
-
function ViewImpl$
|
|
26495
|
+
function ViewImpl$5({
|
|
26492
26496
|
drawingId,
|
|
26493
26497
|
pluginId
|
|
26494
26498
|
}) {
|
|
@@ -26543,7 +26547,7 @@ function ViewImpl$4({
|
|
|
26543
26547
|
*
|
|
26544
26548
|
* @internal
|
|
26545
26549
|
*/
|
|
26546
|
-
const View$
|
|
26550
|
+
const View$f = ({
|
|
26547
26551
|
drawingId,
|
|
26548
26552
|
pluginId
|
|
26549
26553
|
}) => {
|
|
@@ -26551,7 +26555,7 @@ const View$e = ({
|
|
|
26551
26555
|
drawingId: drawingId,
|
|
26552
26556
|
pluginId: pluginId,
|
|
26553
26557
|
inCanvas: true
|
|
26554
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
26558
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$5, {
|
|
26555
26559
|
drawingId: drawingId,
|
|
26556
26560
|
pluginId: pluginId
|
|
26557
26561
|
}));
|
|
@@ -26600,7 +26604,7 @@ const View$e = ({
|
|
|
26600
26604
|
*
|
|
26601
26605
|
* @internal
|
|
26602
26606
|
*/
|
|
26603
|
-
const description$
|
|
26607
|
+
const description$l = {
|
|
26604
26608
|
name: 'WorkCoordSystem',
|
|
26605
26609
|
version: '1.0.0',
|
|
26606
26610
|
author: 'Ledas',
|
|
@@ -26616,11 +26620,11 @@ const description$k = {
|
|
|
26616
26620
|
}
|
|
26617
26621
|
};
|
|
26618
26622
|
|
|
26619
|
-
var index$
|
|
26623
|
+
var index$l = /*#__PURE__*/Object.freeze({
|
|
26620
26624
|
__proto__: null,
|
|
26621
|
-
Root: Root$
|
|
26622
|
-
View: View$
|
|
26623
|
-
description: description$
|
|
26625
|
+
Root: Root$l,
|
|
26626
|
+
View: View$f,
|
|
26627
|
+
description: description$l
|
|
26624
26628
|
});
|
|
26625
26629
|
|
|
26626
26630
|
var Members$d = /*#__PURE__*/function (Members) {
|
|
@@ -26663,7 +26667,7 @@ const getObjectDirection = (drawingId, obj) => {
|
|
|
26663
26667
|
const matrix = sdkjs.getDrawing(drawingId).api.structure.calculateGlobalTransformation(obj.id);
|
|
26664
26668
|
return dir.applyMatrix4(matrix).normalize();
|
|
26665
26669
|
};
|
|
26666
|
-
function RootImpl$
|
|
26670
|
+
function RootImpl$k({
|
|
26667
26671
|
drawingId,
|
|
26668
26672
|
pluginId
|
|
26669
26673
|
}) {
|
|
@@ -26912,14 +26916,14 @@ function RootImpl$j({
|
|
|
26912
26916
|
*
|
|
26913
26917
|
* @internal
|
|
26914
26918
|
*/
|
|
26915
|
-
const Root$
|
|
26919
|
+
const Root$k = ({
|
|
26916
26920
|
drawingId,
|
|
26917
26921
|
pluginId
|
|
26918
26922
|
}) => {
|
|
26919
26923
|
return /*#__PURE__*/React.createElement(FtPluginValidator, {
|
|
26920
26924
|
drawingId: drawingId,
|
|
26921
26925
|
pluginId: pluginId
|
|
26922
|
-
}, /*#__PURE__*/React.createElement(RootImpl$
|
|
26926
|
+
}, /*#__PURE__*/React.createElement(RootImpl$k, {
|
|
26923
26927
|
drawingId: drawingId,
|
|
26924
26928
|
pluginId: pluginId
|
|
26925
26929
|
}));
|
|
@@ -26986,7 +26990,7 @@ const calcluateTransform = (originPos, xDir, yDir, offset, rotation, inverted) =
|
|
|
26986
26990
|
const mGlobal = new THREE__namespace.Matrix4().makeBasis(xAxis, yAxis, zAxis).setPosition(originPos);
|
|
26987
26991
|
return mGlobal.clone().multiply(mLocal);
|
|
26988
26992
|
};
|
|
26989
|
-
function ViewImpl$
|
|
26993
|
+
function ViewImpl$4({
|
|
26990
26994
|
drawingId,
|
|
26991
26995
|
pluginId
|
|
26992
26996
|
}) {
|
|
@@ -27041,7 +27045,7 @@ function ViewImpl$3({
|
|
|
27041
27045
|
*
|
|
27042
27046
|
* @internal
|
|
27043
27047
|
*/
|
|
27044
|
-
const View$
|
|
27048
|
+
const View$e = ({
|
|
27045
27049
|
drawingId,
|
|
27046
27050
|
pluginId
|
|
27047
27051
|
}) => {
|
|
@@ -27049,7 +27053,7 @@ const View$d = ({
|
|
|
27049
27053
|
drawingId: drawingId,
|
|
27050
27054
|
pluginId: pluginId,
|
|
27051
27055
|
inCanvas: true
|
|
27052
|
-
}, /*#__PURE__*/React.createElement(ViewImpl$
|
|
27056
|
+
}, /*#__PURE__*/React.createElement(ViewImpl$4, {
|
|
27053
27057
|
drawingId: drawingId,
|
|
27054
27058
|
pluginId: pluginId
|
|
27055
27059
|
}));
|
|
@@ -27096,7 +27100,7 @@ const View$d = ({
|
|
|
27096
27100
|
*
|
|
27097
27101
|
* @internal
|
|
27098
27102
|
*/
|
|
27099
|
-
const description$
|
|
27103
|
+
const description$k = {
|
|
27100
27104
|
name: 'WorkCSys',
|
|
27101
27105
|
version: '1.0.0',
|
|
27102
27106
|
author: 'Ledas',
|
|
@@ -27112,11 +27116,11 @@ const description$j = {
|
|
|
27112
27116
|
}
|
|
27113
27117
|
};
|
|
27114
27118
|
|
|
27115
|
-
var index$
|
|
27119
|
+
var index$k = /*#__PURE__*/Object.freeze({
|
|
27116
27120
|
__proto__: null,
|
|
27117
|
-
Root: Root$
|
|
27118
|
-
View: View$
|
|
27119
|
-
description: description$
|
|
27121
|
+
Root: Root$k,
|
|
27122
|
+
View: View$e,
|
|
27123
|
+
description: description$k
|
|
27120
27124
|
});
|
|
27121
27125
|
|
|
27122
27126
|
const Caption = ({
|
|
@@ -27139,7 +27143,7 @@ const Caption = ({
|
|
|
27139
27143
|
}
|
|
27140
27144
|
}, text)));
|
|
27141
27145
|
};
|
|
27142
|
-
function ViewImpl$
|
|
27146
|
+
function ViewImpl$3({
|
|
27143
27147
|
drawingId,
|
|
27144
27148
|
pluginId
|
|
27145
27149
|
}) {
|
|
@@ -27380,11 +27384,11 @@ function ViewImpl$2({
|
|
|
27380
27384
|
*
|
|
27381
27385
|
* @internal
|
|
27382
27386
|
*/
|
|
27383
|
-
function View$
|
|
27387
|
+
function View$d({
|
|
27384
27388
|
drawingId,
|
|
27385
27389
|
pluginId
|
|
27386
27390
|
}) {
|
|
27387
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$
|
|
27391
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$3, {
|
|
27388
27392
|
drawingId: drawingId,
|
|
27389
27393
|
pluginId: pluginId
|
|
27390
27394
|
}));
|
|
@@ -27422,7 +27426,7 @@ const Extents = ({
|
|
|
27422
27426
|
"data-strong": "true"
|
|
27423
27427
|
}, box ? (box.max[axis] - box.min[axis]).toFixed(2) : /*#__PURE__*/React.createElement("i", null, "\u2013")))));
|
|
27424
27428
|
};
|
|
27425
|
-
function RootImpl$
|
|
27429
|
+
function RootImpl$j({
|
|
27426
27430
|
drawingId,
|
|
27427
27431
|
pluginId
|
|
27428
27432
|
}) {
|
|
@@ -27461,11 +27465,11 @@ function RootImpl$i({
|
|
|
27461
27465
|
*
|
|
27462
27466
|
* @internal
|
|
27463
27467
|
*/
|
|
27464
|
-
function Root$
|
|
27468
|
+
function Root$j({
|
|
27465
27469
|
drawingId,
|
|
27466
27470
|
pluginId
|
|
27467
27471
|
}) {
|
|
27468
|
-
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$
|
|
27472
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$j, {
|
|
27469
27473
|
drawingId: drawingId,
|
|
27470
27474
|
pluginId: pluginId
|
|
27471
27475
|
}));
|
|
@@ -27502,7 +27506,7 @@ function Root$i({
|
|
|
27502
27506
|
*
|
|
27503
27507
|
* @internal
|
|
27504
27508
|
*/
|
|
27505
|
-
const description$
|
|
27509
|
+
const description$j = {
|
|
27506
27510
|
name: 'BoundingBoxInfo',
|
|
27507
27511
|
version: '1.0.0',
|
|
27508
27512
|
author: 'Ledas',
|
|
@@ -27514,6 +27518,1084 @@ const description$i = {
|
|
|
27514
27518
|
}
|
|
27515
27519
|
};
|
|
27516
27520
|
|
|
27521
|
+
var index$j = /*#__PURE__*/Object.freeze({
|
|
27522
|
+
__proto__: null,
|
|
27523
|
+
Root: Root$j,
|
|
27524
|
+
View: View$d,
|
|
27525
|
+
description: description$j
|
|
27526
|
+
});
|
|
27527
|
+
|
|
27528
|
+
const _excluded$3 = ["value", "same", "onWrite"];
|
|
27529
|
+
/** One mount of an editor, on fixed defaults: the stock editors do not follow defaults that change while they are up. */
|
|
27530
|
+
function FieldMount({
|
|
27531
|
+
value: base,
|
|
27532
|
+
same,
|
|
27533
|
+
accept,
|
|
27534
|
+
onWrite,
|
|
27535
|
+
changed,
|
|
27536
|
+
options,
|
|
27537
|
+
render
|
|
27538
|
+
}) {
|
|
27539
|
+
const alive = React.useRef(true);
|
|
27540
|
+
const touched = React.useRef(false);
|
|
27541
|
+
// (what was typed: the editors show it when they fold up)
|
|
27542
|
+
const [userValue, setTyped] = React.useState(base);
|
|
27543
|
+
// (the editors write their defaults back as they unmount: by then the value has moved on)
|
|
27544
|
+
React.useLayoutEffect(() => () => {
|
|
27545
|
+
alive.current = false;
|
|
27546
|
+
}, []);
|
|
27547
|
+
const setUserValue = React.useCallback(value => {
|
|
27548
|
+
if (!alive.current) return;
|
|
27549
|
+
setTyped(value);
|
|
27550
|
+
// (no expressions)
|
|
27551
|
+
if (!accept(value)) return;
|
|
27552
|
+
// (the editors echo their defaults as they mount: only what the user typed is written)
|
|
27553
|
+
if (!touched.current && same(value, base)) return;
|
|
27554
|
+
touched.current = true;
|
|
27555
|
+
onWrite(value);
|
|
27556
|
+
}, [accept, same, onWrite, base]);
|
|
27557
|
+
const isChanged = React.useCallback(() => changed, [changed]);
|
|
27558
|
+
const param = useParam({
|
|
27559
|
+
userValue,
|
|
27560
|
+
setUserValue,
|
|
27561
|
+
defaults: base,
|
|
27562
|
+
isChanged
|
|
27563
|
+
}, undefined, undefined, options);
|
|
27564
|
+
return render(param);
|
|
27565
|
+
}
|
|
27566
|
+
|
|
27567
|
+
/** An editor of a value that may change from elsewhere (a gizmo): it is mounted anew when it does. */
|
|
27568
|
+
function LiveField(_ref) {
|
|
27569
|
+
let {
|
|
27570
|
+
value,
|
|
27571
|
+
same,
|
|
27572
|
+
onWrite
|
|
27573
|
+
} = _ref,
|
|
27574
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
27575
|
+
const [mount, setMount] = React.useState(() => ({
|
|
27576
|
+
rev: 0,
|
|
27577
|
+
base: value
|
|
27578
|
+
}));
|
|
27579
|
+
const written = React.useRef(value);
|
|
27580
|
+
React.useEffect(() => {
|
|
27581
|
+
if (same(value, written.current)) return;
|
|
27582
|
+
written.current = value;
|
|
27583
|
+
setMount(m => ({
|
|
27584
|
+
rev: m.rev + 1,
|
|
27585
|
+
base: value
|
|
27586
|
+
}));
|
|
27587
|
+
}, [value, same]);
|
|
27588
|
+
const write = React.useCallback(v => {
|
|
27589
|
+
written.current = v;
|
|
27590
|
+
onWrite(v);
|
|
27591
|
+
}, [onWrite]);
|
|
27592
|
+
return /*#__PURE__*/React.createElement(FieldMount, _extends({
|
|
27593
|
+
key: mount.rev
|
|
27594
|
+
}, props, {
|
|
27595
|
+
value: mount.base,
|
|
27596
|
+
same: same,
|
|
27597
|
+
onWrite: write
|
|
27598
|
+
}));
|
|
27599
|
+
}
|
|
27600
|
+
|
|
27601
|
+
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; }
|
|
27602
|
+
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; }
|
|
27603
|
+
const Divider = props => {
|
|
27604
|
+
return /*#__PURE__*/React.createElement(antd.Divider, _extends({}, props, {
|
|
27605
|
+
style: _objectSpread$d({
|
|
27606
|
+
margin: '0'
|
|
27607
|
+
}, props.style)
|
|
27608
|
+
}));
|
|
27609
|
+
};
|
|
27610
|
+
|
|
27611
|
+
/** As many planes as a section has at most: as many as the caps take into account, and hardware clipping. */
|
|
27612
|
+
const MAX_PLANES = 8;
|
|
27613
|
+
|
|
27614
|
+
/** A section plane: a point on it, its normal (pointing to what is cut away), and how its gizmo is turned. */
|
|
27615
|
+
|
|
27616
|
+
/** Which solids are cut: only the picked ones, or all but them. */
|
|
27617
|
+
let SectionMode = /*#__PURE__*/function (SectionMode) {
|
|
27618
|
+
SectionMode[SectionMode["Include"] = 0] = "Include";
|
|
27619
|
+
SectionMode[SectionMode["Exclude"] = 1] = "Exclude";
|
|
27620
|
+
return SectionMode;
|
|
27621
|
+
}({});
|
|
27622
|
+
const setState = (drawingId, pluginId, state) => {
|
|
27623
|
+
var _getPlugin;
|
|
27624
|
+
return (_getPlugin = sdkjs.getPlugin(drawingId, pluginId)) == null ? void 0 : _getPlugin.set(state);
|
|
27625
|
+
};
|
|
27626
|
+
const Z = new THREE__namespace.Vector3(0, 0, 1);
|
|
27627
|
+
const round = v => Math.round(v * 1e6) / 1e6;
|
|
27628
|
+
const toVec3T = v => [round(v.x), round(v.y), round(v.z)];
|
|
27629
|
+
|
|
27630
|
+
/** A plane through `position`; `normal` is kept as given (a typed one is not rewritten), its unit for the gizmo. */
|
|
27631
|
+
const planeAt = (position, normal) => {
|
|
27632
|
+
const q = new THREE__namespace.Quaternion().setFromUnitVectors(Z, normal.clone().normalize());
|
|
27633
|
+
return {
|
|
27634
|
+
position: toVec3T(position),
|
|
27635
|
+
normal: toVec3T(normal),
|
|
27636
|
+
rotation: [q.x, q.y, q.z, q.w]
|
|
27637
|
+
};
|
|
27638
|
+
};
|
|
27639
|
+
const planeFromMatrix = matrix => {
|
|
27640
|
+
const p = new THREE__namespace.Vector3();
|
|
27641
|
+
const q = new THREE__namespace.Quaternion();
|
|
27642
|
+
matrix.decompose(p, q, new THREE__namespace.Vector3());
|
|
27643
|
+
return {
|
|
27644
|
+
position: toVec3T(p),
|
|
27645
|
+
normal: toVec3T(Z.clone().applyQuaternion(q)),
|
|
27646
|
+
rotation: [q.x, q.y, q.z, q.w]
|
|
27647
|
+
};
|
|
27648
|
+
};
|
|
27649
|
+
const planeMatrix = plane => new THREE__namespace.Matrix4().compose(new THREE__namespace.Vector3(...plane.position), new THREE__namespace.Quaternion(...plane.rotation), new THREE__namespace.Vector3(1, 1, 1));
|
|
27650
|
+
|
|
27651
|
+
/** The model's centre, cut horizontally: what a new section starts as. */
|
|
27652
|
+
const defaultPlane = drawingId => {
|
|
27653
|
+
var _getDrawing;
|
|
27654
|
+
const bounds = (_getDrawing = sdkjs.getDrawing(drawingId)) == null ? void 0 : _getDrawing.geometry.bounds;
|
|
27655
|
+
const finite = bounds && Number.isFinite(bounds.min.length()) && Number.isFinite(bounds.max.length());
|
|
27656
|
+
const center = finite ? bounds.min.clone().add(bounds.max).multiplyScalar(0.5) : new THREE__namespace.Vector3();
|
|
27657
|
+
return planeAt(center, Z);
|
|
27658
|
+
};
|
|
27659
|
+
|
|
27660
|
+
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; }
|
|
27661
|
+
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; }
|
|
27662
|
+
const useCPState$1 = (drawingId, pluginId, sel) => react.usePlugin(drawingId, pluginId, p => sel(p.state));
|
|
27663
|
+
const modeCaptions = {
|
|
27664
|
+
[SectionMode.Include]: 'Mode: Include',
|
|
27665
|
+
[SectionMode.Exclude]: 'Mode: Exclude'
|
|
27666
|
+
};
|
|
27667
|
+
const unchanged = () => false;
|
|
27668
|
+
const toPoint = ([x, y, z]) => ({
|
|
27669
|
+
x,
|
|
27670
|
+
y,
|
|
27671
|
+
z
|
|
27672
|
+
});
|
|
27673
|
+
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;
|
|
27674
|
+
const isPoint = v => typeof v === 'object' && v !== null && [v.x, v.y, v.z].every(Number.isFinite);
|
|
27675
|
+
const pickFilter = (scope, data) => sdkjs.planeFilter(scope, data) || workPlaneFilter(scope, data);
|
|
27676
|
+
|
|
27677
|
+
/** The plane of a picked work plane or planar face, in world coordinates. */
|
|
27678
|
+
function planeOfItem(drawingId, item) {
|
|
27679
|
+
var _face$geometry, _face$geometry2;
|
|
27680
|
+
const drawing = sdkjs.getDrawing(drawingId);
|
|
27681
|
+
if (item.scope === TreeObjScope) {
|
|
27682
|
+
var _obj$members, _obj$members2, _obj$members3;
|
|
27683
|
+
const obj = drawing.structure.tree[item.data.object.id];
|
|
27684
|
+
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);
|
|
27685
|
+
const normal = obj == null || (_obj$members3 = obj.members) == null ? void 0 : _obj$members3.Normal;
|
|
27686
|
+
if (!obj || !pos || !normal) return undefined;
|
|
27687
|
+
const matrix = drawing.api.structure.calculateGlobalTransformation(obj.id);
|
|
27688
|
+
return planeAt(convertToVector(pos).applyMatrix4(matrix), convertToVector(normal).transformDirection(matrix));
|
|
27689
|
+
}
|
|
27690
|
+
const element = item.data;
|
|
27691
|
+
const [face] = sdkjs.Measure.transform([element], drawingId);
|
|
27692
|
+
if (!(face != null && face.normal)) return undefined;
|
|
27693
|
+
const matrix = drawing.api.structure.calculateGlobalTransformation(element.productId);
|
|
27694
|
+
// (the surface's normal may run against the face's: the mesh shows which way the face looks)
|
|
27695
|
+
const normal = face.normal.clone();
|
|
27696
|
+
const normals = (_face$geometry = face.geometry) == null ? void 0 : _face$geometry.getAttribute('normal');
|
|
27697
|
+
if (normals && normals.count > 0) {
|
|
27698
|
+
const meshNormal = new THREE__namespace.Vector3().fromBufferAttribute(normals, 0);
|
|
27699
|
+
if (meshNormal.transformDirection(matrix).dot(normal) < 0) normal.negate();
|
|
27700
|
+
}
|
|
27701
|
+
// (on the face, at its middle: pointOnPlane may lie far from it)
|
|
27702
|
+
const position = (_face$geometry2 = face.geometry) == null ? void 0 : _face$geometry2.getAttribute('position');
|
|
27703
|
+
if (!position) return planeAt(face.pointOnPlane, normal);
|
|
27704
|
+
const center = new THREE__namespace.Box3().setFromBufferAttribute(position).getCenter(new THREE__namespace.Vector3());
|
|
27705
|
+
const onFace = new THREE__namespace.Plane().setFromNormalAndCoplanarPoint(normal, face.pointOnPlane).projectPoint(center.applyMatrix4(matrix), new THREE__namespace.Vector3());
|
|
27706
|
+
return planeAt(onFace, normal);
|
|
27707
|
+
}
|
|
27708
|
+
|
|
27709
|
+
/** Sets the selected plane from a work plane or planar face the user picks next, through a selector of its own. */
|
|
27710
|
+
const PlanePick = ({
|
|
27711
|
+
drawingId,
|
|
27712
|
+
pluginId
|
|
27713
|
+
}) => {
|
|
27714
|
+
const {
|
|
27715
|
+
Button
|
|
27716
|
+
} = react.useBuerli(buerli => buerli.options.elements);
|
|
27717
|
+
const pickId = `ClippingPlane|${pluginId}|plane`;
|
|
27718
|
+
const picking = react.useDrawing(drawingId, d => d.selection.active === pickId) || false;
|
|
27719
|
+
const remove = React.useRef(undefined);
|
|
27720
|
+
const stop = React.useCallback(() => {
|
|
27721
|
+
remove.current == null || remove.current();
|
|
27722
|
+
remove.current = undefined;
|
|
27723
|
+
}, []);
|
|
27724
|
+
|
|
27725
|
+
// (another field took over the pointer)
|
|
27726
|
+
React.useEffect(() => {
|
|
27727
|
+
!picking && stop();
|
|
27728
|
+
}, [picking, stop]);
|
|
27729
|
+
React.useEffect(() => stop, [stop]);
|
|
27730
|
+
React.useEffect(() => {
|
|
27731
|
+
if (!picking) return;
|
|
27732
|
+
const onKey = e => e.key === 'Escape' && stop();
|
|
27733
|
+
window.addEventListener('keydown', onKey);
|
|
27734
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
27735
|
+
}, [picking, stop]);
|
|
27736
|
+
const start = () => {
|
|
27737
|
+
if (picking) {
|
|
27738
|
+
stop();
|
|
27739
|
+
return;
|
|
27740
|
+
}
|
|
27741
|
+
const onPick = (_selId, _items, diff) => {
|
|
27742
|
+
const plane = diff[0] && planeOfItem(drawingId, diff[0]);
|
|
27743
|
+
plane && setState(drawingId, pluginId, s => s.selected === undefined ? {} : {
|
|
27744
|
+
planes: s.planes.map((p, i) => i === s.selected ? plane : p)
|
|
27745
|
+
});
|
|
27746
|
+
// (not from inside the selector's own select)
|
|
27747
|
+
window.setTimeout(stop);
|
|
27748
|
+
};
|
|
27749
|
+
remove.current = sdkjs.getDrawing(drawingId).api.selection.createSelector(pickId, pickFilter, true, [], 1, onPick);
|
|
27750
|
+
};
|
|
27751
|
+
return (
|
|
27752
|
+
/*#__PURE__*/
|
|
27753
|
+
// (a control fills its row; in the form's column that would squash it below its height)
|
|
27754
|
+
React.createElement(Button, {
|
|
27755
|
+
block: true,
|
|
27756
|
+
type: picking ? 'primary' : 'default',
|
|
27757
|
+
style: {
|
|
27758
|
+
flex: 'none'
|
|
27759
|
+
},
|
|
27760
|
+
onClick: start
|
|
27761
|
+
}, picking ? 'Pick a work plane or a planar face … (Esc)' : 'Set from plane')
|
|
27762
|
+
);
|
|
27763
|
+
};
|
|
27764
|
+
const SelectedPlane = ({
|
|
27765
|
+
drawingId,
|
|
27766
|
+
pluginId,
|
|
27767
|
+
index,
|
|
27768
|
+
plane
|
|
27769
|
+
}) => {
|
|
27770
|
+
const position = React.useMemo(() => toPoint(plane.position), [plane.position]);
|
|
27771
|
+
const normal$1 = React.useMemo(() => toPoint(plane.normal), [plane.normal]);
|
|
27772
|
+
const write = React.useCallback(change => setState(drawingId, pluginId, s => {
|
|
27773
|
+
const next = s.planes[index] && change(s.planes[index]);
|
|
27774
|
+
return next ? {
|
|
27775
|
+
planes: s.planes.map((p, i) => i === index ? next : p)
|
|
27776
|
+
} : {};
|
|
27777
|
+
}), [drawingId, pluginId, index]);
|
|
27778
|
+
const writePosition = React.useCallback(v => write(p => _objectSpread$c(_objectSpread$c({}, p), {}, {
|
|
27779
|
+
position: [v.x, v.y, v.z]
|
|
27780
|
+
})), [write]);
|
|
27781
|
+
const writeNormal = React.useCallback(v => {
|
|
27782
|
+
const n = new THREE__namespace.Vector3(v.x, v.y, v.z);
|
|
27783
|
+
if (n.lengthSq() < 1e-18) return;
|
|
27784
|
+
write(p => planeAt(new THREE__namespace.Vector3(...p.position), n));
|
|
27785
|
+
}, [write]);
|
|
27786
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LiveField, {
|
|
27787
|
+
value: position,
|
|
27788
|
+
same: samePoint,
|
|
27789
|
+
accept: isPoint,
|
|
27790
|
+
onWrite: writePosition,
|
|
27791
|
+
changed: false,
|
|
27792
|
+
render: p => /*#__PURE__*/React.createElement(PointEditor, {
|
|
27793
|
+
drawingId: drawingId,
|
|
27794
|
+
param: p,
|
|
27795
|
+
iconUrl: position3d,
|
|
27796
|
+
caption: "Point on plane"
|
|
27797
|
+
})
|
|
27798
|
+
}), /*#__PURE__*/React.createElement(LiveField, {
|
|
27799
|
+
value: normal$1,
|
|
27800
|
+
same: samePoint,
|
|
27801
|
+
accept: isPoint,
|
|
27802
|
+
onWrite: writeNormal,
|
|
27803
|
+
changed: false,
|
|
27804
|
+
render: p => /*#__PURE__*/React.createElement(PointEditor, {
|
|
27805
|
+
drawingId: drawingId,
|
|
27806
|
+
param: p,
|
|
27807
|
+
iconUrl: normal,
|
|
27808
|
+
caption: "Normal"
|
|
27809
|
+
})
|
|
27810
|
+
}), /*#__PURE__*/React.createElement(PlanePick, {
|
|
27811
|
+
drawingId: drawingId,
|
|
27812
|
+
pluginId: pluginId
|
|
27813
|
+
}));
|
|
27814
|
+
};
|
|
27815
|
+
const Planes = ({
|
|
27816
|
+
drawingId,
|
|
27817
|
+
pluginId
|
|
27818
|
+
}) => {
|
|
27819
|
+
const {
|
|
27820
|
+
Button
|
|
27821
|
+
} = react.useBuerli(buerli => buerli.options.elements);
|
|
27822
|
+
const planes = useCPState$1(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
27823
|
+
const selected = useCPState$1(drawingId, pluginId, s => s.selected);
|
|
27824
|
+
const index = selected !== undefined && selected < planes.length ? selected : undefined;
|
|
27825
|
+
const select = i => setState(drawingId, pluginId, {
|
|
27826
|
+
selected: i
|
|
27827
|
+
});
|
|
27828
|
+
|
|
27829
|
+
// (right after the selected plane)
|
|
27830
|
+
const add = () => setState(drawingId, pluginId, s => {
|
|
27831
|
+
const at = s.selected !== undefined && s.planes[s.selected] ? s.selected + 1 : s.planes.length;
|
|
27832
|
+
return {
|
|
27833
|
+
planes: [...s.planes.slice(0, at), defaultPlane(drawingId), ...s.planes.slice(at)],
|
|
27834
|
+
selected: at
|
|
27835
|
+
};
|
|
27836
|
+
});
|
|
27837
|
+
const remove = () => setState(drawingId, pluginId, s => {
|
|
27838
|
+
if (s.selected === undefined) return {};
|
|
27839
|
+
const rest = s.planes.filter((_, i) => i !== s.selected);
|
|
27840
|
+
return {
|
|
27841
|
+
planes: rest,
|
|
27842
|
+
selected: rest.length > 0 ? Math.min(s.selected, rest.length - 1) : undefined
|
|
27843
|
+
};
|
|
27844
|
+
});
|
|
27845
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Wrapper, {
|
|
27846
|
+
iconUrl: workplane,
|
|
27847
|
+
caption: "Plane"
|
|
27848
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
27849
|
+
className: "rcad-ed-pld-nav"
|
|
27850
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
27851
|
+
className: "rcad-ed-pld-step"
|
|
27852
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
27853
|
+
type: "button",
|
|
27854
|
+
disabled: index === undefined || index === 0,
|
|
27855
|
+
"aria-label": "Previous plane",
|
|
27856
|
+
onClick: () => index !== undefined && select(index - 1)
|
|
27857
|
+
}, /*#__PURE__*/React.createElement(Icon$1, {
|
|
27858
|
+
name: "chevronLeft",
|
|
27859
|
+
size: 14
|
|
27860
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
27861
|
+
className: "rcad-ed-pld-idx"
|
|
27862
|
+
}, index === undefined ? 0 : index + 1, " / ", planes.length), /*#__PURE__*/React.createElement("button", {
|
|
27863
|
+
type: "button",
|
|
27864
|
+
disabled: index === undefined || index >= planes.length - 1,
|
|
27865
|
+
"aria-label": "Next plane",
|
|
27866
|
+
onClick: () => index !== undefined && select(index + 1)
|
|
27867
|
+
}, /*#__PURE__*/React.createElement(Icon$1, {
|
|
27868
|
+
name: "chevronRight",
|
|
27869
|
+
size: 14
|
|
27870
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
27871
|
+
disabled: planes.length >= MAX_PLANES,
|
|
27872
|
+
onClick: add
|
|
27873
|
+
}, "Add"), /*#__PURE__*/React.createElement(Button, {
|
|
27874
|
+
disabled: index === undefined,
|
|
27875
|
+
onClick: remove
|
|
27876
|
+
}, "Delete"))), index !== undefined ? /*#__PURE__*/React.createElement(SelectedPlane
|
|
27877
|
+
// (another plane: its fields are mounted anew)
|
|
27878
|
+
, {
|
|
27879
|
+
key: `${index}/${planes.length}`,
|
|
27880
|
+
drawingId: drawingId,
|
|
27881
|
+
pluginId: pluginId,
|
|
27882
|
+
index: index,
|
|
27883
|
+
plane: planes[index]
|
|
27884
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
27885
|
+
className: "rcad-ed-pld-hint"
|
|
27886
|
+
}, "No section plane. Add one."));
|
|
27887
|
+
};
|
|
27888
|
+
|
|
27889
|
+
/** The solids the mode is about; the picker keeps them as product and solid. */
|
|
27890
|
+
const Solids$1 = ({
|
|
27891
|
+
drawingId,
|
|
27892
|
+
pluginId,
|
|
27893
|
+
mode
|
|
27894
|
+
}) => {
|
|
27895
|
+
const {
|
|
27896
|
+
Selection
|
|
27897
|
+
} = react.useBuerli(buerli => buerli.options.elements);
|
|
27898
|
+
|
|
27899
|
+
// (as the stage picks a solid: one of its faces, standing for it)
|
|
27900
|
+
const initialItems = React.useMemo(() => {
|
|
27901
|
+
var _plugin$refs$pluginId;
|
|
27902
|
+
const {
|
|
27903
|
+
geometry,
|
|
27904
|
+
plugin
|
|
27905
|
+
} = sdkjs.getDrawing(drawingId);
|
|
27906
|
+
const solids = ((_plugin$refs$pluginId = plugin.refs[pluginId]) == null || (_plugin$refs$pluginId = _plugin$refs$pluginId.state) == null ? void 0 : _plugin$refs$pluginId.solids) || [];
|
|
27907
|
+
return solids.map(({
|
|
27908
|
+
productId,
|
|
27909
|
+
containerId
|
|
27910
|
+
}) => {
|
|
27911
|
+
const container = geometry.cache[containerId];
|
|
27912
|
+
const face = container == null ? void 0 : container.meshes[0];
|
|
27913
|
+
return face ? sdkjs.createGraphicItem(productId, _objectSpread$c(_objectSpread$c({}, face), {}, {
|
|
27914
|
+
type: container.type,
|
|
27915
|
+
graphicId: containerId
|
|
27916
|
+
})) : null;
|
|
27917
|
+
}).filter(Boolean);
|
|
27918
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27919
|
+
}, []);
|
|
27920
|
+
const onChange = React.useCallback(items => setState(drawingId, pluginId, {
|
|
27921
|
+
solids: items.map(item => ({
|
|
27922
|
+
productId: item.data.productId,
|
|
27923
|
+
containerId: item.data.graphicId
|
|
27924
|
+
}))
|
|
27925
|
+
}), [drawingId, pluginId]);
|
|
27926
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
27927
|
+
iconUrl: instances,
|
|
27928
|
+
caption: mode === SectionMode.Include ? 'Solids to cut' : 'Solids not to cut'
|
|
27929
|
+
}, /*#__PURE__*/React.createElement(Selection, {
|
|
27930
|
+
drawingId: drawingId,
|
|
27931
|
+
filter: sdkjs.solidFilter,
|
|
27932
|
+
initialItems: initialItems,
|
|
27933
|
+
onChange: onChange
|
|
27934
|
+
}));
|
|
27935
|
+
};
|
|
27936
|
+
function RootImpl$i({
|
|
27937
|
+
drawingId,
|
|
27938
|
+
pluginId
|
|
27939
|
+
}) {
|
|
27940
|
+
var _useCPState;
|
|
27941
|
+
const mode = (_useCPState = useCPState$1(drawingId, pluginId, s => s.mode)) != null ? _useCPState : SectionMode.Exclude;
|
|
27942
|
+
const alive = React.useRef(true);
|
|
27943
|
+
// (the type editor writes its defaults back as it unmounts: the mode is kept for the next time)
|
|
27944
|
+
React.useLayoutEffect(() => () => {
|
|
27945
|
+
alive.current = false;
|
|
27946
|
+
}, []);
|
|
27947
|
+
const setMode = React.useCallback(value => {
|
|
27948
|
+
if (!alive.current) return;
|
|
27949
|
+
setState(drawingId, pluginId, s => ({
|
|
27950
|
+
mode: typeof value === 'function' ? value(s.mode) : value
|
|
27951
|
+
}));
|
|
27952
|
+
}, [drawingId, pluginId]);
|
|
27953
|
+
const modeParam = useParam({
|
|
27954
|
+
userValue: mode,
|
|
27955
|
+
setUserValue: setMode,
|
|
27956
|
+
defaults: SectionMode.Exclude,
|
|
27957
|
+
isChanged: unchanged
|
|
27958
|
+
});
|
|
27959
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27960
|
+
className: "rcad-form"
|
|
27961
|
+
}, /*#__PURE__*/React.createElement(TypeWrapper, null, /*#__PURE__*/React.createElement(TypeEditor, {
|
|
27962
|
+
param: modeParam,
|
|
27963
|
+
types: modeCaptions
|
|
27964
|
+
})), /*#__PURE__*/React.createElement(Solids$1, {
|
|
27965
|
+
drawingId: drawingId,
|
|
27966
|
+
pluginId: pluginId,
|
|
27967
|
+
mode: mode
|
|
27968
|
+
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Planes, {
|
|
27969
|
+
drawingId: drawingId,
|
|
27970
|
+
pluginId: pluginId
|
|
27971
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
27972
|
+
className: "rcad-ed-pld-hint"
|
|
27973
|
+
}, "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."));
|
|
27974
|
+
}
|
|
27975
|
+
|
|
27976
|
+
/**
|
|
27977
|
+
* The panel: which solids are cut, and the section planes.
|
|
27978
|
+
*
|
|
27979
|
+
* @internal
|
|
27980
|
+
*/
|
|
27981
|
+
const Root$i = ({
|
|
27982
|
+
drawingId,
|
|
27983
|
+
pluginId
|
|
27984
|
+
}) => {
|
|
27985
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(RootImpl$i, {
|
|
27986
|
+
drawingId: drawingId,
|
|
27987
|
+
pluginId: pluginId
|
|
27988
|
+
}));
|
|
27989
|
+
};
|
|
27990
|
+
|
|
27991
|
+
const NONE = 1e30;
|
|
27992
|
+
// (a plane that decides nothing: no normal, everything on its kept side)
|
|
27993
|
+
const UNUSED = new THREE__namespace.Vector4(0, 0, 0, 1);
|
|
27994
|
+
|
|
27995
|
+
/**
|
|
27996
|
+
* The cut drawn closed. Where the eye's ray enters what all planes keep, inside a cut body, that body shows a face:
|
|
27997
|
+
* its cap. Each frame the cut bodies are drawn, unclipped, in targets of their own: first the nearest back face
|
|
27998
|
+
* beyond that point, and whose it is; then that body alone is counted up to the point, its front faces adding one
|
|
27999
|
+
* and its back faces taking one away, so that a count of one says the point is inside it. (Counted alone, a body
|
|
28000
|
+
* another overlaps, as a thread in its hole, keeps its cap; drawn as one shell per colour, its shells count
|
|
28001
|
+
* together.) Then that body's back faces draw the cap at the point's depth. Only for WebGPURenderer.
|
|
28002
|
+
*/
|
|
28003
|
+
|
|
28004
|
+
/** A mesh that draws a body's geometry, whichever it has now; `place` puts it where the body is. */
|
|
28005
|
+
function follower(body, material) {
|
|
28006
|
+
const mesh = new THREE__namespace.Mesh(undefined, material);
|
|
28007
|
+
Object.defineProperty(mesh, 'geometry', {
|
|
28008
|
+
get: () => body.geometry,
|
|
28009
|
+
set: () => undefined,
|
|
28010
|
+
configurable: true
|
|
28011
|
+
});
|
|
28012
|
+
mesh.matrixAutoUpdate = false;
|
|
28013
|
+
mesh.matrixWorldAutoUpdate = false;
|
|
28014
|
+
mesh.renderOrder = body.renderOrder;
|
|
28015
|
+
mesh.raycast = () => undefined;
|
|
28016
|
+
return mesh;
|
|
28017
|
+
}
|
|
28018
|
+
const isShown = (object, scene) => {
|
|
28019
|
+
for (let o = object; o; o = o.parent) {
|
|
28020
|
+
if (!o.visible) return false;
|
|
28021
|
+
if (o === scene) return true;
|
|
28022
|
+
}
|
|
28023
|
+
return false;
|
|
28024
|
+
};
|
|
28025
|
+
function createSection() {
|
|
28026
|
+
// (the planes in view space, as three's clipping has them: kept where dot(p, xyz) <= w)
|
|
28027
|
+
const planes = Array.from({
|
|
28028
|
+
length: MAX_PLANES
|
|
28029
|
+
}, () => UNUSED.clone());
|
|
28030
|
+
const list = tsl.uniformArray(planes).setGroup(tsl.renderGroup);
|
|
28031
|
+
|
|
28032
|
+
// Along the fragment's ray from the eye (from afar, for an orthographic camera).
|
|
28033
|
+
const p = tsl.positionView;
|
|
28034
|
+
// (1 for a perspective camera, 0 for an orthographic one: the projection's w of a view direction)
|
|
28035
|
+
const perspective = tsl.cameraProjectionMatrix.mul(tsl.vec4(0, 0, -1, 0)).w;
|
|
28036
|
+
const direction = tsl.mix(tsl.vec3(0, 0, -1), p.normalize(), perspective);
|
|
28037
|
+
const origin = tsl.mix(tsl.vec3(p.x, p.y, 0), tsl.vec3(0), perspective);
|
|
28038
|
+
const start = tsl.mix(tsl.float(-NONE), tsl.float(0), perspective);
|
|
28039
|
+
/** How far along it the fragment is. */
|
|
28040
|
+
const at = p.sub(origin).dot(direction);
|
|
28041
|
+
/** The depth buffer's value for the point `t` along it, as the camera projects it. */
|
|
28042
|
+
const depthAt = t => {
|
|
28043
|
+
const clip = tsl.cameraProjectionMatrix.mul(tsl.vec4(origin.add(direction.mul(t)), 1));
|
|
28044
|
+
const ndc = clip.z.div(clip.w);
|
|
28045
|
+
return tsl.Fn(builder => builder.renderer.coordinateSystem === THREE__namespace.WebGPUCoordinateSystem ? ndc : ndc.mul(0.5).add(0.5))();
|
|
28046
|
+
};
|
|
28047
|
+
/** Where it enters what all planes keep (w, NONE for nowhere), and that plane's view normal, towards the eye. */
|
|
28048
|
+
const entry = tsl.Fn(() => {
|
|
28049
|
+
const enter = tsl.float(start).toVar();
|
|
28050
|
+
const leave = tsl.float(NONE).toVar();
|
|
28051
|
+
const normal = tsl.vec3(0, 0, 1).toVar();
|
|
28052
|
+
tsl.Loop(MAX_PLANES, ({
|
|
28053
|
+
i
|
|
28054
|
+
}) => {
|
|
28055
|
+
// (the array's elements are untyped)
|
|
28056
|
+
const plane = list.element(i);
|
|
28057
|
+
const along = direction.dot(plane.xyz);
|
|
28058
|
+
const side = origin.dot(plane.xyz).sub(plane.w);
|
|
28059
|
+
const crossing = side.negate().div(along);
|
|
28060
|
+
tsl.If(along.lessThan(-1e-6), () => {
|
|
28061
|
+
tsl.If(crossing.greaterThan(enter), () => {
|
|
28062
|
+
enter.assign(crossing);
|
|
28063
|
+
normal.assign(plane.xyz);
|
|
28064
|
+
});
|
|
28065
|
+
}).ElseIf(along.greaterThan(1e-6), () => {
|
|
28066
|
+
leave.assign(tsl.min(leave, crossing));
|
|
28067
|
+
}).ElseIf(side.greaterThan(0), () => {
|
|
28068
|
+
leave.assign(-NONE);
|
|
28069
|
+
});
|
|
28070
|
+
});
|
|
28071
|
+
// (no plane entered: the eye is on the kept side of all of them, and sees no cut)
|
|
28072
|
+
const cut = enter.greaterThan(start).and(enter.lessThan(leave));
|
|
28073
|
+
return tsl.vec4(normal.normalize(), tsl.select(cut, enter, tsl.float(NONE)));
|
|
28074
|
+
});
|
|
28075
|
+
const nearest = new THREE__namespace.RenderTarget(1, 1, {
|
|
28076
|
+
type: THREE__namespace.FloatType,
|
|
28077
|
+
depthBuffer: true,
|
|
28078
|
+
minFilter: THREE__namespace.NearestFilter,
|
|
28079
|
+
magFilter: THREE__namespace.NearestFilter
|
|
28080
|
+
});
|
|
28081
|
+
// (added up, so of a blendable type)
|
|
28082
|
+
const counts = new THREE__namespace.RenderTarget(1, 1, {
|
|
28083
|
+
type: THREE__namespace.HalfFloatType,
|
|
28084
|
+
depthBuffer: false,
|
|
28085
|
+
minFilter: THREE__namespace.NearestFilter,
|
|
28086
|
+
magFilter: THREE__namespace.NearestFilter
|
|
28087
|
+
});
|
|
28088
|
+
const measured = new THREE__namespace.Scene();
|
|
28089
|
+
measured.matrixWorldAutoUpdate = false;
|
|
28090
|
+
const counted = new THREE__namespace.Scene();
|
|
28091
|
+
counted.matrixWorldAutoUpdate = false;
|
|
28092
|
+
const size = new THREE__namespace.Vector2();
|
|
28093
|
+
let state;
|
|
28094
|
+
|
|
28095
|
+
// The body a drawn mesh belongs to, by a label (0 is none); a body's shells share it.
|
|
28096
|
+
const labelOf = new Map();
|
|
28097
|
+
const labels = new WeakMap();
|
|
28098
|
+
const label = tsl.uniform(0).onObjectUpdate(({
|
|
28099
|
+
object
|
|
28100
|
+
}) => object && labels.get(object) || 0);
|
|
28101
|
+
const near = tsl.texture(nearest.texture, tsl.screenUV);
|
|
28102
|
+
const isNear = which => near.a.greaterThan(0.5).and(tsl.abs(near.b.sub(which)).lessThan(0.5));
|
|
28103
|
+
|
|
28104
|
+
// The nearest back face of a cut body beyond the cut: how far (r), whose (b), 1 in a if any.
|
|
28105
|
+
const measurer = new webgpu.NodeMaterial();
|
|
28106
|
+
measurer.name = 'buerli-section-nearest';
|
|
28107
|
+
measurer.side = THREE__namespace.BackSide;
|
|
28108
|
+
measurer.fragmentNode = tsl.Fn(() => {
|
|
28109
|
+
entry().w.greaterThanEqual(at).discard();
|
|
28110
|
+
return tsl.vec4(at, 0, label, 1);
|
|
28111
|
+
})();
|
|
28112
|
+
|
|
28113
|
+
// That body's faces before the cut: a front face adds one, a back face takes one away.
|
|
28114
|
+
const counter = new webgpu.NodeMaterial();
|
|
28115
|
+
counter.name = 'buerli-section-count';
|
|
28116
|
+
counter.fragmentNode = tsl.vec4(tsl.select(at.lessThan(entry().w).and(isNear(label)), tsl.select(tsl.frontFacing, tsl.float(1), tsl.float(-1)), tsl.float(0)), 0, 0, 1);
|
|
28117
|
+
Object.assign(counter, {
|
|
28118
|
+
side: THREE__namespace.DoubleSide,
|
|
28119
|
+
transparent: true,
|
|
28120
|
+
forceSinglePass: true,
|
|
28121
|
+
depthTest: false,
|
|
28122
|
+
depthWrite: false,
|
|
28123
|
+
blending: THREE__namespace.CustomBlending,
|
|
28124
|
+
blendEquation: THREE__namespace.AddEquation,
|
|
28125
|
+
blendSrc: THREE__namespace.OneFactor,
|
|
28126
|
+
blendDst: THREE__namespace.OneFactor,
|
|
28127
|
+
blendEquationAlpha: THREE__namespace.AddEquation,
|
|
28128
|
+
blendSrcAlpha: THREE__namespace.OneFactor,
|
|
28129
|
+
blendDstAlpha: THREE__namespace.OneFactor
|
|
28130
|
+
});
|
|
28131
|
+
const inside = tsl.texture(counts.texture, tsl.screenUV).r.greaterThan(0.5);
|
|
28132
|
+
const spacing = tsl.uniform(10);
|
|
28133
|
+
/** The hatch on the plane the ray enters at `cut`: diagonal lines in the plane, `spacing` apart, a pixel wide. */
|
|
28134
|
+
const hatchOf = cut => {
|
|
28135
|
+
const point = tsl.cameraWorldMatrix.mul(tsl.vec4(origin.add(direction.mul(cut.w)), 1)).xyz;
|
|
28136
|
+
const normal = tsl.cameraWorldMatrix.mul(tsl.vec4(cut.xyz, 0)).xyz;
|
|
28137
|
+
const up = tsl.select(tsl.abs(normal.y).lessThan(0.9), tsl.vec3(0, 1, 0), tsl.vec3(1, 0, 0));
|
|
28138
|
+
const tangent = normal.cross(up).normalize();
|
|
28139
|
+
const k = point.dot(tangent.add(normal.cross(tangent))).div(spacing);
|
|
28140
|
+
const w = tsl.fwidth(k);
|
|
28141
|
+
// (gone where the lines are closer than pixels)
|
|
28142
|
+
const line = tsl.float(1).sub(tsl.smoothstep(w.mul(0.6), w.mul(1.4), tsl.abs(tsl.fract(k).sub(0.5)))).mul(tsl.clamp(tsl.float(1).sub(w.mul(2)), 0, 1));
|
|
28143
|
+
return tsl.mix(tsl.float(1), tsl.float(0.82), line);
|
|
28144
|
+
};
|
|
28145
|
+
const capOf = (body, own) => {
|
|
28146
|
+
var _source$color;
|
|
28147
|
+
const source = body.material;
|
|
28148
|
+
const material = new webgpu.MeshLambertNodeMaterial({
|
|
28149
|
+
color: (_source$color = source.color) == null ? void 0 : _source$color.clone().multiplyScalar(0.85),
|
|
28150
|
+
side: THREE__namespace.BackSide
|
|
28151
|
+
});
|
|
28152
|
+
material.name = 'buerli-section-cap';
|
|
28153
|
+
const cut = entry();
|
|
28154
|
+
// (the pixel is decided by what its centre measured: every sample this body's back faces cover takes the cap,
|
|
28155
|
+
// whichever face covers it, so that a crease or a silhouette among them leaves no sample out)
|
|
28156
|
+
material.normalNode = cut.xyz;
|
|
28157
|
+
material.maskNode = cut.w.lessThan(at).and(isNear(tsl.float(own))).and(inside);
|
|
28158
|
+
// (at the point on the plane, projected as the camera projects: its near and far need not be what made that)
|
|
28159
|
+
material.depthNode = depthAt(cut.w);
|
|
28160
|
+
material.colorNode = tsl.materialColor.mul(hatchOf(cut));
|
|
28161
|
+
const cap = follower(body, material);
|
|
28162
|
+
cap.name = 'section-cap';
|
|
28163
|
+
return cap;
|
|
28164
|
+
};
|
|
28165
|
+
const copies = new Map();
|
|
28166
|
+
const remove = body => {
|
|
28167
|
+
const copy = copies.get(body);
|
|
28168
|
+
if (!copy) return;
|
|
28169
|
+
copy.cap.removeFromParent();
|
|
28170
|
+
copy.cap.material.dispose();
|
|
28171
|
+
copy.measurer.removeFromParent();
|
|
28172
|
+
copy.counter.removeFromParent();
|
|
28173
|
+
copies.delete(body);
|
|
28174
|
+
};
|
|
28175
|
+
return {
|
|
28176
|
+
update(clipping, camera) {
|
|
28177
|
+
planes.forEach((plane, i) => {
|
|
28178
|
+
if (!clipping[i]) {
|
|
28179
|
+
plane.copy(UNUSED);
|
|
28180
|
+
return;
|
|
28181
|
+
}
|
|
28182
|
+
const view = clipping[i].clone().applyMatrix4(camera.matrixWorldInverse);
|
|
28183
|
+
plane.set(-view.normal.x, -view.normal.y, -view.normal.z, view.constant);
|
|
28184
|
+
});
|
|
28185
|
+
},
|
|
28186
|
+
count(renderer, scene, camera) {
|
|
28187
|
+
copies.forEach(({
|
|
28188
|
+
cap,
|
|
28189
|
+
measurer: m,
|
|
28190
|
+
counter: c
|
|
28191
|
+
}, body) => {
|
|
28192
|
+
const shown = isShown(body, scene);
|
|
28193
|
+
for (const mesh of [cap, m, c]) {
|
|
28194
|
+
mesh.visible = shown;
|
|
28195
|
+
mesh.matrixWorld.copy(body.matrixWorld);
|
|
28196
|
+
}
|
|
28197
|
+
});
|
|
28198
|
+
renderer.getDrawingBufferSize(size);
|
|
28199
|
+
for (const t of [nearest, counts]) if (t.width !== size.x || t.height !== size.y) t.setSize(size.x, size.y);
|
|
28200
|
+
// (made on the first call, reused after)
|
|
28201
|
+
state = webgpu.RendererUtils.resetRendererState(renderer, state);
|
|
28202
|
+
try {
|
|
28203
|
+
renderer.setClearColor(0x000000, 0);
|
|
28204
|
+
renderer.autoClear = true;
|
|
28205
|
+
renderer.setRenderTarget(nearest);
|
|
28206
|
+
renderer.render(measured, camera);
|
|
28207
|
+
renderer.setRenderTarget(counts);
|
|
28208
|
+
renderer.render(counted, camera);
|
|
28209
|
+
} finally {
|
|
28210
|
+
webgpu.RendererUtils.restoreRendererState(renderer, state);
|
|
28211
|
+
}
|
|
28212
|
+
},
|
|
28213
|
+
add(body, root, key) {
|
|
28214
|
+
if (copies.has(body)) return;
|
|
28215
|
+
let own = labelOf.get(key);
|
|
28216
|
+
if (!own) labelOf.set(key, own = labelOf.size + 1);
|
|
28217
|
+
const copy = {
|
|
28218
|
+
cap: capOf(body, own),
|
|
28219
|
+
measurer: follower(body, measurer),
|
|
28220
|
+
counter: follower(body, counter)
|
|
28221
|
+
};
|
|
28222
|
+
labels.set(copy.measurer, own);
|
|
28223
|
+
labels.set(copy.counter, own);
|
|
28224
|
+
root.add(copy.cap);
|
|
28225
|
+
measured.add(copy.measurer);
|
|
28226
|
+
counted.add(copy.counter);
|
|
28227
|
+
copies.set(body, copy);
|
|
28228
|
+
},
|
|
28229
|
+
setHatch(units) {
|
|
28230
|
+
spacing.value = units;
|
|
28231
|
+
},
|
|
28232
|
+
remove,
|
|
28233
|
+
bodies: () => [...copies.keys()],
|
|
28234
|
+
dispose() {
|
|
28235
|
+
[...copies.keys()].forEach(remove);
|
|
28236
|
+
measurer.dispose();
|
|
28237
|
+
counter.dispose();
|
|
28238
|
+
nearest.dispose();
|
|
28239
|
+
counts.dispose();
|
|
28240
|
+
}
|
|
28241
|
+
};
|
|
28242
|
+
}
|
|
28243
|
+
|
|
28244
|
+
const useCPState = (drawingId, pluginId, sel) => react.usePlugin(drawingId, pluginId, p => sel(p.state));
|
|
28245
|
+
const IDLE = '#8a909b';
|
|
28246
|
+
const idleAxes = [IDLE, IDLE, IDLE];
|
|
28247
|
+
// (only the normal in colour: the in-plane axes just slide and turn it)
|
|
28248
|
+
const IN_PLANE = '#6f6f6f';
|
|
28249
|
+
const activeAxes = [IN_PLANE, IN_PLANE, '#2080ff'];
|
|
28250
|
+
|
|
28251
|
+
/**
|
|
28252
|
+
* Three's ClippingGroup (WebGPURenderer) is any group with these: a solid's own group gets them, so that its
|
|
28253
|
+
* geometry is clipped without being moved under another parent. WebGLRenderer ignores them.
|
|
28254
|
+
*/
|
|
28255
|
+
|
|
28256
|
+
const clipKeys = ['isClippingGroup', 'enabled', 'clippingPlanes', 'clipIntersection', 'clipShadows'];
|
|
28257
|
+
|
|
28258
|
+
// (on its kept side everywhere: with what any plane cuts cut away, it changes nothing)
|
|
28259
|
+
const NEUTRAL$1 = new THREE__namespace.Plane(new THREE__namespace.Vector3(0, 0, 1), 1e9);
|
|
28260
|
+
// (the caps' hatch: this many lines over the model's extent)
|
|
28261
|
+
const HATCH_LINES = 15;
|
|
28262
|
+
const isDrawn = o => o.isMesh || o.isLine || o.isPoints;
|
|
28263
|
+
|
|
28264
|
+
// (as three walks a tree: an object that answers false keeps its children out)
|
|
28265
|
+
function descend(object, raycaster, intersects) {
|
|
28266
|
+
if (object.layers.test(raycaster.layers) && object.raycast(raycaster, intersects) === false) return;
|
|
28267
|
+
object.children.forEach(child => descend(child, raycaster, intersects));
|
|
28268
|
+
}
|
|
28269
|
+
|
|
28270
|
+
/**
|
|
28271
|
+
* The pointer passes through what is cut away. On the solid's group, so that whatever is drawn under it later is
|
|
28272
|
+
* covered too: its objects are hit here, the hits in the cut dropped, and three is told not to walk them again.
|
|
28273
|
+
*/
|
|
28274
|
+
function clippedRaycast(raycaster, intersects) {
|
|
28275
|
+
var _this$clippingPlanes;
|
|
28276
|
+
const start = intersects.length;
|
|
28277
|
+
this.children.forEach(child => descend(child, raycaster, intersects));
|
|
28278
|
+
const planes = this.enabled ? (_this$clippingPlanes = this.clippingPlanes) != null ? _this$clippingPlanes : [] : [];
|
|
28279
|
+
for (let i = intersects.length - 1; i >= start; i--) {
|
|
28280
|
+
const {
|
|
28281
|
+
point
|
|
28282
|
+
} = intersects[i];
|
|
28283
|
+
if (planes.some(plane => plane.distanceToPoint(point) < 0)) intersects.splice(i, 1);
|
|
28284
|
+
}
|
|
28285
|
+
return false;
|
|
28286
|
+
}
|
|
28287
|
+
function unclip(group) {
|
|
28288
|
+
clipKeys.forEach(key => delete group[key]);
|
|
28289
|
+
delete group.raycast;
|
|
28290
|
+
}
|
|
28291
|
+
|
|
28292
|
+
/** A body the cut shows the inside of: opaque faces. */
|
|
28293
|
+
const isCappable = o => {
|
|
28294
|
+
const material = o.material;
|
|
28295
|
+
return !!o.isMesh && !!material && !Array.isArray(material) && !material.transparent && !material.wireframe;
|
|
28296
|
+
};
|
|
28297
|
+
|
|
28298
|
+
/** The group of the solid a drawn object of the model belongs to (react's Product), else its parent. */
|
|
28299
|
+
function solidGroupOf(object) {
|
|
28300
|
+
const {
|
|
28301
|
+
containerId
|
|
28302
|
+
} = object.userData;
|
|
28303
|
+
for (let o = object.parent; o; o = o.parent) {
|
|
28304
|
+
var _o$userData;
|
|
28305
|
+
if (((_o$userData = o.userData) == null ? void 0 : _o$userData.id) === containerId) return o;
|
|
28306
|
+
}
|
|
28307
|
+
return object.parent;
|
|
28308
|
+
}
|
|
28309
|
+
|
|
28310
|
+
/** Clips the solids the mode says by the planes, as long as the view is up. */
|
|
28311
|
+
function useClipping(drawingId, pluginId) {
|
|
28312
|
+
var _useCPState;
|
|
28313
|
+
const {
|
|
28314
|
+
scene,
|
|
28315
|
+
invalidate,
|
|
28316
|
+
gl
|
|
28317
|
+
} = fiber.useThree();
|
|
28318
|
+
|
|
28319
|
+
// (the caps are drawn where no clipping group clips them)
|
|
28320
|
+
const [capsRoot] = React.useState(() => new THREE__namespace.Group());
|
|
28321
|
+
const [section, setSection] = React.useState(null);
|
|
28322
|
+
React.useEffect(() => {
|
|
28323
|
+
if (!gl.isWebGPURenderer) return;
|
|
28324
|
+
const made = createSection();
|
|
28325
|
+
scene.add(capsRoot);
|
|
28326
|
+
setSection(made);
|
|
28327
|
+
return () => {
|
|
28328
|
+
made.dispose();
|
|
28329
|
+
capsRoot.removeFromParent();
|
|
28330
|
+
setSection(null);
|
|
28331
|
+
};
|
|
28332
|
+
}, [gl, scene, capsRoot]);
|
|
28333
|
+
const planes = useCPState(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
28334
|
+
const mode = (_useCPState = useCPState(drawingId, pluginId, s => s.mode)) != null ? _useCPState : SectionMode.Exclude;
|
|
28335
|
+
const solids = useCPState(drawingId, pluginId, s => s.solids) || EMPTYARRAY;
|
|
28336
|
+
const stamp = react.useDrawing(drawingId, d => d.geometry.stamp);
|
|
28337
|
+
const tree = react.useDrawing(drawingId, d => d.structure.tree);
|
|
28338
|
+
// (the overlays of what is hovered and selected are drawn then, tagged with their solid: cut like it)
|
|
28339
|
+
const hovered = react.useDrawing(drawingId, d => d.interaction.hovered);
|
|
28340
|
+
const selected = react.useDrawing(drawingId, d => d.interaction.selected);
|
|
28341
|
+
const clipping = React.useRef([]);
|
|
28342
|
+
const clipped = React.useRef(new Set());
|
|
28343
|
+
const salted = React.useRef(false);
|
|
28344
|
+
const planesFor = () => salted.current ? [...clipping.current, NEUTRAL$1] : clipping.current;
|
|
28345
|
+
|
|
28346
|
+
// (the planes are changed in place while their number stays: no group is visited for a drag)
|
|
28347
|
+
React.useLayoutEffect(() => {
|
|
28348
|
+
var _getDrawing;
|
|
28349
|
+
// (a hair more is cut, so a face lying in a plane goes whole, not pixel by pixel as rounding has it)
|
|
28350
|
+
const bounds = (_getDrawing = sdkjs.getDrawing(drawingId)) == null ? void 0 : _getDrawing.geometry.bounds;
|
|
28351
|
+
const extent = bounds && bounds.max.clone().sub(bounds.min).length();
|
|
28352
|
+
const hair = extent && Number.isFinite(extent) ? extent * 1e-5 : 1e-4;
|
|
28353
|
+
section == null || section.setHatch(extent && Number.isFinite(extent) ? extent / HATCH_LINES : 10);
|
|
28354
|
+
const next = planes.map(p => {
|
|
28355
|
+
const plane = new THREE__namespace.Plane().setFromNormalAndCoplanarPoint(new THREE__namespace.Vector3(...p.normal).normalize().negate(), new THREE__namespace.Vector3(...p.position));
|
|
28356
|
+
plane.constant -= hair;
|
|
28357
|
+
return plane;
|
|
28358
|
+
});
|
|
28359
|
+
if (next.length === clipping.current.length) {
|
|
28360
|
+
next.forEach((plane, i) => clipping.current[i].copy(plane));
|
|
28361
|
+
} else {
|
|
28362
|
+
clipping.current = next;
|
|
28363
|
+
const groupPlanes = planesFor();
|
|
28364
|
+
clipped.current.forEach(group => group.clippingPlanes = groupPlanes);
|
|
28365
|
+
}
|
|
28366
|
+
invalidate();
|
|
28367
|
+
}, [drawingId, planes, invalidate, section]);
|
|
28368
|
+
React.useEffect(() => {
|
|
28369
|
+
const cuts = (productId, containerId) => solids.some(s => s.productId === productId && s.containerId === containerId) === (mode === SectionMode.Include);
|
|
28370
|
+
const apply = () => {
|
|
28371
|
+
const wanted = new Set();
|
|
28372
|
+
const bodies = new Map();
|
|
28373
|
+
scene.traverse(object => {
|
|
28374
|
+
var _object$userData;
|
|
28375
|
+
const {
|
|
28376
|
+
productId,
|
|
28377
|
+
containerId
|
|
28378
|
+
} = (_object$userData = object.userData) != null ? _object$userData : {};
|
|
28379
|
+
if (containerId === undefined || !isDrawn(object) || !cuts(productId, containerId)) return;
|
|
28380
|
+
const group = solidGroupOf(object);
|
|
28381
|
+
if (!group) return;
|
|
28382
|
+
wanted.add(group);
|
|
28383
|
+
// (the shells of one solid, one per colour, are one body to the caps)
|
|
28384
|
+
if (isCappable(object)) bodies.set(object, `${productId}|${containerId}`);
|
|
28385
|
+
});
|
|
28386
|
+
clipped.current.forEach(group => !wanted.has(group) && unclip(group));
|
|
28387
|
+
if (section) {
|
|
28388
|
+
// (a body no longer cut, or drawn anew, which takes the old one out of the scene)
|
|
28389
|
+
section.bodies().forEach(body => !bodies.has(body) && section.remove(body));
|
|
28390
|
+
bodies.forEach((key, body) => section.add(body, capsRoot, key));
|
|
28391
|
+
}
|
|
28392
|
+
// (three shares a clipped shader with the planes of the group it was built for: rebuild it from live groups)
|
|
28393
|
+
const same = wanted.size === clipped.current.size && [...wanted].every(group => clipped.current.has(group));
|
|
28394
|
+
if (!same) salted.current = !salted.current;
|
|
28395
|
+
const groupPlanes = planesFor();
|
|
28396
|
+
wanted.forEach(group => {
|
|
28397
|
+
Object.assign(group, {
|
|
28398
|
+
isClippingGroup: true,
|
|
28399
|
+
enabled: true,
|
|
28400
|
+
clippingPlanes: groupPlanes,
|
|
28401
|
+
// (what any plane cuts is cut: what is kept is what all planes keep)
|
|
28402
|
+
clipIntersection: false,
|
|
28403
|
+
clipShadows: false
|
|
28404
|
+
});
|
|
28405
|
+
group.raycast = clippedRaycast;
|
|
28406
|
+
});
|
|
28407
|
+
clipped.current = wanted;
|
|
28408
|
+
invalidate();
|
|
28409
|
+
};
|
|
28410
|
+
apply();
|
|
28411
|
+
// (a solid that came with the change is drawn a moment later)
|
|
28412
|
+
const timer = window.setTimeout(apply, 100);
|
|
28413
|
+
return () => window.clearTimeout(timer);
|
|
28414
|
+
}, [scene, invalidate, mode, solids, stamp, tree, hovered, selected, section, capsRoot]);
|
|
28415
|
+
|
|
28416
|
+
// Before the stage draws: the caps where their bodies are, and the bodies counted for them.
|
|
28417
|
+
fiber.useFrame(({
|
|
28418
|
+
camera
|
|
28419
|
+
}) => {
|
|
28420
|
+
if (!section || section.bodies().length === 0) return;
|
|
28421
|
+
scene.updateMatrixWorld();
|
|
28422
|
+
camera.updateMatrixWorld();
|
|
28423
|
+
section.update(clipping.current, camera);
|
|
28424
|
+
section.count(gl, scene, camera);
|
|
28425
|
+
});
|
|
28426
|
+
React.useEffect(() => () => {
|
|
28427
|
+
clipped.current.forEach(unclip);
|
|
28428
|
+
clipped.current.clear();
|
|
28429
|
+
invalidate();
|
|
28430
|
+
}, [invalidate]);
|
|
28431
|
+
}
|
|
28432
|
+
|
|
28433
|
+
/** A plane's origin: clicked, the plane is selected. */
|
|
28434
|
+
const Origin = ({
|
|
28435
|
+
drawingId,
|
|
28436
|
+
pluginId,
|
|
28437
|
+
index,
|
|
28438
|
+
plane,
|
|
28439
|
+
color
|
|
28440
|
+
}) => {
|
|
28441
|
+
const stage = useStage();
|
|
28442
|
+
const [hovered, setHovered] = React.useState(false);
|
|
28443
|
+
drei.useCursor(hovered);
|
|
28444
|
+
const position = React.useMemo(() => new THREE__namespace.Vector3(...plane.position), [plane.position]);
|
|
28445
|
+
const ref = useConstantSize(position, sf => [4 * sf, 4 * sf, 4 * sf]);
|
|
28446
|
+
const onClick = React.useCallback(e => {
|
|
28447
|
+
if (e.delta > deltaTolerance) return;
|
|
28448
|
+
e.stopPropagation();
|
|
28449
|
+
setState(drawingId, pluginId, {
|
|
28450
|
+
selected: index
|
|
28451
|
+
});
|
|
28452
|
+
}, [drawingId, pluginId, index]);
|
|
28453
|
+
return /*#__PURE__*/React.createElement("mesh", {
|
|
28454
|
+
ref: ref,
|
|
28455
|
+
position: position,
|
|
28456
|
+
renderOrder: 700,
|
|
28457
|
+
userData: {
|
|
28458
|
+
onHUD: true
|
|
28459
|
+
},
|
|
28460
|
+
onClick: onClick,
|
|
28461
|
+
onPointerOver: e => {
|
|
28462
|
+
e.stopPropagation();
|
|
28463
|
+
setHovered(true);
|
|
28464
|
+
},
|
|
28465
|
+
onPointerOut: e => {
|
|
28466
|
+
e.stopPropagation();
|
|
28467
|
+
setHovered(false);
|
|
28468
|
+
}
|
|
28469
|
+
}, /*#__PURE__*/React.createElement("sphereGeometry", {
|
|
28470
|
+
args: [1, 12, 12]
|
|
28471
|
+
}), /*#__PURE__*/React.createElement("meshBasicMaterial", {
|
|
28472
|
+
color: hovered ? stage.hover : color,
|
|
28473
|
+
depthTest: false,
|
|
28474
|
+
transparent: true
|
|
28475
|
+
}));
|
|
28476
|
+
};
|
|
28477
|
+
|
|
28478
|
+
/** The gizmo of a plane: all of it for the selected one, its normal alone (in grey) for the others. */
|
|
28479
|
+
const PlaneGizmo = ({
|
|
28480
|
+
drawingId,
|
|
28481
|
+
pluginId,
|
|
28482
|
+
index,
|
|
28483
|
+
plane,
|
|
28484
|
+
active
|
|
28485
|
+
}) => {
|
|
28486
|
+
const stage = useStage();
|
|
28487
|
+
|
|
28488
|
+
// (a new matrix every time: PivotControls takes the object itself as its matrix)
|
|
28489
|
+
const matrix = React.useMemo(() => planeMatrix(plane), [plane]);
|
|
28490
|
+
const onDrag = React.useCallback(l => setState(drawingId, pluginId, s => ({
|
|
28491
|
+
planes: s.planes.map((p, i) => i === index ? planeFromMatrix(l) : p)
|
|
28492
|
+
})), [drawingId, pluginId, index]);
|
|
28493
|
+
const idle = active ? {
|
|
28494
|
+
axisColors: activeAxes
|
|
28495
|
+
} : {
|
|
28496
|
+
activeAxes: [false, false, true],
|
|
28497
|
+
disableSliders: true,
|
|
28498
|
+
disableRotations: true,
|
|
28499
|
+
axisColors: idleAxes
|
|
28500
|
+
};
|
|
28501
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Origin, {
|
|
28502
|
+
drawingId: drawingId,
|
|
28503
|
+
pluginId: pluginId,
|
|
28504
|
+
index: index,
|
|
28505
|
+
plane: plane,
|
|
28506
|
+
color: active ? stage.select : IDLE
|
|
28507
|
+
}), /*#__PURE__*/React.createElement(drei.PivotControls, _extends({
|
|
28508
|
+
matrix: matrix,
|
|
28509
|
+
autoTransform: false,
|
|
28510
|
+
fixed: true,
|
|
28511
|
+
scale: 96,
|
|
28512
|
+
lineWidth: 3.5,
|
|
28513
|
+
hoveredColor: stage.select
|
|
28514
|
+
// (drei 10's prop; the drei 9 types some installs resolve do not know it)
|
|
28515
|
+
,
|
|
28516
|
+
disableScaling: true
|
|
28517
|
+
}, idle, {
|
|
28518
|
+
annotations: false,
|
|
28519
|
+
userData: {
|
|
28520
|
+
onHUD: true
|
|
28521
|
+
},
|
|
28522
|
+
onDragStart: () => !active && setState(drawingId, pluginId, {
|
|
28523
|
+
selected: index
|
|
28524
|
+
}),
|
|
28525
|
+
onDrag: onDrag
|
|
28526
|
+
})));
|
|
28527
|
+
};
|
|
28528
|
+
function ViewImpl$2({
|
|
28529
|
+
drawingId,
|
|
28530
|
+
pluginId
|
|
28531
|
+
}) {
|
|
28532
|
+
useClipping(drawingId, pluginId);
|
|
28533
|
+
const planes = useCPState(drawingId, pluginId, s => s.planes) || EMPTYARRAY;
|
|
28534
|
+
const selected = useCPState(drawingId, pluginId, s => s.selected);
|
|
28535
|
+
return /*#__PURE__*/React.createElement(HUD$1, null, planes.map((plane, i) => /*#__PURE__*/React.createElement(PlaneGizmo, {
|
|
28536
|
+
key: i,
|
|
28537
|
+
drawingId: drawingId,
|
|
28538
|
+
pluginId: pluginId,
|
|
28539
|
+
index: i,
|
|
28540
|
+
plane: plane,
|
|
28541
|
+
active: i === selected
|
|
28542
|
+
})));
|
|
28543
|
+
}
|
|
28544
|
+
|
|
28545
|
+
/**
|
|
28546
|
+
* The section in the scene: the solids cut, and a gizmo for each plane.
|
|
28547
|
+
*
|
|
28548
|
+
* @internal
|
|
28549
|
+
*/
|
|
28550
|
+
const View$c = ({
|
|
28551
|
+
drawingId,
|
|
28552
|
+
pluginId
|
|
28553
|
+
}) => {
|
|
28554
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ViewImpl$2, {
|
|
28555
|
+
drawingId: drawingId,
|
|
28556
|
+
pluginId: pluginId
|
|
28557
|
+
}));
|
|
28558
|
+
};
|
|
28559
|
+
|
|
28560
|
+
/**
|
|
28561
|
+
* A section view: the model cut by planes, to see inside it.
|
|
28562
|
+
*
|
|
28563
|
+
* It is a global plugin: an app adds it to `init`'s `globalPlugins`, and the `ViewPlugButtons` have a button that opens
|
|
28564
|
+
* it. While it is open, each plane cuts away what its normal points to, from the picked solids only (Include) or from
|
|
28565
|
+
* all but them (Exclude). A plane is moved and turned with its gizmo, typed in, or set from a work plane or a planar
|
|
28566
|
+
* face. The cut is drawn by `WebGPURenderer` (Buerligons' stage); `WebGLRenderer` draws the model whole.
|
|
28567
|
+
*
|
|
28568
|
+
* @example
|
|
28569
|
+
* ```tsx
|
|
28570
|
+
* import { init, WASMClient } from '@buerli.io/classcad'
|
|
28571
|
+
* import { SectionView, elements } from '@buerli.io/react-cad'
|
|
28572
|
+
*
|
|
28573
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), { elements, globalPlugins: [SectionView] })
|
|
28574
|
+
* ```
|
|
28575
|
+
*
|
|
28576
|
+
* @category Tool Plugins
|
|
28577
|
+
* @module
|
|
28578
|
+
*/
|
|
28579
|
+
|
|
28580
|
+
/**
|
|
28581
|
+
* The plugin's description for buerli's plugin system.
|
|
28582
|
+
*
|
|
28583
|
+
* @internal
|
|
28584
|
+
*/
|
|
28585
|
+
const description$i = {
|
|
28586
|
+
name: 'SectionView',
|
|
28587
|
+
version: '1.0.0',
|
|
28588
|
+
author: 'AWV',
|
|
28589
|
+
persistent: true,
|
|
28590
|
+
global: true,
|
|
28591
|
+
initialState: {
|
|
28592
|
+
planes: [],
|
|
28593
|
+
selected: undefined,
|
|
28594
|
+
mode: SectionMode.Exclude,
|
|
28595
|
+
solids: []
|
|
28596
|
+
}
|
|
28597
|
+
};
|
|
28598
|
+
|
|
27517
28599
|
var index$i = /*#__PURE__*/Object.freeze({
|
|
27518
28600
|
__proto__: null,
|
|
27519
28601
|
Root: Root$i,
|
|
@@ -32001,6 +33083,92 @@ const editorsStyle = styled.css`
|
|
|
32001
33083
|
.rcad-ed-limited .ant-slider-dot {
|
|
32002
33084
|
display: none;
|
|
32003
33085
|
}
|
|
33086
|
+
|
|
33087
|
+
/* ---- an advanced polyline: the selected point, which of them it is, and a hint */
|
|
33088
|
+
.rcad-ed-pld-nav {
|
|
33089
|
+
display: flex;
|
|
33090
|
+
flex: 1 1 0;
|
|
33091
|
+
align-items: center;
|
|
33092
|
+
gap: 4px;
|
|
33093
|
+
width: 100%;
|
|
33094
|
+
min-width: 0;
|
|
33095
|
+
}
|
|
33096
|
+
/* (previous, which, next: one control, its parts parted by rules) */
|
|
33097
|
+
.rcad-ed-pld-step {
|
|
33098
|
+
display: flex;
|
|
33099
|
+
flex: none;
|
|
33100
|
+
align-items: stretch;
|
|
33101
|
+
height: var(--rcad-ctl-h);
|
|
33102
|
+
border: 1px solid var(--rcad-line);
|
|
33103
|
+
border-radius: var(--rcad-r-ctl);
|
|
33104
|
+
background: var(--rcad-panel-2);
|
|
33105
|
+
overflow: hidden;
|
|
33106
|
+
transition: border-color 0.15s;
|
|
33107
|
+
}
|
|
33108
|
+
.rcad-ed-pld-step:hover {
|
|
33109
|
+
border-color: var(--rcad-line-2);
|
|
33110
|
+
}
|
|
33111
|
+
.rcad-ed-pld-step > button {
|
|
33112
|
+
display: grid;
|
|
33113
|
+
flex: none;
|
|
33114
|
+
place-items: center;
|
|
33115
|
+
width: calc(var(--rcad-ctl-h) - 4px);
|
|
33116
|
+
padding: 0;
|
|
33117
|
+
border: 0;
|
|
33118
|
+
background: transparent;
|
|
33119
|
+
color: var(--rcad-mute);
|
|
33120
|
+
cursor: pointer;
|
|
33121
|
+
transition:
|
|
33122
|
+
background-color 0.15s,
|
|
33123
|
+
color 0.15s;
|
|
33124
|
+
}
|
|
33125
|
+
.rcad-ed-pld-step > button:hover:not(:disabled) {
|
|
33126
|
+
background: var(--rcad-hover);
|
|
33127
|
+
color: var(--rcad-ink);
|
|
33128
|
+
}
|
|
33129
|
+
.rcad-ed-pld-step > button:focus-visible {
|
|
33130
|
+
outline: 2px solid var(--rcad-accent-line);
|
|
33131
|
+
outline-offset: -2px;
|
|
33132
|
+
}
|
|
33133
|
+
.rcad-ed-pld-step > button:disabled {
|
|
33134
|
+
color: var(--rcad-dim);
|
|
33135
|
+
opacity: 0.5;
|
|
33136
|
+
cursor: default;
|
|
33137
|
+
}
|
|
33138
|
+
/* (as wide for "1 / 1" as for "999 / 999": the digits are as wide as each other) */
|
|
33139
|
+
.rcad-ed-pld-idx {
|
|
33140
|
+
display: grid;
|
|
33141
|
+
flex: none;
|
|
33142
|
+
place-items: center;
|
|
33143
|
+
width: 55px;
|
|
33144
|
+
border-right: 1px solid var(--rcad-line);
|
|
33145
|
+
border-left: 1px solid var(--rcad-line);
|
|
33146
|
+
color: var(--rcad-ink);
|
|
33147
|
+
font: 500 11px/1 var(--rcad-font-mono);
|
|
33148
|
+
font-variant-numeric: tabular-nums;
|
|
33149
|
+
white-space: nowrap;
|
|
33150
|
+
}
|
|
33151
|
+
.rcad-ed-pld-hint {
|
|
33152
|
+
color: var(--rcad-dim);
|
|
33153
|
+
font-size: 11px;
|
|
33154
|
+
}
|
|
33155
|
+
html:root .rcad-ed-pld-nav > .rcad-ed-pld-type.ant-select {
|
|
33156
|
+
flex: 1 1 0;
|
|
33157
|
+
width: auto;
|
|
33158
|
+
min-width: 0;
|
|
33159
|
+
height: var(--rcad-ctl-h);
|
|
33160
|
+
}
|
|
33161
|
+
html:root .rcad-ed-pld-nav > .rcad-el.ant-btn {
|
|
33162
|
+
flex: 1 1 0;
|
|
33163
|
+
min-width: 0;
|
|
33164
|
+
height: var(--rcad-ctl-h);
|
|
33165
|
+
padding: 0 6px;
|
|
33166
|
+
}
|
|
33167
|
+
.rcad-ed-pld-actions {
|
|
33168
|
+
display: grid;
|
|
33169
|
+
grid-template-columns: 1fr 1fr;
|
|
33170
|
+
gap: 6px;
|
|
33171
|
+
}
|
|
32004
33172
|
`;
|
|
32005
33173
|
|
|
32006
33174
|
/**
|
|
@@ -33558,6 +34726,10 @@ const globals = {
|
|
|
33558
34726
|
name: 'Bounding box',
|
|
33559
34727
|
icon: 'bbox'
|
|
33560
34728
|
},
|
|
34729
|
+
SectionView: {
|
|
34730
|
+
name: 'Section view',
|
|
34731
|
+
icon: 'section'
|
|
34732
|
+
},
|
|
33561
34733
|
'Appearance Editor': {
|
|
33562
34734
|
name: 'Appearance',
|
|
33563
34735
|
icon: 'appearance'
|
|
@@ -36803,8 +37975,8 @@ const useGPluginId = (drawingId, pluginName) => {
|
|
|
36803
37975
|
*/
|
|
36804
37976
|
|
|
36805
37977
|
/**
|
|
36806
|
-
* Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box,
|
|
36807
|
-
* Management.
|
|
37978
|
+
* Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box, Section view,
|
|
37979
|
+
* Session Management.
|
|
36808
37980
|
*
|
|
36809
37981
|
* A button is there only where the drawing has the plugin (`init`'s `globalPlugins`); it switches the plugin on and
|
|
36810
37982
|
* off, and its window is one of the {@link GlobalPlugins}. The Session Management button is not shown to a guest of a
|
|
@@ -36839,6 +38011,7 @@ const ViewPlugButtons = ({
|
|
|
36839
38011
|
const dimensionsId = useGPluginId(drawingId, 'Dimensions');
|
|
36840
38012
|
const measureId = useGPluginId(drawingId, 'Measure');
|
|
36841
38013
|
const bbInfoId = useGPluginId(drawingId, 'BoundingBoxInfo');
|
|
38014
|
+
const sectionId = useGPluginId(drawingId, 'SectionView');
|
|
36842
38015
|
const smId = useGPluginId(drawingId, 'Session Management');
|
|
36843
38016
|
const isGuest = Boolean(getInviteFromUrl());
|
|
36844
38017
|
return /*#__PURE__*/React.createElement(React.Fragment, null, dimensionsId && /*#__PURE__*/React.createElement(ViewPlugButton, {
|
|
@@ -36865,6 +38038,14 @@ const ViewPlugButtons = ({
|
|
|
36865
38038
|
size: 18
|
|
36866
38039
|
}),
|
|
36867
38040
|
title: "Bounding box"
|
|
38041
|
+
}), sectionId && /*#__PURE__*/React.createElement(ViewPlugButton, {
|
|
38042
|
+
drawingId: drawingId,
|
|
38043
|
+
pId: sectionId,
|
|
38044
|
+
icon: /*#__PURE__*/React.createElement(Icon$1, {
|
|
38045
|
+
name: "section",
|
|
38046
|
+
size: 18
|
|
38047
|
+
}),
|
|
38048
|
+
title: "Section view"
|
|
36868
38049
|
}), !isGuest && smId && /*#__PURE__*/React.createElement(ViewPlugButton, {
|
|
36869
38050
|
drawingId: drawingId,
|
|
36870
38051
|
pId: smId,
|
|
@@ -44823,33 +46004,33 @@ const StageLook = ({
|
|
|
44823
46004
|
exports.AppStyle = AppStyle;
|
|
44824
46005
|
exports.AppearanceEditor = index$g;
|
|
44825
46006
|
exports.Badge = Badge;
|
|
44826
|
-
exports.Boolean = index$
|
|
44827
|
-
exports.BoundingBoxInfo = index$
|
|
44828
|
-
exports.Box = index$
|
|
46007
|
+
exports.Boolean = index$J;
|
|
46008
|
+
exports.BoundingBoxInfo = index$j;
|
|
46009
|
+
exports.Box = index$F;
|
|
44829
46010
|
exports.CADApi = CADApi;
|
|
44830
46011
|
exports.CSysDisplay = CSysDisplay;
|
|
44831
46012
|
exports.CSysDisplayMode = CSysDisplayMode;
|
|
44832
|
-
exports.Chamfer = index$
|
|
44833
|
-
exports.CircularPattern = index$
|
|
46013
|
+
exports.Chamfer = index$z;
|
|
46014
|
+
exports.CircularPattern = index$s;
|
|
44834
46015
|
exports.CircularPatternConstraint = index$5;
|
|
44835
|
-
exports.CompositeCurve = index$
|
|
46016
|
+
exports.CompositeCurve = index$C;
|
|
44836
46017
|
exports.CompositeCurveObj = CompositeCurveObj;
|
|
44837
|
-
exports.Cone = index$
|
|
46018
|
+
exports.Cone = index$B;
|
|
44838
46019
|
exports.Constraints = Constraints;
|
|
44839
46020
|
exports.ContextMenu = ContextMenu;
|
|
44840
|
-
exports.Cylinder = index$
|
|
46021
|
+
exports.Cylinder = index$D;
|
|
44841
46022
|
exports.Cylindrical = index$b;
|
|
44842
|
-
exports.Dimensions = index$
|
|
46023
|
+
exports.Dimensions = index$K;
|
|
44843
46024
|
exports.Drawing = Drawing;
|
|
44844
46025
|
exports.EditMode = EditMode;
|
|
44845
46026
|
exports.EntityDeletion = index$2;
|
|
44846
46027
|
exports.Expressions = index$h;
|
|
44847
|
-
exports.Extrusion = index$
|
|
46028
|
+
exports.Extrusion = index$I;
|
|
44848
46029
|
exports.Fastened = index$e;
|
|
44849
46030
|
exports.FastenedOrigin = index$f;
|
|
44850
46031
|
exports.FeaturePlugin = FeaturePlugin;
|
|
44851
46032
|
exports.FieldContext = FieldContext;
|
|
44852
|
-
exports.Fillet = index$
|
|
46033
|
+
exports.Fillet = index$A;
|
|
44853
46034
|
exports.FtVisibilityController = FtVisibilityController$1;
|
|
44854
46035
|
exports.Gear = index$4;
|
|
44855
46036
|
exports.GeometryOverridesManager = GeometryOverridesManager;
|
|
@@ -44859,13 +46040,13 @@ exports.HUD = HUD$1;
|
|
|
44859
46040
|
exports.HoveredConstraintDisplay = HoveredConstraintDisplay;
|
|
44860
46041
|
exports.Icon = Icon$1;
|
|
44861
46042
|
exports.Import = index$3;
|
|
44862
|
-
exports.LinearPattern = index$
|
|
46043
|
+
exports.LinearPattern = index$t;
|
|
44863
46044
|
exports.LinearPatternConstraint = index$6;
|
|
44864
46045
|
exports.MateScope = MateScope;
|
|
44865
|
-
exports.Measure = index$
|
|
46046
|
+
exports.Measure = index$q;
|
|
44866
46047
|
exports.Menu = Menu;
|
|
44867
46048
|
exports.Messages = Messages;
|
|
44868
|
-
exports.Mirror = index$
|
|
46049
|
+
exports.Mirror = index$r;
|
|
44869
46050
|
exports.ModelTree = ModelTree;
|
|
44870
46051
|
exports.Outline = Outline;
|
|
44871
46052
|
exports.Parallel = index$9;
|
|
@@ -44874,36 +46055,37 @@ exports.PluginGeometryBounds = PluginGeometryBounds;
|
|
|
44874
46055
|
exports.ProductManagement = index$1;
|
|
44875
46056
|
exports.Readfile = Readfile$1;
|
|
44876
46057
|
exports.Revolute = index$c;
|
|
44877
|
-
exports.Revolve = index$
|
|
44878
|
-
exports.Rotate = index$
|
|
46058
|
+
exports.Revolve = index$G;
|
|
46059
|
+
exports.Rotate = index$x;
|
|
46060
|
+
exports.SectionView = index$i;
|
|
44879
46061
|
exports.SelectedMateObj = SelectedMateObj;
|
|
44880
46062
|
exports.SessionManagement = index;
|
|
44881
46063
|
exports.SideBar = SideBar;
|
|
44882
|
-
exports.Sketch = index$
|
|
44883
|
-
exports.Slice = index$
|
|
44884
|
-
exports.SliceBySheet = index$
|
|
46064
|
+
exports.Sketch = index$p;
|
|
46065
|
+
exports.Slice = index$v;
|
|
46066
|
+
exports.SliceBySheet = index$u;
|
|
44885
46067
|
exports.Slider = index$d;
|
|
44886
46068
|
exports.Solids = Solids;
|
|
44887
|
-
exports.Sphere = index$
|
|
46069
|
+
exports.Sphere = index$E;
|
|
44888
46070
|
exports.Spherical = index$8;
|
|
44889
46071
|
exports.StageLook = StageLook;
|
|
44890
46072
|
exports.ThemeToggle = ThemeToggle;
|
|
44891
46073
|
exports.ToolBar = ToolBar;
|
|
44892
|
-
exports.TransformByCsys = index$
|
|
44893
|
-
exports.Translate = index$
|
|
46074
|
+
exports.TransformByCsys = index$w;
|
|
46075
|
+
exports.Translate = index$y;
|
|
44894
46076
|
exports.TreeObjScope = TreeObjScope;
|
|
44895
|
-
exports.Twist = index$
|
|
46077
|
+
exports.Twist = index$H;
|
|
44896
46078
|
exports.ViewOptionButtons = ViewOptionButtons;
|
|
44897
46079
|
exports.ViewPlugButtons = ViewPlugButtons;
|
|
44898
|
-
exports.WorkAxis = index$
|
|
46080
|
+
exports.WorkAxis = index$o;
|
|
44899
46081
|
exports.WorkAxisObj = WorkAxisObj;
|
|
44900
|
-
exports.WorkCSys = index$
|
|
46082
|
+
exports.WorkCSys = index$k;
|
|
44901
46083
|
exports.WorkCSysObj = WorkCSysObj;
|
|
44902
|
-
exports.WorkCoordSystem = index$
|
|
46084
|
+
exports.WorkCoordSystem = index$l;
|
|
44903
46085
|
exports.WorkCoordSystemObj = WorkCoordSystemObj;
|
|
44904
|
-
exports.WorkPlane = index$
|
|
46086
|
+
exports.WorkPlane = index$n;
|
|
44905
46087
|
exports.WorkPlaneObj = WorkPlaneObj;
|
|
44906
|
-
exports.WorkPoint = index$
|
|
46088
|
+
exports.WorkPoint = index$m;
|
|
44907
46089
|
exports.WorkPointObj = WorkPointObj;
|
|
44908
46090
|
exports.conversionUtils = conversionUtils;
|
|
44909
46091
|
exports.createTreeObjSelItem = createTreeObjSelItem;
|