@linkiez/dxf-renew 7.2.0 → 7.2.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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +18 -0
- package/build.mjs +28 -0
- package/lib/Helper.d.ts +19 -0
- package/lib/Helper.d.ts.map +1 -0
- package/lib/applyTransforms.d.ts +12 -0
- package/lib/applyTransforms.d.ts.map +1 -0
- package/lib/cli.cjs +1 -2
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.d.ts +3 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/config.d.ts +4 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/constants.d.ts +3 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/denormalise.d.ts +3 -0
- package/lib/denormalise.d.ts.map +1 -0
- package/lib/dimensionToSVG.d.ts +18 -0
- package/lib/dimensionToSVG.d.ts.map +1 -0
- package/lib/entityToPolyline.d.ts +48 -0
- package/lib/entityToPolyline.d.ts.map +1 -0
- package/lib/getRGBForEntity.d.ts +5 -0
- package/lib/getRGBForEntity.d.ts.map +1 -0
- package/lib/groupEntitiesByLayer.d.ts +3 -0
- package/lib/groupEntitiesByLayer.d.ts.map +1 -0
- package/lib/handlers/blocks.d.ts +3 -0
- package/lib/handlers/blocks.d.ts.map +1 -0
- package/lib/handlers/entities.d.ts +4 -0
- package/lib/handlers/entities.d.ts.map +1 -0
- package/lib/handlers/entity/arc.d.ts +20 -0
- package/lib/handlers/entity/arc.d.ts.map +1 -0
- package/lib/handlers/entity/attdef.d.ts +11 -0
- package/lib/handlers/entity/attdef.d.ts.map +1 -0
- package/lib/handlers/entity/attrib.d.ts +9 -0
- package/lib/handlers/entity/attrib.d.ts.map +1 -0
- package/lib/handlers/entity/circle.d.ts +17 -0
- package/lib/handlers/entity/circle.d.ts.map +1 -0
- package/lib/handlers/entity/common.d.ts +3 -0
- package/lib/handlers/entity/common.d.ts.map +1 -0
- package/lib/handlers/entity/dgnUnderlay.d.ts +33 -0
- package/lib/handlers/entity/dgnUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/dimension.d.ts +35 -0
- package/lib/handlers/entity/dimension.d.ts.map +1 -0
- package/lib/handlers/entity/dwfUnderlay.d.ts +33 -0
- package/lib/handlers/entity/dwfUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/ellipse.d.ts +10 -0
- package/lib/handlers/entity/ellipse.d.ts.map +1 -0
- package/lib/handlers/entity/hatch.d.ts +9 -0
- package/lib/handlers/entity/hatch.d.ts.map +1 -0
- package/lib/handlers/entity/image.d.ts +26 -0
- package/lib/handlers/entity/image.d.ts.map +1 -0
- package/lib/handlers/entity/insert.d.ts +10 -0
- package/lib/handlers/entity/insert.d.ts.map +1 -0
- package/lib/handlers/entity/leader.d.ts +48 -0
- package/lib/handlers/entity/leader.d.ts.map +1 -0
- package/lib/handlers/entity/line.d.ts +16 -0
- package/lib/handlers/entity/line.d.ts.map +1 -0
- package/lib/handlers/entity/lwpolyline.d.ts +10 -0
- package/lib/handlers/entity/lwpolyline.d.ts.map +1 -0
- package/lib/handlers/entity/mleader.d.ts +15 -0
- package/lib/handlers/entity/mleader.d.ts.map +1 -0
- package/lib/handlers/entity/mline.d.ts +17 -0
- package/lib/handlers/entity/mline.d.ts.map +1 -0
- package/lib/handlers/entity/mtext.d.ts +62 -0
- package/lib/handlers/entity/mtext.d.ts.map +1 -0
- package/lib/handlers/entity/ole2Frame.d.ts +9 -0
- package/lib/handlers/entity/ole2Frame.d.ts.map +1 -0
- package/lib/handlers/entity/oleframe.d.ts +9 -0
- package/lib/handlers/entity/oleframe.d.ts.map +1 -0
- package/lib/handlers/entity/pdfUnderlay.d.ts +33 -0
- package/lib/handlers/entity/pdfUnderlay.d.ts.map +1 -0
- package/lib/handlers/entity/point.d.ts +17 -0
- package/lib/handlers/entity/point.d.ts.map +1 -0
- package/lib/handlers/entity/polyline.d.ts +21 -0
- package/lib/handlers/entity/polyline.d.ts.map +1 -0
- package/lib/handlers/entity/ray.d.ts +15 -0
- package/lib/handlers/entity/ray.d.ts.map +1 -0
- package/lib/handlers/entity/region.d.ts +14 -0
- package/lib/handlers/entity/region.d.ts.map +1 -0
- package/lib/handlers/entity/shape.d.ts +22 -0
- package/lib/handlers/entity/shape.d.ts.map +1 -0
- package/lib/handlers/entity/solid.d.ts +15 -0
- package/lib/handlers/entity/solid.d.ts.map +1 -0
- package/lib/handlers/entity/spline.d.ts +30 -0
- package/lib/handlers/entity/spline.d.ts.map +1 -0
- package/lib/handlers/entity/table.d.ts +16 -0
- package/lib/handlers/entity/table.d.ts.map +1 -0
- package/lib/handlers/entity/text.d.ts +31 -0
- package/lib/handlers/entity/text.d.ts.map +1 -0
- package/lib/handlers/entity/threeDFace.d.ts +14 -0
- package/lib/handlers/entity/threeDFace.d.ts.map +1 -0
- package/lib/handlers/entity/tolerance.d.ts +25 -0
- package/lib/handlers/entity/tolerance.d.ts.map +1 -0
- package/lib/handlers/entity/trace.d.ts +15 -0
- package/lib/handlers/entity/trace.d.ts.map +1 -0
- package/lib/handlers/entity/vertex.d.ts +10 -0
- package/lib/handlers/entity/vertex.d.ts.map +1 -0
- package/lib/handlers/entity/viewport.d.ts +9 -0
- package/lib/handlers/entity/viewport.d.ts.map +1 -0
- package/lib/handlers/entity/wipeout.d.ts +28 -0
- package/lib/handlers/entity/wipeout.d.ts.map +1 -0
- package/lib/handlers/entity/xline.d.ts +15 -0
- package/lib/handlers/entity/xline.d.ts.map +1 -0
- package/lib/handlers/header.d.ts +3 -0
- package/lib/handlers/header.d.ts.map +1 -0
- package/lib/handlers/objects.d.ts +3 -0
- package/lib/handlers/objects.d.ts.map +1 -0
- package/lib/handlers/tables.d.ts +13 -0
- package/lib/handlers/tables.d.ts.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/parseString.d.ts +3 -0
- package/lib/parseString.d.ts.map +1 -0
- package/lib/toJson.d.ts +3 -0
- package/lib/toJson.d.ts.map +1 -0
- package/lib/toPolylines.d.ts +4 -0
- package/lib/toPolylines.d.ts.map +1 -0
- package/lib/toSVG.d.ts +7 -0
- package/lib/toSVG.d.ts.map +1 -0
- package/lib/types/arc-entity.d.ts +8 -0
- package/lib/types/arc-entity.d.ts.map +1 -0
- package/lib/types/base-entity.d.ts +22 -0
- package/lib/types/base-entity.d.ts.map +1 -0
- package/lib/types/circle-entity.d.ts +6 -0
- package/lib/types/circle-entity.d.ts.map +1 -0
- package/lib/types/common.d.ts +30 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/dimension-entity.d.ts +31 -0
- package/lib/types/dimension-entity.d.ts.map +1 -0
- package/lib/types/dxf.d.ts +55 -0
- package/lib/types/dxf.d.ts.map +1 -0
- package/lib/types/ellipse-entity.d.ts +11 -0
- package/lib/types/ellipse-entity.d.ts.map +1 -0
- package/lib/types/entity.d.ts +30 -0
- package/lib/types/entity.d.ts.map +1 -0
- package/lib/types/handler-internal.d.ts +44 -0
- package/lib/types/handler-internal.d.ts.map +1 -0
- package/lib/types/handler.d.ts +8 -0
- package/lib/types/handler.d.ts.map +1 -0
- package/lib/types/hatch-entity.d.ts +116 -0
- package/lib/types/hatch-entity.d.ts.map +1 -0
- package/lib/types/helper.d.ts +11 -0
- package/lib/types/helper.d.ts.map +1 -0
- package/lib/types/image-entity.d.ts +25 -0
- package/lib/types/image-entity.d.ts.map +1 -0
- package/lib/types/index.d.ts +43 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/insert-entity.d.ts +16 -0
- package/lib/types/insert-entity.d.ts.map +1 -0
- package/lib/types/layer-groups.d.ts +6 -0
- package/lib/types/layer-groups.d.ts.map +1 -0
- package/lib/types/leader-entity.d.ts +28 -0
- package/lib/types/leader-entity.d.ts.map +1 -0
- package/lib/types/line-entity.d.ts +8 -0
- package/lib/types/line-entity.d.ts.map +1 -0
- package/lib/types/mleader-entity.d.ts +7 -0
- package/lib/types/mleader-entity.d.ts.map +1 -0
- package/lib/types/mline-entity.d.ts +10 -0
- package/lib/types/mline-entity.d.ts.map +1 -0
- package/lib/types/mtext-entity.d.ts +33 -0
- package/lib/types/mtext-entity.d.ts.map +1 -0
- package/lib/types/ole2frame-entity.d.ts +33 -0
- package/lib/types/ole2frame-entity.d.ts.map +1 -0
- package/lib/types/oleframe-entity.d.ts +33 -0
- package/lib/types/oleframe-entity.d.ts.map +1 -0
- package/lib/types/options.d.ts +57 -0
- package/lib/types/options.d.ts.map +1 -0
- package/lib/types/point-entity.d.ts +5 -0
- package/lib/types/point-entity.d.ts.map +1 -0
- package/lib/types/polyline-entity.d.ts +17 -0
- package/lib/types/polyline-entity.d.ts.map +1 -0
- package/lib/types/polylines.d.ts +18 -0
- package/lib/types/polylines.d.ts.map +1 -0
- package/lib/types/ray-entity.d.ts +10 -0
- package/lib/types/ray-entity.d.ts.map +1 -0
- package/lib/types/region-entity.d.ts +10 -0
- package/lib/types/region-entity.d.ts.map +1 -0
- package/lib/types/shape-entity.d.ts +17 -0
- package/lib/types/shape-entity.d.ts.map +1 -0
- package/lib/types/solid-entity.d.ts +7 -0
- package/lib/types/solid-entity.d.ts.map +1 -0
- package/lib/types/spline-entity.d.ts +10 -0
- package/lib/types/spline-entity.d.ts.map +1 -0
- package/lib/types/svg.d.ts +27 -0
- package/lib/types/svg.d.ts.map +1 -0
- package/lib/types/table-entity.d.ts +12 -0
- package/lib/types/table-entity.d.ts.map +1 -0
- package/lib/types/tables.d.ts +549 -0
- package/lib/types/tables.d.ts.map +1 -0
- package/lib/types/text-entity.d.ts +21 -0
- package/lib/types/text-entity.d.ts.map +1 -0
- package/lib/types/tolerance-entity.d.ts +14 -0
- package/lib/types/tolerance-entity.d.ts.map +1 -0
- package/lib/types/trace-entity.d.ts +10 -0
- package/lib/types/trace-entity.d.ts.map +1 -0
- package/lib/types/underlay-entity.d.ts +26 -0
- package/lib/types/underlay-entity.d.ts.map +1 -0
- package/lib/types/util-types.d.ts +22 -0
- package/lib/types/util-types.d.ts.map +1 -0
- package/lib/types/viewport-entity.d.ts +79 -0
- package/lib/types/viewport-entity.d.ts.map +1 -0
- package/lib/types/wipeout-entity.d.ts +18 -0
- package/lib/types/wipeout-entity.d.ts.map +1 -0
- package/lib/types/xline-entity.d.ts +10 -0
- package/lib/types/xline-entity.d.ts.map +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/util/bSpline.d.ts +8 -0
- package/lib/util/bSpline.d.ts.map +1 -0
- package/lib/util/colors.d.ts +5 -0
- package/lib/util/colors.d.ts.map +1 -0
- package/lib/util/createArcForLWPolyline.d.ts +9 -0
- package/lib/util/createArcForLWPolyline.d.ts.map +1 -0
- package/lib/util/dxfColorToRGB.d.ts +22 -0
- package/lib/util/dxfColorToRGB.d.ts.map +1 -0
- package/lib/util/escapeXmlText.d.ts +2 -0
- package/lib/util/escapeXmlText.d.ts.map +1 -0
- package/lib/util/insertKnot.d.ts +9 -0
- package/lib/util/insertKnot.d.ts.map +1 -0
- package/lib/util/logger.d.ts +10 -0
- package/lib/util/logger.d.ts.map +1 -0
- package/lib/util/rgbToColorAttribute.d.ts +7 -0
- package/lib/util/rgbToColorAttribute.d.ts.map +1 -0
- package/lib/util/rotate.d.ts +9 -0
- package/lib/util/rotate.d.ts.map +1 -0
- package/lib/util/round10.d.ts +2 -0
- package/lib/util/round10.d.ts.map +1 -0
- package/lib/util/toPiecewiseBezier.d.ts +18 -0
- package/lib/util/toPiecewiseBezier.d.ts.map +1 -0
- package/lib/util/transformBoundingBoxAndElement.d.ts +9 -0
- package/lib/util/transformBoundingBoxAndElement.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Box2 } from 'vecks';
|
|
2
|
+
import type { Point2D } from './common';
|
|
3
|
+
/** Point for utility functions - extends Point2D with optional z */
|
|
4
|
+
export interface UtilPoint extends Point2D {
|
|
5
|
+
z?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Result of knot insertion operation */
|
|
8
|
+
export interface InsertKnotResult {
|
|
9
|
+
knots: number[];
|
|
10
|
+
controlPoints: UtilPoint[];
|
|
11
|
+
}
|
|
12
|
+
/** Result of bezier conversion */
|
|
13
|
+
export interface BezierResult {
|
|
14
|
+
controlPoints: UtilPoint[];
|
|
15
|
+
knots: number[];
|
|
16
|
+
}
|
|
17
|
+
/** Transform result with bounding box */
|
|
18
|
+
export interface TransformResult {
|
|
19
|
+
element: string;
|
|
20
|
+
bbox: Box2;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=util-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util-types.d.ts","sourceRoot":"","sources":["../../src/types/util-types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEvC,oEAAoE;AACpE,MAAM,WAAW,SAAU,SAAQ,OAAO;IACxC,CAAC,CAAC,EAAE,MAAM,CAAA;CACX;AAED,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,aAAa,EAAE,SAAS,EAAE,CAAA;CAC3B;AAED,kCAAkC;AAClC,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,SAAS,EAAE,CAAA;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,yCAAyC;AACzC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;CACX"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { BaseEntity } from './base-entity';
|
|
2
|
+
/**
|
|
3
|
+
* Viewport entity
|
|
4
|
+
* Represents a viewport in model space or paper space
|
|
5
|
+
*/
|
|
6
|
+
export interface ViewportEntity extends BaseEntity {
|
|
7
|
+
type: 'VIEWPORT';
|
|
8
|
+
/** Layout reference */
|
|
9
|
+
layout?: number;
|
|
10
|
+
/** Viewport width */
|
|
11
|
+
width?: number;
|
|
12
|
+
/** Viewport height */
|
|
13
|
+
height?: number;
|
|
14
|
+
/** Snap rotation angle */
|
|
15
|
+
snapAngle?: number;
|
|
16
|
+
/** View twist angle */
|
|
17
|
+
angle?: number;
|
|
18
|
+
/** Viewport status field */
|
|
19
|
+
status?: string | number;
|
|
20
|
+
/** Viewport ID */
|
|
21
|
+
id?: string | number;
|
|
22
|
+
/** Viewport flags */
|
|
23
|
+
flags?: string | number;
|
|
24
|
+
/** UCS origin X coordinate */
|
|
25
|
+
x?: number;
|
|
26
|
+
/** UCS origin Y coordinate */
|
|
27
|
+
y?: number;
|
|
28
|
+
/** UCS origin Z coordinate */
|
|
29
|
+
z?: number;
|
|
30
|
+
/** UCS X-axis X component */
|
|
31
|
+
xAxisX?: number;
|
|
32
|
+
/** UCS X-axis Y component */
|
|
33
|
+
xAxisY?: number;
|
|
34
|
+
/** UCS X-axis Z component */
|
|
35
|
+
xAxisZ?: number;
|
|
36
|
+
/** View elevation */
|
|
37
|
+
elevation?: number;
|
|
38
|
+
/** Render mode */
|
|
39
|
+
render?: string | number;
|
|
40
|
+
/** Center point in WCS */
|
|
41
|
+
center?: {
|
|
42
|
+
x?: number;
|
|
43
|
+
y?: number;
|
|
44
|
+
z?: number;
|
|
45
|
+
};
|
|
46
|
+
/** Center point in DCS */
|
|
47
|
+
centerDCS?: {
|
|
48
|
+
x?: number;
|
|
49
|
+
y?: number;
|
|
50
|
+
};
|
|
51
|
+
/** Snap base point */
|
|
52
|
+
snap?: {
|
|
53
|
+
x?: number;
|
|
54
|
+
y?: number;
|
|
55
|
+
};
|
|
56
|
+
/** Snap spacing */
|
|
57
|
+
snapSpacing?: {
|
|
58
|
+
x?: number;
|
|
59
|
+
y?: number;
|
|
60
|
+
};
|
|
61
|
+
/** Grid spacing */
|
|
62
|
+
gridSpacing?: {
|
|
63
|
+
x?: number;
|
|
64
|
+
y?: number;
|
|
65
|
+
};
|
|
66
|
+
/** View direction from target */
|
|
67
|
+
direction?: {
|
|
68
|
+
x?: number;
|
|
69
|
+
y?: number;
|
|
70
|
+
z?: number;
|
|
71
|
+
};
|
|
72
|
+
/** View target point */
|
|
73
|
+
target?: {
|
|
74
|
+
x?: number;
|
|
75
|
+
y?: number;
|
|
76
|
+
z?: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=viewport-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewport-entity.d.ts","sourceRoot":"","sources":["../../src/types/viewport-entity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,IAAI,EAAE,UAAU,CAAA;IAChB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,kBAAkB;IAClB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,8BAA8B;IAC9B,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,8BAA8B;IAC9B,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,8BAA8B;IAC9B,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,0BAA0B;IAC1B,MAAM,CAAC,EAAE;QACP,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,0BAA0B;IAC1B,SAAS,CAAC,EAAE;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,sBAAsB;IACtB,IAAI,CAAC,EAAE;QACL,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,mBAAmB;IACnB,WAAW,CAAC,EAAE;QACZ,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,mBAAmB;IACnB,WAAW,CAAC,EAAE;QACZ,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,iCAAiC;IACjC,SAAS,CAAC,EAAE;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;IACD,wBAAwB;IACxB,MAAM,CAAC,EAAE;QACP,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;QACV,CAAC,CAAC,EAAE,MAAM,CAAA;KACX,CAAA;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BaseEntity } from './base-entity';
|
|
2
|
+
import type { Point2D, Point3D } from './common';
|
|
3
|
+
export interface WipeoutEntity extends BaseEntity {
|
|
4
|
+
type: 'WIPEOUT';
|
|
5
|
+
insertionPoint: Point3D;
|
|
6
|
+
uVector: Point3D;
|
|
7
|
+
vVector: Point3D;
|
|
8
|
+
clipBoundaryType?: 1 | 2;
|
|
9
|
+
clipBoundaryVertices?: Point2D[];
|
|
10
|
+
displayProperties?: number;
|
|
11
|
+
clippingState?: 0 | 1;
|
|
12
|
+
classVersion?: number;
|
|
13
|
+
imageSizePixels?: {
|
|
14
|
+
u: number;
|
|
15
|
+
v: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=wipeout-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wipeout-entity.d.ts","sourceRoot":"","sources":["../../src/types/wipeout-entity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,IAAI,EAAE,SAAS,CAAA;IAEf,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAEhB,gBAAgB,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACxB,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAA;IAEhC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseEntity } from './base-entity';
|
|
2
|
+
import type { Point3D } from './common';
|
|
3
|
+
export interface XLineEntity extends BaseEntity {
|
|
4
|
+
type: 'XLINE';
|
|
5
|
+
/** Base point for the infinite line. */
|
|
6
|
+
basePoint: Point3D;
|
|
7
|
+
/** Unit direction vector. */
|
|
8
|
+
direction: Point3D;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=xline-entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xline-entity.d.ts","sourceRoot":"","sources":["../../src/types/xline-entity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,IAAI,EAAE,OAAO,CAAA;IACb,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAA;IAClB,6BAA6B;IAC7B,SAAS,EAAE,OAAO,CAAA;CACnB"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copied and ported to code standard as the b-spline library is not maintained any longer.
|
|
3
|
+
* Source:
|
|
4
|
+
* https://github.com/thibauts/b-spline
|
|
5
|
+
* Copyright (c) 2015 Thibaut Séguy <thibaut.seguy@gmail.com>
|
|
6
|
+
*/
|
|
7
|
+
export default function bSpline(t: number, degree: number, points: number[][], knots?: number[], weights?: number[]): number[];
|
|
8
|
+
//# sourceMappingURL=bSpline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bSpline.d.ts","sourceRoot":"","sources":["../../src/util/bSpline.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAC7B,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAE,EAAE,EAClB,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,MAAM,EAAE,CAkFV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/util/colors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAG/C,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,QAAA,MAAM,MAAM,EAAE,QAAQ,EAiQrB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Point = [number, number];
|
|
2
|
+
/**
|
|
3
|
+
* Create the arcs point for a LWPOLYLINE. The start and end are excluded
|
|
4
|
+
*
|
|
5
|
+
* See diagram.png in this directory for description of points and angles used.
|
|
6
|
+
*/
|
|
7
|
+
export default function createArcForLWPolyline(from: Point, to: Point, bulge: number, resolution?: number): Point[];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=createArcForLWPolyline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createArcForLWPolyline.d.ts","sourceRoot":"","sources":["../../src/util/createArcForLWPolyline.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE7B;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,KAAK,EACT,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,GAClB,KAAK,EAAE,CA8ET"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert DXF ACI (AutoCAD Color Index) to RGB color
|
|
3
|
+
* Based on AutoCAD's standard 256 color palette
|
|
4
|
+
*/
|
|
5
|
+
export default function dxfColorToRGB(colorNumber: number): {
|
|
6
|
+
r: number;
|
|
7
|
+
g: number;
|
|
8
|
+
b: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Convert RGB object to SVG color string
|
|
12
|
+
*/
|
|
13
|
+
export declare function rgbToSVGColor(rgb: {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
}): string;
|
|
18
|
+
/**
|
|
19
|
+
* Convert DXF color number directly to SVG color string
|
|
20
|
+
*/
|
|
21
|
+
export declare function dxfColorToSVG(colorNumber: number | undefined): string;
|
|
22
|
+
//# sourceMappingURL=dxfColorToRGB.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dxfColorToRGB.d.ts","sourceRoot":"","sources":["../../src/util/dxfColorToRGB.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAmF9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE9E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAMrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escapeXmlText.d.ts","sourceRoot":"","sources":["../../src/util/escapeXmlText.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InsertKnotResult, UtilPoint } from '../types/util-types';
|
|
2
|
+
/**
|
|
3
|
+
* Knot insertion is known as "Boehm's algorithm"
|
|
4
|
+
*
|
|
5
|
+
* https://math.stackexchange.com/questions/417859/convert-a-b-spline-into-bezier-curves
|
|
6
|
+
* code adapted from http://preserve.mactech.com/articles/develop/issue_25/schneider.html
|
|
7
|
+
*/
|
|
8
|
+
export default function insertKnot(k: number, controlPoints: UtilPoint[], knots: number[], newKnot: number): InsertKnotResult;
|
|
9
|
+
//# sourceMappingURL=insertKnot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertKnot.d.ts","sourceRoot":"","sources":["../../src/util/insertKnot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEtE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,CAAC,EAAE,MAAM,EACT,aAAa,EAAE,SAAS,EAAE,EAC1B,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,MAAM,GACd,gBAAgB,CAuDlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare function info(...args: any[]): void;
|
|
2
|
+
declare function warn(...args: any[]): void;
|
|
3
|
+
declare function error(...args: any[]): void;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
info: typeof info;
|
|
6
|
+
warn: typeof warn;
|
|
7
|
+
error: typeof error;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAEA,iBAAS,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAIlC;AAED,iBAAS,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAIlC;AAED,iBAAS,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAEnC;;;;;;AAED,wBAIC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColorRGB } from './colors';
|
|
2
|
+
/**
|
|
3
|
+
* Convert a ColorRGB tuple to a CSS string definition.
|
|
4
|
+
* Converts white lines to black as the default.
|
|
5
|
+
*/
|
|
6
|
+
export default function rgbToColorAttribute(rgb: ColorRGB): string;
|
|
7
|
+
//# sourceMappingURL=rgbToColorAttribute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbToColorAttribute.d.ts","sourceRoot":"","sources":["../../src/util/rgbToColorAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAOjE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Point2D } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Rotate a point by the given angle.
|
|
4
|
+
*
|
|
5
|
+
* @param p the point
|
|
6
|
+
* @param angle the rotation angle in radians
|
|
7
|
+
*/
|
|
8
|
+
export default function rotate(p: Point2D, angle: number): Point2D;
|
|
9
|
+
//# sourceMappingURL=rotate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/util/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAKjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round10.d.ts","sourceRoot":"","sources":["../../src/util/round10.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBnE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BezierResult, UtilPoint } from '../types/util-types';
|
|
2
|
+
/**
|
|
3
|
+
* For a pinned spline, the knots have to be repeated k times
|
|
4
|
+
* (where k is the order), at both the beginning and the end
|
|
5
|
+
*/
|
|
6
|
+
export declare const checkPinned: (k: number, knots: number[]) => void;
|
|
7
|
+
export declare const multiplicity: (knots: number[], index: number) => number;
|
|
8
|
+
/**
|
|
9
|
+
* https://saccade.com/writing/graphics/KnotVectors.pdf
|
|
10
|
+
* A quadratic piecewise Bézier knot vector with seven control points
|
|
11
|
+
* will look like this [0 0 0 1 1 2 2 3 3 3]. In general, in a
|
|
12
|
+
* piecewise Bézier knot vector the first k knots are the same,
|
|
13
|
+
* then each subsequent group of k-1 knots is the same,
|
|
14
|
+
* until you get to the end.
|
|
15
|
+
*/
|
|
16
|
+
export declare const computeInsertions: (k: number, knots: number[]) => number[];
|
|
17
|
+
export default function toPiecewiseBezier(k: number, controlPoints: UtilPoint[], knots: number[]): BezierResult;
|
|
18
|
+
//# sourceMappingURL=toPiecewiseBezier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toPiecewiseBezier.d.ts","sourceRoot":"","sources":["../../src/util/toPiecewiseBezier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAGlE;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,EAAE,OAAO,MAAM,EAAE,KAAG,IAaxD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,EAAE,OAAO,MAAM,KAAG,MAU7D,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,EAAE,OAAO,MAAM,EAAE,KAAG,MAAM,EAYpE,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,EAAE,MAAM,EACT,aAAa,EAAE,SAAS,EAAE,EAC1B,KAAK,EAAE,MAAM,EAAE,GACd,YAAY,CASd"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Box2 } from 'vecks';
|
|
2
|
+
import type { Transform, TransformResult } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Transform the bounding box and the SVG element by the given
|
|
5
|
+
* transforms. The <g> element are created in reverse transform
|
|
6
|
+
* order and the bounding box in the given order.
|
|
7
|
+
*/
|
|
8
|
+
export default function transformBoundingBoxAndElement(bbox: Box2, element: string, transforms: Transform[]): TransformResult;
|
|
9
|
+
//# sourceMappingURL=transformBoundingBoxAndElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformBoundingBoxAndElement.d.ts","sourceRoot":"","sources":["../../src/util/transformBoundingBoxAndElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,SAAS,EAAE,GACtB,eAAe,CA6DjB"}
|