@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
|
@@ -34,9 +34,10 @@
|
|
|
34
34
|
* a {@link StepExternalByteStore} with an LRU residency cap.
|
|
35
35
|
* Records contained in one chunk are served as a view over it;
|
|
36
36
|
* records straddling chunks get a per-record merged copy. Eviction
|
|
37
|
-
* is advisory
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* is advisory while a descriptor still holds a chunk view.
|
|
38
|
+
* {@link StepModelBase.releaseSourceViews} drops those views so
|
|
39
|
+
* the LRU can evict; the next sync read must `ensureResident`
|
|
40
|
+
* first (same as any other miss).
|
|
40
41
|
*
|
|
41
42
|
* The external store itself is environment-provided (OPFS in the
|
|
42
43
|
* browser, a file or memory in node) — this module only defines the
|
|
@@ -150,6 +151,21 @@ export interface StepBufferProvider {
|
|
|
150
151
|
* @return {Promise< void >} Resolves when resident.
|
|
151
152
|
*/
|
|
152
153
|
ensureResident(address: number, length: number): Promise<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Hold a range against LRU eviction until a matching
|
|
156
|
+
* {@link unpinRange}. No-op on a fully-resident source. Refcounted.
|
|
157
|
+
*
|
|
158
|
+
* @param address Absolute start of the range.
|
|
159
|
+
* @param length Length of the range.
|
|
160
|
+
*/
|
|
161
|
+
pinRange?(address: number, length: number): void;
|
|
162
|
+
/**
|
|
163
|
+
* Drop one {@link pinRange} hold on a range.
|
|
164
|
+
*
|
|
165
|
+
* @param address Absolute start of the range.
|
|
166
|
+
* @param length Length of the range.
|
|
167
|
+
*/
|
|
168
|
+
unpinRange?(address: number, length: number): void;
|
|
153
169
|
}
|
|
154
170
|
/**
|
|
155
171
|
* Provider over a fully-resident source buffer — the default, and
|
|
@@ -274,5 +290,34 @@ export declare class WindowedStepBufferProvider implements StepBufferProvider {
|
|
|
274
290
|
* @return {Promise< void >} Resolves when resident.
|
|
275
291
|
*/
|
|
276
292
|
ensureResident(address: number, length: number): Promise<void>;
|
|
293
|
+
/**
|
|
294
|
+
* Hold a range against LRU eviction until {@link unpinRange}.
|
|
295
|
+
*
|
|
296
|
+
* @param address Absolute start of the range.
|
|
297
|
+
* @param length Length of the range.
|
|
298
|
+
*/
|
|
299
|
+
pinRange(address: number, length: number): void;
|
|
300
|
+
/**
|
|
301
|
+
* Drop one {@link pinRange} hold.
|
|
302
|
+
*
|
|
303
|
+
* @param address Absolute start of the range.
|
|
304
|
+
* @param length Length of the range.
|
|
305
|
+
*/
|
|
306
|
+
unpinRange(address: number, length: number): void;
|
|
307
|
+
/**
|
|
308
|
+
* Chunk indices covering `[address, address + length)`.
|
|
309
|
+
*
|
|
310
|
+
* @param address Absolute start.
|
|
311
|
+
* @param length Length in bytes.
|
|
312
|
+
* @return {number[]} Inclusive chunk indices.
|
|
313
|
+
*/
|
|
314
|
+
private chunkSpan_;
|
|
315
|
+
/**
|
|
316
|
+
* Adjust a chunk's pin count, deleting the entry at zero.
|
|
317
|
+
*
|
|
318
|
+
* @param chunkIndex The chunk.
|
|
319
|
+
* @param delta +1 pin or -1 unpin.
|
|
320
|
+
*/
|
|
321
|
+
private addPin_;
|
|
277
322
|
}
|
|
278
323
|
//# sourceMappingURL=step_buffer_provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step_buffer_provider.d.ts","sourceRoot":"","sources":["../../../src/step/step_buffer_provider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"step_buffer_provider.d.ts","sourceRoot":"","sources":["../../../src/step/step_buffer_provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAqBH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAE,MAAM,EAAE,UAAU,GAAI,MAAM,CAE3D;AAmBD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IAEpC,8CAA8C;IAC9C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAE3B;;;;;;;OAOG;IAC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,CAAE,IAAI,CAAE;IAoF/E;;;;;OAKG;IACI,QAAQ,CAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,IAAI;IAOxD;;;;;OAKG;IACI,UAAU,CAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,IAAI;IAO1D;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAclB;;;;;OAKG;IACH,OAAO,CAAC,OAAO;CAUhB"}
|
|
@@ -34,9 +34,10 @@
|
|
|
34
34
|
* a {@link StepExternalByteStore} with an LRU residency cap.
|
|
35
35
|
* Records contained in one chunk are served as a view over it;
|
|
36
36
|
* records straddling chunks get a per-record merged copy. Eviction
|
|
37
|
-
* is advisory
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* is advisory while a descriptor still holds a chunk view.
|
|
38
|
+
* {@link StepModelBase.releaseSourceViews} drops those views so
|
|
39
|
+
* the LRU can evict; the next sync read must `ensureResident`
|
|
40
|
+
* first (same as any other miss).
|
|
40
41
|
*
|
|
41
42
|
* The external store itself is environment-provided (OPFS in the
|
|
42
43
|
* browser, a file or memory in node) — this module only defines the
|
|
@@ -323,7 +324,7 @@ export class WindowedStepBufferProvider {
|
|
|
323
324
|
// until we return — the caller's synchronous acquire runs in its
|
|
324
325
|
// continuation, which can interleave with other ensures' evictions.
|
|
325
326
|
for (let chunkIndex = firstChunk; chunkIndex <= lastChunk; ++chunkIndex) {
|
|
326
|
-
this.
|
|
327
|
+
this.addPin_(chunkIndex, 1);
|
|
327
328
|
}
|
|
328
329
|
try {
|
|
329
330
|
const loads = [];
|
|
@@ -369,14 +370,62 @@ export class WindowedStepBufferProvider {
|
|
|
369
370
|
}
|
|
370
371
|
finally {
|
|
371
372
|
for (let chunkIndex = firstChunk; chunkIndex <= lastChunk; ++chunkIndex) {
|
|
372
|
-
|
|
373
|
-
if (pins <= 1) {
|
|
374
|
-
this.ensurePins_.delete(chunkIndex);
|
|
375
|
-
}
|
|
376
|
-
else {
|
|
377
|
-
this.ensurePins_.set(chunkIndex, pins - 1);
|
|
378
|
-
}
|
|
373
|
+
this.addPin_(chunkIndex, -1);
|
|
379
374
|
}
|
|
380
375
|
}
|
|
381
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Hold a range against LRU eviction until {@link unpinRange}.
|
|
379
|
+
*
|
|
380
|
+
* @param address Absolute start of the range.
|
|
381
|
+
* @param length Length of the range.
|
|
382
|
+
*/
|
|
383
|
+
pinRange(address, length) {
|
|
384
|
+
for (const chunkIndex of this.chunkSpan_(address, length)) {
|
|
385
|
+
this.addPin_(chunkIndex, 1);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Drop one {@link pinRange} hold.
|
|
390
|
+
*
|
|
391
|
+
* @param address Absolute start of the range.
|
|
392
|
+
* @param length Length of the range.
|
|
393
|
+
*/
|
|
394
|
+
unpinRange(address, length) {
|
|
395
|
+
for (const chunkIndex of this.chunkSpan_(address, length)) {
|
|
396
|
+
this.addPin_(chunkIndex, -1);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Chunk indices covering `[address, address + length)`.
|
|
401
|
+
*
|
|
402
|
+
* @param address Absolute start.
|
|
403
|
+
* @param length Length in bytes.
|
|
404
|
+
* @return {number[]} Inclusive chunk indices.
|
|
405
|
+
*/
|
|
406
|
+
chunkSpan_(address, length) {
|
|
407
|
+
const chunkBytes = this.chunkBytes_;
|
|
408
|
+
const firstChunk = Math.floor(address / chunkBytes);
|
|
409
|
+
const lastChunk = Math.floor((address + Math.max(length, 1) - 1) / chunkBytes);
|
|
410
|
+
const span = [];
|
|
411
|
+
for (let chunkIndex = firstChunk; chunkIndex <= lastChunk; ++chunkIndex) {
|
|
412
|
+
span.push(chunkIndex);
|
|
413
|
+
}
|
|
414
|
+
return span;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Adjust a chunk's pin count, deleting the entry at zero.
|
|
418
|
+
*
|
|
419
|
+
* @param chunkIndex The chunk.
|
|
420
|
+
* @param delta +1 pin or -1 unpin.
|
|
421
|
+
*/
|
|
422
|
+
addPin_(chunkIndex, delta) {
|
|
423
|
+
const pins = (this.ensurePins_.get(chunkIndex) ?? 0) + delta;
|
|
424
|
+
if (pins <= 0) {
|
|
425
|
+
this.ensurePins_.delete(chunkIndex);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
this.ensurePins_.set(chunkIndex, pins);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
382
431
|
}
|
|
@@ -79,6 +79,20 @@ describe("WindowedStepBufferProvider", () => {
|
|
|
79
79
|
expect(() => provider.acquire(16, 8)).not.toThrow();
|
|
80
80
|
expect(() => provider.acquire(32, 8)).toThrow(StepBufferNotResidentError);
|
|
81
81
|
});
|
|
82
|
+
test("pinRange holds a chunk across later ensures that would evict it", async () => {
|
|
83
|
+
const bytes = makeBytes(160);
|
|
84
|
+
const provider = new WindowedStepBufferProvider(new InMemoryStepByteStore(bytes), 16, 2);
|
|
85
|
+
await provider.ensureResident(0, 8);
|
|
86
|
+
provider.pinRange(0, 8);
|
|
87
|
+
await provider.ensureResident(16, 8);
|
|
88
|
+
await provider.ensureResident(32, 8);
|
|
89
|
+
await provider.ensureResident(48, 8);
|
|
90
|
+
expect(() => provider.acquire(0, 8)).not.toThrow();
|
|
91
|
+
provider.unpinRange(0, 8);
|
|
92
|
+
await provider.ensureResident(64, 8);
|
|
93
|
+
await provider.ensureResident(80, 8);
|
|
94
|
+
expect(() => provider.acquire(0, 8)).toThrow(StepBufferNotResidentError);
|
|
95
|
+
});
|
|
82
96
|
test("de-duplicates concurrent in-flight chunk loads", async () => {
|
|
83
97
|
const bytes = makeBytes(64);
|
|
84
98
|
let reads = 0;
|
|
@@ -3,6 +3,7 @@ import { Entity } from "../core/entity.js";
|
|
|
3
3
|
import { EntityDescription, EntityFieldsDescription } from "../core/entity_description.js";
|
|
4
4
|
import { EntityFieldDescription } from "../core/entity_field_description.js";
|
|
5
5
|
import { WasmModule } from "../core/native_types.js";
|
|
6
|
+
import { Uint32Sink } from "./parsing/uint32_sink.js";
|
|
6
7
|
import { StepEntityConstructorAbstract } from "./step_entity_constructor.js";
|
|
7
8
|
import StepEntityInternalReference from "./step_entity_internal_reference.js";
|
|
8
9
|
import StepModelBase from "./step_model_base.js";
|
|
@@ -125,14 +126,21 @@ export default abstract class StepEntityBase<EntityTypeIDs extends number> imple
|
|
|
125
126
|
* Used by other extraction methods with wrappers to perform
|
|
126
127
|
* semantically correct extraction.
|
|
127
128
|
*
|
|
129
|
+
* Unlike the other extractors this has a single signature rather than an
|
|
130
|
+
* optional/non-optional overload pair, because LOGICAL is three-valued:
|
|
131
|
+
* `.U.` is a legitimate value that reads as null, so a non-optional LOGICAL
|
|
132
|
+
* is null-valued too and `optional` only decides whether a *missing* value
|
|
133
|
+
* throws. The old `optional: false` overload promised a bare `boolean` and
|
|
134
|
+
* was a lie for exactly the `.U.` case this extractor exists to handle.
|
|
135
|
+
*
|
|
128
136
|
* @param offset The offset in the vtable to extract from
|
|
129
137
|
* @param baseOffset The base offset in the vtable to extract from
|
|
130
138
|
* @param depth The depth of the vtable to extract from
|
|
131
139
|
* @param optional Is this an optional field?
|
|
132
|
-
* @return {boolean | null} The extracted logical or null for
|
|
140
|
+
* @return {boolean | null} The extracted logical, or null for `.U.` and for
|
|
141
|
+
* an absent optional.
|
|
133
142
|
*/
|
|
134
|
-
extractLogical(offset: number, baseOffset: number, depth: number, optional:
|
|
135
|
-
extractLogical(offset: number, baseOffset: number, depth: number, optional: false): boolean;
|
|
143
|
+
extractLogical(offset: number, baseOffset: number, depth: number, optional: boolean): boolean | null;
|
|
136
144
|
/**
|
|
137
145
|
* Extract a reference from an offset, without type check.
|
|
138
146
|
*
|
|
@@ -144,6 +152,21 @@ export default abstract class StepEntityBase<EntityTypeIDs extends number> imple
|
|
|
144
152
|
*/
|
|
145
153
|
extractReference(offset: number, baseOffset: number, depth: number, optional: true): StepEntityBase<EntityTypeIDs> | null;
|
|
146
154
|
extractReference(offset: number, baseOffset: number, depth: number, optional: false): StepEntityBase<EntityTypeIDs>;
|
|
155
|
+
/**
|
|
156
|
+
* Resolve a single reference field to its local ID without
|
|
157
|
+
* constructing the target entity. Prep maps that only store
|
|
158
|
+
* `Item.localID` (IfcStyledItem → faceset) must not hydrate the
|
|
159
|
+
* target: on a windowed source that would pin the faceset record
|
|
160
|
+
* (often megabytes) for every styled item at once.
|
|
161
|
+
*
|
|
162
|
+
* @param offset The offset in the vtable to extract from.
|
|
163
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
164
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
165
|
+
* @param optional Is this an optional field?
|
|
166
|
+
* @return {number | null} The referenced local ID, or null if the
|
|
167
|
+
* field is unset/optional-null.
|
|
168
|
+
*/
|
|
169
|
+
extractReferenceLocalID(offset: number, baseOffset: number, depth: number, optional: boolean): number | null;
|
|
147
170
|
/**
|
|
148
171
|
*
|
|
149
172
|
* @param buffer
|
|
@@ -307,6 +330,45 @@ export default abstract class StepEntityBase<EntityTypeIDs extends number> imple
|
|
|
307
330
|
* @return {boolean} True if this extracts, false (usually because this is optional)
|
|
308
331
|
*/
|
|
309
332
|
extractParseBuffer(offset: number, baseOffset: number, depth: number, result: ParseBuffer, module: WasmModule, optional: boolean): boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Append an unsigned-integer list field straight from the STEP buffer
|
|
335
|
+
* into `sink`, without materialising an intermediate `Array< number >`.
|
|
336
|
+
*
|
|
337
|
+
* Semantically identical to the generated array getters (same
|
|
338
|
+
* optional handling, same element extraction, same "incorrectly
|
|
339
|
+
* typed" error), but it neither allocates nor caches a per-record
|
|
340
|
+
* array — the caller owns one reusable sink for the whole batch. On
|
|
341
|
+
* tessellated models this removes millions of short-lived arrays and
|
|
342
|
+
* the retained heap that goes with them; see Uint32Sink.
|
|
343
|
+
*
|
|
344
|
+
* @param offset The offset in the vtable to extract from.
|
|
345
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
346
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
347
|
+
* @param sink Receives the appended values.
|
|
348
|
+
* @return {number} How many values were appended (0 when the field is
|
|
349
|
+
* unset/optional-null).
|
|
350
|
+
*/
|
|
351
|
+
/**
|
|
352
|
+
* Walk a reference-list field, handing each element's express ID to
|
|
353
|
+
* `onReference` without resolving it to an entity.
|
|
354
|
+
*
|
|
355
|
+
* Lets hot loops decide per element how to read the referenced record
|
|
356
|
+
* (see StepModelBase.extractIntegerArrayByExpressIDInto) instead of
|
|
357
|
+
* paying for an entity per element the way the generated list getters
|
|
358
|
+
* do. Inline (non-reference) elements yield `undefined`, and
|
|
359
|
+
* `onReference` returning false aborts the walk — together those let
|
|
360
|
+
* a caller bail out to the generated getter for anything it is not
|
|
361
|
+
* prepared to handle.
|
|
362
|
+
*
|
|
363
|
+
* @param offset The offset in the vtable to extract from.
|
|
364
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
365
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
366
|
+
* @param onReference Receives each element's express ID, or undefined
|
|
367
|
+
* for an inline element; return false to abort.
|
|
368
|
+
* @return {boolean} False if the walk was aborted, true otherwise.
|
|
369
|
+
*/
|
|
370
|
+
forEachReferenceInField(offset: number, baseOffset: number, depth: number, onReference: (expressID: number | undefined) => boolean): boolean;
|
|
371
|
+
extractIntegerArrayInto(offset: number, baseOffset: number, depth: number, sink: Uint32Sink): number;
|
|
310
372
|
/**
|
|
311
373
|
* Extract a number at the particular vtable offset (i.e. the position
|
|
312
374
|
* in the matching step object).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step_entity_base.d.ts","sourceRoot":"","sources":["../../../src/step/step_entity_base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uDAAuD,CAAA;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,iBA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K,EAAE,MAAM,EACb,QAAQ,EAAE,KAAK,GAAG,OAAO;IAwC3B;;;;;OAKG;IACH,SAAS,KAAK,MAAM,IAAI,UAAU,CAKjC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,qBAAqB,CAC7B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC;IAqB9C;;;;;;;OAOG;IACH,SAAS,CAAC,eAAe,CAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAI,MAAM;IActF;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CACpB,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,QAAQ,CAAE,2BAA2B,CAAE,aAAa,CAAE,CAAE,GAAI,MAAM;IAkBvF;;;;;;;OAOG;gBAKe,OAAO,EAAE,MAAM,EACd,kBAAkB,EAAE,2BAA2B,CAAC,aAAa,CAAC,EAC/D,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EAEnD,eAAe,CAAC,EAAE,2BAA2B,CAAC,aAAa,CAAC,EAAE;IAEhE,SAAS,CAAC,eAAe,CAAC,EAAE,2BAA2B,CAAC,aAAa,CAAC,EAAE,CAAA;IAExE;;;;;OAKG;IACH,SAAS,CAAC,eAAe,CAAE,KAAK,EAAE,MAAM,GACtC,QAAQ,CAAE,2BAA2B,CAAC,aAAa,CAAC,CAAE;IAgDxD;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,IAAI;CAKlC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wasmHeapView } from "../core/wasm_heap.js";
|
|
2
|
+
import { skipValue, stepExtractArray, stepExtractArrayBegin, stepExtractArrayToken, stepExtractBinary, stepExtractBoolean, stepExtractInlineElemement, stepExtractLogical, stepExtractNumber, stepExtractOptional, stepExtractReference, stepExtractString, } from "./parsing/step_deserialization_functions.js";
|
|
3
|
+
import { extractIntegerArrayAt } from "./parsing/uint32_sink.js";
|
|
2
4
|
import { stepBufferBase } from "./step_buffer_provider.js";
|
|
3
5
|
var IfcTokenType;
|
|
4
6
|
(function (IfcTokenType) {
|
|
@@ -184,6 +186,27 @@ export default class StepEntityBase {
|
|
|
184
186
|
}
|
|
185
187
|
return value;
|
|
186
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Extract a number at the particular vtable offset (i.e. the position
|
|
191
|
+
* in the matching step object).
|
|
192
|
+
*
|
|
193
|
+
* Used by other extraction methods with wrappers to perform
|
|
194
|
+
* semantically correct extraction.
|
|
195
|
+
*
|
|
196
|
+
* Unlike the other extractors this has a single signature rather than an
|
|
197
|
+
* optional/non-optional overload pair, because LOGICAL is three-valued:
|
|
198
|
+
* `.U.` is a legitimate value that reads as null, so a non-optional LOGICAL
|
|
199
|
+
* is null-valued too and `optional` only decides whether a *missing* value
|
|
200
|
+
* throws. The old `optional: false` overload promised a bare `boolean` and
|
|
201
|
+
* was a lie for exactly the `.U.` case this extractor exists to handle.
|
|
202
|
+
*
|
|
203
|
+
* @param offset The offset in the vtable to extract from
|
|
204
|
+
* @param baseOffset The base offset in the vtable to extract from
|
|
205
|
+
* @param depth The depth of the vtable to extract from
|
|
206
|
+
* @param optional Is this an optional field?
|
|
207
|
+
* @return {boolean | null} The extracted logical, or null for `.U.` and for
|
|
208
|
+
* an absent optional.
|
|
209
|
+
*/
|
|
187
210
|
extractLogical(offset, baseOffset, depth, optional) {
|
|
188
211
|
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
189
212
|
const value = stepExtractLogical(buffer, cursor, endCursor);
|
|
@@ -217,6 +240,39 @@ export default class StepEntityBase {
|
|
|
217
240
|
}
|
|
218
241
|
return value;
|
|
219
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Resolve a single reference field to its local ID without
|
|
245
|
+
* constructing the target entity. Prep maps that only store
|
|
246
|
+
* `Item.localID` (IfcStyledItem → faceset) must not hydrate the
|
|
247
|
+
* target: on a windowed source that would pin the faceset record
|
|
248
|
+
* (often megabytes) for every styled item at once.
|
|
249
|
+
*
|
|
250
|
+
* @param offset The offset in the vtable to extract from.
|
|
251
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
252
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
253
|
+
* @param optional Is this an optional field?
|
|
254
|
+
* @return {number | null} The referenced local ID, or null if the
|
|
255
|
+
* field is unset/optional-null.
|
|
256
|
+
*/
|
|
257
|
+
extractReferenceLocalID(offset, baseOffset, depth, optional) {
|
|
258
|
+
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
259
|
+
const expressID = stepExtractReference(buffer, cursor, endCursor);
|
|
260
|
+
if (expressID !== void 0) {
|
|
261
|
+
return this.model.resolveExpressID(expressID) ?? null;
|
|
262
|
+
}
|
|
263
|
+
const inline = this.model.getInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor));
|
|
264
|
+
if (inline !== void 0) {
|
|
265
|
+
return inline.localID;
|
|
266
|
+
}
|
|
267
|
+
if (!optional) {
|
|
268
|
+
throw new Error("Value in STEP was incorrectly typed");
|
|
269
|
+
}
|
|
270
|
+
if (!this.model.nullOnErrors &&
|
|
271
|
+
stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
272
|
+
throw new Error("Value in STEP was incorrectly typed");
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
220
276
|
/**
|
|
221
277
|
*
|
|
222
278
|
* @param buffer
|
|
@@ -428,6 +484,8 @@ export default class StepEntityBase {
|
|
|
428
484
|
*/
|
|
429
485
|
extractParseBuffer(offset, baseOffset, depth, result, module, optional) {
|
|
430
486
|
offset -= this.multiReference_ !== void 0 ? baseOffset : 0;
|
|
487
|
+
// releaseSourceViews keeps the vtable and drops `buffer`.
|
|
488
|
+
this.guaranteeBuffer();
|
|
431
489
|
const internalReference = this.guaranteeVTable(depth);
|
|
432
490
|
if (offset >= internalReference.vtableCount) {
|
|
433
491
|
throw new Error("Couldn't read field due to too few fields in record");
|
|
@@ -445,10 +503,77 @@ export default class StepEntityBase {
|
|
|
445
503
|
if (optional && stepExtractOptional(buffer, cursor, endCursor) === null) {
|
|
446
504
|
return false;
|
|
447
505
|
}
|
|
448
|
-
const
|
|
449
|
-
|
|
506
|
+
const length = endCursor - cursor;
|
|
507
|
+
// resize() can grow the wasm heap, which on the MT build can leave the
|
|
508
|
+
// module's cached HEAPU8 bound to the pre-growth buffer - so the
|
|
509
|
+
// destination view is taken through wasmHeapView, after the resize, rather
|
|
510
|
+
// than off module.HEAPU8 (#485).
|
|
511
|
+
const dataPtr = result.resize(length);
|
|
512
|
+
wasmHeapView(module, Uint8Array, dataPtr, length)
|
|
513
|
+
.set(buffer.subarray(cursor, endCursor));
|
|
450
514
|
return true;
|
|
451
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Append an unsigned-integer list field straight from the STEP buffer
|
|
518
|
+
* into `sink`, without materialising an intermediate `Array< number >`.
|
|
519
|
+
*
|
|
520
|
+
* Semantically identical to the generated array getters (same
|
|
521
|
+
* optional handling, same element extraction, same "incorrectly
|
|
522
|
+
* typed" error), but it neither allocates nor caches a per-record
|
|
523
|
+
* array — the caller owns one reusable sink for the whole batch. On
|
|
524
|
+
* tessellated models this removes millions of short-lived arrays and
|
|
525
|
+
* the retained heap that goes with them; see Uint32Sink.
|
|
526
|
+
*
|
|
527
|
+
* @param offset The offset in the vtable to extract from.
|
|
528
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
529
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
530
|
+
* @param sink Receives the appended values.
|
|
531
|
+
* @return {number} How many values were appended (0 when the field is
|
|
532
|
+
* unset/optional-null).
|
|
533
|
+
*/
|
|
534
|
+
/**
|
|
535
|
+
* Walk a reference-list field, handing each element's express ID to
|
|
536
|
+
* `onReference` without resolving it to an entity.
|
|
537
|
+
*
|
|
538
|
+
* Lets hot loops decide per element how to read the referenced record
|
|
539
|
+
* (see StepModelBase.extractIntegerArrayByExpressIDInto) instead of
|
|
540
|
+
* paying for an entity per element the way the generated list getters
|
|
541
|
+
* do. Inline (non-reference) elements yield `undefined`, and
|
|
542
|
+
* `onReference` returning false aborts the walk — together those let
|
|
543
|
+
* a caller bail out to the generated getter for anything it is not
|
|
544
|
+
* prepared to handle.
|
|
545
|
+
*
|
|
546
|
+
* @param offset The offset in the vtable to extract from.
|
|
547
|
+
* @param baseOffset The base offset of the class in the vtable.
|
|
548
|
+
* @param depth The depth in the inheritance hierarchy.
|
|
549
|
+
* @param onReference Receives each element's express ID, or undefined
|
|
550
|
+
* for an inline element; return false to abort.
|
|
551
|
+
* @return {boolean} False if the walk was aborted, true otherwise.
|
|
552
|
+
*/
|
|
553
|
+
forEachReferenceInField(offset, baseOffset, depth, onReference) {
|
|
554
|
+
let cursor = this.getOffsetCursor(offset, baseOffset, depth);
|
|
555
|
+
const buffer = this.buffer;
|
|
556
|
+
const endCursor = buffer.length;
|
|
557
|
+
if (stepExtractOptional(buffer, cursor, endCursor) === null) {
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
560
|
+
let signedCursor0 = stepExtractArrayBegin(buffer, cursor, endCursor);
|
|
561
|
+
cursor = Math.abs(signedCursor0);
|
|
562
|
+
while (signedCursor0 >= 0) {
|
|
563
|
+
if (!onReference(stepExtractReference(buffer, cursor, endCursor))) {
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
cursor = skipValue(buffer, cursor, endCursor);
|
|
567
|
+
signedCursor0 = stepExtractArrayToken(buffer, cursor, endCursor);
|
|
568
|
+
cursor = Math.abs(signedCursor0);
|
|
569
|
+
}
|
|
570
|
+
return true;
|
|
571
|
+
}
|
|
572
|
+
extractIntegerArrayInto(offset, baseOffset, depth, sink) {
|
|
573
|
+
const cursor = this.getOffsetCursor(offset, baseOffset, depth);
|
|
574
|
+
const buffer = this.buffer;
|
|
575
|
+
return extractIntegerArrayAt(buffer, cursor, buffer.length, sink);
|
|
576
|
+
}
|
|
452
577
|
/**
|
|
453
578
|
* Extract a number at the particular vtable offset (i.e. the position
|
|
454
579
|
* in the matching step object).
|
|
@@ -484,6 +609,7 @@ export default class StepEntityBase {
|
|
|
484
609
|
* @return {Uint8Array} The buffer for this.
|
|
485
610
|
*/
|
|
486
611
|
get buffer() {
|
|
612
|
+
this.guaranteeBuffer();
|
|
487
613
|
return this.internalReference_.buffer;
|
|
488
614
|
}
|
|
489
615
|
/**
|
|
@@ -578,6 +704,9 @@ export default class StepEntityBase {
|
|
|
578
704
|
throw new Error("Entity does not have matching table entry to read from model");
|
|
579
705
|
}
|
|
580
706
|
}
|
|
707
|
+
if (classReference.buffer === void 0) {
|
|
708
|
+
this.model.populateBufferEntry(this.localID);
|
|
709
|
+
}
|
|
581
710
|
// Sync on EVERY access (not just first populate): generated
|
|
582
711
|
// getters read `this.buffer` right after resolving a cursor for
|
|
583
712
|
// this depth, and with a windowed provider each class reference
|
|
@@ -593,6 +722,9 @@ export default class StepEntityBase {
|
|
|
593
722
|
throw new Error("Entity does not have matching table entry to read from model");
|
|
594
723
|
}
|
|
595
724
|
}
|
|
725
|
+
if (internalReference.buffer === void 0) {
|
|
726
|
+
this.guaranteeBuffer();
|
|
727
|
+
}
|
|
596
728
|
return internalReference;
|
|
597
729
|
}
|
|
598
730
|
/**
|