@ifc-lite/data 6.2.0 → 6.3.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/dist/axis2-placement.d.ts +8 -16
- package/dist/axis2-placement.d.ts.map +1 -1
- package/dist/axis2-placement.js +11 -19
- package/dist/axis2-placement.js.map +1 -1
- package/dist/generated/epsg-index.generated.js +1 -1
- package/dist/generated/epsg-index.generated.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/placement-chain.d.ts +48 -0
- package/dist/placement-chain.d.ts.map +1 -0
- package/dist/placement-chain.js +27 -0
- package/dist/placement-chain.js.map +1 -0
- package/dist/step-serializers.d.ts.map +1 -1
- package/dist/step-serializers.js +15 -61
- package/dist/step-serializers.js.map +1 -1
- package/package.json +2 -2
|
@@ -12,22 +12,14 @@
|
|
|
12
12
|
* is the schema's `IfcFirstProjAxis(Axis, $)` everywhere except next to the
|
|
13
13
|
* X axis:
|
|
14
14
|
*
|
|
15
|
-
* - when the projection is no longer than 1e-
|
|
16
|
-
*
|
|
17
|
-
* `+X` that is `(0,1,0)`, the schema's own switch to world Y. For
|
|
18
|
-
* `-X`, where the schema's projection of X vanishes and it gives
|
|
19
|
-
* answer, it is `(0,-1,0)`.
|
|
20
|
-
* - an Axis near
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* purpose: a reader that fills `$` differently from the viewer turns the
|
|
24
|
-
* frame 180 degrees about its Axis relative to what is drawn.
|
|
25
|
-
*
|
|
26
|
-
* `rust/geometry/tests/absent_ref_direction_fill.rs` pins the same vectors on
|
|
27
|
-
* the Rust side; change both together.
|
|
28
|
-
*
|
|
29
|
-
* A zero-length Axis is read as `(0,0,1)`, as `build_axis2_matrix` does, and
|
|
30
|
-
* gives `(1,0,0)`. The result is unit length and perpendicular to the Axis.
|
|
15
|
+
* - when the projection is no longer than 1e-9, i.e. the Axis is +X or -X
|
|
16
|
+
* to within rounding, the renderer takes `(0,0,1) x Axis` instead. For
|
|
17
|
+
* exactly `+X` that is `(0,1,0)`, the schema's own switch to world Y. For
|
|
18
|
+
* exactly `-X`, where the schema's projection of X vanishes and it gives
|
|
19
|
+
* no answer, it is `(0,-1,0)`.
|
|
20
|
+
* - an Axis near X but outside that noise floor is projected, normalised,
|
|
21
|
+
* like the schema: a +Y offset on +X gives about `(0,-1,0)`. Until #7751
|
|
22
|
+
* the cut was 1e-6 and that band gave about `(0,+1,0)`.
|
|
31
23
|
*/
|
|
32
24
|
export declare function firstProjAxis(axis: readonly [number, number, number]): [number, number, number];
|
|
33
25
|
//# sourceMappingURL=axis2-placement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis2-placement.d.ts","sourceRoot":"","sources":["../src/axis2-placement.ts"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"axis2-placement.d.ts","sourceRoot":"","sources":["../src/axis2-placement.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAmB/F"}
|
package/dist/axis2-placement.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
/** `build_axis2_matrix`'s `try_normalize(1e-9)` on the Axis. */
|
|
5
5
|
const AXIS_EPSILON = 1e-9;
|
|
6
|
-
/** `
|
|
7
|
-
const PROJECTION_EPSILON = 1e-
|
|
6
|
+
/** `transform::X_PROJECTION_EPSILON`: the projected X shorter than this is numeric noise (#7751). */
|
|
7
|
+
const PROJECTION_EPSILON = 1e-9;
|
|
8
8
|
/**
|
|
9
9
|
* The local X axis an `IfcAxis2Placement3D` has when its `RefDirection` is
|
|
10
10
|
* absent (`$`), as ifc-lite's renderer computes it (#5922).
|
|
@@ -19,22 +19,14 @@ const PROJECTION_EPSILON = 1e-6;
|
|
|
19
19
|
* is the schema's `IfcFirstProjAxis(Axis, $)` everywhere except next to the
|
|
20
20
|
* X axis:
|
|
21
21
|
*
|
|
22
|
-
* - when the projection is no longer than 1e-
|
|
23
|
-
*
|
|
24
|
-
* `+X` that is `(0,1,0)`, the schema's own switch to world Y. For
|
|
25
|
-
* `-X`, where the schema's projection of X vanishes and it gives
|
|
26
|
-
* answer, it is `(0,-1,0)`.
|
|
27
|
-
* - an Axis near
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* purpose: a reader that fills `$` differently from the viewer turns the
|
|
31
|
-
* frame 180 degrees about its Axis relative to what is drawn.
|
|
32
|
-
*
|
|
33
|
-
* `rust/geometry/tests/absent_ref_direction_fill.rs` pins the same vectors on
|
|
34
|
-
* the Rust side; change both together.
|
|
35
|
-
*
|
|
36
|
-
* A zero-length Axis is read as `(0,0,1)`, as `build_axis2_matrix` does, and
|
|
37
|
-
* gives `(1,0,0)`. The result is unit length and perpendicular to the Axis.
|
|
22
|
+
* - when the projection is no longer than 1e-9, i.e. the Axis is +X or -X
|
|
23
|
+
* to within rounding, the renderer takes `(0,0,1) x Axis` instead. For
|
|
24
|
+
* exactly `+X` that is `(0,1,0)`, the schema's own switch to world Y. For
|
|
25
|
+
* exactly `-X`, where the schema's projection of X vanishes and it gives
|
|
26
|
+
* no answer, it is `(0,-1,0)`.
|
|
27
|
+
* - an Axis near X but outside that noise floor is projected, normalised,
|
|
28
|
+
* like the schema: a +Y offset on +X gives about `(0,-1,0)`. Until #7751
|
|
29
|
+
* the cut was 1e-6 and that band gave about `(0,+1,0)`.
|
|
38
30
|
*/
|
|
39
31
|
export function firstProjAxis(axis) {
|
|
40
32
|
// `Math.sqrt` of the sum of squares, not `Math.hypot`, to round like
|
|
@@ -49,7 +41,7 @@ export function firstProjAxis(axis) {
|
|
|
49
41
|
if (projectedLength > PROJECTION_EPSILON) {
|
|
50
42
|
return [projected[0] / projectedLength, projected[1] / projectedLength, projected[2] / projectedLength];
|
|
51
43
|
}
|
|
52
|
-
// The projection collapsed, so Z is
|
|
44
|
+
// The projection collapsed, so Z is +-X to within rounding and |z[2]| < 0.9:
|
|
53
45
|
// `build_axis2_matrix` takes (0,0,1) x Z = (-z[1], z[0], 0) on that branch.
|
|
54
46
|
const fallbackLength = Math.sqrt(z[0] * z[0] + z[1] * z[1]);
|
|
55
47
|
return [-z[1] / fallbackLength, z[0] / fallbackLength, 0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis2-placement.js","sourceRoot":"","sources":["../src/axis2-placement.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,gEAAgE;AAChE,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,
|
|
1
|
+
{"version":3,"file":"axis2-placement.js","sourceRoot":"","sources":["../src/axis2-placement.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,gEAAgE;AAChE,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,qGAAqG;AACrG,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,aAAa,CAAC,IAAuC;IACnE,qEAAqE;IACrE,uBAAuB;IACvB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACxF,MAAM,CAAC,GAA6B,UAAU,GAAG,YAAY;QAC3D,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,EA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