@bldrs-ai/conway 1.389.1221 → 1.394.1504
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 +36 -22
- package/compiled/Dist/ConwayGeomWasmNode.js +0 -0
- package/compiled/Dist/ConwayGeomWasmNodeMT.js +0 -0
- package/compiled/Dist/ConwayGeomWasmWeb.js +0 -0
- package/compiled/Dist/ConwayGeomWasmWebMT.js +1 -1
- package/compiled/Dist/ConwayGeomWasmWebMT.wasm +0 -0
- package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmNode.js +0 -0
- package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmNodeMT.js +0 -0
- package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWeb.js +0 -0
- package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWebMT.js +1 -1
- package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWebMT.wasm +0 -0
- package/compiled/dependencies/conway-geom/interface/conway_geometry.d.ts +19 -0
- package/compiled/dependencies/conway-geom/interface/conway_geometry.d.ts.map +1 -1
- package/compiled/dependencies/conway-geom/interface/conway_geometry.js +17 -0
- package/compiled/dependencies/conway-geom/interface/parameters/surface_object.d.ts +6 -0
- package/compiled/dependencies/conway-geom/interface/parameters/surface_object.d.ts.map +1 -1
- package/compiled/examples/browser-bundled.cjs +1569 -51
- package/compiled/examples/cli-bundled.cjs +2790 -436
- package/compiled/examples/cli-step-bundled.cjs +1904 -229
- package/compiled/examples/validator-bundled.cjs +1569 -51
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.d.ts +2 -2
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.js +2 -2
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.d.ts +3 -3
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.js +3 -3
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.d.ts +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.js +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.d.ts +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.js +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.d.ts +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.js +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.d.ts +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.js +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/presentation_style_assignment.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/presentation_style_assignment.gen.js +2 -2
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/schema_ap214.gen.js +11 -11
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.d.ts +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.js +1 -1
- package/compiled/src/AP214E3_2010/ap214_command_line_main.js +7 -3
- package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts +181 -7
- package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/ap214_geometry_extraction.js +906 -137
- package/compiled/src/AP214E3_2010/ap214_geometry_extraction.test.js +10 -2
- package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.d.ts +2 -0
- package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.d.ts.map +1 -0
- package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.js +114 -0
- package/compiled/src/AP214E3_2010/ap214_model_geometry.d.ts +6 -0
- package/compiled/src/AP214E3_2010/ap214_model_geometry.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/ap214_model_geometry.js +9 -0
- package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.d.ts +2 -0
- package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.d.ts.map +1 -0
- package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.js +233 -0
- package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.d.ts +2 -0
- package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.d.ts.map +1 -0
- package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.js +147 -0
- package/compiled/src/AP214E3_2010/ap214_step_model.d.ts +2 -1
- package/compiled/src/AP214E3_2010/ap214_step_model.d.ts.map +1 -1
- package/compiled/src/AP214E3_2010/ap214_step_model.js +1 -1
- package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.d.ts +2 -0
- package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.d.ts.map +1 -0
- package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.js +65 -0
- package/compiled/src/AP214E3_2010/ap214_unit_scale.test.d.ts +2 -0
- package/compiled/src/AP214E3_2010/ap214_unit_scale.test.d.ts.map +1 -0
- package/compiled/src/AP214E3_2010/ap214_unit_scale.test.js +111 -0
- package/compiled/src/compat/web-ifc/ap214_streamed_open.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ap214_streamed_open.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ap214_streamed_open.test.js +190 -0
- package/compiled/src/compat/web-ifc/coordination_export_order.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/coordination_export_order.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/coordination_export_order.test.js +110 -0
- package/compiled/src/compat/web-ifc/coordination_f64.d.ts +165 -0
- package/compiled/src/compat/web-ifc/coordination_f64.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/coordination_f64.js +286 -0
- package/compiled/src/compat/web-ifc/coordination_f64.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/coordination_f64.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/coordination_f64.test.js +225 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts +154 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api.js +211 -3
- package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.js +288 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts +39 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts +30 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.js +83 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.js +383 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.js +124 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts +132 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.js +488 -92
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +268 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.js +996 -149
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.js +129 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.d.ts +134 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.js +933 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/spatial_imposter.test.js +467 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.d.ts +187 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.js +524 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.test.js +234 -0
- package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts +306 -0
- package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/streamed_preview_channel.js +580 -0
- package/compiled/src/compat/web-ifc/web_wasm_directory.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/web_wasm_directory.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/web_wasm_directory.test.js +22 -0
- package/compiled/src/core/composed_model_skeleton.d.ts +63 -0
- package/compiled/src/core/composed_model_skeleton.d.ts.map +1 -0
- package/compiled/src/core/composed_model_skeleton.js +66 -0
- package/compiled/src/core/composed_model_skeleton.test.d.ts +2 -0
- package/compiled/src/core/composed_model_skeleton.test.d.ts.map +1 -0
- package/compiled/src/core/composed_model_skeleton.test.js +69 -0
- package/compiled/src/core/demand_geometry_queue.d.ts +147 -0
- package/compiled/src/core/demand_geometry_queue.d.ts.map +1 -0
- package/compiled/src/core/demand_geometry_queue.js +223 -0
- package/compiled/src/core/demand_geometry_queue.test.d.ts +2 -0
- package/compiled/src/core/demand_geometry_queue.test.d.ts.map +1 -0
- package/compiled/src/core/demand_geometry_queue.test.js +133 -0
- package/compiled/src/core/demand_residency_pump.d.ts +93 -0
- package/compiled/src/core/demand_residency_pump.d.ts.map +1 -0
- package/compiled/src/core/demand_residency_pump.js +120 -0
- package/compiled/src/core/demand_residency_pump.test.d.ts +2 -0
- package/compiled/src/core/demand_residency_pump.test.d.ts.map +1 -0
- package/compiled/src/core/demand_residency_pump.test.js +148 -0
- package/compiled/src/core/geometry_tile_bindings.d.ts +110 -0
- package/compiled/src/core/geometry_tile_bindings.d.ts.map +1 -0
- package/compiled/src/core/geometry_tile_bindings.js +76 -0
- package/compiled/src/core/geometry_tile_bindings.test.d.ts +2 -0
- package/compiled/src/core/geometry_tile_bindings.test.d.ts.map +1 -0
- package/compiled/src/core/geometry_tile_bindings.test.js +211 -0
- package/compiled/src/core/geometry_tile_pool.d.ts +99 -0
- package/compiled/src/core/geometry_tile_pool.d.ts.map +1 -0
- package/compiled/src/core/geometry_tile_pool.js +104 -0
- package/compiled/src/core/geometry_tile_pool.test.d.ts +2 -0
- package/compiled/src/core/geometry_tile_pool.test.d.ts.map +1 -0
- package/compiled/src/core/geometry_tile_pool.test.js +180 -0
- package/compiled/src/core/mem/chunked_pool.d.ts +116 -0
- package/compiled/src/core/mem/chunked_pool.d.ts.map +1 -0
- package/compiled/src/core/mem/chunked_pool.js +149 -0
- package/compiled/src/core/mem/chunked_pool.test.d.ts +2 -0
- package/compiled/src/core/mem/chunked_pool.test.d.ts.map +1 -0
- package/compiled/src/core/mem/chunked_pool.test.js +63 -0
- package/compiled/src/core/mem/shared_asset_pool.d.ts +82 -0
- package/compiled/src/core/mem/shared_asset_pool.d.ts.map +1 -0
- package/compiled/src/core/mem/shared_asset_pool.js +113 -0
- package/compiled/src/core/mem/shared_asset_pool.test.d.ts +2 -0
- package/compiled/src/core/mem/shared_asset_pool.test.d.ts.map +1 -0
- package/compiled/src/core/mem/shared_asset_pool.test.js +49 -0
- package/compiled/src/core/model_registry.d.ts +87 -0
- package/compiled/src/core/model_registry.d.ts.map +1 -0
- package/compiled/src/core/model_registry.js +101 -0
- package/compiled/src/core/model_registry.test.d.ts +2 -0
- package/compiled/src/core/model_registry.test.d.ts.map +1 -0
- package/compiled/src/core/model_registry.test.js +60 -0
- package/compiled/src/core/model_uri.d.ts +57 -0
- package/compiled/src/core/model_uri.d.ts.map +1 -0
- package/compiled/src/core/model_uri.js +101 -0
- package/compiled/src/core/model_uri.test.d.ts +2 -0
- package/compiled/src/core/model_uri.test.d.ts.map +1 -0
- package/compiled/src/core/model_uri.test.js +49 -0
- package/compiled/src/core/progress.d.ts +16 -2
- package/compiled/src/core/progress.d.ts.map +1 -1
- package/compiled/src/core/progress.js +31 -5
- package/compiled/src/core/progress.test.js +11 -2
- package/compiled/src/core/progress_log.d.ts +1 -0
- package/compiled/src/core/progress_log.d.ts.map +1 -1
- package/compiled/src/core/progress_log.js +7 -2
- package/compiled/src/core/progress_log.test.js +21 -0
- package/compiled/src/core/shared_byte_budget.d.ts +60 -0
- package/compiled/src/core/shared_byte_budget.d.ts.map +1 -0
- package/compiled/src/core/shared_byte_budget.js +85 -0
- package/compiled/src/core/shared_byte_budget.test.d.ts +2 -0
- package/compiled/src/core/shared_byte_budget.test.d.ts.map +1 -0
- package/compiled/src/core/shared_byte_budget.test.js +55 -0
- package/compiled/src/core/wasm_heap.d.ts +208 -0
- package/compiled/src/core/wasm_heap.d.ts.map +1 -0
- package/compiled/src/core/wasm_heap.js +417 -0
- package/compiled/src/core/wasm_heap.test.d.ts +2 -0
- package/compiled/src/core/wasm_heap.test.d.ts.map +1 -0
- package/compiled/src/core/wasm_heap.test.js +546 -0
- package/compiled/src/demand/index.d.ts +23 -0
- package/compiled/src/demand/index.d.ts.map +1 -0
- package/compiled/src/demand/index.js +22 -0
- package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.d.ts +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.d.ts.map +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.js +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.d.ts.map +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.js +2 -2
- package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.d.ts +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.d.ts.map +1 -1
- package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.js +1 -1
- package/compiled/src/ifc/ifc4_gen/schema_ifc.gen.js +2 -2
- package/compiled/src/ifc/ifc_demand_extraction.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_demand_extraction.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_demand_extraction.test.js +251 -0
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts +367 -6
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_geometry_extraction.js +1322 -389
- package/compiled/src/ifc/ifc_grid_placement.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_grid_placement.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_grid_placement.test.js +261 -0
- package/compiled/src/ifc/ifc_model_geometry.d.ts +12 -0
- package/compiled/src/ifc/ifc_model_geometry.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_model_geometry.js +15 -0
- package/compiled/src/ifc/ifc_regression_batch_main.js +210 -12
- package/compiled/src/ifc/ifc_spatial_skeleton.d.ts +145 -0
- package/compiled/src/ifc/ifc_spatial_skeleton.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_spatial_skeleton.js +266 -0
- package/compiled/src/ifc/ifc_spatial_skeleton.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_spatial_skeleton.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_spatial_skeleton.test.js +199 -0
- package/compiled/src/ifc/ifc_step_model.d.ts +6 -2
- package/compiled/src/ifc/ifc_step_model.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_step_model.js +6 -4
- package/compiled/src/ifc/ifc_step_parser.d.ts +58 -0
- package/compiled/src/ifc/ifc_step_parser.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_step_parser.js +64 -0
- package/compiled/src/ifc/ifc_stream_model.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_stream_model.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_stream_model.test.js +70 -0
- package/compiled/src/ifc/ifc_stream_open.d.ts +131 -0
- package/compiled/src/ifc/ifc_stream_open.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_stream_open.js +116 -0
- package/compiled/src/ifc/ifc_stream_open.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_stream_open.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_stream_open.test.js +230 -0
- package/compiled/src/ifc/ifc_tile_extractor.d.ts +84 -0
- package/compiled/src/ifc/ifc_tile_extractor.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_tile_extractor.js +134 -0
- package/compiled/src/ifc/ifc_tile_extractor.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_tile_extractor.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_tile_extractor.test.js +118 -0
- package/compiled/src/ifc/ifc_typed_select_enum.test.d.ts +2 -0
- package/compiled/src/ifc/ifc_typed_select_enum.test.d.ts.map +1 -0
- package/compiled/src/ifc/ifc_typed_select_enum.test.js +60 -0
- package/compiled/src/index.d.ts +21 -1
- package/compiled/src/index.d.ts.map +1 -1
- package/compiled/src/index.js +28 -1
- package/compiled/src/logging/logger.d.ts +16 -2
- package/compiled/src/logging/logger.d.ts.map +1 -1
- package/compiled/src/logging/logger.js +34 -7
- package/compiled/src/logging/logger.test.js +30 -0
- package/compiled/src/mem/index.d.ts +17 -0
- package/compiled/src/mem/index.d.ts.map +1 -0
- package/compiled/src/mem/index.js +16 -0
- package/compiled/src/namespace_surface.test.d.ts +2 -0
- package/compiled/src/namespace_surface.test.d.ts.map +1 -0
- package/compiled/src/namespace_surface.test.js +43 -0
- package/compiled/src/parsing/parsing_buffer.d.ts +23 -0
- package/compiled/src/parsing/parsing_buffer.d.ts.map +1 -1
- package/compiled/src/parsing/parsing_buffer.js +31 -0
- package/compiled/src/scripts/model_report_displacement.test.d.ts +2 -0
- package/compiled/src/scripts/model_report_displacement.test.d.ts.map +1 -0
- package/compiled/src/scripts/model_report_displacement.test.js +104 -0
- package/compiled/src/scripts/render_glb_paths.test.d.ts +2 -0
- package/compiled/src/scripts/render_glb_paths.test.d.ts.map +1 -0
- package/compiled/src/scripts/render_glb_paths.test.js +115 -0
- package/compiled/src/step/indexing/step_type_indexer.d.ts +20 -0
- package/compiled/src/step/indexing/step_type_indexer.d.ts.map +1 -1
- package/compiled/src/step/indexing/step_type_indexer.js +67 -0
- package/compiled/src/step/parsing/byte_source.d.ts +153 -0
- package/compiled/src/step/parsing/byte_source.d.ts.map +1 -0
- package/compiled/src/step/parsing/byte_source.js +106 -0
- package/compiled/src/step/parsing/byte_source.test.d.ts +2 -0
- package/compiled/src/step/parsing/byte_source.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/byte_source.test.js +47 -0
- package/compiled/src/step/parsing/byte_source_node.d.ts +41 -0
- package/compiled/src/step/parsing/byte_source_node.d.ts.map +1 -0
- package/compiled/src/step/parsing/byte_source_node.js +54 -0
- package/compiled/src/step/parsing/columnar_index.d.ts +103 -0
- package/compiled/src/step/parsing/columnar_index.d.ts.map +1 -0
- package/compiled/src/step/parsing/columnar_index.js +224 -0
- package/compiled/src/step/parsing/columnar_index.test.d.ts +2 -0
- package/compiled/src/step/parsing/columnar_index.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/columnar_index.test.js +155 -0
- package/compiled/src/step/parsing/cross_reference_registry.d.ts +95 -0
- package/compiled/src/step/parsing/cross_reference_registry.d.ts.map +1 -0
- package/compiled/src/step/parsing/cross_reference_registry.js +91 -0
- package/compiled/src/step/parsing/cross_reference_registry.test.d.ts +2 -0
- package/compiled/src/step/parsing/cross_reference_registry.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/cross_reference_registry.test.js +66 -0
- package/compiled/src/step/parsing/decode_utf8.d.ts +15 -0
- package/compiled/src/step/parsing/decode_utf8.d.ts.map +1 -1
- package/compiled/src/step/parsing/decode_utf8.js +28 -0
- package/compiled/src/step/parsing/express_ref_scan.d.ts +20 -0
- package/compiled/src/step/parsing/express_ref_scan.d.ts.map +1 -0
- package/compiled/src/step/parsing/express_ref_scan.js +91 -0
- package/compiled/src/step/parsing/express_ref_scan.test.d.ts +2 -0
- package/compiled/src/step/parsing/express_ref_scan.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/express_ref_scan.test.js +28 -0
- package/compiled/src/step/parsing/index_sidecar.d.ts +81 -0
- package/compiled/src/step/parsing/index_sidecar.d.ts.map +1 -0
- package/compiled/src/step/parsing/index_sidecar.js +283 -0
- package/compiled/src/step/parsing/index_sidecar.test.d.ts +2 -0
- package/compiled/src/step/parsing/index_sidecar.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/index_sidecar.test.js +122 -0
- package/compiled/src/step/parsing/inf_recovery_index.test.d.ts +2 -0
- package/compiled/src/step/parsing/inf_recovery_index.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/inf_recovery_index.test.js +108 -0
- package/compiled/src/step/parsing/prefix_type_index.d.ts +124 -0
- package/compiled/src/step/parsing/prefix_type_index.d.ts.map +1 -0
- package/compiled/src/step/parsing/prefix_type_index.js +207 -0
- package/compiled/src/step/parsing/prefix_type_index.test.d.ts +2 -0
- package/compiled/src/step/parsing/prefix_type_index.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/prefix_type_index.test.js +298 -0
- package/compiled/src/step/parsing/range_byte_source.d.ts +69 -0
- package/compiled/src/step/parsing/range_byte_source.d.ts.map +1 -0
- package/compiled/src/step/parsing/range_byte_source.js +78 -0
- package/compiled/src/step/parsing/range_byte_source.test.d.ts +2 -0
- package/compiled/src/step/parsing/range_byte_source.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/range_byte_source.test.js +70 -0
- package/compiled/src/step/parsing/record_event.d.ts +23 -0
- package/compiled/src/step/parsing/record_event.d.ts.map +1 -0
- package/compiled/src/step/parsing/record_event.js +1 -0
- package/compiled/src/step/parsing/record_field_cursor.d.ts +94 -0
- package/compiled/src/step/parsing/record_field_cursor.d.ts.map +1 -0
- package/compiled/src/step/parsing/record_field_cursor.js +189 -0
- package/compiled/src/step/parsing/step_deserialization_functions.d.ts +29 -0
- package/compiled/src/step/parsing/step_deserialization_functions.d.ts.map +1 -1
- package/compiled/src/step/parsing/step_deserialization_functions.js +45 -0
- package/compiled/src/step/parsing/step_deserialization_functions.test.js +59 -1
- package/compiled/src/step/parsing/step_parser.d.ts +66 -1
- package/compiled/src/step/parsing/step_parser.d.ts.map +1 -1
- package/compiled/src/step/parsing/step_parser.js +164 -10
- package/compiled/src/step/parsing/step_string_parser.js +8 -8
- package/compiled/src/step/parsing/streaming_index_builder.d.ts +141 -0
- package/compiled/src/step/parsing/streaming_index_builder.d.ts.map +1 -0
- package/compiled/src/step/parsing/streaming_index_builder.js +280 -0
- package/compiled/src/step/parsing/streaming_index_builder.test.d.ts +2 -0
- package/compiled/src/step/parsing/streaming_index_builder.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/streaming_index_builder.test.js +107 -0
- package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts +2 -0
- package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/streaming_index_builder_async.test.js +109 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.d.ts +71 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.d.ts.map +1 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.js +88 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.test.d.ts +2 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/streaming_record_dispatcher.test.js +66 -0
- package/compiled/src/step/parsing/uint32_sink.d.ts +72 -0
- package/compiled/src/step/parsing/uint32_sink.d.ts.map +1 -0
- package/compiled/src/step/parsing/uint32_sink.js +180 -0
- package/compiled/src/step/parsing/uint32_sink.test.d.ts +2 -0
- package/compiled/src/step/parsing/uint32_sink.test.d.ts.map +1 -0
- package/compiled/src/step/parsing/uint32_sink.test.js +199 -0
- package/compiled/src/step/step_buffer_provider.d.ts +48 -3
- package/compiled/src/step/step_buffer_provider.d.ts.map +1 -1
- package/compiled/src/step/step_buffer_provider.js +60 -11
- package/compiled/src/step/step_buffer_provider.test.js +14 -0
- package/compiled/src/step/step_entity_base.d.ts +65 -3
- package/compiled/src/step/step_entity_base.d.ts.map +1 -1
- package/compiled/src/step/step_entity_base.js +135 -3
- package/compiled/src/step/step_model_base.d.ts +221 -8
- package/compiled/src/step/step_model_base.d.ts.map +1 -1
- package/compiled/src/step/step_model_base.js +542 -7
- package/compiled/src/stream/index.d.ts +34 -0
- package/compiled/src/stream/index.d.ts.map +1 -0
- package/compiled/src/stream/index.js +32 -0
- package/compiled/src/version/version.js +1 -1
- package/compiled/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { GeometryTilePoolBindings, TileAssetExtractor } from "../core/geometry_tile_bindings.js";
|
|
2
|
+
import { GeometryAsset } from "../core/geometry_tile_pool.js";
|
|
3
|
+
import { IfcGeometryExtraction } from "./ifc_geometry_extraction.js";
|
|
4
|
+
/**
|
|
5
|
+
* The wasm module surface the extractor commits through: the tile pool
|
|
6
|
+
* bindings plus the Geometry-taking commit (embind `commitGeometryTile`,
|
|
7
|
+
* which serialises a reified Geometry's payload straight into pool chunks).
|
|
8
|
+
*/
|
|
9
|
+
export interface TileCommitBindings extends GeometryTilePoolBindings {
|
|
10
|
+
/**
|
|
11
|
+
* Commit a reified geometry's payload into the wasm tile pool.
|
|
12
|
+
*
|
|
13
|
+
* @param assetID The tile's asset id.
|
|
14
|
+
* @param geometry The wasm Geometry object (reified on access).
|
|
15
|
+
* @return {boolean} True on success.
|
|
16
|
+
*/
|
|
17
|
+
commitGeometryTile(assetID: number, geometry: unknown): boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The production {@link TileAssetExtractor} (Phase B3): drives the
|
|
21
|
+
* per-product demand extraction seam (Phase B2) and commits the resulting
|
|
22
|
+
* meshes into the wasm tile pool.
|
|
23
|
+
*
|
|
24
|
+
* Asset identity: one asset per produced **mesh**, keyed by the mesh's
|
|
25
|
+
* localID (the representation item). Mapped items reuse representation
|
|
26
|
+
* geometry across products, so shared representations become shared assets —
|
|
27
|
+
* the sharing the pools refcount.
|
|
28
|
+
*
|
|
29
|
+
* Contract notes:
|
|
30
|
+
* - `assetsOf` runs the (expensive) per-product extraction on first call and
|
|
31
|
+
* caches the asset list; sizes are exact reified byte costs, so the TS
|
|
32
|
+
* accounting layer admits with real numbers. This front-loads cost into
|
|
33
|
+
* `assetsOf` by design — see `GeometryTilePool.extract`'s pricing pass.
|
|
34
|
+
* - `materialize` commits an already-extracted mesh into the pool;
|
|
35
|
+
* `discard` releases the wasm tile. The CPU-side canonical mesh is left in
|
|
36
|
+
* place in this phase (serving uploads from tiles — and dropping the fat
|
|
37
|
+
* working geometry — is the Phase C flip).
|
|
38
|
+
*/
|
|
39
|
+
export declare class IfcTileAssetExtractor implements TileAssetExtractor {
|
|
40
|
+
private readonly extraction_;
|
|
41
|
+
private readonly bindings_;
|
|
42
|
+
/** Product localID → its assets, cached after first extraction. */
|
|
43
|
+
private readonly assetsByProduct_;
|
|
44
|
+
/**
|
|
45
|
+
* @param extraction_ The geometry extraction (its model provides meshes).
|
|
46
|
+
* @param bindings_ The wasm tile pool surface to commit through.
|
|
47
|
+
*/
|
|
48
|
+
constructor(extraction_: IfcGeometryExtraction, bindings_: TileCommitBindings);
|
|
49
|
+
/**
|
|
50
|
+
* The assets (meshes) a product references, extracting it on first ask.
|
|
51
|
+
*
|
|
52
|
+
* Attribution walks the product's **representation-item closure**
|
|
53
|
+
* (recursing through mapped items into their shared source
|
|
54
|
+
* representations) and claims every item that has an extracted mesh —
|
|
55
|
+
* NOT a before/after diff of the mesh set. The distinction is the
|
|
56
|
+
* mapped-item case: a shared source's meshes already exist when the
|
|
57
|
+
* second product asks, so a diff would omit them and its tile would not
|
|
58
|
+
* hold references to geometry it renders. Closure attribution is
|
|
59
|
+
* extraction-order independent.
|
|
60
|
+
*
|
|
61
|
+
* @param productLocalID The product's local ID.
|
|
62
|
+
* @return {GeometryAsset<number>[]} One asset per referenced mesh, keyed
|
|
63
|
+
* by the mesh's representation-item localID (shared across products for
|
|
64
|
+
* mapped sources), sized at exact reified cost.
|
|
65
|
+
*/
|
|
66
|
+
assetsOf(productLocalID: number): GeometryAsset<number>[];
|
|
67
|
+
/**
|
|
68
|
+
* The localIDs of every representation item in a product's Body /
|
|
69
|
+
* Facetation representations, recursing through mapped items into their
|
|
70
|
+
* (shared) source representations — the key space extraction stores
|
|
71
|
+
* meshes under.
|
|
72
|
+
*
|
|
73
|
+
* @param productLocalID The product's local ID.
|
|
74
|
+
* @return {Set<number>} The representation-item localIDs.
|
|
75
|
+
*/
|
|
76
|
+
private representationItemIDs_;
|
|
77
|
+
/**
|
|
78
|
+
* Commit one extracted mesh into the wasm tile pool.
|
|
79
|
+
*
|
|
80
|
+
* @param assetID The mesh (representation item) localID.
|
|
81
|
+
*/
|
|
82
|
+
extractIntoTile(assetID: number): void;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=ifc_tile_extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_tile_extractor.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_tile_extractor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGjE;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,wBAAwB;IAElE;;;;;;OAMG;IACH,kBAAkB,CAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAI,OAAO,CAAA;CAClE;AAUD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,qBAAsB,YAAW,kBAAkB;IAU5D,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6C;IAE9E;;;OAGG;gBAEgB,WAAW,EAAE,qBAAqB,EAClC,SAAS,EAAE,kBAAkB;IAKhD;;;;;;;;;;;;;;;;OAgBG;IACI,QAAQ,CAAE,cAAc,EAAE,MAAM,GAAI,aAAa,CAAC,MAAM,CAAC,EAAE;IAqClE;;;;;;;;OAQG;IACH,OAAO,CAAC,sBAAsB;IA0C9B;;;;OAIG;IACI,eAAe,CAAE,OAAO,EAAE,MAAM,GAAI,IAAI;CAiBhD"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Reified payload framing: 8-byte header + float vertex data + u32 indices
|
|
2
|
+
// (tile_pool_api.h layout).
|
|
3
|
+
const TILE_HEADER_BYTES = 8;
|
|
4
|
+
const FLOAT_BYTES = 4;
|
|
5
|
+
const INDEX_BYTES = 4;
|
|
6
|
+
/**
|
|
7
|
+
* The production {@link TileAssetExtractor} (Phase B3): drives the
|
|
8
|
+
* per-product demand extraction seam (Phase B2) and commits the resulting
|
|
9
|
+
* meshes into the wasm tile pool.
|
|
10
|
+
*
|
|
11
|
+
* Asset identity: one asset per produced **mesh**, keyed by the mesh's
|
|
12
|
+
* localID (the representation item). Mapped items reuse representation
|
|
13
|
+
* geometry across products, so shared representations become shared assets —
|
|
14
|
+
* the sharing the pools refcount.
|
|
15
|
+
*
|
|
16
|
+
* Contract notes:
|
|
17
|
+
* - `assetsOf` runs the (expensive) per-product extraction on first call and
|
|
18
|
+
* caches the asset list; sizes are exact reified byte costs, so the TS
|
|
19
|
+
* accounting layer admits with real numbers. This front-loads cost into
|
|
20
|
+
* `assetsOf` by design — see `GeometryTilePool.extract`'s pricing pass.
|
|
21
|
+
* - `materialize` commits an already-extracted mesh into the pool;
|
|
22
|
+
* `discard` releases the wasm tile. The CPU-side canonical mesh is left in
|
|
23
|
+
* place in this phase (serving uploads from tiles — and dropping the fat
|
|
24
|
+
* working geometry — is the Phase C flip).
|
|
25
|
+
*/
|
|
26
|
+
export class IfcTileAssetExtractor {
|
|
27
|
+
/**
|
|
28
|
+
* @param extraction_ The geometry extraction (its model provides meshes).
|
|
29
|
+
* @param bindings_ The wasm tile pool surface to commit through.
|
|
30
|
+
*/
|
|
31
|
+
constructor(extraction_, bindings_) {
|
|
32
|
+
this.extraction_ = extraction_;
|
|
33
|
+
this.bindings_ = bindings_;
|
|
34
|
+
/** Product localID → its assets, cached after first extraction. */
|
|
35
|
+
this.assetsByProduct_ = new Map();
|
|
36
|
+
this.extraction_.prepareDemandExtraction();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The assets (meshes) a product references, extracting it on first ask.
|
|
40
|
+
*
|
|
41
|
+
* Attribution walks the product's **representation-item closure**
|
|
42
|
+
* (recursing through mapped items into their shared source
|
|
43
|
+
* representations) and claims every item that has an extracted mesh —
|
|
44
|
+
* NOT a before/after diff of the mesh set. The distinction is the
|
|
45
|
+
* mapped-item case: a shared source's meshes already exist when the
|
|
46
|
+
* second product asks, so a diff would omit them and its tile would not
|
|
47
|
+
* hold references to geometry it renders. Closure attribution is
|
|
48
|
+
* extraction-order independent.
|
|
49
|
+
*
|
|
50
|
+
* @param productLocalID The product's local ID.
|
|
51
|
+
* @return {GeometryAsset<number>[]} One asset per referenced mesh, keyed
|
|
52
|
+
* by the mesh's representation-item localID (shared across products for
|
|
53
|
+
* mapped sources), sized at exact reified cost.
|
|
54
|
+
*/
|
|
55
|
+
assetsOf(productLocalID) {
|
|
56
|
+
const cached = this.assetsByProduct_.get(productLocalID);
|
|
57
|
+
if (cached !== void 0) {
|
|
58
|
+
return cached;
|
|
59
|
+
}
|
|
60
|
+
this.extraction_.extractProductGeometryByLocalID(productLocalID);
|
|
61
|
+
const geometry = this.extraction_.model.geometry;
|
|
62
|
+
const assets = [];
|
|
63
|
+
for (const itemLocalID of this.representationItemIDs_(productLocalID)) {
|
|
64
|
+
const mesh = geometry.getByLocalID(itemLocalID);
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
|
+
const wasmGeometry = mesh?.geometry;
|
|
67
|
+
if (wasmGeometry === void 0 ||
|
|
68
|
+
typeof wasmGeometry.GetVertexDataSize !== 'function') {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const byteSize = TILE_HEADER_BYTES +
|
|
72
|
+
wasmGeometry.GetVertexDataSize() * FLOAT_BYTES +
|
|
73
|
+
wasmGeometry.GetIndexDataSize() * INDEX_BYTES;
|
|
74
|
+
assets.push({ assetID: itemLocalID, byteSize });
|
|
75
|
+
}
|
|
76
|
+
this.assetsByProduct_.set(productLocalID, assets);
|
|
77
|
+
return assets;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The localIDs of every representation item in a product's Body /
|
|
81
|
+
* Facetation representations, recursing through mapped items into their
|
|
82
|
+
* (shared) source representations — the key space extraction stores
|
|
83
|
+
* meshes under.
|
|
84
|
+
*
|
|
85
|
+
* @param productLocalID The product's local ID.
|
|
86
|
+
* @return {Set<number>} The representation-item localIDs.
|
|
87
|
+
*/
|
|
88
|
+
representationItemIDs_(productLocalID) {
|
|
89
|
+
const ids = new Set();
|
|
90
|
+
const element = this.extraction_.model.getElementByLocalID(productLocalID);
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
+
const representations = element?.Representation?.Representations;
|
|
93
|
+
if (representations === void 0 || representations === null) {
|
|
94
|
+
return ids;
|
|
95
|
+
}
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
+
const addItems = (items) => {
|
|
98
|
+
for (const item of items) {
|
|
99
|
+
ids.add(item.localID);
|
|
100
|
+
// Mapped item: recurse into the shared source representation.
|
|
101
|
+
const source = item.MappingSource?.MappedRepresentation?.Items;
|
|
102
|
+
if (source !== void 0 && source !== null) {
|
|
103
|
+
addItems(source);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
for (const representation of representations) {
|
|
108
|
+
const identifier = representation.RepresentationIdentifier;
|
|
109
|
+
if (identifier !== null && identifier !== 'Body' &&
|
|
110
|
+
identifier !== 'Facetation') {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
addItems(representation.Items);
|
|
114
|
+
}
|
|
115
|
+
return ids;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Commit one extracted mesh into the wasm tile pool.
|
|
119
|
+
*
|
|
120
|
+
* @param assetID The mesh (representation item) localID.
|
|
121
|
+
*/
|
|
122
|
+
extractIntoTile(assetID) {
|
|
123
|
+
const mesh = this.extraction_.model.geometry.getByLocalID(assetID);
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
125
|
+
const wasmGeometry = mesh?.geometry;
|
|
126
|
+
if (wasmGeometry === void 0) {
|
|
127
|
+
throw new Error(`No extracted mesh for asset ${assetID}`);
|
|
128
|
+
}
|
|
129
|
+
if (!this.bindings_.commitGeometryTile(assetID, wasmGeometry)) {
|
|
130
|
+
throw new Error(`Wasm tile commit failed for asset ${assetID} — ` +
|
|
131
|
+
'the scheduler budget must not exceed the pool budget');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_tile_extractor.test.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_tile_extractor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers, @typescript-eslint/no-explicit-any */
|
|
2
|
+
// Phase B3: the production TileAssetExtractor drives the per-product demand
|
|
3
|
+
// seam (B2) and commits reified meshes through the wasm tile surface —
|
|
4
|
+
// verified with real extraction and recording commit bindings, composed all
|
|
5
|
+
// the way up through the queue + pump.
|
|
6
|
+
import fs from "fs";
|
|
7
|
+
import { beforeAll, describe, expect, test } from "@jest/globals";
|
|
8
|
+
import { IfcGeometryExtraction } from "./ifc_geometry_extraction.js";
|
|
9
|
+
import { IfcTileAssetExtractor } from "./ifc_tile_extractor.js";
|
|
10
|
+
import { ParseResult } from "../step/parsing/step_parser.js";
|
|
11
|
+
import IfcStepParser from "./ifc_step_parser.js";
|
|
12
|
+
import ParsingBuffer from "../parsing/parsing_buffer.js";
|
|
13
|
+
import { ConwayGeometry } from "../../dependencies/conway-geom/index.js";
|
|
14
|
+
import { createWasmTileBackend } from "../core/geometry_tile_bindings.js";
|
|
15
|
+
import { DemandGeometryQueue } from "../core/demand_geometry_queue.js";
|
|
16
|
+
import { DemandResidencyPump } from "../core/demand_residency_pump.js";
|
|
17
|
+
import { IfcProduct } from "./ifc4_gen/index.js";
|
|
18
|
+
let conwayGeometry;
|
|
19
|
+
/**
|
|
20
|
+
* @return {IfcStepModel} A fresh parsed model of index.ifc.
|
|
21
|
+
*/
|
|
22
|
+
function freshModel() {
|
|
23
|
+
const bytes = fs.readFileSync("data/index.ifc");
|
|
24
|
+
const input = new ParsingBuffer(bytes);
|
|
25
|
+
expect(IfcStepParser.Instance.parseHeader(input)[1]).toBe(ParseResult.COMPLETE);
|
|
26
|
+
const [, model] = IfcStepParser.Instance.parseDataToModel(input);
|
|
27
|
+
return model;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Recording fake of the commit surface: accepts every init/commit/release,
|
|
31
|
+
* records ids, verifies commit receives a live reified geometry.
|
|
32
|
+
*
|
|
33
|
+
* @return {object} `{ bindings, committed, released }`.
|
|
34
|
+
*/
|
|
35
|
+
function recordingBindings() {
|
|
36
|
+
const committed = [];
|
|
37
|
+
const released = [];
|
|
38
|
+
const bindings = {
|
|
39
|
+
initGeometryTilePool: () => true,
|
|
40
|
+
geometryTilePoolInitialized: () => true,
|
|
41
|
+
commitGeometryTile: (assetID, geometry) => {
|
|
42
|
+
// A real reified geometry must be handed over.
|
|
43
|
+
expect(typeof geometry.GetVertexDataSize).toBe("function");
|
|
44
|
+
expect(geometry.GetVertexDataSize()).toBeGreaterThan(0);
|
|
45
|
+
committed.push(assetID);
|
|
46
|
+
return true;
|
|
47
|
+
},
|
|
48
|
+
commitGeometryTileBytes: () => true,
|
|
49
|
+
retainGeometryTile: () => true,
|
|
50
|
+
releaseGeometryTile: (assetID) => {
|
|
51
|
+
released.push(assetID);
|
|
52
|
+
return true;
|
|
53
|
+
},
|
|
54
|
+
geometryTileResident: (assetID) => committed.includes(assetID) && !released.includes(assetID),
|
|
55
|
+
geometryTileRefCount: () => 1,
|
|
56
|
+
geometryTileByteSize: () => 0,
|
|
57
|
+
geometryTileSegmentCount: () => 0,
|
|
58
|
+
geometryTileSegmentAddress: () => 0,
|
|
59
|
+
geometryTileSegmentByteLength: () => 0,
|
|
60
|
+
geometryTileVertexByteLength: () => 0,
|
|
61
|
+
geometryTileIndexByteLength: () => 0,
|
|
62
|
+
geometryTilePoolBytesInUse: () => 0,
|
|
63
|
+
geometryTilePoolTotalBytes: () => 0,
|
|
64
|
+
geometryTilePoolFreeChunks: () => 0,
|
|
65
|
+
geometryTilePoolFailedCommits: () => 0,
|
|
66
|
+
};
|
|
67
|
+
return { bindings, committed, released };
|
|
68
|
+
}
|
|
69
|
+
beforeAll(async () => {
|
|
70
|
+
conwayGeometry = new ConwayGeometry();
|
|
71
|
+
expect(await conwayGeometry.initialize()).toBe(true);
|
|
72
|
+
});
|
|
73
|
+
describe("IfcTileAssetExtractor (Phase B3)", () => {
|
|
74
|
+
test("assetsOf extracts on first ask, caches, and sizes at reified cost", () => {
|
|
75
|
+
const model = freshModel();
|
|
76
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
77
|
+
const { bindings } = recordingBindings();
|
|
78
|
+
const extractor = new IfcTileAssetExtractor(extraction, bindings);
|
|
79
|
+
// Find a product with geometry.
|
|
80
|
+
let assets = [];
|
|
81
|
+
let productID = -1;
|
|
82
|
+
for (const product of model.types(IfcProduct)) {
|
|
83
|
+
assets = extractor.assetsOf(product.localID);
|
|
84
|
+
if (assets.length > 0) {
|
|
85
|
+
productID = product.localID;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
expect(assets.length).toBeGreaterThan(0);
|
|
90
|
+
for (const asset of assets) {
|
|
91
|
+
expect(asset.byteSize).toBeGreaterThan(8); // header + payload
|
|
92
|
+
}
|
|
93
|
+
// Cached: second ask returns the same array without re-extraction.
|
|
94
|
+
expect(extractor.assetsOf(productID)).toBe(assets);
|
|
95
|
+
});
|
|
96
|
+
test("full composition: pump \u2192 queue \u2192 tiles \u2192 extractor \u2192 wasm commit", async () => {
|
|
97
|
+
const model = freshModel();
|
|
98
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
99
|
+
const { bindings, committed, released } = recordingBindings();
|
|
100
|
+
const extractor = new IfcTileAssetExtractor(extraction, bindings);
|
|
101
|
+
const backend = createWasmTileBackend(bindings, extractor, 64 * 1024 * 1024, 4096);
|
|
102
|
+
const queue = new DemandGeometryQueue(backend.tiles, 64 * 1024 * 1024);
|
|
103
|
+
const pump = new DemandResidencyPump(queue, model);
|
|
104
|
+
for (const product of model.types(IfcProduct)) {
|
|
105
|
+
pump.request(product.localID, 1);
|
|
106
|
+
}
|
|
107
|
+
// Drain admission in batches.
|
|
108
|
+
while (pump.pendingCount > 0) {
|
|
109
|
+
const result = await pump.pump();
|
|
110
|
+
expect(result.prefetchFailures).toBe(0);
|
|
111
|
+
}
|
|
112
|
+
expect(committed.length).toBeGreaterThan(0);
|
|
113
|
+
expect(queue.stats.residentCount).toBeGreaterThan(0);
|
|
114
|
+
// Evicting everything releases every committed wasm tile.
|
|
115
|
+
queue.evictAll();
|
|
116
|
+
expect(new Set(released)).toEqual(new Set(committed));
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_typed_select_enum.test.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_typed_select_enum.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// A select member whose type is an enum may be written bare or in its typed
|
|
2
|
+
// form - `.NULL.` or `NULL_STYLE(.NULL.)`. Inside a SELECT the typed form is
|
|
3
|
+
// how a reader tells which member the value is, so exporters use it, and the
|
|
4
|
+
// NIST AP242 set uses it throughout.
|
|
5
|
+
//
|
|
6
|
+
// Reading the typed form used to throw 'Value in select must be populated',
|
|
7
|
+
// because the generated getter's enum fallback is a bare parse starting at
|
|
8
|
+
// the cursor and the wrapper made it fail. Entity-valued members were never
|
|
9
|
+
// affected - the parser indexes an inline TYPENAME(...) entity and
|
|
10
|
+
// extractBufferReference resolves it by address - so this was specific to
|
|
11
|
+
// enum members, and `null_style` / `IfcNullStyle` is the only enum inside a
|
|
12
|
+
// select in either schema. It accounted for 274 of the public regression
|
|
13
|
+
// baseline's error rows, every one of them a lost styled item. See
|
|
14
|
+
// bldrs-ai/conway#489.
|
|
15
|
+
//
|
|
16
|
+
// Both schemas are covered: the fix is emitted by the generator at two sites,
|
|
17
|
+
// one per schema, and a regeneration that reverted either would otherwise
|
|
18
|
+
// ship green. scripts/code-gen.cjs clones the generator unpinned, so that is
|
|
19
|
+
// not a hypothetical.
|
|
20
|
+
//
|
|
21
|
+
// Parser-only, so no geometry wasm is initialized here - importing it would
|
|
22
|
+
// make this fail at import in a checkout without the Dist built, for a
|
|
23
|
+
// dependency it never uses.
|
|
24
|
+
import { describe, expect, test } from "@jest/globals";
|
|
25
|
+
import IfcStepParser from "./ifc_step_parser.js";
|
|
26
|
+
import ParsingBuffer from "../parsing/parsing_buffer.js";
|
|
27
|
+
import { ParseResult } from "../step/parsing/step_parser.js";
|
|
28
|
+
import { IfcNullStyle, IfcPresentationStyleAssignment } from "./ifc4_gen/index.js";
|
|
29
|
+
const parser = IfcStepParser.Instance;
|
|
30
|
+
const TYPED_STYLE = `#10028 = IFCPRESENTATIONSTYLEASSIGNMENT((IFCNULLSTYLE(.NULL.)));`;
|
|
31
|
+
// The same value written bare, which always worked. Kept alongside so a
|
|
32
|
+
// change that fixes one by breaking the other cannot pass.
|
|
33
|
+
const BARE_STYLE = `#10028 = IFCPRESENTATIONSTYLEASSIGNMENT((.NULL.));`;
|
|
34
|
+
const STYLE_EXPRESS_ID = 10028;
|
|
35
|
+
/**
|
|
36
|
+
* Parse one IFCPRESENTATIONSTYLEASSIGNMENT and read back its styles.
|
|
37
|
+
*
|
|
38
|
+
* @param source The STEP text to parse.
|
|
39
|
+
* @return {Array<unknown>} The resolved styles array.
|
|
40
|
+
*/
|
|
41
|
+
function stylesOf(source) {
|
|
42
|
+
const [result, model] = parser.parseDataToModel(new ParsingBuffer(new TextEncoder().encode(source)));
|
|
43
|
+
if (model === void 0 ||
|
|
44
|
+
(result !== ParseResult.COMPLETE && result !== ParseResult.INCOMPLETE)) {
|
|
45
|
+
throw new Error(`parse failed with result ${result}`);
|
|
46
|
+
}
|
|
47
|
+
const assignment = model.getElementByExpressID(STYLE_EXPRESS_ID);
|
|
48
|
+
if (!(assignment instanceof IfcPresentationStyleAssignment)) {
|
|
49
|
+
throw new Error("expected an IfcPresentationStyleAssignment");
|
|
50
|
+
}
|
|
51
|
+
return assignment.Styles;
|
|
52
|
+
}
|
|
53
|
+
describe("a typed enum in an IFC select", () => {
|
|
54
|
+
test("IFCNULLSTYLE(.NULL.) resolves instead of throwing", () => {
|
|
55
|
+
expect(stylesOf(TYPED_STYLE)).toEqual([IfcNullStyle.NULL]);
|
|
56
|
+
});
|
|
57
|
+
test("the bare form still resolves", () => {
|
|
58
|
+
expect(stylesOf(BARE_STYLE)).toEqual([IfcNullStyle.NULL]);
|
|
59
|
+
});
|
|
60
|
+
});
|
package/compiled/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ParseResult } from "./step/parsing/step_parser.js";
|
|
2
2
|
export { IfcGeometryExtraction } from "./ifc/ifc_geometry_extraction.js";
|
|
3
3
|
export { IfcPropertyExtraction } from "./ifc/ifc_property_extraction.js";
|
|
4
|
-
export { ConwayGeometry, GeometryObject, FileHandlerFunction } from "../dependencies/conway-geom/index.js";
|
|
4
|
+
export { ConwayGeometry, GeometryObject, FileHandlerFunction, setModulePrefix, } from "../dependencies/conway-geom/index.js";
|
|
5
5
|
export { versionString } from "./version/version.js";
|
|
6
6
|
export { default as Logger, LogLevel, LogEntry, LoggingProxy, LogSink } from "./logging/logger.js";
|
|
7
7
|
export { product, shape_definition_representation } from "./AP214E3_2010/AP214E3_2010_gen/index.js";
|
|
@@ -11,4 +11,24 @@ export { ExtractResult } from "./core/shared_constants.js";
|
|
|
11
11
|
export { ProgressEvent, ProgressCallback, ProgressPhase, ProgressUnit, ProgressTracker, CountProgressCallback, yieldToEventLoop, } from "./core/progress.js";
|
|
12
12
|
export { ModelLoadOptions } from "./loaders/conway_model_loader.js";
|
|
13
13
|
export { LoadLogAccumulator, ModelInfo, ProgressEventLike, formatBar, formatMb, formatModelLine, formatSeconds, stageLabel, } from "./core/progress_log.js";
|
|
14
|
+
export { openStreamedIfcModel, openStreamedIfcModelAsync, openStreamedIfcModelFromStore, ifcPrefixTypeIndex, StreamedIfcOpen, StreamedIfcOpenOptions, } from "./ifc/ifc_stream_open.js";
|
|
15
|
+
export { buildColumnarIndexStreaming, buildColumnarIndexStreamingAsync, } from "./step/parsing/streaming_index_builder.js";
|
|
16
|
+
export { ByteSource, BufferByteSource, AsyncByteSource, ReadableByteSource, StoreByteSource, SyncAccessHandleByteSource, SyncAccessHandleLike, } from "./step/parsing/byte_source.js";
|
|
17
|
+
export { scanExpressRefs } from "./step/parsing/express_ref_scan.js";
|
|
18
|
+
export { StepExternalByteStore, InMemoryStepByteStore, StepBufferProvider, WindowedStepBufferProvider, } from "./step/step_buffer_provider.js";
|
|
19
|
+
export { StepIndexColumns, ColumnarIndexSink } from "./step/parsing/columnar_index.js";
|
|
20
|
+
export { serializeIndexSidecarFromColumns, deserializeIndexSidecarToColumns, sidecarMatchesSource, hashSource, } from "./step/parsing/index_sidecar.js";
|
|
21
|
+
export { StreamingRecordDispatcher, RecordHandler } from "./step/parsing/streaming_record_dispatcher.js";
|
|
22
|
+
export { PrefixTypeIndex } from "./step/parsing/prefix_type_index.js";
|
|
23
|
+
export { StepTypeIndexer } from "./step/indexing/step_type_indexer.js";
|
|
24
|
+
export { RecordEventHandler } from "./step/parsing/record_event.js";
|
|
25
|
+
export { RecordFieldCursor } from "./step/parsing/record_field_cursor.js";
|
|
26
|
+
export { IfcSpatialSkeleton, SkeletonNode } from "./ifc/ifc_spatial_skeleton.js";
|
|
27
|
+
export { DemandGeometryQueue, GeometryTiles, DemandQueueStats } from "./core/demand_geometry_queue.js";
|
|
28
|
+
export { DemandResidencyPump, ResidencyPrefetcher, PumpResult } from "./core/demand_residency_pump.js";
|
|
29
|
+
export { GeometryTilePoolBindings, TileAssetExtractor, WasmTileBackend, createWasmTileBackend, readGeometryTilePayload, GeometryTilePayload, } from "./core/geometry_tile_bindings.js";
|
|
30
|
+
export { IfcTileAssetExtractor, TileCommitBindings } from "./ifc/ifc_tile_extractor.js";
|
|
31
|
+
export { ChunkedPool, ChunkSpan } from "./core/mem/chunked_pool.js";
|
|
32
|
+
export { SharedAssetPool } from "./core/mem/shared_asset_pool.js";
|
|
33
|
+
export { GeometryTilePool, InstanceAssetSource, GeometryAsset } from "./core/geometry_tile_pool.js";
|
|
14
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,eAAe,GAChB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/F,OAAO,EAAE,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAA;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,eAAe,EACf,aAAa,EACb,UAAU,GACX,MAAM,qBAAqB,CAAA;AAU5B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,kBAAkB,EAClB,eAAe,EACf,sBAAsB,GACvB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,GACjC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACnF,OAAO,EACL,gCAAgC,EAChC,gCAAgC,EAChC,oBAAoB,EACpB,UAAU,GACX,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAA;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACnG,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACnG,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA"}
|
package/compiled/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ParseResult } from "./step/parsing/step_parser.js";
|
|
2
2
|
export { IfcGeometryExtraction } from "./ifc/ifc_geometry_extraction.js";
|
|
3
3
|
export { IfcPropertyExtraction } from "./ifc/ifc_property_extraction.js";
|
|
4
|
-
export { ConwayGeometry } from "../dependencies/conway-geom/index.js";
|
|
4
|
+
export { ConwayGeometry, setModulePrefix, } from "../dependencies/conway-geom/index.js";
|
|
5
5
|
export { versionString } from "./version/version.js";
|
|
6
6
|
// Replace your current Logger export with this
|
|
7
7
|
export { default as Logger, LogLevel } from "./logging/logger.js";
|
|
@@ -10,3 +10,30 @@ export { CanonicalMeshType } from "./core/canonical_mesh.js";
|
|
|
10
10
|
export { ExtractResult } from "./core/shared_constants.js";
|
|
11
11
|
export { ProgressTracker, yieldToEventLoop, } from "./core/progress.js";
|
|
12
12
|
export { LoadLogAccumulator, formatBar, formatMb, formatModelLine, formatSeconds, stageLabel, } from "./core/progress_log.js";
|
|
13
|
+
// --- Streaming / demand-geometry surface (epic #390; design doc
|
|
14
|
+
// design/new/streaming-federated-loader.md). The release-facing API for
|
|
15
|
+
// fixed-memory opens and demand-driven residency.
|
|
16
|
+
//
|
|
17
|
+
// Canonical homes are the plane subpath modules — `@bldrs-ai/conway/stream`,
|
|
18
|
+
// `/demand`, and `/mem` — which is where new conway-native APIs land (the
|
|
19
|
+
// web-ifc compat shim stays an adapter and is headed for retirement). The
|
|
20
|
+
// flat re-exports below are kept for root-import compatibility.
|
|
21
|
+
export { openStreamedIfcModel, openStreamedIfcModelAsync, openStreamedIfcModelFromStore, ifcPrefixTypeIndex, } from "./ifc/ifc_stream_open.js";
|
|
22
|
+
export { buildColumnarIndexStreaming, buildColumnarIndexStreamingAsync, } from "./step/parsing/streaming_index_builder.js";
|
|
23
|
+
export { BufferByteSource, StoreByteSource, SyncAccessHandleByteSource, } from "./step/parsing/byte_source.js";
|
|
24
|
+
export { scanExpressRefs } from "./step/parsing/express_ref_scan.js";
|
|
25
|
+
export { InMemoryStepByteStore, WindowedStepBufferProvider, } from "./step/step_buffer_provider.js";
|
|
26
|
+
export { ColumnarIndexSink } from "./step/parsing/columnar_index.js";
|
|
27
|
+
export { serializeIndexSidecarFromColumns, deserializeIndexSidecarToColumns, sidecarMatchesSource, hashSource, } from "./step/parsing/index_sidecar.js";
|
|
28
|
+
export { StreamingRecordDispatcher } from "./step/parsing/streaming_record_dispatcher.js";
|
|
29
|
+
export { PrefixTypeIndex } from "./step/parsing/prefix_type_index.js";
|
|
30
|
+
export { StepTypeIndexer } from "./step/indexing/step_type_indexer.js";
|
|
31
|
+
export { RecordFieldCursor } from "./step/parsing/record_field_cursor.js";
|
|
32
|
+
export { IfcSpatialSkeleton } from "./ifc/ifc_spatial_skeleton.js";
|
|
33
|
+
export { DemandGeometryQueue } from "./core/demand_geometry_queue.js";
|
|
34
|
+
export { DemandResidencyPump } from "./core/demand_residency_pump.js";
|
|
35
|
+
export { createWasmTileBackend, readGeometryTilePayload, } from "./core/geometry_tile_bindings.js";
|
|
36
|
+
export { IfcTileAssetExtractor } from "./ifc/ifc_tile_extractor.js";
|
|
37
|
+
export { ChunkedPool } from "./core/mem/chunked_pool.js";
|
|
38
|
+
export { SharedAssetPool } from "./core/mem/shared_asset_pool.js";
|
|
39
|
+
export { GeometryTilePool } from "./core/geometry_tile_pool.js";
|
|
@@ -38,6 +38,16 @@ export type LogSink = (level: LogLevelName, message: string) => void;
|
|
|
38
38
|
* first occurrence of each distinct entry at or above the current threshold
|
|
39
39
|
* is echoed to the console sink immediately, so warnings/errors are visible
|
|
40
40
|
* live without waiting for a displayLogs() dump.
|
|
41
|
+
*
|
|
42
|
+
* Deduplication keys on the exact message string, so anything interpolated
|
|
43
|
+
* into the message splits one problem into N entries with count 1 each and
|
|
44
|
+
* `count` stops meaning "how big is this". That is not hypothetical: one
|
|
45
|
+
* record ID in a message turned a single AP242 failure into 272 rows of the
|
|
46
|
+
* regression run's errors.csv, and normalising the whole public corpus that
|
|
47
|
+
* way takes it from 325 rows to 22. Pass the record as the `expressID`
|
|
48
|
+
* argument instead of writing it into the message - it lands in `expressIDs`,
|
|
49
|
+
* which is unioned across repeats, and the family stays one row that `count`
|
|
50
|
+
* can size.
|
|
41
51
|
*/
|
|
42
52
|
export default class Logger {
|
|
43
53
|
private static logs;
|
|
@@ -86,6 +96,8 @@ export default class Logger {
|
|
|
86
96
|
*
|
|
87
97
|
* @param level - log level
|
|
88
98
|
* @param message - log message
|
|
99
|
+
* @param expressID - record this entry is about, kept out of the message
|
|
100
|
+
* text so repeats dedupe into one entry (see the class doc)
|
|
89
101
|
*/
|
|
90
102
|
private static log;
|
|
91
103
|
/**
|
|
@@ -142,13 +154,15 @@ export default class Logger {
|
|
|
142
154
|
/**
|
|
143
155
|
*
|
|
144
156
|
* @param message - log message
|
|
157
|
+
* @param expressID - record this entry is about
|
|
145
158
|
*/
|
|
146
|
-
static warning(message: string): void;
|
|
159
|
+
static warning(message: string, expressID?: number | string): void;
|
|
147
160
|
/**
|
|
148
161
|
*
|
|
149
162
|
* @param message - log message
|
|
163
|
+
* @param expressID - record this entry is about
|
|
150
164
|
*/
|
|
151
|
-
static error(message: string): void;
|
|
165
|
+
static error(message: string, expressID?: number | string): void;
|
|
152
166
|
/**
|
|
153
167
|
*
|
|
154
168
|
* @return {LogEntry[]} - list of logs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAIrD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjE;;;;;;GAMG;AACH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;IACX,KAAK,IAAI;IACT,GAAG,IAAI;CACR;AASD,MAAM,WAAW,QAAQ;IACrB,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAC,GAAG,CAAC,MAAM,CAAC,CAAA;CACzB;AAGD,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAC7B;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAA;AAetE
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAIrD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAEjE;;;;;;GAMG;AACH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;IACX,KAAK,IAAI;IACT,GAAG,IAAI;CACR;AASD,MAAM,WAAW,QAAQ;IACrB,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAC,GAAG,CAAC,MAAM,CAAC,CAAA;CACzB;AAGD,MAAM,WAAW,YAAY;IACzB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAC7B;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,KAAM,IAAI,CAAA;AAetE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAiB;IACpC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAqB;IAC3C,OAAO,CAAC,MAAM,CAAC,UAAU,CAAyD;IAClF,OAAO,CAAC,MAAM,CAAC,SAAS,CAA0B;IAClD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAuB;IAG1C;;OAEG;WACW,uBAAuB;IAiBrC;;;;;OAKG;WACW,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAIhD;;;OAGG;WACW,WAAW,IAAI,QAAQ;IAIrC;;;;;OAKG;WACW,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAItD;;;;;OAKG;WACW,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI;IAI3C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,GAAG;IAoDlB;;OAEG;WACW,YAAY,IAAI,IAAI;IAuBlC;;;OAGG;WACW,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAIjD;;;;OAIG;WACW,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAQpD;;;OAGG;WACW,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI1C;;;OAGG;WACW,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIzC;;;;OAIG;WACW,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIpE;;;;;;OAMG;WACW,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU;IAQ3D;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,MAAM;IAgB7C;;;;;OAKG;WACW,SAAS,IAAI,QAAQ,EAAE;IAOrC;;;;OAIG;WACW,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIzE;;;;OAIG;WACW,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIvE;;;OAGG;WACW,OAAO,IAAI,QAAQ,EAAE;IAInC;;;;;;;OAOG;WACW,WAAW,CAAC,KAAK,GAAE,OAAe,GAAG,IAAI;IASvD;;OAEG;WACW,SAAS,IAAI,IAAI;CAGhC"}
|
|
@@ -42,6 +42,16 @@ const defaultSink = (level, message) => {
|
|
|
42
42
|
* first occurrence of each distinct entry at or above the current threshold
|
|
43
43
|
* is echoed to the console sink immediately, so warnings/errors are visible
|
|
44
44
|
* live without waiting for a displayLogs() dump.
|
|
45
|
+
*
|
|
46
|
+
* Deduplication keys on the exact message string, so anything interpolated
|
|
47
|
+
* into the message splits one problem into N entries with count 1 each and
|
|
48
|
+
* `count` stops meaning "how big is this". That is not hypothetical: one
|
|
49
|
+
* record ID in a message turned a single AP242 failure into 272 rows of the
|
|
50
|
+
* regression run's errors.csv, and normalising the whole public corpus that
|
|
51
|
+
* way takes it from 325 rows to 22. Pass the record as the `expressID`
|
|
52
|
+
* argument instead of writing it into the message - it lands in `expressIDs`,
|
|
53
|
+
* which is unioned across repeats, and the family stays one row that `count`
|
|
54
|
+
* can size.
|
|
45
55
|
*/
|
|
46
56
|
class Logger {
|
|
47
57
|
/**
|
|
@@ -110,10 +120,20 @@ class Logger {
|
|
|
110
120
|
*
|
|
111
121
|
* @param level - log level
|
|
112
122
|
* @param message - log message
|
|
123
|
+
* @param expressID - record this entry is about, kept out of the message
|
|
124
|
+
* text so repeats dedupe into one entry (see the class doc)
|
|
113
125
|
*/
|
|
114
|
-
static log(level, message) {
|
|
126
|
+
static log(level, message, expressID) {
|
|
127
|
+
// Two ways to attach a record to an entry. The parameter is the one to
|
|
128
|
+
// use; the ' expressID: ' suffix is the older in-message form, kept
|
|
129
|
+
// because TS call sites still use it. Nothing on the wasm side does - the
|
|
130
|
+
// C++ logger spells its own IDs differently and never matches this split -
|
|
131
|
+
// so the suffix has no external dependency and can go once the remaining
|
|
132
|
+
// call sites are converted.
|
|
115
133
|
const baseMessage = message.split(" expressID: ")[0]; // Extract the base message
|
|
116
|
-
const data =
|
|
134
|
+
const data = expressID !== void 0 ?
|
|
135
|
+
String(expressID) :
|
|
136
|
+
message.split(" expressID: ")[1]; // Extract the expressID
|
|
117
137
|
const index = Logger.findLogIndex(baseMessage, level);
|
|
118
138
|
let logEntry;
|
|
119
139
|
let firstOccurrence = false;
|
|
@@ -137,8 +157,13 @@ class Logger {
|
|
|
137
157
|
}
|
|
138
158
|
// Echo only the first occurrence of each distinct entry — repeats keep
|
|
139
159
|
// deduplicating silently into the buffer (visible via displayLogs()).
|
|
160
|
+
//
|
|
161
|
+
// The record goes back on for the echo. Only the BUFFER needs the ID out
|
|
162
|
+
// of the message, so that repeats collapse to one entry; a console line is
|
|
163
|
+
// read once by a person, and dropping the ID there would trade a one-off
|
|
164
|
+
// browser error's only pointer to the offending record for nothing.
|
|
140
165
|
if (firstOccurrence && Logger.isLevelEnabled(LOG_LEVEL_BY_NAME[level])) {
|
|
141
|
-
Logger.sink(level, baseMessage);
|
|
166
|
+
Logger.sink(level, data !== void 0 ? `${baseMessage} expressID: ${data}` : baseMessage);
|
|
142
167
|
}
|
|
143
168
|
Logger.proxies.forEach((proxy) => proxy.log(logEntry));
|
|
144
169
|
}
|
|
@@ -247,16 +272,18 @@ class Logger {
|
|
|
247
272
|
/**
|
|
248
273
|
*
|
|
249
274
|
* @param message - log message
|
|
275
|
+
* @param expressID - record this entry is about
|
|
250
276
|
*/
|
|
251
|
-
static warning(message) {
|
|
252
|
-
Logger.log("warning", message);
|
|
277
|
+
static warning(message, expressID) {
|
|
278
|
+
Logger.log("warning", message, expressID);
|
|
253
279
|
}
|
|
254
280
|
/**
|
|
255
281
|
*
|
|
256
282
|
* @param message - log message
|
|
283
|
+
* @param expressID - record this entry is about
|
|
257
284
|
*/
|
|
258
|
-
static error(message) {
|
|
259
|
-
Logger.log("error", message);
|
|
285
|
+
static error(message, expressID) {
|
|
286
|
+
Logger.log("error", message, expressID);
|
|
260
287
|
}
|
|
261
288
|
/**
|
|
262
289
|
*
|