@mlightcad/libredwg-web 0.7.14 → 0.7.15

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.
@@ -1357,6 +1357,8 @@ class LibreEntityConverter {
1357
1357
  return this.convertShape(entity_tio, commonAttrs);
1358
1358
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SOLID) {
1359
1359
  return this.convertSolid(entity_tio, commonAttrs);
1360
+ } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_TRACE) {
1361
+ return this.convertTrace(entity_tio, commonAttrs);
1360
1362
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SPLINE) {
1361
1363
  return this.convertSpline(entity_tio, commonAttrs);
1362
1364
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_TABLE) {
@@ -2988,6 +2990,13 @@ class LibreEntityConverter {
2988
2990
  extrusionDirection
2989
2991
  };
2990
2992
  }
2993
+ convertTrace(entity, commonAttrs) {
2994
+ const solid = this.convertSolid(entity, commonAttrs);
2995
+ return {
2996
+ ...solid,
2997
+ type: "TRACE"
2998
+ };
2999
+ }
2991
3000
  convertSpline(entity, commonAttrs) {
2992
3001
  const libredwg = this.libredwg;
2993
3002
  const flag = libredwg.dwg_dynapi_entity_data(entity, "splineflags");
@@ -1359,6 +1359,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1359
1359
  return this.convertShape(entity_tio, commonAttrs);
1360
1360
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SOLID) {
1361
1361
  return this.convertSolid(entity_tio, commonAttrs);
1362
+ } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_TRACE) {
1363
+ return this.convertTrace(entity_tio, commonAttrs);
1362
1364
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SPLINE) {
1363
1365
  return this.convertSpline(entity_tio, commonAttrs);
1364
1366
  } else if (fixedtype == Dwg_Object_Type.DWG_TYPE_TABLE) {
@@ -2990,6 +2992,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2990
2992
  extrusionDirection
2991
2993
  };
2992
2994
  }
2995
+ convertTrace(entity, commonAttrs) {
2996
+ const solid = this.convertSolid(entity, commonAttrs);
2997
+ return {
2998
+ ...solid,
2999
+ type: "TRACE"
3000
+ };
3001
+ }
2993
3002
  convertSpline(entity, commonAttrs) {
2994
3003
  const libredwg = this.libredwg;
2995
3004
  const flag = libredwg.dwg_dynapi_entity_data(entity, "splineflags");
@@ -48,6 +48,7 @@ export declare class LibreEntityConverter {
48
48
  private convertSection;
49
49
  private convertShape;
50
50
  private convertSolid;
51
+ private convertTrace;
51
52
  private convertSpline;
52
53
  private convertTable;
53
54
  private convertTableCells;
@@ -147,6 +147,9 @@ export class LibreEntityConverter {
147
147
  else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SOLID) {
148
148
  return this.convertSolid(entity_tio, commonAttrs);
149
149
  }
150
+ else if (fixedtype == Dwg_Object_Type.DWG_TYPE_TRACE) {
151
+ return this.convertTrace(entity_tio, commonAttrs);
152
+ }
150
153
  else if (fixedtype == Dwg_Object_Type.DWG_TYPE_SPLINE) {
151
154
  return this.convertSpline(entity_tio, commonAttrs);
152
155
  }
@@ -1607,6 +1610,13 @@ export class LibreEntityConverter {
1607
1610
  extrusionDirection: extrusionDirection
1608
1611
  };
1609
1612
  }
1613
+ convertTrace(entity, commonAttrs) {
1614
+ const solid = this.convertSolid(entity, commonAttrs);
1615
+ return {
1616
+ ...solid,
1617
+ type: 'TRACE'
1618
+ };
1619
+ }
1610
1620
  convertSpline(entity, commonAttrs) {
1611
1621
  const libredwg = this.libredwg;
1612
1622
  const flag = libredwg.dwg_dynapi_entity_data(entity, 'splineflags');
@@ -30,6 +30,7 @@ export * from './spline';
30
30
  export * from './table';
31
31
  export * from './text';
32
32
  export * from './tolerance';
33
+ export * from './trace';
33
34
  export * from './vertex';
34
35
  export * from './viewport';
35
36
  export * from './wipeout';
@@ -30,6 +30,7 @@ export * from './spline';
30
30
  export * from './table';
31
31
  export * from './text';
32
32
  export * from './tolerance';
33
+ export * from './trace';
33
34
  export * from './vertex';
34
35
  export * from './viewport';
35
36
  export * from './wipeout';
@@ -0,0 +1,34 @@
1
+ import { DwgPoint2D, DwgPoint3D } from '../common';
2
+ import { DwgEntity } from './entity';
3
+ export interface DwgTraceEntity extends DwgEntity {
4
+ /**
5
+ * Entity type
6
+ */
7
+ type: 'TRACE';
8
+ /**
9
+ * Corner1
10
+ */
11
+ corner1: DwgPoint2D;
12
+ /**
13
+ * Corner2
14
+ */
15
+ corner2: DwgPoint2D;
16
+ /**
17
+ * Corner3
18
+ */
19
+ corner3: DwgPoint2D;
20
+ /**
21
+ * Corner4. If only three corners are entered to define the TRACE,
22
+ * then the fourth corner coordinate is the same as the third.
23
+ */
24
+ corner4?: DwgPoint2D;
25
+ /**
26
+ * Thickness (optional; default = 0)
27
+ */
28
+ thickness: number;
29
+ /**
30
+ * Extrusion direction (optional; default = 0, 0, 1)
31
+ */
32
+ extrusionDirection: DwgPoint3D;
33
+ }
34
+ //# sourceMappingURL=trace.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=trace.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A DWG/DXF JavaScript parser based on libredwg",
4
4
  "license": "GPL-3.0",
5
5
  "private": false,
6
- "version": "0.7.14",
6
+ "version": "0.7.15",
7
7
  "author": "MLight Lee <mlight.lee@outlook.com>",
8
8
  "type": "module",
9
9
  "engines": {