@pascal-app/ifc-converter 1.0.7 → 1.1.1
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.
|
@@ -49,11 +49,17 @@ export declare class IfcModel {
|
|
|
49
49
|
circleProfile(radius: number): StepRef;
|
|
50
50
|
/** Vertical prism of `profile`, from local z = `bottom` upwards by `depth`. */
|
|
51
51
|
extrusion(profile: StepRef, bottom: number, depth: number, color?: IfcColor): StepRef;
|
|
52
|
+
/**
|
|
53
|
+
* `solid` with everything above a plane cut away. The plane passes through `point` and rises
|
|
54
|
+
* `slope` per unit of local +X; its normal points up into the removed half-space, which an
|
|
55
|
+
* AgreementFlag of false places on the normal's side.
|
|
56
|
+
*/
|
|
57
|
+
clipAboveSlope(solid: StepRef, point: Vec3, slope: number): StepRef;
|
|
52
58
|
triangulatedFaceSet(set: TriangleSet): StepRef | null;
|
|
53
59
|
private surfaceStyle;
|
|
54
60
|
styleItem(item: StepRef, color: IfcColor): void;
|
|
55
61
|
shape(representations: StepRef[]): StepRef;
|
|
56
|
-
bodyRepresentation(type: 'SweptSolid' | 'Tessellation', items: StepRef[]): StepRef;
|
|
62
|
+
bodyRepresentation(type: 'SweptSolid' | 'Clipping' | 'Tessellation', items: StepRef[]): StepRef;
|
|
57
63
|
axisRepresentation(curve: StepRef): StepRef;
|
|
58
64
|
rel(type: string, seed: string, ...args: StepValue[]): StepRef;
|
|
59
65
|
propertySet(seed: string, name: string, properties: Array<[string, StepValue]>, relatedObjects: StepRef[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc-model.d.ts","sourceRoot":"","sources":["../../src/export/ifc-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EACL,OAAO,EACP,SAAS,EAET,GAAG,EAEH,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,UAAU,EAEX,MAAM,QAAQ,CAAA;AAEf,MA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OAAO;;;CAA+B,CAAA;AACrE,eAAO,MAAM,MAAM,UAAW,MAAM;;;CAAqC,CAAA;AACzE,eAAO,MAAM,KAAK,UAAW,MAAM;;;CAA4C,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,CAAA"}
|
package/dist/export/ifc-model.js
CHANGED
|
@@ -102,6 +102,17 @@ export class IfcModel {
|
|
|
102
102
|
this.styleItem(solid, color);
|
|
103
103
|
return solid;
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* `solid` with everything above a plane cut away. The plane passes through `point` and rises
|
|
107
|
+
* `slope` per unit of local +X; its normal points up into the removed half-space, which an
|
|
108
|
+
* AgreementFlag of false places on the normal's side.
|
|
109
|
+
*/
|
|
110
|
+
clipAboveSlope(solid, point, slope) {
|
|
111
|
+
const length = Math.hypot(1, slope);
|
|
112
|
+
const plane = this.step.add('IFCPLANE', this.step.add('IFCAXIS2PLACEMENT3D', this.point3(point), this.direction([-slope / length, 0, 1 / length]), this.direction([1 / length, 0, slope / length])));
|
|
113
|
+
const halfSpace = this.step.add('IFCHALFSPACESOLID', plane, false);
|
|
114
|
+
return this.step.add('IFCBOOLEANCLIPPINGRESULT', enumValue('DIFFERENCE'), solid, halfSpace);
|
|
115
|
+
}
|
|
105
116
|
triangulatedFaceSet(set) {
|
|
106
117
|
const { positions, indices } = set;
|
|
107
118
|
const vertexCount = Math.floor(positions.length / 3);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-to-ifc.d.ts","sourceRoot":"","sources":["../../src/export/scene-to-ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAIZ,KAAK,UAAU,EAsChB,MAAM,kBAAkB,CAAA;AAyBzB,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;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AO,EAAE,aAAa,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,gBAAgB,CAAA;CAC1B;AAoMD,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,eAAe,CAy2CrE;AAiCD,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE9D"}
|
|
@@ -577,7 +577,9 @@ export function buildIfcExport(input) {
|
|
|
577
577
|
const chord = Math.hypot(endPlan[0] - startPlan[0], endPlan[1] - startPlan[1]);
|
|
578
578
|
const support = wallSupportForNodes(wall, nodes);
|
|
579
579
|
const base = support.elevation;
|
|
580
|
-
const
|
|
580
|
+
const startTop = getWallTop(wall, levelId, nodes, base, 0);
|
|
581
|
+
const endTop = getWallTop(wall, levelId, nodes, base, 1);
|
|
582
|
+
const top = Math.max(startTop, endTop);
|
|
581
583
|
const cells = wallBaseCells(wall, support, top);
|
|
582
584
|
if (chord < 1e-6 || cells.every((cell) => top - cell.bottom <= 1e-4)) {
|
|
583
585
|
skipped.push({ nodeId: wall.id, type: wall.type, reason: 'degenerate' });
|
|
@@ -612,7 +614,7 @@ export function buildIfcExport(input) {
|
|
|
612
614
|
}
|
|
613
615
|
// A stepped base (runs on different supports, or faces on different
|
|
614
616
|
// floors) becomes one prism per run, each clipped from the footprint.
|
|
615
|
-
const
|
|
617
|
+
const prisms = cells.length === 1
|
|
616
618
|
? [
|
|
617
619
|
model.extrusion(model.polygonProfile(footprint), cells[0].bottom - base, top - cells[0].bottom),
|
|
618
620
|
]
|
|
@@ -626,9 +628,15 @@ export function buildIfcExport(input) {
|
|
|
626
628
|
]
|
|
627
629
|
: [];
|
|
628
630
|
}));
|
|
631
|
+
// A sloped top is linear along the chord, the wall frame's +X: each prism rises to the
|
|
632
|
+
// higher end and the plane through both end tops cuts it down.
|
|
633
|
+
const sloped = Math.abs(endTop - startTop) > 1e-6;
|
|
634
|
+
const solids = sloped
|
|
635
|
+
? prisms.map((prism) => model.clipAboveSlope(prism, [0, 0, startTop - base], (endTop - startTop) / chord))
|
|
636
|
+
: prisms;
|
|
629
637
|
const shape = model.shape([
|
|
630
638
|
model.axisRepresentation(model.polyline2(axisPoints, false)),
|
|
631
|
-
model.bodyRepresentation('SweptSolid', solids),
|
|
639
|
+
model.bodyRepresentation(sloped ? 'Clipping' : 'SweptSolid', solids),
|
|
632
640
|
]);
|
|
633
641
|
const wallPlacement = model.localPlacement(storey.placement, frame);
|
|
634
642
|
const wallRef = emitElement({ entity: 'IFCWALL', tail: (tag) => [tag, enumValue('STANDARD')] }, wall.id, wall, nodeName(wall, 'Wall'), wallPlacement, shape);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pascal-app/ifc-converter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "IFC → Pascal scene-graph conversion. Pure logic — no DOM, no React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "npm run build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@pascal-app/core": "^1.
|
|
34
|
+
"@pascal-app/core": "^1.1.1",
|
|
35
35
|
"web-ifc": "^0.0.78"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|