@bldrs-ai/conway 1.386.1216 → 1.389.1221
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/compiled/examples/browser-bundled.cjs +1 -1
- package/compiled/examples/cli-bundled.cjs +1 -1
- package/compiled/examples/cli-step-bundled.cjs +1 -1
- package/compiled/examples/validator-bundled.cjs +1 -1
- package/compiled/src/compat/web-ifc/ap214_properties.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ap214_properties.js +34 -1
- package/compiled/src/compat/web-ifc/ap214_properties.test.js +30 -0
- package/compiled/src/version/version.js +1 -1
- package/compiled/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
|
|
|
30
30
|
var readline = __toESM(require("node:readline"), 1);
|
|
31
31
|
|
|
32
32
|
// compiled/src/version/version.js
|
|
33
|
-
var versionString = "Conway v1.
|
|
33
|
+
var versionString = "Conway v1.389.1221";
|
|
34
34
|
|
|
35
35
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
36
36
|
var wasmType = "";
|
|
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
|
|
|
14965
14965
|
var import_process = require("process");
|
|
14966
14966
|
|
|
14967
14967
|
// compiled/src/version/version.js
|
|
14968
|
-
var versionString = "Conway v1.
|
|
14968
|
+
var versionString = "Conway v1.389.1221";
|
|
14969
14969
|
|
|
14970
14970
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
14971
14971
|
function pThreadsAllowed() {
|
|
@@ -15912,7 +15912,7 @@ var ParsingBuffer = class {
|
|
|
15912
15912
|
};
|
|
15913
15913
|
|
|
15914
15914
|
// compiled/src/version/version.js
|
|
15915
|
-
var versionString = "Conway v1.
|
|
15915
|
+
var versionString = "Conway v1.389.1221";
|
|
15916
15916
|
|
|
15917
15917
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
15918
15918
|
function pThreadsAllowed() {
|
|
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
|
|
|
944
944
|
var entity_types_ifc_gen_default = EntityTypesIfc;
|
|
945
945
|
|
|
946
946
|
// compiled/src/version/version.js
|
|
947
|
-
var versionString = "Conway v1.
|
|
947
|
+
var versionString = "Conway v1.389.1221";
|
|
948
948
|
|
|
949
949
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
950
950
|
var wasmType = "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ap214_properties.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ap214_properties.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EACL,iBAAiB,EACjB,IAAI,EACJ,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AAiHjC;;;;;;;;;;;GAWG;AACH,qBAAa,eAAe;IAYb,OAAO,CAAC,GAAG;IAVxB,OAAO,CAAC,eAAe,CAAC,CAAwB;IAChD,OAAO,CAAC,yBAAyB,CAAC,CAAwB;IAC1D,OAAO,CAAC,YAAY,CAAC,CAAsB;IAC3C,OAAO,CAAC,iBAAiB,CAAC,CAAqB;IAC/C,OAAO,CAAC,oBAAoB,CAAC,CAAqB;IAClD,OAAO,CAAC,iBAAiB,CAAC,CAAgC;IAE1D;;OAEG;gBACkB,GAAG,EAAE,gBAAgB;IAG1C;;;;;;OAMG;IACH,UAAU,CAAE,IAAI,EAAE,MAAM,GAAI,MAAM;IAIlC;;;;;;;;;;;;;;;;;;OAkBG;IACG,iBAAiB,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAI,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ap214_properties.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ap214_properties.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAC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3B;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAmBtB;;;;;;;;;OASG;IACH;;;;;;OAMG;IACI,YAAY,IAAI,IAAI;IAI3B,OAAO,CAAC,YAAY;IA6BpB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAUlB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;;;;;;;OAQG;IACH,OAAO,CAAC,0BAA0B;IAkBlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;CAQnB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AP214ProductStructureExtraction, } from "../../AP214E3_2010/ap214_product_structure_extraction.js";
|
|
2
2
|
import { AP214PropertyExtraction, } from "../../AP214E3_2010/ap214_property_extraction.js";
|
|
3
|
+
import EntityTypesAP214 from "../../AP214E3_2010/AP214E3_2010_gen/entity_types_ap214.gen.js";
|
|
3
4
|
/**
|
|
4
5
|
* web-ifc tape type codes `deref` switches on: 1 = string (decoded via
|
|
5
6
|
* `decodeIFCString`), 4 = numeric measure (returned as-is).
|
|
@@ -84,9 +85,41 @@ export class AP214Properties {
|
|
|
84
85
|
NominalValue: valueHandle(property.numericValue ?? property.value),
|
|
85
86
|
};
|
|
86
87
|
}
|
|
88
|
+
const nodeName = this.nodeNameByExpressID_.get(id);
|
|
89
|
+
if (nodeName !== void 0) {
|
|
90
|
+
return {
|
|
91
|
+
expressID: id,
|
|
92
|
+
Name: valueHandle(nodeName),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
// Arbitrary-entity fallback: an id that is neither a property single nor
|
|
96
|
+
// a tree node — e.g. an *anonymous* solid or face a viewer picked
|
|
97
|
+
// (geometry below the ephemeral solid layer, issue #387). Resolve it
|
|
98
|
+
// through the model's O(1) express-id index and surface the STEP entity
|
|
99
|
+
// type name plus the item's own name (usually empty for anonymous
|
|
100
|
+
// geometry), so a consumer can synthesize a label like "Face #6321"
|
|
101
|
+
// without any tree or persisted state.
|
|
102
|
+
const element = this.api.StepModel.getElementByExpressID(id);
|
|
103
|
+
if (element !== void 0) {
|
|
104
|
+
let itemName = "";
|
|
105
|
+
try {
|
|
106
|
+
const candidate = element.name;
|
|
107
|
+
if (typeof candidate === "string") {
|
|
108
|
+
itemName = candidate;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
// Malformed name attribute — the type name still identifies the item.
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
expressID: id,
|
|
116
|
+
type: EntityTypesAP214[element.type],
|
|
117
|
+
Name: valueHandle(itemName),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
87
120
|
return {
|
|
88
121
|
expressID: id,
|
|
89
|
-
Name: valueHandle(
|
|
122
|
+
Name: valueHandle(""),
|
|
90
123
|
};
|
|
91
124
|
}
|
|
92
125
|
/**
|
|
@@ -132,3 +132,33 @@ describe("compat/web-ifc/AP214Properties", () => {
|
|
|
132
132
|
expect(await surface.getPropertySets(root.expressID)).toEqual([]);
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
|
+
describe("getItemProperties arbitrary-entity fallback (anonymous geometry)", () => {
|
|
136
|
+
test("resolves a non-tree solid id to its STEP type and body name", async () => {
|
|
137
|
+
// Body1 (#431) is a solid inside the widget product's representation —
|
|
138
|
+
// never a tree node unless the ephemeral solid layer is requested, so it
|
|
139
|
+
// exercises the express-id-index fallback a picked anonymous piece takes.
|
|
140
|
+
const surface = compatSurfaceFor("data/ap214-multibody-part.step");
|
|
141
|
+
const solidExpressId = 431;
|
|
142
|
+
const item = await surface.getItemProperties(solidExpressId);
|
|
143
|
+
expect(item.expressID).toBe(solidExpressId);
|
|
144
|
+
expect(item.type).toBe("MANIFOLD_SOLID_BREP");
|
|
145
|
+
expect(item.Name.value).toBe("Body1");
|
|
146
|
+
});
|
|
147
|
+
test("resolves an anonymous face id to its STEP type (label seed for #387)", async () => {
|
|
148
|
+
// NEMA face #29 has the placeholder name 'NONE' in-file; the type name is
|
|
149
|
+
// what lets a consumer synthesize "Face #29" for a picked face with no
|
|
150
|
+
// tree identity.
|
|
151
|
+
const surface = compatSurfaceFor("data/nema-23-76mm.step");
|
|
152
|
+
const faceExpressId = 29;
|
|
153
|
+
const item = await surface.getItemProperties(faceExpressId);
|
|
154
|
+
expect(item.expressID).toBe(faceExpressId);
|
|
155
|
+
expect(item.type).toBe("ADVANCED_FACE");
|
|
156
|
+
});
|
|
157
|
+
test("an unknown id still returns the bare identity shape", async () => {
|
|
158
|
+
const surface = compatSurfaceFor("data/ap214-multibody-part.step");
|
|
159
|
+
const item = await surface.getItemProperties(999999);
|
|
160
|
+
expect(item.expressID).toBe(999999);
|
|
161
|
+
expect(item.type).toBe(void 0);
|
|
162
|
+
expect(item.Name.value).toBe("");
|
|
163
|
+
});
|
|
164
|
+
});
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
// only the first segment (major) is meaningful and is the one CI carries forward.
|
|
6
6
|
// Must stay in `vN.N.N` shape: the CI stamp regex, scripts/updateVersion.mjs, and
|
|
7
7
|
// statistics.ts all match `v\d+\.\d+\.\d+`.
|
|
8
|
-
const versionString = 'Conway v1.
|
|
8
|
+
const versionString = 'Conway v1.389.1221';
|
|
9
9
|
export { versionString };
|