@ifc-lite/create 3.1.0 → 4.0.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/README.md +9 -0
- package/dist/ifc-creator-math.d.ts +5 -7
- package/dist/ifc-creator-math.d.ts.map +1 -1
- package/dist/ifc-creator-math.js +8 -15
- package/dist/ifc-creator-math.js.map +1 -1
- package/dist/in-store/anchor.d.ts +25 -0
- package/dist/in-store/anchor.d.ts.map +1 -1
- package/dist/in-store/auto-space-detect.d.ts +1 -1
- package/dist/in-store/auto-space-detect.js +1 -1
- package/dist/in-store/beam.d.ts +10 -1
- package/dist/in-store/beam.d.ts.map +1 -1
- package/dist/in-store/beam.js +14 -25
- package/dist/in-store/beam.js.map +1 -1
- package/dist/in-store/column.d.ts +18 -1
- package/dist/in-store/column.d.ts.map +1 -1
- package/dist/in-store/column.js +37 -29
- package/dist/in-store/column.js.map +1 -1
- package/dist/in-store/copy-frame.d.ts +52 -0
- package/dist/in-store/copy-frame.d.ts.map +1 -0
- package/dist/in-store/copy-frame.js +99 -0
- package/dist/in-store/copy-frame.js.map +1 -0
- package/dist/in-store/copy-product.d.ts +96 -0
- package/dist/in-store/copy-product.d.ts.map +1 -0
- package/dist/in-store/copy-product.js +318 -0
- package/dist/in-store/copy-product.js.map +1 -0
- package/dist/in-store/curtain-wall.d.ts +87 -0
- package/dist/in-store/curtain-wall.d.ts.map +1 -0
- package/dist/in-store/curtain-wall.js +237 -0
- package/dist/in-store/curtain-wall.js.map +1 -0
- package/dist/in-store/door.d.ts +10 -4
- package/dist/in-store/door.d.ts.map +1 -1
- package/dist/in-store/door.js +23 -17
- package/dist/in-store/door.js.map +1 -1
- package/dist/in-store/element-type.d.ts +40 -0
- package/dist/in-store/element-type.d.ts.map +1 -0
- package/dist/in-store/element-type.js +60 -0
- package/dist/in-store/element-type.js.map +1 -0
- package/dist/in-store/extract-grids.d.ts +46 -0
- package/dist/in-store/extract-grids.d.ts.map +1 -0
- package/dist/in-store/extract-grids.js +211 -0
- package/dist/in-store/extract-grids.js.map +1 -0
- package/dist/in-store/extract-walls.d.ts +12 -23
- package/dist/in-store/extract-walls.d.ts.map +1 -1
- package/dist/in-store/extract-walls.js +14 -83
- package/dist/in-store/extract-walls.js.map +1 -1
- package/dist/in-store/generate-spaces.d.ts +1 -1
- package/dist/in-store/grid.d.ts +118 -0
- package/dist/in-store/grid.d.ts.map +1 -0
- package/dist/in-store/grid.js +194 -0
- package/dist/in-store/grid.js.map +1 -0
- package/dist/in-store/host-geometry-frame.d.ts +44 -0
- package/dist/in-store/host-geometry-frame.d.ts.map +1 -0
- package/dist/in-store/host-geometry-frame.js +146 -0
- package/dist/in-store/host-geometry-frame.js.map +1 -0
- package/dist/in-store/hosted-element-edit.d.ts +29 -0
- package/dist/in-store/hosted-element-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-element-edit.js +120 -0
- package/dist/in-store/hosted-element-edit.js.map +1 -0
- package/dist/in-store/hosted-element.d.ts +41 -0
- package/dist/in-store/hosted-element.d.ts.map +1 -0
- package/dist/in-store/hosted-element.js +124 -0
- package/dist/in-store/hosted-element.js.map +1 -0
- package/dist/in-store/hosted-fill-read.d.ts +56 -0
- package/dist/in-store/hosted-fill-read.d.ts.map +1 -0
- package/dist/in-store/hosted-fill-read.js +197 -0
- package/dist/in-store/hosted-fill-read.js.map +1 -0
- package/dist/in-store/hosted-fill.d.ts +48 -0
- package/dist/in-store/hosted-fill.d.ts.map +1 -0
- package/dist/in-store/hosted-fill.js +58 -0
- package/dist/in-store/hosted-fill.js.map +1 -0
- package/dist/in-store/hosted-global-id.d.ts +8 -0
- package/dist/in-store/hosted-global-id.d.ts.map +1 -0
- package/dist/in-store/hosted-global-id.js +53 -0
- package/dist/in-store/hosted-global-id.js.map +1 -0
- package/dist/in-store/hosted-placement-edit.d.ts +30 -0
- package/dist/in-store/hosted-placement-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-placement-edit.js +123 -0
- package/dist/in-store/hosted-placement-edit.js.map +1 -0
- package/dist/in-store/hosted-scale-chain.d.ts +12 -0
- package/dist/in-store/hosted-scale-chain.d.ts.map +1 -0
- package/dist/in-store/hosted-scale-chain.js +74 -0
- package/dist/in-store/hosted-scale-chain.js.map +1 -0
- package/dist/in-store/hosted-shape-edit.d.ts +9 -0
- package/dist/in-store/hosted-shape-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-shape-edit.js +79 -0
- package/dist/in-store/hosted-shape-edit.js.map +1 -0
- package/dist/in-store/index.d.ts +59 -0
- package/dist/in-store/index.d.ts.map +1 -0
- package/dist/in-store/index.js +64 -0
- package/dist/in-store/index.js.map +1 -0
- package/dist/in-store/material.d.ts +62 -0
- package/dist/in-store/material.d.ts.map +1 -0
- package/dist/in-store/material.js +107 -0
- package/dist/in-store/material.js.map +1 -0
- package/dist/in-store/member.d.ts +8 -2
- package/dist/in-store/member.d.ts.map +1 -1
- package/dist/in-store/member.js +12 -14
- package/dist/in-store/member.js.map +1 -1
- package/dist/in-store/opening.d.ts +45 -0
- package/dist/in-store/opening.d.ts.map +1 -0
- package/dist/in-store/opening.js +104 -0
- package/dist/in-store/opening.js.map +1 -0
- package/dist/in-store/placement-frame.d.ts +9 -4
- package/dist/in-store/placement-frame.d.ts.map +1 -1
- package/dist/in-store/placement-frame.js +39 -39
- package/dist/in-store/placement-frame.js.map +1 -1
- package/dist/in-store/profile.d.ts +141 -0
- package/dist/in-store/profile.d.ts.map +1 -0
- package/dist/in-store/profile.js +174 -0
- package/dist/in-store/profile.js.map +1 -0
- package/dist/in-store/railing.d.ts +65 -0
- package/dist/in-store/railing.d.ts.map +1 -0
- package/dist/in-store/railing.js +112 -0
- package/dist/in-store/railing.js.map +1 -0
- package/dist/in-store/rel-connects-path.d.ts +43 -0
- package/dist/in-store/rel-connects-path.d.ts.map +1 -0
- package/dist/in-store/rel-connects-path.js +65 -0
- package/dist/in-store/rel-connects-path.js.map +1 -0
- package/dist/in-store/relate.d.ts +32 -0
- package/dist/in-store/relate.d.ts.map +1 -0
- package/dist/in-store/relate.js +39 -0
- package/dist/in-store/relate.js.map +1 -0
- package/dist/in-store/resolve-anchor.d.ts +21 -1
- package/dist/in-store/resolve-anchor.d.ts.map +1 -1
- package/dist/in-store/resolve-anchor.js +6 -2
- package/dist/in-store/resolve-anchor.js.map +1 -1
- package/dist/in-store/resolve-host.d.ts +16 -0
- package/dist/in-store/resolve-host.d.ts.map +1 -0
- package/dist/in-store/resolve-host.js +333 -0
- package/dist/in-store/resolve-host.js.map +1 -0
- package/dist/in-store/resolve-relations.d.ts +23 -0
- package/dist/in-store/resolve-relations.d.ts.map +1 -0
- package/dist/in-store/resolve-relations.js +57 -0
- package/dist/in-store/resolve-relations.js.map +1 -0
- package/dist/in-store/resolve-source.d.ts.map +1 -1
- package/dist/in-store/resolve-source.js +59 -63
- package/dist/in-store/resolve-source.js.map +1 -1
- package/dist/in-store/schema-attributes.d.ts +33 -0
- package/dist/in-store/schema-attributes.d.ts.map +1 -0
- package/dist/in-store/schema-attributes.js +102 -0
- package/dist/in-store/schema-attributes.js.map +1 -0
- package/dist/in-store/space-footprints.d.ts +55 -0
- package/dist/in-store/space-footprints.d.ts.map +1 -0
- package/dist/in-store/space-footprints.js +260 -0
- package/dist/in-store/space-footprints.js.map +1 -0
- package/dist/in-store/space.d.ts.map +1 -1
- package/dist/in-store/space.js +15 -3
- package/dist/in-store/space.js.map +1 -1
- package/dist/in-store/spatial-children.d.ts +1 -1
- package/dist/in-store/spatial-children.js +1 -1
- package/dist/in-store/stair-edit.d.ts +24 -0
- package/dist/in-store/stair-edit.d.ts.map +1 -0
- package/dist/in-store/stair-edit.js +190 -0
- package/dist/in-store/stair-edit.js.map +1 -0
- package/dist/in-store/stair.d.ts +58 -0
- package/dist/in-store/stair.d.ts.map +1 -0
- package/dist/in-store/stair.js +156 -0
- package/dist/in-store/stair.js.map +1 -0
- package/dist/in-store/wall-join-apply.d.ts +74 -0
- package/dist/in-store/wall-join-apply.d.ts.map +1 -0
- package/dist/in-store/wall-join-apply.js +137 -0
- package/dist/in-store/wall-join-apply.js.map +1 -0
- package/dist/in-store/wall-join-edit.d.ts +70 -0
- package/dist/in-store/wall-join-edit.d.ts.map +1 -0
- package/dist/in-store/wall-join-edit.js +217 -0
- package/dist/in-store/wall-join-edit.js.map +1 -0
- package/dist/in-store/wall-join-read.d.ts +60 -0
- package/dist/in-store/wall-join-read.d.ts.map +1 -0
- package/dist/in-store/wall-join-read.js +230 -0
- package/dist/in-store/wall-join-read.js.map +1 -0
- package/dist/in-store/wall-join.d.ts +122 -0
- package/dist/in-store/wall-join.d.ts.map +1 -0
- package/dist/in-store/wall-join.js +231 -0
- package/dist/in-store/wall-join.js.map +1 -0
- package/dist/in-store/wall-opening-fit.d.ts +11 -0
- package/dist/in-store/wall-opening-fit.d.ts.map +1 -0
- package/dist/in-store/wall-opening-fit.js +27 -0
- package/dist/in-store/wall-opening-fit.js.map +1 -0
- package/dist/in-store/wall.d.ts +32 -0
- package/dist/in-store/wall.d.ts.map +1 -1
- package/dist/in-store/wall.js +77 -13
- package/dist/in-store/wall.js.map +1 -1
- package/dist/in-store/window.d.ts +7 -0
- package/dist/in-store/window.d.ts.map +1 -1
- package/dist/in-store/window.js +24 -17
- package/dist/in-store/window.js.map +1 -1
- package/dist/index.d.ts +1 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -34
- package/dist/index.js.map +1 -1
- package/dist/landxml/cant-superelevation.d.ts +28 -0
- package/dist/landxml/cant-superelevation.d.ts.map +1 -0
- package/dist/landxml/cant-superelevation.js +31 -0
- package/dist/landxml/cant-superelevation.js.map +1 -0
- package/dist/landxml/landxml-to-ifc.d.ts +8 -2
- package/dist/landxml/landxml-to-ifc.d.ts.map +1 -1
- package/dist/landxml/landxml-to-ifc.js +34 -2
- package/dist/landxml/landxml-to-ifc.js.map +1 -1
- package/dist/landxml/refusals.d.ts.map +1 -1
- package/dist/landxml/refusals.js +8 -3
- package/dist/landxml/refusals.js.map +1 -1
- package/dist/landxml/result-types.d.ts +44 -0
- package/dist/landxml/result-types.d.ts.map +1 -1
- package/dist/landxml/writers.d.ts +4 -0
- package/dist/landxml/writers.d.ts.map +1 -1
- package/dist/landxml/writers.js +4 -2
- package/dist/landxml/writers.js.map +1 -1
- package/package.json +8 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Hosted openings must fit both end faces after a wall join (#6232 D5).
|
|
2
|
+
* A wall axis can still span an opening when an oblique body face cuts it. */
|
|
3
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
4
|
+
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
5
|
+
import type { WallJoinTarget } from './wall-join-apply.js';
|
|
6
|
+
import { type WallJoinWall } from './wall-join.js';
|
|
7
|
+
/** Safe longitudinal interval in the ORIGINAL placement frame, in metres.
|
|
8
|
+
* Using both faces deliberately refuses a cut straddling an oblique end. */
|
|
9
|
+
export declare function wallOpeningBodySpan(original: WallJoinTarget, next: WallJoinWall): [number, number];
|
|
10
|
+
export declare function assertWallOpeningsFit(store: IfcDataStore, view: MutablePropertyView, original: WallJoinTarget, next: WallJoinWall, scale: number): void;
|
|
11
|
+
//# sourceMappingURL=wall-opening-fit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-opening-fit.d.ts","sourceRoot":"","sources":["../../src/in-store/wall-opening-fit.ts"],"names":[],"mappings":"AAIA;8EAC8E;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGpE;4EAC4E;AAC5E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOlG;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAC1G,IAAI,CASN"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { wallBodyOutline } from './wall-join.js';
|
|
5
|
+
import { readHostOpeningExtents } from './hosted-element.js';
|
|
6
|
+
/** Safe longitudinal interval in the ORIGINAL placement frame, in metres.
|
|
7
|
+
* Using both faces deliberately refuses a cut straddling an oblique end. */
|
|
8
|
+
export function wallOpeningBodySpan(original, next) {
|
|
9
|
+
const length = Math.hypot(original.wall.end[0] - original.wall.start[0], original.wall.end[1] - original.wall.start[1]);
|
|
10
|
+
const ux = (original.wall.end[0] - original.wall.start[0]) / length;
|
|
11
|
+
const uy = (original.wall.end[1] - original.wall.start[1]) / length;
|
|
12
|
+
const first = (next.start[0] - original.origin[0]) * ux + (next.start[1] - original.origin[1]) * uy;
|
|
13
|
+
const { corners } = wallBodyOutline(next);
|
|
14
|
+
return [first + Math.max(corners[0][0], corners[3][0]), first + Math.min(corners[1][0], corners[2][0])];
|
|
15
|
+
}
|
|
16
|
+
export function assertWallOpeningsFit(store, view, original, next, scale) {
|
|
17
|
+
const hosted = readHostOpeningExtents(store, original.wallId, view);
|
|
18
|
+
if (hosted.unreadable.length) {
|
|
19
|
+
throw new Error(`Wall #${original.wallId} has unreadable opening geometry ${hosted.unreadable.map(id => `#${id}`).join(', ')}; joining is refused`);
|
|
20
|
+
}
|
|
21
|
+
const [from, to] = wallOpeningBodySpan(original, next);
|
|
22
|
+
// The existing Trim/Extend contract allows 1 mm of modelling roundoff.
|
|
23
|
+
const outside = hosted.cuts.find(({ bounds }) => bounds.min[0] * scale < from - 1e-3 || bounds.max[0] * scale > to + 1e-3);
|
|
24
|
+
if (outside)
|
|
25
|
+
throw new Error(`Opening #${outside.openingId} would not fit between the joined end faces of wall #${original.wallId}`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=wall-opening-fit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-opening-fit.js","sourceRoot":"","sources":["../../src/in-store/wall-opening-fit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAO/D,OAAO,EAAE,eAAe,EAAqB,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;4EAC4E;AAC5E,MAAM,UAAU,mBAAmB,CAAC,QAAwB,EAAE,IAAkB;IAC9E,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxH,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,C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AI,GAAG,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3H,IAAI,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,CAAC,SAAS,wDAAwD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;AACvI,CAAC"}
|
package/dist/in-store/wall.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
2
2
|
import { type SpatialAnchor } from './anchor.js';
|
|
3
|
+
import { type WallAlignment, type WallEndCut, type WallJoinWall } from './wall-join.js';
|
|
3
4
|
export interface WallInStoreParams {
|
|
4
5
|
/** Start of the wall axis, in storey-local coordinates (metres). */
|
|
5
6
|
Start: [number, number, number];
|
|
@@ -15,15 +16,46 @@ export interface WallInStoreParams {
|
|
|
15
16
|
Tag?: string;
|
|
16
17
|
/** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
|
|
17
18
|
GlobalId?: string;
|
|
19
|
+
/** Which face the axis runs along (`left`/`right` of Start -> End). Default `center`. */
|
|
20
|
+
Alignment?: WallAlignment;
|
|
21
|
+
/** Extra shift of the body across the axis, metres, positive to the left. Default 0. */
|
|
22
|
+
Offset?: number;
|
|
23
|
+
/** Body end at Start (metres past the axis end at each face). Default square at Start. */
|
|
24
|
+
StartCut?: WallEndCut;
|
|
25
|
+
/** Body end at End. Default square at End. */
|
|
26
|
+
EndCut?: WallEndCut;
|
|
27
|
+
/**
|
|
28
|
+
* Write an `Axis` representation beside the Body. Default true: it is the
|
|
29
|
+
* centreline other tools and `extractWallSegmentsForStorey` read, and a
|
|
30
|
+
* joined body no longer tells where the axis ends. The viewer's resize and
|
|
31
|
+
* joins keep it current. Pass false for a body-only wall.
|
|
32
|
+
*/
|
|
33
|
+
Axis?: boolean;
|
|
18
34
|
}
|
|
19
35
|
export interface WallBuildResult {
|
|
20
36
|
wallId: number;
|
|
21
37
|
placementId: number;
|
|
22
38
|
profileId: number;
|
|
23
39
|
solidId: number;
|
|
40
|
+
/** The `Body` IfcShapeRepresentation (first in the product shape). */
|
|
24
41
|
shapeRepId: number;
|
|
42
|
+
/** The `Axis` IfcShapeRepresentation (second in the product shape), or null with `Axis: false`. */
|
|
43
|
+
axisRepId: number | null;
|
|
25
44
|
productShapeId: number;
|
|
26
45
|
relContainedId: number;
|
|
27
46
|
}
|
|
47
|
+
/** The plan view of a wall's params, in metres, as `computeWallJoin` takes it. */
|
|
48
|
+
export declare function wallJoinWallFromParams(params: WallInStoreParams): WallJoinWall;
|
|
49
|
+
/**
|
|
50
|
+
* Emit the body profile of `wall` (metres) in a wall frame whose origin sits
|
|
51
|
+
* `startX` metres before the wall's Start along the axis (0 when the placement
|
|
52
|
+
* origin is Start). Coordinates are converted to the anchor's native unit.
|
|
53
|
+
*/
|
|
54
|
+
export declare function emitWallBodyProfile(editor: StoreEditor, anchor: Pick<SpatialAnchor, 'lengthUnitScale'>, wall: WallJoinWall, startX?: number): number;
|
|
55
|
+
/**
|
|
56
|
+
* Emit the `Axis` representation: a 2D IfcPolyline from `fromX` to `toX`
|
|
57
|
+
* (metres) along the wall frame's X.
|
|
58
|
+
*/
|
|
59
|
+
export declare function emitWallAxisRepresentation(editor: StoreEditor, anchor: Pick<SpatialAnchor, 'axisContextId' | 'lengthUnitScale'>, fromX: number, toX: number): number;
|
|
28
60
|
export declare function addWallToStore(editor: StoreEditor, anchor: SpatialAnchor, params: WallInStoreParams): WallBuildResult;
|
|
29
61
|
//# sourceMappingURL=wall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wall.d.ts","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,C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sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,YAAY,CAU9E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAC9C,IAAI,EAAE,YAAY,EAClB,MAAM,SAAI,GACT,MAAM,CAgBR;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,GAAG,iBAAiB,CAAC,EAChE,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GACV,MAAM,CAUR;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,GACxB,eAAe,CAyHjB"}
|
package/dist/in-store/wall.js
CHANGED
|
@@ -12,13 +12,69 @@
|
|
|
12
12
|
* so the solid spans `Start → End` along local X and is centred
|
|
13
13
|
* on the thickness axis
|
|
14
14
|
* - extruded upward (local +Z) by `Height`
|
|
15
|
+
* - unless `Axis: false`, an `Axis` representation (`Curve2D` IfcPolyline,
|
|
16
|
+
* Start -> End in the wall's frame) beside the `Body`: the centreline
|
|
17
|
+
* other tools and `extractWallSegmentsForStorey` read
|
|
18
|
+
*
|
|
19
|
+
* `Alignment`/`Offset` shift the body across the axis, and `StartCut`/`EndCut`
|
|
20
|
+
* reach past or stop short of the axis ends (see `./wall-join.ts`). Square
|
|
21
|
+
* ends keep the rectangle profile; a slanted end, as a join at an angle other
|
|
22
|
+
* than 90 degrees leaves, needs a four-point IfcArbitraryClosedProfileDef.
|
|
15
23
|
*
|
|
16
24
|
* Pure: no I/O, no parser access — operates entirely through the editor.
|
|
17
25
|
*/
|
|
18
26
|
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
19
27
|
import { vecNorm, assertFinitePoint3 } from '../ifc-creator-math.js';
|
|
20
28
|
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
21
|
-
import { assertPositiveFinite, emitLocalPlacement, ownerHistoryRef, productGuid } from './_emit-helpers.js';
|
|
29
|
+
import { assertPositiveFinite, emitLocalPlacement, emitPolygonProfile, emitRectangleProfile, ownerHistoryRef, productGuid, } from './_emit-helpers.js';
|
|
30
|
+
import { wallBodyOutline } from './wall-join.js';
|
|
31
|
+
/** Round away the float noise sums of metre values pick up (0.05 + 0.1 - 0.2 = -0.05000000000000001). */
|
|
32
|
+
function roundLength(v) {
|
|
33
|
+
return Math.round(v * 1e9) / 1e9;
|
|
34
|
+
}
|
|
35
|
+
/** The plan view of a wall's params, in metres, as `computeWallJoin` takes it. */
|
|
36
|
+
export function wallJoinWallFromParams(params) {
|
|
37
|
+
return {
|
|
38
|
+
start: [params.Start[0], params.Start[1]],
|
|
39
|
+
end: [params.End[0], params.End[1]],
|
|
40
|
+
thickness: params.Thickness,
|
|
41
|
+
alignment: params.Alignment,
|
|
42
|
+
offset: params.Offset,
|
|
43
|
+
startCut: params.StartCut,
|
|
44
|
+
endCut: params.EndCut,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Emit the body profile of `wall` (metres) in a wall frame whose origin sits
|
|
49
|
+
* `startX` metres before the wall's Start along the axis (0 when the placement
|
|
50
|
+
* origin is Start). Coordinates are converted to the anchor's native unit.
|
|
51
|
+
*/
|
|
52
|
+
export function emitWallBodyProfile(editor, anchor, wall, startX = 0) {
|
|
53
|
+
const outline = wallBodyOutline(wall);
|
|
54
|
+
const native = (v) => roundLength(toNativeLength(anchor, v));
|
|
55
|
+
if (outline.rectangular) {
|
|
56
|
+
const [x0, y0] = outline.corners[0];
|
|
57
|
+
const [x1, y1] = outline.corners[2];
|
|
58
|
+
// YDim straight from the thickness: y1 - y0 can pick up float noise.
|
|
59
|
+
return emitRectangleProfile(editor, native(x1 - x0), native(wall.thickness), native(startX + (x0 + x1) / 2), native((y0 + y1) / 2));
|
|
60
|
+
}
|
|
61
|
+
return emitPolygonProfile(editor, outline.corners.map(([x, y]) => [native(startX + x), native(y)]));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Emit the `Axis` representation: a 2D IfcPolyline from `fromX` to `toX`
|
|
65
|
+
* (metres) along the wall frame's X.
|
|
66
|
+
*/
|
|
67
|
+
export function emitWallAxisRepresentation(editor, anchor, fromX, toX) {
|
|
68
|
+
const from = editor.addEntity('IfcCartesianPoint', [[roundLength(toNativeLength(anchor, fromX)), 0]]).expressId;
|
|
69
|
+
const to = editor.addEntity('IfcCartesianPoint', [[roundLength(toNativeLength(anchor, toX)), 0]]).expressId;
|
|
70
|
+
const polyline = editor.addEntity('IfcPolyline', [[`#${from}`, `#${to}`]]).expressId;
|
|
71
|
+
return editor.addEntity('IfcShapeRepresentation', [
|
|
72
|
+
`#${anchor.axisContextId}`,
|
|
73
|
+
'Axis',
|
|
74
|
+
'Curve2D',
|
|
75
|
+
[`#${polyline}`],
|
|
76
|
+
]).expressId;
|
|
77
|
+
}
|
|
22
78
|
export function addWallToStore(editor, anchor, params) {
|
|
23
79
|
const { ownerHistoryId, bodyContextId, storeyId, storeyPlacementId } = anchor;
|
|
24
80
|
assertPositiveFinite([params.Thickness, params.Height], 'addWallToStore: Thickness and Height must be positive');
|
|
@@ -26,6 +82,15 @@ export function addWallToStore(editor, anchor, params) {
|
|
|
26
82
|
// `NaN <= 0` is false, so the distinct-points check below never fires.
|
|
27
83
|
// Validate the source coordinates instead of trusting the derived value.
|
|
28
84
|
assertFinitePoint3({ Start: params.Start, End: params.End }, 'addWallToStore');
|
|
85
|
+
const cuts = [params.Offset ?? 0, params.StartCut?.left ?? 0, params.StartCut?.right ?? 0, params.EndCut?.left ?? 0, params.EndCut?.right ?? 0];
|
|
86
|
+
if (cuts.some((v) => !Number.isFinite(v))) {
|
|
87
|
+
throw new Error('addWallToStore: Offset, StartCut and EndCut must be finite');
|
|
88
|
+
}
|
|
89
|
+
// The plan outline in metres, before the unit conversion below; throws when
|
|
90
|
+
// the cuts leave the body with no length.
|
|
91
|
+
const plan = wallJoinWallFromParams(params);
|
|
92
|
+
if (Math.hypot(plan.end[0] - plan.start[0], plan.end[1] - plan.start[1]) > 0)
|
|
93
|
+
wallBodyOutline(plan);
|
|
29
94
|
// Params are metres; convert dimensioned fields to the file's native
|
|
30
95
|
// length unit so the emitted STEP coordinates are correctly scaled
|
|
31
96
|
// (see SpatialAnchor.lengthUnitScale). Directions normalise the scale
|
|
@@ -55,17 +120,10 @@ export function addWallToStore(editor, anchor, params) {
|
|
|
55
120
|
// Placement at Start with local X = wall direction and local Z up. The
|
|
56
121
|
// Axis is written explicitly: IFC forbids a RefDirection without it (#5469).
|
|
57
122
|
const placementId = emitLocalPlacement(editor, storeyPlacementId, params.Start, undefined, dir);
|
|
58
|
-
//
|
|
59
|
-
// spans 0..wallLen along local X and
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
const profileId = editor.addEntity('IfcRectangleProfileDef', [
|
|
63
|
-
'.AREA.',
|
|
64
|
-
null,
|
|
65
|
-
`#${profilePos}`,
|
|
66
|
-
wallLen,
|
|
67
|
-
params.Thickness,
|
|
68
|
-
]).expressId;
|
|
123
|
+
// Body profile in the wall frame: by default a rectangle centred at
|
|
124
|
+
// (wallLen/2, 0), so the solid spans 0..wallLen along local X and
|
|
125
|
+
// -thickness/2..+thickness/2 on Y; alignment, offset and end cuts move it.
|
|
126
|
+
const profileId = emitWallBodyProfile(editor, anchor, plan);
|
|
69
127
|
// Extruded along +Z by Height.
|
|
70
128
|
const solidOriginPt = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
|
|
71
129
|
const solidAxis = editor.addEntity('IfcAxis2Placement3D', [`#${solidOriginPt}`, null, null]).expressId;
|
|
@@ -82,10 +140,15 @@ export function addWallToStore(editor, anchor, params) {
|
|
|
82
140
|
'SweptSolid',
|
|
83
141
|
[`#${solidId}`],
|
|
84
142
|
]).expressId;
|
|
143
|
+
// Axis in metres (the emitter converts): Start is the frame origin.
|
|
144
|
+
const axisRepId = params.Axis !== false
|
|
145
|
+
? emitWallAxisRepresentation(editor, anchor, 0, Math.hypot(plan.end[0] - plan.start[0], plan.end[1] - plan.start[1]))
|
|
146
|
+
: null;
|
|
147
|
+
// Body first: readers such as the viewer's wall edit take Representations[0] as the body.
|
|
85
148
|
const productShapeId = editor.addEntity('IfcProductDefinitionShape', [
|
|
86
149
|
null,
|
|
87
150
|
null,
|
|
88
|
-
[`#${shapeRepId}`],
|
|
151
|
+
axisRepId === null ? [`#${shapeRepId}`] : [`#${shapeRepId}`, `#${axisRepId}`],
|
|
89
152
|
]).expressId;
|
|
90
153
|
// `IfcWall.PredefinedType` only exists from IFC4 onward.
|
|
91
154
|
const wallAttrs = [
|
|
@@ -119,6 +182,7 @@ export function addWallToStore(editor, anchor, params) {
|
|
|
119
182
|
profileId,
|
|
120
183
|
solidId,
|
|
121
184
|
shapeRepId,
|
|
185
|
+
axisRepId,
|
|
122
186
|
productShapeId,
|
|
123
187
|
relContainedId,
|
|
124
188
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wall.js","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D
|
|
1
|
+
{"version":3,"file":"wall.js","sourceRoot":"","sources":["../../src/in-store/wall.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAA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ACJ,IAAI;QACJ,CAAC,IAAI,MAAM,EAAE,CAAC;QACd,IAAI,QAAQ,EAAE;KACf,CAAC,CAAC,SAAS,CAAC;IAEb,OAAO;QACL,MAAM;QACN,WAAW;QACX,SAAS;QACT,OAAO;QACP,UAAU;QACV,SAAS;QACT,cAAc;QACd,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -35,4 +35,11 @@ export interface WindowBuildResult {
|
|
|
35
35
|
relContainedId: number;
|
|
36
36
|
}
|
|
37
37
|
export declare function addWindowToStore(editor: StoreEditor, anchor: SpatialAnchor, params: WindowInStoreParams): WindowBuildResult;
|
|
38
|
+
/**
|
|
39
|
+
* IfcWindow's attributes after the IfcElement header: OverallHeight and
|
|
40
|
+
* OverallWidth in every schema, then PredefinedType / PartitioningType /
|
|
41
|
+
* UserDefinedPartitioningType from IFC4 on. Shared by the hosted window
|
|
42
|
+
* builder. `Height`/`Width` must already be in the native length unit.
|
|
43
|
+
*/
|
|
44
|
+
export declare function windowAttributeTail(schema: SpatialAnchor['schema'], params: Pick<WindowInStoreParams, 'Height' | 'Width' | 'PredefinedType' | 'PartitioningType' | 'UserDefinedPartitioningType'>): unknown[];
|
|
38
45
|
//# sourceMappingURL=window.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../src/in-store/window.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AA8BjF,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACn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U,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,CAAC;IACpF,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,mBAAmB,GAC1B,iBAAiB,CA+BnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,OAAO,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,6BAA6B,CAAC,GAC5H,OAAO,EAAE,CAeX"}
|
package/dist/in-store/window.js
CHANGED
|
@@ -41,26 +41,33 @@ export function addWindowToStore(editor, anchor, params) {
|
|
|
41
41
|
const profileId = emitRectangleProfile(editor, params.Width, thickness);
|
|
42
42
|
const solidId = emitExtrudedSolid(editor, profileId, params.Height);
|
|
43
43
|
const { shapeRepId, productShapeId } = emitBodyRepresentation(editor, anchor.bodyContextId, solidId);
|
|
44
|
-
const isIFC2X3 = (anchor.schema ?? 'IFC4') === 'IFC2X3';
|
|
45
44
|
const attrs = ifcElementHeader(anchor.ownerHistoryId, placementId, productShapeId, params, 'Window', anchor.guidRandom);
|
|
46
|
-
attrs.push(
|
|
47
|
-
if (!isIFC2X3) {
|
|
48
|
-
// Free-form values that aren't part of IfcWindowTypePartitioningEnum
|
|
49
|
-
// are normalised to .USERDEFINED. + UserDefinedPartitioningType so
|
|
50
|
-
// they round-trip through STEP without producing invalid `.<value>.`
|
|
51
|
-
// enum tokens.
|
|
52
|
-
const requested = params.PartitioningType ?? 'NOTDEFINED';
|
|
53
|
-
const isKnownEnum = WINDOW_PARTITIONING_ENUM.has(requested);
|
|
54
|
-
const partitioningType = isKnownEnum ? requested : 'USERDEFINED';
|
|
55
|
-
const userDefined = partitioningType === 'USERDEFINED'
|
|
56
|
-
? (isKnownEnum ? params.UserDefinedPartitioningType ?? null : requested)
|
|
57
|
-
: null;
|
|
58
|
-
attrs.push(`.${params.PredefinedType ?? 'NOTDEFINED'}.`);
|
|
59
|
-
attrs.push(`.${partitioningType}.`);
|
|
60
|
-
attrs.push(userDefined);
|
|
61
|
-
}
|
|
45
|
+
attrs.push(...windowAttributeTail(anchor.schema, params));
|
|
62
46
|
const windowId = editor.addEntity('IfcWindow', attrs).expressId;
|
|
63
47
|
const relContainedId = emitRelContainedInSpatialStructure(editor, anchor.ownerHistoryId, windowId, anchor.storeyId, anchor.guidRandom);
|
|
64
48
|
return { windowId, placementId, profileId, solidId, shapeRepId, productShapeId, relContainedId };
|
|
65
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* IfcWindow's attributes after the IfcElement header: OverallHeight and
|
|
52
|
+
* OverallWidth in every schema, then PredefinedType / PartitioningType /
|
|
53
|
+
* UserDefinedPartitioningType from IFC4 on. Shared by the hosted window
|
|
54
|
+
* builder. `Height`/`Width` must already be in the native length unit.
|
|
55
|
+
*/
|
|
56
|
+
export function windowAttributeTail(schema, params) {
|
|
57
|
+
const tail = [params.Height, params.Width];
|
|
58
|
+
if ((schema ?? 'IFC4') === 'IFC2X3')
|
|
59
|
+
return tail;
|
|
60
|
+
// Free-form values that aren't part of IfcWindowTypePartitioningEnum
|
|
61
|
+
// are normalised to .USERDEFINED. + UserDefinedPartitioningType so
|
|
62
|
+
// they round-trip through STEP without producing invalid `.<value>.`
|
|
63
|
+
// enum tokens.
|
|
64
|
+
const requested = params.PartitioningType ?? 'NOTDEFINED';
|
|
65
|
+
const isKnownEnum = WINDOW_PARTITIONING_ENUM.has(requested);
|
|
66
|
+
const partitioningType = isKnownEnum ? requested : 'USERDEFINED';
|
|
67
|
+
const userDefined = partitioningType === 'USERDEFINED'
|
|
68
|
+
? (isKnownEnum ? params.UserDefinedPartitioningType ?? null : requested)
|
|
69
|
+
: null;
|
|
70
|
+
tail.push(`.${params.PredefinedType ?? 'NOTDEFINED'}.`, `.${partitioningType}.`, userDefined);
|
|
71
|
+
return tail;
|
|
72
|
+
}
|
|
66
73
|
//# sourceMappingURL=window.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.js","sourceRoot":"","sources":["../../src/in-store/window.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAS/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kCAAkC,EAClC,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,cAAc;IACd,uBAAuB;IACvB,yBAAyB;IACzB,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,yBAAyB;IACzB,aAAa;IACb,YAAY;CACb,CAAC,CAAC;AAiCH,MAAM,UAAU,gBAAgB,CAC9B,MAAmB,EACnB,MAAqB,EACrB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AQ;QAAE,OAAO,IAAI,CAAC;IACjD,qEAAqE;IACrE,mEAAmE;IACnE,qEAAqE;IACrE,eAAe;IACf,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,IAAI,YAAY,CAAC;IAC1D,MAAM,WAAW,GAAG,wBAAwB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC5D,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC;IACjE,MAAM,WAAW,GAAG,gBAAgB,KAAK,aAAa;QACpD,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,2BAA2B,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACxE,CAAC,CAAC,IAAI,CAAC;IACT,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,cAAc,IAAI,YAAY,GAAG,EAAE,IAAI,gBAAgB,GAAG,EAAE,WAAW,CAAC,CAAC;IAC9F,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,37 +33,7 @@ export type { VerticalSegment, VerticalSegmentType } from './landxml/profile-geo
|
|
|
33
33
|
export type { StationEquationParams } from './ifc-creator-alignment-referents.js';
|
|
34
34
|
export type * from './landxml/source-types.js';
|
|
35
35
|
export type * from './landxml/result-types.js';
|
|
36
|
-
export
|
|
37
|
-
export { addWallToStore, type WallInStoreParams, type WallBuildResult } from './in-store/wall.js';
|
|
38
|
-
export { addSlabToStore, type SlabInStoreParams, type SlabRectangleParams, type SlabPolygonParams, type SlabBuildResult } from './in-store/slab.js';
|
|
39
|
-
export { addBeamToStore, type BeamInStoreParams, type BeamBuildResult } from './in-store/beam.js';
|
|
40
|
-
export { addDoorToStore, type DoorInStoreParams, type DoorBuildResult } from './in-store/door.js';
|
|
41
|
-
export { addWindowToStore, type WindowInStoreParams, type WindowBuildResult } from './in-store/window.js';
|
|
42
|
-
export { addSpaceToStore, type SpaceInStoreParams, type SpaceRectangleParams, type SpacePolygonParams, type SpaceBuildResult } from './in-store/space.js';
|
|
43
|
-
export { addSpatialZonesToStore, spatialZonesSupported, type SpatialZoneInput, type SpatialZoneInStoreParams, type SpatialZoneBuildResult, type SpatialZoneType, } from './in-store/spatial-zone.js';
|
|
44
|
-
export { applyStylesInStore, collectLeafRepresentationItems, type ApplyStyleOptions, type ApplyStyleResult, type StyleBatch, type SurfaceStyleColor, } from './in-store/apply-style.js';
|
|
45
|
-
export { addRoofToStore, type RoofInStoreParams, type RoofRectangleParams, type RoofPolygonParams, type RoofBuildResult } from './in-store/roof.js';
|
|
46
|
-
export { addPlateToStore, type PlateInStoreParams, type PlateRectangleParams, type PlatePolygonParams, type PlateBuildResult } from './in-store/plate.js';
|
|
47
|
-
export { addMemberToStore, type MemberInStoreParams, type MemberBuildResult } from './in-store/member.js';
|
|
48
|
-
export { addCostScheduleToStore, addCostItemToStore, addCostValueToStore, addCostQuantityToStore, nestCostItemsInStore, assignCostItemsToScheduleInStore, assignObjectsToCostItemInStore, attachCostValuesToItemInStore, type CostAnchor, type ExistingRelatedList, } from './in-store/cost.js';
|
|
49
|
-
export { removeCostEntityInStore, type CostRemovalReferrers } from './in-store/cost-removal.js';
|
|
50
|
-
export { resolveSpatialAnchor } from './in-store/resolve-anchor.js';
|
|
51
|
-
export { toNativeLength, fromNativeLength } from './in-store/anchor.js';
|
|
52
|
-
export type { SpatialAnchor } from './in-store/anchor.js';
|
|
53
|
-
export { duplicateInStore, type SourceAttributes, type DuplicateInStoreOptions, type DuplicateBuildResult, type Vec3 as DuplicateVec3, } from './in-store/duplicate.js';
|
|
54
|
-
export { resolveDuplicateSource } from './in-store/resolve-source.js';
|
|
55
|
-
export { detectEnclosedAreas, type Vec2 as AutoSpaceVec2, type Segment as AutoSpaceSegment, type DetectedSpace, type DetectOptions as AutoSpaceDetectOptions, } from './in-store/auto-space-detect.js';
|
|
56
|
-
export { extractWallSegmentsForStorey, existingSpaceFootprintsByStorey, type OverlayWallReader, type WallExtractionResult, } from './in-store/extract-walls.js';
|
|
57
|
-
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, type StoreyPlanFrame, } from './in-store/storey-plan-frame.js';
|
|
58
|
-
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, type GenerateSpacesOptions, type GenerateSpacesResult, type BoundaryMode, } from './in-store/generate-spaces.js';
|
|
59
|
-
export { generateSpaces, listStoreys, type GenerateSpacesAllOptions, type GenerateSpacesAllResult, type GenerateSpacesStoreyResult, type StoreyInfo, } from './in-store/generate-spaces-all.js';
|
|
60
|
-
export { addStructuralAnalysisModelToStore, type StructuralAnalysisModelInStoreParams, type StructuralAnalysisModelBuildResult, type StructuralAnalysisModelType, } from './in-store/structural-analysis-model.js';
|
|
61
|
-
export { addStructuralCurveMemberToStore, type StructuralCurveMemberInStoreParams, type StructuralCurveMemberBuildResult, type StructuralCurveMemberType, } from './in-store/structural-curve-member.js';
|
|
62
|
-
export { addStructuralPointConnectionToStore, type StructuralPointConnectionInStoreParams, type StructuralPointConnectionBuildResult, type StructuralBoundaryConditionParams, } from './in-store/structural-point-connection.js';
|
|
63
|
-
export { addStructuralLoadGroupToStore, type StructuralLoadGroupInStoreParams, type StructuralLoadGroupBuildResult, type StructuralLoadGroupType, type StructuralActionType, type StructuralActionSourceType, } from './in-store/structural-load-group.js';
|
|
64
|
-
export { addStructuralPointActionToStore, addStructuralLinearActionToStore, type StructuralPointActionInStoreParams, type StructuralPointActionBuildResult, type StructuralLinearActionInStoreParams, type StructuralLinearActionBuildResult, type StructuralGlobalOrLocal, } from './in-store/structural-action.js';
|
|
65
|
-
export { connectStructuralMemberToConnectionInStore, connectStructuralActivityToItemInStore, assignToStructuralGroupInStore, } from './in-store/structural-relationships.js';
|
|
66
|
-
export { addDrawingMarkupToStore, addMeasureMarkupToStore, addPolygonAreaMarkupToStore, addTextMarkupToStore, addCloudMarkupToStore, DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, type DrawingMarkupObjectType, type MarkupAnchor, type MarkupPoint2D, type MeasureMarkupParams, type MeasureMarkupResult, type PolygonAreaMarkupParams, type PolygonAreaMarkupResult, type TextMarkupParams, type TextMarkupResult, type CloudMarkupParams, type CloudMarkupResult, type DrawingMarkupBatchInput, type DrawingMarkupBatchResult, } from './in-store/drawing-markup.js';
|
|
36
|
+
export * from './in-store/index.js';
|
|
67
37
|
export type { Point3D, Point2D, Placement3D, RectangleProfile, ArbitraryProfile, CircleProfile, CircleHollowProfile, IShapeProfile, LShapeProfile, TShapeProfile, UShapeProfile, CShapeProfile, RectangleHollowProfile, ProfileDef, RectangularOpening, GenericElementParams, AxisElementParams, ElementAttributes, WallParams, SlabParams, ColumnParams, BeamParams, StairParams, RoofParams, GableRoofParams, WallDoorParams, WallWindowParams, DoorParams, WindowParams, RampParams, RailingParams, PlateParams, MemberParams, FootingParams, PileParams, SpaceParams, CurtainWallParams, FurnishingParams, ProxyParams, PropertyType, PropertyMeasureType, PropertyDef, PropertySetDef, QuantityKind, QuantityDef, QuantitySetDef, MaterialLayerDef, MaterialDef, ProjectParams, SiteParams, BuildingParams, StoreyParams, IfcWorkScheduleParams, IfcWorkPlanParams, IfcTaskParams, IfcRelSequenceParams, IfcWorkCalendarParams, IfcWorkTimeParams, IfcRecurrencePatternParams, IfcTimePeriodParams, IfcWorkScheduleType, IfcTaskPredefinedType, IfcTaskDurationType, IfcRelSequenceType, IfcWorkCalendarType, IfcRecurrenceType, WorkScheduleParams, WorkPlanParams, TaskParams, SequenceParams, WorkCalendarParams, WorkTimeParams, RecurrencePatternParams, TimePeriodParams, WorkScheduleType, TaskPredefinedType, TaskDurationType, SequenceType, WorkCalendarType, RecurrenceType, CreatedEntity, CreateResult, } from './types.js';
|
|
68
38
|
export type { CostArithmeticOperator, CostItemParams, CostItemPredefinedType, CostMeasureType, CostQuantityKind, CostQuantityParams, CostScheduleParams, CostSchedulePredefinedType, CostSIUnitType, CostTypedValue, CostValueParams, SIUnitParams, } from './types-cost.js';
|
|
69
39
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,YAAY,EACV,oBAAoB,EAAE,iBAAiB,EAAE,uBAAuB,EAChE,oBAAoB,EAAE,oBAAoB,EAAE,aAAa,GAC1D,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,2BAA2B,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,iBAAiB,GACnF,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAAE,oBAAoB,EAAE,KAAK,qBAAqB,GAC7E,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EACnF,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAC/F,KAAK,aAAa,EAAE,KAAK,gBAAgB,GAC1C,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACnF,YAAY,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AACnF,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAClF,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,2BAA2B,CAAC;
|
|
1
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,aAAa,EACb,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAGlB,oBAAoB,EACpB,iBAAiB,EAGjB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EAGX,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EAGd,gBAAgB,EAChB,WAAW,EAGX,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EAKZ,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EAGd,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,38 +30,6 @@ export { LANDXML_IFC_MAPPING_VERSION, landXmlGlobalId, landXmlToIfc, } from './l
|
|
|
30
30
|
export { TRANSVERSE_MERCATOR_BOUNDS, checkCoordinateOrder, } from './landxml/coordinate-plausibility.js';
|
|
31
31
|
export { alignmentMappingOf, alignmentRefusalMessage, collectRefusals, isMappableSurface, refusalReason, } from './landxml/refusals.js';
|
|
32
32
|
export { ALIGNMENT_POSITION_TOLERANCE_M, cogoPointResolver, isAlignmentRecord, mapAlignments, } from './landxml/alignment-mapping.js';
|
|
33
|
-
// In-store
|
|
34
|
-
|
|
35
|
-
export { addColumnToStore } from './in-store/column.js';
|
|
36
|
-
export { addWallToStore } from './in-store/wall.js';
|
|
37
|
-
export { addSlabToStore } from './in-store/slab.js';
|
|
38
|
-
export { addBeamToStore } from './in-store/beam.js';
|
|
39
|
-
export { addDoorToStore } from './in-store/door.js';
|
|
40
|
-
export { addWindowToStore } from './in-store/window.js';
|
|
41
|
-
export { addSpaceToStore } from './in-store/space.js';
|
|
42
|
-
export { addSpatialZonesToStore, spatialZonesSupported, } from './in-store/spatial-zone.js';
|
|
43
|
-
export { applyStylesInStore, collectLeafRepresentationItems, } from './in-store/apply-style.js';
|
|
44
|
-
export { addRoofToStore } from './in-store/roof.js';
|
|
45
|
-
export { addPlateToStore } from './in-store/plate.js';
|
|
46
|
-
export { addMemberToStore } from './in-store/member.js';
|
|
47
|
-
export { addCostScheduleToStore, addCostItemToStore, addCostValueToStore, addCostQuantityToStore, nestCostItemsInStore, assignCostItemsToScheduleInStore, assignObjectsToCostItemInStore, attachCostValuesToItemInStore, } from './in-store/cost.js';
|
|
48
|
-
export { removeCostEntityInStore } from './in-store/cost-removal.js';
|
|
49
|
-
export { resolveSpatialAnchor } from './in-store/resolve-anchor.js';
|
|
50
|
-
export { toNativeLength, fromNativeLength } from './in-store/anchor.js';
|
|
51
|
-
export { duplicateInStore, } from './in-store/duplicate.js';
|
|
52
|
-
export { resolveDuplicateSource } from './in-store/resolve-source.js';
|
|
53
|
-
export { detectEnclosedAreas, } from './in-store/auto-space-detect.js';
|
|
54
|
-
export { extractWallSegmentsForStorey, existingSpaceFootprintsByStorey, } from './in-store/extract-walls.js';
|
|
55
|
-
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, } from './in-store/storey-plan-frame.js';
|
|
56
|
-
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, } from './in-store/generate-spaces.js';
|
|
57
|
-
export { generateSpaces, listStoreys, } from './in-store/generate-spaces-all.js';
|
|
58
|
-
// Structural analysis authoring (#5167 task S.1) — IfcStructuralAnalysisModel
|
|
59
|
-
// and its members/connections/loads/relationships.
|
|
60
|
-
export { addStructuralAnalysisModelToStore, } from './in-store/structural-analysis-model.js';
|
|
61
|
-
export { addStructuralCurveMemberToStore, } from './in-store/structural-curve-member.js';
|
|
62
|
-
export { addStructuralPointConnectionToStore, } from './in-store/structural-point-connection.js';
|
|
63
|
-
export { addStructuralLoadGroupToStore, } from './in-store/structural-load-group.js';
|
|
64
|
-
export { addStructuralPointActionToStore, addStructuralLinearActionToStore, } from './in-store/structural-action.js';
|
|
65
|
-
export { connectStructuralMemberToConnectionInStore, connectStructuralActivityToItemInStore, assignToStructuralGroupInStore, } from './in-store/structural-relationships.js';
|
|
66
|
-
export { addDrawingMarkupToStore, addMeasureMarkupToStore, addPolygonAreaMarkupToStore, addTextMarkupToStore, addCloudMarkupToStore, DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, } from './in-store/drawing-markup.js';
|
|
33
|
+
// In-store authoring API, kept separate from create-from-scratch types.
|
|
34
|
+
export * from './in-store/index.js';
|
|
67
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,gFAAgF;AAChF,OAAO,EACL,2BAA2B,EAAE,eAAe,EAAE,YAAY,GAC3D,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAAE,oBAAoB,GACjD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,GAGpF,MAAM,gCAAgC,CAAC;AAQxC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,gFAAgF;AAChF,OAAO,EACL,2BAA2B,EAAE,eAAe,EAAE,YAAY,GAC3D,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAAE,oBAAoB,GACjD,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAAE,uBAAuB,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,GAGpF,MAAM,gCAAgC,CAAC;AAQxC,wEAAwE;AACxE,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why rail cant and road superelevation are refused, and on which alignments
|
|
3
|
+
* (mapping spec §13).
|
|
4
|
+
*
|
|
5
|
+
* Both are refused on purpose, for reasons that are about IFC 4.3 ADD2 and the
|
|
6
|
+
* source format rather than about missing code, so the refusal says which:
|
|
7
|
+
*
|
|
8
|
+
* - cant has an IFC home (`IfcAlignmentCant`), but IFC permits it only beside
|
|
9
|
+
* a vertical layout and requires an `IfcSegmentedReferenceCurve` for it that
|
|
10
|
+
* no engine this repo does not control can yet regenerate (§13.2);
|
|
11
|
+
* - superelevation has an IFC home too (`IfcReferent` `.SUPERELEVATIONEVENT.`
|
|
12
|
+
* with `Pset_Superelevation`), but it needs values LandXML does not carry
|
|
13
|
+
* (§13.4).
|
|
14
|
+
*
|
|
15
|
+
* The records stay opaque (`source-types.ts`): only the alignment's name and
|
|
16
|
+
* how many records it carries are read, so a refusal cannot quietly become a
|
|
17
|
+
* partial export.
|
|
18
|
+
*/
|
|
19
|
+
import type { LandXmlIfcAlignment } from './source-types.js';
|
|
20
|
+
/** §13.2, in the operator's terms. */
|
|
21
|
+
export declare const CANT_REFUSAL_REASON: string;
|
|
22
|
+
/** §13.4, in the operator's terms. */
|
|
23
|
+
export declare const SUPERELEVATION_REFUSAL_REASON: string;
|
|
24
|
+
/** Every alignment that carries cant, named with its station count. */
|
|
25
|
+
export declare function cantRefusalMessage(alignments: readonly LandXmlIfcAlignment[]): string;
|
|
26
|
+
/** Every alignment that carries superelevation, named with its block count. */
|
|
27
|
+
export declare function superelevationRefusalMessage(alignments: readonly LandXmlIfcAlignment[]): string;
|
|
28
|
+
//# sourceMappingURL=cant-superelevation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cant-superelevation.d.ts","sourceRoot":"","sources":["../../src/landxml/cant-superelevation.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,QAK+C,CAAC;AAEhF,sCAAsC;AACtC,eAAO,MAAM,6BAA6B,QAIgB,CAAC;AAI3D,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,GAAG,MAAM,CAMrF;AAED,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,GAAG,MAAM,CAO/F"}
|
|
@@ -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
|
+
/** §13.2, in the operator's terms. */
|
|
5
|
+
export const CANT_REFUSAL_REASON = 'IFC 4.3 carries rail cant as an IfcAlignmentCant, which it permits only together with a vertical layout '
|
|
6
|
+
+ '(cant heights are measured from it), and whose geometry must be an IfcSegmentedReferenceCurve on that '
|
|
7
|
+
+ "layout's IfcGradientCurve; that geometry cannot yet be checked by an independent engine, and LandXML "
|
|
8
|
+
+ "gives the track gauge, not the rail-head distance IFC needs, so the alignment is written with its "
|
|
9
|
+
+ 'horizontal (and, where profiled, vertical) layout only (mapping spec §13)';
|
|
10
|
+
/** §13.4, in the operator's terms. */
|
|
11
|
+
export const SUPERELEVATION_REFUSAL_REASON = 'IFC 4.3 carries road superelevation as IfcReferent .SUPERELEVATIONEVENT. with Pset_Superelevation, which '
|
|
12
|
+
+ 'needs a cross slope and a side at every event; LandXML gives the event stations and one FullSuperelev rate, '
|
|
13
|
+
+ 'but not the normal-crown slope at the runout events, nor the side, nor an unambiguous scale for the rate, '
|
|
14
|
+
+ 'so writing it would invent values (mapping spec §13)';
|
|
15
|
+
const plural = (count, word) => `${count} ${word}${count === 1 ? '' : 's'}`;
|
|
16
|
+
/** Every alignment that carries cant, named with its station count. */
|
|
17
|
+
export function cantRefusalMessage(alignments) {
|
|
18
|
+
const carrying = alignments.filter((alignment) => alignment.cant || (alignment.cantStations?.length ?? 0) > 0);
|
|
19
|
+
const named = carrying.map((alignment) => `'${alignment.name || alignment.sourceId}': ${plural(alignment.cantStations?.length ?? 0, 'CantStation')}`);
|
|
20
|
+
return `${plural(carrying.length, 'cant record')} will not be included (${named.join('; ')}): `
|
|
21
|
+
+ `${CANT_REFUSAL_REASON}.`;
|
|
22
|
+
}
|
|
23
|
+
/** Every alignment that carries superelevation, named with its block count. */
|
|
24
|
+
export function superelevationRefusalMessage(alignments) {
|
|
25
|
+
const carrying = alignments.filter((alignment) => (alignment.superelevations?.length ?? 0) > 0);
|
|
26
|
+
const total = carrying.reduce((n, alignment) => n + (alignment.superelevations?.length ?? 0), 0);
|
|
27
|
+
const named = carrying.map((alignment) => `'${alignment.name || alignment.sourceId}': ${plural(alignment.superelevations?.length ?? 0, 'Superelevation block')}`);
|
|
28
|
+
return `${plural(total, 'superelevation record')} will not be included (${named.join('; ')}): `
|
|
29
|
+
+ `${SUPERELEVATION_REFUSAL_REASON}.`;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=cant-superelevation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cant-superelevation.js","sourceRoot":"","sources":["../../src/landxml/cant-superelevation.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAuB/D,sCAAsC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAC9B,0GAA0G;MACxG,wGAAwG;MACxG,uGAAuG;MACvG,oGAAoG;MACpG,2EAA2E,CAAC;AAEhF,sCAAsC;AACtC,MAAM,CAAC,MAAM,6BAA6B,GACxC,2GAA2G;MACzG,8GAA8G;MAC9G,4GAA4G;MAC5G,sDAAsD,CAAC;AAE3D,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,IAAY,EAAU,EAAE,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AAEpG,uEAAuE;AACvE,MAAM,UAAU,kBAAkB,CAAC,UAA0C;IAC3E,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,M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1,8 @@
|
|
|
1
1
|
import { type CrsPlausibilityBounds } from './coordinate-plausibility.js';
|
|
2
2
|
import type { LandXmlIfcSource } from './source-types.js';
|
|
3
|
-
import type { LandXmlIfcResult } from './result-types.js';
|
|
3
|
+
import type { LandXmlIfcImagery, LandXmlIfcResult } from './result-types.js';
|
|
4
4
|
/** The mapping-document version this converter implements. */
|
|
5
|
-
export declare const LANDXML_IFC_MAPPING_VERSION = "1.
|
|
5
|
+
export declare const LANDXML_IFC_MAPPING_VERSION = "1.4";
|
|
6
6
|
export interface LandXmlIfcOptions {
|
|
7
7
|
/** Recorded as provenance (§7); never used to decide anything. */
|
|
8
8
|
sourceFileName?: string;
|
|
@@ -27,6 +27,12 @@ export interface LandXmlIfcOptions {
|
|
|
27
27
|
* (§2.2 item 2). Recorded as provenance, exactly like the units override.
|
|
28
28
|
*/
|
|
29
29
|
swapNorthingEasting?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Imagery the caller will texture on the TIN (§15.5), recorded as
|
|
32
|
+
* provenance in `LandXML_Conversion`. The texture is not written here: the
|
|
33
|
+
* appearance workspace's planner writes it on `surfaceElements`.
|
|
34
|
+
*/
|
|
35
|
+
imagery?: LandXmlIfcImagery;
|
|
30
36
|
/** Fixed epoch-ms, for byte-deterministic output. */
|
|
31
37
|
timestampMs?: number;
|
|
32
38
|
Author?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landxml-to-ifc.d.ts","sourceRoot":"","sources":["../../src/landxml/landxml-to-ifc.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAMhG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"landxml-to-ifc.d.ts","sourceRoot":"","sources":["../../src/landxml/landxml-to-ifc.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAwB,KAAK,qBAAq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