Count the vertices ("v x y z" lines) in an IFC-Lite-generated Wavefront OBJ
export. Zero means the export carries no render geometry — the OBJ twin of
countGlbMeshes for GLB.
Since #7695 the Rust OBJ exporter (ifc_lite_export::export_obj) refuses
an export with zero written meshes with NoRenderGeometry, as export_glb
does, so the CLI and MCP keep this count as defense-in-depth. The OBJ it
used to return then was never zero bytes: it carried the two # ifc-lite OBJ export / # units: … comment header lines, so a byte-length check
alone cannot tell an empty export from a real one (an all-header,
zero-geometry OBJ is a fixed ~88 bytes regardless of input). Vertex count
is the actual geometry-content signal.
Only v lines are counted, not vn /vt — a line that starts "vn "
does not satisfy startsWith('v ') (the character after v is n, not a
space), so no explicit exclusion is needed.
Count the vertices ("v x y z" lines) in an IFC-Lite-generated Wavefront OBJ export. Zero means the export carries no render geometry — the OBJ twin of
countGlbMeshesfor GLB.Since #7695 the Rust OBJ exporter (
ifc_lite_export::export_obj) refuses an export with zero written meshes withNoRenderGeometry, asexport_glbdoes, so the CLI and MCP keep this count as defense-in-depth. The OBJ it used to return then was never zero bytes: it carried the two# ifc-lite OBJ export/# units: …comment header lines, so a byte-length check alone cannot tell an empty export from a real one (an all-header, zero-geometry OBJ is a fixed ~88 bytes regardless of input). Vertex count is the actual geometry-content signal.Only
vlines are counted, notvn/vt— a line that starts "vn " does not satisfystartsWith('v ')(the character aftervisn, not a space), so no explicit exclusion is needed.