brepjs-bim 0.22.0 → 0.23.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.
@@ -0,0 +1,36 @@
1
+ import { TransformOp } from 'brepjs-families';
2
+ import { FrameInput, Mat4x4, Vec3, WorldPlacement } from './import/placement.js';
3
+ export type Frame = Mat4x4;
4
+ export declare const IDENTITY_FRAME: Frame;
5
+ /** Column-major 4x4 multiply: `a . b` (apply b first, then a). */
6
+ export declare function frameMul(a: Frame, b: Frame): Frame;
7
+ export declare function translationFrame(v: Vec3): Frame;
8
+ /**
9
+ * Builds a frame from an authored `(origin, axisX, axisZ)` placement, using the
10
+ * same IFC orthonormalization as `placementToMatrix`/`readAxis2Placement3D`:
11
+ * z = normalize(axisZ); x = normalize(axisX projected perpendicular to z);
12
+ * y = z x. Lets a civil node authored with explicit axis props enter the same
13
+ * frame pipeline as a `tRotate` chain.
14
+ */
15
+ export declare function frameFromPlacement(f: FrameInput): Frame;
16
+ /**
17
+ * Rotation by `angleDeg` about `axis` (default +Z) through pivot `at` (default
18
+ * origin), matching `csg.rotate` (Rodrigues; right-handed about the axis). With
19
+ * a pivot the motion is `T(at) . R . T(-at)`, i.e. `p -> at + R(p - at)`.
20
+ */
21
+ export declare function rotationFrame(angleDeg: number, axis?: Vec3, at?: Vec3): Frame;
22
+ /**
23
+ * Composes an authored `TransformOp` chain into one frame, matching families'
24
+ * `applyOps`: `ops[0]` is innermost (applied first). For `[A, B]` the composed
25
+ * motion is `B . A`, so a point transforms as `B(A(p))`.
26
+ */
27
+ export declare function frameFromOps(ops: readonly TransformOp[]): Frame;
28
+ /** Rigid inverse of `[R | t]`: `[R^T | -R^T t]`. */
29
+ export declare function frameInverse(f: Frame): Frame;
30
+ /** Decomposes a frame into origin (mm) + IFC axes (axisX, axisZ). */
31
+ export declare function decomposeFrame(f: Frame): WorldPlacement;
32
+ /** Translation column of a frame. */
33
+ export declare function frameOrigin(f: Frame): Vec3;
34
+ /** True when the rotation part is the identity (within tolerance): a pure
35
+ * translation, so the existing translation-only placement path suffices. */
36
+ export declare function isPureTranslation(f: Frame, eps?: number): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs-bim",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "BIM layer for brepjs — IFC4-aligned parametric building elements",
5
5
  "keywords": [
6
6
  "bim",