@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,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","sourceRoot":"","sources":["../../src/in-store/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAElK,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzG,mBAAmB,gBA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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,EAA4E,MAAM,sBAAsB,CAAC;AAC/J,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAuC,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAiG,MAAM,qBAAqB,CAAC;AAClM,OAAO,EAAE,iCAAiC,EAA8D,MAAM,wBAAwB,CAAC;AACvI,OAAO,EAAE,cAAc,EAAkG,MAAM,WAAW,CAAC;AAC3I,OAAO,EAAE,cAAc,EAAgF,MAAM,WAAW,CAAC;AACzH,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EAC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AC9E,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"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
2
|
+
import { type OneToManyResult } from './relate.js';
|
|
3
|
+
import type { AuthoringAnchor } from './element-type.js';
|
|
4
|
+
import type { ExistingRelatedList } from './cost.js';
|
|
5
|
+
export interface MaterialInStoreParams {
|
|
6
|
+
Name: string;
|
|
7
|
+
/** IFC4+ only. */
|
|
8
|
+
Description?: string;
|
|
9
|
+
/** IFC4+ only, e.g. 'concrete', 'insulation'. */
|
|
10
|
+
Category?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MaterialLayerInStoreParams {
|
|
13
|
+
/** The layer's IfcMaterial. Optional in the schema (an air gap has none). */
|
|
14
|
+
Material?: number;
|
|
15
|
+
/** Metres. Zero is allowed (IfcNonNegativeLengthMeasure). */
|
|
16
|
+
LayerThickness: number;
|
|
17
|
+
IsVentilated?: boolean;
|
|
18
|
+
/** IFC4+ only. */
|
|
19
|
+
Name?: string;
|
|
20
|
+
Description?: string;
|
|
21
|
+
Category?: string;
|
|
22
|
+
Priority?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface MaterialLayerSetInStoreParams {
|
|
25
|
+
/** Outermost first, in the order the layers are stacked along the usage direction. */
|
|
26
|
+
MaterialLayers: MaterialLayerInStoreParams[];
|
|
27
|
+
LayerSetName?: string;
|
|
28
|
+
/** IFC4+ only. */
|
|
29
|
+
Description?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface MaterialLayerSetBuildResult {
|
|
32
|
+
layerSetId: number;
|
|
33
|
+
layerIds: number[];
|
|
34
|
+
}
|
|
35
|
+
export interface MaterialLayerSetUsageInStoreParams {
|
|
36
|
+
ForLayerSet: number;
|
|
37
|
+
/** Defaults to 'AXIS2' (across a wall); use 'AXIS3' for slabs. */
|
|
38
|
+
LayerSetDirection?: 'AXIS1' | 'AXIS2' | 'AXIS3';
|
|
39
|
+
/** Defaults to 'POSITIVE'. */
|
|
40
|
+
DirectionSense?: 'POSITIVE' | 'NEGATIVE';
|
|
41
|
+
/** Metres from the reference line to the first layer, e.g. -thickness/2 for a centred wall. */
|
|
42
|
+
OffsetFromReferenceLine: number;
|
|
43
|
+
/** IFC4+ only. */
|
|
44
|
+
ReferenceExtent?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare function addMaterialToStore(editor: StoreEditor, anchor: AuthoringAnchor, params: MaterialInStoreParams): {
|
|
47
|
+
materialId: number;
|
|
48
|
+
};
|
|
49
|
+
export declare function addMaterialLayerSetToStore(editor: StoreEditor, anchor: AuthoringAnchor, params: MaterialLayerSetInStoreParams): MaterialLayerSetBuildResult;
|
|
50
|
+
export declare function addMaterialLayerSetUsageToStore(editor: StoreEditor, anchor: AuthoringAnchor, params: MaterialLayerSetUsageInStoreParams): {
|
|
51
|
+
usageId: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Associate `materialId` (an IfcMaterial, IfcMaterialLayerSet,
|
|
55
|
+
* IfcMaterialLayerSetUsage, or any other IfcMaterialSelect) with `objectIds`
|
|
56
|
+
* through IfcRelAssociatesMaterial. `existing` is every
|
|
57
|
+
* IfcRelAssociatesMaterial in the model: the material's own relationship is
|
|
58
|
+
* extended, and an object associated with a different material leaves that
|
|
59
|
+
* association first.
|
|
60
|
+
*/
|
|
61
|
+
export declare function assignMaterialInStore(editor: StoreEditor, anchor: AuthoringAnchor, materialId: number, objectIds: readonly number[], existing: readonly ExistingRelatedList[]): OneToManyResult;
|
|
62
|
+
//# sourceMappingURL=material.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../src/in-store/material.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAIrD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,6BAA6B;IAC5C,sFAAsF;IACtF,cAAc,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 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Materials on a loaded model (#6232): IfcMaterial, IfcMaterialLayer +
|
|
6
|
+
* IfcMaterialLayerSet, IfcMaterialLayerSetUsage, and IfcRelAssociatesMaterial.
|
|
7
|
+
*
|
|
8
|
+
* The IFC4 practice for layered walls and slabs is to associate the
|
|
9
|
+
* IfcMaterialLayerSet with the type (`assignMaterialInStore(set, [typeId])`)
|
|
10
|
+
* and an IfcMaterialLayerSetUsage of that set with each occurrence, which
|
|
11
|
+
* says how the layers sit relative to the occurrence's reference line. For a
|
|
12
|
+
* wall that is `LayerSetDirection: 'AXIS2'` (across the wall); for a slab,
|
|
13
|
+
* `'AXIS3'` (up). Layer thicknesses and offsets are metres, converted to the
|
|
14
|
+
* file's native length unit.
|
|
15
|
+
*/
|
|
16
|
+
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
17
|
+
import { toNativeLength } from './anchor.js';
|
|
18
|
+
import { assertPositiveFinite, ownerHistoryRef } from './_emit-helpers.js';
|
|
19
|
+
import { conformsTo, schemaAttributes, schemaRegistry } from './schema-attributes.js';
|
|
20
|
+
import { relateOneToManyInStore } from './relate.js';
|
|
21
|
+
function add(editor, type, attrs) {
|
|
22
|
+
return editor.addEntity(type, attrs).expressId;
|
|
23
|
+
}
|
|
24
|
+
export function addMaterialToStore(editor, anchor, params) {
|
|
25
|
+
const op = 'addMaterialToStore';
|
|
26
|
+
if (typeof params.Name !== 'string' || params.Name.length === 0)
|
|
27
|
+
throw new Error(`${op}: Name is required`);
|
|
28
|
+
const registry = schemaRegistry(anchor.schema, op);
|
|
29
|
+
return { materialId: add(editor, 'IfcMaterial', schemaAttributes(registry, 'IfcMaterial', { ...params }, op)) };
|
|
30
|
+
}
|
|
31
|
+
export function addMaterialLayerSetToStore(editor, anchor, params) {
|
|
32
|
+
const op = 'addMaterialLayerSetToStore';
|
|
33
|
+
if (!Array.isArray(params.MaterialLayers) || params.MaterialLayers.length === 0) {
|
|
34
|
+
throw new Error(`${op}: MaterialLayers needs at least one layer`);
|
|
35
|
+
}
|
|
36
|
+
const registry = schemaRegistry(anchor.schema, op);
|
|
37
|
+
// Validate every layer before writing any, so a bad layer leaves nothing behind.
|
|
38
|
+
params.MaterialLayers.forEach((layer, index) => {
|
|
39
|
+
if (!Number.isFinite(layer.LayerThickness) || layer.LayerThickness < 0) {
|
|
40
|
+
throw new Error(`${op}: MaterialLayers[${index}].LayerThickness must be a finite number >= 0`);
|
|
41
|
+
}
|
|
42
|
+
if (layer.Material === undefined)
|
|
43
|
+
return;
|
|
44
|
+
// IfcMaterialLayer.Material is an IfcMaterial, not any IfcMaterialSelect:
|
|
45
|
+
// a layer set or an element here writes a file other tools reject.
|
|
46
|
+
const type = editor.getEntityType(layer.Material);
|
|
47
|
+
if (!type || !conformsTo(registry, type, 'IfcMaterial')) {
|
|
48
|
+
throw new Error(`${op}: MaterialLayers[${index}].Material #${layer.Material} is ${type ? `an ${type}` : 'not a live entity'}, not an IfcMaterial`);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const layerIds = params.MaterialLayers.map((layer) => {
|
|
52
|
+
const { Material, ...rest } = layer;
|
|
53
|
+
return add(editor, 'IfcMaterialLayer', schemaAttributes(registry, 'IfcMaterialLayer', {
|
|
54
|
+
...rest,
|
|
55
|
+
Material: Material === undefined ? undefined : `#${Material}`,
|
|
56
|
+
LayerThickness: toNativeLength(anchor, layer.LayerThickness),
|
|
57
|
+
}, op));
|
|
58
|
+
});
|
|
59
|
+
const layerSetId = add(editor, 'IfcMaterialLayerSet', schemaAttributes(registry, 'IfcMaterialLayerSet', {
|
|
60
|
+
MaterialLayers: layerIds.map((id) => `#${id}`),
|
|
61
|
+
LayerSetName: params.LayerSetName,
|
|
62
|
+
Description: params.Description,
|
|
63
|
+
}, op));
|
|
64
|
+
return { layerSetId, layerIds };
|
|
65
|
+
}
|
|
66
|
+
export function addMaterialLayerSetUsageToStore(editor, anchor, params) {
|
|
67
|
+
const op = 'addMaterialLayerSetUsageToStore';
|
|
68
|
+
if (!Number.isFinite(params.OffsetFromReferenceLine))
|
|
69
|
+
throw new Error(`${op}: OffsetFromReferenceLine must be finite`);
|
|
70
|
+
if (params.ReferenceExtent !== undefined)
|
|
71
|
+
assertPositiveFinite([params.ReferenceExtent], `${op}: ReferenceExtent must be positive`);
|
|
72
|
+
const registry = schemaRegistry(anchor.schema, op);
|
|
73
|
+
return {
|
|
74
|
+
usageId: add(editor, 'IfcMaterialLayerSetUsage', schemaAttributes(registry, 'IfcMaterialLayerSetUsage', {
|
|
75
|
+
ForLayerSet: `#${params.ForLayerSet}`,
|
|
76
|
+
LayerSetDirection: params.LayerSetDirection ?? 'AXIS2',
|
|
77
|
+
DirectionSense: params.DirectionSense ?? 'POSITIVE',
|
|
78
|
+
OffsetFromReferenceLine: toNativeLength(anchor, params.OffsetFromReferenceLine),
|
|
79
|
+
ReferenceExtent: params.ReferenceExtent === undefined ? undefined : toNativeLength(anchor, params.ReferenceExtent),
|
|
80
|
+
}, op)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Associate `materialId` (an IfcMaterial, IfcMaterialLayerSet,
|
|
85
|
+
* IfcMaterialLayerSetUsage, or any other IfcMaterialSelect) with `objectIds`
|
|
86
|
+
* through IfcRelAssociatesMaterial. `existing` is every
|
|
87
|
+
* IfcRelAssociatesMaterial in the model: the material's own relationship is
|
|
88
|
+
* extended, and an object associated with a different material leaves that
|
|
89
|
+
* association first.
|
|
90
|
+
*/
|
|
91
|
+
export function assignMaterialInStore(editor, anchor, materialId, objectIds, existing) {
|
|
92
|
+
return relateOneToManyInStore(editor, {
|
|
93
|
+
relType: 'IfcRelAssociatesMaterial',
|
|
94
|
+
relatingId: materialId,
|
|
95
|
+
relatedIds: objectIds,
|
|
96
|
+
existing,
|
|
97
|
+
create: (related) => [
|
|
98
|
+
generateIfcGuid(anchor.guidRandom),
|
|
99
|
+
ownerHistoryRef(anchor.ownerHistoryId),
|
|
100
|
+
null,
|
|
101
|
+
null,
|
|
102
|
+
related,
|
|
103
|
+
`#${materialId}`,
|
|
104
|
+
],
|
|
105
|
+
}, 'assignMaterialInStore');
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=material.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../src/in-store/material.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAoD3E,SAAS,GAAG,CAAC,MAAmB,EAAE,IAAY,EAAE,KAAgB;IAC9D,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,KAAyB,CAAC,CAAC,SAAS,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,MAAmB,EAAE,MAAuB,EAAE,MAA6B;IAC5G,MAAM,EAAE,GAAG,oBAAoB,CAAC;IAChC,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;IAC5G,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACnD,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,gBAAgB,CAAC,Q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AoC,CAAC,CAAC;IACpI,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACnD,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,0BAA0B,EAAE,gBAAgB,CAAC,QAAQ,EAAE,0BAA0B,EAAE;YACtG,WAAW,EAAE,IAAI,MAAM,CAAC,WAAW,EAAE;YACrC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,IAAI,OAAO;YACtD,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,UAAU;YACnD,uBAAuB,EAAE,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,uBAAuB,CAAC;YAC/E,eAAe,EAAE,MAAM,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,eAAe,CAAC;SACnH,EAAE,EAAE,CAAC,CAAC;KACR,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAmB,EACnB,MAAuB,EACvB,UAAkB,EAClB,SAA4B,EAC5B,QAAwC;IAExC,OAAO,sBAAsB,CAAC,MAAM,EAAE;QACpC,OAAO,EAAE,0BAA0B;QACnC,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,SAAS;QACrB,QAAQ;QACR,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;YACnB,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;YAClC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC;YACtC,IAAI;YACJ,IAAI;YACJ,OAAO;YACP,IAAI,UAAU,EAAE;SACjB;KACF,EAAE,uBAAuB,CAAC,CAAC;AAC9B,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":"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B,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,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,SA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AgD,CAAC,CAAC,SAAS,CAAC;IAC3G,MAAM,cAAc,GAAG,kCAAkC,CAAC,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"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
2
|
+
import { type HostAnchor } from './anchor.js';
|
|
3
|
+
interface OpeningCommonParams {
|
|
4
|
+
/** Length of the cut through the host (metres). Defaults to the host's body thickness + 2 × 50 mm. */
|
|
5
|
+
CutDepth?: number;
|
|
6
|
+
Name?: string;
|
|
7
|
+
Description?: string;
|
|
8
|
+
ObjectType?: string;
|
|
9
|
+
Tag?: string;
|
|
10
|
+
/** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
|
|
11
|
+
GlobalId?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Opening in a wall, in the wall's own placement frame. */
|
|
14
|
+
export interface WallOpeningInStoreParams extends OpeningCommonParams {
|
|
15
|
+
/** Distance along the wall's local X axis from its placement origin to the opening centre (metres). */
|
|
16
|
+
Offset: number;
|
|
17
|
+
/** Height of the opening's bottom edge above the wall's placement origin (metres). Defaults to 0. */
|
|
18
|
+
Sill?: number;
|
|
19
|
+
Width: number;
|
|
20
|
+
Height: number;
|
|
21
|
+
}
|
|
22
|
+
/** Opening in a slab, in the slab's own placement frame. */
|
|
23
|
+
export interface SlabOpeningInStoreParams extends OpeningCommonParams {
|
|
24
|
+
/** Centre of the opening in the slab's local XY (metres). */
|
|
25
|
+
Position: [number, number];
|
|
26
|
+
/** Size along the slab's local X (metres). */
|
|
27
|
+
Width: number;
|
|
28
|
+
/** Size along the slab's local Y (metres). */
|
|
29
|
+
Depth: number;
|
|
30
|
+
}
|
|
31
|
+
export type OpeningInStoreParams = WallOpeningInStoreParams | SlabOpeningInStoreParams;
|
|
32
|
+
export interface OpeningBuildResult {
|
|
33
|
+
openingId: number;
|
|
34
|
+
placementId: number;
|
|
35
|
+
profileId: number;
|
|
36
|
+
solidId: number;
|
|
37
|
+
shapeRepId: number;
|
|
38
|
+
productShapeId: number;
|
|
39
|
+
relVoidsId: number;
|
|
40
|
+
/** Native-unit cut length actually emitted. */
|
|
41
|
+
cutDepth: number;
|
|
42
|
+
}
|
|
43
|
+
export declare function addOpeningToStore(editor: StoreEditor, host: HostAnchor, params: OpeningInStoreParams): OpeningBuildResult;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=opening.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opening.d.ts","sourceRoot":"","sources":["../../src/in-store/opening.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9D,UAAU,mBAAmB;IAC3B,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,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,4DAA4D;AAC5D,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,uGAAuG;IACvG,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4DAA4D;AAC5D,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AAEvF,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,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,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,oBAAoB,GAC3B,kBAAkB,CAqBpB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Anchored builder for IfcOpeningElement + IfcRelVoidsElement — a rectangular
|
|
6
|
+
* void cut into an existing wall or slab (the in-store counterpart of
|
|
7
|
+
* `IfcCreator`'s private `addWallOpening` / `addSlabOpening`).
|
|
8
|
+
*
|
|
9
|
+
* The opening is placed relative to the HOST's IfcLocalPlacement, so it moves
|
|
10
|
+
* with the host, and it is NOT contained in the storey: IFC places an opening
|
|
11
|
+
* in the spatial structure only through the element it voids.
|
|
12
|
+
*
|
|
13
|
+
* - wall host: the profile sits in the wall's XZ plane (X along the axis,
|
|
14
|
+
* Z up) and is extruded across the wall's local Y, centred on the wall's
|
|
15
|
+
* body, by `CutDepth` (default: body thickness plus 50 mm per side)
|
|
16
|
+
* - slab host: the profile sits in the slab's XY plane and is extruded along
|
|
17
|
+
* +Z from 50 mm below the body to 50 mm above it
|
|
18
|
+
*
|
|
19
|
+
* All params are metres, converted to the file's native unit on emit.
|
|
20
|
+
*/
|
|
21
|
+
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
22
|
+
import { toNativeLength } from './anchor.js';
|
|
23
|
+
import { assertPositiveFinite, emitBodyRepresentation, emitExtrudedSolid, emitLocalPlacement, emitRectangleProfile, ifcElementHeader, ownerHistoryRef, } from './_emit-helpers.js';
|
|
24
|
+
/** Metres the default cut overshoots each face of the host, so no skin survives. */
|
|
25
|
+
const CUT_CLEARANCE_M = 0.05;
|
|
26
|
+
export function addOpeningToStore(editor, host, params) {
|
|
27
|
+
const geometry = host.hostKind === 'wall'
|
|
28
|
+
? wallOpeningGeometry(editor, host, params)
|
|
29
|
+
: slabOpeningGeometry(editor, host, params);
|
|
30
|
+
const { shapeRepId, productShapeId } = emitBodyRepresentation(editor, host.bodyContextId, geometry.solidId);
|
|
31
|
+
const attrs = ifcElementHeader(host.ownerHistoryId, geometry.placementId, productShapeId, params, 'Opening', host.guidRandom);
|
|
32
|
+
// IfcOpeningElement.PredefinedType exists from IFC4 on (IFC4X3 keeps it).
|
|
33
|
+
if ((host.schema ?? 'IFC4') !== 'IFC2X3')
|
|
34
|
+
attrs.push('.OPENING.');
|
|
35
|
+
const openingId = editor.addEntity('IfcOpeningElement', attrs).expressId;
|
|
36
|
+
const relVoidsId = editor.addEntity('IfcRelVoidsElement', [
|
|
37
|
+
generateIfcGuid(host.guidRandom),
|
|
38
|
+
ownerHistoryRef(host.ownerHistoryId),
|
|
39
|
+
null,
|
|
40
|
+
null,
|
|
41
|
+
`#${host.hostId}`,
|
|
42
|
+
`#${openingId}`,
|
|
43
|
+
]).expressId;
|
|
44
|
+
return { openingId, shapeRepId, productShapeId, relVoidsId, ...geometry };
|
|
45
|
+
}
|
|
46
|
+
/** Native-unit cut depth: the caller's, or the host thickness plus clearance. Never shallower than the host. */
|
|
47
|
+
function resolveCutDepth(host, thickness, requested, op) {
|
|
48
|
+
if (requested !== undefined) {
|
|
49
|
+
assertPositiveFinite([requested], `${op}: CutDepth must be positive`);
|
|
50
|
+
const cut = toNativeLength(host, requested);
|
|
51
|
+
if (thickness !== null && cut < thickness) {
|
|
52
|
+
throw new Error(`${op}: CutDepth ${requested} is shallower than the host #${host.hostId} body; the opening would not cut through`);
|
|
53
|
+
}
|
|
54
|
+
return cut;
|
|
55
|
+
}
|
|
56
|
+
if (thickness === null) {
|
|
57
|
+
throw new Error(`${op}: cannot read the thickness of host #${host.hostId} from its Body geometry; pass CutDepth`);
|
|
58
|
+
}
|
|
59
|
+
return thickness + 2 * toNativeLength(host, CUT_CLEARANCE_M);
|
|
60
|
+
}
|
|
61
|
+
function wallOpeningGeometry(editor, host, params) {
|
|
62
|
+
const op = 'addOpeningToStore';
|
|
63
|
+
if (!('Offset' in params))
|
|
64
|
+
throw new Error(`${op}: host #${host.hostId} is a wall; pass Offset/Width/Height (wall opening params)`);
|
|
65
|
+
assertPositiveFinite([params.Width, params.Height], `${op}: Width and Height must be positive`);
|
|
66
|
+
const sill = params.Sill ?? 0;
|
|
67
|
+
if (!Number.isFinite(params.Offset) || !Number.isFinite(sill))
|
|
68
|
+
throw new Error(`${op}: Offset and Sill must be finite`);
|
|
69
|
+
const bounds = host.hostBounds;
|
|
70
|
+
const thickness = bounds ? bounds.max[1] - bounds.min[1] : null;
|
|
71
|
+
const cutDepth = resolveCutDepth(host, thickness, params.CutDepth, op);
|
|
72
|
+
const centreY = bounds ? (bounds.min[1] + bounds.max[1]) / 2 : 0;
|
|
73
|
+
const width = toNativeLength(host, params.Width);
|
|
74
|
+
const height = toNativeLength(host, params.Height);
|
|
75
|
+
// Local Z (extrusion) = wall -Y, local X = wall X, so local Y = wall Z (up)
|
|
76
|
+
// and the profile is drawn as Width × Height in the wall's elevation. The
|
|
77
|
+
// origin sits on the +Y side so the extrusion runs through the body.
|
|
78
|
+
const placementId = emitLocalPlacement(editor, host.hostPlacementId, [toNativeLength(host, params.Offset), centreY + cutDepth / 2, toNativeLength(host, sill)], [0, -1, 0], [1, 0, 0]);
|
|
79
|
+
const profileId = emitRectangleProfile(editor, width, height, 0, height / 2);
|
|
80
|
+
const solidId = emitExtrudedSolid(editor, profileId, cutDepth);
|
|
81
|
+
return { placementId, profileId, solidId, cutDepth };
|
|
82
|
+
}
|
|
83
|
+
function slabOpeningGeometry(editor, host, params) {
|
|
84
|
+
const op = 'addOpeningToStore';
|
|
85
|
+
if (!('Position' in params))
|
|
86
|
+
throw new Error(`${op}: host #${host.hostId} is a slab; pass Position/Width/Depth (slab opening params)`);
|
|
87
|
+
assertPositiveFinite([params.Width, params.Depth], `${op}: Width and Depth must be positive`);
|
|
88
|
+
if (!params.Position.every(Number.isFinite))
|
|
89
|
+
throw new Error(`${op}: Position must be finite`);
|
|
90
|
+
const bounds = host.hostBounds;
|
|
91
|
+
const thickness = bounds ? bounds.max[2] - bounds.min[2] : null;
|
|
92
|
+
const cutDepth = resolveCutDepth(host, thickness, params.CutDepth, op);
|
|
93
|
+
// Centre the cut on the body so the clearance is split between both faces.
|
|
94
|
+
const centreZ = bounds ? (bounds.min[2] + bounds.max[2]) / 2 : cutDepth / 2 - toNativeLength(host, CUT_CLEARANCE_M);
|
|
95
|
+
const placementId = emitLocalPlacement(editor, host.hostPlacementId, [
|
|
96
|
+
toNativeLength(host, params.Position[0]),
|
|
97
|
+
toNativeLength(host, params.Position[1]),
|
|
98
|
+
centreZ - cutDepth / 2,
|
|
99
|
+
]);
|
|
100
|
+
const profileId = emitRectangleProfile(editor, toNativeLength(host, params.Width), toNativeLength(host, params.Depth));
|
|
101
|
+
const solidId = emitExtrudedSolid(editor, profileId, cutDepth);
|
|
102
|
+
return { placementId, profileId, solidId, cutDepth };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=opening.js.map
|
|
@@ -0,0 +1 @@
|
|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