Skip to main content

openbim_ifc_v0_1_model_parse

Function openbim_ifc_v0_1_model_parse 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn openbim_ifc_v0_1_model_parse( data: *const u8, len: usize, out_model: *mut OpenbimIfcModel, error_buffer: *mut u8, capacity: usize, ) -> OpenbimIfcStatus
Expand description

Parse len bytes of STEP and write the new model’s handle.

An ifcZIP archive, recognized by its ZIP signature, is read too: its one STEP or ifcXML model, within a decompression budget. Parse for an archive with no model or several, Unsupported for an encrypted entry or a compression other than Stored and Deflate, BudgetExceeded for an entry that inflates past the budget.

A parse failure has no model to hold its error, so the message is written to the optional error_buffer (NUL-terminated, truncated to capacity).

§Safety

data must be valid for len reads; out_model for one write; error_buffer, if non-null, for capacity writes.