@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,6 +1,7 @@
|
|
|
1
|
-
import { ConwayGeometry, } from "../../index.js";
|
|
1
|
+
import { ConwayGeometry, setModulePrefix, } from "../../index.js";
|
|
2
2
|
import { versionString } from "../../version/version.js";
|
|
3
3
|
import Logger, { LogLevel as ConwayLogLevel } from "../../logging/logger.js";
|
|
4
|
+
import { wasmHeapView, } from "../../core/wasm_heap.js";
|
|
4
5
|
import Environment from "../../utilities/environment.js";
|
|
5
6
|
import * as glmatrix from "gl-matrix";
|
|
6
7
|
import { IfcApiModelPassthroughFactory } from "./ifc_api_model_passthrough_factory.js";
|
|
@@ -36,6 +37,34 @@ const CONWAY_LOG_LEVEL_BY_WEBIFC = {
|
|
|
36
37
|
[LogLevel.LOG_LEVEL_ERROR]: ConwayLogLevel.ERROR,
|
|
37
38
|
[LogLevel.LOG_LEVEL_OFF]: ConwayLogLevel.OFF,
|
|
38
39
|
};
|
|
40
|
+
// The directory conway-geom's web init locates wasm from when no
|
|
41
|
+
// embedder path is configured — also the conventional serve location
|
|
42
|
+
// (Share copies Dist/* there at build time).
|
|
43
|
+
const DEFAULT_WEB_WASM_DIRECTORY = "/static/js/";
|
|
44
|
+
/**
|
|
45
|
+
* Normalize an embedder wasm directory (the SetWasmPath value) to the
|
|
46
|
+
* absolute site path the web engine modules are served from — the
|
|
47
|
+
* runtime module prefix isolated (multithreaded) contexts import the
|
|
48
|
+
* engine from. Web wasm paths are site-root-relative by convention
|
|
49
|
+
* ('./static/js/'); missing input falls back to the same '/static/js/'
|
|
50
|
+
* directory conway-geom's web init already uses to locate wasm.
|
|
51
|
+
*
|
|
52
|
+
* @param wasmPath The embedder-configured wasm directory, if any.
|
|
53
|
+
* @return {string} Absolute directory with a trailing slash.
|
|
54
|
+
*/
|
|
55
|
+
export function webWasmDirectory(wasmPath) {
|
|
56
|
+
let directory = wasmPath ?? "";
|
|
57
|
+
if (directory === "") {
|
|
58
|
+
return DEFAULT_WEB_WASM_DIRECTORY;
|
|
59
|
+
}
|
|
60
|
+
if (directory.startsWith("./")) {
|
|
61
|
+
directory = directory.substring(1);
|
|
62
|
+
}
|
|
63
|
+
else if (!directory.startsWith("/")) {
|
|
64
|
+
directory = `/${directory}`;
|
|
65
|
+
}
|
|
66
|
+
return directory.endsWith("/") ? directory : `${directory}/`;
|
|
67
|
+
}
|
|
39
68
|
/**
|
|
40
69
|
* @return {number} current time in ms
|
|
41
70
|
*/
|
|
@@ -83,6 +112,19 @@ export class IfcAPI {
|
|
|
83
112
|
Environment.checkEnvironment();
|
|
84
113
|
Logger.initializeWasmCallbacks();
|
|
85
114
|
Logger.info(versionString);
|
|
115
|
+
// Cross-origin-isolated web contexts select the multithreaded wasm,
|
|
116
|
+
// whose pthread workers resolve their worker script from the engine
|
|
117
|
+
// module's own import.meta.url. A bundler-inlined copy of the glue
|
|
118
|
+
// gives workers a wrong URL (the worker script 404s and MT init dies
|
|
119
|
+
// with a bare error Event — Share #1610). Setting a runtime module
|
|
120
|
+
// prefix makes conway-geom import the engine module from the
|
|
121
|
+
// directory it is actually served from, so import.meta.url — and
|
|
122
|
+
// therefore the worker script URL — is correct. Web wasm paths are
|
|
123
|
+
// site-root-relative by convention; no-op outside isolated windows.
|
|
124
|
+
if (typeof window !== "undefined" &&
|
|
125
|
+
window.crossOriginIsolated === true) {
|
|
126
|
+
setModulePrefix(webWasmDirectory(this.wasmPath));
|
|
127
|
+
}
|
|
86
128
|
const locateFileHandler = (path, prefix) => {
|
|
87
129
|
// when the wasm module requests the wasm file, we redirect to include the user specified path
|
|
88
130
|
if (path.endsWith(".wasm")) {
|
|
@@ -144,6 +186,60 @@ export class IfcAPI {
|
|
|
144
186
|
this.models.set(modelIdResult, result);
|
|
145
187
|
return modelIdResult;
|
|
146
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Streamed-open variant of OpenModelAsync (conway extension;
|
|
191
|
+
* feature-detect with typeof api.OpenModelStreamed === 'function').
|
|
192
|
+
* IFC input parses through the streaming columnar indexer, so the
|
|
193
|
+
* model's record index is columnar from birth and the classic
|
|
194
|
+
* per-record object phase — the dominant JS-heap cost of parsing
|
|
195
|
+
* large models — never exists. Everything downstream is identical to
|
|
196
|
+
* OpenModelAsync: same cooperative geometry extraction, same
|
|
197
|
+
* meshes/properties surface, and SpillModelSource works afterwards
|
|
198
|
+
* as usual.
|
|
199
|
+
*
|
|
200
|
+
* Never does worse than OpenModelAsync: non-IFC formats and any
|
|
201
|
+
* streamed-parse failure fall back to the classic path internally,
|
|
202
|
+
* so -1 here means the classic open would have failed too.
|
|
203
|
+
*
|
|
204
|
+
* @param data containing IFC data (bytes)
|
|
205
|
+
* @param settings settings for loading the model
|
|
206
|
+
* @return {Promise<number>} model ID
|
|
207
|
+
*/
|
|
208
|
+
async OpenModelStreamed(data, settings) {
|
|
209
|
+
// Reserve the ID before the first await — see OpenModelAsync.
|
|
210
|
+
const modelIdResult = this.globalModelIDCounter++;
|
|
211
|
+
const result = await IfcApiModelPassthroughFactory.fromStreamed(modelIdResult, data, this.wasmModule, settings);
|
|
212
|
+
if (result === void 0) {
|
|
213
|
+
return -1;
|
|
214
|
+
}
|
|
215
|
+
this.models.set(modelIdResult, result);
|
|
216
|
+
return modelIdResult;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* M1b store-backed open (conway extension; feature-detect with
|
|
220
|
+
* `typeof api.OpenModelStream === 'function'`). Parses through a
|
|
221
|
+
* moving window over `store` and keeps the model windowed from
|
|
222
|
+
* birth — the source is never one JS `ArrayBuffer`. Geometry
|
|
223
|
+
* extract on the deferred path must use
|
|
224
|
+
* {@link ExtractGeometryBatchAsync} so product closures can be
|
|
225
|
+
* paged in.
|
|
226
|
+
*
|
|
227
|
+
* IFC only; other formats return -1 (caller should fall back to
|
|
228
|
+
* buffering + OpenModelStreamed).
|
|
229
|
+
*
|
|
230
|
+
* @param store External store holding the source bytes (OPFS File).
|
|
231
|
+
* @param settings settings for loading the model
|
|
232
|
+
* @return {Promise<number>} model ID, or -1 on failure
|
|
233
|
+
*/
|
|
234
|
+
async OpenModelStream(store, settings) {
|
|
235
|
+
const modelIdResult = this.globalModelIDCounter++;
|
|
236
|
+
const result = await IfcApiModelPassthroughFactory.fromStore(modelIdResult, store, this.wasmModule, settings);
|
|
237
|
+
if (result === void 0) {
|
|
238
|
+
return -1;
|
|
239
|
+
}
|
|
240
|
+
this.models.set(modelIdResult, result);
|
|
241
|
+
return modelIdResult;
|
|
242
|
+
}
|
|
147
243
|
/**
|
|
148
244
|
* Set conway's console-echo log threshold, web-ifc compatible surface
|
|
149
245
|
* (numeric LogLevel enum). Embedders (e.g. Share) use this to quiet a
|
|
@@ -434,6 +530,25 @@ export class IfcAPI {
|
|
|
434
530
|
const coordinationMatrix = glmatrix.mat4.create();
|
|
435
531
|
return Array.from(coordinationMatrix);
|
|
436
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Conway extension: the coordination frame the open ACTUALLY applied
|
|
535
|
+
* to emitted placements (the COORDINATE_TO_ORIGIN recenter), identity
|
|
536
|
+
* when none ran. GetCoordinationMatrix keeps its classic identity
|
|
537
|
+
* contract (consumers stamp it onto assembled models); this is the
|
|
538
|
+
* explicit report of the real offset so embedders can map rendered
|
|
539
|
+
* points back to source-world coordinates (Share#1634 acceptance).
|
|
540
|
+
* Feature-detect: typeof api.GetAppliedCoordinationMatrix.
|
|
541
|
+
*
|
|
542
|
+
* @param modelID
|
|
543
|
+
* @return {Array<number>} column-major mat4
|
|
544
|
+
*/
|
|
545
|
+
GetAppliedCoordinationMatrix(modelID) {
|
|
546
|
+
const result = this.models.get(modelID);
|
|
547
|
+
if (result !== void 0 && result.getAppliedCoordination !== void 0) {
|
|
548
|
+
return result.getAppliedCoordination();
|
|
549
|
+
}
|
|
550
|
+
return Array.from(glmatrix.mat4.create());
|
|
551
|
+
}
|
|
437
552
|
/**
|
|
438
553
|
*
|
|
439
554
|
* @param ptr
|
|
@@ -460,8 +575,15 @@ export class IfcAPI {
|
|
|
460
575
|
* @return {Float32Array | Uint32Array}
|
|
461
576
|
*/
|
|
462
577
|
getSubArray(heap, startPtr, sizeBytes) {
|
|
463
|
-
//
|
|
464
|
-
|
|
578
|
+
// `heap` stays in the signature because web-ifc's API puts it there, but
|
|
579
|
+
// it is now read only for its element type. The view itself is rebuilt
|
|
580
|
+
// over the module's CURRENT heap buffer: a caller-held HEAPF32/HEAPU32 can
|
|
581
|
+
// be bound to a pre-growth buffer on the MT build, and subarray() on such
|
|
582
|
+
// a view clamps the window silently and returns short data rather than
|
|
583
|
+
// failing (#485, and see core/wasm_heap.ts).
|
|
584
|
+
const arrayType = heap.constructor;
|
|
585
|
+
// slice(0) as before, so the result outlives the next call into wasm.
|
|
586
|
+
return wasmHeapView(this.wasmModule, arrayType, startPtr, sizeBytes).slice(0);
|
|
465
587
|
}
|
|
466
588
|
/**
|
|
467
589
|
* Closes a model and frees all related memory
|
|
@@ -477,6 +599,92 @@ export class IfcAPI {
|
|
|
477
599
|
this.models.delete(modelID);
|
|
478
600
|
this.conwaywasm.destroy();
|
|
479
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Conway extension (Share demand/tiled rendering slice A): on a model
|
|
604
|
+
* opened with `OpenModelStreamed(data, {DEFER_GEOMETRY: true})`,
|
|
605
|
+
* extract the next `batchSize` products and emit this batch's meshes —
|
|
606
|
+
* the incremental twin of StreamAllMeshes. Feature-detect with
|
|
607
|
+
* `typeof api.ExtractGeometryBatch === 'function'`; call repeatedly
|
|
608
|
+
* until `remaining` is 0.
|
|
609
|
+
*
|
|
610
|
+
* DELTA CONTRACT: an entity may be emitted again in a LATER call with
|
|
611
|
+
* a FlatMesh containing only its NEW placed instances (shared/mapped
|
|
612
|
+
* geometry attributes instances to an entity from other products'
|
|
613
|
+
* extractions). Consumers must render/accumulate deltas additively —
|
|
614
|
+
* never key emissions by expressID with overwrite semantics. Each
|
|
615
|
+
* placed instance is emitted exactly once across all calls.
|
|
616
|
+
*
|
|
617
|
+
* @param modelID handle retrieved by OpenModelStreamed
|
|
618
|
+
* @param batchSize max products to extract this call
|
|
619
|
+
* @param meshCallback receives each newly-extracted product's mesh
|
|
620
|
+
* @return {object} `{extracted, remaining}`; `{extracted: 0,
|
|
621
|
+
* remaining: 0}` for unknown models or models without the deferred
|
|
622
|
+
* pump (non-IFC / fully-extracted opens).
|
|
623
|
+
*/
|
|
624
|
+
ExtractGeometryBatch(modelID, batchSize, meshCallback) {
|
|
625
|
+
const result = this.models.get(modelID);
|
|
626
|
+
if (result?.extractGeometryBatch === void 0) {
|
|
627
|
+
return { extracted: 0, remaining: 0 };
|
|
628
|
+
}
|
|
629
|
+
return result.extractGeometryBatch(batchSize, meshCallback);
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Async twin of {@link ExtractGeometryBatch}: pages each product's
|
|
633
|
+
* source-byte closure before extracting it. Required for models
|
|
634
|
+
* opened with {@link OpenModelStream}; a no-op-prefetch on a
|
|
635
|
+
* resident-source deferred open. Feature-detect with
|
|
636
|
+
* `typeof api.ExtractGeometryBatchAsync === 'function'`.
|
|
637
|
+
*
|
|
638
|
+
* @param modelID handle retrieved by OpenModelStream / OpenModelStreamed
|
|
639
|
+
* @param batchSize max products to extract this call
|
|
640
|
+
* @param meshCallback receives each newly-extracted product's mesh
|
|
641
|
+
* @return {Promise<object>} `{extracted, remaining}`
|
|
642
|
+
*/
|
|
643
|
+
async ExtractGeometryBatchAsync(modelID, batchSize, meshCallback) {
|
|
644
|
+
const result = this.models.get(modelID);
|
|
645
|
+
if (result?.extractGeometryBatchAsync !== void 0) {
|
|
646
|
+
return result.extractGeometryBatchAsync(batchSize, meshCallback);
|
|
647
|
+
}
|
|
648
|
+
if (result?.extractGeometryBatch === void 0) {
|
|
649
|
+
return { extracted: 0, remaining: 0 };
|
|
650
|
+
}
|
|
651
|
+
return result.extractGeometryBatch(batchSize, meshCallback);
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Conway extension: free a model's native geometry once the consumer
|
|
655
|
+
* has built its own scene from the meshes — every canonical mesh the
|
|
656
|
+
* extraction produced plus the GetGeometry map. Subsequent
|
|
657
|
+
* GetGeometry calls return an empty dummy; placed transforms, the
|
|
658
|
+
* spatial structure and properties are untouched. Feature-detect with
|
|
659
|
+
* `typeof api.ReleaseModelGeometry === 'function'`.
|
|
660
|
+
*
|
|
661
|
+
* The wasm heap never shrinks, but freed pages are reused — repeated
|
|
662
|
+
* loads in one tab plateau instead of stacking whole model scenes.
|
|
663
|
+
* On a deferred model whose pump has not drained this is a safe
|
|
664
|
+
* no-op returning false.
|
|
665
|
+
*
|
|
666
|
+
* @param modelID handle retrieved by OpenModel/OpenModelStreamed
|
|
667
|
+
* @return {boolean} True when geometry was released.
|
|
668
|
+
*/
|
|
669
|
+
/**
|
|
670
|
+
* Conway extension: the model's linear scaling factor to metres
|
|
671
|
+
* (1 = metres, 0.001 = millimetres, 0.0254 = inches), derived from
|
|
672
|
+
* the model's unit assignment during extraction. Feature-detect with
|
|
673
|
+
* `typeof`. Returns 1 for unknown models.
|
|
674
|
+
*
|
|
675
|
+
* @param modelID handle retrieved by OpenModel/OpenModelStreamed
|
|
676
|
+
* @return {number} metres per model unit.
|
|
677
|
+
*/
|
|
678
|
+
GetLinearScalingFactor(modelID) {
|
|
679
|
+
return this.models.get(modelID)?.linearScalingFactor ?? 1;
|
|
680
|
+
}
|
|
681
|
+
ReleaseModelGeometry(modelID) {
|
|
682
|
+
const result = this.models.get(modelID);
|
|
683
|
+
if (result?.releaseGeometry === void 0) {
|
|
684
|
+
return false;
|
|
685
|
+
}
|
|
686
|
+
return result.releaseGeometry();
|
|
687
|
+
}
|
|
480
688
|
/**
|
|
481
689
|
*
|
|
482
690
|
* @param modelID
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_api_deferred_open.test.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_deferred_open.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers */
|
|
2
|
+
// Deferred-geometry streamed open (demand/tiled rendering slice A):
|
|
3
|
+
// pumping ExtractGeometryBatch to completion must reproduce EXACTLY the
|
|
4
|
+
// meshes a classic OpenModel + StreamAllMeshes produces — same
|
|
5
|
+
// entities, same placed-geometry ids, colors, and transforms — across
|
|
6
|
+
// multiple small batches (which exercises the persisted coordination
|
|
7
|
+
// matrix; a single-shot capture can't catch a stale one).
|
|
8
|
+
import * as fs from "fs";
|
|
9
|
+
import { beforeAll, describe, expect, test } from "@jest/globals";
|
|
10
|
+
import { IfcAPI } from "./ifc_api.js";
|
|
11
|
+
const SETTINGS = { COORDINATE_TO_ORIGIN: true, USE_FAST_BOOLS: true };
|
|
12
|
+
let api;
|
|
13
|
+
let buffer;
|
|
14
|
+
/**
|
|
15
|
+
* Flatten a FlatMesh into comparable plain data.
|
|
16
|
+
*
|
|
17
|
+
* @param mesh The mesh.
|
|
18
|
+
* @return {object} Plain comparable form.
|
|
19
|
+
*/
|
|
20
|
+
function flatten(mesh, previous) {
|
|
21
|
+
const geometries = previous?.geometries ?? [];
|
|
22
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
23
|
+
const placed = mesh.geometries.get(where);
|
|
24
|
+
geometries.push({
|
|
25
|
+
color: placed.color,
|
|
26
|
+
geometryExpressID: placed.geometryExpressID,
|
|
27
|
+
flatTransformation: [...placed.flatTransformation],
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return { expressID: mesh.expressID, geometries };
|
|
31
|
+
}
|
|
32
|
+
beforeAll(async () => {
|
|
33
|
+
api = new IfcAPI();
|
|
34
|
+
await api.Init();
|
|
35
|
+
buffer = new Uint8Array(fs.readFileSync("data/index.ifc"));
|
|
36
|
+
}, 120000);
|
|
37
|
+
describe("OpenModelStreamed + DEFER_GEOMETRY", () => {
|
|
38
|
+
test("batch pump to completion matches classic StreamAllMeshes exactly", async () => {
|
|
39
|
+
const classicID = api.OpenModel(buffer, SETTINGS);
|
|
40
|
+
const classic = new Map();
|
|
41
|
+
api.StreamAllMeshes(classicID, (mesh) => {
|
|
42
|
+
classic.set(mesh.expressID, flatten(mesh));
|
|
43
|
+
});
|
|
44
|
+
expect(classic.size).toBeGreaterThan(0);
|
|
45
|
+
const deferredID = await api.OpenModelStreamed(buffer, { ...SETTINGS, DEFER_GEOMETRY: true });
|
|
46
|
+
expect(deferredID).toBeGreaterThanOrEqual(0);
|
|
47
|
+
// Pump in deliberately small batches; collect incremental meshes.
|
|
48
|
+
// (Deltas: an entity may re-emit with only its NEW instances —
|
|
49
|
+
// `flatten` accumulation in the map below must be additive.)
|
|
50
|
+
const streamed = new Map();
|
|
51
|
+
let firstBatchCount = 0;
|
|
52
|
+
let rounds = 0;
|
|
53
|
+
for (;;) {
|
|
54
|
+
const { extracted, remaining } = api.ExtractGeometryBatch(deferredID, 7, (mesh) => {
|
|
55
|
+
streamed.set(mesh.expressID, flatten(mesh, streamed.get(mesh.expressID)));
|
|
56
|
+
});
|
|
57
|
+
if (rounds === 0) {
|
|
58
|
+
firstBatchCount = streamed.size;
|
|
59
|
+
}
|
|
60
|
+
++rounds;
|
|
61
|
+
if (remaining === 0 && extracted === 0) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Incrementality: meshes arrived before the pump completed.
|
|
66
|
+
expect(rounds).toBeGreaterThan(2);
|
|
67
|
+
expect(firstBatchCount).toBeGreaterThanOrEqual(0);
|
|
68
|
+
expect(streamed.size).toBe(classic.size);
|
|
69
|
+
// Exact parity per entity: ids, colors, transforms.
|
|
70
|
+
for (const [expressID, mesh] of classic) {
|
|
71
|
+
expect(streamed.get(expressID)).toEqual(mesh);
|
|
72
|
+
}
|
|
73
|
+
api.CloseModel(classicID);
|
|
74
|
+
api.CloseModel(deferredID);
|
|
75
|
+
}, 240000);
|
|
76
|
+
test("deferred pump emits a Geometry progress phase", async () => {
|
|
77
|
+
const events = [];
|
|
78
|
+
const deferredID = await api.OpenModelStreamed(buffer, {
|
|
79
|
+
...SETTINGS,
|
|
80
|
+
DEFER_GEOMETRY: true,
|
|
81
|
+
ON_PROGRESS: (event) => {
|
|
82
|
+
events.push({
|
|
83
|
+
phase: event.phase,
|
|
84
|
+
completed: event.completed,
|
|
85
|
+
total: event.total,
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
expect(deferredID).toBeGreaterThanOrEqual(0);
|
|
90
|
+
for (;;) {
|
|
91
|
+
const { extracted, remaining } = api.ExtractGeometryBatch(deferredID, 7);
|
|
92
|
+
if (remaining === 0 && extracted === 0) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const parseEvents = events.filter((event) => event.phase === "dataParse");
|
|
97
|
+
const geometryEvents = events.filter((event) => event.phase === "geometry");
|
|
98
|
+
expect(parseEvents.length).toBeGreaterThan(0);
|
|
99
|
+
expect(geometryEvents.length).toBeGreaterThan(0);
|
|
100
|
+
expect(geometryEvents[0].completed).toBe(0);
|
|
101
|
+
expect(geometryEvents[geometryEvents.length - 1].completed).
|
|
102
|
+
toBe(geometryEvents[geometryEvents.length - 1].total);
|
|
103
|
+
api.CloseModel(deferredID);
|
|
104
|
+
}, 240000);
|
|
105
|
+
test("StreamAllMeshes on a deferred model drains the pump and matches classic", async () => {
|
|
106
|
+
const classicID = api.OpenModel(buffer, SETTINGS);
|
|
107
|
+
const classic = new Map();
|
|
108
|
+
api.StreamAllMeshes(classicID, (mesh) => {
|
|
109
|
+
classic.set(mesh.expressID, flatten(mesh));
|
|
110
|
+
});
|
|
111
|
+
const deferredID = await api.OpenModelStreamed(buffer, { ...SETTINGS, DEFER_GEOMETRY: true });
|
|
112
|
+
// No pump calls at all — the whole-model consumer must still get
|
|
113
|
+
// the complete mesh set (the shim drains internally).
|
|
114
|
+
const drained = new Map();
|
|
115
|
+
api.StreamAllMeshes(deferredID, (mesh) => {
|
|
116
|
+
drained.set(mesh.expressID, flatten(mesh));
|
|
117
|
+
});
|
|
118
|
+
expect(drained.size).toBe(classic.size);
|
|
119
|
+
for (const [expressID, mesh] of classic) {
|
|
120
|
+
expect(drained.get(expressID)).toEqual(mesh);
|
|
121
|
+
}
|
|
122
|
+
api.CloseModel(classicID);
|
|
123
|
+
api.CloseModel(deferredID);
|
|
124
|
+
}, 240000);
|
|
125
|
+
test("deferred GetGeometry serves byte-identical vertex content to classic", async () => {
|
|
126
|
+
// The build multiplies GetGeometry FLOAT vertices by captured
|
|
127
|
+
// transforms, and the float mirror's frame must match the scene
|
|
128
|
+
// transforms (frozen at mesh add — see IfcModelGeometry.add). A
|
|
129
|
+
// per-geometry frame shift here renders as scattered pieces even
|
|
130
|
+
// with perfect transform parity, which transform-only assertions
|
|
131
|
+
// cannot catch.
|
|
132
|
+
//
|
|
133
|
+
// Fresh IfcAPI: CloseModel destroys the shared wasm processor, and
|
|
134
|
+
// models opened after ANY close serve empty geometry payloads (a
|
|
135
|
+
// long-standing multi-open shim quirk — browsers open one model per
|
|
136
|
+
// page). The shared `api` has closed models by the time this runs.
|
|
137
|
+
const api2 = new IfcAPI();
|
|
138
|
+
await api2.Init();
|
|
139
|
+
const classicID = api2.OpenModel(buffer, SETTINGS);
|
|
140
|
+
const geometryIDs = new Set();
|
|
141
|
+
api2.StreamAllMeshes(classicID, (mesh) => {
|
|
142
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
143
|
+
geometryIDs.add(mesh.geometries.get(where).geometryExpressID);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const deferredID = await api2.OpenModelStreamed(buffer, { ...SETTINGS, DEFER_GEOMETRY: true });
|
|
147
|
+
api2.StreamAllMeshes(deferredID, () => { });
|
|
148
|
+
let compared = 0;
|
|
149
|
+
for (const geometryID of geometryIDs) {
|
|
150
|
+
const classicGeometry = api2.GetGeometry(classicID, geometryID);
|
|
151
|
+
const deferredGeometry = api2.GetGeometry(deferredID, geometryID);
|
|
152
|
+
const classicSize = classicGeometry.GetVertexDataSize();
|
|
153
|
+
if (classicSize === 0) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
expect(deferredGeometry.GetVertexDataSize()).toBe(classicSize);
|
|
157
|
+
const classicVertices = api2.GetVertexArray(classicGeometry.GetVertexData(), classicSize);
|
|
158
|
+
const deferredVertices = api2.GetVertexArray(deferredGeometry.GetVertexData(), classicSize);
|
|
159
|
+
expect(deferredVertices).toEqual(classicVertices);
|
|
160
|
+
++compared;
|
|
161
|
+
}
|
|
162
|
+
expect(compared).toBeGreaterThan(0);
|
|
163
|
+
api2.CloseModel(classicID);
|
|
164
|
+
api2.CloseModel(deferredID);
|
|
165
|
+
}, 240000);
|
|
166
|
+
test("ReleaseModelGeometry frees served geometry, keeps meshes, refuses undrained pumps", async () => {
|
|
167
|
+
// Fresh IfcAPI (CloseModel poisons later opens — see the content
|
|
168
|
+
// parity test's note).
|
|
169
|
+
const api3 = new IfcAPI();
|
|
170
|
+
await api3.Init();
|
|
171
|
+
// Undrained deferred pump: refuse (releasing would break the
|
|
172
|
+
// remaining extraction).
|
|
173
|
+
const deferredID = await api3.OpenModelStreamed(buffer, { ...SETTINGS, DEFER_GEOMETRY: true });
|
|
174
|
+
api3.ExtractGeometryBatch(deferredID, 1);
|
|
175
|
+
expect(api3.ReleaseModelGeometry(deferredID)).toBe(false);
|
|
176
|
+
// Classic model: release frees GetGeometry serving, keeps captured
|
|
177
|
+
// mesh data, double-release stays safe.
|
|
178
|
+
const classicID = api3.OpenModel(buffer, SETTINGS);
|
|
179
|
+
const geometryIDs = [];
|
|
180
|
+
let meshes = 0;
|
|
181
|
+
api3.StreamAllMeshes(classicID, (mesh) => {
|
|
182
|
+
++meshes;
|
|
183
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
184
|
+
geometryIDs.push(mesh.geometries.get(where).geometryExpressID);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
expect(meshes).toBeGreaterThan(0);
|
|
188
|
+
expect(api3.GetGeometry(classicID, geometryIDs[0]).GetVertexDataSize())
|
|
189
|
+
.toBeGreaterThan(0);
|
|
190
|
+
expect(api3.ReleaseModelGeometry(classicID)).toBe(true);
|
|
191
|
+
// Served geometry degrades to the empty dummy; mesh data survives.
|
|
192
|
+
expect(api3.GetGeometry(classicID, geometryIDs[0]).GetVertexDataSize())
|
|
193
|
+
.toBe(0);
|
|
194
|
+
let meshesAfter = 0;
|
|
195
|
+
api3.StreamAllMeshes(classicID, () => {
|
|
196
|
+
++meshesAfter;
|
|
197
|
+
});
|
|
198
|
+
expect(meshesAfter).toBeGreaterThan(0);
|
|
199
|
+
expect(api3.ReleaseModelGeometry(classicID)).toBe(true);
|
|
200
|
+
expect(api3.ReleaseModelGeometry(9999)).toBe(false);
|
|
201
|
+
}, 240000);
|
|
202
|
+
test("pump applies the rel-aggregates master-voids pass (cut parity)", async () => {
|
|
203
|
+
// Classic's whole-model walk follows its product loop with a second
|
|
204
|
+
// pass re-extracting every IfcRelAggregates related product with
|
|
205
|
+
// the RELATING object's rel-voids, REPLACING the canonical mesh
|
|
206
|
+
// under the same localID — aggregate parts whose parent carries
|
|
207
|
+
// openings end up cut. A pump that only ran the per-product pass
|
|
208
|
+
// served the UNCUT content classic never exposes (field reports:
|
|
209
|
+
// wrong shapes + flicker on faceset-heavy vyzn models). The
|
|
210
|
+
// synthetic fixture is an assembly voided by an opening,
|
|
211
|
+
// aggregating a box part the opening must cut.
|
|
212
|
+
//
|
|
213
|
+
// Fresh IfcAPI (CloseModel poisons later opens — see the content
|
|
214
|
+
// parity test's note).
|
|
215
|
+
const api4 = new IfcAPI();
|
|
216
|
+
await api4.Init();
|
|
217
|
+
const fixture = new Uint8Array(fs.readFileSync("data/aggregate_master_voids.ifc"));
|
|
218
|
+
const classicID = api4.OpenModel(fixture, SETTINGS);
|
|
219
|
+
const classicInstances = [];
|
|
220
|
+
api4.StreamAllMeshes(classicID, (mesh) => {
|
|
221
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
222
|
+
classicInstances.push(mesh.geometries.get(where).geometryExpressID);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
// Aggregate targets are extracted ONLY by the second pass now
|
|
226
|
+
// (aggregateTargetLocalIDs): exactly ONE placed instance of the cut
|
|
227
|
+
// part. (Historically 2 — the first-pass uncut node plus the
|
|
228
|
+
// pass-two re-extraction node coinciding, a duplicate that
|
|
229
|
+
// z-fought and, on the pump, delivered stale uncut content.)
|
|
230
|
+
expect(classicInstances.length).toBe(1);
|
|
231
|
+
const deferredID = await api4.OpenModelStreamed(fixture, { ...SETTINGS, DEFER_GEOMETRY: true });
|
|
232
|
+
const pumpedInstances = [];
|
|
233
|
+
const pumpedTrisAtDelivery = [];
|
|
234
|
+
for (;;) {
|
|
235
|
+
const { extracted, remaining } = api4.ExtractGeometryBatch(deferredID, 1, (mesh) => {
|
|
236
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
237
|
+
const geometryID = mesh.geometries.get(where).geometryExpressID;
|
|
238
|
+
pumpedInstances.push(geometryID);
|
|
239
|
+
// Content-at-delivery: what an incremental consumer
|
|
240
|
+
// copies the moment the instance is emitted.
|
|
241
|
+
const geometry = api4.GetGeometry(deferredID, geometryID);
|
|
242
|
+
pumpedTrisAtDelivery.push(
|
|
243
|
+
// eslint-disable-next-line no-magic-numbers
|
|
244
|
+
(geometry.GetIndexDataSize() / 3) | 0);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
if (remaining === 0 && extracted === 0) {
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Instance parity: same single cut instance as classic.
|
|
252
|
+
expect(pumpedInstances.sort()).toEqual(classicInstances.sort());
|
|
253
|
+
// The #1640 invariant (Share bldrs-ai/Share#1640): the content an
|
|
254
|
+
// incremental consumer copies AT DELIVERY equals the final content
|
|
255
|
+
// — the pump must never mutate a geometry after emitting instances
|
|
256
|
+
// that reference it.
|
|
257
|
+
for (let where = 0; where < pumpedInstances.length; ++where) {
|
|
258
|
+
const finalGeometry = api4.GetGeometry(deferredID, pumpedInstances[where]);
|
|
259
|
+
expect(pumpedTrisAtDelivery[where])
|
|
260
|
+
// eslint-disable-next-line no-magic-numbers
|
|
261
|
+
.toBe((finalGeometry.GetIndexDataSize() / 3) | 0);
|
|
262
|
+
}
|
|
263
|
+
// Content parity: GetGeometry must serve the CUT part, byte-identical
|
|
264
|
+
// to classic (the uncut box has strictly fewer vertices).
|
|
265
|
+
for (const geometryID of new Set(classicInstances)) {
|
|
266
|
+
const classicGeometry = api4.GetGeometry(classicID, geometryID);
|
|
267
|
+
const deferredGeometry = api4.GetGeometry(deferredID, geometryID);
|
|
268
|
+
const classicSize = classicGeometry.GetVertexDataSize();
|
|
269
|
+
expect(classicSize).toBeGreaterThan(0);
|
|
270
|
+
expect(deferredGeometry.GetVertexDataSize()).toBe(classicSize);
|
|
271
|
+
expect(deferredGeometry.GetIndexDataSize())
|
|
272
|
+
.toBe(classicGeometry.GetIndexDataSize());
|
|
273
|
+
const classicVertices = api4.GetVertexArray(classicGeometry.GetVertexData(), classicSize);
|
|
274
|
+
const deferredVertices = api4.GetVertexArray(deferredGeometry.GetVertexData(), classicSize);
|
|
275
|
+
expect(deferredVertices).toEqual(classicVertices);
|
|
276
|
+
}
|
|
277
|
+
api4.CloseModel(classicID);
|
|
278
|
+
api4.CloseModel(deferredID);
|
|
279
|
+
}, 240000);
|
|
280
|
+
test("ExtractGeometryBatch is a safe no-op on non-deferred models", async () => {
|
|
281
|
+
const modelID = await api.OpenModelStreamed(buffer, SETTINGS);
|
|
282
|
+
expect(api.ExtractGeometryBatch(modelID, 8))
|
|
283
|
+
.toEqual({ extracted: 0, remaining: 0 });
|
|
284
|
+
expect(api.ExtractGeometryBatch(9999, 8))
|
|
285
|
+
.toEqual({ extracted: 0, remaining: 0 });
|
|
286
|
+
api.CloseModel(modelID);
|
|
287
|
+
}, 120000);
|
|
288
|
+
});
|
|
@@ -7,7 +7,37 @@ export interface IfcApiModelPassthrough {
|
|
|
7
7
|
loadAllGeometry(): Vector<FlatMesh>;
|
|
8
8
|
streamAllMeshesWithTypes(types: number[], meshCallback: (mesh: FlatMesh) => void): void;
|
|
9
9
|
streamAllMeshes(meshCallback: (mesh: FlatMesh) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* Deferred-mode batch pump (IFC proxies opened with DEFER_GEOMETRY) —
|
|
12
|
+
* see IfcApiProxyIfc.extractGeometryBatch.
|
|
13
|
+
*/
|
|
14
|
+
/** Free the model's native geometry after the consumer's scene build
|
|
15
|
+
* (conway extension) — see the proxies' releaseGeometry. */
|
|
16
|
+
releaseGeometry?(): boolean;
|
|
17
|
+
/** Metres per model unit (see IfcAPI.GetLinearScalingFactor). */
|
|
18
|
+
linearScalingFactor?: number;
|
|
19
|
+
extractGeometryBatch?(batchSize: number, meshCallback?: (mesh: FlatMesh) => void): {
|
|
20
|
+
extracted: number;
|
|
21
|
+
remaining: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Async twin of extractGeometryBatch — pages windowed source ranges
|
|
25
|
+
* before each product extract (M1b). Feature-detect with typeof.
|
|
26
|
+
*/
|
|
27
|
+
extractGeometryBatchAsync?(batchSize: number, meshCallback?: (mesh: FlatMesh) => void): Promise<{
|
|
28
|
+
extracted: number;
|
|
29
|
+
remaining: number;
|
|
30
|
+
}>;
|
|
10
31
|
getCoordinationMatrix(): number[];
|
|
32
|
+
/**
|
|
33
|
+
* Optional: the coordination frame the open ACTUALLY applied to
|
|
34
|
+
* emitted placements (COORDINATE_TO_ORIGIN recenter). Unlike
|
|
35
|
+
* getCoordinationMatrix — whose classic identity contract consumers
|
|
36
|
+
* stamp onto assembled models — this reports the real offset, so
|
|
37
|
+
* embedders can map rendered points back to source-world coordinates
|
|
38
|
+
* (Share#1634 acceptance).
|
|
39
|
+
*/
|
|
40
|
+
getAppliedCoordination?(): number[];
|
|
11
41
|
getAllLines(): Vector<number>;
|
|
12
42
|
getLineIDsWithType(type: number): Vector<number>;
|
|
13
43
|
getRawLineData(expressID: number): RawLineData;
|
|
@@ -24,6 +54,15 @@ export interface IfcApiModelPassthrough {
|
|
|
24
54
|
* external store and served through on-demand windows.
|
|
25
55
|
*/
|
|
26
56
|
readonly sourceIsExternal?: boolean;
|
|
57
|
+
/** Optional: store-backed pump split (prefetch / extract / release). */
|
|
58
|
+
readonly extractProfile?: {
|
|
59
|
+
prefetchMs: number;
|
|
60
|
+
extractMs: number;
|
|
61
|
+
releaseMs: number;
|
|
62
|
+
batches: number;
|
|
63
|
+
lastPins: number;
|
|
64
|
+
pinMax: number;
|
|
65
|
+
};
|
|
27
66
|
/**
|
|
28
67
|
* Optional: release the resident source buffer, serving subsequent
|
|
29
68
|
* record reads through windows paged from the given external store.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc_api_model_passthrough.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAGhE,MAAM,WAAW,sBAAsB;IAErC,UAAU,EAAE,qBAAqB,CAAA;IAEjC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxC,eAAe,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAA;IACvF,eAAe,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAA;IAC7D,qBAAqB,IAAI,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"ifc_api_model_passthrough.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAGhE,MAAM,WAAW,sBAAsB;IAErC,UAAU,EAAE,qBAAqB,CAAA;IAEjC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxC,eAAe,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAA;IACvF,eAAe,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAA;IAC7D;;;OAGG;IACH;gEAC4D;IAC5D,eAAe,CAAC,IAAI,OAAO,CAAA;IAE3B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B,oBAAoB,CAAC,CACnB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,CAAA;IAElF;;;OAGG;IACH,yBAAyB,CAAC,CACxB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GACvC,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IACjD,qBAAqB,IAAI,MAAM,EAAE,CAAA;IAEjC;;;;;;;OAOG;IACH,sBAAsB,CAAC,IAAI,MAAM,EAAE,CAAA;IACnC,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;IAC7B,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;IAChD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAA;IAC9C,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,CAAA;IAC5B,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;IAC5D,WAAW,CAAC,iBAAiB,EAAE,MAAM,GAAG,WAAW,CAAA;IAEnD;;;OAGG;IACH,kBAAkB,CAAC,IAAI,IAAI,CAAA;IAE3B;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAEnC,wEAAwE;IACxE,QAAQ,CAAC,cAAc,CAAC,EAAE;QACxB,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IAED;;;OAGG;IACH,0BAA0B,CAAC,CACzB,KAAK,EAAE,qBAAqB,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,GAAI,IAAI,CAAA;IAEpC;;;OAGG;IACH,kBAAkB,CAAC,CAAE,SAAS,EAAE,MAAM,GAAI,OAAO,CAAE,IAAI,CAAE,CAAA;IAEzD;;;;;OAKG;IACH,cAAc,CAAC,IAAI,gBAAgB,CAAE,MAAM,CAAE,CAAA;CAC9C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Loadersettings } from "./ifc_api.js";
|
|
2
2
|
import { IfcApiModelPassthrough } from "./ifc_api_model_passthrough.js";
|
|
3
|
+
import { StepExternalByteStore } from "../../step/step_buffer_provider.js";
|
|
3
4
|
/**
|
|
4
5
|
* The factory to construct models.
|
|
5
6
|
*/
|
|
@@ -13,6 +14,35 @@ export declare class IfcApiModelPassthroughFactory {
|
|
|
13
14
|
* @return {IfcApiModelPassthrough | undefined}
|
|
14
15
|
*/
|
|
15
16
|
static from(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): IfcApiModelPassthrough | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Streamed-open twin of fromAsync (used by OpenModelStreamed): IFC
|
|
19
|
+
* models parse through the streaming columnar indexer (no per-record
|
|
20
|
+
* object phase — see IfcApiProxyIfc.createStreamed); everything else
|
|
21
|
+
* behaves like fromAsync. Non-IFC formats and any streamed-open
|
|
22
|
+
* failure fall back to the classic cooperative path, so this never
|
|
23
|
+
* does worse than fromAsync — the safety net behind embedder
|
|
24
|
+
* feature flags.
|
|
25
|
+
*
|
|
26
|
+
* @param modelID
|
|
27
|
+
* @param data
|
|
28
|
+
* @param wasmModule
|
|
29
|
+
* @param settings
|
|
30
|
+
* @return {Promise<IfcApiModelPassthrough | undefined>}
|
|
31
|
+
*/
|
|
32
|
+
static fromStreamed(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): Promise<IfcApiModelPassthrough | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Store-backed open (M1b): IFC models parse through a moving window
|
|
35
|
+
* over `store` and stay windowed from birth. Non-IFC formats are not
|
|
36
|
+
* implemented on this path — the caller should fall back to buffering
|
|
37
|
+
* and fromStreamed.
|
|
38
|
+
*
|
|
39
|
+
* @param modelID
|
|
40
|
+
* @param store External store holding the source bytes.
|
|
41
|
+
* @param wasmModule
|
|
42
|
+
* @param settings
|
|
43
|
+
* @return {Promise<IfcApiModelPassthrough | undefined>}
|
|
44
|
+
*/
|
|
45
|
+
static fromStore(modelID: number, store: StepExternalByteStore, wasmModule: any, settings?: Loadersettings): Promise<IfcApiModelPassthrough | undefined>;
|
|
16
46
|
/**
|
|
17
47
|
* Cooperative twin of from() (used by OpenModelAsync): the data parse
|
|
18
48
|
* runs with periodic event-loop yields so progress UI can repaint
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc_api_model_passthrough_factory.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough_factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"ifc_api_model_passthrough_factory.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough_factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAIpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAMvE;;GAEG;AACH,qBAAa,6BAA6B;IAExC;;;;;;;OAOG;WACW,IAAI,CACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,sBAAsB,GAAG,SAAS;IA2EnE;;;;;;;;;;;;;;OAcG;WACiB,YAAY,CAC5B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAkD5E;;;;;;;;;;;OAWG;WACiB,SAAS,CACzB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,qBAAqB,EAC5B,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IA2B5E;;;;;;;;;;;;OAYG;WACiB,SAAS,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;CA+C7E"}
|