@mlightcad/data-model 1.3.1 → 1.3.3
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/package.json +4 -4
- package/dist/data-model.cjs +0 -5
- package/dist/data-model.js +0 -25475
- package/dist/dxf-parser-worker.js +0 -1669
- package/lib/base/AcDbHostApplicationServices.d.ts +0 -96
- package/lib/base/AcDbHostApplicationServices.d.ts.map +0 -1
- package/lib/base/AcDbHostApplicationServices.js +0 -118
- package/lib/base/AcDbHostApplicationServices.js.map +0 -1
- package/lib/base/AcDbObject.d.ts +0 -205
- package/lib/base/AcDbObject.d.ts.map +0 -1
- package/lib/base/AcDbObject.js +0 -236
- package/lib/base/AcDbObject.js.map +0 -1
- package/lib/base/index.d.ts +0 -3
- package/lib/base/index.d.ts.map +0 -1
- package/lib/base/index.js +0 -3
- package/lib/base/index.js.map +0 -1
- package/lib/converter/AcDbBatchProcessing.d.ts +0 -146
- package/lib/converter/AcDbBatchProcessing.d.ts.map +0 -1
- package/lib/converter/AcDbBatchProcessing.js +0 -272
- package/lib/converter/AcDbBatchProcessing.js.map +0 -1
- package/lib/converter/AcDbDxfConverter.d.ts +0 -272
- package/lib/converter/AcDbDxfConverter.d.ts.map +0 -1
- package/lib/converter/AcDbDxfConverter.js +0 -867
- package/lib/converter/AcDbDxfConverter.js.map +0 -1
- package/lib/converter/AcDbDxfParser.d.ts +0 -23
- package/lib/converter/AcDbDxfParser.d.ts.map +0 -1
- package/lib/converter/AcDbDxfParser.js +0 -85
- package/lib/converter/AcDbDxfParser.js.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.d.ts +0 -159
- package/lib/converter/AcDbEntitiyConverter.d.ts.map +0 -1
- package/lib/converter/AcDbEntitiyConverter.js +0 -659
- package/lib/converter/AcDbEntitiyConverter.js.map +0 -1
- package/lib/converter/AcDbObjectConverter.d.ts +0 -61
- package/lib/converter/AcDbObjectConverter.d.ts.map +0 -1
- package/lib/converter/AcDbObjectConverter.js +0 -91
- package/lib/converter/AcDbObjectConverter.js.map +0 -1
- package/lib/converter/AcDbRegenerator.d.ts +0 -101
- package/lib/converter/AcDbRegenerator.d.ts.map +0 -1
- package/lib/converter/AcDbRegenerator.js +0 -334
- package/lib/converter/AcDbRegenerator.js.map +0 -1
- package/lib/converter/index.d.ts +0 -5
- package/lib/converter/index.d.ts.map +0 -1
- package/lib/converter/index.js +0 -5
- package/lib/converter/index.js.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.d.ts +0 -36
- package/lib/converter/worker/AcDbBaseWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbBaseWorker.js +0 -93
- package/lib/converter/worker/AcDbBaseWorker.js.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts +0 -11
- package/lib/converter/worker/AcDbDxfParserWorker.d.ts.map +0 -1
- package/lib/converter/worker/AcDbDxfParserWorker.js +0 -75
- package/lib/converter/worker/AcDbDxfParserWorker.js.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.d.ts +0 -107
- package/lib/converter/worker/AcDbWorkerManager.d.ts.map +0 -1
- package/lib/converter/worker/AcDbWorkerManager.js +0 -360
- package/lib/converter/worker/AcDbWorkerManager.js.map +0 -1
- package/lib/converter/worker/index.d.ts +0 -3
- package/lib/converter/worker/index.d.ts.map +0 -1
- package/lib/converter/worker/index.js +0 -3
- package/lib/converter/worker/index.js.map +0 -1
- package/lib/database/AcDbBlockTable.d.ts +0 -56
- package/lib/database/AcDbBlockTable.d.ts.map +0 -1
- package/lib/database/AcDbBlockTable.js +0 -98
- package/lib/database/AcDbBlockTable.js.map +0 -1
- package/lib/database/AcDbBlockTableRecord.d.ts +0 -185
- package/lib/database/AcDbBlockTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbBlockTableRecord.js +0 -261
- package/lib/database/AcDbBlockTableRecord.js.map +0 -1
- package/lib/database/AcDbDatabase.d.ts +0 -563
- package/lib/database/AcDbDatabase.d.ts.map +0 -1
- package/lib/database/AcDbDatabase.js +0 -842
- package/lib/database/AcDbDatabase.js.map +0 -1
- package/lib/database/AcDbDatabaseConverter.d.ts +0 -292
- package/lib/database/AcDbDatabaseConverter.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverter.js +0 -446
- package/lib/database/AcDbDatabaseConverter.js.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.d.ts +0 -141
- package/lib/database/AcDbDatabaseConverterManager.d.ts.map +0 -1
- package/lib/database/AcDbDatabaseConverterManager.js +0 -173
- package/lib/database/AcDbDatabaseConverterManager.js.map +0 -1
- package/lib/database/AcDbDimStyleTable.d.ts +0 -31
- package/lib/database/AcDbDimStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTable.js +0 -49
- package/lib/database/AcDbDimStyleTable.js.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.d.ts +0 -797
- package/lib/database/AcDbDimStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbDimStyleTableRecord.js +0 -1294
- package/lib/database/AcDbDimStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbDwgVersion.d.ts +0 -32
- package/lib/database/AcDbDwgVersion.d.ts.map +0 -1
- package/lib/database/AcDbDwgVersion.js +0 -76
- package/lib/database/AcDbDwgVersion.js.map +0 -1
- package/lib/database/AcDbLayerTable.d.ts +0 -51
- package/lib/database/AcDbLayerTable.d.ts.map +0 -1
- package/lib/database/AcDbLayerTable.js +0 -92
- package/lib/database/AcDbLayerTable.js.map +0 -1
- package/lib/database/AcDbLayerTableRecord.d.ts +0 -278
- package/lib/database/AcDbLayerTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLayerTableRecord.js +0 -397
- package/lib/database/AcDbLayerTableRecord.js.map +0 -1
- package/lib/database/AcDbLinetypeTable.d.ts +0 -30
- package/lib/database/AcDbLinetypeTable.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTable.js +0 -48
- package/lib/database/AcDbLinetypeTable.js.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.d.ts +0 -79
- package/lib/database/AcDbLinetypeTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbLinetypeTableRecord.js +0 -129
- package/lib/database/AcDbLinetypeTableRecord.js.map +0 -1
- package/lib/database/AcDbSymbolTable.d.ts +0 -199
- package/lib/database/AcDbSymbolTable.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTable.js +0 -264
- package/lib/database/AcDbSymbolTable.js.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.d.ts +0 -61
- package/lib/database/AcDbSymbolTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbSymbolTableRecord.js +0 -82
- package/lib/database/AcDbSymbolTableRecord.js.map +0 -1
- package/lib/database/AcDbTextStyleTable.d.ts +0 -48
- package/lib/database/AcDbTextStyleTable.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTable.js +0 -112
- package/lib/database/AcDbTextStyleTable.js.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.d.ts +0 -179
- package/lib/database/AcDbTextStyleTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbTextStyleTableRecord.js +0 -276
- package/lib/database/AcDbTextStyleTableRecord.js.map +0 -1
- package/lib/database/AcDbViewportTable.d.ts +0 -31
- package/lib/database/AcDbViewportTable.d.ts.map +0 -1
- package/lib/database/AcDbViewportTable.js +0 -49
- package/lib/database/AcDbViewportTable.js.map +0 -1
- package/lib/database/AcDbViewportTableRecord.d.ts +0 -154
- package/lib/database/AcDbViewportTableRecord.d.ts.map +0 -1
- package/lib/database/AcDbViewportTableRecord.js +0 -318
- package/lib/database/AcDbViewportTableRecord.js.map +0 -1
- package/lib/database/index.d.ts +0 -19
- package/lib/database/index.d.ts.map +0 -1
- package/lib/database/index.js +0 -19
- package/lib/database/index.js.map +0 -1
- package/lib/entity/AcDbArc.d.ts +0 -254
- package/lib/entity/AcDbArc.d.ts.map +0 -1
- package/lib/entity/AcDbArc.js +0 -340
- package/lib/entity/AcDbArc.js.map +0 -1
- package/lib/entity/AcDbBlockReference.d.ts +0 -190
- package/lib/entity/AcDbBlockReference.d.ts.map +0 -1
- package/lib/entity/AcDbBlockReference.js +0 -302
- package/lib/entity/AcDbBlockReference.js.map +0 -1
- package/lib/entity/AcDbCircle.d.ts +0 -186
- package/lib/entity/AcDbCircle.d.ts.map +0 -1
- package/lib/entity/AcDbCircle.js +0 -249
- package/lib/entity/AcDbCircle.js.map +0 -1
- package/lib/entity/AcDbCurve.d.ts +0 -42
- package/lib/entity/AcDbCurve.d.ts.map +0 -1
- package/lib/entity/AcDbCurve.js +0 -44
- package/lib/entity/AcDbCurve.js.map +0 -1
- package/lib/entity/AcDbEllipse.d.ts +0 -207
- package/lib/entity/AcDbEllipse.d.ts.map +0 -1
- package/lib/entity/AcDbEllipse.js +0 -272
- package/lib/entity/AcDbEllipse.js.map +0 -1
- package/lib/entity/AcDbEntity.d.ts +0 -385
- package/lib/entity/AcDbEntity.d.ts.map +0 -1
- package/lib/entity/AcDbEntity.js +0 -561
- package/lib/entity/AcDbEntity.js.map +0 -1
- package/lib/entity/AcDbFace.d.ts +0 -151
- package/lib/entity/AcDbFace.d.ts.map +0 -1
- package/lib/entity/AcDbFace.js +0 -224
- package/lib/entity/AcDbFace.js.map +0 -1
- package/lib/entity/AcDbHatch.d.ts +0 -174
- package/lib/entity/AcDbHatch.d.ts.map +0 -1
- package/lib/entity/AcDbHatch.js +0 -250
- package/lib/entity/AcDbHatch.js.map +0 -1
- package/lib/entity/AcDbLeader.d.ts +0 -243
- package/lib/entity/AcDbLeader.d.ts.map +0 -1
- package/lib/entity/AcDbLeader.js +0 -358
- package/lib/entity/AcDbLeader.js.map +0 -1
- package/lib/entity/AcDbLine.d.ts +0 -198
- package/lib/entity/AcDbLine.d.ts.map +0 -1
- package/lib/entity/AcDbLine.js +0 -300
- package/lib/entity/AcDbLine.js.map +0 -1
- package/lib/entity/AcDbMText.d.ts +0 -248
- package/lib/entity/AcDbMText.d.ts.map +0 -1
- package/lib/entity/AcDbMText.js +0 -414
- package/lib/entity/AcDbMText.js.map +0 -1
- package/lib/entity/AcDbPoint.d.ts +0 -113
- package/lib/entity/AcDbPoint.d.ts.map +0 -1
- package/lib/entity/AcDbPoint.js +0 -155
- package/lib/entity/AcDbPoint.js.map +0 -1
- package/lib/entity/AcDbPolyline.d.ts +0 -221
- package/lib/entity/AcDbPolyline.d.ts.map +0 -1
- package/lib/entity/AcDbPolyline.js +0 -301
- package/lib/entity/AcDbPolyline.js.map +0 -1
- package/lib/entity/AcDbRasterImage.d.ts +0 -216
- package/lib/entity/AcDbRasterImage.d.ts.map +0 -1
- package/lib/entity/AcDbRasterImage.js +0 -451
- package/lib/entity/AcDbRasterImage.js.map +0 -1
- package/lib/entity/AcDbRay.d.ts +0 -150
- package/lib/entity/AcDbRay.d.ts.map +0 -1
- package/lib/entity/AcDbRay.js +0 -208
- package/lib/entity/AcDbRay.js.map +0 -1
- package/lib/entity/AcDbSpline.d.ts +0 -135
- package/lib/entity/AcDbSpline.d.ts.map +0 -1
- package/lib/entity/AcDbSpline.js +0 -142
- package/lib/entity/AcDbSpline.js.map +0 -1
- package/lib/entity/AcDbTable.d.ts +0 -260
- package/lib/entity/AcDbTable.d.ts.map +0 -1
- package/lib/entity/AcDbTable.js +0 -452
- package/lib/entity/AcDbTable.js.map +0 -1
- package/lib/entity/AcDbText.d.ts +0 -388
- package/lib/entity/AcDbText.d.ts.map +0 -1
- package/lib/entity/AcDbText.js +0 -523
- package/lib/entity/AcDbText.js.map +0 -1
- package/lib/entity/AcDbTrace.d.ts +0 -193
- package/lib/entity/AcDbTrace.d.ts.map +0 -1
- package/lib/entity/AcDbTrace.js +0 -271
- package/lib/entity/AcDbTrace.js.map +0 -1
- package/lib/entity/AcDbViewport.d.ts +0 -173
- package/lib/entity/AcDbViewport.d.ts.map +0 -1
- package/lib/entity/AcDbViewport.js +0 -295
- package/lib/entity/AcDbViewport.js.map +0 -1
- package/lib/entity/AcDbWipeout.d.ts +0 -39
- package/lib/entity/AcDbWipeout.d.ts.map +0 -1
- package/lib/entity/AcDbWipeout.js +0 -70
- package/lib/entity/AcDbWipeout.js.map +0 -1
- package/lib/entity/AcDbXline.d.ts +0 -151
- package/lib/entity/AcDbXline.d.ts.map +0 -1
- package/lib/entity/AcDbXline.js +0 -209
- package/lib/entity/AcDbXline.js.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts +0 -92
- package/lib/entity/dimension/AcDb3PointAngularDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDb3PointAngularDimension.js +0 -157
- package/lib/entity/dimension/AcDb3PointAngularDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts +0 -220
- package/lib/entity/dimension/AcDbAlignedDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbAlignedDimension.js +0 -341
- package/lib/entity/dimension/AcDbAlignedDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.d.ts +0 -94
- package/lib/entity/dimension/AcDbArcDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbArcDimension.js +0 -159
- package/lib/entity/dimension/AcDbArcDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts +0 -145
- package/lib/entity/dimension/AcDbDiametricDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDiametricDimension.js +0 -275
- package/lib/entity/dimension/AcDbDiametricDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbDimension.d.ts +0 -257
- package/lib/entity/dimension/AcDbDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbDimension.js +0 -466
- package/lib/entity/dimension/AcDbDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts +0 -78
- package/lib/entity/dimension/AcDbOrdinateDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbOrdinateDimension.js +0 -133
- package/lib/entity/dimension/AcDbOrdinateDimension.js.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.d.ts +0 -214
- package/lib/entity/dimension/AcDbRadialDimension.d.ts.map +0 -1
- package/lib/entity/dimension/AcDbRadialDimension.js +0 -288
- package/lib/entity/dimension/AcDbRadialDimension.js.map +0 -1
- package/lib/entity/dimension/index.d.ts +0 -8
- package/lib/entity/dimension/index.d.ts.map +0 -1
- package/lib/entity/dimension/index.js +0 -8
- package/lib/entity/dimension/index.js.map +0 -1
- package/lib/entity/index.d.ts +0 -24
- package/lib/entity/index.d.ts.map +0 -1
- package/lib/entity/index.js +0 -24
- package/lib/entity/index.js.map +0 -1
- package/lib/index.d.ts +0 -10
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -10
- package/lib/index.js.map +0 -1
- package/lib/misc/AcDbAngleUnits.d.ts +0 -20
- package/lib/misc/AcDbAngleUnits.d.ts.map +0 -1
- package/lib/misc/AcDbAngleUnits.js +0 -21
- package/lib/misc/AcDbAngleUnits.js.map +0 -1
- package/lib/misc/AcDbCodePage.d.ts +0 -50
- package/lib/misc/AcDbCodePage.d.ts.map +0 -1
- package/lib/misc/AcDbCodePage.js +0 -100
- package/lib/misc/AcDbCodePage.js.map +0 -1
- package/lib/misc/AcDbConstants.d.ts +0 -24
- package/lib/misc/AcDbConstants.d.ts.map +0 -1
- package/lib/misc/AcDbConstants.js +0 -24
- package/lib/misc/AcDbConstants.js.map +0 -1
- package/lib/misc/AcDbDimArrowType.d.ts +0 -89
- package/lib/misc/AcDbDimArrowType.d.ts.map +0 -1
- package/lib/misc/AcDbDimArrowType.js +0 -90
- package/lib/misc/AcDbDimArrowType.js.map +0 -1
- package/lib/misc/AcDbObjectIterator.d.ts +0 -64
- package/lib/misc/AcDbObjectIterator.d.ts.map +0 -1
- package/lib/misc/AcDbObjectIterator.js +0 -84
- package/lib/misc/AcDbObjectIterator.js.map +0 -1
- package/lib/misc/AcDbOsnapMode.d.ts +0 -51
- package/lib/misc/AcDbOsnapMode.d.ts.map +0 -1
- package/lib/misc/AcDbOsnapMode.js +0 -52
- package/lib/misc/AcDbOsnapMode.js.map +0 -1
- package/lib/misc/AcDbRenderingCache.d.ts +0 -141
- package/lib/misc/AcDbRenderingCache.d.ts.map +0 -1
- package/lib/misc/AcDbRenderingCache.js +0 -239
- package/lib/misc/AcDbRenderingCache.js.map +0 -1
- package/lib/misc/AcDbUnitsValue.d.ts +0 -101
- package/lib/misc/AcDbUnitsValue.d.ts.map +0 -1
- package/lib/misc/AcDbUnitsValue.js +0 -121
- package/lib/misc/AcDbUnitsValue.js.map +0 -1
- package/lib/misc/index.d.ts +0 -9
- package/lib/misc/index.d.ts.map +0 -1
- package/lib/misc/index.js +0 -9
- package/lib/misc/index.js.map +0 -1
- package/lib/object/AcDbDictionary.d.ts +0 -178
- package/lib/object/AcDbDictionary.d.ts.map +0 -1
- package/lib/object/AcDbDictionary.js +0 -264
- package/lib/object/AcDbDictionary.js.map +0 -1
- package/lib/object/AcDbRasterImageDef.d.ts +0 -54
- package/lib/object/AcDbRasterImageDef.d.ts.map +0 -1
- package/lib/object/AcDbRasterImageDef.js +0 -82
- package/lib/object/AcDbRasterImageDef.js.map +0 -1
- package/lib/object/index.d.ts +0 -4
- package/lib/object/index.d.ts.map +0 -1
- package/lib/object/index.js +0 -4
- package/lib/object/index.js.map +0 -1
- package/lib/object/layout/AcDbLayout.d.ts +0 -190
- package/lib/object/layout/AcDbLayout.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayout.js +0 -253
- package/lib/object/layout/AcDbLayout.js.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.d.ts +0 -47
- package/lib/object/layout/AcDbLayoutDictionary.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutDictionary.js +0 -122
- package/lib/object/layout/AcDbLayoutDictionary.js.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.d.ts +0 -188
- package/lib/object/layout/AcDbLayoutManager.d.ts.map +0 -1
- package/lib/object/layout/AcDbLayoutManager.js +0 -245
- package/lib/object/layout/AcDbLayoutManager.js.map +0 -1
- package/lib/object/layout/index.d.ts +0 -4
- package/lib/object/layout/index.d.ts.map +0 -1
- package/lib/object/layout/index.js +0 -4
- package/lib/object/layout/index.js.map +0 -1
|
@@ -1,295 +0,0 @@
|
|
|
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 { AcGiViewport } from '@mlightcad/graphic-interface';
|
|
18
|
-
import { AcDbEntity } from './AcDbEntity';
|
|
19
|
-
/**
|
|
20
|
-
* Represents a viewport entity in AutoCAD drawings.
|
|
21
|
-
*
|
|
22
|
-
* A viewport is a rectangular window that displays a portion of the drawing model space
|
|
23
|
-
* within paper space layouts. Viewports allow users to create multiple views of the same
|
|
24
|
-
* drawing at different scales and orientations on a single sheet.
|
|
25
|
-
*
|
|
26
|
-
* Key characteristics:
|
|
27
|
-
* - Viewports exist primarily in paper space layouts
|
|
28
|
-
* - Each viewport has a unique ID number (except the default system viewport with ID 1)
|
|
29
|
-
* - Viewports can be active or inactive
|
|
30
|
-
* - The viewport entity itself is drawn as a rectangular border in paper space
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* const viewport = new AcDbViewport();
|
|
35
|
-
* viewport.centerPoint = new AcGePoint3d(0, 0, 0);
|
|
36
|
-
* viewport.width = 10;
|
|
37
|
-
* viewport.height = 8;
|
|
38
|
-
* viewport.number = 2;
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
var AcDbViewport = /** @class */ (function (_super) {
|
|
42
|
-
__extends(AcDbViewport, _super);
|
|
43
|
-
/**
|
|
44
|
-
* Creates a new AcDbViewport instance.
|
|
45
|
-
*
|
|
46
|
-
* Initializes all properties with default values:
|
|
47
|
-
* - centerPoint: origin (0,0,0)
|
|
48
|
-
* - height: 0
|
|
49
|
-
* - width: 0
|
|
50
|
-
* - viewCenter: origin (0,0,0)
|
|
51
|
-
* - viewHeight: 0
|
|
52
|
-
* - number: -1 (indicating inactive viewport)
|
|
53
|
-
*/
|
|
54
|
-
function AcDbViewport() {
|
|
55
|
-
var _this = _super.call(this) || this;
|
|
56
|
-
_this._centerPoint = new AcGePoint3d();
|
|
57
|
-
_this._height = 0;
|
|
58
|
-
_this._width = 0;
|
|
59
|
-
_this._viewCenter = new AcGePoint3d();
|
|
60
|
-
_this._viewHeight = 0;
|
|
61
|
-
_this._number = -1;
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
Object.defineProperty(AcDbViewport.prototype, "number", {
|
|
65
|
-
/**
|
|
66
|
-
* Gets or sets the viewport ID number.
|
|
67
|
-
*
|
|
68
|
-
* This is the number that is reported by the AutoCAD CVPORT system variable
|
|
69
|
-
* when the viewport is the current viewport in the AutoCAD editor. If the viewport is inactive, -1
|
|
70
|
-
* is returned.
|
|
71
|
-
*
|
|
72
|
-
* Important notes:
|
|
73
|
-
* - This value is not saved with the drawing, and changes each time the drawing is opened
|
|
74
|
-
* - Viewport ID 1 is reserved for the system-defined default viewport in paper space
|
|
75
|
-
* - Active viewports have IDs greater than 1
|
|
76
|
-
* - Inactive viewports return -1
|
|
77
|
-
*
|
|
78
|
-
* @returns The viewport ID number
|
|
79
|
-
*/
|
|
80
|
-
get: function () {
|
|
81
|
-
return this._number;
|
|
82
|
-
},
|
|
83
|
-
set: function (value) {
|
|
84
|
-
this._number = value;
|
|
85
|
-
},
|
|
86
|
-
enumerable: false,
|
|
87
|
-
configurable: true
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(AcDbViewport.prototype, "centerPoint", {
|
|
90
|
-
/**
|
|
91
|
-
* Gets or sets the center point of the viewport entity in WCS coordinates (within Paper Space).
|
|
92
|
-
*
|
|
93
|
-
* This point represents the geometric center of the viewport's rectangular boundary
|
|
94
|
-
* in paper space coordinates, not the center of the model space view within the viewport.
|
|
95
|
-
*
|
|
96
|
-
* @returns The center point of the viewport entity
|
|
97
|
-
*/
|
|
98
|
-
get: function () {
|
|
99
|
-
return this._centerPoint;
|
|
100
|
-
},
|
|
101
|
-
set: function (value) {
|
|
102
|
-
this._centerPoint = value;
|
|
103
|
-
},
|
|
104
|
-
enumerable: false,
|
|
105
|
-
configurable: true
|
|
106
|
-
});
|
|
107
|
-
Object.defineProperty(AcDbViewport.prototype, "height", {
|
|
108
|
-
/**
|
|
109
|
-
* Gets or sets the height of the viewport entity's window in drawing units.
|
|
110
|
-
*
|
|
111
|
-
* This represents the height of the viewport's rectangular boundary in paper space,
|
|
112
|
-
* measured in the current drawing units. It defines the vertical extent of the
|
|
113
|
-
* viewport border, not the height of the model space view within it.
|
|
114
|
-
*
|
|
115
|
-
* @returns The height of the viewport entity in drawing units
|
|
116
|
-
*/
|
|
117
|
-
get: function () {
|
|
118
|
-
return this._height;
|
|
119
|
-
},
|
|
120
|
-
set: function (value) {
|
|
121
|
-
this._height = value;
|
|
122
|
-
},
|
|
123
|
-
enumerable: false,
|
|
124
|
-
configurable: true
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(AcDbViewport.prototype, "width", {
|
|
127
|
-
/**
|
|
128
|
-
* Gets or sets the width of the viewport entity's window in drawing units.
|
|
129
|
-
*
|
|
130
|
-
* This represents the width of the viewport's rectangular boundary in paper space,
|
|
131
|
-
* measured in the current drawing units. It defines the horizontal extent of the
|
|
132
|
-
* viewport border, not the width of the model space view within the viewport.
|
|
133
|
-
*
|
|
134
|
-
* Note: This is the width in Paper Space of the viewport itself, not the width
|
|
135
|
-
* of the Model Space view within the viewport.
|
|
136
|
-
*
|
|
137
|
-
* @returns The width of the viewport entity in drawing units
|
|
138
|
-
*/
|
|
139
|
-
get: function () {
|
|
140
|
-
return this._width;
|
|
141
|
-
},
|
|
142
|
-
set: function (value) {
|
|
143
|
-
this._width = value;
|
|
144
|
-
},
|
|
145
|
-
enumerable: false,
|
|
146
|
-
configurable: true
|
|
147
|
-
});
|
|
148
|
-
Object.defineProperty(AcDbViewport.prototype, "viewCenter", {
|
|
149
|
-
/**
|
|
150
|
-
* Gets or sets the view center in display coordinate system coordinates.
|
|
151
|
-
*
|
|
152
|
-
* This point represents the center of the model space view that is displayed
|
|
153
|
-
* within the viewport. It is specified in the display coordinate system and
|
|
154
|
-
* determines what portion of the model space drawing is visible in the viewport.
|
|
155
|
-
*
|
|
156
|
-
* @returns The center point of the model space view within the viewport
|
|
157
|
-
*/
|
|
158
|
-
get: function () {
|
|
159
|
-
return this._viewCenter;
|
|
160
|
-
},
|
|
161
|
-
set: function (value) {
|
|
162
|
-
this._viewCenter = value;
|
|
163
|
-
},
|
|
164
|
-
enumerable: false,
|
|
165
|
-
configurable: true
|
|
166
|
-
});
|
|
167
|
-
Object.defineProperty(AcDbViewport.prototype, "viewHeight", {
|
|
168
|
-
/**
|
|
169
|
-
* Gets or sets the height of the Model Space view within the viewport.
|
|
170
|
-
*
|
|
171
|
-
* This value represents the height of the model space view that is displayed
|
|
172
|
-
* within the viewport, specified in display coordinate system coordinates.
|
|
173
|
-
*
|
|
174
|
-
* Zoom behavior:
|
|
175
|
-
* - Zooming the view out within the viewport increases this value
|
|
176
|
-
* - Zooming the view in within the viewport decreases this value
|
|
177
|
-
*
|
|
178
|
-
* @returns The height of the model space view in display coordinates
|
|
179
|
-
*/
|
|
180
|
-
get: function () {
|
|
181
|
-
return this._viewHeight;
|
|
182
|
-
},
|
|
183
|
-
set: function (value) {
|
|
184
|
-
this._viewHeight = value;
|
|
185
|
-
},
|
|
186
|
-
enumerable: false,
|
|
187
|
-
configurable: true
|
|
188
|
-
});
|
|
189
|
-
Object.defineProperty(AcDbViewport.prototype, "geometricExtents", {
|
|
190
|
-
/**
|
|
191
|
-
* Gets the geometric extents of the viewport entity.
|
|
192
|
-
*
|
|
193
|
-
* This method returns a bounding box that encompasses the entire viewport entity
|
|
194
|
-
* in world coordinate system (WCS) coordinates.
|
|
195
|
-
*
|
|
196
|
-
* @returns A bounding box containing the viewport entity
|
|
197
|
-
* @inheritdoc
|
|
198
|
-
*/
|
|
199
|
-
get: function () {
|
|
200
|
-
// TODO: Implement it correctly
|
|
201
|
-
return new AcGeBox3d();
|
|
202
|
-
},
|
|
203
|
-
enumerable: false,
|
|
204
|
-
configurable: true
|
|
205
|
-
});
|
|
206
|
-
/**
|
|
207
|
-
* Renders the viewport entity using the specified renderer.
|
|
208
|
-
*
|
|
209
|
-
* The viewport is drawn as a rectangular border when the following conditions are met:
|
|
210
|
-
* - The viewport entity is not in model space (i.e., it's in paper space)
|
|
211
|
-
* - The viewport ID number is greater than 1 (not the default system viewport)
|
|
212
|
-
*
|
|
213
|
-
* In paper space layouts, there is always a system-defined "default" viewport that exists as
|
|
214
|
-
* the bottom-most item. This viewport doesn't show any entities and is mainly for internal
|
|
215
|
-
* AutoCAD purposes. The viewport ID number of this system-defined "default" viewport is 1.
|
|
216
|
-
*
|
|
217
|
-
* @param renderer - The renderer to use for drawing the viewport
|
|
218
|
-
* @returns A render group containing the viewport border lines, or undefined if not drawn
|
|
219
|
-
* @inheritdoc
|
|
220
|
-
*/
|
|
221
|
-
AcDbViewport.prototype.draw = function (renderer) {
|
|
222
|
-
// Draw a rectangle if meeting the following conditions:
|
|
223
|
-
// - viewport entity isn't in model space
|
|
224
|
-
// - viewport id number is greater than 1
|
|
225
|
-
//
|
|
226
|
-
// In paper space layouts, there is always a system-defined "default" viewport that exists as
|
|
227
|
-
// the bottom-most item. This viewport doesn't show any entities and is mainly for internal
|
|
228
|
-
// AutoCAD purposes. The viewport id number of this system-defined "default" viewport is 1.
|
|
229
|
-
if (this._number > 1 &&
|
|
230
|
-
this.ownerId != this.database.tables.blockTable.modelSpace.objectId) {
|
|
231
|
-
var viewport = this.toGiViewport();
|
|
232
|
-
var group = renderer.group(this.createViewportRect(viewport, renderer));
|
|
233
|
-
this.attachEntityInfo(group);
|
|
234
|
-
return group;
|
|
235
|
-
}
|
|
236
|
-
return undefined;
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* Converts this AcDbViewport to an AcGiViewport for rendering purposes.
|
|
240
|
-
*
|
|
241
|
-
* This method creates a graphic interface viewport object that contains all the
|
|
242
|
-
* necessary properties for rendering the viewport in the graphics system.
|
|
243
|
-
*
|
|
244
|
-
* @returns An AcGiViewport instance with all viewport properties copied
|
|
245
|
-
*/
|
|
246
|
-
AcDbViewport.prototype.toGiViewport = function () {
|
|
247
|
-
var viewport = new AcGiViewport();
|
|
248
|
-
viewport.id = this.objectId;
|
|
249
|
-
viewport.groupId = this.ownerId;
|
|
250
|
-
viewport.number = this.number;
|
|
251
|
-
viewport.centerPoint = this.centerPoint;
|
|
252
|
-
viewport.width = this.width;
|
|
253
|
-
viewport.height = this.height;
|
|
254
|
-
viewport.viewHeight = this.viewHeight;
|
|
255
|
-
viewport.viewCenter = this.viewCenter;
|
|
256
|
-
return viewport;
|
|
257
|
-
};
|
|
258
|
-
/**
|
|
259
|
-
* Creates the rectangular border lines for the viewport.
|
|
260
|
-
*
|
|
261
|
-
* This private method generates four line entities that form a rectangle representing
|
|
262
|
-
* the viewport's boundary. The rectangle is centered on the viewport's center point
|
|
263
|
-
* and has dimensions specified by the viewport's width and height.
|
|
264
|
-
*
|
|
265
|
-
* @param viewport - The graphic interface viewport containing rendering properties
|
|
266
|
-
* @param renderer - The renderer to use for creating the line entities
|
|
267
|
-
* @returns An array of line entities forming the viewport border
|
|
268
|
-
* @private
|
|
269
|
-
*/
|
|
270
|
-
AcDbViewport.prototype.createViewportRect = function (viewport, renderer) {
|
|
271
|
-
var lines = [];
|
|
272
|
-
lines.push(renderer.lines([
|
|
273
|
-
new AcGePoint3d(viewport.centerPoint.x - viewport.width / 2, viewport.centerPoint.y - viewport.height / 2, 0),
|
|
274
|
-
new AcGePoint3d(viewport.centerPoint.x + viewport.width / 2, viewport.centerPoint.y - viewport.height / 2, 0)
|
|
275
|
-
], this.lineStyle));
|
|
276
|
-
lines.push(renderer.lines([
|
|
277
|
-
new AcGePoint3d(viewport.centerPoint.x + viewport.width / 2, viewport.centerPoint.y - viewport.height / 2, 0),
|
|
278
|
-
new AcGePoint3d(viewport.centerPoint.x + viewport.width / 2, viewport.centerPoint.y + viewport.height / 2, 0)
|
|
279
|
-
], this.lineStyle));
|
|
280
|
-
lines.push(renderer.lines([
|
|
281
|
-
new AcGePoint3d(viewport.centerPoint.x + viewport.width / 2, viewport.centerPoint.y + viewport.height / 2, 0),
|
|
282
|
-
new AcGePoint3d(viewport.centerPoint.x - viewport.width / 2, viewport.centerPoint.y + viewport.height / 2, 0)
|
|
283
|
-
], this.lineStyle));
|
|
284
|
-
lines.push(renderer.lines([
|
|
285
|
-
new AcGePoint3d(viewport.centerPoint.x - viewport.width / 2, viewport.centerPoint.y + viewport.height / 2, 0),
|
|
286
|
-
new AcGePoint3d(viewport.centerPoint.x - viewport.width / 2, viewport.centerPoint.y - viewport.height / 2, 0)
|
|
287
|
-
], this.lineStyle));
|
|
288
|
-
return lines;
|
|
289
|
-
};
|
|
290
|
-
/** The entity type name */
|
|
291
|
-
AcDbViewport.typeName = 'Viewport';
|
|
292
|
-
return AcDbViewport;
|
|
293
|
-
}(AcDbEntity));
|
|
294
|
-
export { AcDbViewport };
|
|
295
|
-
//# sourceMappingURL=AcDbViewport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbViewport.js","sourceR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SAAS,CACf,CACF,CAAA;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAnSD,2BAA2B;IACX,qBAAQ,GAAW,UAAU,CAAA;IAmS/C,mBAAC;CAAA,AArSD,CAAkC,UAAU,GAqS3C;SArSY,YAAY"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
2
|
-
import { AcDbRasterImage } from './AcDbRasterImage';
|
|
3
|
-
/**
|
|
4
|
-
* Entity that creates a blank area in the drawing.
|
|
5
|
-
*
|
|
6
|
-
* The AcDbWipeout entity creates a blank area that covers other entities
|
|
7
|
-
* in the drawing. It's commonly used to hide parts of the drawing or
|
|
8
|
-
* create clean areas for annotations. The wipeout area is defined by
|
|
9
|
-
* a boundary path and is rendered as a solid black fill.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const wipeout = new AcDbWipeout();
|
|
14
|
-
* // Set up boundary path and other properties
|
|
15
|
-
* wipeout.draw(renderer);
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare class AcDbWipeout extends AcDbRasterImage {
|
|
19
|
-
/** The entity type name */
|
|
20
|
-
static typeName: string;
|
|
21
|
-
/**
|
|
22
|
-
* Draws the wipeout entity.
|
|
23
|
-
*
|
|
24
|
-
* This method creates a solid black area based on the boundary path
|
|
25
|
-
* of the wipeout entity. The area covers all entities behind it,
|
|
26
|
-
* effectively "wiping out" that portion of the drawing.
|
|
27
|
-
*
|
|
28
|
-
* @param renderer - The renderer to use for drawing
|
|
29
|
-
* @returns The rendered entity or undefined if rendering fails
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const wipeout = new AcDbWipeout();
|
|
34
|
-
* const renderedEntity = wipeout.draw(renderer);
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=AcDbWipeout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbWipeout.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbWipeout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,WAAY,SAAQ,eAAe;IAC9C,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAY;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAW5B"}
|
|
@@ -1,70 +0,0 @@
|
|
|
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 { AcGeArea2d, AcGePolyline2d } from '@mlightcad/geometry-engine';
|
|
17
|
-
import { AcDbRasterImage } from './AcDbRasterImage';
|
|
18
|
-
/**
|
|
19
|
-
* Entity that creates a blank area in the drawing.
|
|
20
|
-
*
|
|
21
|
-
* The AcDbWipeout entity creates a blank area that covers other entities
|
|
22
|
-
* in the drawing. It's commonly used to hide parts of the drawing or
|
|
23
|
-
* create clean areas for annotations. The wipeout area is defined by
|
|
24
|
-
* a boundary path and is rendered as a solid black fill.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```typescript
|
|
28
|
-
* const wipeout = new AcDbWipeout();
|
|
29
|
-
* // Set up boundary path and other properties
|
|
30
|
-
* wipeout.draw(renderer);
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
var AcDbWipeout = /** @class */ (function (_super) {
|
|
34
|
-
__extends(AcDbWipeout, _super);
|
|
35
|
-
function AcDbWipeout() {
|
|
36
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Draws the wipeout entity.
|
|
40
|
-
*
|
|
41
|
-
* This method creates a solid black area based on the boundary path
|
|
42
|
-
* of the wipeout entity. The area covers all entities behind it,
|
|
43
|
-
* effectively "wiping out" that portion of the drawing.
|
|
44
|
-
*
|
|
45
|
-
* @param renderer - The renderer to use for drawing
|
|
46
|
-
* @returns The rendered entity or undefined if rendering fails
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const wipeout = new AcDbWipeout();
|
|
51
|
-
* const renderedEntity = wipeout.draw(renderer);
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
AcDbWipeout.prototype.draw = function (renderer) {
|
|
55
|
-
var points = this.boundaryPath();
|
|
56
|
-
var area = new AcGeArea2d();
|
|
57
|
-
area.add(new AcGePolyline2d(points));
|
|
58
|
-
return renderer.area(area, {
|
|
59
|
-
color: 0x000000,
|
|
60
|
-
solidFill: true,
|
|
61
|
-
patternAngle: 0,
|
|
62
|
-
patternLines: []
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
/** The entity type name */
|
|
66
|
-
AcDbWipeout.typeName = 'Wipeout';
|
|
67
|
-
return AcDbWipeout;
|
|
68
|
-
}(AcDbRasterImage));
|
|
69
|
-
export { AcDbWipeout };
|
|
70
|
-
//# sourceMappingURL=AcDbWipeout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbWipeout.js","sourceRoot":"","sources":["../../src/entity/AcDbWipeout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAGvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH;IAAiC,+BAAe;IAAhD;;IA8BA,CAAC;IA3BC;;;;;;;;;;;;;;;OAeG;IACH,0BAAI,GAAJ,UAAK,QAAsB;QACzB,IAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAA;QAClC,IAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAA;QAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;QACpC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE;YACzB,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,EAAE;SACjB,CAAC,CAAA;IACJ,CAAC;IA5BD,2BAA2B;IACX,oBAAQ,GAAW,SAAS,CAAA;IA4B9C,kBAAC;CAAA,AA9BD,CAAiC,eAAe,GA8B/C;SA9BY,WAAW"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { AcGeBox3d, AcGePoint3d } from '@mlightcad/geometry-engine';
|
|
2
|
-
import { AcGiRenderer } from '@mlightcad/graphic-interface';
|
|
3
|
-
import { AcDbCurve } from './AcDbCurve';
|
|
4
|
-
/**
|
|
5
|
-
* Represents an xline entity in AutoCAD.
|
|
6
|
-
*
|
|
7
|
-
* An xline is a 3D geometric object that extends infinitely in both directions from a base point.
|
|
8
|
-
* Xlines are commonly used for construction lines, reference lines, and temporary geometry.
|
|
9
|
-
* Unlike lines, xlines have no end points and extend to infinity in both directions.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* // Create an xline from origin in the positive X direction
|
|
14
|
-
* const xline = new AcDbXline();
|
|
15
|
-
* xline.basePoint = new AcGePoint3d(0, 0, 0);
|
|
16
|
-
* xline.unitDir = new AcGeVector3d(1, 0, 0);
|
|
17
|
-
*
|
|
18
|
-
* // Access xline properties
|
|
19
|
-
* console.log(`Base point: ${xline.basePoint}`);
|
|
20
|
-
* console.log(`Unit direction: ${xline.unitDir}`);
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare class AcDbXline extends AcDbCurve {
|
|
24
|
-
/** The entity type name */
|
|
25
|
-
static typeName: string;
|
|
26
|
-
/** The base point of the xline */
|
|
27
|
-
private _basePoint;
|
|
28
|
-
/** The unit direction vector of the xline */
|
|
29
|
-
private _unitDir;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new xline entity.
|
|
32
|
-
*
|
|
33
|
-
* This constructor initializes an xline with default values.
|
|
34
|
-
* The base point is at the origin and the unit direction is undefined.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const xline = new AcDbXline();
|
|
39
|
-
* xline.basePoint = new AcGePoint3d(5, 10, 0);
|
|
40
|
-
* xline.unitDir = new AcGeVector3d(0, 1, 0); // Positive Y direction
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
constructor();
|
|
44
|
-
/**
|
|
45
|
-
* Gets the base point of this xline.
|
|
46
|
-
*
|
|
47
|
-
* The base point is the center point from which the xline extends infinitely
|
|
48
|
-
* in both directions.
|
|
49
|
-
*
|
|
50
|
-
* @returns The base point as a 3D point
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```typescript
|
|
54
|
-
* const basePoint = xline.basePoint;
|
|
55
|
-
* console.log(`Xline base point: ${basePoint.x}, ${basePoint.y}, ${basePoint.z}`);
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
get basePoint(): AcGePoint3d;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the base point of this xline.
|
|
61
|
-
*
|
|
62
|
-
* @param value - The new base point
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```typescript
|
|
66
|
-
* xline.basePoint = new AcGePoint3d(10, 20, 0);
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
set basePoint(value: AcGePoint3d);
|
|
70
|
-
/**
|
|
71
|
-
* Gets the unit direction vector of this xline.
|
|
72
|
-
*
|
|
73
|
-
* The unit direction vector defines the direction in which the xline extends
|
|
74
|
-
* infinitely in both directions from the base point.
|
|
75
|
-
*
|
|
76
|
-
* @returns The unit direction vector
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```typescript
|
|
80
|
-
* const unitDir = xline.unitDir;
|
|
81
|
-
* console.log(`Xline direction: ${unitDir.x}, ${unitDir.y}, ${unitDir.z}`);
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
get unitDir(): AcGePoint3d;
|
|
85
|
-
/**
|
|
86
|
-
* Sets the unit direction vector of this xline.
|
|
87
|
-
*
|
|
88
|
-
* @param value - The new unit direction vector
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* xline.unitDir = new AcGeVector3d(0, 0, 1); // Positive Z direction
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
set unitDir(value: AcGePoint3d);
|
|
96
|
-
/**
|
|
97
|
-
* Gets whether this xline is closed.
|
|
98
|
-
*
|
|
99
|
-
* Xlines are always open entities, so this always returns false.
|
|
100
|
-
*
|
|
101
|
-
* @returns Always false for xlines
|
|
102
|
-
*/
|
|
103
|
-
get closed(): boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Gets the geometric extents (bounding box) of this xline.
|
|
106
|
-
*
|
|
107
|
-
* Since xlines extend infinitely in both directions, this method returns a
|
|
108
|
-
* bounding box that encompasses a finite portion of the xline for practical purposes.
|
|
109
|
-
*
|
|
110
|
-
* @returns The bounding box that encompasses a portion of the xline
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```typescript
|
|
114
|
-
* const extents = xline.geometricExtents;
|
|
115
|
-
* console.log(`Xline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
get geometricExtents(): AcGeBox3d;
|
|
119
|
-
/**
|
|
120
|
-
* Gets the grip points for this xline.
|
|
121
|
-
*
|
|
122
|
-
* Grip points are control points that can be used to modify the xline.
|
|
123
|
-
* For an xline, the grip point is the base point.
|
|
124
|
-
*
|
|
125
|
-
* @returns Array of grip points (base point)
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```typescript
|
|
129
|
-
* const gripPoints = xline.subGetGripPoints();
|
|
130
|
-
* // gripPoints contains: [basePoint]
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
subGetGripPoints(): AcGePoint3d[];
|
|
134
|
-
/**
|
|
135
|
-
* Draws this xline using the specified renderer.
|
|
136
|
-
*
|
|
137
|
-
* This method renders the xline as a line segment extending from the base point
|
|
138
|
-
* in both directions along the unit vector. For practical purposes, the xline is
|
|
139
|
-
* drawn with a finite length.
|
|
140
|
-
*
|
|
141
|
-
* @param renderer - The renderer to use for drawing
|
|
142
|
-
* @returns The rendered xline entity, or undefined if drawing failed
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* ```typescript
|
|
146
|
-
* const renderedXline = xline.draw(renderer);
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=AcDbXline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbXline.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbXline.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,2BAA2B;IAC3B,OAAgB,QAAQ,EAAE,MAAM,CAAU;IAE1C,kCAAkC;IAClC,OAAO,CAAC,UAAU,CAAa;IAC/B,6CAA6C;IAC7C,OAAO,CAAC,QAAQ,CAAc;IAE9B;;;;;;;;;;;;OAYG;;IAOH;;;;;;;;;;;;;OAaG;IACH,IAAI,SAAS,IAcQ,WAAW,CAZ/B;IAED;;;;;;;;;OASG;IACH,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,EAE/B;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,OAAO,IAcQ,WAAW,CAZ7B;IAED;;;;;;;;;OASG;IACH,IAAI,OAAO,CAAC,KAAK,EAAE,WAAW,EAE7B;IAED;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,gBAAgB,IAAI,SAAS,CAShC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAAgB;IAMhB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,QAAQ,EAAE,YAAY;CAU5B"}
|