@ifc-lite/create 2.2.1 → 2.4.0
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/in-store/anchor.d.ts +16 -1
- package/dist/in-store/anchor.d.ts.map +1 -1
- package/dist/in-store/anchor.js +20 -0
- package/dist/in-store/anchor.js.map +1 -1
- package/dist/in-store/drawing-markup-geometry.d.ts +46 -0
- package/dist/in-store/drawing-markup-geometry.d.ts.map +1 -0
- package/dist/in-store/drawing-markup-geometry.js +80 -0
- package/dist/in-store/drawing-markup-geometry.js.map +1 -0
- package/dist/in-store/drawing-markup-tags.d.ts +29 -0
- package/dist/in-store/drawing-markup-tags.d.ts.map +1 -0
- package/dist/in-store/drawing-markup-tags.js +31 -0
- package/dist/in-store/drawing-markup-tags.js.map +1 -0
- package/dist/in-store/drawing-markup.d.ts +184 -0
- package/dist/in-store/drawing-markup.d.ts.map +1 -0
- package/dist/in-store/drawing-markup.js +196 -0
- package/dist/in-store/drawing-markup.js.map +1 -0
- package/dist/in-store/extract-walls.d.ts +16 -16
- package/dist/in-store/extract-walls.d.ts.map +1 -1
- package/dist/in-store/extract-walls.js +31 -289
- package/dist/in-store/extract-walls.js.map +1 -1
- package/dist/in-store/length-unit-scale.d.ts +34 -0
- package/dist/in-store/length-unit-scale.d.ts.map +1 -0
- package/dist/in-store/length-unit-scale.js +44 -0
- package/dist/in-store/length-unit-scale.js.map +1 -0
- package/dist/in-store/placement-frame.d.ts +132 -0
- package/dist/in-store/placement-frame.d.ts.map +1 -0
- package/dist/in-store/placement-frame.js +266 -0
- package/dist/in-store/placement-frame.js.map +1 -0
- package/dist/in-store/resolve-anchor.d.ts.map +1 -1
- package/dist/in-store/resolve-anchor.js +7 -14
- package/dist/in-store/resolve-anchor.js.map +1 -1
- package/dist/in-store/resolve-source.d.ts.map +1 -1
- package/dist/in-store/resolve-source.js +3 -10
- package/dist/in-store/resolve-source.js.map +1 -1
- package/dist/in-store/spatial-zone.js +1 -1
- package/dist/in-store/storey-plan-frame.d.ts +69 -0
- package/dist/in-store/storey-plan-frame.d.ts.map +1 -0
- package/dist/in-store/storey-plan-frame.js +157 -0
- package/dist/in-store/storey-plan-frame.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -54,8 +54,23 @@ export interface SpatialAnchor {
|
|
|
54
54
|
* Convert a metre value to the anchor's native length unit for STEP emit.
|
|
55
55
|
* Rounded to 9 decimals to absorb the float noise the division introduces
|
|
56
56
|
* (2.8 / 0.001 = 2799.9999999999995 → 2800).
|
|
57
|
+
*
|
|
58
|
+
* Takes only `{ lengthUnitScale }` rather than a full `SpatialAnchor` so
|
|
59
|
+
* narrower anchor shapes (e.g. `drawing-markup.ts`'s `MarkupAnchor`, which
|
|
60
|
+
* has no `bodyContextId`/`axisContextId`/`storeyId` — markup geometry has no
|
|
61
|
+
* use for them) can share this one conversion instead of re-implementing it.
|
|
62
|
+
*/
|
|
63
|
+
export declare function toNativeLength(anchor: Pick<SpatialAnchor, 'lengthUnitScale'>, metres: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* Inverse of {@link toNativeLength}: convert a value stored in the anchor's
|
|
66
|
+
* native length unit back to metres. Used by read-side translators (e.g.
|
|
67
|
+
* `apps/viewer`'s drawing-markup reader) to invert a derived value a writer
|
|
68
|
+
* scaled with `toNativeLength` before storing it in a quantity set — the
|
|
69
|
+
* mathematical inverse of that function's rounding rule, kept next to it so
|
|
70
|
+
* a future change to the rounding constant cannot update one side without
|
|
71
|
+
* the other.
|
|
57
72
|
*/
|
|
58
|
-
export declare function
|
|
73
|
+
export declare function fromNativeLength(anchor: Pick<SpatialAnchor, 'lengthUnitScale'>, native: number): number;
|
|
59
74
|
/** 2D point variant of {@link toNativeLength}. */
|
|
60
75
|
export declare function toNativePoint2(anchor: SpatialAnchor, p: readonly [number, number]): [number, number];
|
|
61
76
|
/** 3D point variant of {@link toNativeLength}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,2GAA2G;IAC3G,aAAa,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,aAAa,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAED
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,2GAA2G;IAC3G,aAAa,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,aAAa,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAIrG;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAIvG;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEpG;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAEpH"}
|
package/dist/in-store/anchor.js
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* Convert a metre value to the anchor's native length unit for STEP emit.
|
|
6
6
|
* Rounded to 9 decimals to absorb the float noise the division introduces
|
|
7
7
|
* (2.8 / 0.001 = 2799.9999999999995 → 2800).
|
|
8
|
+
*
|
|
9
|
+
* Takes only `{ lengthUnitScale }` rather than a full `SpatialAnchor` so
|
|
10
|
+
* narrower anchor shapes (e.g. `drawing-markup.ts`'s `MarkupAnchor`, which
|
|
11
|
+
* has no `bodyContextId`/`axisContextId`/`storeyId` — markup geometry has no
|
|
12
|
+
* use for them) can share this one conversion instead of re-implementing it.
|
|
8
13
|
*/
|
|
9
14
|
export function toNativeLength(anchor, metres) {
|
|
10
15
|
const scale = anchor.lengthUnitScale;
|
|
@@ -12,6 +17,21 @@ export function toNativeLength(anchor, metres) {
|
|
|
12
17
|
return metres;
|
|
13
18
|
return Math.round((metres / scale) * 1e9) / 1e9;
|
|
14
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Inverse of {@link toNativeLength}: convert a value stored in the anchor's
|
|
22
|
+
* native length unit back to metres. Used by read-side translators (e.g.
|
|
23
|
+
* `apps/viewer`'s drawing-markup reader) to invert a derived value a writer
|
|
24
|
+
* scaled with `toNativeLength` before storing it in a quantity set — the
|
|
25
|
+
* mathematical inverse of that function's rounding rule, kept next to it so
|
|
26
|
+
* a future change to the rounding constant cannot update one side without
|
|
27
|
+
* the other.
|
|
28
|
+
*/
|
|
29
|
+
export function fromNativeLength(anchor, native) {
|
|
30
|
+
const scale = anchor.lengthUnitScale;
|
|
31
|
+
if (!scale || !Number.isFinite(scale) || scale <= 0 || scale === 1)
|
|
32
|
+
return native;
|
|
33
|
+
return Math.round(native * scale * 1e9) / 1e9;
|
|
34
|
+
}
|
|
15
35
|
/** 2D point variant of {@link toNativeLength}. */
|
|
16
36
|
export function toNativePoint2(anchor, p) {
|
|
17
37
|
return [toNativeLength(anchor, p[0]), toNativeLength(anchor, p[1])];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0D/D
|
|
1
|
+
{"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0D/D;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,MAA8C,EAAE,MAAc;IAC3F,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC;IACrC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAClF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAA8C,EAAE,MAAc;IAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC;IACrC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAClF,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAChD,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,CAA4B;IAChF,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,CAAoC;IACxF,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry emitters local to `drawing-markup.ts`, kept out of the shared
|
|
3
|
+
* `_emit-helpers.ts` deliberately: annotation curves/placements are a
|
|
4
|
+
* different shape than the swept-solid prologue every element builder
|
|
5
|
+
* shares (bare `IfcPolyline`, not a closed profile; an `Annotation`
|
|
6
|
+
* `IfcShapeRepresentation`, not `Body`), so folding them into the shared
|
|
7
|
+
* file would grow it for callers that never touch markup.
|
|
8
|
+
*/
|
|
9
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
10
|
+
/**
|
|
11
|
+
* Emit an `IfcPolyline` through 2D points, in order. When `close` is true
|
|
12
|
+
* and the input isn't already closed (first/last within epsilon), the first
|
|
13
|
+
* point is appended again — same auto-close rule `_emit-helpers.ts`'s
|
|
14
|
+
* `emitPolygonProfile` uses, minus the `IfcArbitraryClosedProfileDef`
|
|
15
|
+
* wrapper: markup curves are annotation geometry, not extrusion profiles.
|
|
16
|
+
*/
|
|
17
|
+
export declare function emitMarkupPolyline(editor: StoreEditor, points: ReadonlyArray<readonly [number, number]>, close: boolean): number;
|
|
18
|
+
/**
|
|
19
|
+
* Emit an `IfcAxis2Placement2D` at a 2D point (no rotation) — the `Placement`
|
|
20
|
+
* a text literal needs.
|
|
21
|
+
*/
|
|
22
|
+
export declare function emitMarkupPoint2DPlacement(editor: StoreEditor, point: readonly [number, number]): number;
|
|
23
|
+
/**
|
|
24
|
+
* Emit a fresh `IfcGeometricRepresentationSubContext` for markup geometry,
|
|
25
|
+
* chained to `parentContextId` (the model's root 3D
|
|
26
|
+
* `IfcGeometricRepresentationContext`). `targetView` is written verbatim
|
|
27
|
+
* into `TargetView` (dot-wrapped enum, e.g. `'PLAN_VIEW'` → `.PLAN_VIEW.`).
|
|
28
|
+
*
|
|
29
|
+
* `CoordinateSpaceDimension` / `Precision` / `WorldCoordinateSystem` /
|
|
30
|
+
* `TrueNorth` are DERIVE-redeclared on `IfcGeometricRepresentationSubContext`
|
|
31
|
+
* in the IFC4 EXPRESS schema (`Ifc4.RepresentationResource`) — not given
|
|
32
|
+
* their own values, but STEP still reserves their positional slots with the
|
|
33
|
+
* `*` derived-attribute token (`packages/export/src/step-serialization.ts`'s
|
|
34
|
+
* `serializeStepValue` passes a literal `'*'` through unquoted), which is
|
|
35
|
+
* how mainstream IFC exporters emit this entity.
|
|
36
|
+
*/
|
|
37
|
+
export declare function emitMarkupSubContext(editor: StoreEditor, parentContextId: number, targetView: 'PLAN_VIEW' | 'SECTION_VIEW', contextIdentifier?: string): number;
|
|
38
|
+
/**
|
|
39
|
+
* Emit an `Annotation` `IfcShapeRepresentation` + `IfcProductDefinitionShape`
|
|
40
|
+
* wrapping one representation item, for `IfcAnnotation.Representation`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function emitMarkupRepresentation(editor: StoreEditor, contextId: number, representationType: string, itemId: number): {
|
|
43
|
+
shapeRepId: number;
|
|
44
|
+
productShapeId: number;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=drawing-markup-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-markup-geometry.d.ts","sourceRoot":"","sources":["../../src/in-store/drawing-markup-geometry.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAChD,KAAK,EAAE,OAAO,GACb,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAGxG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,WAAW,GAAG,cAAc,EACxC,iBAAiB,SAAe,GAC/B,MAAM,CAaR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,GACb;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAahD"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
const POINT_EPSILON = 1e-6;
|
|
5
|
+
/**
|
|
6
|
+
* Emit an `IfcPolyline` through 2D points, in order. When `close` is true
|
|
7
|
+
* and the input isn't already closed (first/last within epsilon), the first
|
|
8
|
+
* point is appended again — same auto-close rule `_emit-helpers.ts`'s
|
|
9
|
+
* `emitPolygonProfile` uses, minus the `IfcArbitraryClosedProfileDef`
|
|
10
|
+
* wrapper: markup curves are annotation geometry, not extrusion profiles.
|
|
11
|
+
*/
|
|
12
|
+
export function emitMarkupPolyline(editor, points, close) {
|
|
13
|
+
if (points.length < 2) {
|
|
14
|
+
throw new Error('emitMarkupPolyline: needs at least 2 points');
|
|
15
|
+
}
|
|
16
|
+
let sequence = points;
|
|
17
|
+
if (close) {
|
|
18
|
+
const first = points[0];
|
|
19
|
+
const last = points[points.length - 1];
|
|
20
|
+
const alreadyClosed = Math.abs(first[0] - last[0]) < POINT_EPSILON && Math.abs(first[1] - last[1]) < POINT_EPSILON;
|
|
21
|
+
sequence = alreadyClosed ? points : [...points, first];
|
|
22
|
+
}
|
|
23
|
+
const pointIds = sequence.map((pt) => editor.addEntity('IfcCartesianPoint', [[pt[0], pt[1]]]).expressId);
|
|
24
|
+
return editor.addEntity('IfcPolyline', [pointIds.map((id) => `#${id}`)]).expressId;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Emit an `IfcAxis2Placement2D` at a 2D point (no rotation) — the `Placement`
|
|
28
|
+
* a text literal needs.
|
|
29
|
+
*/
|
|
30
|
+
export function emitMarkupPoint2DPlacement(editor, point) {
|
|
31
|
+
const originPt = editor.addEntity('IfcCartesianPoint', [[point[0], point[1]]]).expressId;
|
|
32
|
+
return editor.addEntity('IfcAxis2Placement2D', [`#${originPt}`, null]).expressId;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Emit a fresh `IfcGeometricRepresentationSubContext` for markup geometry,
|
|
36
|
+
* chained to `parentContextId` (the model's root 3D
|
|
37
|
+
* `IfcGeometricRepresentationContext`). `targetView` is written verbatim
|
|
38
|
+
* into `TargetView` (dot-wrapped enum, e.g. `'PLAN_VIEW'` → `.PLAN_VIEW.`).
|
|
39
|
+
*
|
|
40
|
+
* `CoordinateSpaceDimension` / `Precision` / `WorldCoordinateSystem` /
|
|
41
|
+
* `TrueNorth` are DERIVE-redeclared on `IfcGeometricRepresentationSubContext`
|
|
42
|
+
* in the IFC4 EXPRESS schema (`Ifc4.RepresentationResource`) — not given
|
|
43
|
+
* their own values, but STEP still reserves their positional slots with the
|
|
44
|
+
* `*` derived-attribute token (`packages/export/src/step-serialization.ts`'s
|
|
45
|
+
* `serializeStepValue` passes a literal `'*'` through unquoted), which is
|
|
46
|
+
* how mainstream IFC exporters emit this entity.
|
|
47
|
+
*/
|
|
48
|
+
export function emitMarkupSubContext(editor, parentContextId, targetView, contextIdentifier = 'Annotation') {
|
|
49
|
+
return editor.addEntity('IfcGeometricRepresentationSubContext', [
|
|
50
|
+
contextIdentifier,
|
|
51
|
+
'Model',
|
|
52
|
+
'*',
|
|
53
|
+
'*',
|
|
54
|
+
'*',
|
|
55
|
+
'*',
|
|
56
|
+
`#${parentContextId}`,
|
|
57
|
+
null,
|
|
58
|
+
`.${targetView}.`,
|
|
59
|
+
null,
|
|
60
|
+
]).expressId;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Emit an `Annotation` `IfcShapeRepresentation` + `IfcProductDefinitionShape`
|
|
64
|
+
* wrapping one representation item, for `IfcAnnotation.Representation`.
|
|
65
|
+
*/
|
|
66
|
+
export function emitMarkupRepresentation(editor, contextId, representationType, itemId) {
|
|
67
|
+
const shapeRepId = editor.addEntity('IfcShapeRepresentation', [
|
|
68
|
+
`#${contextId}`,
|
|
69
|
+
'Annotation',
|
|
70
|
+
representationType,
|
|
71
|
+
[`#${itemId}`],
|
|
72
|
+
]).expressId;
|
|
73
|
+
const productShapeId = editor.addEntity('IfcProductDefinitionShape', [
|
|
74
|
+
null,
|
|
75
|
+
null,
|
|
76
|
+
[`#${shapeRepId}`],
|
|
77
|
+
]).expressId;
|
|
78
|
+
return { shapeRepId, productShapeId };
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=drawing-markup-geometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-markup-geometry.js","sourceRoot":"","sources":["../../src/in-store/drawing-markup-geometry.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAa/D,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAmB,EACnB,MAAgD,EAChD,KAAc;IAEd,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,QAAQ,GAA6C,MAAM,CAAC;IAChE,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvC,MAAM,aAAa,GACjB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,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CAAC,SAAS,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAmB,EACnB,SAAiB,EACjB,kBAA0B,EAC1B,MAAc;IAEd,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,EAAE;QAC5D,IAAI,SAAS,EAAE;QACf,YAAY;QACZ,kBAAkB;QAClB,CAAC,IAAI,MAAM,EAAE,CAAC;KACf,CAAC,CAAC,SAAS,CAAC;IACb,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,2BAA2B,EAAE;QACnE,IAAI;QACJ,IAAI;QACJ,CAAC,IAAI,UAAU,EAAE,CAAC;KACnB,CAAC,CAAC,SAAS,CAAC;IACb,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Round-trip tag values for 2D drawing markup translated into IFC by
|
|
3
|
+
* `drawing-markup.ts`. Stamped into `IfcAnnotation.ObjectType` — the same
|
|
4
|
+
* spot `generate-spaces.ts`'s `GENERATED_SPACE_OBJECTTYPE` uses to mark a
|
|
5
|
+
* baked `IfcSpace` as tool-generated.
|
|
6
|
+
*
|
|
7
|
+
* Without this, saved markup reads back through the generic symbolic-overlay
|
|
8
|
+
* parser as plain polylines/text/fills — visible, but no longer the typed
|
|
9
|
+
* `Measure2DResult` / `PolygonArea2DResult` / `TextAnnotation2D` /
|
|
10
|
+
* `CloudAnnotation2D` it started as, and no longer editable as one.
|
|
11
|
+
*
|
|
12
|
+
* Exported from this ONE place so a future read-side translator (issue
|
|
13
|
+
* #4153's read-back follow-up — not implemented here) imports these instead
|
|
14
|
+
* of re-declaring the string literals. Two independently-typed copies of the
|
|
15
|
+
* same tag is exactly the failure mode this exists to prevent: the writer
|
|
16
|
+
* tags with one spelling, the reader checks for another, and every saved
|
|
17
|
+
* annotation silently falls back to untyped overlay geometry.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DRAWING_MARKUP_OBJECTTYPE: {
|
|
20
|
+
readonly MEASURE: "IfcLite:Markup:Measure";
|
|
21
|
+
readonly POLYGON_AREA: "IfcLite:Markup:PolygonArea";
|
|
22
|
+
readonly TEXT: "IfcLite:Markup:Text";
|
|
23
|
+
readonly CLOUD: "IfcLite:Markup:Cloud";
|
|
24
|
+
};
|
|
25
|
+
export type DrawingMarkupObjectType = (typeof DRAWING_MARKUP_OBJECTTYPE)[keyof typeof DRAWING_MARKUP_OBJECTTYPE];
|
|
26
|
+
/** The derived-value quantity/property set names markup entities carry. */
|
|
27
|
+
export declare const DRAWING_MARKUP_QSET_NAME = "Qto_IfcLiteMarkup";
|
|
28
|
+
export declare const DRAWING_MARKUP_PSET_NAME = "Pset_IfcLiteMarkup";
|
|
29
|
+
//# sourceMappingURL=drawing-markup-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-markup-tags.d.ts","sourceRoot":"","sources":["../../src/in-store/drawing-markup-tags.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,yBAAyB;;;;;CAK5B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAC5D,eAAO,MAAM,wBAAwB,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Round-trip tag values for 2D drawing markup translated into IFC by
|
|
6
|
+
* `drawing-markup.ts`. Stamped into `IfcAnnotation.ObjectType` — the same
|
|
7
|
+
* spot `generate-spaces.ts`'s `GENERATED_SPACE_OBJECTTYPE` uses to mark a
|
|
8
|
+
* baked `IfcSpace` as tool-generated.
|
|
9
|
+
*
|
|
10
|
+
* Without this, saved markup reads back through the generic symbolic-overlay
|
|
11
|
+
* parser as plain polylines/text/fills — visible, but no longer the typed
|
|
12
|
+
* `Measure2DResult` / `PolygonArea2DResult` / `TextAnnotation2D` /
|
|
13
|
+
* `CloudAnnotation2D` it started as, and no longer editable as one.
|
|
14
|
+
*
|
|
15
|
+
* Exported from this ONE place so a future read-side translator (issue
|
|
16
|
+
* #4153's read-back follow-up — not implemented here) imports these instead
|
|
17
|
+
* of re-declaring the string literals. Two independently-typed copies of the
|
|
18
|
+
* same tag is exactly the failure mode this exists to prevent: the writer
|
|
19
|
+
* tags with one spelling, the reader checks for another, and every saved
|
|
20
|
+
* annotation silently falls back to untyped overlay geometry.
|
|
21
|
+
*/
|
|
22
|
+
export const DRAWING_MARKUP_OBJECTTYPE = {
|
|
23
|
+
MEASURE: 'IfcLite:Markup:Measure',
|
|
24
|
+
POLYGON_AREA: 'IfcLite:Markup:PolygonArea',
|
|
25
|
+
TEXT: 'IfcLite:Markup:Text',
|
|
26
|
+
CLOUD: 'IfcLite:Markup:Cloud',
|
|
27
|
+
};
|
|
28
|
+
/** The derived-value quantity/property set names markup entities carry. */
|
|
29
|
+
export const DRAWING_MARKUP_QSET_NAME = 'Qto_IfcLiteMarkup';
|
|
30
|
+
export const DRAWING_MARKUP_PSET_NAME = 'Pset_IfcLiteMarkup';
|
|
31
|
+
//# sourceMappingURL=drawing-markup-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-markup-tags.js","sourceRoot":"","sources":["../../src/in-store/drawing-markup-tags.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,wBAAwB;IACjC,YAAY,EAAE,4BAA4B;IAC1C,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,sBAAsB;CACrB,CAAC;AAKX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate 2D drawing markup (issue #4153's "save into the model" option)
|
|
3
|
+
* into IFC entities via the additive `StoreEditor` overlay — modelled on
|
|
4
|
+
* `space.ts`'s `addSpaceToStore`.
|
|
5
|
+
*
|
|
6
|
+
* WRITE SIDE ONLY. This module has no UI wiring and does not import or edit
|
|
7
|
+
* `apps/viewer/src/store/slices/drawing2DSlice.ts` — a "save into model"
|
|
8
|
+
* action, and the read-side translator that recognises
|
|
9
|
+
* `DRAWING_MARKUP_OBJECTTYPE` and rehydrates `Drawing2DState`, are both
|
|
10
|
+
* future follow-ups. The param shapes below (`MarkupPoint2D`,
|
|
11
|
+
* `MeasureMarkupParams`, …) intentionally mirror `Drawing2DState`'s arrays
|
|
12
|
+
* structurally without importing `apps/viewer` — a published package
|
|
13
|
+
* (`@ifc-lite/create`) cannot depend on the app.
|
|
14
|
+
*
|
|
15
|
+
* Geometry frame: every point is treated as already resolved into the
|
|
16
|
+
* target `IfcGeometricRepresentationSubContext`'s 2D plane, in METRES —
|
|
17
|
+
* the same "drawing units (typically meters)" `Drawing2DState`'s own
|
|
18
|
+
* comments describe. Reprojecting a plan/section drawing's local 2D
|
|
19
|
+
* coordinates into that frame (accounting for the `SectionConfig` cut
|
|
20
|
+
* plane) is a UI/wiring concern for the future "save into model" action,
|
|
21
|
+
* not this translation layer.
|
|
22
|
+
*
|
|
23
|
+
* Additive by construction, same guarantee `StoreEditor.addEntity` documents:
|
|
24
|
+
* every call only APPENDS overlay entities (new `IfcAnnotation` +
|
|
25
|
+
* geometry + property/quantity sets); nothing existing is read, mutated,
|
|
26
|
+
* or renumbered.
|
|
27
|
+
*/
|
|
28
|
+
import { type RandomSource } from '@ifc-lite/encoding';
|
|
29
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
30
|
+
import type { SpatialAnchorSchema } from './anchor.js';
|
|
31
|
+
export { DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, type DrawingMarkupObjectType, } from './drawing-markup-tags.js';
|
|
32
|
+
/** A 2D point in drawing space (metres). Structurally matches `Drawing2DState`'s `Point2D`. */
|
|
33
|
+
export interface MarkupPoint2D {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Placement/unit context shared by every markup builder — the subset of
|
|
39
|
+
* `SpatialAnchor` (`anchor.ts`) markup needs. Deliberately narrower than the
|
|
40
|
+
* full `SpatialAnchor`: markup has no Body/Axis solid geometry, so it needs
|
|
41
|
+
* no `bodyContextId`/`axisContextId`.
|
|
42
|
+
*/
|
|
43
|
+
export interface MarkupAnchor {
|
|
44
|
+
/** IfcOwnerHistory expressId, or null when the model has none (see `SpatialAnchor`). */
|
|
45
|
+
ownerHistoryId: number | null;
|
|
46
|
+
/** The IfcLocalPlacement each markup annotation's own placement chains from
|
|
47
|
+
* (typically the target storey's placement, from `resolveSpatialAnchor`). */
|
|
48
|
+
storeyPlacementId: number;
|
|
49
|
+
/** Target schema; see `SpatialAnchor.schema`. Defaults to IFC4. */
|
|
50
|
+
schema?: SpatialAnchorSchema;
|
|
51
|
+
/** Model length-unit scale (metres per native unit); see `SpatialAnchor.lengthUnitScale`. */
|
|
52
|
+
lengthUnitScale?: number;
|
|
53
|
+
/** Optional seeded randomness for emitted GlobalIds; see `SpatialAnchor.guidRandom`. */
|
|
54
|
+
guidRandom?: RandomSource;
|
|
55
|
+
}
|
|
56
|
+
export interface MeasureMarkupParams {
|
|
57
|
+
start: MarkupPoint2D;
|
|
58
|
+
end: MarkupPoint2D;
|
|
59
|
+
/** Measured distance, metres — preserved verbatim so a reader restores it
|
|
60
|
+
* without recomputing from the (possibly re-projected) polyline. */
|
|
61
|
+
distance: number;
|
|
62
|
+
Name?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface MeasureMarkupResult {
|
|
65
|
+
annotationId: number;
|
|
66
|
+
placementId: number;
|
|
67
|
+
polylineId: number;
|
|
68
|
+
shapeRepId: number;
|
|
69
|
+
productShapeId: number;
|
|
70
|
+
}
|
|
71
|
+
export interface PolygonAreaMarkupParams {
|
|
72
|
+
/** Closed polygon vertices, drawing coords (metres). */
|
|
73
|
+
points: MarkupPoint2D[];
|
|
74
|
+
area: number;
|
|
75
|
+
perimeter: number;
|
|
76
|
+
Name?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface PolygonAreaMarkupResult {
|
|
79
|
+
annotationId: number;
|
|
80
|
+
placementId: number;
|
|
81
|
+
polylineId: number;
|
|
82
|
+
shapeRepId: number;
|
|
83
|
+
productShapeId: number;
|
|
84
|
+
}
|
|
85
|
+
export interface TextMarkupParams {
|
|
86
|
+
/** Top-left corner, drawing coords (metres). */
|
|
87
|
+
position: MarkupPoint2D;
|
|
88
|
+
text: string;
|
|
89
|
+
/** IfcPlanarExtent (SizeInX, SizeInY), metres. Defaults are a nominal box —
|
|
90
|
+
* a future "save into model" action should size this from the on-screen
|
|
91
|
+
* layout, since `fontSize` alone doesn't determine a world-space extent. */
|
|
92
|
+
extent?: {
|
|
93
|
+
sizeX: number;
|
|
94
|
+
sizeY: number;
|
|
95
|
+
};
|
|
96
|
+
boxAlignment?: string;
|
|
97
|
+
Name?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface TextMarkupResult {
|
|
100
|
+
annotationId: number;
|
|
101
|
+
placementId: number;
|
|
102
|
+
textLiteralId: number;
|
|
103
|
+
shapeRepId: number;
|
|
104
|
+
productShapeId: number;
|
|
105
|
+
}
|
|
106
|
+
export interface CloudMarkupParams {
|
|
107
|
+
/** Rectangle corners, drawing coords (metres): [topLeft, bottomRight]. */
|
|
108
|
+
points: readonly [MarkupPoint2D, MarkupPoint2D];
|
|
109
|
+
label: string;
|
|
110
|
+
Name?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface CloudMarkupResult {
|
|
113
|
+
annotationId: number;
|
|
114
|
+
placementId: number;
|
|
115
|
+
polylineId: number;
|
|
116
|
+
fillAreaId: number;
|
|
117
|
+
shapeRepId: number;
|
|
118
|
+
productShapeId: number;
|
|
119
|
+
}
|
|
120
|
+
/** A polyline annotation for one `Measure2DResult`. Distance is preserved as
|
|
121
|
+
* a LENGTH quantity (native length unit, matching every other in-store
|
|
122
|
+
* builder's LENGTH convention — see `space.ts`'s `GrossPerimeter`) rather
|
|
123
|
+
* than recomputed from the two endpoints on read-back. */
|
|
124
|
+
export declare function addMeasureMarkupToStore(editor: StoreEditor, anchor: MarkupAnchor, contextId: number, params: MeasureMarkupParams): MeasureMarkupResult;
|
|
125
|
+
/** A closed polyline annotation for one `PolygonArea2DResult`. Area/perimeter
|
|
126
|
+
* preserved so a reader doesn't recompute a shoelace sum from re-projected
|
|
127
|
+
* points (area is SI m², not unit-scaled — same split `space.ts` uses for
|
|
128
|
+
* AREA vs LENGTH quantities). */
|
|
129
|
+
export declare function addPolygonAreaMarkupToStore(editor: StoreEditor, anchor: MarkupAnchor, contextId: number, params: PolygonAreaMarkupParams): PolygonAreaMarkupResult;
|
|
130
|
+
/** An `IfcTextLiteralWithExtent` annotation for one `TextAnnotation2D`. The
|
|
131
|
+
* literal string is the derived value here — it lives in `Literal` itself,
|
|
132
|
+
* the same field the read-side symbolic parser already consumes, so no
|
|
133
|
+
* separate property-set copy is needed (unlike distance/area/perimeter,
|
|
134
|
+
* which have nowhere else to live). `fontSize`/colors are display-only
|
|
135
|
+
* presentation state, not a derived value this issue asks to preserve, and
|
|
136
|
+
* are left for a future presentation-style follow-up. */
|
|
137
|
+
export declare function addTextMarkupToStore(editor: StoreEditor, anchor: MarkupAnchor, contextId: number, params: TextMarkupParams): TextMarkupResult;
|
|
138
|
+
/**
|
|
139
|
+
* An `IfcAnnotationFillArea` annotation for one `CloudAnnotation2D`.
|
|
140
|
+
*
|
|
141
|
+
* Chose fill-area over a bare polyline because a revision cloud is
|
|
142
|
+
* semantically a bounded REGION (its two stored points are a rectangle's
|
|
143
|
+
* corners, not an open path), and `IfcAnnotationFillArea` is what the read
|
|
144
|
+
* side's own symbolic parser already recognises as a fill (`AnnotationFill2D`
|
|
145
|
+
* in `apps/viewer/src/lib/overlay-parse/symbolic-shapes.ts`) — a bare
|
|
146
|
+
* polyline would render as an outline only, losing the "this is a cloud
|
|
147
|
+
* region" distinction a reader needs to tell it apart from a measurement.
|
|
148
|
+
*/
|
|
149
|
+
export declare function addCloudMarkupToStore(editor: StoreEditor, anchor: MarkupAnchor, contextId: number, params: CloudMarkupParams): CloudMarkupResult;
|
|
150
|
+
/** Batch input mirroring the four markup arrays on `Drawing2DState`
|
|
151
|
+
* (`apps/viewer/src/store/slices/drawing2DSlice.ts`) structurally, without
|
|
152
|
+
* importing that module. `id` fields are accepted and ignored here — the
|
|
153
|
+
* overlay expressId IS the new stable identity; carrying the old
|
|
154
|
+
* browser-local id forward is a read-side/UI concern. */
|
|
155
|
+
export interface DrawingMarkupBatchInput {
|
|
156
|
+
measure2DResults?: Array<{
|
|
157
|
+
id: string;
|
|
158
|
+
} & MeasureMarkupParams>;
|
|
159
|
+
polygonArea2DResults?: Array<{
|
|
160
|
+
id: string;
|
|
161
|
+
} & PolygonAreaMarkupParams>;
|
|
162
|
+
textAnnotations2D?: Array<{
|
|
163
|
+
id: string;
|
|
164
|
+
} & TextMarkupParams>;
|
|
165
|
+
cloudAnnotations2D?: Array<{
|
|
166
|
+
id: string;
|
|
167
|
+
} & CloudMarkupParams>;
|
|
168
|
+
}
|
|
169
|
+
export interface DrawingMarkupBatchResult {
|
|
170
|
+
subContextId: number;
|
|
171
|
+
measures: MeasureMarkupResult[];
|
|
172
|
+
polygons: PolygonAreaMarkupResult[];
|
|
173
|
+
texts: TextMarkupResult[];
|
|
174
|
+
clouds: CloudMarkupResult[];
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Translate a full `Drawing2DState` markup snapshot into the store overlay:
|
|
178
|
+
* one shared `Annotation` `IfcGeometricRepresentationSubContext` (created
|
|
179
|
+
* fresh under `rootContextId`, the model's root 3D
|
|
180
|
+
* `IfcGeometricRepresentationContext`), then one `IfcAnnotation` per markup
|
|
181
|
+
* item, tagged per {@link DRAWING_MARKUP_OBJECTTYPE}.
|
|
182
|
+
*/
|
|
183
|
+
export declare function addDrawingMarkupToStore(editor: StoreEditor, anchor: MarkupAnchor, rootContextId: number, input: DrawingMarkupBatchInput, targetView?: 'PLAN_VIEW' | 'SECTION_VIEW'): DrawingMarkupBatchResult;
|
|
184
|
+
//# sourceMappingURL=drawing-markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-markup.d.ts","sourceRoot":"","sources":["../../src/in-store/drawing-markup.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAWvD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAElC,+FAA+F;AAC/F,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,wFAAwF;IACxF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;kFAC8E;IAC9E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,MAAM,CA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