mxcad 1.0.141 → 1.0.142

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/mxcad.d.ts CHANGED
@@ -118,6 +118,7 @@ export declare class McGeVector3d {
118
118
  * @param dZ Z 坐标。
119
119
  */
120
120
  constructor(dX?: number | object, dY?: number, dZ?: number);
121
+ toVector3(): THREE.Vector3;
121
122
  /**
122
123
  * 复制对象的值
123
124
  */
@@ -289,6 +290,10 @@ export declare class McGeLongArray {
289
290
  */
290
291
  setAt(index: number, val: number): void;
291
292
  clear(): void;
293
+ /**
294
+ * 遍历数组
295
+ */
296
+ forEach(call: (val: number, index: number) => void): void;
292
297
  }
293
298
  /**
294
299
  * 表示字符串的数组
@@ -359,6 +364,10 @@ export declare class McGePoint3dArray {
359
364
  */
360
365
  setAt(index: number, val: McGePoint3d): void;
361
366
  clear(): void;
367
+ /**
368
+ * 遍历数组
369
+ */
370
+ forEach(call: (val: McGePoint3d, index: number) => void): void;
362
371
  }
363
372
  /**
364
373
  * 整数数组
@@ -390,6 +399,10 @@ export declare class MdGeDoubleArray {
390
399
  */
391
400
  setAt(index: number, val: number): void;
392
401
  clear(): void;
402
+ /**
403
+ * 遍历数组
404
+ */
405
+ forEach(call: (val: number, index: number) => void): void;
393
406
  }
394
407
  /**
395
408
  * 表示一个 Rx 对象的基类。
@@ -518,6 +531,7 @@ export declare class McObjectId {
518
531
  * 返回MxDraw对象。
519
532
  */
520
533
  getMxDbEntity(): MxDbEntity | null;
534
+ getMcDbRasterImageDef(): McDbRasterImageDef | null;
521
535
  }
522
536
  /**
523
537
  * 表示一个数据库对象。
@@ -1735,9 +1749,9 @@ export declare class McDbBlockReference extends McDbEntity {
1735
1749
  */
1736
1750
  appendAttribute(attrib: McDbAttribute): McObjectId;
1737
1751
  /**
1738
- * 得到块引用的所有属性文字对象id
1739
- * @returns 块名
1740
- */
1752
+ * 得到块引用的所有属性文字对象id
1753
+ * @returns 块名
1754
+ */
1741
1755
  getAllAttribute(): McObjectId[];
1742
1756
  /**
1743
1757
  * 通过块表记录中的属性定义创建属性文字对象
@@ -2216,6 +2230,27 @@ export declare class McDbProxyEntity extends McDbEntity {
2216
2230
  getAllEntityIds(): McObjectId[];
2217
2231
  getOriginalClassName(): string;
2218
2232
  }
2233
+ /**
2234
+ * McDbRasterImage
2235
+ */
2236
+ export declare class McDbRasterImage extends McDbEntity {
2237
+ /**
2238
+ * 构造函数。
2239
+ * @param imp 内部对象。
2240
+ */
2241
+ constructor(x?: object);
2242
+ setOrientation(origin: McGePoint3d, uCorner: McGeVector3d, vOnPlane: McGeVector3d): boolean;
2243
+ getOrientation(): {
2244
+ origin: McGePoint3d;
2245
+ uCorner: McGeVector3d;
2246
+ vOnPlane: McGeVector3d;
2247
+ };
2248
+ setImageDefId(imageId: McObjectId): void;
2249
+ imageDefId(): McObjectId;
2250
+ setClipBoundary(type: McDb.ClipBoundaryType, aryPoint: McGePoint3dArray): boolean;
2251
+ clipBoundary(): McGePoint3dArray;
2252
+ clipBoundaryType(): McDb.ClipBoundaryType;
2253
+ }
2219
2254
  /**
2220
2255
  * McDb 命名空间包含 AutoCAD 中的一些常用枚举。
2221
2256
  * @public
@@ -2361,6 +2396,11 @@ export declare namespace McDb {
2361
2396
  kOuter = 1,
2362
2397
  kIgnore = 2
2363
2398
  }
2399
+ enum ClipBoundaryType {
2400
+ kInvalid = 0,
2401
+ kRect = 1,
2402
+ kPoly = 2
2403
+ }
2364
2404
  }
2365
2405
  /**
2366
2406
  * 表示一个颜色对象,可以通过颜色索引或 RGB 值来设置颜色。
@@ -2738,6 +2778,11 @@ export declare class McDbBlockTable extends McDbObject {
2738
2778
  get(sName: string, skipDeleted?: boolean): McObjectId;
2739
2779
  has(sName: string): boolean;
2740
2780
  }
2781
+ export declare class McDbRasterImageDef extends McDbObject {
2782
+ constructor(imp?: any);
2783
+ set sourceFileName(sPathName: string);
2784
+ get sourceFileName(): string;
2785
+ }
2741
2786
  export declare enum FetchAttributes {
2742
2787
  EMSCRIPTEN_FETCH_LOAD_TO_MEMORY = 1,
2743
2788
  EMSCRIPTEN_FETCH_PERSIST_FILE = 4,
@@ -3316,6 +3361,12 @@ export declare class McObject {
3316
3361
  */
3317
3362
  drawEntity(entity: McDbEntity): McObjectId;
3318
3363
  /**
3364
+ * 绘制填充对象
3365
+ * @param entity - 填充对象对象
3366
+ * @returns 绘制对象id
3367
+ */
3368
+ drawHatch(hatch: McDbHatch, dPatternScale?: number): McObjectId;
3369
+ /**
3319
3370
  * 将 lIdIndex 转换成 McDbObject 对象
3320
3371
  * @param lIdIndex - 对象 ID
3321
3372
  * @returns 与 ID 对应的 McDbObject 对象,如果对象不存在则返回 null