@mlightcad/data-model 1.3.3 → 1.3.5
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/data-model.cjs +5 -0
- package/dist/data-model.js +25995 -0
- package/dist/dxf-parser-worker.js +1715 -0
- package/lib/base/AcDbHostApplicationServices.d.ts +96 -0
- package/lib/base/AcDbHostApplicationServices.d.ts.map +1 -0
- package/lib/base/AcDbHostApplicationServices.js +118 -0
- package/lib/base/AcDbHostApplicationServices.js.map +1 -0
- package/lib/base/AcDbObject.d.ts +205 -0
- package/lib/base/AcDbObject.d.ts.map +1 -0
- package/lib/base/AcDbObject.js +236 -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 +146 -0
- package/lib/converter/AcDbBatchProcessing.d.ts.map +1 -0
- package/lib/converter/AcDbBatchProcessing.js +272 -0
- package/lib/converter/AcDbBatchProcessing.js.map +1 -0
- package/lib/converter/AcDbDxfConverter.d.ts +272 -0
- package/lib/converter/AcDbDxfConverter.d.ts.map +1 -0
- package/lib/converter/AcDbDxfConverter.js +883 -0
- package/lib/converter/AcDbDxfConverter.js.map +1 -0
- package/lib/converter/AcDbDxfParser.d.ts +23 -0
- package/lib/converter/AcDbDxfParser.d.ts.map +1 -0
- package/lib/converter/AcDbDxfParser.js +85 -0
- package/lib/converter/AcDbDxfParser.js.map +1 -0
- package/lib/converter/AcDbEntitiyConverter.d.ts +160 -0
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -0
- package/lib/converter/AcDbEntitiyConverter.js +708 -0
- package/lib/converter/AcDbEntitiyConverter.js.map +1 -0
- package/lib/converter/AcDbObjectConverter.d.ts +61 -0
- package/lib/converter/AcDbObjectConverter.d.ts.map +1 -0
- package/lib/converter/AcDbObjectConverter.js +91 -0
- package/lib/converter/AcDbObjectConverter.js.map +1 -0
- package/lib/converter/AcDbRegenerator.d.ts +101 -0
- package/lib/converter/AcDbRegenerator.d.ts.map +1 -0
- package/lib/converter/AcDbRegenerator.js +334 -0
- package/lib/converter/AcDbRegenerator.js.map +1 -0
- package/lib/converter/index.d.ts +5 -0
- package/lib/converter/index.d.ts.map +1 -0
- package/lib/converter/index.js +5 -0
- package/lib/converter/index.js.map +1 -0
- package/lib/converter/worker/AcDbBaseWorker.d.ts +36 -0
- package/lib/converter/worker/AcDbBaseWorker.d.ts.map +1 -0
- package/lib/converter/worker/AcDbBaseWorker.js +93 -0
- package/lib/converter/worker/AcDbBaseWorker.js.map +1 -0
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts +11 -0
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts.map +1 -0
- package/lib/converter/worker/AcDbDxfParserWorker.js +75 -0
- package/lib/converter/worker/AcDbDxfParserWorker.js.map +1 -0
- package/lib/converter/worker/AcDbWorkerManager.d.ts +107 -0
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +1 -0
- package/lib/converter/worker/AcDbWorkerManager.js +360 -0
- package/lib/converter/worker/AcDbWorkerManager.js.map +1 -0
- package/lib/converter/worker/index.d.ts +3 -0
- package/lib/converter/worker/index.d.ts.map +1 -0
- package/lib/converter/worker/index.js +3 -0
- package/lib/converter/worker/index.js.map +1 -0
- package/lib/database/AcDbBlockTable.d.ts +56 -0
- package/lib/database/AcDbBlockTable.d.ts.map +1 -0
- package/lib/database/AcDbBlockTable.js +98 -0
- package/lib/database/AcDbBlockTable.js.map +1 -0
- package/lib/database/AcDbBlockTableRecord.d.ts +185 -0
- package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbBlockTableRecord.js +261 -0
- package/lib/database/AcDbBlockTableRecord.js.map +1 -0
- package/lib/database/AcDbDatabase.d.ts +563 -0
- package/lib/database/AcDbDatabase.d.ts.map +1 -0
- package/lib/database/AcDbDatabase.js +842 -0
- package/lib/database/AcDbDatabase.js.map +1 -0
- package/lib/database/AcDbDatabaseConverter.d.ts +292 -0
- package/lib/database/AcDbDatabaseConverter.d.ts.map +1 -0
- package/lib/database/AcDbDatabaseConverter.js +448 -0
- package/lib/database/AcDbDatabaseConverter.js.map +1 -0
- package/lib/database/AcDbDatabaseConverterManager.d.ts +141 -0
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +1 -0
- package/lib/database/AcDbDatabaseConverterManager.js +173 -0
- package/lib/database/AcDbDatabaseConverterManager.js.map +1 -0
- package/lib/database/AcDbDimStyleTable.d.ts +31 -0
- package/lib/database/AcDbDimStyleTable.d.ts.map +1 -0
- package/lib/database/AcDbDimStyleTable.js +49 -0
- package/lib/database/AcDbDimStyleTable.js.map +1 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts +797 -0
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbDimStyleTableRecord.js +1294 -0
- package/lib/database/AcDbDimStyleTableRecord.js.map +1 -0
- package/lib/database/AcDbDwgVersion.d.ts +32 -0
- package/lib/database/AcDbDwgVersion.d.ts.map +1 -0
- package/lib/database/AcDbDwgVersion.js +126 -0
- package/lib/database/AcDbDwgVersion.js.map +1 -0
- package/lib/database/AcDbLayerTable.d.ts +51 -0
- package/lib/database/AcDbLayerTable.d.ts.map +1 -0
- package/lib/database/AcDbLayerTable.js +92 -0
- package/lib/database/AcDbLayerTable.js.map +1 -0
- package/lib/database/AcDbLayerTableRecord.d.ts +278 -0
- package/lib/database/AcDbLayerTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbLayerTableRecord.js +397 -0
- package/lib/database/AcDbLayerTableRecord.js.map +1 -0
- package/lib/database/AcDbLinetypeTable.d.ts +30 -0
- package/lib/database/AcDbLinetypeTable.d.ts.map +1 -0
- package/lib/database/AcDbLinetypeTable.js +48 -0
- package/lib/database/AcDbLinetypeTable.js.map +1 -0
- package/lib/database/AcDbLinetypeTableRecord.d.ts +79 -0
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbLinetypeTableRecord.js +129 -0
- package/lib/database/AcDbLinetypeTableRecord.js.map +1 -0
- package/lib/database/AcDbSymbolTable.d.ts +199 -0
- package/lib/database/AcDbSymbolTable.d.ts.map +1 -0
- package/lib/database/AcDbSymbolTable.js +264 -0
- package/lib/database/AcDbSymbolTable.js.map +1 -0
- package/lib/database/AcDbSymbolTableRecord.d.ts +61 -0
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbSymbolTableRecord.js +82 -0
- package/lib/database/AcDbSymbolTableRecord.js.map +1 -0
- package/lib/database/AcDbTextStyleTable.d.ts +48 -0
- package/lib/database/AcDbTextStyleTable.d.ts.map +1 -0
- package/lib/database/AcDbTextStyleTable.js +112 -0
- package/lib/database/AcDbTextStyleTable.js.map +1 -0
- package/lib/database/AcDbTextStyleTableRecord.d.ts +179 -0
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbTextStyleTableRecord.js +276 -0
- package/lib/database/AcDbTextStyleTableRecord.js.map +1 -0
- package/lib/database/AcDbViewportTable.d.ts +31 -0
- package/lib/database/AcDbViewportTable.d.ts.map +1 -0
- package/lib/database/AcDbViewportTable.js +49 -0
- package/lib/database/AcDbViewportTable.js.map +1 -0
- package/lib/database/AcDbViewportTableRecord.d.ts +154 -0
- package/lib/database/AcDbViewportTableRecord.d.ts.map +1 -0
- package/lib/database/AcDbViewportTableRecord.js +318 -0
- package/lib/database/AcDbViewportTableRecord.js.map +1 -0
- package/lib/database/index.d.ts +19 -0
- package/lib/database/index.d.ts.map +1 -0
- package/lib/database/index.js +19 -0
- package/lib/database/index.js.map +1 -0
- package/lib/entity/AcDb2dPolyline.d.ts +146 -0
- package/lib/entity/AcDb2dPolyline.d.ts.map +1 -0
- package/lib/entity/AcDb2dPolyline.js +220 -0
- package/lib/entity/AcDb2dPolyline.js.map +1 -0
- package/lib/entity/AcDb2dVertex.d.ts +143 -0
- package/lib/entity/AcDb2dVertex.d.ts.map +1 -0
- package/lib/entity/AcDb2dVertex.js +210 -0
- package/lib/entity/AcDb2dVertex.js.map +1 -0
- package/lib/entity/AcDb3dPolyline.d.ts +102 -0
- package/lib/entity/AcDb3dPolyline.d.ts.map +1 -0
- package/lib/entity/AcDb3dPolyline.js +158 -0
- package/lib/entity/AcDb3dPolyline.js.map +1 -0
- package/lib/entity/AcDb3dVertex.d.ts +83 -0
- package/lib/entity/AcDb3dVertex.d.ts.map +1 -0
- package/lib/entity/AcDb3dVertex.js +133 -0
- package/lib/entity/AcDb3dVertex.js.map +1 -0
- package/lib/entity/AcDbArc.d.ts +254 -0
- package/lib/entity/AcDbArc.d.ts.map +1 -0
- package/lib/entity/AcDbArc.js +340 -0
- package/lib/entity/AcDbArc.js.map +1 -0
- package/lib/entity/AcDbBlockReference.d.ts +190 -0
- package/lib/entity/AcDbBlockReference.d.ts.map +1 -0
- package/lib/entity/AcDbBlockReference.js +302 -0
- package/lib/entity/AcDbBlockReference.js.map +1 -0
- package/lib/entity/AcDbCircle.d.ts +186 -0
- package/lib/entity/AcDbCircle.d.ts.map +1 -0
- package/lib/entity/AcDbCircle.js +249 -0
- package/lib/entity/AcDbCircle.js.map +1 -0
- package/lib/entity/AcDbCurve.d.ts +42 -0
- package/lib/entity/AcDbCurve.d.ts.map +1 -0
- package/lib/entity/AcDbCurve.js +44 -0
- package/lib/entity/AcDbCurve.js.map +1 -0
- package/lib/entity/AcDbEllipse.d.ts +207 -0
- package/lib/entity/AcDbEllipse.d.ts.map +1 -0
- package/lib/entity/AcDbEllipse.js +272 -0
- package/lib/entity/AcDbEllipse.js.map +1 -0
- package/lib/entity/AcDbEntity.d.ts +385 -0
- package/lib/entity/AcDbEntity.d.ts.map +1 -0
- package/lib/entity/AcDbEntity.js +561 -0
- package/lib/entity/AcDbEntity.js.map +1 -0
- package/lib/entity/AcDbFace.d.ts +151 -0
- package/lib/entity/AcDbFace.d.ts.map +1 -0
- package/lib/entity/AcDbFace.js +224 -0
- package/lib/entity/AcDbFace.js.map +1 -0
- package/lib/entity/AcDbHatch.d.ts +174 -0
- package/lib/entity/AcDbHatch.d.ts.map +1 -0
- package/lib/entity/AcDbHatch.js +250 -0
- package/lib/entity/AcDbHatch.js.map +1 -0
- package/lib/entity/AcDbLeader.d.ts +243 -0
- package/lib/entity/AcDbLeader.d.ts.map +1 -0
- package/lib/entity/AcDbLeader.js +358 -0
- package/lib/entity/AcDbLeader.js.map +1 -0
- package/lib/entity/AcDbLine.d.ts +198 -0
- package/lib/entity/AcDbLine.d.ts.map +1 -0
- package/lib/entity/AcDbLine.js +300 -0
- package/lib/entity/AcDbLine.js.map +1 -0
- package/lib/entity/AcDbMText.d.ts +248 -0
- package/lib/entity/AcDbMText.d.ts.map +1 -0
- package/lib/entity/AcDbMText.js +414 -0
- package/lib/entity/AcDbMText.js.map +1 -0
- package/lib/entity/AcDbPoint.d.ts +113 -0
- package/lib/entity/AcDbPoint.d.ts.map +1 -0
- package/lib/entity/AcDbPoint.js +155 -0
- package/lib/entity/AcDbPoint.js.map +1 -0
- package/lib/entity/AcDbPolyline.d.ts +221 -0
- package/lib/entity/AcDbPolyline.d.ts.map +1 -0
- package/lib/entity/AcDbPolyline.js +301 -0
- package/lib/entity/AcDbPolyline.js.map +1 -0
- package/lib/entity/AcDbRasterImage.d.ts +216 -0
- package/lib/entity/AcDbRasterImage.d.ts.map +1 -0
- package/lib/entity/AcDbRasterImage.js +451 -0
- package/lib/entity/AcDbRasterImage.js.map +1 -0
- package/lib/entity/AcDbRay.d.ts +150 -0
- package/lib/entity/AcDbRay.d.ts.map +1 -0
- package/lib/entity/AcDbRay.js +208 -0
- package/lib/entity/AcDbRay.js.map +1 -0
- package/lib/entity/AcDbSpline.d.ts +135 -0
- package/lib/entity/AcDbSpline.d.ts.map +1 -0
- package/lib/entity/AcDbSpline.js +142 -0
- package/lib/entity/AcDbSpline.js.map +1 -0
- package/lib/entity/AcDbTable.d.ts +260 -0
- package/lib/entity/AcDbTable.d.ts.map +1 -0
- package/lib/entity/AcDbTable.js +452 -0
- package/lib/entity/AcDbTable.js.map +1 -0
- package/lib/entity/AcDbText.d.ts +388 -0
- package/lib/entity/AcDbText.d.ts.map +1 -0
- package/lib/entity/AcDbText.js +523 -0
- package/lib/entity/AcDbText.js.map +1 -0
- package/lib/entity/AcDbTrace.d.ts +193 -0
- package/lib/entity/AcDbTrace.d.ts.map +1 -0
- package/lib/entity/AcDbTrace.js +271 -0
- package/lib/entity/AcDbTrace.js.map +1 -0
- package/lib/entity/AcDbViewport.d.ts +173 -0
- package/lib/entity/AcDbViewport.d.ts.map +1 -0
- package/lib/entity/AcDbViewport.js +295 -0
- package/lib/entity/AcDbViewport.js.map +1 -0
- package/lib/entity/AcDbWipeout.d.ts +39 -0
- package/lib/entity/AcDbWipeout.d.ts.map +1 -0
- package/lib/entity/AcDbWipeout.js +70 -0
- package/lib/entity/AcDbWipeout.js.map +1 -0
- package/lib/entity/AcDbXline.d.ts +151 -0
- package/lib/entity/AcDbXline.d.ts.map +1 -0
- package/lib/entity/AcDbXline.js +209 -0
- package/lib/entity/AcDbXline.js.map +1 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +92 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +157 -0
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +220 -0
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbAlignedDimension.js +341 -0
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbArcDimension.d.ts +94 -0
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbArcDimension.js +159 -0
- package/lib/entity/dimension/AcDbArcDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +145 -0
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbDiametricDimension.js +275 -0
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbDimension.d.ts +257 -0
- package/lib/entity/dimension/AcDbDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbDimension.js +466 -0
- package/lib/entity/dimension/AcDbDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +78 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.js +133 -0
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +1 -0
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +214 -0
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +1 -0
- package/lib/entity/dimension/AcDbRadialDimension.js +288 -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 +28 -0
- package/lib/entity/index.d.ts.map +1 -0
- package/lib/entity/index.js +28 -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 +20 -0
- package/lib/misc/AcDbAngleUnits.d.ts.map +1 -0
- package/lib/misc/AcDbAngleUnits.js +21 -0
- package/lib/misc/AcDbAngleUnits.js.map +1 -0
- package/lib/misc/AcDbCodePage.d.ts +50 -0
- package/lib/misc/AcDbCodePage.d.ts.map +1 -0
- package/lib/misc/AcDbCodePage.js +100 -0
- package/lib/misc/AcDbCodePage.js.map +1 -0
- package/lib/misc/AcDbConstants.d.ts +24 -0
- package/lib/misc/AcDbConstants.d.ts.map +1 -0
- package/lib/misc/AcDbConstants.js +24 -0
- package/lib/misc/AcDbConstants.js.map +1 -0
- package/lib/misc/AcDbDimArrowType.d.ts +89 -0
- package/lib/misc/AcDbDimArrowType.d.ts.map +1 -0
- package/lib/misc/AcDbDimArrowType.js +90 -0
- package/lib/misc/AcDbDimArrowType.js.map +1 -0
- package/lib/misc/AcDbObjectIterator.d.ts +64 -0
- package/lib/misc/AcDbObjectIterator.d.ts.map +1 -0
- package/lib/misc/AcDbObjectIterator.js +84 -0
- package/lib/misc/AcDbObjectIterator.js.map +1 -0
- package/lib/misc/AcDbOsnapMode.d.ts +51 -0
- package/lib/misc/AcDbOsnapMode.d.ts.map +1 -0
- package/lib/misc/AcDbOsnapMode.js +52 -0
- package/lib/misc/AcDbOsnapMode.js.map +1 -0
- package/lib/misc/AcDbRenderingCache.d.ts +141 -0
- package/lib/misc/AcDbRenderingCache.d.ts.map +1 -0
- package/lib/misc/AcDbRenderingCache.js +239 -0
- package/lib/misc/AcDbRenderingCache.js.map +1 -0
- package/lib/misc/AcDbUnitsValue.d.ts +101 -0
- package/lib/misc/AcDbUnitsValue.d.ts.map +1 -0
- package/lib/misc/AcDbUnitsValue.js +121 -0
- package/lib/misc/AcDbUnitsValue.js.map +1 -0
- package/lib/misc/index.d.ts +9 -0
- package/lib/misc/index.d.ts.map +1 -0
- package/lib/misc/index.js +9 -0
- package/lib/misc/index.js.map +1 -0
- package/lib/object/AcDbDictionary.d.ts +178 -0
- package/lib/object/AcDbDictionary.d.ts.map +1 -0
- package/lib/object/AcDbDictionary.js +264 -0
- package/lib/object/AcDbDictionary.js.map +1 -0
- package/lib/object/AcDbRasterImageDef.d.ts +54 -0
- package/lib/object/AcDbRasterImageDef.d.ts.map +1 -0
- package/lib/object/AcDbRasterImageDef.js +82 -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 +190 -0
- package/lib/object/layout/AcDbLayout.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayout.js +253 -0
- package/lib/object/layout/AcDbLayout.js.map +1 -0
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +47 -0
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayoutDictionary.js +122 -0
- package/lib/object/layout/AcDbLayoutDictionary.js.map +1 -0
- package/lib/object/layout/AcDbLayoutManager.d.ts +188 -0
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +1 -0
- package/lib/object/layout/AcDbLayoutManager.js +245 -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 +4 -4
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
* Represents an arc length dimension entity in AutoCAD.
|
|
20
|
+
*
|
|
21
|
+
* This dimension type measures the length of an arc by defining the arc's center point,
|
|
22
|
+
* two points that define the arc's extent, and a point on the arc itself. Arc length
|
|
23
|
+
* dimensions are commonly used in mechanical drawings, architectural plans, and other
|
|
24
|
+
* technical documentation where precise arc measurements are required.
|
|
25
|
+
*
|
|
26
|
+
* The dimension displays the actual arc length value and typically includes extension
|
|
27
|
+
* lines, dimension lines, and arrows positioned to clearly indicate the arc being measured.
|
|
28
|
+
*/
|
|
29
|
+
var AcDbArcDimension = /** @class */ (function (_super) {
|
|
30
|
+
__extends(AcDbArcDimension, _super);
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new arc length dimension.
|
|
33
|
+
*
|
|
34
|
+
* @param centerPoint - The center point of the arc being measured. This defines
|
|
35
|
+
* the center of the circle that contains the arc
|
|
36
|
+
* @param xLine1Point - The first extension line end point. This defines one end
|
|
37
|
+
* of the arc being measured
|
|
38
|
+
* @param xLine2Point - The second extension line end point. This defines the other
|
|
39
|
+
* end of the arc being measured
|
|
40
|
+
* @param arcPoint - A point on the arc that helps define the specific arc segment
|
|
41
|
+
* being measured. This point is typically between the two extension
|
|
42
|
+
* line points
|
|
43
|
+
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
44
|
+
* arc length value. If null, the calculated length will be displayed
|
|
45
|
+
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
46
|
+
* formatting. If null, the current default style will be used
|
|
47
|
+
*/
|
|
48
|
+
function AcDbArcDimension(centerPoint, xLine1Point, xLine2Point, arcPoint, dimText, dimStyle) {
|
|
49
|
+
if (dimText === void 0) { dimText = null; }
|
|
50
|
+
if (dimStyle === void 0) { dimStyle = null; }
|
|
51
|
+
var _this = _super.call(this) || this;
|
|
52
|
+
_this._arcPoint = new AcGePoint3d().copy(arcPoint);
|
|
53
|
+
_this._xLine1Point = new AcGePoint3d().copy(xLine1Point);
|
|
54
|
+
_this._xLine2Point = new AcGePoint3d().copy(xLine2Point);
|
|
55
|
+
_this._centerPoint = new AcGePoint3d().copy(centerPoint);
|
|
56
|
+
_this.dimensionText = dimText;
|
|
57
|
+
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
58
|
+
_this.dimensionStyleName = dimStyle;
|
|
59
|
+
return _this;
|
|
60
|
+
}
|
|
61
|
+
Object.defineProperty(AcDbArcDimension.prototype, "arcPoint", {
|
|
62
|
+
/**
|
|
63
|
+
* Gets or sets a point on the arc that helps define the arc segment being measured.
|
|
64
|
+
*
|
|
65
|
+
* This point is typically positioned between the two extension line points and helps
|
|
66
|
+
* determine which arc segment should be measured when multiple arcs could be defined
|
|
67
|
+
* by the same center and end points.
|
|
68
|
+
*
|
|
69
|
+
* @returns The arc point that defines the arc segment
|
|
70
|
+
*/
|
|
71
|
+
get: function () {
|
|
72
|
+
return this._arcPoint;
|
|
73
|
+
},
|
|
74
|
+
set: function (value) {
|
|
75
|
+
this._arcPoint.copy(value);
|
|
76
|
+
},
|
|
77
|
+
enumerable: false,
|
|
78
|
+
configurable: true
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(AcDbArcDimension.prototype, "centerPoint", {
|
|
81
|
+
/**
|
|
82
|
+
* Gets or sets the center point of the arc being measured.
|
|
83
|
+
*
|
|
84
|
+
* The center point defines the center of the circle that contains the arc. This point
|
|
85
|
+
* is used to calculate the arc length and position the dimension elements correctly.
|
|
86
|
+
*
|
|
87
|
+
* @returns The center point of the arc
|
|
88
|
+
*/
|
|
89
|
+
get: function () {
|
|
90
|
+
return this._centerPoint;
|
|
91
|
+
},
|
|
92
|
+
set: function (value) {
|
|
93
|
+
this._centerPoint.copy(value);
|
|
94
|
+
},
|
|
95
|
+
enumerable: false,
|
|
96
|
+
configurable: true
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(AcDbArcDimension.prototype, "xLine1Point", {
|
|
99
|
+
/**
|
|
100
|
+
* Gets or sets the first extension line end point.
|
|
101
|
+
*
|
|
102
|
+
* This point defines one end of the arc being measured. The extension line extends
|
|
103
|
+
* from this point to the arc, helping to clearly identify the starting point of
|
|
104
|
+
* the arc length measurement.
|
|
105
|
+
*
|
|
106
|
+
* @returns The first extension line end point
|
|
107
|
+
*/
|
|
108
|
+
get: function () {
|
|
109
|
+
return this._xLine1Point;
|
|
110
|
+
},
|
|
111
|
+
set: function (value) {
|
|
112
|
+
this._xLine1Point.copy(value);
|
|
113
|
+
},
|
|
114
|
+
enumerable: false,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(AcDbArcDimension.prototype, "xLine2Point", {
|
|
118
|
+
/**
|
|
119
|
+
* Gets or sets the second extension line end point.
|
|
120
|
+
*
|
|
121
|
+
* This point defines the other end of the arc being measured. The extension line
|
|
122
|
+
* extends from this point to the arc, helping to clearly identify the ending point
|
|
123
|
+
* of the arc length measurement.
|
|
124
|
+
*
|
|
125
|
+
* @returns The second extension line end point
|
|
126
|
+
*/
|
|
127
|
+
get: function () {
|
|
128
|
+
return this._xLine2Point;
|
|
129
|
+
},
|
|
130
|
+
set: function (value) {
|
|
131
|
+
this._xLine2Point.copy(value);
|
|
132
|
+
},
|
|
133
|
+
enumerable: false,
|
|
134
|
+
configurable: true
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(AcDbArcDimension.prototype, "geometricExtents", {
|
|
137
|
+
/**
|
|
138
|
+
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
139
|
+
*
|
|
140
|
+
* The geometric extents define the minimum bounding box that completely contains
|
|
141
|
+
* the dimension entity, including all its components like extension lines,
|
|
142
|
+
* dimension lines, arrows, and text.
|
|
143
|
+
*
|
|
144
|
+
* @returns A 3D bounding box containing the dimension entity
|
|
145
|
+
* @inheritdoc
|
|
146
|
+
*/
|
|
147
|
+
get: function () {
|
|
148
|
+
// TODO: Finish it
|
|
149
|
+
return new AcGeBox3d();
|
|
150
|
+
},
|
|
151
|
+
enumerable: false,
|
|
152
|
+
configurable: true
|
|
153
|
+
});
|
|
154
|
+
/** The entity type name */
|
|
155
|
+
AcDbArcDimension.typeName = 'ArcDimension';
|
|
156
|
+
return AcDbArcDimension;
|
|
157
|
+
}(AcDbDimension));
|
|
158
|
+
export { AcDbArcDimension };
|
|
159
|
+
//# 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;;;;;;;;;;GAUG;AACH;IAAsC,oCAAa;IASjD;;;;;;;;;;;;;;;;OAgBG;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;IAWD,sBAAI,sCAAQ;QATZ;;;;;;;;WAQG;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;IAaD,sBAAI,yCAAW;QARf;;;;;;;WAOG;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;IAcD,sBAAI,yCAAW;QATf;;;;;;;;WAQG;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;IAcD,sBAAI,yCAAW;QATf;;;;;;;;WAQG;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;IAeD,sBAAI,8CAAgB;QAVpB;;;;;;;;;WASG;aACH;YACE,kBAAkB;YAClB,OAAO,IAAI,SAAS,EAAE,CAAA;QACxB,CAAC;;;OAAA;IAxHD,2BAA2B;IACX,yBAAQ,GAAW,cAAc,CAAA;IAwHnD,uBAAC;CAAA,AA1HD,CAAsC,aAAa,GA0HlD;SA1HY,gBAAgB"}
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
* Represents a diametric dimension entity in AutoCAD.
|
|
7
|
+
*
|
|
8
|
+
* This dimension type measures the diameter of a circle or arc by defining two points
|
|
9
|
+
* that lie on the curve and are diametrically opposite each other. Diametric dimensions
|
|
10
|
+
* are essential for circular features in mechanical drawings, architectural plans, and
|
|
11
|
+
* other technical documentation.
|
|
12
|
+
*
|
|
13
|
+
* The dimension behavior varies based on text placement:
|
|
14
|
+
* - If the text is inside the curve being dimensioned, the dimension line will be drawn
|
|
15
|
+
* from the farChordPoint to the chordPoint, with a break for the annotation text.
|
|
16
|
+
* - If the dimension text is outside the curve being dimensioned, the dimension line is
|
|
17
|
+
* drawn from the farChordPoint, through the chordPoint, and extends out the leaderLength
|
|
18
|
+
* distance past the chordPoint, where it will do a short horizontal dogleg (if appropriate)
|
|
19
|
+
* to the annotation text.
|
|
20
|
+
*/
|
|
21
|
+
export declare class AcDbDiametricDimension extends AcDbDimension {
|
|
22
|
+
/** The entity type name */
|
|
23
|
+
static typeName: string;
|
|
24
|
+
private _chordPoint;
|
|
25
|
+
private _farChordPoint;
|
|
26
|
+
private _extArcStartAngle;
|
|
27
|
+
private _extArcEndAngle;
|
|
28
|
+
private _leaderLength;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new diametric dimension.
|
|
31
|
+
*
|
|
32
|
+
* @param chordPoint - The point (in WCS coordinates) on the curve being dimensioned
|
|
33
|
+
* where the dimension line intersects and extends outside the curve
|
|
34
|
+
* (if the text is outside the curve)
|
|
35
|
+
* @param farChordPoint - The point (in WCS coordinates) on the curve being dimensioned
|
|
36
|
+
* that is diametrically opposite the chordPoint. This defines the
|
|
37
|
+
* other end of the diameter measurement
|
|
38
|
+
* @param leaderLength - The distance from the chordPoint to where the dimension will
|
|
39
|
+
* do a horizontal dogleg to the annotation text. This is only
|
|
40
|
+
* used when the text is outside the curve
|
|
41
|
+
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
42
|
+
* diameter value. If null, the calculated diameter will be displayed
|
|
43
|
+
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
44
|
+
* formatting. If null, the current default style will be used
|
|
45
|
+
*/
|
|
46
|
+
constructor(chordPoint: AcGePoint3dLike, farChordPoint: AcGePoint3dLike, leaderLength?: number, dimText?: string | null, dimStyle?: string | null);
|
|
47
|
+
/**
|
|
48
|
+
* Gets or sets the chord point where the dimension line intersects the curve.
|
|
49
|
+
*
|
|
50
|
+
* This is the point (in WCS coordinates) where the dimension line intersects the curve
|
|
51
|
+
* being dimensioned and extends outside the curve, if the text is outside the curve.
|
|
52
|
+
* It represents one end of the diameter measurement.
|
|
53
|
+
*
|
|
54
|
+
* @returns The chord point of the dimension
|
|
55
|
+
*/
|
|
56
|
+
get chordPoint(): AcGePoint3d;
|
|
57
|
+
set chordPoint(value: AcGePoint3d);
|
|
58
|
+
/**
|
|
59
|
+
* Gets or sets the far chord point of the curve being dimensioned.
|
|
60
|
+
*
|
|
61
|
+
* This is the point (in WCS coordinates) on the curve that is diametrically opposite
|
|
62
|
+
* the point where the dimension line extends outside the curve. It represents the other
|
|
63
|
+
* end of the diameter measurement.
|
|
64
|
+
*
|
|
65
|
+
* @returns The far chord point of the dimension
|
|
66
|
+
*/
|
|
67
|
+
get farChordPoint(): AcGePoint3d;
|
|
68
|
+
set farChordPoint(value: AcGePoint3d);
|
|
69
|
+
/**
|
|
70
|
+
* Gets or sets the extension arc start angle.
|
|
71
|
+
*
|
|
72
|
+
* This angle defines the starting point of the extension arc that may be drawn
|
|
73
|
+
* to connect the dimension line to the curve being dimensioned.
|
|
74
|
+
*
|
|
75
|
+
* @returns The extension arc start angle in radians
|
|
76
|
+
*/
|
|
77
|
+
get extArcStartAngle(): number;
|
|
78
|
+
set extArcStartAngle(value: number);
|
|
79
|
+
/**
|
|
80
|
+
* Gets or sets the extension arc end angle.
|
|
81
|
+
*
|
|
82
|
+
* This angle defines the ending point of the extension arc that may be drawn
|
|
83
|
+
* to connect the dimension line to the curve being dimensioned.
|
|
84
|
+
*
|
|
85
|
+
* @returns The extension arc end angle in radians
|
|
86
|
+
*/
|
|
87
|
+
get extArcEndAngle(): number;
|
|
88
|
+
set extArcEndAngle(value: number);
|
|
89
|
+
/**
|
|
90
|
+
* Gets the leader length for the dimension.
|
|
91
|
+
*
|
|
92
|
+
* The leader length is the distance from the chordPoint dimension definition point,
|
|
93
|
+
* out to where the dimension will do a horizontal dogleg to the annotation text
|
|
94
|
+
* (or stop if no dogleg is necessary). This is only used when the text is outside
|
|
95
|
+
* the curve being dimensioned.
|
|
96
|
+
*
|
|
97
|
+
* @returns The leader length in drawing units
|
|
98
|
+
*/
|
|
99
|
+
get leaderLength(): number;
|
|
100
|
+
/**
|
|
101
|
+
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
102
|
+
*
|
|
103
|
+
* The geometric extents define the minimum bounding box that completely contains
|
|
104
|
+
* the dimension entity, including all its components like extension lines,
|
|
105
|
+
* dimension lines, arrows, and text.
|
|
106
|
+
*
|
|
107
|
+
* @returns A 3D bounding box containing the dimension entity
|
|
108
|
+
* @inheritdoc
|
|
109
|
+
*/
|
|
110
|
+
get geometricExtents(): AcGeBox3d;
|
|
111
|
+
/**
|
|
112
|
+
* Draws the dimension lines with appropriate arrow styles.
|
|
113
|
+
*
|
|
114
|
+
* This method handles the rendering of dimension lines based on the number of
|
|
115
|
+
* line segments. It applies different arrow styles to the first and last lines
|
|
116
|
+
* when appropriate, and sorts the lines for proper visual representation.
|
|
117
|
+
*
|
|
118
|
+
* @param renderer - The graphics renderer used to draw the dimension lines
|
|
119
|
+
* @param lines - Array of line entities that make up the dimension
|
|
120
|
+
* @returns Array of rendered graphics entities
|
|
121
|
+
* @protected
|
|
122
|
+
*/
|
|
123
|
+
protected drawLines(renderer: AcGiRenderer, lines: AcDbLine[]): AcGiEntity[];
|
|
124
|
+
/**
|
|
125
|
+
* Draws a single line with optional arrow styling.
|
|
126
|
+
*
|
|
127
|
+
* @param renderer - The graphics renderer used to draw the line
|
|
128
|
+
* @param line - The line entity to draw
|
|
129
|
+
* @param lineArrowStyle - Optional arrow style configuration for the line
|
|
130
|
+
* @returns The rendered graphics entity
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
private drawLine;
|
|
134
|
+
/**
|
|
135
|
+
* Sorts the dimension lines for proper visual representation.
|
|
136
|
+
*
|
|
137
|
+
* This method sorts the line segments based on their start and end points to ensure
|
|
138
|
+
* they are drawn in the correct order for proper dimension visualization.
|
|
139
|
+
*
|
|
140
|
+
* @param lines - Array of line entities to sort
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
private sortLines;
|
|
144
|
+
}
|
|
145
|
+
//# 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;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAuB;IAEvD,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;;;;;;;;;;;;;;;;OAgBG;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;;;;;;;;OAQG;IACH,IAAI,UAAU,IAGQ,WAAW,CADhC;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,WAAW,EAEhC;IAED;;;;;;;;OAQG;IACH,IAAI,aAAa,IAGQ,WAAW,CADnC;IACD,IAAI,aAAa,CAAC,KAAK,EAAE,WAAW,EAEnC;IAED;;;;;;;OAOG;IACH,IAAI,gBAAgB,IAGQ,MAAM,CADjC;IACD,IAAI,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAEjC;IAED;;;;;;;OAOG;IACH,IAAI,cAAc,IAGQ,MAAM,CAD/B;IACD,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED;;;;;;;;;OASG;IACH,IAAI,YAAY,WAEf;IAED;;;;;;;;;OASG;IACH,IAAI,gBAAgB,cAGnB;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE;IA8B7D;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ;IAgBhB;;;;;;;;OAQG;IACH,OAAO,CAAC,SAAS;CAelB"}
|
|
@@ -0,0 +1,275 @@
|
|
|
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
|
+
* Represents a diametric dimension entity in AutoCAD.
|
|
31
|
+
*
|
|
32
|
+
* This dimension type measures the diameter of a circle or arc by defining two points
|
|
33
|
+
* that lie on the curve and are diametrically opposite each other. Diametric dimensions
|
|
34
|
+
* are essential for circular features in mechanical drawings, architectural plans, and
|
|
35
|
+
* other technical documentation.
|
|
36
|
+
*
|
|
37
|
+
* The dimension behavior varies based on text placement:
|
|
38
|
+
* - If the text is inside the curve being dimensioned, the dimension line will be drawn
|
|
39
|
+
* from the farChordPoint to the chordPoint, with a break for the annotation text.
|
|
40
|
+
* - If the dimension text is outside the curve being dimensioned, the dimension line is
|
|
41
|
+
* drawn from the farChordPoint, through the chordPoint, and extends out the leaderLength
|
|
42
|
+
* distance past the chordPoint, where it will do a short horizontal dogleg (if appropriate)
|
|
43
|
+
* to the annotation text.
|
|
44
|
+
*/
|
|
45
|
+
var AcDbDiametricDimension = /** @class */ (function (_super) {
|
|
46
|
+
__extends(AcDbDiametricDimension, _super);
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new diametric dimension.
|
|
49
|
+
*
|
|
50
|
+
* @param chordPoint - The point (in WCS coordinates) on the curve being dimensioned
|
|
51
|
+
* where the dimension line intersects and extends outside the curve
|
|
52
|
+
* (if the text is outside the curve)
|
|
53
|
+
* @param farChordPoint - The point (in WCS coordinates) on the curve being dimensioned
|
|
54
|
+
* that is diametrically opposite the chordPoint. This defines the
|
|
55
|
+
* other end of the diameter measurement
|
|
56
|
+
* @param leaderLength - The distance from the chordPoint to where the dimension will
|
|
57
|
+
* do a horizontal dogleg to the annotation text. This is only
|
|
58
|
+
* used when the text is outside the curve
|
|
59
|
+
* @param dimText - Optional custom dimension text to display instead of the calculated
|
|
60
|
+
* diameter value. If null, the calculated diameter will be displayed
|
|
61
|
+
* @param dimStyle - Optional name of the dimension style table record to use for
|
|
62
|
+
* formatting. If null, the current default style will be used
|
|
63
|
+
*/
|
|
64
|
+
function AcDbDiametricDimension(chordPoint, farChordPoint, leaderLength, dimText, dimStyle) {
|
|
65
|
+
if (leaderLength === void 0) { leaderLength = 0; }
|
|
66
|
+
if (dimText === void 0) { dimText = null; }
|
|
67
|
+
if (dimStyle === void 0) { dimStyle = null; }
|
|
68
|
+
var _this = _super.call(this) || this;
|
|
69
|
+
_this._chordPoint = new AcGePoint3d().copy(chordPoint);
|
|
70
|
+
_this._farChordPoint = new AcGePoint3d().copy(farChordPoint);
|
|
71
|
+
_this._extArcStartAngle = 0;
|
|
72
|
+
_this._extArcEndAngle = 0;
|
|
73
|
+
_this._leaderLength = leaderLength;
|
|
74
|
+
_this.dimensionText = dimText;
|
|
75
|
+
// TODO: Set it to the current default dimStyle within the AutoCAD editor if dimStyle is null
|
|
76
|
+
_this.dimensionStyleName = dimStyle;
|
|
77
|
+
return _this;
|
|
78
|
+
}
|
|
79
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "chordPoint", {
|
|
80
|
+
/**
|
|
81
|
+
* Gets or sets the chord point where the dimension line intersects the curve.
|
|
82
|
+
*
|
|
83
|
+
* This is the point (in WCS coordinates) where the dimension line intersects the curve
|
|
84
|
+
* being dimensioned and extends outside the curve, if the text is outside the curve.
|
|
85
|
+
* It represents one end of the diameter measurement.
|
|
86
|
+
*
|
|
87
|
+
* @returns The chord point of the dimension
|
|
88
|
+
*/
|
|
89
|
+
get: function () {
|
|
90
|
+
return this._chordPoint;
|
|
91
|
+
},
|
|
92
|
+
set: function (value) {
|
|
93
|
+
this._chordPoint.copy(value);
|
|
94
|
+
},
|
|
95
|
+
enumerable: false,
|
|
96
|
+
configurable: true
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "farChordPoint", {
|
|
99
|
+
/**
|
|
100
|
+
* Gets or sets the far chord point of the curve being dimensioned.
|
|
101
|
+
*
|
|
102
|
+
* This is the point (in WCS coordinates) on the curve that is diametrically opposite
|
|
103
|
+
* the point where the dimension line extends outside the curve. It represents the other
|
|
104
|
+
* end of the diameter measurement.
|
|
105
|
+
*
|
|
106
|
+
* @returns The far chord point of the dimension
|
|
107
|
+
*/
|
|
108
|
+
get: function () {
|
|
109
|
+
return this._farChordPoint;
|
|
110
|
+
},
|
|
111
|
+
set: function (value) {
|
|
112
|
+
this._farChordPoint.copy(value);
|
|
113
|
+
},
|
|
114
|
+
enumerable: false,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "extArcStartAngle", {
|
|
118
|
+
/**
|
|
119
|
+
* Gets or sets the extension arc start angle.
|
|
120
|
+
*
|
|
121
|
+
* This angle defines the starting point of the extension arc that may be drawn
|
|
122
|
+
* to connect the dimension line to the curve being dimensioned.
|
|
123
|
+
*
|
|
124
|
+
* @returns The extension arc start angle in radians
|
|
125
|
+
*/
|
|
126
|
+
get: function () {
|
|
127
|
+
return this._extArcStartAngle;
|
|
128
|
+
},
|
|
129
|
+
set: function (value) {
|
|
130
|
+
this._extArcStartAngle = value;
|
|
131
|
+
},
|
|
132
|
+
enumerable: false,
|
|
133
|
+
configurable: true
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "extArcEndAngle", {
|
|
136
|
+
/**
|
|
137
|
+
* Gets or sets the extension arc end angle.
|
|
138
|
+
*
|
|
139
|
+
* This angle defines the ending point of the extension arc that may be drawn
|
|
140
|
+
* to connect the dimension line to the curve being dimensioned.
|
|
141
|
+
*
|
|
142
|
+
* @returns The extension arc end angle in radians
|
|
143
|
+
*/
|
|
144
|
+
get: function () {
|
|
145
|
+
return this._extArcEndAngle;
|
|
146
|
+
},
|
|
147
|
+
set: function (value) {
|
|
148
|
+
this._extArcEndAngle = value;
|
|
149
|
+
},
|
|
150
|
+
enumerable: false,
|
|
151
|
+
configurable: true
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "leaderLength", {
|
|
154
|
+
/**
|
|
155
|
+
* Gets the leader length for the dimension.
|
|
156
|
+
*
|
|
157
|
+
* The leader length is the distance from the chordPoint dimension definition point,
|
|
158
|
+
* out to where the dimension will do a horizontal dogleg to the annotation text
|
|
159
|
+
* (or stop if no dogleg is necessary). This is only used when the text is outside
|
|
160
|
+
* the curve being dimensioned.
|
|
161
|
+
*
|
|
162
|
+
* @returns The leader length in drawing units
|
|
163
|
+
*/
|
|
164
|
+
get: function () {
|
|
165
|
+
return this._leaderLength;
|
|
166
|
+
},
|
|
167
|
+
enumerable: false,
|
|
168
|
+
configurable: true
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(AcDbDiametricDimension.prototype, "geometricExtents", {
|
|
171
|
+
/**
|
|
172
|
+
* Gets the geometric extents (bounding box) of this dimension entity.
|
|
173
|
+
*
|
|
174
|
+
* The geometric extents define the minimum bounding box that completely contains
|
|
175
|
+
* the dimension entity, including all its components like extension lines,
|
|
176
|
+
* dimension lines, arrows, and text.
|
|
177
|
+
*
|
|
178
|
+
* @returns A 3D bounding box containing the dimension entity
|
|
179
|
+
* @inheritdoc
|
|
180
|
+
*/
|
|
181
|
+
get: function () {
|
|
182
|
+
// TODO: Finish it
|
|
183
|
+
return new AcGeBox3d();
|
|
184
|
+
},
|
|
185
|
+
enumerable: false,
|
|
186
|
+
configurable: true
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* Draws the dimension lines with appropriate arrow styles.
|
|
190
|
+
*
|
|
191
|
+
* This method handles the rendering of dimension lines based on the number of
|
|
192
|
+
* line segments. It applies different arrow styles to the first and last lines
|
|
193
|
+
* when appropriate, and sorts the lines for proper visual representation.
|
|
194
|
+
*
|
|
195
|
+
* @param renderer - The graphics renderer used to draw the dimension lines
|
|
196
|
+
* @param lines - Array of line entities that make up the dimension
|
|
197
|
+
* @returns Array of rendered graphics entities
|
|
198
|
+
* @protected
|
|
199
|
+
*/
|
|
200
|
+
AcDbDiametricDimension.prototype.drawLines = function (renderer, lines) {
|
|
201
|
+
var _this = this;
|
|
202
|
+
var results = [];
|
|
203
|
+
var count = lines.length;
|
|
204
|
+
if (count == 1) {
|
|
205
|
+
results.push(this.drawLine(renderer, lines[0], {
|
|
206
|
+
firstArrow: this.firstArrowStyle
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
else if (count == 3) {
|
|
210
|
+
this.sortLines(lines);
|
|
211
|
+
results.push(this.drawLine(renderer, lines[0], {
|
|
212
|
+
firstArrow: this.firstArrowStyle
|
|
213
|
+
}));
|
|
214
|
+
results.push(this.drawLine(renderer, lines[1]));
|
|
215
|
+
results.push(this.drawLine(renderer, lines[2], {
|
|
216
|
+
firstArrow: this.firstArrowStyle
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
lines.forEach(function (line) {
|
|
221
|
+
results.push(_this.drawLine(renderer, line));
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return results;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Draws a single line with optional arrow styling.
|
|
228
|
+
*
|
|
229
|
+
* @param renderer - The graphics renderer used to draw the line
|
|
230
|
+
* @param line - The line entity to draw
|
|
231
|
+
* @param lineArrowStyle - Optional arrow style configuration for the line
|
|
232
|
+
* @returns The rendered graphics entity
|
|
233
|
+
* @private
|
|
234
|
+
*/
|
|
235
|
+
AcDbDiametricDimension.prototype.drawLine = function (renderer, line, lineArrowStyle) {
|
|
236
|
+
if (lineArrowStyle) {
|
|
237
|
+
var points = [line.startPoint, line.endPoint];
|
|
238
|
+
return renderer.lines(points, __assign(__assign({}, this.lineStyle), { arrows: lineArrowStyle }));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return line.draw(renderer);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Sorts the dimension lines for proper visual representation.
|
|
246
|
+
*
|
|
247
|
+
* This method sorts the line segments based on their start and end points to ensure
|
|
248
|
+
* they are drawn in the correct order for proper dimension visualization.
|
|
249
|
+
*
|
|
250
|
+
* @param lines - Array of line entities to sort
|
|
251
|
+
* @private
|
|
252
|
+
*/
|
|
253
|
+
AcDbDiametricDimension.prototype.sortLines = function (lines) {
|
|
254
|
+
// Function to compare positions of points
|
|
255
|
+
var comparePoints = function (a, b) {
|
|
256
|
+
if (a.x !== b.x)
|
|
257
|
+
return a.x - b.x;
|
|
258
|
+
if (a.y !== b.y)
|
|
259
|
+
return a.y - b.y;
|
|
260
|
+
return a.z - b.z;
|
|
261
|
+
};
|
|
262
|
+
// Sort segments based on the start points first, then end points
|
|
263
|
+
lines.sort(function (segA, segB) {
|
|
264
|
+
var startCompare = comparePoints(segA.startPoint, segB.startPoint);
|
|
265
|
+
if (startCompare !== 0)
|
|
266
|
+
return startCompare;
|
|
267
|
+
return comparePoints(segA.endPoint, segB.endPoint);
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
/** The entity type name */
|
|
271
|
+
AcDbDiametricDimension.typeName = 'DiametricDimension';
|
|
272
|
+
return AcDbDiametricDimension;
|
|
273
|
+
}(AcDbDimension));
|
|
274
|
+
export { AcDbDiametricDimension };
|
|
275
|
+
//# sourceMappingURL=AcDbDiametricDimension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbDiametricDimension.js","sourceRoot":"","sources":["../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