@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.
- package/dist/libredwg-web.js +9 -0
- package/dist/libredwg-web.umd.cjs +9 -0
- package/lib/converter/entityConverter.d.ts +1 -0
- package/lib/converter/entityConverter.js +10 -0
- package/lib/database/entities/index.d.ts +1 -0
- package/lib/database/entities/index.js +1 -0
- package/lib/database/entities/trace.d.ts +34 -0
- package/lib/database/entities/trace.js +2 -0
- package/package.json +1 -1
package/dist/libredwg-web.js
CHANGED
|
@@ -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");
|
|
@@ -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');
|
|
@@ -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
|
package/package.json
CHANGED