@ifc-lite/create 3.2.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/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 +10 -1
- package/dist/in-store/column.d.ts.map +1 -1
- package/dist/in-store/column.js +23 -22
- 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/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 +6 -69
- 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-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/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/placement-frame.d.ts +9 -4
- package/dist/in-store/placement-frame.d.ts.map +1 -1
- package/dist/in-store/placement-frame.js +20 -35
- 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/resolve-host.d.ts +12 -1
- package/dist/in-store/resolve-host.d.ts.map +1 -1
- package/dist/in-store/resolve-host.js +169 -85
- package/dist/in-store/resolve-host.js.map +1 -1
- package/dist/in-store/resolve-source.d.ts.map +1 -1
- package/dist/in-store/resolve-source.js +39 -59
- package/dist/in-store/resolve-source.js.map +1 -1
- package/dist/in-store/schema-attributes.d.ts +5 -0
- package/dist/in-store/schema-attributes.d.ts.map +1 -1
- package/dist/in-store/schema-attributes.js +9 -2
- package/dist/in-store/schema-attributes.js.map +1 -1
- 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/index.d.ts +1 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -40
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,79 @@
|
|
|
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 { applyFrame, contextDimension, inverseFrame, refId } from './host-geometry-frame.js';
|
|
5
|
+
import { retainedHostedScale } from './hosted-scale-chain.js';
|
|
6
|
+
const ref = (id) => `#${id}`;
|
|
7
|
+
export function scaleHostedShape(reader, editor, productId, inHost, hostAnchor, widthScale, heightScale) {
|
|
8
|
+
const product = reader.entity(productId);
|
|
9
|
+
const shapeId = product ? refId(product.attributes[6]) : null;
|
|
10
|
+
const shape = shapeId === null ? null : reader.entity(shapeId);
|
|
11
|
+
if (shape?.type.toUpperCase() !== 'IFCPRODUCTDEFINITIONSHAPE' || !Array.isArray(shape.attributes[2])) {
|
|
12
|
+
throw new Error(`Representation of #${productId} cannot be resized without losing its geometry`);
|
|
13
|
+
}
|
|
14
|
+
const inverse = inverseFrame(inHost);
|
|
15
|
+
const localAnchor = applyFrame(inverse, hostAnchor);
|
|
16
|
+
// The renderer/IfcOpenShell compose MappingTarget * MappingOrigin. The
|
|
17
|
+
// source frame therefore maps product coordinates into host coordinates
|
|
18
|
+
// relative to the held anchor; the target maps scaled host axes back into
|
|
19
|
+
// the product. Together this is P^-1 * anchoredScale * P, not its inverse.
|
|
20
|
+
const sourceAnchor = inHost.o.map((value, axis) => value - hostAnchor[axis]);
|
|
21
|
+
const sourcePoint3 = editor.addEntity('IfcCartesianPoint', [sourceAnchor]).expressId;
|
|
22
|
+
const sourceX = editor.addEntity('IfcDirection', [inHost.x]).expressId;
|
|
23
|
+
const sourceZ = editor.addEntity('IfcDirection', [inHost.z]).expressId;
|
|
24
|
+
const point3 = editor.addEntity('IfcCartesianPoint', [localAnchor]).expressId;
|
|
25
|
+
const directions = [inverse.x, inverse.y, inverse.z].map(v => editor.addEntity('IfcDirection', [v]).expressId);
|
|
26
|
+
const origin3 = editor.addEntity('IfcAxis2Placement3D', [ref(sourcePoint3), ref(sourceZ), ref(sourceX)]).expressId;
|
|
27
|
+
const representations = [];
|
|
28
|
+
if (shape.attributes[2].length === 0 || shape.attributes[2].length > 10_000)
|
|
29
|
+
throw new Error('The representation list cannot be resized safely');
|
|
30
|
+
for (const value of shape.attributes[2]) {
|
|
31
|
+
const repId = refId(value), rep = repId === null ? null : reader.entity(repId);
|
|
32
|
+
const contextId = rep ? refId(rep.attributes[0]) : null;
|
|
33
|
+
const dimension = contextId === null ? null : contextDimension(reader, contextId);
|
|
34
|
+
if (rep?.type.toUpperCase() !== 'IFCSHAPEREPRESENTATION' || repId === null || contextId === null || dimension === null) {
|
|
35
|
+
throw new Error(`A representation of #${productId} cannot be resized without losing its geometry`);
|
|
36
|
+
}
|
|
37
|
+
const retained = retainedHostedScale(reader, repId, dimension, inHost, sourceAnchor, inverse, localAnchor);
|
|
38
|
+
const width = widthScale * (retained?.width ?? 1);
|
|
39
|
+
const height = heightScale * (retained?.height ?? 1);
|
|
40
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0)
|
|
41
|
+
throw new Error('The cumulative representation scale is invalid');
|
|
42
|
+
let origin = origin3, target;
|
|
43
|
+
if (dimension === 2) {
|
|
44
|
+
// A plan representation lives in local XY. Tilting it into another
|
|
45
|
+
// plane cannot be represented by a 2D operator; refuse instead.
|
|
46
|
+
if (Math.abs(inverse.z[0]) > 1e-9 || Math.abs(inverse.z[1]) > 1e-9 || Math.abs(inverse.z[2] - 1) > 1e-9) {
|
|
47
|
+
throw new Error(`The plan representation of #${productId} has an unsupported tilted frame`);
|
|
48
|
+
}
|
|
49
|
+
const sourcePoint = editor.addEntity('IfcCartesianPoint', [[sourceAnchor[0], sourceAnchor[1]]]).expressId;
|
|
50
|
+
const sourceDirection = editor.addEntity('IfcDirection', [[inHost.x[0], inHost.x[1]]]).expressId;
|
|
51
|
+
const point = editor.addEntity('IfcCartesianPoint', [[localAnchor[0], localAnchor[1]]]).expressId;
|
|
52
|
+
const x = editor.addEntity('IfcDirection', [[inverse.x[0], inverse.x[1]]]).expressId;
|
|
53
|
+
const y = editor.addEntity('IfcDirection', [[inverse.y[0], inverse.y[1]]]).expressId;
|
|
54
|
+
origin = editor.addEntity('IfcAxis2Placement2D', [ref(sourcePoint), ref(sourceDirection)]).expressId;
|
|
55
|
+
target = editor.addEntity('IfcCartesianTransformationOperator2DnonUniform', [ref(x), ref(y), ref(point), width, 1]).expressId;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
target = editor.addEntity('IfcCartesianTransformationOperator3DnonUniform', [
|
|
59
|
+
ref(directions[0]), ref(directions[1]), ref(point3), width, ref(directions[2]), 1, height,
|
|
60
|
+
]).expressId;
|
|
61
|
+
}
|
|
62
|
+
const map = editor.addEntity('IfcRepresentationMap', [ref(origin), ref(retained?.repId ?? repId)]).expressId;
|
|
63
|
+
const item = editor.addEntity('IfcMappedItem', [ref(map), ref(target)]).expressId;
|
|
64
|
+
const identifier = rep.attributes[1] ?? null;
|
|
65
|
+
if (identifier !== null && typeof identifier !== 'string')
|
|
66
|
+
throw new Error('An unreadable representation identifier is refused');
|
|
67
|
+
representations.push(ref(editor.addEntity('IfcShapeRepresentation', [ref(contextId), identifier, 'MappedRepresentation', [ref(item)]]).expressId));
|
|
68
|
+
}
|
|
69
|
+
const label = (value) => {
|
|
70
|
+
if (value === null || value === undefined)
|
|
71
|
+
return null;
|
|
72
|
+
if (typeof value !== 'string')
|
|
73
|
+
throw new Error('An unreadable product shape label is refused');
|
|
74
|
+
return value;
|
|
75
|
+
};
|
|
76
|
+
const nextShape = editor.addEntity('IfcProductDefinitionShape', [label(shape.attributes[0]), label(shape.attributes[1]), representations]).expressId;
|
|
77
|
+
editor.setPositionalAttribute(productId, 6, ref(nextShape));
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=hosted-shape-edit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-shape-edit.js","sourceRoot":"","sources":["../../src/in-store/hosted-shape-edit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAQ/D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAA0B,MAAM,0BAA0B,CAAC;AACrH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,GAAG,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,EAAE,E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AG,CAAC,KAAc,EAAiB,EAAE;QAC9C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC/F,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,2BAA2B,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IACrJ,MAAM,CAAC,sBAAsB,CAAC,SAAS,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export { addColumnToStore, type ColumnInStoreParams, type ProfiledColumnInStoreParams, type ColumnBuildResult, } from './column.js';
|
|
2
|
+
export { addWallToStore, emitWallAxisRepresentation, emitWallBodyProfile, wallJoinWallFromParams, type WallInStoreParams, type WallBuildResult } from './wall.js';
|
|
3
|
+
export { computeWallJoin, reshapeWallAxis, wallBodyLateralRange, wallBodyOutline } from './wall-join.js';
|
|
4
|
+
export type * from './wall-join.js';
|
|
5
|
+
export { applyWallJoinToStore, wallJoinTargetFromBuild, type WallJoinApplyOptions, type WallJoinApplyResult, type WallJoinTarget } from './wall-join-apply.js';
|
|
6
|
+
export { readWallJoinTarget, readWallJoinRels, type WallJoinRead, type WallJoinRel } from './wall-join-read.js';
|
|
7
|
+
export { joinWallsInStore, reshapeWallsInStore, resolveWallJoinAnchor, type WallJoinInStoreResult, type WallReshape, type WallReshapeOptions, type WallReshapeResult } from './wall-join-edit.js';
|
|
8
|
+
export { addRelConnectsPathElementsToStore, type RelConnectsAnchor, type RelConnectsPathElementsParams } from './rel-connects-path.js';
|
|
9
|
+
export { addSlabToStore, type SlabInStoreParams, type SlabRectangleParams, type SlabPolygonParams, type SlabBuildResult } from './slab.js';
|
|
10
|
+
export { addBeamToStore, type BeamInStoreParams, type ProfiledBeamInStoreParams, type BeamBuildResult } from './beam.js';
|
|
11
|
+
export { emitProfileSection, validateProfileSection, profileSectionIfcClass, profileSectionExtent, type ProfileSection, type ProfileSectionType, type RectangleSection, type ISection, type LSection, type TSection, type USection, type CSection, type CircleSection, type RectangleHollowSection, type CircleHollowSection, } from './profile.js';
|
|
12
|
+
export { addStairToStore, stairFlightOutline, type StairInStoreParams, type StairBuildResult } from './stair.js';
|
|
13
|
+
export { readStairDimensions, editStairDimensionsInStore, type StairDimensions, type StairDimensionEdit } from './stair-edit.js';
|
|
14
|
+
export { addRailingToStore, railingPostPoints, type RailingInStoreParams, type RailingBuildResult } from './railing.js';
|
|
15
|
+
export { addCurtainWallToStore, curtainWallLayout, type CurtainWallInStoreParams, type CurtainWallGridSpec, type CurtainWallLayout, type CurtainWallBuildResult } from './curtain-wall.js';
|
|
16
|
+
export { addGridToStore, rectangularGridAxes, gridIntersectionPlacement, type GridInStoreParams, type GridAxisInStoreParams, type GridBuildResult, type GridIntersectionParams, type GridPlacementParams, type GridPlacementResult, } from './grid.js';
|
|
17
|
+
export { addDoorToStore, type DoorInStoreParams, type DoorBuildResult } from './door.js';
|
|
18
|
+
export { addWindowToStore, type WindowInStoreParams, type WindowBuildResult } from './window.js';
|
|
19
|
+
export { addOpeningToStore, type OpeningInStoreParams, type WallOpeningInStoreParams, type SlabOpeningInStoreParams, type OpeningBuildResult, } from './opening.js';
|
|
20
|
+
export { addHostedDoorToStore, addHostedWindowToStore, type HostedDoorInStoreParams, type HostedWindowInStoreParams, type HostedFillBuildResult, } from './hosted-fill.js';
|
|
21
|
+
export { hostPlanFrame, readHostedFill, type HostPlanFrame, type HostedFillRead } from './hosted-fill-read.js';
|
|
22
|
+
export { addHostedElementInStore, readHostOpeningExtents, type HostedElementInStoreSpec, type HostedElementInStoreResult, type HostedOpeningExtent } from './hosted-element.js';
|
|
23
|
+
export { editHostedElementInStore, readHostedElementSize, type HostedElementEdit, type HostedElementSize } from './hosted-element-edit.js';
|
|
24
|
+
export { addElementTypeToStore, assignTypeInStore, type AuthoringAnchor, type ElementTypeInStoreParams, type ElementTypeBuildResult, } from './element-type.js';
|
|
25
|
+
export { addMaterialToStore, addMaterialLayerSetToStore, addMaterialLayerSetUsageToStore, assignMaterialInStore, type MaterialInStoreParams, type MaterialLayerInStoreParams, type MaterialLayerSetInStoreParams, type MaterialLayerSetBuildResult, type MaterialLayerSetUsageInStoreParams, } from './material.js';
|
|
26
|
+
export type { OneToManyResult } from './relate.js';
|
|
27
|
+
export { resolveAuthoringAnchor, readRelatedLists, liveEntityType, liveEntityConforms } from './resolve-relations.js';
|
|
28
|
+
export { addSpaceToStore, type SpaceInStoreParams, type SpaceRectangleParams, type SpacePolygonParams, type SpaceBuildResult } from './space.js';
|
|
29
|
+
export { addSpatialZonesToStore, spatialZonesSupported, type SpatialZoneInput, type SpatialZoneInStoreParams, type SpatialZoneBuildResult, type SpatialZoneType, } from './spatial-zone.js';
|
|
30
|
+
export { applyStylesInStore, collectLeafRepresentationItems, type ApplyStyleOptions, type ApplyStyleResult, type StyleBatch, type SurfaceStyleColor, } from './apply-style.js';
|
|
31
|
+
export { addRoofToStore, type RoofInStoreParams, type RoofRectangleParams, type RoofPolygonParams, type RoofBuildResult } from './roof.js';
|
|
32
|
+
export { addPlateToStore, type PlateInStoreParams, type PlateRectangleParams, type PlatePolygonParams, type PlateBuildResult } from './plate.js';
|
|
33
|
+
export { addMemberToStore, type MemberInStoreParams, type ProfiledMemberInStoreParams, type MemberBuildResult } from './member.js';
|
|
34
|
+
export { addCostScheduleToStore, addCostItemToStore, addCostValueToStore, addCostQuantityToStore, nestCostItemsInStore, assignCostItemsToScheduleInStore, assignObjectsToCostItemInStore, attachCostValuesToItemInStore, type CostAnchor, type ExistingRelatedList, } from './cost.js';
|
|
35
|
+
export { removeCostEntityInStore, type CostRemovalReferrers } from './cost-removal.js';
|
|
36
|
+
export { resolveSpatialAnchor } from './resolve-anchor.js';
|
|
37
|
+
export { placedBodyExtent, resolveHostAnchor } from './resolve-host.js';
|
|
38
|
+
export { toNativeLength, fromNativeLength } from './anchor.js';
|
|
39
|
+
export type { SpatialAnchor, HostAnchor, HostBounds, HostKind } from './anchor.js';
|
|
40
|
+
export { duplicateInStore, type SourceAttributes, type DuplicateInStoreOptions, type DuplicateBuildResult, type Vec3 as DuplicateVec3, } from './duplicate.js';
|
|
41
|
+
export { resolveDuplicateSource } from './resolve-source.js';
|
|
42
|
+
export { createCopyContext, copyProductInStore, copyRefusal, productStoreyOrigin, type CopyContext, type CopyTransform, type CopyProductResult } from './copy-product.js';
|
|
43
|
+
export { detectEnclosedAreas, type Vec2 as AutoSpaceVec2, type Segment as AutoSpaceSegment, type DetectedSpace, type DetectOptions as AutoSpaceDetectOptions, } from './auto-space-detect.js';
|
|
44
|
+
export { extractWallSegmentsForStorey, type OverlayWallReader, type WallExtractionResult, } from './extract-walls.js';
|
|
45
|
+
export { extractGridAxesForStorey, type GridAxisSegment, type StoreyGridAxes } from './extract-grids.js';
|
|
46
|
+
export { existingSpaceFootprintsByStorey, existingSpaceFootprintEntriesByStorey, type SpaceFootprint, } from './space-footprints.js';
|
|
47
|
+
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, type StoreyPlanFrame, } from './storey-plan-frame.js';
|
|
48
|
+
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, type GenerateSpacesOptions, type GenerateSpacesResult, type BoundaryMode, } from './generate-spaces.js';
|
|
49
|
+
export { generateSpaces, listStoreys, type GenerateSpacesAllOptions, type GenerateSpacesAllResult, type GenerateSpacesStoreyResult, type StoreyInfo, } from './generate-spaces-all.js';
|
|
50
|
+
export { addStructuralAnalysisModelToStore, type StructuralAnalysisModelInStoreParams, type StructuralAnalysisModelBuildResult, type StructuralAnalysisModelType, } from './structural-analysis-model.js';
|
|
51
|
+
export { addStructuralCurveMemberToStore, type StructuralCurveMemberInStoreParams, type StructuralCurveMemberBuildResult, type StructuralCurveMemberType, } from './structural-curve-member.js';
|
|
52
|
+
export { addStructuralPointConnectionToStore, type StructuralPointConnectionInStoreParams, type StructuralPointConnectionBuildResult, type StructuralBoundaryConditionParams, } from './structural-point-connection.js';
|
|
53
|
+
export { addStructuralLoadGroupToStore, type StructuralLoadGroupInStoreParams, type StructuralLoadGroupBuildResult, type StructuralLoadGroupType, type StructuralActionType, type StructuralActionSourceType, } from './structural-load-group.js';
|
|
54
|
+
export { addStructuralPointActionToStore, addStructuralLinearActionToStore, type StructuralPointActionInStoreParams, type StructuralPointActionBuildResult, type StructuralLinearActionInStoreParams, type StructuralLinearActionBuildResult, type StructuralGlobalOrLocal, } from './structural-action.js';
|
|
55
|
+
export { connectStructuralMemberToConnectionInStore, connectStructuralActivityToItemInStore, assignToStructuralGroupInStore, } from './structural-relationships.js';
|
|
56
|
+
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 './drawing-markup.js';
|
|
57
|
+
export { reanchorHostedOpeningsInStore } from './hosted-placement-edit.js';
|
|
58
|
+
export { reassignHostedOpeningsInStore, type HostedOpeningReassignment } from './hosted-placement-edit.js';
|
|
59
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceR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AAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,EAChC,KAAK,kCAAkC,EACvC,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EACxC,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,sCAAsC,EACtC,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,KAAK,yBAAyB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
// In-store builders — emit elements into an existing parsed IfcDataStore
|
|
5
|
+
// via a `StoreEditor` overlay (closes the merge-roundtrip gap from #592).
|
|
6
|
+
export { addColumnToStore, } from './column.js';
|
|
7
|
+
export { addWallToStore, emitWallAxisRepresentation, emitWallBodyProfile, wallJoinWallFromParams } from './wall.js';
|
|
8
|
+
// Wall joins (L / T / butt) and the IfcRelConnectsPathElements they write; the read side sits in wall-join-read.
|
|
9
|
+
export { computeWallJoin, reshapeWallAxis, wallBodyLateralRange, wallBodyOutline } from './wall-join.js';
|
|
10
|
+
export { applyWallJoinToStore, wallJoinTargetFromBuild } from './wall-join-apply.js';
|
|
11
|
+
export { readWallJoinTarget, readWallJoinRels } from './wall-join-read.js';
|
|
12
|
+
export { joinWallsInStore, reshapeWallsInStore, resolveWallJoinAnchor } from './wall-join-edit.js';
|
|
13
|
+
export { addRelConnectsPathElementsToStore } from './rel-connects-path.js';
|
|
14
|
+
export { addSlabToStore } from './slab.js';
|
|
15
|
+
export { addBeamToStore } from './beam.js';
|
|
16
|
+
export { emitProfileSection, validateProfileSection, profileSectionIfcClass, profileSectionExtent, } from './profile.js';
|
|
17
|
+
export { addStairToStore, stairFlightOutline } from './stair.js';
|
|
18
|
+
export { readStairDimensions, editStairDimensionsInStore } from './stair-edit.js';
|
|
19
|
+
export { addRailingToStore, railingPostPoints } from './railing.js';
|
|
20
|
+
export { addCurtainWallToStore, curtainWallLayout } from './curtain-wall.js';
|
|
21
|
+
export { addGridToStore, rectangularGridAxes, gridIntersectionPlacement, } from './grid.js';
|
|
22
|
+
export { addDoorToStore } from './door.js';
|
|
23
|
+
export { addWindowToStore } from './window.js';
|
|
24
|
+
export { addOpeningToStore, } from './opening.js';
|
|
25
|
+
export { addHostedDoorToStore, addHostedWindowToStore, } from './hosted-fill.js';
|
|
26
|
+
export { hostPlanFrame, readHostedFill } from './hosted-fill-read.js';
|
|
27
|
+
export { addHostedElementInStore, readHostOpeningExtents } from './hosted-element.js';
|
|
28
|
+
export { editHostedElementInStore, readHostedElementSize } from './hosted-element-edit.js';
|
|
29
|
+
export { addElementTypeToStore, assignTypeInStore, } from './element-type.js';
|
|
30
|
+
export { addMaterialToStore, addMaterialLayerSetToStore, addMaterialLayerSetUsageToStore, assignMaterialInStore, } from './material.js';
|
|
31
|
+
export { resolveAuthoringAnchor, readRelatedLists, liveEntityType, liveEntityConforms } from './resolve-relations.js';
|
|
32
|
+
export { addSpaceToStore } from './space.js';
|
|
33
|
+
export { addSpatialZonesToStore, spatialZonesSupported, } from './spatial-zone.js';
|
|
34
|
+
export { applyStylesInStore, collectLeafRepresentationItems, } from './apply-style.js';
|
|
35
|
+
export { addRoofToStore } from './roof.js';
|
|
36
|
+
export { addPlateToStore } from './plate.js';
|
|
37
|
+
export { addMemberToStore } from './member.js';
|
|
38
|
+
export { addCostScheduleToStore, addCostItemToStore, addCostValueToStore, addCostQuantityToStore, nestCostItemsInStore, assignCostItemsToScheduleInStore, assignObjectsToCostItemInStore, attachCostValuesToItemInStore, } from './cost.js';
|
|
39
|
+
export { removeCostEntityInStore } from './cost-removal.js';
|
|
40
|
+
export { resolveSpatialAnchor } from './resolve-anchor.js';
|
|
41
|
+
export { placedBodyExtent, resolveHostAnchor } from './resolve-host.js';
|
|
42
|
+
export { toNativeLength, fromNativeLength } from './anchor.js';
|
|
43
|
+
export { duplicateInStore, } from './duplicate.js';
|
|
44
|
+
export { resolveDuplicateSource } from './resolve-source.js';
|
|
45
|
+
export { createCopyContext, copyProductInStore, copyRefusal, productStoreyOrigin } from './copy-product.js';
|
|
46
|
+
export { detectEnclosedAreas, } from './auto-space-detect.js';
|
|
47
|
+
export { extractWallSegmentsForStorey, } from './extract-walls.js';
|
|
48
|
+
export { extractGridAxesForStorey } from './extract-grids.js';
|
|
49
|
+
export { existingSpaceFootprintsByStorey, existingSpaceFootprintEntriesByStorey, } from './space-footprints.js';
|
|
50
|
+
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, } from './storey-plan-frame.js';
|
|
51
|
+
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, } from './generate-spaces.js';
|
|
52
|
+
export { generateSpaces, listStoreys, } from './generate-spaces-all.js';
|
|
53
|
+
// Structural analysis authoring (#5167 task S.1) — IfcStructuralAnalysisModel
|
|
54
|
+
// and its members/connections/loads/relationships.
|
|
55
|
+
export { addStructuralAnalysisModelToStore, } from './structural-analysis-model.js';
|
|
56
|
+
export { addStructuralCurveMemberToStore, } from './structural-curve-member.js';
|
|
57
|
+
export { addStructuralPointConnectionToStore, } from './structural-point-connection.js';
|
|
58
|
+
export { addStructuralLoadGroupToStore, } from './structural-load-group.js';
|
|
59
|
+
export { addStructuralPointActionToStore, addStructuralLinearActionToStore, } from './structural-action.js';
|
|
60
|
+
export { connectStructuralMemberToConnectionInStore, connectStructuralActivityToItemInStore, assignToStructuralGroupInStore, } from './structural-relationships.js';
|
|
61
|
+
export { addDrawingMarkupToStore, addMeasureMarkupToStore, addPolygonAreaMarkupToStore, addTextMarkupToStore, addCloudMarkupToStore, DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, } from './drawing-markup.js';
|
|
62
|
+
export { reanchorHostedOpeningsInStore } from './hosted-placement-edit.js';
|
|
63
|
+
export { reassignHostedOpeningsInStore } from './hosted-placement-edit.js';
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/in-store/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,EACL,gBAAgB,GAIjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,sBAAsB,EAAgD,MAAM,WAAW,CAAC;AAClK,iHAAiH;AACjH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEzG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EA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4B,GAG7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAA6C,MAAM,oBAAoB,CAAC;AACzG,OAAO,EACL,+BAA+B,EAC/B,qCAAqC,GAEtC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,GAI3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,WAAW,GAKZ,MAAM,0BAA0B,CAAC;AAClC,8EAA8E;AAC9E,mDAAmD;AACnD,OAAO,EACL,iCAAiC,GAIlC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,GAIhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,mCAAmC,GAIpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,GAM9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GAMjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0CAA0C,EAC1C,sCAAsC,EACtC,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GAczB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAkC,MAAM,4BAA4B,CAAC"}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* Anchored builder for IfcMember — a generic structural member
|
|
3
3
|
* (brace, strut, post). Geometry shape mirrors `addBeamToStore`:
|
|
4
4
|
* - placement origin at `Start`, local Z = member axis
|
|
5
|
-
* - cross-section
|
|
5
|
+
* - cross-section (Width x Height rectangle, or a `Profile`) centred on
|
|
6
|
+
* the axis, extruded by member length
|
|
6
7
|
* The distinction is the IFC type and the `.NOTDEFINED.` PredefinedType
|
|
7
8
|
* default — IfcBeam carries `.BEAM.`.
|
|
8
9
|
*/
|
|
9
10
|
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
10
11
|
import { type SpatialAnchor } from './anchor.js';
|
|
12
|
+
import { type ProfileSection } from './profile.js';
|
|
11
13
|
export interface MemberInStoreParams {
|
|
12
14
|
Start: [number, number, number];
|
|
13
15
|
End: [number, number, number];
|
|
@@ -21,6 +23,10 @@ export interface MemberInStoreParams {
|
|
|
21
23
|
/** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
|
|
22
24
|
GlobalId?: string;
|
|
23
25
|
}
|
|
26
|
+
/** A member with a parameterised cross-section in place of the `Width` x `Height` rectangle. */
|
|
27
|
+
export interface ProfiledMemberInStoreParams extends Omit<MemberInStoreParams, 'Width' | 'Height'> {
|
|
28
|
+
Profile: ProfileSection;
|
|
29
|
+
}
|
|
24
30
|
export interface MemberBuildResult {
|
|
25
31
|
memberId: number;
|
|
26
32
|
placementId: number;
|
|
@@ -30,5 +36,5 @@ export interface MemberBuildResult {
|
|
|
30
36
|
productShapeId: number;
|
|
31
37
|
relContainedId: number;
|
|
32
38
|
}
|
|
33
|
-
export declare function addMemberToStore(editor: StoreEditor, anchor: SpatialAnchor, params: MemberInStoreParams): MemberBuildResult;
|
|
39
|
+
export declare function addMemberToStore(editor: StoreEditor, anchor: SpatialAnchor, params: MemberInStoreParams | ProfiledMemberInStoreParams): MemberBuildResult;
|
|
34
40
|
//# sourceMappingURL=member.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.d.ts","sourceRoot":"","sources":["../../src/in-store/member.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"member.d.ts","sourceRoot":"","sources":["../../src/in-store/member.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,O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B,MAAM,EAAE,mBAAmB,GAAG,2BAA2B,GACxD,iBAAiB,CAoCnB"}
|
package/dist/in-store/member.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
import { vecCross, vecNorm, assertFinitePoint3 } from '../ifc-creator-math.js';
|
|
5
5
|
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
6
|
-
import {
|
|
6
|
+
import { emitBodyRepresentation, emitExtrudedSolid, emitLocalPlacement, emitRectangleProfile, emitRelContainedInSpatialStructure, ifcElementHeader, } from './_emit-helpers.js';
|
|
7
|
+
import { emitProfileSection, linearSection } from './profile.js';
|
|
7
8
|
function computeRefDirection(axis) {
|
|
8
9
|
const up = Math.abs(axis[2]) < 0.9 ? [0, 0, 1] : [1, 0, 0];
|
|
9
10
|
return vecNorm(vecCross(up, axis));
|
|
@@ -15,25 +16,22 @@ export function addMemberToStore(editor, anchor, params) {
|
|
|
15
16
|
assertFinitePoint3({ Start: params.Start, End: params.End }, 'addMemberToStore');
|
|
16
17
|
// Params are metres; convert dimensioned fields to the file's native
|
|
17
18
|
// length unit before emit (see SpatialAnchor.lengthUnitScale).
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Height: toNativeLength(anchor, params.Height),
|
|
24
|
-
};
|
|
25
|
-
const dx = params.End[0] - params.Start[0];
|
|
26
|
-
const dy = params.End[1] - params.Start[1];
|
|
27
|
-
const dz = params.End[2] - params.Start[2];
|
|
19
|
+
const start = toNativePoint3(anchor, params.Start);
|
|
20
|
+
const end = toNativePoint3(anchor, params.End);
|
|
21
|
+
const dx = end[0] - start[0];
|
|
22
|
+
const dy = end[1] - start[1];
|
|
23
|
+
const dz = end[2] - start[2];
|
|
28
24
|
const memberLen = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
29
25
|
if (memberLen <= 0) {
|
|
30
26
|
throw new Error('addMemberToStore: Start and End must be distinct points');
|
|
31
27
|
}
|
|
32
|
-
|
|
28
|
+
const section = linearSection(anchor, params, 'addMemberToStore');
|
|
33
29
|
const dir = vecNorm([dx, dy, dz]);
|
|
34
30
|
const refDir = computeRefDirection(dir);
|
|
35
|
-
const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId,
|
|
36
|
-
const profileId =
|
|
31
|
+
const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId, start, dir, refDir);
|
|
32
|
+
const profileId = section.Profile
|
|
33
|
+
? emitProfileSection(editor, anchor, section.Profile, 'addMemberToStore')
|
|
34
|
+
: emitRectangleProfile(editor, toNativeLength(anchor, section.Width), toNativeLength(anchor, section.Height));
|
|
37
35
|
const solidId = emitExtrudedSolid(editor, profileId, memberLen);
|
|
38
36
|
const { shapeRepId, productShapeId } = emitBodyRepresentation(editor, anchor.bodyContextId, solidId);
|
|
39
37
|
const attrs = ifcElementHeader(anchor.ownerHistoryId, placementId, productShapeId, params, 'Member', anchor.guidRandom);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.js","sourceRoot":"","sources":["../../src/in-store/member.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"member.js","sourceRoot":"","sources":["../../src/in-store/member.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAa/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,kCAAkC,EAClC,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAC;AAkCtF,SAAS,mBAAmB,CAAC,IAAa;IACxC,MAAM,EAAE,GAAY,IAAI,CAAC,GAA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AAC,MAAM,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAEvI,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AACnG,CAAC"}
|
|
@@ -37,6 +37,10 @@ export interface OverlayWallReader {
|
|
|
37
37
|
getTypeMutations?(): ReadonlyMap<number, {
|
|
38
38
|
readonly newType: string;
|
|
39
39
|
}>;
|
|
40
|
+
/** Point lookup of a live retype, without copying the whole retype map. */
|
|
41
|
+
getEntityTypeMutation?(expressId: number): {
|
|
42
|
+
readonly newType: string;
|
|
43
|
+
} | null | undefined;
|
|
40
44
|
/** Queued positional attribute edits of one entity (#5249). */
|
|
41
45
|
getPositionalMutationsForEntity?(expressId: number): ReadonlyMap<number, IfcAttributeValue> | null;
|
|
42
46
|
}
|
|
@@ -51,7 +55,8 @@ export interface PlacementFrame {
|
|
|
51
55
|
* Walk IfcLocalPlacement → IfcAxis2Placement3D → CartesianPoint and read the
|
|
52
56
|
* ground-plane origin + RefDirection *of this one placement*, i.e. expressed
|
|
53
57
|
* in its own `PlacementRelTo` parent's frame. Returns null when any link is
|
|
54
|
-
* missing.
|
|
58
|
+
* missing or explicitly unreadable. Only horizontal +Z frames can be
|
|
59
|
+
* represented by this planar contract (#6511 / #6232).
|
|
55
60
|
*/
|
|
56
61
|
export declare function readOwnPlacementFrame(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, placementId: number): PlacementFrame | null;
|
|
57
62
|
/**
|
|
@@ -77,9 +82,9 @@ export declare function storeyPlacementChain(store: IfcDataStore, extractor: Ent
|
|
|
77
82
|
* innermost one first. `hops === 0` is the storey's own placement, whose frame
|
|
78
83
|
* relative to itself is the identity.
|
|
79
84
|
*
|
|
80
|
-
* Returns `null` when any
|
|
81
|
-
*
|
|
82
|
-
*
|
|
85
|
+
* Returns `null` when any required placement has no readable frame; callers
|
|
86
|
+
* refuse the element instead of labelling a partial transform storey-local.
|
|
87
|
+
* Placements at or above the shared ancestor cancel and need not be read.
|
|
83
88
|
*/
|
|
84
89
|
export declare function storeyFrameAboveBy(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, storeyChain: ReadonlyMap<number, number>, hops: number): PlacementFrame | null;
|
|
85
90
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placement-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"placement-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,cAAc,IAAI,QAAQ,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC,CAAC;IACjG,+DAA+D;IAC/D,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;IAC/E,yEAAyE;IACzE,SAAS,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,2CAA2C;IA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,EAAE,cAAc,GAAG,cAAc,CAKjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG,cAAc,CAY1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAC9C,cAAc,GAAG,IAAI,CA4CvB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAUnE;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,SAAS,EAAE,MAAM,GAChB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,iBAAiB,EAAE,CAAA;CAAE,GAAG,IAAI,CA2B3D;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAW3E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,iBAAiB,GAAG,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAO1F"}
|
|
@@ -1,46 +1,29 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { axis3d } from './host-geometry-frame.js';
|
|
4
5
|
export const AXIS_EPS = 1e-6;
|
|
5
6
|
/**
|
|
6
7
|
* Walk IfcLocalPlacement → IfcAxis2Placement3D → CartesianPoint and read the
|
|
7
8
|
* ground-plane origin + RefDirection *of this one placement*, i.e. expressed
|
|
8
9
|
* in its own `PlacementRelTo` parent's frame. Returns null when any link is
|
|
9
|
-
* missing.
|
|
10
|
+
* missing or explicitly unreadable. Only horizontal +Z frames can be
|
|
11
|
+
* represented by this planar contract (#6511 / #6232).
|
|
10
12
|
*/
|
|
11
13
|
export function readOwnPlacementFrame(store, extractor, overlay, placementId) {
|
|
12
14
|
const placement = readEntity(store, extractor, overlay, placementId);
|
|
13
|
-
if (
|
|
15
|
+
if (placement?.type?.toUpperCase() !== 'IFCLOCALPLACEMENT')
|
|
14
16
|
return null;
|
|
15
17
|
const axisPlacementId = numericAttr(placement.attributes[1]);
|
|
16
18
|
if (axisPlacementId === null)
|
|
17
19
|
return null;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
+
const frame = axis3d({ entity: (id) => {
|
|
21
|
+
const entity = readEntity(store, extractor, overlay, id);
|
|
22
|
+
return entity?.type ? { type: entity.type, attributes: entity.attributes } : null;
|
|
23
|
+
} }, axisPlacementId);
|
|
24
|
+
if (!frame || Math.abs(frame.z[0]) > AXIS_EPS || Math.abs(frame.z[1]) > AXIS_EPS || frame.z[2] <= 0)
|
|
20
25
|
return null;
|
|
21
|
-
|
|
22
|
-
const refDirId = numericAttr(axisPlacement.attributes[2]);
|
|
23
|
-
if (locationId === null)
|
|
24
|
-
return null;
|
|
25
|
-
const locationEnt = readEntity(store, extractor, overlay, locationId);
|
|
26
|
-
if (!locationEnt)
|
|
27
|
-
return null;
|
|
28
|
-
const origin = readVec3(locationEnt.attributes[0]);
|
|
29
|
-
if (!origin)
|
|
30
|
-
return null;
|
|
31
|
-
let axisX = [1, 0];
|
|
32
|
-
if (refDirId !== null) {
|
|
33
|
-
const refDir = readEntity(store, extractor, overlay, refDirId);
|
|
34
|
-
if (refDir) {
|
|
35
|
-
const dir = readVec3(refDir.attributes[0]);
|
|
36
|
-
if (dir) {
|
|
37
|
-
const len = Math.hypot(dir[0], dir[1]);
|
|
38
|
-
if (len > AXIS_EPS)
|
|
39
|
-
axisX = [dir[0] / len, dir[1] / len];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return { origin: [origin[0], origin[1]], axisX };
|
|
26
|
+
return { origin: [frame.o[0], frame.o[1]], axisX: [frame.x[0], frame.x[1]] };
|
|
44
27
|
}
|
|
45
28
|
/**
|
|
46
29
|
* The storey's OWN placement chain: its `ObjectPlacement` and every ancestor
|
|
@@ -81,9 +64,9 @@ export function storeyPlacementChain(store, extractor, overlay, storeyId) {
|
|
|
81
64
|
* innermost one first. `hops === 0` is the storey's own placement, whose frame
|
|
82
65
|
* relative to itself is the identity.
|
|
83
66
|
*
|
|
84
|
-
* Returns `null` when any
|
|
85
|
-
*
|
|
86
|
-
*
|
|
67
|
+
* Returns `null` when any required placement has no readable frame; callers
|
|
68
|
+
* refuse the element instead of labelling a partial transform storey-local.
|
|
69
|
+
* Placements at or above the shared ancestor cancel and need not be read.
|
|
87
70
|
*/
|
|
88
71
|
export function storeyFrameAboveBy(store, extractor, overlay, storeyChain, hops) {
|
|
89
72
|
let frame = { origin: [0, 0], axisX: [1, 0] };
|
|
@@ -195,15 +178,14 @@ export function frameInStoreyFrame(store, extractor, overlay, placementId, store
|
|
|
195
178
|
// remove it, so the two directions land on different coordinates and the
|
|
196
179
|
// #3003 fixture pins which one this is.
|
|
197
180
|
const storeyFrame = storeyFrameAboveBy(store, extractor, overlay, storeyChain, hops);
|
|
198
|
-
return storeyFrame ? composeFrames(invertFrame(storeyFrame), frame) :
|
|
181
|
+
return storeyFrame ? composeFrames(invertFrame(storeyFrame), frame) : null;
|
|
199
182
|
}
|
|
200
|
-
// A cycle
|
|
201
|
-
// so stop with what has been composed so far.
|
|
183
|
+
// A cycle or unreadable parent cannot make a trustworthy partial frame.
|
|
202
184
|
if (visited.has(relToId))
|
|
203
|
-
return
|
|
185
|
+
return null;
|
|
204
186
|
const parent = readOwnPlacementFrame(store, extractor, overlay, relToId);
|
|
205
187
|
if (!parent)
|
|
206
|
-
return
|
|
188
|
+
return null;
|
|
207
189
|
frame = composeFrames(parent, frame);
|
|
208
190
|
visited.add(relToId);
|
|
209
191
|
currentId = relToId;
|
|
@@ -247,6 +229,9 @@ export function readEntity(store, extractor, overlay, expressId) {
|
|
|
247
229
|
}
|
|
248
230
|
if (!entity)
|
|
249
231
|
return null;
|
|
232
|
+
const retype = overlay?.getEntityTypeMutation?.(expressId)?.newType;
|
|
233
|
+
if (retype)
|
|
234
|
+
entity = { ...entity, type: retype };
|
|
250
235
|
const edits = overlay?.getPositionalMutationsForEntity?.(expressId);
|
|
251
236
|
if (!edits?.size)
|
|
252
237
|
return entity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placement-frame.js","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"placement-frame.js","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0B/D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAsBlD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC;AAS7B;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAmB,EACnB,SAA0B,EAC1B,OAAsC,EACtC,WAAmB;IAEnB,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACrE,IAAI,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,mBAAmB;QAAE,OAAO,IAAI,CAAC;IACxE,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,IAAI,eAAe,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,KAAK,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