Skip to content

feat(ifc): let callers set the Saved graph value limit - #2157

Draft
shifatrHtH wants to merge 1 commit into
DrunkOnJava:mainfrom
shifatrHtH:codex/saved-graph-value-limit
Draft

shifatrHtH wants to merge 1 commit into
DrunkOnJava:mainfrom
shifatrHtH:codex/saved-graph-value-limit

Conversation

@shifatrHtH

Copy link
Copy Markdown
Contributor

Summary

Rust callers can set a per-graph field-value limit for a Saved graphics attach request. Existing attach calls keep the one-million-value default.

Motivation

Applications that know their workload can set a limit for Saved decoding. A graph beyond the requested limit follows the existing per-element refusal and fallback behavior.

Changes

  • Add a request-scoped SavedMeshLimits option and preserve the other reader budgets.
  • Exercise explicit and legacy limits, fallback, and cancellation through the public Rust attach API.

Testing

  • Passed the local contributor gate with tools/check-local.sh and the Rust 1.87 all-targets check.
  • Ran the integration tests on Autodesk's 2023 Structural Basic and Architectural Basic sample projects. The structural sample attaches 77 Saved bodies at 20,291 field values and 94 at 20,292. The latter matches the entire legacy IFC model and attach report. A one-value budget keeps the normal fallback on the architectural sample. Repeated calls and a cancellation retry reproduce their reference results. The samples are Autodesk downloads used under the publisher's terms. Pinned public sample list
  • Verified byte-identical default IFCs and diagnostics against stock main on both Autodesk samples and VTT's public BIM4LCA concrete housing project (CC BY-SA 4.0). The stock and candidate reports against Revit's own BIM4LCA IFC match. The contributor gate passes the witness contract tests. BIM4LCA reference manifest

Put the two Autodesk samples in a local directory as 2023-rstbasicsampleproject.rvt and 2023-racbasicsampleproject.rvt.

RVT_SAMPLE_PROJECTS_DIR="$samples" cargo test --locked --profile ci --test integration -- saved_mesh_limits::

Performance benchmark applicability is N/A.

Audit-honesty checklist

  • Public API docs describe the per-graph limit and fallback.
  • The user-visible option has a changelog fragment.
  • The commit message describes the change and its reason.
  • The proposed changes contain generic code and public sample test references.

A reverse-engineering report or new format fixture is N/A.

Legal and contribution hygiene

  • This contribution is offered under Apache-2.0.
  • The implementation uses the existing public reader code and its graph-limit behavior.
  • Public sample tests use external downloads. The contribution contains source and test code only.

Breaking changes

None.

Screenshots or output samples

N/A. The testing section records the public sample results.

Related issues

Refs #2085.


See CONTRIBUTING.md for the contributor gate and fixture guidance.

Allow callers to budget field values per Saved graphics graph while
preserving the default attach behavior and fallback. Cover request limits
and cancellation on public Autodesk sample projects.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant