@mlightcad/data-model 1.0.0
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/LICENSE +21 -0
- package/README.md +116 -0
- package/dist/data-model.js +19887 -0
- package/dist/data-model.umd.cjs +5 -0
- package/lib/base/AcDbHostApplicationServices.d.ts +30 -0
- package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -0
- package/lib/base/AcDbHostApplicationServices.js +54 -0
- package/lib/base/AcDbHostApplicationServices.js.map +1 -0
- package/lib/base/AcDbObject.d.ts +70 -0
- package/lib/base/AcDbObject.d.ts.map +1 -0
- package/lib/base/AcDbObject.js +113 -0
- package/lib/base/AcDbObject.js.map +1 -0
- package/lib/base/index.d.ts +3 -0
- package/lib/base/index.d.ts.map +1 -0
- package/lib/base/index.js +3 -0
- package/lib/base/index.js.map +1 -0
- package/lib/converter/AcDbBatchProcessing.d.ts +43 -0
- package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -0
- package/lib/converter/AcDbBatchProcessing.js +165 -0
- package/lib/converter/AcDbBatchProcessing.js.map +1 -0
- package/lib/converter/AcDbDxfConverter.d.ts +39 -0
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -0
- package/lib/converter/AcDbDxfConverter.js +567 -0
- package/lib/converter/AcDbDxfConverter.js.map +1 -0
- package/lib/converter/AcDbDxfParseWorker.d.ts +2 -0
- package/lib/converter/AcDbDxfParseWorker.d.ts.map +1 -0
- package/lib/converter/AcDbDxfParseWorker.js +6 -0
- package/lib/converter/AcDbDxfParseWorker.js.map +1 -0
- package/lib/converter/AcDbEntitiyConverter.d.ts +36 -0
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -0
- package/lib/converter/AcDbEntitiyConverter.js +491 -0
- package/lib/converter/AcDbEntitiyConverter.js.map +1 -0
- package/lib/converter/AcDbObjectConverter.d.ts +9 -0
- package/lib/converter/AcDbObjectConverter.d.ts.map +1 -0
- package/lib/converter/AcDbObjectConverter.js +30 -0
- package/lib/converter/AcDbObjectConverter.js.map +1 -0
- package/lib/converter/index.d.ts +3 -0
- package/lib/converter/index.d.ts.map +1 -0
- package/lib/converter/index.js +3 -0
- package/lib/converter/index.js.map +1 -0
- package/lib/database/AcDbBlockTable.d.ts +15 -0
- package/lib/database/AcDbBlockTable.d.ts.map +1 -0
- package/lib/database/AcDbBlockTable.js +46 -0
- package/lib/database/AcDbBlockTable.js.map +1 -0
- package/lib/database/AcDbBlockTableRecord.d.ts +49 -0
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbBlockTableRecord.js +108 -0
- package/lib/database/AcDbBlockTableRecord.js.map +1 -0
- package/lib/database/AcDbDatabase.d.ts +211 -0
- package/lib/database/AcDbDatabase.d.ts.map +1 -0
- package/lib/database/AcDbDatabase.js +395 -0
- package/lib/database/AcDbDatabase.js.map +1 -0
- package/lib/database/AcDbDatabaseConverter.d.ts +120 -0
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -0
- package/lib/database/AcDbDatabaseConverter.js +376 -0
- package/lib/database/AcDbDatabaseConverter.js.map +1 -0
- package/lib/database/AcDbDatabaseConverterManager.d.ts +59 -0
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -0
- package/lib/database/AcDbDatabaseConverterManager.js +98 -0
- package/lib/database/AcDbDatabaseConverterManager.js.map +1 -0
- package/lib/database/AcDbDatabaseConverterRegister.d.ts +54 -0
- package/lib/database/AcDbDatabaseConverterRegister.d.ts.map +1 -0
- package/lib/database/AcDbDatabaseConverterRegister.js +84 -0
- package/lib/database/AcDbDatabaseConverterRegister.js.map +1 -0
- package/lib/database/AcDbDimStyleTable.d.ts +11 -0
- package/lib/database/AcDbDimStyleTable.d.ts.map +1 -0
- package/lib/database/AcDbDimStyleTable.js +29 -0
- package/lib/database/AcDbDimStyleTable.js.map +1 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts +682 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbDimStyleTableRecord.js +1250 -0
- package/lib/database/AcDbDimStyleTableRecord.js.map +1 -0
- package/lib/database/AcDbLayerTable.d.ts +14 -0
- package/lib/database/AcDbLayerTable.d.ts.map +1 -0
- package/lib/database/AcDbLayerTable.js +55 -0
- package/lib/database/AcDbLayerTable.js.map +1 -0
- package/lib/database/AcDbLayerTableRecord.d.ts +98 -0
- package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbLayerTableRecord.js +235 -0
- package/lib/database/AcDbLayerTableRecord.js.map +1 -0
- package/lib/database/AcDbLinetypeTable.d.ts +11 -0
- package/lib/database/AcDbLinetypeTable.d.ts.map +1 -0
- package/lib/database/AcDbLinetypeTable.js +29 -0
- package/lib/database/AcDbLinetypeTable.js.map +1 -0
- package/lib/database/AcDbLinetypeTableRecord.d.ts +47 -0
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbLinetypeTableRecord.js +97 -0
- package/lib/database/AcDbLinetypeTableRecord.js.map +1 -0
- package/lib/database/AcDbSymbolTable.d.ts +74 -0
- package/lib/database/AcDbSymbolTable.d.ts.map +1 -0
- package/lib/database/AcDbSymbolTable.js +136 -0
- package/lib/database/AcDbSymbolTable.js.map +1 -0
- package/lib/database/AcDbSymbolTableRecord.d.ts +16 -0
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbSymbolTableRecord.js +44 -0
- package/lib/database/AcDbSymbolTableRecord.js.map +1 -0
- package/lib/database/AcDbTextStyleTable.d.ts +14 -0
- package/lib/database/AcDbTextStyleTable.d.ts.map +1 -0
- package/lib/database/AcDbTextStyleTable.js +78 -0
- package/lib/database/AcDbTextStyleTable.js.map +1 -0
- package/lib/database/AcDbTextStyleTableRecord.d.ts +67 -0
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbTextStyleTableRecord.js +166 -0
- package/lib/database/AcDbTextStyleTableRecord.js.map +1 -0
- package/lib/database/AcDbViewportTable.d.ts +11 -0
- package/lib/database/AcDbViewportTable.d.ts.map +1 -0
- package/lib/database/AcDbViewportTable.js +29 -0
- package/lib/database/AcDbViewportTable.js.map +1 -0
- package/lib/database/AcDbViewportTableRecord.d.ts +89 -0
- package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbViewportTableRecord.js +262 -0
- package/lib/database/AcDbViewportTableRecord.js.map +1 -0
- package/lib/database/index.d.ts +18 -0
- package/lib/database/index.d.ts.map +1 -0
- package/lib/database/index.js +18 -0
- package/lib/database/index.js.map +1 -0
- package/lib/entity/AcDbArc.d.ts +67 -0
- package/lib/entity/AcDbArc.d.ts.map +1 -0
- package/lib/entity/AcDbArc.js +154 -0
- package/lib/entity/AcDbArc.js.map +1 -0
- package/lib/entity/AcDbBlockReference.d.ts +54 -0
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -0
- package/lib/entity/AcDbBlockReference.js +168 -0
- package/lib/entity/AcDbBlockReference.js.map +1 -0
- package/lib/entity/AcDbCircle.d.ts +51 -0
- package/lib/entity/AcDbCircle.d.ts.map +1 -0
- package/lib/entity/AcDbCircle.js +115 -0
- package/lib/entity/AcDbCircle.js.map +1 -0
- package/lib/entity/AcDbCurve.d.ts +9 -0
- package/lib/entity/AcDbCurve.d.ts.map +1 -0
- package/lib/entity/AcDbCurve.js +25 -0
- package/lib/entity/AcDbCurve.js.map +1 -0
- package/lib/entity/AcDbEllipse.d.ts +53 -0
- package/lib/entity/AcDbEllipse.d.ts.map +1 -0
- package/lib/entity/AcDbEllipse.js +119 -0
- package/lib/entity/AcDbEllipse.js.map +1 -0
- package/lib/entity/AcDbEntity.d.ts +103 -0
- package/lib/entity/AcDbEntity.d.ts.map +1 -0
- package/lib/entity/AcDbEntity.js +292 -0
- package/lib/entity/AcDbEntity.js.map +1 -0
- package/lib/entity/AcDbHatch.d.ts +116 -0
- package/lib/entity/AcDbHatch.d.ts.map +1 -0
- package/lib/entity/AcDbHatch.js +200 -0
- package/lib/entity/AcDbHatch.js.map +1 -0
- package/lib/entity/AcDbLeader.d.ts +94 -0
- package/lib/entity/AcDbLeader.d.ts.map +1 -0
- package/lib/entity/AcDbLeader.js +217 -0
- package/lib/entity/AcDbLeader.js.map +1 -0
- package/lib/entity/AcDbLine.d.ts +55 -0
- package/lib/entity/AcDbLine.d.ts.map +1 -0
- package/lib/entity/AcDbLine.js +158 -0
- package/lib/entity/AcDbLine.js.map +1 -0
- package/lib/entity/AcDbMText.d.ts +119 -0
- package/lib/entity/AcDbMText.d.ts.map +1 -0
- package/lib/entity/AcDbMText.js +300 -0
- package/lib/entity/AcDbMText.js.map +1 -0
- package/lib/entity/AcDbPoint.d.ts +32 -0
- package/lib/entity/AcDbPoint.d.ts.map +1 -0
- package/lib/entity/AcDbPoint.js +75 -0
- package/lib/entity/AcDbPoint.js.map +1 -0
- package/lib/entity/AcDbPolyline.d.ts +72 -0
- package/lib/entity/AcDbPolyline.d.ts.map +1 -0
- package/lib/entity/AcDbPolyline.js +154 -0
- package/lib/entity/AcDbPolyline.js.map +1 -0
- package/lib/entity/AcDbRasterImage.d.ts +163 -0
- package/lib/entity/AcDbRasterImage.d.ts.map +1 -0
- package/lib/entity/AcDbRasterImage.js +406 -0
- package/lib/entity/AcDbRasterImage.js.map +1 -0
- package/lib/entity/AcDbRay.d.ts +42 -0
- package/lib/entity/AcDbRay.d.ts.map +1 -0
- package/lib/entity/AcDbRay.js +102 -0
- package/lib/entity/AcDbRay.js.map +1 -0
- package/lib/entity/AcDbSpline.d.ts +37 -0
- package/lib/entity/AcDbSpline.d.ts.map +1 -0
- package/lib/entity/AcDbSpline.js +71 -0
- package/lib/entity/AcDbSpline.js.map +1 -0
- package/lib/entity/AcDbTable.d.ts +141 -0
- package/lib/entity/AcDbTable.d.ts.map +1 -0
- package/lib/entity/AcDbTable.js +358 -0
- package/lib/entity/AcDbTable.js.map +1 -0
- package/lib/entity/AcDbText.d.ts +110 -0
- package/lib/entity/AcDbText.d.ts.map +1 -0
- package/lib/entity/AcDbText.js +255 -0
- package/lib/entity/AcDbText.js.map +1 -0
- package/lib/entity/AcDbTrace.d.ts +64 -0
- package/lib/entity/AcDbTrace.d.ts.map +1 -0
- package/lib/entity/AcDbTrace.js +145 -0
- package/lib/entity/AcDbTrace.js.map +1 -0
- package/lib/entity/AcDbViewport.d.ts +58 -0
- package/lib/entity/AcDbViewport.d.ts.map +1 -0
- package/lib/entity/AcDbViewport.js +179 -0
- package/lib/entity/AcDbViewport.js.map +1 -0
- package/lib/entity/AcDbWipeout.d.ts +9 -0
- package/lib/entity/AcDbWipeout.d.ts.map +1 -0
- package/lib/entity/AcDbWipeout.js +40 -0
- package/lib/entity/AcDbWipeout.js.map +1 -0
- package/lib/entity/AcDbXline.d.ts +42 -0
- package/lib/entity/AcDbXline.d.ts.map +1 -0
- package/lib/entity/AcDbXline.js +102 -0
- package/lib/entity/AcDbXline.js.map +1 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +46 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +111 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +77 -0
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbAlignedDimension.js +203 -0
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbArcDimension.d.ts +46 -0
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbArcDimension.js +111 -0
- package/lib/entity/dimension/AcDbArcDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +69 -0
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbDiametricDimension.js +199 -0
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbDimension.d.ts +161 -0
- package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbDimension.js +375 -0
- package/lib/entity/dimension/AcDbDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +44 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.js +99 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +69 -0
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbRadialDimension.js +148 -0
- package/lib/entity/dimension/AcDbRadialDimension.js.map +1 -0
- package/lib/entity/dimension/index.d.ts +8 -0
- package/lib/entity/dimension/index.d.ts.map +1 -0
- package/lib/entity/dimension/index.js +8 -0
- package/lib/entity/dimension/index.js.map +1 -0
- package/lib/entity/index.d.ts +23 -0
- package/lib/entity/index.d.ts.map +1 -0
- package/lib/entity/index.js +23 -0
- package/lib/entity/index.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/misc/AcDbAngleUnits.d.ts +8 -0
- package/lib/misc/AcDbAngleUnits.d.ts.map +1 -0
- package/lib/misc/AcDbAngleUnits.js +9 -0
- package/lib/misc/AcDbAngleUnits.js.map +1 -0
- package/lib/misc/AcDbConstants.d.ts +4 -0
- package/lib/misc/AcDbConstants.d.ts.map +1 -0
- package/lib/misc/AcDbConstants.js +4 -0
- package/lib/misc/AcDbConstants.js.map +1 -0
- package/lib/misc/AcDbDimArrowType.d.ts +86 -0
- package/lib/misc/AcDbDimArrowType.d.ts.map +1 -0
- package/lib/misc/AcDbDimArrowType.js +87 -0
- package/lib/misc/AcDbDimArrowType.js.map +1 -0
- package/lib/misc/AcDbObjectIterator.d.ts +16 -0
- package/lib/misc/AcDbObjectIterator.d.ts.map +1 -0
- package/lib/misc/AcDbObjectIterator.js +28 -0
- package/lib/misc/AcDbObjectIterator.js.map +1 -0
- package/lib/misc/AcDbOsnapMode.d.ts +43 -0
- package/lib/misc/AcDbOsnapMode.d.ts.map +1 -0
- package/lib/misc/AcDbOsnapMode.js +44 -0
- package/lib/misc/AcDbOsnapMode.js.map +1 -0
- package/lib/misc/AcDbRenderingCache.d.ts +61 -0
- package/lib/misc/AcDbRenderingCache.d.ts.map +1 -0
- package/lib/misc/AcDbRenderingCache.js +154 -0
- package/lib/misc/AcDbRenderingCache.js.map +1 -0
- package/lib/misc/AcDbUnitsValue.d.ts +51 -0
- package/lib/misc/AcDbUnitsValue.d.ts.map +1 -0
- package/lib/misc/AcDbUnitsValue.js +71 -0
- package/lib/misc/AcDbUnitsValue.js.map +1 -0
- package/lib/misc/index.d.ts +8 -0
- package/lib/misc/index.d.ts.map +1 -0
- package/lib/misc/index.js +8 -0
- package/lib/misc/index.js.map +1 -0
- package/lib/object/AcDbDictionary.d.ts +80 -0
- package/lib/object/AcDbDictionary.d.ts.map +1 -0
- package/lib/object/AcDbDictionary.js +144 -0
- package/lib/object/AcDbDictionary.js.map +1 -0
- package/lib/object/AcDbRasterImageDef.d.ts +25 -0
- package/lib/object/AcDbRasterImageDef.d.ts.map +1 -0
- package/lib/object/AcDbRasterImageDef.js +54 -0
- package/lib/object/AcDbRasterImageDef.js.map +1 -0
- package/lib/object/index.d.ts +4 -0
- package/lib/object/index.d.ts.map +1 -0
- package/lib/object/index.js +4 -0
- package/lib/object/index.js.map +1 -0
- package/lib/object/layout/AcDbLayout.d.ts +51 -0
- package/lib/object/layout/AcDbLayout.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayout.js +120 -0
- package/lib/object/layout/AcDbLayout.js.map +1 -0
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +19 -0
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayoutDictionary.js +94 -0
- package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -0
- package/lib/object/layout/AcDbLayoutManager.d.ts +101 -0
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayoutManager.js +154 -0
- package/lib/object/layout/AcDbLayoutManager.js.map +1 -0
- package/lib/object/layout/index.d.ts +4 -0
- package/lib/object/layout/index.d.ts.map +1 -0
- package/lib/object/layout/index.js +4 -0
- package/lib/object/layout/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,203 @@
|
|
|
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
|
+
import { AcGeBox3d, AcGeLine3d, AcGePoint3d, AcGeVector3d } from '@mlightcad/geometry-engine';
|
|
28
|
+
import { AcDbDimension } from './AcDbDimension';
|
|
29
|
+
/**
|
|
30
|
+
* This class represents the dimension type that dimensions the distance between two points located anywhere
|
|
31
|
+
* in space. The dimension's normal vector must be perpendicular to the line between the two points. The two
|
|
32
|
+
* selected points are also used as the definition points for the start of the two dimension extension lines.
|
|
33
|
+
*/
|
|
34
|
+
var AcDbAlignedDimension = /** @class */ (function (_super) {
|
|
35
|
+
__extends(AcDbAlignedDimension, _super);
|
|
36
|
+
/**
|
|
37
|
+
* This constructor uses the parameters passed in to initialize the dimension. In addition, the extension
|
|
38
|
+
* line obliquing angle is set to 0.0.
|
|
39
|
+
* - If dimStyle is left as null, then the current default dimStyle within the AutoCAD editor is used.
|
|
40
|
+
* @param xLine1Point Input start point (in WCS coordinates) of first extension line
|
|
41
|
+
* @param xLine2Point Input start point (in WCS coordinates) of second extension line
|
|
42
|
+
* @param dimLinePoint Input point (in WCS coordinates) on dimension line itself
|
|
43
|
+
* @param dimText Input text string to use as the dimension annotation
|
|
44
|
+
* @param dimStyle Input string name of dimension style table record to use
|
|
45
|
+
*/
|
|
46
|
+
function AcDbAlignedDimension(xLine1Point, xLine2Point, dimLinePoint, dimText, dimStyle) {
|
|
47
|
+
if (dimText === void 0) { dimText = null; }
|
|
48
|
+
if (dimStyle === void 0) { dimStyle = null; }
|
|
49
|
+
var _this = _super.call(this) || this;
|
|
50
|
+
_this._dimLinePoint = new AcGePoint3d().copy(dimLinePoint);
|
|
51
|
+
_this._xLine1Point = new AcGePoint3d().copy(xLine1Point);
|
|
52
|
+
_this._xLine2Point = new AcGePoint3d().copy(xLine2Point);
|
|
53
|
+
_this._oblique = 0;
|
|
54
|
+
_this._rotation = 0;
|
|
55
|
+
_this.dimensionText = dimText;
|
|
56
|
+
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
57
|
+
_this.dimensionStyleName = dimStyle;
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "dimLinePoint", {
|
|
61
|
+
/**
|
|
62
|
+
* The definition point (in WCS coordinates) that specifies where the dimension line will be. This point
|
|
63
|
+
* will be somewhere on the dimension line.
|
|
64
|
+
*/
|
|
65
|
+
get: function () {
|
|
66
|
+
return this._dimLinePoint;
|
|
67
|
+
},
|
|
68
|
+
set: function (value) {
|
|
69
|
+
this._dimLinePoint.copy(value);
|
|
70
|
+
},
|
|
71
|
+
enumerable: false,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "xLine1Point", {
|
|
75
|
+
/**
|
|
76
|
+
* The start point for the first extension line of the dimension.
|
|
77
|
+
*/
|
|
78
|
+
get: function () {
|
|
79
|
+
return this._xLine1Point;
|
|
80
|
+
},
|
|
81
|
+
set: function (value) {
|
|
82
|
+
this._xLine1Point.copy(value);
|
|
83
|
+
},
|
|
84
|
+
enumerable: false,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "xLine2Point", {
|
|
88
|
+
/**
|
|
89
|
+
* The start point for the second extension line of the dimension.
|
|
90
|
+
*/
|
|
91
|
+
get: function () {
|
|
92
|
+
return this._xLine2Point;
|
|
93
|
+
},
|
|
94
|
+
set: function (value) {
|
|
95
|
+
this._xLine2Point.copy(value);
|
|
96
|
+
},
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "rotation", {
|
|
101
|
+
/**
|
|
102
|
+
* The dimension's rotation angle in radians.
|
|
103
|
+
*/
|
|
104
|
+
get: function () {
|
|
105
|
+
return this._rotation;
|
|
106
|
+
},
|
|
107
|
+
set: function (value) {
|
|
108
|
+
this._rotation = value;
|
|
109
|
+
},
|
|
110
|
+
enumerable: false,
|
|
111
|
+
configurable: true
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "oblique", {
|
|
114
|
+
/**
|
|
115
|
+
* The extension line obliquing angle (in radians) for the dimension.
|
|
116
|
+
*/
|
|
117
|
+
get: function () {
|
|
118
|
+
return this._oblique;
|
|
119
|
+
},
|
|
120
|
+
set: function (value) {
|
|
121
|
+
this._oblique = value;
|
|
122
|
+
},
|
|
123
|
+
enumerable: false,
|
|
124
|
+
configurable: true
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "geometricExtents", {
|
|
127
|
+
/**
|
|
128
|
+
* @inheritdoc
|
|
129
|
+
*/
|
|
130
|
+
get: function () {
|
|
131
|
+
// TODO: Finish it
|
|
132
|
+
return new AcGeBox3d();
|
|
133
|
+
},
|
|
134
|
+
enumerable: false,
|
|
135
|
+
configurable: true
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(AcDbAlignedDimension.prototype, "isAppendArrow", {
|
|
138
|
+
/**
|
|
139
|
+
* @inheritdoc
|
|
140
|
+
*/
|
|
141
|
+
get: function () {
|
|
142
|
+
return false;
|
|
143
|
+
},
|
|
144
|
+
enumerable: false,
|
|
145
|
+
configurable: true
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* Return one array which contains three lines of the alinged dimension.
|
|
149
|
+
* - The first line in the array is dimension line.
|
|
150
|
+
* - The second line and the third line in the array are extension lines.
|
|
151
|
+
* @returns Return three lines of the alinged dimension
|
|
152
|
+
*/
|
|
153
|
+
AcDbAlignedDimension.prototype.calculateLines = function () {
|
|
154
|
+
var lines = [];
|
|
155
|
+
var extensionLine1 = this.createExtensionLine(this._xLine1Point);
|
|
156
|
+
var extensionLine2 = this.createExtensionLine(this._xLine2Point);
|
|
157
|
+
var intersectionPoint1 = this.findIntersectionPoint(extensionLine1, this._dimLinePoint);
|
|
158
|
+
var intersectionPoint2 = this.findIntersectionPoint(extensionLine2, this._dimLinePoint);
|
|
159
|
+
var dimensionLine = new AcGeLine3d(intersectionPoint1, intersectionPoint2);
|
|
160
|
+
lines.push(dimensionLine);
|
|
161
|
+
// Create the first extension line with extension
|
|
162
|
+
extensionLine1.endPoint = intersectionPoint1;
|
|
163
|
+
this.adjustExtensionLine(extensionLine1);
|
|
164
|
+
lines.push(extensionLine1);
|
|
165
|
+
// Create the second extension line with extension
|
|
166
|
+
extensionLine2.endPoint = intersectionPoint2;
|
|
167
|
+
this.adjustExtensionLine(extensionLine2);
|
|
168
|
+
lines.push(extensionLine2);
|
|
169
|
+
return lines;
|
|
170
|
+
};
|
|
171
|
+
AcDbAlignedDimension.prototype.createExtensionLine = function (point) {
|
|
172
|
+
var angle = this.rotation + Math.PI / 2;
|
|
173
|
+
var anotherPoint = this.findPointOnLine2(point, angle, 100);
|
|
174
|
+
return new AcGeLine3d(point, __assign(__assign({}, anotherPoint), { z: point.z }));
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Compute the intersection point between a line 'line1' and a line 'line2' that passes through
|
|
178
|
+
* a given point 'p' and is perpendicular to line 'line1'.
|
|
179
|
+
*
|
|
180
|
+
* @param line The 'line1'.
|
|
181
|
+
* @param p The point through which the perpendicular 'line2' passes.
|
|
182
|
+
* @returns Returns the intersection point of 'line1' and 'line2'.
|
|
183
|
+
*/
|
|
184
|
+
AcDbAlignedDimension.prototype.findIntersectionPoint = function (line1, p) {
|
|
185
|
+
var p1 = line1.startPoint;
|
|
186
|
+
var p2 = line1.endPoint;
|
|
187
|
+
// Direction of line1 (p1 - p2)
|
|
188
|
+
var directionOfLine1 = new AcGeVector3d().subVectors(p2, p1).normalize();
|
|
189
|
+
// Vector from point 'p1' to point 'p3'
|
|
190
|
+
var vectorFromP1ToP3 = new AcGeVector3d().subVectors(p, p1);
|
|
191
|
+
// Project vectorAP onto directionL to get the projection vector
|
|
192
|
+
var projectionLength = vectorFromP1ToP3.dot(directionOfLine1);
|
|
193
|
+
var projectionVector = new AcGeVector3d()
|
|
194
|
+
.copy(directionOfLine1)
|
|
195
|
+
.multiplyScalar(projectionLength);
|
|
196
|
+
// Intersection point is the point on line L at the projection
|
|
197
|
+
var intersection = new AcGeVector3d().addVectors(p1, projectionVector);
|
|
198
|
+
return intersection;
|
|
199
|
+
};
|
|
200
|
+
return AcDbAlignedDimension;
|
|
201
|
+
}(AcDbDimension));
|
|
202
|
+
export { AcDbAlignedDimension };
|
|
203
|
+
//# sourceMappingURL=AcDbAlignedDimension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbAlignedDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbAlignedDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EAEX,YAAY,EACb,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;GAIG;AACH;IAA0C,wCAAa;IAOrD;;;;;;;;;OASG;IACH,8BACE,WAA0B,EAC1B,WAA0B,EAC1B,YAA2B,EAC3B,OAA6B,EAC7B,QAA8B;QAD9B,wBAAA,EAAA,cAA6B;QAC7B,yBAAA,EAAA,eAA8B;QAE9B,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,aAAa,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACzD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;QACjB,KAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAElB,KAAI,CAAC,aAAa,GAAG,OAAO,CAAA;QAC5B,6FAA6F;QAC7F,KAAI,CAAC,kBAAkB,GAAG,QAAQ,CA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M,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAA;QAEzB,+BAA+B;QAC/B,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAA;QAE1E,uCAAuC;QACvC,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAE7D,gEAAgE;QAChE,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;QAC/D,IAAM,gBAAgB,GAAG,IAAI,YAAY,EAAE;aACxC,IAAI,CAAC,gBAAgB,CAAC;aACtB,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAEnC,8DAA8D;QAC9D,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAA;QAExE,OAAO,YAAY,CAAA;IACrB,CAAC;IACH,2BAAC;AAAD,CAAC,AA7KD,CAA0C,aAAa,GA6KtD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AcGeBox3d, AcGePoint3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
|
|
2
|
+
import { AcDbDimension } from './AcDbDimension';
|
|
3
|
+
/**
|
|
4
|
+
* This class represents an arc length dimension.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AcDbArcDimension extends AcDbDimension {
|
|
7
|
+
private _arcPoint;
|
|
8
|
+
private _centerPoint;
|
|
9
|
+
private _xLine1Point;
|
|
10
|
+
private _xLine2Point;
|
|
11
|
+
/**
|
|
12
|
+
* Create one instance of this class.
|
|
13
|
+
* @param centerPoint Input the center of the arc being dimensioned
|
|
14
|
+
* @param xLine1Point Input the first extension line end point
|
|
15
|
+
* @param xLine2Point Input the second extension line end point
|
|
16
|
+
* @param arcPoint Input point on arc being dimensioned
|
|
17
|
+
* @param dimText Input dimension text to use instead of calculated value
|
|
18
|
+
* @param dimStyle Input string name of dimension style table record to use
|
|
19
|
+
*/
|
|
20
|
+
constructor(centerPoint: AcGePoint3dLike, xLine1Point: AcGePoint3dLike, xLine2Point: AcGePoint3dLike, arcPoint: AcGePoint3dLike, dimText?: string | null, dimStyle?: string | null);
|
|
21
|
+
/**
|
|
22
|
+
* A point on the arc length dimension's dimension arc.
|
|
23
|
+
*/
|
|
24
|
+
get arcPoint(): AcGePoint3d;
|
|
25
|
+
set arcPoint(value: AcGePoint3d);
|
|
26
|
+
/**
|
|
27
|
+
* The center point of the arc dimensioned by the arc length dimension.
|
|
28
|
+
*/
|
|
29
|
+
get centerPoint(): AcGePoint3d;
|
|
30
|
+
set centerPoint(value: AcGePoint3d);
|
|
31
|
+
/**
|
|
32
|
+
* The start point for the first extension line of the dimension.
|
|
33
|
+
*/
|
|
34
|
+
get xLine1Point(): AcGePoint3d;
|
|
35
|
+
set xLine1Point(value: AcGePoint3d);
|
|
36
|
+
/**
|
|
37
|
+
* The start point for the second extension line of the dimension.
|
|
38
|
+
*/
|
|
39
|
+
get xLine2Point(): AcGePoint3d;
|
|
40
|
+
set xLine2Point(value: AcGePoint3d);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritdoc
|
|
43
|
+
*/
|
|
44
|
+
get geometricExtents(): AcGeBox3d;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=AcDbArcDimension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbArcDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbArcDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,YAAY,CAAa;IAEjC;;;;;;;;OAQG;gBAED,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,eAAe,EACzB,OAAO,GAAE,MAAM,GAAG,IAAW,EAC7B,QAAQ,GAAE,MAAM,GAAG,IAAW;IAahC;;OAEG;IACH,IAAI,QAAQ,IAGQ,WAAW,CAD9B;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,WAAW,EAE9B;IAED;;OAEG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;OAEG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;OAEG;IACH,IAAI,WAAW,IAGQ,WAAW,CADjC;IACD,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,EAEjC;IAED;;OAEG;IACH,IAAI,gBAAgB,cAGnB;CACF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
17
|
+
import { AcDbDimension } from './AcDbDimension';
|
|
18
|
+
/**
|
|
19
|
+
* This class represents an arc length dimension.
|
|
20
|
+
*/
|
|
21
|
+
var AcDbArcDimension = /** @class */ (function (_super) {
|
|
22
|
+
__extends(AcDbArcDimension, _super);
|
|
23
|
+
/**
|
|
24
|
+
* Create one instance of this class.
|
|
25
|
+
* @param centerPoint Input the center of the arc being dimensioned
|
|
26
|
+
* @param xLine1Point Input the first extension line end point
|
|
27
|
+
* @param xLine2Point Input the second extension line end point
|
|
28
|
+
* @param arcPoint Input point on arc being dimensioned
|
|
29
|
+
* @param dimText Input dimension text to use instead of calculated value
|
|
30
|
+
* @param dimStyle Input string name of dimension style table record to use
|
|
31
|
+
*/
|
|
32
|
+
function AcDbArcDimension(centerPoint, xLine1Point, xLine2Point, arcPoint, dimText, dimStyle) {
|
|
33
|
+
if (dimText === void 0) { dimText = null; }
|
|
34
|
+
if (dimStyle === void 0) { dimStyle = null; }
|
|
35
|
+
var _this = _super.call(this) || this;
|
|
36
|
+
_this._arcPoint = new AcGePoint3d().copy(arcPoint);
|
|
37
|
+
_this._xLine1Point = new AcGePoint3d().copy(xLine1Point);
|
|
38
|
+
_this._xLine2Point = new AcGePoint3d().copy(xLine2Point);
|
|
39
|
+
_this._centerPoint = new AcGePoint3d().copy(centerPoint);
|
|
40
|
+
_this.dimensionText = dimText;
|
|
41
|
+
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
42
|
+
_this.dimensionStyleName = dimStyle;
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
Object.defineProperty(AcDbArcDimension.prototype, "arcPoint", {
|
|
46
|
+
/**
|
|
47
|
+
* A point on the arc length dimension's dimension arc.
|
|
48
|
+
*/
|
|
49
|
+
get: function () {
|
|
50
|
+
return this._arcPoint;
|
|
51
|
+
},
|
|
52
|
+
set: function (value) {
|
|
53
|
+
this._arcPoint.copy(value);
|
|
54
|
+
},
|
|
55
|
+
enumerable: false,
|
|
56
|
+
configurable: true
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(AcDbArcDimension.prototype, "centerPoint", {
|
|
59
|
+
/**
|
|
60
|
+
* The center point of the arc dimensioned by the arc length dimension.
|
|
61
|
+
*/
|
|
62
|
+
get: function () {
|
|
63
|
+
return this._centerPoint;
|
|
64
|
+
},
|
|
65
|
+
set: function (value) {
|
|
66
|
+
this._centerPoint.copy(value);
|
|
67
|
+
},
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(AcDbArcDimension.prototype, "xLine1Point", {
|
|
72
|
+
/**
|
|
73
|
+
* The start point for the first extension line of the dimension.
|
|
74
|
+
*/
|
|
75
|
+
get: function () {
|
|
76
|
+
return this._xLine1Point;
|
|
77
|
+
},
|
|
78
|
+
set: function (value) {
|
|
79
|
+
this._xLine1Point.copy(value);
|
|
80
|
+
},
|
|
81
|
+
enumerable: false,
|
|
82
|
+
configurable: true
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(AcDbArcDimension.prototype, "xLine2Point", {
|
|
85
|
+
/**
|
|
86
|
+
* The start point for the second extension line of the dimension.
|
|
87
|
+
*/
|
|
88
|
+
get: function () {
|
|
89
|
+
return this._xLine2Point;
|
|
90
|
+
},
|
|
91
|
+
set: function (value) {
|
|
92
|
+
this._xLine2Point.copy(value);
|
|
93
|
+
},
|
|
94
|
+
enumerable: false,
|
|
95
|
+
configurable: true
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(AcDbArcDimension.prototype, "geometricExtents", {
|
|
98
|
+
/**
|
|
99
|
+
* @inheritdoc
|
|
100
|
+
*/
|
|
101
|
+
get: function () {
|
|
102
|
+
// TODO: Finish it
|
|
103
|
+
return new AcGeBox3d();
|
|
104
|
+
},
|
|
105
|
+
enumerable: false,
|
|
106
|
+
configurable: true
|
|
107
|
+
});
|
|
108
|
+
return AcDbArcDimension;
|
|
109
|
+
}(AcDbDimension));
|
|
110
|
+
export { AcDbArcDimension };
|
|
111
|
+
//# sourceMappingURL=AcDbArcDimension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbArcDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbArcDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH;IAAsC,oCAAa;IAMjD;;;;;;;;OAQG;IACH,0BACE,WAA4B,EAC5B,WAA4B,EAC5B,WAA4B,EAC5B,QAAyB,EACzB,OAA6B,EAC7B,QAA8B;QAD9B,wBAAA,EAAA,cAA6B;QAC7B,yBAAA,EAAA,eAA8B;QAE9B,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,SAAS,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACjD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAEvD,KAAI,CAAC,aAAa,GAAG,OAAO,CAAA;QAC5B,6FAA6F;QAC7F,KAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAA;;IACpC,CAAC;IAKD,sBAAI,sCAAQ;QAHZ;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;aACD,UAAa,KAAkB;YAC7B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;;;OAHA;IAQD,sBAAI,yCAAW;QAHf;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,YAAY,CAAA;QAC1B,CAAC;aACD,UAAgB,KAAkB;YAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/B,CAAC;;;OAHA;IAQD,sBAAI,yCAAW;QAHf;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,YAAY,CAAA;QAC1B,CAAC;aACD,UAAgB,KAAkB;YAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/B,CAAC;;;OAHA;IAQD,sBAAI,yCAAW;QAHf;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,YAAY,CAAA;QAC1B,CAAC;aACD,UAAgB,KAAkB;YAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC/B,CAAC;;;OAHA;IAQD,sBAAI,8CAAgB;QAHpB;;WAEG;aACH;YACE,kBAAkB;YAClB,OAAO,IAAI,SAAS,EAAE,CAAA;QACxB,CAAC;;;OAAA;IACH,uBAAC;AAAD,CAAC,AAjFD,CAAsC,aAAa,GAiFlD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AcGeBox3d, AcGePoint3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
|
|
2
|
+
import { AcGiEntity, AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
|
+
import { AcDbLine } from '../AcDbLine';
|
|
4
|
+
import { AcDbDimension } from './AcDbDimension';
|
|
5
|
+
/**
|
|
6
|
+
* This class represents the diameter dimension type in AutoCAD. This dimension type requires two points
|
|
7
|
+
* that define a diameter chord on the curve being dimensioned to be able to draw the dimension line from
|
|
8
|
+
* one chord point to the other. In addition, if the text is located outside the curve being dimensioned,
|
|
9
|
+
* then a "leader length" value is used to determine how far the dimension line extends out past the curve
|
|
10
|
+
* before doing a horizontal dogleg (if necessary) to the annotation text.
|
|
11
|
+
*
|
|
12
|
+
* - If the text is inside the curve being dimensioned, then the dimension line will be drawn from
|
|
13
|
+
* the farChordPoint to the chordPoint, with a break for the annotation text.
|
|
14
|
+
* - If the dimension text is outside the curve being dimensioned, then the dimension line is drawn
|
|
15
|
+
* from the farChordPoint, on through the chordPoint, and out the leaderLength distance past the
|
|
16
|
+
* chordPoint, where it will do a short horizontal dogleg (if appropriate) to the annotation text.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AcDbDiametricDimension extends AcDbDimension {
|
|
19
|
+
private _chordPoint;
|
|
20
|
+
private _farChordPoint;
|
|
21
|
+
private _extArcStartAngle;
|
|
22
|
+
private _extArcEndAngle;
|
|
23
|
+
private _leaderLength;
|
|
24
|
+
/**
|
|
25
|
+
* Create one instance of this class using the provided parameters
|
|
26
|
+
* @param chordPoint Input point (in WCS coordinates) on the curve being dimensioned
|
|
27
|
+
* @param farChordPoint Input point (in WCS coordinates) on curve being dimensioned and diametrically
|
|
28
|
+
* opposite the chordPoint
|
|
29
|
+
* @param leaderLength Input leader length
|
|
30
|
+
*/
|
|
31
|
+
constructor(chordPoint: AcGePoint3dLike, farChordPoint: AcGePoint3dLike, leaderLength?: number, dimText?: string | null, dimStyle?: string | null);
|
|
32
|
+
/**
|
|
33
|
+
* The point (in WCS coordinates) where the dimension line intersects the curve being dimensioned and
|
|
34
|
+
* extends outside the curve, if the text is outside the curve.
|
|
35
|
+
*/
|
|
36
|
+
get chordPoint(): AcGePoint3d;
|
|
37
|
+
set chordPoint(value: AcGePoint3d);
|
|
38
|
+
/**
|
|
39
|
+
* The far chord point (in WCS coordinates) of the curve being dimensioned. This is the point on the
|
|
40
|
+
* curve that is diametrically opposite the point where the dimension line extends outside the curve,
|
|
41
|
+
* if the text is outside the curve.
|
|
42
|
+
*/
|
|
43
|
+
get farChordPoint(): AcGePoint3d;
|
|
44
|
+
set farChordPoint(value: AcGePoint3d);
|
|
45
|
+
/**
|
|
46
|
+
* The extension arc start angle.
|
|
47
|
+
*/
|
|
48
|
+
get extArcStartAngle(): number;
|
|
49
|
+
set extArcStartAngle(value: number);
|
|
50
|
+
/**
|
|
51
|
+
* The extension arc end angle.
|
|
52
|
+
*/
|
|
53
|
+
get extArcEndAngle(): number;
|
|
54
|
+
set extArcEndAngle(value: number);
|
|
55
|
+
/**
|
|
56
|
+
* The dimension to use length as the distance from the chordPoint dimension definition point, out
|
|
57
|
+
* to where the dimension will do a horizontal dogleg to the annotation text (or stop if no dogleg
|
|
58
|
+
* is necessary).
|
|
59
|
+
*/
|
|
60
|
+
get leaderLength(): number;
|
|
61
|
+
/**
|
|
62
|
+
* @inheritdoc
|
|
63
|
+
*/
|
|
64
|
+
get geometricExtents(): AcGeBox3d;
|
|
65
|
+
protected drawLines(renderer: AcGiRenderer, lines: AcDbLine[]): AcGiEntity[];
|
|
66
|
+
private drawLine;
|
|
67
|
+
private sortLines;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=AcDbDiametricDimension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbDiametricDimension.d.ts","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbDiametricDimension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,UAAU,EAEV,YAAY,EACb,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;;;GAYG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,aAAa,CAAQ;IAE7B;;;;;;OAMG;gBAED,UAAU,EAAE,eAAe,EAC3B,aAAa,EAAE,eAAe,EAC9B,YAAY,GAAE,MAAU,EACxB,OAAO,GAAE,MAAM,GAAG,IAAW,EAC7B,QAAQ,GAAE,MAAM,GAAG,IAAW;IAchC;;;OAGG;IACH,IAAI,UAAU,IAGQ,WAAW,CADhC;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,WAAW,EAEhC;IAED;;;;OAIG;IACH,IAAI,aAAa,IAGQ,WAAW,CADnC;IACD,IAAI,aAAa,CAAC,KAAK,EAAE,WAAW,EAEnC;IAED;;OAEG;IACH,IAAI,gBAAgB,IAGQ,MAAM,CADjC;IACD,IAAI,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAEjC;IAED;;OAEG;IACH,IAAI,cAAc,IAGQ,MAAM,CAD/B;IACD,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED;;;;OAIG;IACH,IAAI,YAAY,WAEf;IAED;;OAEG;IACH,IAAI,gBAAgB,cAGnB;IAED,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE;IA8B7D,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,SAAS;CAelB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
28
|
+
import { AcDbDimension } from './AcDbDimension';
|
|
29
|
+
/**
|
|
30
|
+
* This class represents the diameter dimension type in AutoCAD. This dimension type requires two points
|
|
31
|
+
* that define a diameter chord on the curve being dimensioned to be able to draw the dimension line from
|
|
32
|
+
* one chord point to the other. In addition, if the text is located outside the curve being dimensioned,
|
|
33
|
+
* then a "leader length" value is used to determine how far the dimension line extends out past the curve
|
|
34
|
+
* before doing a horizontal dogleg (if necessary) to the annotation text.
|
|
35
|
+
*
|
|
36
|
+
* - If the text is inside the curve being dimensioned, then the dimension line will be drawn from
|
|
37
|
+
* the farChordPoint to the chordPoint, with a break for the annotation text.
|
|
38
|
+
* - If the dimension text is outside the curve being dimensioned, then the dimension line is drawn
|
|
39
|
+
* from the farChordPoint, on through the chordPoint, and out the leaderLength distance past the
|
|
40
|
+
* chordPoint, where it will do a short horizontal dogleg (if appropriate) to the annotation text.
|
|
41
|
+
*/
|
|
42
|
+
var AcDbDiametricDimension = /** @class */ (function (_super) {
|
|
43
|
+
__extends(AcDbDiametricDimension, _super);
|
|
44
|
+
/**
|
|
45
|
+
* Create one instance of this class using the provided parameters
|
|
46
|
+
* @param chordPoint Input point (in WCS coordinates) on the curve being dimensioned
|
|
47
|
+
* @param farChordPoint Input point (in WCS coordinates) on curve being dimensioned and diametrically
|
|
48
|
+
* opposite the chordPoint
|
|
49
|
+
* @param leaderLength Input leader length
|
|
50
|
+
*/
|
|
51
|
+
function AcDbDiametricDimension(chordPoint, farChordPoint, leaderLength, dimText, dimStyle) {
|
|
52
|
+
if (leaderLength === void 0) { leaderLength = 0; }
|
|
53
|
+
if (dimText === void 0) { dimText = null; }
|
|
54
|
+
if (dimStyle === void 0) { dimStyle = null; }
|
|
55
|
+
var _this = _super.call(this) || this;
|
|
56
|
+
_this._chordPoint = new AcGePoint3d().copy(chordPoint);
|
|
57
|
+
_this._farChordPoint = new AcGePoint3d().copy(farChordPoint);
|
|
58
|
+
_this._extArcStartAngle = 0;
|
|
59
|
+
_this._extArcEndAngle = 0;
|
|
60
|
+
_this._leaderLength = leaderLength;
|
|
61
|
+
_this.dimensionText = dimText;
|
|
62
|
+
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
63
|
+
_this.dimensionStyleName = dimStyle;
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "chordPoint", {
|
|
67
|
+
/**
|
|
68
|
+
* The point (in WCS coordinates) where the dimension line intersects the curve being dimensioned and
|
|
69
|
+
* extends outside the curve, if the text is outside the curve.
|
|
70
|
+
*/
|
|
71
|
+
get: function () {
|
|
72
|
+
return this._chordPoint;
|
|
73
|
+
},
|
|
74
|
+
set: function (value) {
|
|
75
|
+
this._chordPoint.copy(value);
|
|
76
|
+
},
|
|
77
|
+
enumerable: false,
|
|
78
|
+
configurable: true
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "farChordPoint", {
|
|
81
|
+
/**
|
|
82
|
+
* The far chord point (in WCS coordinates) of the curve being dimensioned. This is the point on the
|
|
83
|
+
* curve that is diametrically opposite the point where the dimension line extends outside the curve,
|
|
84
|
+
* if the text is outside the curve.
|
|
85
|
+
*/
|
|
86
|
+
get: function () {
|
|
87
|
+
return this._farChordPoint;
|
|
88
|
+
},
|
|
89
|
+
set: function (value) {
|
|
90
|
+
this._farChordPoint.copy(value);
|
|
91
|
+
},
|
|
92
|
+
enumerable: false,
|
|
93
|
+
configurable: true
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "extArcStartAngle", {
|
|
96
|
+
/**
|
|
97
|
+
* The extension arc start angle.
|
|
98
|
+
*/
|
|
99
|
+
get: function () {
|
|
100
|
+
return this._extArcStartAngle;
|
|
101
|
+
},
|
|
102
|
+
set: function (value) {
|
|
103
|
+
this._extArcStartAngle = value;
|
|
104
|
+
},
|
|
105
|
+
enumerable: false,
|
|
106
|
+
configurable: true
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "extArcEndAngle", {
|
|
109
|
+
/**
|
|
110
|
+
* The extension arc end angle.
|
|
111
|
+
*/
|
|
112
|
+
get: function () {
|
|
113
|
+
return this._extArcEndAngle;
|
|
114
|
+
},
|
|
115
|
+
set: function (value) {
|
|
116
|
+
this._extArcEndAngle = value;
|
|
117
|
+
},
|
|
118
|
+
enumerable: false,
|
|
119
|
+
configurable: true
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "leaderLength", {
|
|
122
|
+
/**
|
|
123
|
+
* The dimension to use length as the distance from the chordPoint dimension definition point, out
|
|
124
|
+
* to where the dimension will do a horizontal dogleg to the annotation text (or stop if no dogleg
|
|
125
|
+
* is necessary).
|
|
126
|
+
*/
|
|
127
|
+
get: function () {
|
|
128
|
+
return this._leaderLength;
|
|
129
|
+
},
|
|
130
|
+
enumerable: false,
|
|
131
|
+
configurable: true
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "geometricExtents", {
|
|
134
|
+
/**
|
|
135
|
+
* @inheritdoc
|
|
136
|
+
*/
|
|
137
|
+
get: function () {
|
|
138
|
+
// TODO: Finish it
|
|
139
|
+
return new AcGeBox3d();
|
|
140
|
+
},
|
|
141
|
+
enumerable: false,
|
|
142
|
+
configurable: true
|
|
143
|
+
});
|
|
144
|
+
AcDbDiametricDimension.prototype.drawLines = function (renderer, lines) {
|
|
145
|
+
var _this = this;
|
|
146
|
+
var results = [];
|
|
147
|
+
var count = lines.length;
|
|
148
|
+
if (count == 1) {
|
|
149
|
+
results.push(this.drawLine(renderer, lines[0], {
|
|
150
|
+
firstArrow: this.firstArrowStyle
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
else if (count == 3) {
|
|
154
|
+
this.sortLines(lines);
|
|
155
|
+
results.push(this.drawLine(renderer, lines[0], {
|
|
156
|
+
firstArrow: this.firstArrowStyle
|
|
157
|
+
}));
|
|
158
|
+
results.push(this.drawLine(renderer, lines[1]));
|
|
159
|
+
results.push(this.drawLine(renderer, lines[2], {
|
|
160
|
+
firstArrow: this.firstArrowStyle
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
lines.forEach(function (line) {
|
|
165
|
+
results.push(_this.drawLine(renderer, line));
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return results;
|
|
169
|
+
};
|
|
170
|
+
AcDbDiametricDimension.prototype.drawLine = function (renderer, line, lineArrowStyle) {
|
|
171
|
+
if (lineArrowStyle) {
|
|
172
|
+
var points = [line.startPoint, line.endPoint];
|
|
173
|
+
return renderer.lines(points, __assign(__assign({}, this.lineStyle), { arrows: lineArrowStyle }));
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return line.draw(renderer);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
AcDbDiametricDimension.prototype.sortLines = function (lines) {
|
|
180
|
+
// Function to compare positions of points
|
|
181
|
+
var comparePoints = function (a, b) {
|
|
182
|
+
if (a.x !== b.x)
|
|
183
|
+
return a.x - b.x;
|
|
184
|
+
if (a.y !== b.y)
|
|
185
|
+
return a.y - b.y;
|
|
186
|
+
return a.z - b.z;
|
|
187
|
+
};
|
|
188
|
+
// Sort segments based on the start points first, then end points
|
|
189
|
+
lines.sort(function (segA, segB) {
|
|
190
|
+
var startCompare = comparePoints(segA.startPoint, segB.startPoint);
|
|
191
|
+
if (startCompare !== 0)
|
|
192
|
+
return startCompare;
|
|
193
|
+
return comparePoints(segA.endPoint, segB.endPoint);
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
return AcDbDiametricDimension;
|
|
197
|
+
}(AcDbDimension));
|
|
198
|
+
export { AcDbDiametricDimension };
|
|
199
|
+
//# sourceMappingURL=AcDbDiametricDimension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbDiametricDimension.js","sourceRoot":"","sources":["../../../src/entity/dimension/AcDbDiametricDimension.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAQnC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;;;;;;;;;GAYG;AACH;IAA4C,0CAAa;IAOvD;;;;;;OAMG;IACH,gCACE,UAA2B,EAC3B,aAA8B,EAC9B,YAAwB,EACxB,OAA6B,EAC7B,QAA8B;QAF9B,6BAAA,EAAA,gBAAwB;QACxB,wBAAA,EAAA,cAA6B;QAC7B,yBAAA,EAAA,eAA8B;QAE9B,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACrD,KAAI,CAAC,cAAc,GAAG,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC3D,KAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;QAC1B,KAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,KAAI,CAAC,aAAa,GAAG,YAAY,CAAA;QAEjC,KAAI,CAAC,aAAa,GAAG,OAAO,CAAA;QAC5B,6FAA6F;QAC7F,K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