@mlightcad/cad-simple-viewer 1.4.12 → 1.4.13
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/dist/index.js +15901 -10590
- package/dist/index.umd.cjs +55 -48
- package/dist/libredwg-parser-worker.js +4724 -4762
- package/lib/app/AcApDocManager.d.ts +60 -4
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +160 -33
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/command/AcApArcCmd.d.ts.map +1 -1
- package/lib/command/AcApArcCmd.js +1 -1
- package/lib/command/AcApArcCmd.js.map +1 -1
- package/lib/command/AcApCircleCmd.d.ts +59 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -1
- package/lib/command/AcApCircleCmd.js +489 -18
- package/lib/command/AcApCircleCmd.js.map +1 -1
- package/lib/command/AcApConvertToPngCmd.d.ts +35 -0
- package/lib/command/AcApConvertToPngCmd.d.ts.map +1 -0
- package/lib/command/{AcApZoomToBoxCmd.js → AcApConvertToPngCmd.js} +50 -26
- package/lib/command/AcApConvertToPngCmd.js.map +1 -0
- package/lib/command/AcApEllipseCmd.d.ts +87 -0
- package/lib/command/AcApEllipseCmd.d.ts.map +1 -0
- package/lib/command/AcApEllipseCmd.js +583 -0
- package/lib/command/AcApEllipseCmd.js.map +1 -0
- package/lib/command/AcApHatchCmd.d.ts +210 -0
- package/lib/command/AcApHatchCmd.d.ts.map +1 -0
- package/lib/command/AcApHatchCmd.js +808 -0
- package/lib/command/AcApHatchCmd.js.map +1 -0
- package/lib/command/AcApLayerCmd.d.ts +217 -0
- package/lib/command/AcApLayerCmd.d.ts.map +1 -0
- package/lib/command/AcApLayerCmd.js +768 -0
- package/lib/command/AcApLayerCmd.js.map +1 -0
- package/lib/command/AcApLineCmd.d.ts +36 -1
- package/lib/command/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/AcApLineCmd.js +157 -20
- package/lib/command/AcApLineCmd.js.map +1 -1
- package/lib/command/AcApMeasureAreaCmd.d.ts.map +1 -1
- package/lib/command/AcApMeasureAreaCmd.js +3 -0
- package/lib/command/AcApMeasureAreaCmd.js.map +1 -1
- package/lib/command/AcApMoveCmd.d.ts +16 -0
- package/lib/command/AcApMoveCmd.d.ts.map +1 -0
- package/lib/command/AcApMoveCmd.js +278 -0
- package/lib/command/AcApMoveCmd.js.map +1 -0
- package/lib/command/AcApPngConvertor.d.ts +95 -0
- package/lib/command/AcApPngConvertor.d.ts.map +1 -0
- package/lib/command/AcApPngConvertor.js +205 -0
- package/lib/command/AcApPngConvertor.js.map +1 -0
- package/lib/command/AcApPolygonCmd.d.ts +69 -0
- package/lib/command/AcApPolygonCmd.d.ts.map +1 -0
- package/lib/command/AcApPolygonCmd.js +422 -0
- package/lib/command/AcApPolygonCmd.js.map +1 -0
- package/lib/command/AcApRectCmd.d.ts +149 -4
- package/lib/command/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/AcApRectCmd.js +716 -34
- package/lib/command/AcApRectCmd.js.map +1 -1
- package/lib/command/AcApRevCircleCmd.d.ts +8 -0
- package/lib/command/AcApRevCircleCmd.d.ts.map +1 -1
- package/lib/command/AcApRevCircleCmd.js +30 -6
- package/lib/command/AcApRevCircleCmd.js.map +1 -1
- package/lib/command/AcApRevRectCmd.d.ts +8 -0
- package/lib/command/AcApRevRectCmd.d.ts.map +1 -1
- package/lib/command/AcApRevRectCmd.js +78 -6
- package/lib/command/AcApRevRectCmd.js.map +1 -1
- package/lib/command/AcApSplineCmd.d.ts +66 -1
- package/lib/command/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/AcApSplineCmd.js +466 -59
- package/lib/command/AcApSplineCmd.js.map +1 -1
- package/lib/command/AcApZoomCmd.d.ts +91 -20
- package/lib/command/AcApZoomCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomCmd.js +288 -23
- package/lib/command/AcApZoomCmd.js.map +1 -1
- package/lib/command/index.d.ts +7 -1
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +7 -1
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +54 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +207 -25
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEdSelectionFilter.d.ts +79 -0
- package/lib/editor/input/AcEdSelectionFilter.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionFilter.js +231 -0
- package/lib/editor/input/AcEdSelectionFilter.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +20 -2
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +66 -0
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/index.d.ts +1 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +1 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +47 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +19 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts +17 -0
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.js +30 -3
- package/lib/editor/input/prompt/AcEdPromptEntityOptions.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +6 -1
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptOptions.js +7 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -1
- package/lib/editor/input/session/AcEdKeywordSession.d.ts +65 -0
- package/lib/editor/input/session/AcEdKeywordSession.d.ts.map +1 -1
- package/lib/editor/input/session/AcEdKeywordSession.js +71 -0
- package/lib/editor/input/session/AcEdKeywordSession.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +23 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +42 -6
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +8 -2
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +23 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +32 -9
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +28 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +356 -16
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +964 -529
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +15 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.js +42 -10
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
- package/lib/i18n/en/command.d.ts +21 -3
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +21 -3
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +443 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +452 -9
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +21 -3
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +21 -3
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +443 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +452 -9
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
- package/lib/plugin/AcApPluginManager.js.map +1 -1
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +5 -3
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +0 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +17 -4
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +11 -9
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -29
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +0 -1
- package/lib/command/AcApZoomToBoxCmd.js.map +0 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
38
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
+
function step(op) {
|
|
41
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
44
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
+
switch (op[0]) {
|
|
46
|
+
case 0: case 1: t = op; break;
|
|
47
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
+
default:
|
|
51
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
+
if (t[2]) _.ops.pop();
|
|
56
|
+
_.trys.pop(); continue;
|
|
57
|
+
}
|
|
58
|
+
op = body.call(thisArg, _);
|
|
59
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
import { AcDbEllipse, AcGePoint3d } from '@mlightcad/data-model';
|
|
64
|
+
import { AcApDocManager } from '../app';
|
|
65
|
+
import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptAngleOptions, AcEdPromptDoubleOptions, AcEdPromptPointOptions, AcEdPromptStatus, eventBus } from '../editor';
|
|
66
|
+
import { AcApI18n } from '../i18n';
|
|
67
|
+
import { AcApLineJig } from './AcApLineCmd';
|
|
68
|
+
var EPSILON = 1e-9;
|
|
69
|
+
var TAU = Math.PI * 2;
|
|
70
|
+
var POSITIVE_NORMAL = { x: 0, y: 0, z: 1 };
|
|
71
|
+
function distance2d(p1, p2) {
|
|
72
|
+
return Math.hypot(p2.x - p1.x, p2.y - p1.y);
|
|
73
|
+
}
|
|
74
|
+
function midpoint2d(p1, p2) {
|
|
75
|
+
return {
|
|
76
|
+
x: (p1.x + p2.x) / 2,
|
|
77
|
+
y: (p1.y + p2.y) / 2,
|
|
78
|
+
z: 0
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function normalizeVector2d(x, y) {
|
|
82
|
+
var length = Math.hypot(x, y);
|
|
83
|
+
if (!Number.isFinite(length) || length <= EPSILON)
|
|
84
|
+
return undefined;
|
|
85
|
+
return { x: x / length, y: y / length, z: 0 };
|
|
86
|
+
}
|
|
87
|
+
function perpendicular2d(unit) {
|
|
88
|
+
return { x: -unit.y, y: unit.x, z: 0 };
|
|
89
|
+
}
|
|
90
|
+
function degToRad(degree) {
|
|
91
|
+
return (degree * Math.PI) / 180;
|
|
92
|
+
}
|
|
93
|
+
function radToDeg(rad) {
|
|
94
|
+
return (rad * 180) / Math.PI;
|
|
95
|
+
}
|
|
96
|
+
function axisAngleDeg(axis) {
|
|
97
|
+
return radToDeg(Math.atan2(axis.y, axis.x));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Converts a geometric direction angle (from center, relative to major axis)
|
|
101
|
+
* to ellipse parameter angle used by AcGeEllipseArc3d.
|
|
102
|
+
*
|
|
103
|
+
* Ellipse parameterization:
|
|
104
|
+
* x = a * cos(t), y = b * sin(t)
|
|
105
|
+
* Geometric ray angle alpha satisfies:
|
|
106
|
+
* tan(alpha) = (b * sin(t)) / (a * cos(t))
|
|
107
|
+
* so:
|
|
108
|
+
* t = atan2(a * sin(alpha), b * cos(alpha))
|
|
109
|
+
*/
|
|
110
|
+
function geometricAngleDegToEllipseParamRad(geometricAngleDeg, majorRadius, minorRadius) {
|
|
111
|
+
var alpha = degToRad(geometricAngleDeg);
|
|
112
|
+
return Math.atan2(majorRadius * Math.sin(alpha), minorRadius * Math.cos(alpha));
|
|
113
|
+
}
|
|
114
|
+
function axisUnitFromCenterToPoint(center, point) {
|
|
115
|
+
return normalizeVector2d(point.x - center.x, point.y - center.y);
|
|
116
|
+
}
|
|
117
|
+
function buildEllipseDefinition(center, firstAxisUnit, firstAxisRadius, secondAxisRadius, startAngle, endAngle) {
|
|
118
|
+
if (startAngle === void 0) { startAngle = 0; }
|
|
119
|
+
if (endAngle === void 0) { endAngle = TAU; }
|
|
120
|
+
if (!Number.isFinite(firstAxisRadius) ||
|
|
121
|
+
!Number.isFinite(secondAxisRadius) ||
|
|
122
|
+
firstAxisRadius <= EPSILON ||
|
|
123
|
+
secondAxisRadius <= EPSILON) {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
if (firstAxisRadius >= secondAxisRadius) {
|
|
127
|
+
return {
|
|
128
|
+
center: { x: center.x, y: center.y, z: 0 },
|
|
129
|
+
majorAxis: firstAxisUnit,
|
|
130
|
+
majorRadius: firstAxisRadius,
|
|
131
|
+
minorRadius: secondAxisRadius,
|
|
132
|
+
startAngle: startAngle,
|
|
133
|
+
endAngle: endAngle
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
center: { x: center.x, y: center.y, z: 0 },
|
|
138
|
+
majorAxis: perpendicular2d(firstAxisUnit),
|
|
139
|
+
majorRadius: secondAxisRadius,
|
|
140
|
+
minorRadius: firstAxisRadius,
|
|
141
|
+
startAngle: startAngle,
|
|
142
|
+
endAngle: endAngle
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function createFallbackEllipse(point) {
|
|
146
|
+
return new AcDbEllipse(point, POSITIVE_NORMAL, { x: 1, y: 0, z: 0 }, 1e-6, 1e-6, 0, TAU);
|
|
147
|
+
}
|
|
148
|
+
function applyEllipseDefinition(entity, definition) {
|
|
149
|
+
entity.center = definition.center;
|
|
150
|
+
entity.normal = POSITIVE_NORMAL;
|
|
151
|
+
entity.majorAxisRadius = definition.majorRadius;
|
|
152
|
+
entity.minorAxisRadius = definition.minorRadius;
|
|
153
|
+
entity.startAngle = definition.startAngle;
|
|
154
|
+
entity.endAngle = definition.endAngle;
|
|
155
|
+
var ellipseWithGeo = entity;
|
|
156
|
+
if (ellipseWithGeo._geo) {
|
|
157
|
+
ellipseWithGeo._geo.majorAxis = definition.majorAxis;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Dynamic point-driven ellipse preview jig.
|
|
162
|
+
*/
|
|
163
|
+
var AcApEllipsePointJig = /** @class */ (function (_super) {
|
|
164
|
+
__extends(AcApEllipsePointJig, _super);
|
|
165
|
+
/**
|
|
166
|
+
* Creates point-driven ellipse preview jig.
|
|
167
|
+
*
|
|
168
|
+
* @param view - Active editor view.
|
|
169
|
+
* @param builder - Cursor point to ellipse definition resolver.
|
|
170
|
+
* @param fallbackPoint - Fallback point used to create valid initial entity.
|
|
171
|
+
*/
|
|
172
|
+
function AcApEllipsePointJig(view, builder, fallbackPoint) {
|
|
173
|
+
var _this = _super.call(this, view) || this;
|
|
174
|
+
_this._builder = builder;
|
|
175
|
+
_this._ellipse = createFallbackEllipse(fallbackPoint);
|
|
176
|
+
return _this;
|
|
177
|
+
}
|
|
178
|
+
Object.defineProperty(AcApEllipsePointJig.prototype, "entity", {
|
|
179
|
+
/**
|
|
180
|
+
* Gets transient ellipse entity displayed by this jig.
|
|
181
|
+
*/
|
|
182
|
+
get: function () {
|
|
183
|
+
return this._ellipse;
|
|
184
|
+
},
|
|
185
|
+
enumerable: false,
|
|
186
|
+
configurable: true
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* Recomputes preview ellipse from cursor point.
|
|
190
|
+
*
|
|
191
|
+
* @param point - Current cursor/input point.
|
|
192
|
+
*/
|
|
193
|
+
AcApEllipsePointJig.prototype.update = function (point) {
|
|
194
|
+
var definition = this._builder(point);
|
|
195
|
+
if (!definition)
|
|
196
|
+
return;
|
|
197
|
+
applyEllipseDefinition(this._ellipse, definition);
|
|
198
|
+
};
|
|
199
|
+
return AcApEllipsePointJig;
|
|
200
|
+
}(AcEdPreviewJig));
|
|
201
|
+
/**
|
|
202
|
+
* Dynamic numeric-input ellipse preview jig.
|
|
203
|
+
*/
|
|
204
|
+
var AcApEllipseDistanceJig = /** @class */ (function (_super) {
|
|
205
|
+
__extends(AcApEllipseDistanceJig, _super);
|
|
206
|
+
/**
|
|
207
|
+
* Creates numeric-input ellipse preview jig.
|
|
208
|
+
*
|
|
209
|
+
* @param view - Active editor view.
|
|
210
|
+
* @param builder - Numeric value to ellipse definition resolver.
|
|
211
|
+
* @param fallbackPoint - Fallback point used to create valid initial entity.
|
|
212
|
+
*/
|
|
213
|
+
function AcApEllipseDistanceJig(view, builder, fallbackPoint) {
|
|
214
|
+
var _this = _super.call(this, view) || this;
|
|
215
|
+
_this._builder = builder;
|
|
216
|
+
_this._ellipse = createFallbackEllipse(fallbackPoint);
|
|
217
|
+
return _this;
|
|
218
|
+
}
|
|
219
|
+
Object.defineProperty(AcApEllipseDistanceJig.prototype, "entity", {
|
|
220
|
+
/**
|
|
221
|
+
* Gets transient ellipse entity displayed by this jig.
|
|
222
|
+
*/
|
|
223
|
+
get: function () {
|
|
224
|
+
return this._ellipse;
|
|
225
|
+
},
|
|
226
|
+
enumerable: false,
|
|
227
|
+
configurable: true
|
|
228
|
+
});
|
|
229
|
+
/**
|
|
230
|
+
* Recomputes preview ellipse from numeric input value.
|
|
231
|
+
*
|
|
232
|
+
* @param value - Current numeric prompt value.
|
|
233
|
+
*/
|
|
234
|
+
AcApEllipseDistanceJig.prototype.update = function (value) {
|
|
235
|
+
var definition = this._builder(value);
|
|
236
|
+
if (!definition)
|
|
237
|
+
return;
|
|
238
|
+
applyEllipseDefinition(this._ellipse, definition);
|
|
239
|
+
};
|
|
240
|
+
return AcApEllipseDistanceJig;
|
|
241
|
+
}(AcEdPreviewJig));
|
|
242
|
+
/**
|
|
243
|
+
* Command to create one ellipse or ellipse arc.
|
|
244
|
+
*/
|
|
245
|
+
var AcApEllipseCmd = /** @class */ (function (_super) {
|
|
246
|
+
__extends(AcApEllipseCmd, _super);
|
|
247
|
+
/**
|
|
248
|
+
* Creates ELLIPSE command instance.
|
|
249
|
+
*/
|
|
250
|
+
function AcApEllipseCmd() {
|
|
251
|
+
var _this = _super.call(this) || this;
|
|
252
|
+
_this.mode = AcEdOpenMode.Write;
|
|
253
|
+
return _this;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Command entry point.
|
|
257
|
+
*
|
|
258
|
+
* Supported branches:
|
|
259
|
+
* - Axis endpoint workflow
|
|
260
|
+
* - Center-first workflow
|
|
261
|
+
* - Arc-prefixed variants for ellipse arc creation
|
|
262
|
+
*
|
|
263
|
+
* @param context - Current application/document context.
|
|
264
|
+
*/
|
|
265
|
+
AcApEllipseCmd.prototype.execute = function (context) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
267
|
+
var entryPrompt, entryResult, keyword;
|
|
268
|
+
var _a;
|
|
269
|
+
return __generator(this, function (_b) {
|
|
270
|
+
switch (_b.label) {
|
|
271
|
+
case 0:
|
|
272
|
+
entryPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.axisEndpointOrOptions'));
|
|
273
|
+
this.addKeyword(entryPrompt, 'arc');
|
|
274
|
+
this.addKeyword(entryPrompt, 'center');
|
|
275
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(entryPrompt)];
|
|
276
|
+
case 1:
|
|
277
|
+
entryResult = _b.sent();
|
|
278
|
+
if (!(entryResult.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 6];
|
|
279
|
+
keyword = (_a = entryResult.stringResult) !== null && _a !== void 0 ? _a : '';
|
|
280
|
+
if (!(keyword === 'Center')) return [3 /*break*/, 3];
|
|
281
|
+
return [4 /*yield*/, this.runCenterFlow(context, false)];
|
|
282
|
+
case 2:
|
|
283
|
+
_b.sent();
|
|
284
|
+
return [3 /*break*/, 5];
|
|
285
|
+
case 3:
|
|
286
|
+
if (!(keyword === 'Arc')) return [3 /*break*/, 5];
|
|
287
|
+
return [4 /*yield*/, this.runArcEntryFlow(context)];
|
|
288
|
+
case 4:
|
|
289
|
+
_b.sent();
|
|
290
|
+
_b.label = 5;
|
|
291
|
+
case 5: return [2 /*return*/];
|
|
292
|
+
case 6:
|
|
293
|
+
if (entryResult.status !== AcEdPromptStatus.OK)
|
|
294
|
+
return [2 /*return*/];
|
|
295
|
+
return [4 /*yield*/, this.runAxisEndFlow(context, entryResult.value, false)];
|
|
296
|
+
case 7:
|
|
297
|
+
_b.sent();
|
|
298
|
+
return [2 /*return*/];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Adds one localized keyword to a point prompt.
|
|
305
|
+
*
|
|
306
|
+
* @param prompt - Target point prompt.
|
|
307
|
+
* @param key - Keyword i18n key suffix.
|
|
308
|
+
*/
|
|
309
|
+
AcApEllipseCmd.prototype.addKeyword = function (prompt, key) {
|
|
310
|
+
prompt.keywords.add(AcApI18n.t("jig.ellipse.keywords.".concat(key, ".display")), AcApI18n.t("jig.ellipse.keywords.".concat(key, ".global")), AcApI18n.t("jig.ellipse.keywords.".concat(key, ".local")));
|
|
311
|
+
};
|
|
312
|
+
/**
|
|
313
|
+
* Appends final ellipse entity to model space.
|
|
314
|
+
*
|
|
315
|
+
* @param context - Current application/document context.
|
|
316
|
+
* @param definition - Ellipse geometric definition to append.
|
|
317
|
+
*/
|
|
318
|
+
AcApEllipseCmd.prototype.appendEllipse = function (context, definition) {
|
|
319
|
+
var ellipse = new AcDbEllipse(definition.center, POSITIVE_NORMAL, definition.majorAxis, definition.majorRadius, definition.minorRadius, definition.startAngle, definition.endAngle);
|
|
320
|
+
context.doc.database.tables.blockTable.modelSpace.appendEntity(ellipse);
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* Emits one warning message for invalid ellipse input.
|
|
324
|
+
*
|
|
325
|
+
* @param key - Invalid-input category key.
|
|
326
|
+
*/
|
|
327
|
+
AcApEllipseCmd.prototype.warnInvalidInput = function (key) {
|
|
328
|
+
eventBus.emit('message', {
|
|
329
|
+
message: AcApI18n.t("jig.ellipse.invalid.".concat(key)),
|
|
330
|
+
type: 'warning'
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Runs `Arc` entry branch where user can provide axis endpoints or center.
|
|
335
|
+
*
|
|
336
|
+
* @param context - Current application/document context.
|
|
337
|
+
*/
|
|
338
|
+
AcApEllipseCmd.prototype.runArcEntryFlow = function (context) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
340
|
+
var prompt, result;
|
|
341
|
+
return __generator(this, function (_a) {
|
|
342
|
+
switch (_a.label) {
|
|
343
|
+
case 0:
|
|
344
|
+
prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.arcAxisEndpointOrCenter'));
|
|
345
|
+
this.addKeyword(prompt, 'center');
|
|
346
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(prompt)];
|
|
347
|
+
case 1:
|
|
348
|
+
result = _a.sent();
|
|
349
|
+
if (!(result.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 4];
|
|
350
|
+
if (!(result.stringResult === 'Center')) return [3 /*break*/, 3];
|
|
351
|
+
return [4 /*yield*/, this.runCenterFlow(context, true)];
|
|
352
|
+
case 2:
|
|
353
|
+
_a.sent();
|
|
354
|
+
_a.label = 3;
|
|
355
|
+
case 3: return [2 /*return*/];
|
|
356
|
+
case 4:
|
|
357
|
+
if (result.status !== AcEdPromptStatus.OK)
|
|
358
|
+
return [2 /*return*/];
|
|
359
|
+
return [4 /*yield*/, this.runAxisEndFlow(context, result.value, true)];
|
|
360
|
+
case 5:
|
|
361
|
+
_a.sent();
|
|
362
|
+
return [2 /*return*/];
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* Runs center-first workflow:
|
|
369
|
+
* center -> first axis endpoint -> other axis/rotation -> optional arc angles.
|
|
370
|
+
*
|
|
371
|
+
* @param context - Current application/document context.
|
|
372
|
+
* @param arcMode - Whether to continue into arc-angle prompts.
|
|
373
|
+
*/
|
|
374
|
+
AcApEllipseCmd.prototype.runCenterFlow = function (context, arcMode) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
376
|
+
var centerPrompt, centerResult, center, axisEndPrompt, axisEndResult, axisUnit, axisRadius, definition;
|
|
377
|
+
return __generator(this, function (_a) {
|
|
378
|
+
switch (_a.label) {
|
|
379
|
+
case 0:
|
|
380
|
+
centerPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.center'));
|
|
381
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(centerPrompt)];
|
|
382
|
+
case 1:
|
|
383
|
+
centerResult = _a.sent();
|
|
384
|
+
if (centerResult.status !== AcEdPromptStatus.OK)
|
|
385
|
+
return [2 /*return*/];
|
|
386
|
+
center = centerResult.value;
|
|
387
|
+
axisEndPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.firstAxisEndpoint'));
|
|
388
|
+
axisEndPrompt.useDashedLine = true;
|
|
389
|
+
axisEndPrompt.useBasePoint = true;
|
|
390
|
+
axisEndPrompt.basePoint = new AcGePoint3d(center);
|
|
391
|
+
axisEndPrompt.jig = new AcApLineJig(context.view, center);
|
|
392
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(axisEndPrompt)];
|
|
393
|
+
case 2:
|
|
394
|
+
axisEndResult = _a.sent();
|
|
395
|
+
if (axisEndResult.status !== AcEdPromptStatus.OK)
|
|
396
|
+
return [2 /*return*/];
|
|
397
|
+
axisUnit = axisUnitFromCenterToPoint(center, axisEndResult.value);
|
|
398
|
+
if (!axisUnit) {
|
|
399
|
+
this.warnInvalidInput('axis');
|
|
400
|
+
return [2 /*return*/];
|
|
401
|
+
}
|
|
402
|
+
axisRadius = distance2d(center, axisEndResult.value);
|
|
403
|
+
return [4 /*yield*/, this.promptOtherAxis(context, center, axisUnit, axisRadius, arcMode)];
|
|
404
|
+
case 3:
|
|
405
|
+
definition = _a.sent();
|
|
406
|
+
if (!definition)
|
|
407
|
+
return [2 /*return*/];
|
|
408
|
+
this.appendEllipse(context, definition);
|
|
409
|
+
return [2 /*return*/];
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Runs axis-endpoint workflow:
|
|
416
|
+
* first axis endpoint -> second axis endpoint -> other axis/rotation.
|
|
417
|
+
*
|
|
418
|
+
* @param context - Current application/document context.
|
|
419
|
+
* @param firstAxisEndpoint - First endpoint of major/minor axis line.
|
|
420
|
+
* @param arcMode - Whether to continue into arc-angle prompts.
|
|
421
|
+
*/
|
|
422
|
+
AcApEllipseCmd.prototype.runAxisEndFlow = function (context, firstAxisEndpoint, arcMode) {
|
|
423
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
424
|
+
var secondAxisPrompt, secondAxisResult, secondAxisEndpoint, axisVectorX, axisVectorY, axisUnit, center, axisRadius, definition;
|
|
425
|
+
return __generator(this, function (_a) {
|
|
426
|
+
switch (_a.label) {
|
|
427
|
+
case 0:
|
|
428
|
+
secondAxisPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.secondAxisEndpoint'));
|
|
429
|
+
secondAxisPrompt.useDashedLine = true;
|
|
430
|
+
secondAxisPrompt.useBasePoint = true;
|
|
431
|
+
secondAxisPrompt.basePoint = new AcGePoint3d(firstAxisEndpoint);
|
|
432
|
+
secondAxisPrompt.jig = new AcApLineJig(context.view, firstAxisEndpoint);
|
|
433
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(secondAxisPrompt)];
|
|
434
|
+
case 1:
|
|
435
|
+
secondAxisResult = _a.sent();
|
|
436
|
+
if (secondAxisResult.status !== AcEdPromptStatus.OK)
|
|
437
|
+
return [2 /*return*/];
|
|
438
|
+
secondAxisEndpoint = secondAxisResult.value;
|
|
439
|
+
axisVectorX = secondAxisEndpoint.x - firstAxisEndpoint.x;
|
|
440
|
+
axisVectorY = secondAxisEndpoint.y - firstAxisEndpoint.y;
|
|
441
|
+
axisUnit = normalizeVector2d(axisVectorX, axisVectorY);
|
|
442
|
+
if (!axisUnit) {
|
|
443
|
+
this.warnInvalidInput('axis');
|
|
444
|
+
return [2 /*return*/];
|
|
445
|
+
}
|
|
446
|
+
center = midpoint2d(firstAxisEndpoint, secondAxisEndpoint);
|
|
447
|
+
axisRadius = distance2d(firstAxisEndpoint, secondAxisEndpoint) / 2;
|
|
448
|
+
return [4 /*yield*/, this.promptOtherAxis(context, center, axisUnit, axisRadius, arcMode)];
|
|
449
|
+
case 2:
|
|
450
|
+
definition = _a.sent();
|
|
451
|
+
if (!definition)
|
|
452
|
+
return [2 /*return*/];
|
|
453
|
+
this.appendEllipse(context, definition);
|
|
454
|
+
return [2 /*return*/];
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
/**
|
|
460
|
+
* Prompts for the second axis radius by point or rotation angle option.
|
|
461
|
+
*
|
|
462
|
+
* In arc mode, this method also continues into arc start/end angle prompts.
|
|
463
|
+
*
|
|
464
|
+
* @param context - Current application/document context.
|
|
465
|
+
* @param center - Ellipse center point.
|
|
466
|
+
* @param firstAxisUnit - Unit direction of first specified axis.
|
|
467
|
+
* @param firstAxisRadius - Radius length along first specified axis.
|
|
468
|
+
* @param arcMode - Whether to return an ellipse arc definition.
|
|
469
|
+
* @returns Final ellipse definition, or `undefined` on cancel/invalid.
|
|
470
|
+
*/
|
|
471
|
+
AcApEllipseCmd.prototype.promptOtherAxis = function (context, center, firstAxisUnit, firstAxisRadius, arcMode) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
473
|
+
var otherAxisPrompt, otherAxisResult, rotationPrompt, rotationResult, secondAxisRadius, definition_1, otherAxisRadius, definition;
|
|
474
|
+
var _a;
|
|
475
|
+
return __generator(this, function (_b) {
|
|
476
|
+
switch (_b.label) {
|
|
477
|
+
case 0:
|
|
478
|
+
if (!true) return [3 /*break*/, 6];
|
|
479
|
+
otherAxisPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.ellipse.otherAxisOrRotation'));
|
|
480
|
+
this.addKeyword(otherAxisPrompt, 'rotation');
|
|
481
|
+
otherAxisPrompt.useDashedLine = true;
|
|
482
|
+
otherAxisPrompt.useBasePoint = true;
|
|
483
|
+
otherAxisPrompt.basePoint = new AcGePoint3d(center);
|
|
484
|
+
otherAxisPrompt.jig = new AcApEllipsePointJig(context.view, function (point) {
|
|
485
|
+
var otherAxisRadius = distance2d(center, point);
|
|
486
|
+
return buildEllipseDefinition(center, firstAxisUnit, firstAxisRadius, otherAxisRadius);
|
|
487
|
+
}, center);
|
|
488
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(otherAxisPrompt)];
|
|
489
|
+
case 1:
|
|
490
|
+
otherAxisResult = _b.sent();
|
|
491
|
+
if (!(otherAxisResult.status === AcEdPromptStatus.Keyword)) return [3 /*break*/, 4];
|
|
492
|
+
if (otherAxisResult.stringResult !== 'Rotation')
|
|
493
|
+
return [2 /*return*/, undefined];
|
|
494
|
+
rotationPrompt = new AcEdPromptDoubleOptions(AcApI18n.t('jig.ellipse.rotationAngle'));
|
|
495
|
+
rotationPrompt.allowNegative = false;
|
|
496
|
+
rotationPrompt.allowZero = true;
|
|
497
|
+
rotationPrompt.jig = new AcApEllipseDistanceJig(context.view, function (degreeValue) {
|
|
498
|
+
var secondAxisRadius = firstAxisRadius * Math.abs(Math.cos(degToRad(degreeValue)));
|
|
499
|
+
return buildEllipseDefinition(center, firstAxisUnit, firstAxisRadius, secondAxisRadius);
|
|
500
|
+
}, center);
|
|
501
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getDouble(rotationPrompt)];
|
|
502
|
+
case 2:
|
|
503
|
+
rotationResult = _b.sent();
|
|
504
|
+
if (rotationResult.status !== AcEdPromptStatus.OK)
|
|
505
|
+
return [2 /*return*/, undefined];
|
|
506
|
+
secondAxisRadius = firstAxisRadius *
|
|
507
|
+
Math.abs(Math.cos(degToRad((_a = rotationResult.value) !== null && _a !== void 0 ? _a : 0)));
|
|
508
|
+
definition_1 = buildEllipseDefinition(center, firstAxisUnit, firstAxisRadius, secondAxisRadius);
|
|
509
|
+
if (!definition_1) {
|
|
510
|
+
this.warnInvalidInput('rotation');
|
|
511
|
+
return [3 /*break*/, 0];
|
|
512
|
+
}
|
|
513
|
+
if (!arcMode)
|
|
514
|
+
return [2 /*return*/, definition_1];
|
|
515
|
+
return [4 /*yield*/, this.promptArcAngles(context, definition_1)];
|
|
516
|
+
case 3: return [2 /*return*/, _b.sent()];
|
|
517
|
+
case 4:
|
|
518
|
+
if (otherAxisResult.status !== AcEdPromptStatus.OK)
|
|
519
|
+
return [2 /*return*/, undefined];
|
|
520
|
+
otherAxisRadius = distance2d(center, otherAxisResult.value);
|
|
521
|
+
definition = buildEllipseDefinition(center, firstAxisUnit, firstAxisRadius, otherAxisRadius);
|
|
522
|
+
if (!definition) {
|
|
523
|
+
this.warnInvalidInput('otherAxis');
|
|
524
|
+
return [3 /*break*/, 0];
|
|
525
|
+
}
|
|
526
|
+
if (!arcMode)
|
|
527
|
+
return [2 /*return*/, definition];
|
|
528
|
+
return [4 /*yield*/, this.promptArcAngles(context, definition)];
|
|
529
|
+
case 5: return [2 /*return*/, _b.sent()];
|
|
530
|
+
case 6: return [2 /*return*/];
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Prompts start and end angles for ellipse-arc creation.
|
|
537
|
+
*
|
|
538
|
+
* @param context - Current application/document context.
|
|
539
|
+
* @param baseEllipse - Base full-ellipse definition before arc trimming.
|
|
540
|
+
* @returns Arc ellipse definition, or `undefined` when canceled.
|
|
541
|
+
*/
|
|
542
|
+
AcApEllipseCmd.prototype.promptArcAngles = function (context, baseEllipse) {
|
|
543
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
544
|
+
var majorAxisBaseAngle, startPrompt, startResult, startAngle, endPrompt, endResult;
|
|
545
|
+
var _a, _b;
|
|
546
|
+
return __generator(this, function (_c) {
|
|
547
|
+
switch (_c.label) {
|
|
548
|
+
case 0:
|
|
549
|
+
majorAxisBaseAngle = axisAngleDeg(baseEllipse.majorAxis);
|
|
550
|
+
startPrompt = new AcEdPromptAngleOptions(AcApI18n.t('jig.ellipse.arcStartAngle'));
|
|
551
|
+
startPrompt.allowNegative = true;
|
|
552
|
+
startPrompt.useBasePoint = true;
|
|
553
|
+
startPrompt.useDashedLine = true;
|
|
554
|
+
startPrompt.basePoint = new AcGePoint3d(baseEllipse.center);
|
|
555
|
+
startPrompt.baseAngle = majorAxisBaseAngle;
|
|
556
|
+
startPrompt.jig = new AcApEllipseDistanceJig(context.view, function (degreeValue) { return (__assign(__assign({}, baseEllipse), { startAngle: geometricAngleDegToEllipseParamRad(degreeValue, baseEllipse.majorRadius, baseEllipse.minorRadius), endAngle: TAU })); }, baseEllipse.center);
|
|
557
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(startPrompt)];
|
|
558
|
+
case 1:
|
|
559
|
+
startResult = _c.sent();
|
|
560
|
+
if (startResult.status !== AcEdPromptStatus.OK)
|
|
561
|
+
return [2 /*return*/, undefined];
|
|
562
|
+
startAngle = geometricAngleDegToEllipseParamRad((_a = startResult.value) !== null && _a !== void 0 ? _a : 0, baseEllipse.majorRadius, baseEllipse.minorRadius);
|
|
563
|
+
endPrompt = new AcEdPromptAngleOptions(AcApI18n.t('jig.ellipse.arcEndAngle'));
|
|
564
|
+
endPrompt.allowNegative = true;
|
|
565
|
+
endPrompt.useBasePoint = true;
|
|
566
|
+
endPrompt.useDashedLine = true;
|
|
567
|
+
endPrompt.basePoint = new AcGePoint3d(baseEllipse.center);
|
|
568
|
+
endPrompt.baseAngle = majorAxisBaseAngle;
|
|
569
|
+
endPrompt.jig = new AcApEllipseDistanceJig(context.view, function (degreeValue) { return (__assign(__assign({}, baseEllipse), { startAngle: startAngle, endAngle: geometricAngleDegToEllipseParamRad(degreeValue, baseEllipse.majorRadius, baseEllipse.minorRadius) })); }, baseEllipse.center);
|
|
570
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getAngle(endPrompt)];
|
|
571
|
+
case 2:
|
|
572
|
+
endResult = _c.sent();
|
|
573
|
+
if (endResult.status !== AcEdPromptStatus.OK)
|
|
574
|
+
return [2 /*return*/, undefined];
|
|
575
|
+
return [2 /*return*/, __assign(__assign({}, baseEllipse), { startAngle: startAngle, endAngle: geometricAngleDegToEllipseParamRad((_b = endResult.value) !== null && _b !== void 0 ? _b : 0, baseEllipse.majorRadius, baseEllipse.minorRadius) })];
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
return AcApEllipseCmd;
|
|
581
|
+
}(AcEdCommand));
|
|
582
|
+
export { AcApEllipseCmd };
|
|
583
|
+
//# sourceMappingURL=AcApEllipseCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApEllipseCmd.js","sourceRoot":"","sources":["../../src/command/AcApEllipseCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,WAAW,EACX,WAAW,EAGZ,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAe,cAAc,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,QAAQ,EACT,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,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