@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IfcRelInterferesElements.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcRelInterferesElements.gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI/C,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAItD,qBAAc,wBAAyB,SAAQ,cAAc;IAC3D,IAAW,IAAI,IAAI,cAAc,CAEhC;IACD,OAAO,CAAC,gBAAgB,CAAC,CAAa;IACtC,OAAO,CAAC,eAAe,CAAC,CAAa;IACrC,OAAO,CAAC,qBAAqB,CAAC,CAA+B;IAC7D,OAAO,CAAC,iBAAiB,CAAC,CAAgB;IAC1C,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"IfcRelInterferesElements.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcRelInterferesElements.gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI/C,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAItD,qBAAc,wBAAyB,SAAQ,cAAc;IAC3D,IAAW,IAAI,IAAI,cAAc,CAEhC;IACD,OAAO,CAAC,gBAAgB,CAAC,CAAa;IACtC,OAAO,CAAC,eAAe,CAAC,CAAa;IACrC,OAAO,CAAC,qBAAqB,CAAC,CAA+B;IAC7D,OAAO,CAAC,iBAAiB,CAAC,CAAgB;IAC1C,OAAO,CAAC,aAAa,CAAC,CAAiB;IAEvC,IAAW,eAAe,IAAK,UAAU,CAMxC;IAED,IAAW,cAAc,IAAK,UAAU,CAMvC;IAED,IAAW,oBAAoB,IAAK,qBAAqB,GAAG,IAAI,CAM/D;IAED,IAAW,gBAAgB,IAAK,MAAM,GAAG,IAAI,CAM5C;IAED,IAAW,YAAY,IAAK,OAAO,GAAG,IAAI,CAMzC;gBAEC,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAChE,KAAK,EAAE,aAAa,CAAE,cAAc,EAAE,cAAc,CAAE,cAAc,CAAE,CAAE,EACxE,cAAc,CAAC,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAAE;IAKlE,gBAAuB,KAAK,mBACiB;IAE7C,gBAAuB,YAAY,EAAE,cAAc,CACV;CAC1C"}
|
|
@@ -35,7 +35,7 @@ export class IfcRelInterferesElements extends IfcRelConnects {
|
|
|
35
35
|
}
|
|
36
36
|
get ImpliedOrder() {
|
|
37
37
|
if (this.ImpliedOrder_ === void 0) {
|
|
38
|
-
this.ImpliedOrder_ = this.
|
|
38
|
+
this.ImpliedOrder_ = this.extractLogical(8, 4, 3, false);
|
|
39
39
|
}
|
|
40
40
|
return this.ImpliedOrder_;
|
|
41
41
|
}
|
|
@@ -29290,7 +29290,7 @@ let descriptions = [
|
|
|
29290
29290
|
},
|
|
29291
29291
|
ImpliedOrder: {
|
|
29292
29292
|
kind: f.BOOLEAN,
|
|
29293
|
-
optional:
|
|
29293
|
+
optional: true,
|
|
29294
29294
|
derived: false,
|
|
29295
29295
|
offset: 8,
|
|
29296
29296
|
},
|
|
@@ -34262,7 +34262,7 @@ let descriptions = [
|
|
|
34262
34262
|
fields: {
|
|
34263
34263
|
Value: {
|
|
34264
34264
|
kind: f.BOOLEAN,
|
|
34265
|
-
optional:
|
|
34265
|
+
optional: true,
|
|
34266
34266
|
derived: false,
|
|
34267
34267
|
offset: 0,
|
|
34268
34268
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_demand_extraction.test.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_demand_extraction.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers, @typescript-eslint/no-explicit-any */
|
|
2
|
+
// Phase B2: per-product demand extraction must produce the same meshes the
|
|
3
|
+
// whole-model walk produces — same products with geometry, same vertex and
|
|
4
|
+
// index counts per product — since both now run the same deduplicated
|
|
5
|
+
// per-product body (extractProductGeometry).
|
|
6
|
+
import fs from "fs";
|
|
7
|
+
import { beforeAll, describe, expect, test } from "@jest/globals";
|
|
8
|
+
import { IfcGeometryExtraction } from "./ifc_geometry_extraction.js";
|
|
9
|
+
import { ParseResult } from "../step/parsing/step_parser.js";
|
|
10
|
+
import IfcStepParser from "./ifc_step_parser.js";
|
|
11
|
+
import IfcStepModel from "./ifc_step_model.js";
|
|
12
|
+
import ParsingBuffer from "../parsing/parsing_buffer.js";
|
|
13
|
+
import { ConwayGeometry } from "../../dependencies/conway-geom/index.js";
|
|
14
|
+
import { ExtractResult } from "../core/shared_constants.js";
|
|
15
|
+
import { IfcProduct, IfcStyledItem } from "./ifc4_gen/index.js";
|
|
16
|
+
import EntityTypesIfc from "./ifc4_gen/entity_types_ifc.gen.js";
|
|
17
|
+
import { openStreamedIfcModelFromStore } from "./ifc_stream_open.js";
|
|
18
|
+
import { InMemoryStepByteStore, WindowedStepBufferProvider, } from "../step/step_buffer_provider.js";
|
|
19
|
+
let conwayGeometry;
|
|
20
|
+
/**
|
|
21
|
+
* Parse a fresh model from index.ifc (models are stateful; each extraction
|
|
22
|
+
* mode gets its own).
|
|
23
|
+
*
|
|
24
|
+
* @return {IfcStepModel} The parsed model.
|
|
25
|
+
*/
|
|
26
|
+
function freshModel() {
|
|
27
|
+
const bytes = fs.readFileSync("data/index.ifc");
|
|
28
|
+
const input = new ParsingBuffer(bytes);
|
|
29
|
+
expect(IfcStepParser.Instance.parseHeader(input)[1])
|
|
30
|
+
.toBe(ParseResult.COMPLETE);
|
|
31
|
+
const [, model] = IfcStepParser.Instance.parseDataToModel(input);
|
|
32
|
+
expect(model).toBeDefined();
|
|
33
|
+
return model;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Collect per-localID mesh signatures (vertex + triangle counts) from a
|
|
37
|
+
* model's extracted geometry.
|
|
38
|
+
*
|
|
39
|
+
* @param extraction The extraction whose model geometry to summarise.
|
|
40
|
+
* @return {Map<number, string>} localID → "vertexCount/triangleCount".
|
|
41
|
+
*/
|
|
42
|
+
function meshSignatures(extraction) {
|
|
43
|
+
const signatures = new Map();
|
|
44
|
+
for (const mesh of extraction.model.geometry) {
|
|
45
|
+
const geometry = mesh.geometry;
|
|
46
|
+
if (geometry === void 0 || typeof geometry.getVertexCount !== "function") {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
signatures.set(mesh.localID, `${geometry.getVertexCount()}/${geometry.getTriangleCount()}`);
|
|
50
|
+
}
|
|
51
|
+
return signatures;
|
|
52
|
+
}
|
|
53
|
+
beforeAll(async () => {
|
|
54
|
+
conwayGeometry = new ConwayGeometry();
|
|
55
|
+
expect(await conwayGeometry.initialize()).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
describe("per-product demand extraction (Phase B2)", () => {
|
|
58
|
+
test("demand extraction over all products matches the whole-model walk", () => {
|
|
59
|
+
// Whole-model walk (the CI-anchored path).
|
|
60
|
+
const wholeExtraction = new IfcGeometryExtraction(conwayGeometry, freshModel());
|
|
61
|
+
expect(wholeExtraction.extractIFCGeometryData()[0])
|
|
62
|
+
.toBe(ExtractResult.COMPLETE);
|
|
63
|
+
const wholeSignatures = meshSignatures(wholeExtraction);
|
|
64
|
+
expect(wholeSignatures.size).toBeGreaterThan(0);
|
|
65
|
+
// Demand path: prepare once, then extract every product individually.
|
|
66
|
+
const demandModel = freshModel();
|
|
67
|
+
const demandExtraction = new IfcGeometryExtraction(conwayGeometry, demandModel);
|
|
68
|
+
demandExtraction.prepareDemandExtraction();
|
|
69
|
+
let extractedProducts = 0;
|
|
70
|
+
for (const product of demandModel.types(IfcProduct)) {
|
|
71
|
+
if (demandExtraction.extractProductGeometryByLocalID(product.localID)) {
|
|
72
|
+
++extractedProducts;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
expect(extractedProducts).toBeGreaterThan(0);
|
|
76
|
+
const demandSignatures = meshSignatures(demandExtraction);
|
|
77
|
+
// Same set of products with geometry, same mesh shape per product.
|
|
78
|
+
expect(demandSignatures).toEqual(wholeSignatures);
|
|
79
|
+
});
|
|
80
|
+
test("a single product extracts on demand without the whole-model walk", () => {
|
|
81
|
+
// Whole-model reference signatures (mesh localIDs key representation
|
|
82
|
+
// items, not products — so parity is checked per matching key).
|
|
83
|
+
const reference = new IfcGeometryExtraction(conwayGeometry, freshModel());
|
|
84
|
+
reference.extractIFCGeometryData();
|
|
85
|
+
const referenceSignatures = meshSignatures(reference);
|
|
86
|
+
const model = freshModel();
|
|
87
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
88
|
+
// Extract single products on the fresh model until one yields a mesh —
|
|
89
|
+
// proving a lone product materialises without the whole-model walk.
|
|
90
|
+
let produced = 0;
|
|
91
|
+
for (const product of model.types(IfcProduct)) {
|
|
92
|
+
extraction.extractProductGeometryByLocalID(product.localID);
|
|
93
|
+
produced = meshSignatures(extraction).size;
|
|
94
|
+
if (produced > 0) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
expect(produced).toBeGreaterThan(0);
|
|
99
|
+
expect(produced).toBeLessThan(referenceSignatures.size);
|
|
100
|
+
// Every mesh the single extraction produced matches the reference's
|
|
101
|
+
// mesh for the same key exactly.
|
|
102
|
+
for (const [localID, signature] of meshSignatures(extraction)) {
|
|
103
|
+
expect(referenceSignatures.get(localID)).toBe(signature);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
test("a non-product local ID is refused", () => {
|
|
107
|
+
const model = freshModel();
|
|
108
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
109
|
+
// localID 0 in index.ifc is not an IfcProduct (first record is a root
|
|
110
|
+
// non-product entity in this fixture; the assertion below guards that).
|
|
111
|
+
const first = model.getElementByLocalID(0);
|
|
112
|
+
expect(first instanceof IfcProduct).toBe(false);
|
|
113
|
+
expect(extraction.extractProductGeometryByLocalID(0)).toBe(false);
|
|
114
|
+
});
|
|
115
|
+
test("styled-item Item local IDs resolve without hydrating the item", () => {
|
|
116
|
+
const model = freshModel();
|
|
117
|
+
let checked = 0;
|
|
118
|
+
for (const styledItem of model.types(IfcStyledItem)) {
|
|
119
|
+
const viaIndex = styledItem.extractReferenceLocalID(0, 0, 1, true);
|
|
120
|
+
const viaItem = styledItem.Item?.localID ?? null;
|
|
121
|
+
expect(viaIndex).toBe(viaItem);
|
|
122
|
+
++checked;
|
|
123
|
+
}
|
|
124
|
+
expect(checked).toBeGreaterThan(0);
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
// conway#526. `extractGeometryBatchAsync` prefetches a batch of products
|
|
128
|
+
// through one Promise.all over ONE shared `seen` set, so the closure walk
|
|
129
|
+
// skips any record a sibling product already claimed — that sibling has
|
|
130
|
+
// pinned the range, but a pin reserves a chunk against eviction, it does
|
|
131
|
+
// not make it resident, and its read may still be in flight. The faceset
|
|
132
|
+
// payload pass then scanned the shared set and synchronously acquired a
|
|
133
|
+
// record nobody had finished reading:
|
|
134
|
+
//
|
|
135
|
+
// StepBufferNotResidentError: STEP source range [164128495, 164187850)
|
|
136
|
+
// is not resident — call ensureResident before synchronous extraction
|
|
137
|
+
//
|
|
138
|
+
// which escaped the prefetch and aborted the whole load on a large model.
|
|
139
|
+
describe("concurrent windowed product prefetch (conway#526)", () => {
|
|
140
|
+
const CHUNK = 4 * 1024;
|
|
141
|
+
/**
|
|
142
|
+
* A store-backed model over a deliberately cramped window: 4 KiB
|
|
143
|
+
* chunks with 2 resident, so a sibling's chunks are gone by the time
|
|
144
|
+
* anyone else looks for them.
|
|
145
|
+
*
|
|
146
|
+
* @param store The backing store.
|
|
147
|
+
* @return {Promise<IfcStepModel>} The windowed model.
|
|
148
|
+
*/
|
|
149
|
+
async function windowedModel(store) {
|
|
150
|
+
const open = await openStreamedIfcModelFromStore(store, { pool: CHUNK });
|
|
151
|
+
expect(open.model).toBeDefined();
|
|
152
|
+
return new IfcStepModel(void 0, open.columns, new WindowedStepBufferProvider(store, CHUNK, 2));
|
|
153
|
+
}
|
|
154
|
+
test("a shared seen set does not make one product read records it never paged", async () => {
|
|
155
|
+
const store = new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc")));
|
|
156
|
+
const model = await windowedModel(store);
|
|
157
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
158
|
+
extraction.quietRecoverableLogging = true;
|
|
159
|
+
extraction.deferDanglingPlacements = true;
|
|
160
|
+
const prepPins = await extraction.ensureResidentForDemandPrep();
|
|
161
|
+
try {
|
|
162
|
+
extraction.prepareDemandExtraction(true);
|
|
163
|
+
}
|
|
164
|
+
finally {
|
|
165
|
+
model.releaseSourceViews(prepPins);
|
|
166
|
+
model.unpinLocalIDs(prepPins);
|
|
167
|
+
}
|
|
168
|
+
const products = [...model.types(IfcProduct)].map((p) => p.localID);
|
|
169
|
+
expect(products.length).toBeGreaterThan(1);
|
|
170
|
+
// The pump's shape: one shared pin set across the batch.
|
|
171
|
+
const pins = new Set();
|
|
172
|
+
const leafSpans = [];
|
|
173
|
+
// Seed the shared set until it holds facesets — not every
|
|
174
|
+
// product carries tessellated geometry, and the payload pass is
|
|
175
|
+
// what this is about.
|
|
176
|
+
let seeded = 0;
|
|
177
|
+
let claimedFacesets = [];
|
|
178
|
+
while (seeded < products.length && claimedFacesets.length === 0) {
|
|
179
|
+
await extraction.ensureResidentForProductExtract(products[seeded++], pins, leafSpans);
|
|
180
|
+
claimedFacesets = [...pins].filter((id) => model.typeIDOf(id) === EntityTypesIfc.IFCPOLYGONALFACESET);
|
|
181
|
+
}
|
|
182
|
+
expect(claimedFacesets.length).toBeGreaterThan(0);
|
|
183
|
+
expect(seeded).toBeLessThan(products.length);
|
|
184
|
+
// Now force the state the production race produced by timing:
|
|
185
|
+
// records that are IN the shared set but NOT resident from the
|
|
186
|
+
// next caller's point of view. Dropping the pins and filling the
|
|
187
|
+
// 2-chunk window with an unrelated range evicts them, which is
|
|
188
|
+
// the same invariant violation as a sibling's read still being
|
|
189
|
+
// in flight — and unlike the race, it happens every run.
|
|
190
|
+
model.releaseSourceViews(pins);
|
|
191
|
+
model.unpinLocalIDs(pins);
|
|
192
|
+
for (const span of leafSpans) {
|
|
193
|
+
model.unpinAddressRange(span.address, span.length);
|
|
194
|
+
}
|
|
195
|
+
leafSpans.length = 0;
|
|
196
|
+
const facesetAt = model.recordAddress(claimedFacesets[0]);
|
|
197
|
+
const far = facesetAt >= CHUNK * 4 ? 0 : store.byteLength - CHUNK * 2;
|
|
198
|
+
await model.ensureResidentRange(far, CHUNK * 2);
|
|
199
|
+
// Pre-#526 the payload pass walked the shared set, synchronously
|
|
200
|
+
// acquired those evicted facesets and threw
|
|
201
|
+
// StepBufferNotResidentError out of the prefetch, killing the load.
|
|
202
|
+
await expect(Promise.all(products.slice(seeded).map((localID) => extraction.ensureResidentForProductExtract(localID, pins, leafSpans)))).resolves.toBeDefined();
|
|
203
|
+
expect(pins.size).toBeGreaterThan(0);
|
|
204
|
+
model.releaseSourceViews(pins);
|
|
205
|
+
model.unpinLocalIDs(pins);
|
|
206
|
+
for (const span of leafSpans) {
|
|
207
|
+
model.unpinAddressRange(span.address, span.length);
|
|
208
|
+
}
|
|
209
|
+
}, 120000);
|
|
210
|
+
test("the closure walk reports only what THIS call claimed", async () => {
|
|
211
|
+
const model = await windowedModel(new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc"))));
|
|
212
|
+
const products = [...model.types(IfcProduct)].map((p) => p.localID);
|
|
213
|
+
expect(products.length).toBeGreaterThan(1);
|
|
214
|
+
// The invariant the payload pass now rests on: with a shared set,
|
|
215
|
+
// a second walk claims only what the first left unclaimed, so
|
|
216
|
+
// `claimed` is what this call has actually awaited residency for.
|
|
217
|
+
const shared = new Set();
|
|
218
|
+
const firstClaimed = new Set();
|
|
219
|
+
const secondClaimed = new Set();
|
|
220
|
+
await model.ensureResidentClosureByLocalID(products[0], void 0, shared, void 0, void 0, void 0, firstClaimed);
|
|
221
|
+
await model.ensureResidentClosureByLocalID(products[0], void 0, shared, void 0, void 0, void 0, secondClaimed);
|
|
222
|
+
expect(firstClaimed.size).toBeGreaterThan(0);
|
|
223
|
+
expect(secondClaimed.size).toBe(0);
|
|
224
|
+
for (const id of firstClaimed) {
|
|
225
|
+
expect(shared.has(id)).toBe(true);
|
|
226
|
+
}
|
|
227
|
+
model.unpinLocalIDs(shared);
|
|
228
|
+
}, 120000);
|
|
229
|
+
test("a product whose paging fails is skipped, not fatal to the batch", async () => {
|
|
230
|
+
const model = await windowedModel(new InMemoryStepByteStore(new Uint8Array(fs.readFileSync("data/index.ifc"))));
|
|
231
|
+
const extraction = new IfcGeometryExtraction(conwayGeometry, model);
|
|
232
|
+
const products = [...model.types(IfcProduct)].map((p) => p.localID);
|
|
233
|
+
const failing = products[0];
|
|
234
|
+
// A store read that rejects for one product's closure must not take
|
|
235
|
+
// the batch — the pump's Promise.all would otherwise reject and the
|
|
236
|
+
// load dies where a missing product would do.
|
|
237
|
+
const realEnsure = model.ensureResidentClosureByLocalID.bind(model);
|
|
238
|
+
model.ensureResidentClosureByLocalID =
|
|
239
|
+
(localID, ...rest) => {
|
|
240
|
+
if (localID === failing) {
|
|
241
|
+
return Promise.reject(new Error("simulated store read failure"));
|
|
242
|
+
}
|
|
243
|
+
return realEnsure(localID, ...rest);
|
|
244
|
+
};
|
|
245
|
+
const pins = new Set();
|
|
246
|
+
await expect(Promise.all(products.slice(0, 4).map((localID) => extraction.ensureResidentForProductExtract(localID, pins)))).resolves.toBeDefined();
|
|
247
|
+
model.ensureResidentClosureByLocalID = realEnsure;
|
|
248
|
+
model.releaseSourceViews(pins);
|
|
249
|
+
model.unpinLocalIDs(pins);
|
|
250
|
+
}, 120000);
|
|
251
|
+
});
|