@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,414 @@
|
|
|
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, AcGeVector3d } from '@mlightcad/geometry-engine';
|
|
28
|
+
import { AcGiMTextAttachmentPoint, AcGiMTextFlowDirection } from '@mlightcad/graphic-interface';
|
|
29
|
+
import { AcDbEntity } from './AcDbEntity';
|
|
30
|
+
/**
|
|
31
|
+
* Represents a multiline text (mtext) entity in AutoCAD.
|
|
32
|
+
*
|
|
33
|
+
* A multiline text entity is a 2D geometric object that displays formatted text
|
|
34
|
+
* with support for multiple lines, word wrapping, and rich text formatting.
|
|
35
|
+
* MText entities are more advanced than regular text entities and support
|
|
36
|
+
* features like background fills, line spacing, and attachment points.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* // Create a multiline text entity
|
|
41
|
+
* const mtext = new AcDbMText();
|
|
42
|
+
* mtext.contents = "This is a\nmultiline text\nwith formatting";
|
|
43
|
+
* mtext.height = 2.5;
|
|
44
|
+
* mtext.width = 20;
|
|
45
|
+
* mtext.location = new AcGePoint3d(0, 0, 0);
|
|
46
|
+
* mtext.attachmentPoint = AcGiMTextAttachmentPoint.TopLeft;
|
|
47
|
+
*
|
|
48
|
+
* // Access mtext properties
|
|
49
|
+
* console.log(`Contents: ${mtext.contents}`);
|
|
50
|
+
* console.log(`Height: ${mtext.height}`);
|
|
51
|
+
* console.log(`Width: ${mtext.width}`);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
var AcDbMText = /** @class */ (function (_super) {
|
|
55
|
+
__extends(AcDbMText, _super);
|
|
56
|
+
/**
|
|
57
|
+
* Creates a new multiline text entity.
|
|
58
|
+
*
|
|
59
|
+
* This constructor initializes an mtext entity with default values.
|
|
60
|
+
* The contents are empty, height and width are 0, and the location is at the origin.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const mtext = new AcDbMText();
|
|
65
|
+
* mtext.contents = "Sample multiline text";
|
|
66
|
+
* mtext.height = 3.0;
|
|
67
|
+
* mtext.width = 15;
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
function AcDbMText() {
|
|
71
|
+
var _this = _super.call(this) || this;
|
|
72
|
+
_this._contents = '';
|
|
73
|
+
_this._height = 0;
|
|
74
|
+
_this._width = 0;
|
|
75
|
+
_this._lineSpacingFactor = 0.25;
|
|
76
|
+
_this._lineSpacingStyle = 0;
|
|
77
|
+
_this._backgroundFill = false;
|
|
78
|
+
_this._backgroundFillColor = 0xc8c8c8;
|
|
79
|
+
_this._backgroundFillTransparency = 1;
|
|
80
|
+
_this._backgroundScaleFactor = 1;
|
|
81
|
+
_this._rotation = 0;
|
|
82
|
+
_this._styleName = '';
|
|
83
|
+
_this._location = new AcGePoint3d();
|
|
84
|
+
_this._attachmentPoint = AcGiMTextAttachmentPoint.TopLeft;
|
|
85
|
+
_this._direction = new AcGeVector3d(1, 0, 0);
|
|
86
|
+
_this._drawingDirection = AcGiMTextFlowDirection.LEFT_TO_RIGHT;
|
|
87
|
+
return _this;
|
|
88
|
+
}
|
|
89
|
+
Object.defineProperty(AcDbMText.prototype, "contents", {
|
|
90
|
+
/**
|
|
91
|
+
* Gets the contents of the mtext object.
|
|
92
|
+
*
|
|
93
|
+
* This returns a string that contains the contents of the mtext object.
|
|
94
|
+
* Formatting data used for word wrap calculations is removed.
|
|
95
|
+
*
|
|
96
|
+
* @returns The text contents
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const contents = mtext.contents;
|
|
101
|
+
* console.log(`Text contents: ${contents}`);
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
get: function () {
|
|
105
|
+
return this._contents;
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Sets the contents of the mtext object.
|
|
109
|
+
*
|
|
110
|
+
* @param value - The new text contents
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* mtext.contents = "New multiline\ntext content";
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
set: function (value) {
|
|
118
|
+
this._contents = value;
|
|
119
|
+
},
|
|
120
|
+
enumerable: false,
|
|
121
|
+
configurable: true
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(AcDbMText.prototype, "height", {
|
|
124
|
+
/**
|
|
125
|
+
* Gets the height of the text.
|
|
126
|
+
*
|
|
127
|
+
* @returns The text height
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const height = mtext.height;
|
|
132
|
+
* console.log(`Text height: ${height}`);
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
get: function () {
|
|
136
|
+
return this._height;
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* Sets the height of the text.
|
|
140
|
+
*
|
|
141
|
+
* @param value - The new text height
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* mtext.height = 5.0;
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
set: function (value) {
|
|
149
|
+
this._height = value;
|
|
150
|
+
},
|
|
151
|
+
enumerable: false,
|
|
152
|
+
configurable: true
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(AcDbMText.prototype, "width", {
|
|
155
|
+
/**
|
|
156
|
+
* Gets the maximum width setting used by the MText object for word wrap formatting.
|
|
157
|
+
*
|
|
158
|
+
* It is possible that none of the lines resulting from word wrap formatting will
|
|
159
|
+
* reach this width value. Words which exceed this width value will not be broken,
|
|
160
|
+
* but will extend beyond the given width.
|
|
161
|
+
*
|
|
162
|
+
* @returns The maximum width for word wrap
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* const width = mtext.width;
|
|
167
|
+
* console.log(`Text width: ${width}`);
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
get: function () {
|
|
171
|
+
return this._width;
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* Sets the maximum width setting used by the MText object for word wrap formatting.
|
|
175
|
+
*
|
|
176
|
+
* @param value - The new maximum width for word wrap
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* mtext.width = 25;
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
set: function (value) {
|
|
184
|
+
this._width = value;
|
|
185
|
+
},
|
|
186
|
+
enumerable: false,
|
|
187
|
+
configurable: true
|
|
188
|
+
});
|
|
189
|
+
Object.defineProperty(AcDbMText.prototype, "rotation", {
|
|
190
|
+
/**
|
|
191
|
+
* Gets the rotation angle of the text.
|
|
192
|
+
*
|
|
193
|
+
* The rotation angle is relative to the X axis of the text's OCS, with positive
|
|
194
|
+
* angles going counterclockwise when looking down the Z axis toward the origin.
|
|
195
|
+
*
|
|
196
|
+
* @returns The rotation angle in radians
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* const rotation = mtext.rotation;
|
|
201
|
+
* console.log(`Rotation: ${rotation} radians (${rotation * 180 / Math.PI} degrees)`);
|
|
202
|
+
* ```
|
|
203
|
+
*/
|
|
204
|
+
get: function () {
|
|
205
|
+
return this._rotation;
|
|
206
|
+
},
|
|
207
|
+
set: function (value) {
|
|
208
|
+
this._rotation = value;
|
|
209
|
+
},
|
|
210
|
+
enumerable: false,
|
|
211
|
+
configurable: true
|
|
212
|
+
});
|
|
213
|
+
Object.defineProperty(AcDbMText.prototype, "lineSpacingFactor", {
|
|
214
|
+
/**
|
|
215
|
+
* The line spacing factor (a value between 0.25 and 4.00).
|
|
216
|
+
*/
|
|
217
|
+
get: function () {
|
|
218
|
+
return this._lineSpacingFactor;
|
|
219
|
+
},
|
|
220
|
+
set: function (value) {
|
|
221
|
+
this._lineSpacingFactor = value;
|
|
222
|
+
},
|
|
223
|
+
enumerable: false,
|
|
224
|
+
configurable: true
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(AcDbMText.prototype, "lineSpacingStyle", {
|
|
227
|
+
/**
|
|
228
|
+
* The line spacing style.
|
|
229
|
+
*/
|
|
230
|
+
get: function () {
|
|
231
|
+
return this._lineSpacingStyle;
|
|
232
|
+
},
|
|
233
|
+
set: function (value) {
|
|
234
|
+
this._lineSpacingStyle = value;
|
|
235
|
+
},
|
|
236
|
+
enumerable: false,
|
|
237
|
+
configurable: true
|
|
238
|
+
});
|
|
239
|
+
Object.defineProperty(AcDbMText.prototype, "backgroundFill", {
|
|
240
|
+
/**
|
|
241
|
+
* Toggle the background fill on or off. If it is true, background color is turned off, and no
|
|
242
|
+
* background fill color has been specified, this function sets the background fill color to
|
|
243
|
+
* an RGB value of 200,200,200.
|
|
244
|
+
*/
|
|
245
|
+
get: function () {
|
|
246
|
+
return this._backgroundFill;
|
|
247
|
+
},
|
|
248
|
+
set: function (value) {
|
|
249
|
+
this._backgroundFill = value;
|
|
250
|
+
this._backgroundFillColor = 0xc8c8c8;
|
|
251
|
+
},
|
|
252
|
+
enumerable: false,
|
|
253
|
+
configurable: true
|
|
254
|
+
});
|
|
255
|
+
Object.defineProperty(AcDbMText.prototype, "backgroundFillColor", {
|
|
256
|
+
/**
|
|
257
|
+
* The background fill color. This property is valid only if background fill is enable.
|
|
258
|
+
*/
|
|
259
|
+
get: function () {
|
|
260
|
+
return this._backgroundFillColor;
|
|
261
|
+
},
|
|
262
|
+
set: function (value) {
|
|
263
|
+
this._backgroundFillColor = value;
|
|
264
|
+
},
|
|
265
|
+
enumerable: false,
|
|
266
|
+
configurable: true
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(AcDbMText.prototype, "backgroundFillTransparency", {
|
|
269
|
+
/**
|
|
270
|
+
* The background fill transparency. This property is valid only if background fill is enable.
|
|
271
|
+
*/
|
|
272
|
+
get: function () {
|
|
273
|
+
return this._backgroundFillTransparency;
|
|
274
|
+
},
|
|
275
|
+
set: function (value) {
|
|
276
|
+
this._backgroundFillTransparency = value;
|
|
277
|
+
},
|
|
278
|
+
enumerable: false,
|
|
279
|
+
configurable: true
|
|
280
|
+
});
|
|
281
|
+
Object.defineProperty(AcDbMText.prototype, "backgroundScaleFactor", {
|
|
282
|
+
/**
|
|
283
|
+
* The background scale factor.
|
|
284
|
+
*/
|
|
285
|
+
get: function () {
|
|
286
|
+
return this._backgroundScaleFactor;
|
|
287
|
+
},
|
|
288
|
+
set: function (value) {
|
|
289
|
+
this._backgroundScaleFactor = value;
|
|
290
|
+
},
|
|
291
|
+
enumerable: false,
|
|
292
|
+
configurable: true
|
|
293
|
+
});
|
|
294
|
+
Object.defineProperty(AcDbMText.prototype, "styleName", {
|
|
295
|
+
/**
|
|
296
|
+
* The style name stored in text ttyle table record and used by this text entity
|
|
297
|
+
*/
|
|
298
|
+
get: function () {
|
|
299
|
+
return this._styleName;
|
|
300
|
+
},
|
|
301
|
+
set: function (value) {
|
|
302
|
+
this._styleName = value;
|
|
303
|
+
},
|
|
304
|
+
enumerable: false,
|
|
305
|
+
configurable: true
|
|
306
|
+
});
|
|
307
|
+
Object.defineProperty(AcDbMText.prototype, "location", {
|
|
308
|
+
/**
|
|
309
|
+
* The insertion point of this mtext entity.
|
|
310
|
+
*/
|
|
311
|
+
get: function () {
|
|
312
|
+
return this._location;
|
|
313
|
+
},
|
|
314
|
+
set: function (value) {
|
|
315
|
+
this._location.copy(value);
|
|
316
|
+
},
|
|
317
|
+
enumerable: false,
|
|
318
|
+
configurable: true
|
|
319
|
+
});
|
|
320
|
+
Object.defineProperty(AcDbMText.prototype, "attachmentPoint", {
|
|
321
|
+
/**
|
|
322
|
+
* The attachment point value which determines how the text will be oriented around the insertion point
|
|
323
|
+
* of the mtext object. For example, if the attachment point is AcGiAttachmentPoint.MiddleCenter, then
|
|
324
|
+
* the text body will be displayed such that the insertion point appears at the geometric center of the
|
|
325
|
+
* text body.
|
|
326
|
+
*/
|
|
327
|
+
get: function () {
|
|
328
|
+
return this._attachmentPoint;
|
|
329
|
+
},
|
|
330
|
+
set: function (value) {
|
|
331
|
+
this._attachmentPoint = value;
|
|
332
|
+
},
|
|
333
|
+
enumerable: false,
|
|
334
|
+
configurable: true
|
|
335
|
+
});
|
|
336
|
+
Object.defineProperty(AcDbMText.prototype, "direction", {
|
|
337
|
+
/**
|
|
338
|
+
* Represent the X axis ("horizontal") for the text. This direction vector is used to determine the text
|
|
339
|
+
* flow direction.
|
|
340
|
+
*/
|
|
341
|
+
get: function () {
|
|
342
|
+
return this._direction;
|
|
343
|
+
},
|
|
344
|
+
set: function (value) {
|
|
345
|
+
this._direction.copy(value);
|
|
346
|
+
},
|
|
347
|
+
enumerable: false,
|
|
348
|
+
configurable: true
|
|
349
|
+
});
|
|
350
|
+
Object.defineProperty(AcDbMText.prototype, "drawingDirection", {
|
|
351
|
+
get: function () {
|
|
352
|
+
return this._drawingDirection;
|
|
353
|
+
},
|
|
354
|
+
set: function (value) {
|
|
355
|
+
this._drawingDirection = value;
|
|
356
|
+
},
|
|
357
|
+
enumerable: false,
|
|
358
|
+
configurable: true
|
|
359
|
+
});
|
|
360
|
+
Object.defineProperty(AcDbMText.prototype, "geometricExtents", {
|
|
361
|
+
/**
|
|
362
|
+
* @inheritdoc
|
|
363
|
+
*/
|
|
364
|
+
get: function () {
|
|
365
|
+
// TODO: Implement it correctly
|
|
366
|
+
return new AcGeBox3d();
|
|
367
|
+
},
|
|
368
|
+
enumerable: false,
|
|
369
|
+
configurable: true
|
|
370
|
+
});
|
|
371
|
+
AcDbMText.prototype.getTextStyle = function () {
|
|
372
|
+
var textStyleTable = this.database.tables.textStyleTable;
|
|
373
|
+
var style = textStyleTable.getAt(this.styleName);
|
|
374
|
+
if (!style) {
|
|
375
|
+
style = (textStyleTable.getAt('STANDARD') ||
|
|
376
|
+
textStyleTable.getAt('Standard'));
|
|
377
|
+
}
|
|
378
|
+
return style.textStyle;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Draws this entity using the specified renderer.
|
|
382
|
+
*
|
|
383
|
+
* @param renderer - The renderer to use for drawing
|
|
384
|
+
* @param delay - The flag to delay creating one rendered entity and just create one dummy
|
|
385
|
+
* entity. Renderer can delay heavy calculation operation to avoid blocking UI when this flag
|
|
386
|
+
* is true.
|
|
387
|
+
* @returns The rendered entity, or undefined if drawing failed
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* ```typescript
|
|
391
|
+
* const renderedEntity = entity.draw(renderer);
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
AcDbMText.prototype.draw = function (renderer, delay) {
|
|
395
|
+
var mtextData = {
|
|
396
|
+
text: this.contents,
|
|
397
|
+
height: this.height,
|
|
398
|
+
width: this.width,
|
|
399
|
+
position: this.location,
|
|
400
|
+
rotation: this.rotation,
|
|
401
|
+
directionVector: this.direction,
|
|
402
|
+
attachmentPoint: this.attachmentPoint,
|
|
403
|
+
drawingDirection: this.drawingDirection,
|
|
404
|
+
lineSpaceFactor: this.lineSpacingFactor
|
|
405
|
+
};
|
|
406
|
+
var textStyle = __assign(__assign({}, this.getTextStyle()), { color: this.rgbColor });
|
|
407
|
+
return renderer.mtext(mtextData, textStyle, delay);
|
|
408
|
+
};
|
|
409
|
+
/** The entity type name */
|
|
410
|
+
AcDbMText.typeName = 'MText';
|
|
411
|
+
return AcDbMText;
|
|
412
|
+
}(AcDbEntity));
|
|
413
|
+
export { AcDbMText };
|
|
414
|
+
//# sourceMappingURL=AcDbMText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbMText.js","sourceRoot":"","sources":["../../src/entity/AcDbMText.ts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SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;IACpD,CAAC;IAzVD,2BAA2B;IACX,kBAAQ,GAAW,OAAO,CAAA;IAyV5C,gBAAC;CAAA,AA3VD,CAA+B,UAAU,GA2VxC;SA3VY,SAAS"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { AcGeBox3d, AcGeMatrix3d, AcGePoint3d, AcGePointLike } from '@mlightcad/geometry-engine';
|
|
2
|
+
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
|
+
import { AcDbEntity } from './AcDbEntity';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a point entity in AutoCAD.
|
|
6
|
+
*
|
|
7
|
+
* A point is a 0-dimensional geometric object defined by its position in 3D space.
|
|
8
|
+
* Points are fundamental drawing entities that can be used to mark specific
|
|
9
|
+
* locations in drawings or as reference points for other entities.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Create a point at the origin
|
|
14
|
+
* const point = new AcDbPoint();
|
|
15
|
+
* point.position = new AcGePoint3d(0, 0, 0);
|
|
16
|
+
*
|
|
17
|
+
* // Create a point at a specific location
|
|
18
|
+
* const point2 = new AcDbPoint();
|
|
19
|
+
* point2.position = new AcGePoint3d(10, 20, 5);
|
|
20
|
+
*
|
|
21
|
+
* // Access point properties
|
|
22
|
+
* console.log(`Point position: ${point.position}`);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class AcDbPoint extends AcDbEntity {
|
|
26
|
+
/** The entity type name */
|
|
27
|
+
static typeName: string;
|
|
28
|
+
/** The underlying geometric point object */
|
|
29
|
+
private _geo;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new point entity.
|
|
32
|
+
*
|
|
33
|
+
* This constructor initializes a point object at the origin (0,0,0).
|
|
34
|
+
* The position can be set after creation using the position property.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const point = new AcDbPoint();
|
|
39
|
+
* point.position = new AcGePoint3d(5, 10, 0);
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
constructor();
|
|
43
|
+
/**
|
|
44
|
+
* Gets the position of this point in WCS coordinates.
|
|
45
|
+
*
|
|
46
|
+
* @returns The position as a 3D point
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const position = point.position;
|
|
51
|
+
* console.log(`Point at: ${position.x}, ${position.y}, ${position.z}`);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
get position(): AcGePoint3d;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the position of this point in WCS coordinates.
|
|
57
|
+
*
|
|
58
|
+
* @param value - The new position
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* point.position = new AcGePoint3d(15, 25, 0);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
set position(value: AcGePointLike);
|
|
66
|
+
/**
|
|
67
|
+
* Gets the geometric extents (bounding box) of this point.
|
|
68
|
+
*
|
|
69
|
+
* For a point, the bounding box is a minimal box that contains just the point.
|
|
70
|
+
*
|
|
71
|
+
* @returns The bounding box that encompasses the point
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const extents = point.geometricExtents;
|
|
76
|
+
* console.log(`Point bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
get geometricExtents(): AcGeBox3d;
|
|
80
|
+
/**
|
|
81
|
+
* Transforms this point by the specified matrix.
|
|
82
|
+
*
|
|
83
|
+
* This method applies a geometric transformation to the point, updating
|
|
84
|
+
* its position according to the transformation matrix.
|
|
85
|
+
*
|
|
86
|
+
* @param matrix - The transformation matrix to apply
|
|
87
|
+
* @returns This point after transformation
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const translationMatrix = AcGeMatrix3d.translation(10, 0, 0);
|
|
92
|
+
* point.transformBy(translationMatrix);
|
|
93
|
+
* // Point is now translated 10 units in the X direction
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
transformBy(matrix: AcGeMatrix3d): this;
|
|
97
|
+
/**
|
|
98
|
+
* Draws this point using the specified renderer.
|
|
99
|
+
*
|
|
100
|
+
* This method renders the point using the point's current style properties,
|
|
101
|
+
* including the display mode and size from the database.
|
|
102
|
+
*
|
|
103
|
+
* @param renderer - The renderer to use for drawing
|
|
104
|
+
* @returns The rendered point entity, or undefined if drawing failed
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* const renderedPoint = point.draw(renderer);
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=AcDbPoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbPoint.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAU;IAE1C,4CAA4C;IAC5C,OAAO,CAAC,IAAI,CAAa;IAEzB;;;;;;;;;;;OAWG;;IAMH;;;;;;;;;;OAUG;IACH,IAAI,QAAQ,IAAI,WAAW,CAE1B;IAED;;;;;;;;;OASG;IACH,IAAI,QAAQ,CAAC,KAAK,EAAE,aAAa,EAEhC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAEhC;IAED;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,MAAM,EAAE,YAAY;IAKhC;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAO5B"}
|
|
@@ -0,0 +1,155 @@
|
|
|
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 { AcDbEntity } from './AcDbEntity';
|
|
18
|
+
/**
|
|
19
|
+
* Represents a point entity in AutoCAD.
|
|
20
|
+
*
|
|
21
|
+
* A point is a 0-dimensional geometric object defined by its position in 3D space.
|
|
22
|
+
* Points are fundamental drawing entities that can be used to mark specific
|
|
23
|
+
* locations in drawings or as reference points for other entities.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* // Create a point at the origin
|
|
28
|
+
* const point = new AcDbPoint();
|
|
29
|
+
* point.position = new AcGePoint3d(0, 0, 0);
|
|
30
|
+
*
|
|
31
|
+
* // Create a point at a specific location
|
|
32
|
+
* const point2 = new AcDbPoint();
|
|
33
|
+
* point2.position = new AcGePoint3d(10, 20, 5);
|
|
34
|
+
*
|
|
35
|
+
* // Access point properties
|
|
36
|
+
* console.log(`Point position: ${point.position}`);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
var AcDbPoint = /** @class */ (function (_super) {
|
|
40
|
+
__extends(AcDbPoint, _super);
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new point entity.
|
|
43
|
+
*
|
|
44
|
+
* This constructor initializes a point object at the origin (0,0,0).
|
|
45
|
+
* The position can be set after creation using the position property.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const point = new AcDbPoint();
|
|
50
|
+
* point.position = new AcGePoint3d(5, 10, 0);
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
function AcDbPoint() {
|
|
54
|
+
var _this = _super.call(this) || this;
|
|
55
|
+
_this._geo = new AcGePoint3d();
|
|
56
|
+
return _this;
|
|
57
|
+
}
|
|
58
|
+
Object.defineProperty(AcDbPoint.prototype, "position", {
|
|
59
|
+
/**
|
|
60
|
+
* Gets the position of this point in WCS coordinates.
|
|
61
|
+
*
|
|
62
|
+
* @returns The position as a 3D point
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const position = point.position;
|
|
67
|
+
* console.log(`Point at: ${position.x}, ${position.y}, ${position.z}`);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
get: function () {
|
|
71
|
+
return this._geo;
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* Sets the position of this point in WCS coordinates.
|
|
75
|
+
*
|
|
76
|
+
* @param value - The new position
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* point.position = new AcGePoint3d(15, 25, 0);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
set: function (value) {
|
|
84
|
+
this._geo.set(value.x, value.y, value.z || 0);
|
|
85
|
+
},
|
|
86
|
+
enumerable: false,
|
|
87
|
+
configurable: true
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(AcDbPoint.prototype, "geometricExtents", {
|
|
90
|
+
/**
|
|
91
|
+
* Gets the geometric extents (bounding box) of this point.
|
|
92
|
+
*
|
|
93
|
+
* For a point, the bounding box is a minimal box that contains just the point.
|
|
94
|
+
*
|
|
95
|
+
* @returns The bounding box that encompasses the point
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const extents = point.geometricExtents;
|
|
100
|
+
* console.log(`Point bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
get: function () {
|
|
104
|
+
return new AcGeBox3d().expandByPoint(this._geo);
|
|
105
|
+
},
|
|
106
|
+
enumerable: false,
|
|
107
|
+
configurable: true
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Transforms this point by the specified matrix.
|
|
111
|
+
*
|
|
112
|
+
* This method applies a geometric transformation to the point, updating
|
|
113
|
+
* its position according to the transformation matrix.
|
|
114
|
+
*
|
|
115
|
+
* @param matrix - The transformation matrix to apply
|
|
116
|
+
* @returns This point after transformation
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const translationMatrix = AcGeMatrix3d.translation(10, 0, 0);
|
|
121
|
+
* point.transformBy(translationMatrix);
|
|
122
|
+
* // Point is now translated 10 units in the X direction
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
AcDbPoint.prototype.transformBy = function (matrix) {
|
|
126
|
+
this._geo.applyMatrix4(matrix);
|
|
127
|
+
return this;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Draws this point using the specified renderer.
|
|
131
|
+
*
|
|
132
|
+
* This method renders the point using the point's current style properties,
|
|
133
|
+
* including the display mode and size from the database.
|
|
134
|
+
*
|
|
135
|
+
* @param renderer - The renderer to use for drawing
|
|
136
|
+
* @returns The rendered point entity, or undefined if drawing failed
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const renderedPoint = point.draw(renderer);
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
AcDbPoint.prototype.draw = function (renderer) {
|
|
144
|
+
return renderer.point(this._geo, {
|
|
145
|
+
displayMode: this.database.pdmode,
|
|
146
|
+
displaySize: this.database.pdsize,
|
|
147
|
+
color: this.rgbColor
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
/** The entity type name */
|
|
151
|
+
AcDbPoint.typeName = 'Point';
|
|
152
|
+
return AcDbPoint;
|
|
153
|
+
}(AcDbEntity));
|
|
154
|
+
export { AcDbPoint };
|
|
155
|
+
//# sourceMappingURL=AcDbPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcDbPoint.js","sourceRoot":"","sources":["../../src/entity/AcDbPoint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EAET,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAA+B,6BAAU;IAOvC;;;;;;;;;;;OAWG;IACH;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,IAAI,WAAW,EAAE,CAAA;;IAC/B,CAAC;IAaD,sBAAI,+BAAQ;QAXZ;;;;;;;;;;WAUG;aACH;YACE,OAAO,IAAI,CAAC,IAAI,CAAA;QAClB,CAAC;QAED;;;;;;;;;WASG;aACH,UAAa,KAAoB;YAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC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