Skip to content

feat(ifc): decode standalone Revit 2020 family revolutions as analytic solids - #1632

Merged
DrunkOnJava merged 1 commit into
DrunkOnJava:mainfrom
BIM4GIB:research/curved-revolutions-2020
Nov 10, 2026
Merged

DrunkOnJava merged 1 commit into
DrunkOnJava:mainfrom
BIM4GIB:research/curved-revolutions-2020

Conversation

@BIM4GIB

@BIM4GIB BIM4GIB commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Decode a standalone Revit 2020 family's positive revolution from its saved
profile, axis and angles, and export an analytic IfcRevolvedAreaSolid through
the normal IFC command. Four fixtures are supported: REV-A, REV-B, REV-BT
(line profiles, including partial and tilted sweeps) and ARC-A (full torus),
confirmed by Revit's own IFC. ARC-B and ARC-BT remain research/refusal fixtures.

Motivation

Turn the RE-391 findings into bounded decoding and export coverage. The driven
line/arc reader is shared with extrusions; existing project-instance and
family-extrusion behavior is preserved.

Changes

  • Shared sketch-curve selection and typed revolution decoding, with unsupported
    or ambiguous records and disconnected profile joins refused.
  • Analytic IFC profiles and placement, native ElementId tags and body diagnostics.
  • Discover RevolutionElem ids before decoding sketch graphs, avoiding unused
    sketch decoding and false revolution-budget notes in families without revolutions.
  • Pin the unchanged public fixture package and member hashes in
    research/family-revolutions-measure.tsv
    for the maintainer's separate Measure integration.
  • Native-file CLI checks, independent geometry replay, three evidence reports
    (RE-392–394), capability documentation and one changelog entry.

Testing and reproduction

Fixture download: six synthetic Revit 2020 families.
family-revolutions-revit2020-v2.zip contains six MIT-licensed synthetic RFAs,
native references, a hash manifest and REPRODUCE.md with pinned dependencies
and build commands. SHA-256:
6d68bedd29224158c2783fd66ae3072d7f4d931a68540db68856ee12587912c7.

Checked source: 9505df6fea25.

From this PR's source, after that setup:

python tools/oracle/runner/revolutions/verify_package.py --bin-dir target/ci --fixtures EXTRACTED_PACKAGE --output NEW_RESULTS_DIRECTORY
  • All four replay stages pass: byte evidence, native references, compiled
    reader/refusal controls and actual analytic IFC export. No Revit is needed.
  • Four supported exports pass schema/EXPRESS, placement, closed topology and
    fixed 0.3048 mm sampled-distance / 0.01% volume limits and are byte-identical
    to the previous head. ARC-B and ARC-BT export no body and record an explicit
    partial-arc refusal.
  • Required local gates pass, including 302 integration checks with both fixture
    folders configured, 27 doc tests and 15 MCP checks.
  • Supplementary regression: 23 existing files / 46 default and
    --family-extrusions exports are byte-identical. Those sample models are not
    dependencies of the six-fixture replay.
  • Hosted CI and the required full Measure/witness comparison remain pending;
    no witness verdicts have been refreshed. Performance benchmark: N/A.

Scope and known limitations

One visible positive revolution, one closed convex profile clear of the axis,
in a standalone 2020 family. Project instances, combined forms, voids, mixed
line/arc profiles and other releases have no new measured coverage. Mapped-type
quality modes still refuse the unclassified body.

Profiles containing arcs are exported only for a full turn. The captured native
IFC for ARC-B disagrees and ARC-BT times out, so neither is exported. Their native
face/projection captures remain research leads, not export confirmation.
Surface checks are sampled, not whole-surface proofs.

Audit-honesty checklist

  • README, status/support matrix, dated evidence and changelog reflect the
    final behavior and its limits.
  • Fixture cleanup was checked by native save/reopen with unchanged geometry;
    file hashes and byte offsets describe the cleaned archive.
  • No private paths, personal emails, installed sample models or private
    journal/launch orchestration are included.

Legal and contribution hygiene

  • Code is licensable under Apache-2.0; authored fixture data is MIT.
  • Sources are synthetic file bytes, existing clean-room readers, public API
    authoring/oracles and IFC specifications. No proprietary implementation,
    decompiled internals, ODA source or NDA material was used.

Breaking changes

None to stable APIs or CLI. The research API remains behind unstable-research.

Output sample

From the 9,051-byte ARC-A export; two profile arcs and a full analytic turn:

#165=IFCINDEXEDPOLYCURVE(#164,(IFCARCINDEX((1,2,3)),IFCARCINDEX((3,4,1))),.F.);
#163=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,$,#165);
#166=IFCREVOLVEDAREASOLID(#163,#157,#160,6.283185307179586);

Related issues

Refs #156 and Discussion #393; follows RE-391 / PR #1628. Credit STE1200's team
for the sketch-to-solid approach described in Discussion #112.

@BIM4GIB
BIM4GIB marked this pull request as ready for review November 10, 2026 14:10
@BIM4GIB
BIM4GIB requested a review from DrunkOnJava as a code owner November 10, 2026 14:10

@DrunkOnJava DrunkOnJava left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this: the reader is careful (it refuses voids, flipped or repeated records, filled arcs, holes, bridged gaps and every angular range it has not measured), the exporter writes an analytic IfcRevolvedAreaSolid instead of a mesh, and the reports say plainly where Revit's own IFC disagrees. I read all of src/ (head 4222a89, full / CI passed and semver checks pass on it). One change is needed before this can land, and two smaller ones.

Blocking: leave out a revolution whose profile holds an arc and whose sweep is less than a full turn.

The project's rule for a new body is that it lands when bytes on files CI can fetch plus Revit's own export (or a saved mesh) confirm it; a capture made by running the Revit API is a lead, not a measurement. Split the six fixtures by what confirms each:

Fixture Confirmed by
REV-A, REV-B, REV-BT (line profile; full, 30-120 degrees, tilted) Revit's own IFC (RE-391) lands
ARC-A (full torus) Revit's own IFC (RE-392: 0.017 mm, 0.0075 % volume) lands
ARC-B (partial) your face captures only; Revit's own IFC differs by 141 mm and 25 % volume no
ARC-BT (tilted partial) your face captures only; Revit's IFC has no verdict (tessellation over 120 s) no

So the ask is a refusal, in revolution() or in the exporter's analytic_shape, of a profile with an arc when end - start is not a full turn, with the reason recorded as the skipped note, and RE-394's "All six pass" table saying that ARC-B and ARC-BT are not exported. That keeps all four fixtures Revit's export confirms, and ARC-B and ARC-BT stay in your evidence as the lead they are: your analytic body may well be right where Revit's export is wrong, which is worth a report of its own, but rvt-rs does not write a body that Revit's own export contradicts until something Revit exports or saves confirms it. Update docs/support-matrix.json's notes and the status page to the narrower scope.

A second route that needs no Revit API: if an RFA's own bytes hold a saved display mesh for the revolution that native_saved_mesh can read, scoring your body against it is the confirmation the rule asks for, and would let the partial arc cases back in. If you find one, say so and we will look at it together.

Smaller, please fix in the same push

  • attach counts CurveElem, SketchPlane and VarSketch records against the 2000-record budget and decodes every one of their graphs before it knows the family has a RevolutionElem. A 2020 family with many sketch curves and no revolution therefore gets a false FamilyRevolutionsSkipped note, and every default export of a 2020 family pays for decoding curves it will not use. Collect the RevolutionElem ids first and decode the curve records only when one exists.
  • Coverage: no model in CI or Measure exercises the new path, because the six fixtures live on your fork's release and the CLI checks skip without the environment variable. A pinned entry for the package (URL and SHA-256, as research/bim4lca-measure.tsv does for the office) would let Measure fetch and score it. If you would like that, say so and I will wire the Measure side.

After your push I will run Measure unfiltered with families=true on the new head, since this touches the shared curve reader as well as the new path, and approve once it reads clean.

…c solids, full-turn arc profiles and line profiles only (DrunkOnJava#156) (RE-392) (RE-393) (RE-394)

Rebased onto main and squashed by the maintainer from BIM4GIB's two commits (4222a89, 9505df6f); the one conflict was the addenda at the end of docs/format-reconnaissance.md, both kept.
@DrunkOnJava
DrunkOnJava force-pushed the research/curved-revolutions-2020 branch from 9505df6 to db7f04a Compare November 10, 2026 17:28
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 10, 2026 17:52

@DrunkOnJava DrunkOnJava left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you: the three points are done. Partial revolutions with an arc profile are refused with a recorded reason (ARC-B and ARC-BT stay as evidence), the revolution candidates are found before any sketch curve is decoded, and the fixture package is pinned in research/family-revolutions-measure.tsv. I rebased and squashed this onto main through maintainer edits (the one conflict was the addenda at the end of docs/format-reconnaissance.md, both kept). Measured on the rebased head db7f04a2: an unfiltered Measure against main (131 models) moves no export and no scorer, and a Measure with --family-extrusions on the 10 models that hold family extrusions moves none (the shared curve reader is unchanged in what it writes there). The new path is exercised by the six pinned fixtures only; no Measure model has a standalone revolution family yet, which is the next step for the pinned package.

@DrunkOnJava
DrunkOnJava merged commit 84e6994 into DrunkOnJava:main Nov 10, 2026
38 checks passed
DrunkOnJava added a commit that referenced this pull request Nov 10, 2026
… request has (#1639)

## Summary

A new CI step in the PII guard job, `tools/ci/check_re_id_reuse.py`,
fails a pull request that adds a report (`reports/**/RE-NN-*.md`) whose
id another report of the merged tree already has, or that an earlier
open pull request (a lower number) also adds. The later pull request
fails, as `docs/maintaining.md` already says it is renumbered. Griffin
asked for it through the project questions on 2026-11-10.

## Motivation

On 2026-11-10 two pull requests carried an RE-392 before either was
opened, and a contributor's pull request took an id another was about to
use: renumbering after both land means rewriting the code, probes and
changelog entries that cite it. The rule existed on paper
(`reports/README.md`, `docs/maintaining.md`); nothing enforced it.

## Changes

- `tools/ci/check_re_id_reuse.py`: reads the reports a pull request adds
from the API's file list (a report it only edits or renames is not new),
looks for another path with the id in the checked-out tree (the merge of
the pull request into `main`, so that is `main`'s, or the pull request's
own second file), and for an earlier open pull request adding the same
id. API failures are NOT MEASURED warnings, as `cited-commits.py` does,
never red. A push checks nothing.
- `.github/workflows/ci.yml`: the step, after the API docs step, with
`GH_TOKEN`, and a step for the pure tests.
- `tools/ci/test_check_re_id_reuse.py`: ten failure-first cases of the
pure rule (an id on main at another path, two new reports under one id,
an earlier open pull request, a fresh id, the pull request's own file,
`RE-12.md`, `RE-3` against `RE-30`, non-report paths, a subdirectory, no
new report).
- `docs/maintaining.md`, `reports/README.md`: say that CI enforces it.

## Testing

End to end against the real API and a real checkout, from a scratch
worktree of `main` (the pure rule also has the failure-first tests this
repository keeps for its CI scripts,
`tools/ci/test_check_re_id_reuse.py`, run in the PII guard job: a pure
helper, ten cases):

- [x] PR #1620 (adds RE-385, no earlier open pull request): passes, "the
1 new report(s) of #1620 take ids that main and the earlier open pull
requests do not have".
- [x] The same with a tracked `reports/element-framing/RE-385-other.md`
added to the tree: `::error::RE-385 is already the id of
reports/element-framing/RE-385-other.md on main: take the next free id`,
exit 1.
- [x] A pull request numbered 1639 whose files are stubbed to add
`RE-385-dup.md`, against the real open pull requests: `::error::RE-385
is also added by #1620, opened first (...)`, exit 1.
- [x] A push event: "not a pull request, nothing to check", exit 0. A
pull request that adds no report (#1638): "adds no report", exit 0.
- [x] The pure rule (`reused`) tried against nine cases: an id on main
at another path, two new reports under one id, an earlier open pull
request, a fresh id, the pull request's own file in the merge tree, a
`RE-12.md` name, non-report paths, `RE-3` against `RE-30`, a
subdirectory report. All as expected.
- [x] `actionlint` and a YAML load of `ci.yml` pass; the new file has
the mode of its neighbours.

## Audit-honesty checklist

- [x] No user-visible change: no changelog fragment.
- Limits: a pull request that adds a report with an id main does not
have and that no other open pull request has passes even if a draft
claim exists elsewhere (a claims file is not read); a closed-unmerged
pull request's id is free; only the first 100 open pull requests and 300
files per pull request are read.

## Breaking changes

None.

## Related issues

Griffin's 2026-11-10 project questions; follows the RE-392 collision
(#1632, #1637).
DrunkOnJava added a commit that referenced this pull request Nov 10, 2026
…t of models, and fails a family that holds a space (#1632)

A family export now writes ifc.sha256 as a model's does, so the total read
every family as a model with no result and failed the run.
DrunkOnJava added a commit that referenced this pull request Nov 10, 2026
…ed by the length of their parameter range (RE-385) (#1642)

## Summary

`face_grid` in `native_parametric_mesh.rs` steps each profile of a ruled
component by `(range end - range start) / angular step`, then takes the
larger of the profiles' steps. For an arc or an ellipse whose parameter
range runs the other way (end below start), that quotient is negative,
`n.max(..)` ignores it, and the grid is coarser than the profile's
curvature needs, with no error. This takes the length of the range
(`.abs()`), as the revolution reader of #1632 does for arcs.

## Motivation

rvtDevelop's read of #1620 (RE-385) named it as the one thing to harden:
nothing in the measured models shows a reversed range, so nothing
changes there; the grid bound the reader states ("the angular step of
its radius across an arc") would otherwise not hold for one.

## Changes

- `src/research/native_parametric_mesh.rs`: the arc and ellipse step
counts of a ruled component's profiles take `(r[1] - r[0]).abs()`.

## Testing

No unit tests (banned); the change is measured end to end.

- [ ] Measure unfiltered against `main` (the run for this head): every
export byte-identical and no scorer moves is the expectation, since no
measured model holds a reversed range; the run's numbers follow in a
comment.
- [x] rustfmt passes on the file.

## Audit-honesty checklist

- [x] No user-visible change that any measured model shows: no changelog
fragment. A model whose arc runs the other way would draw a finer ruled
surface than before; none is known.

## Breaking changes

None.

## Related issues

Follows #1620 (RE-385).
DrunkOnJava added a commit that referenced this pull request Nov 10, 2026
…pins BIM4GIB's six revolution families (#1644)

## Summary

Measure now exports each family it reads (the 12-release phi-ag corpus
and the makers' public families) and hashes the export as it hashes a
model's (`ifc.sha256`), so a change that moves what a family writes is
listed by the comparison of the two sides. The six synthetic Revit 2020
families of #1632 are pinned in `research/public-families.tsv` beside
them, so the standalone-revolution export that landed there is exercised
by Measure and any later change that moves it shows.

## Motivation

#1632's fixtures live on its author's fork release and no CI or Measure
model exercised the revolution path (the review counted 0 models).
Measure read a family only with `rvt-info`, so no export of a family was
ever compared between two commits. This closes both with the pinned
package #1632 already carries
(`research/family-revolutions-measure.tsv`).

## Changes

- `tools/ci/measure-reference-models.sh`: `measure_family` also runs
`export_ifc` and writes `ifc.sha256` (the IFC without its `FILE_NAME`
and `IfcOwnerHistory`, as for a model); the export is dropped unless
`KEEP_IFC`.
- `research/public-families.tsv`: six rows (`bim4gib-REV-A-2020.rfa` to
`bim4gib-ARC-BT-2020.rfa`), the zip, its sha256 and size and each
`.rfa`'s, from #1632's pin.
- `.github/workflows/measure.yml`: the `families` input's description
says so.

## Testing

No unit tests (banned); a real Measure run with the change:

- [x] Measure
[42876869483](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42876869483)
(`families=true`, base `main`, the code of `main` on both sides, the
scripts of this branch): 19 families have an `ifc.sha256` on each side
(the 12 phi-ag, the Stertil 2014 family and the 6 revolution families,
whose zip's sha256 and size and each `.rfa`'s were checked by the fetch
script), every export exits 0, and the comparison lists 0 exports moved,
as expected for one code state. The six revolution exports: REV-A,
REV-B, REV-BT and ARC-A write the analytic solid #1632 landed; ARC-B and
ARC-BT are refused and write no body, as #1632 states.
- [x] `shellcheck` and `bash -n` pass on the script; `actionlint` and a
YAML load pass on the workflow.

## Audit-honesty checklist

- [x] No user-visible change: no changelog fragment.
- Limits: a family export that exits non-zero is recorded in its
`rvt-ifc.log` and does not fail the run, as for a model; the six hashes
say the export did not move, not that it is right (#1632's own replay
checks that); the families shard is run only with `families=true` and on
a pull request to the workflow.

## Breaking changes

None.

## Related issues

Follows #1632 (the fixtures' pin) and the review's coverage note.
@DrunkOnJava DrunkOnJava mentioned this pull request Nov 11, 2026
4 tasks done
DrunkOnJava added a commit that referenced this pull request Nov 11, 2026
## Summary

Release 0.18.0. Everything merged since 0.17.0 (61 pull requests, `main`
at 979ec42): every element that would be a bounding box drawn from the
mesh Revit saved for it by default on Revit 2023 to 2027, roofs,
railings, instances and curved surfaces read for it, railings aggregated
under their stairs, the quantities and properties of the bodies drawn
from meshes (walls, mullions, panels, roofs, floors, openings, round
columns), four more "Export to IFC As" values, unique type GlobalIds,
standalone family revolutions, a reason on every box that stays one
(#1645), and a cut in the saved-mesh pass's peak memory on large files
(#1690), with a part that remains (#1694). puzzbobb's #1620 and #1633
and BIM4GIB's #1628 and #1632 are credited in the introduction.

The release's own Measure found a cost #1191 had not disclosed: the
default export of a Revit 2023 to 2027 file took 1.4 to 4.4 times the
peak memory of 0.17.0 (Core Interior 305 to 647 MiB, Snowdon Towers
Architectural 1,072 to 3,964 MiB). #1691 cut the large files' share
without changing a body (Core Interior 437 MiB, Snowdon Towers
Architectural 2,086), and what is left is 1.1 to 1.9 times the time and
1.4 to 4.4 times the peak memory on Autodesk's samples of Revit 2023 to
2027, the most on the small `rac_basic` samples (200 to 875 MiB), which
#1691 did not move. The notes, README, docs and help text state the
measured figures, and #1694 tracks the rest. The project owner was shown
these figures before the release was armed and chose to tag with them
stated (2026-11-11).

## Changes

- Version 0.17.0 -> 0.18.0 in:
  - Cargo.toml;
  - rvt-py/Cargo.toml and its `=` pin;
  - rvt-mcp/Cargo.toml and its `=` pin;
  - rvt-wasm/Cargo.toml;
  - tools/stream_evidence/Cargo.toml's pin;
  - viewer/package.json;
  - CITATION.cff (version and date);
  - Cargo.lock and fuzz/Cargo.lock.
- `python3 tools/release/changelog.py assemble`: 42 fragments go into
`[0.18.0]`, with an introduction, what is not measured, the measured
bullets and "Upgrading from 0.17"; #1690's entry arrived after the
assembly and is written into `[0.18.0]` Fixed by hand.
- README: the latest release, the "Upgrading from 0.17" and "after
0.18.0" fragments sentence, and two sentences that still described roofs
on Revit 2023 to 2027 and the saved-mesh default as limited to family
instances (`docs/evidence.md` row likewise).
- The Core Interior witness observations and verdicts, and the synthetic
fixtures, from this pull request's CI run 42949885323: only
`witness_version`, the verdict hashes and the fixtures' version strings
differ.
- The measured cost of the saved-mesh default replaces #1191's first
figures (24.4 s and 1,423 MiB against 21.2 s and 913, "1% to 17% more
time and up to 59% more peak memory"): the changelog, README,
`docs/python.md`, `docs/release-1.0-criteria.md`,
`docs/support-matrix.json`, the `--no-saved-meshes` help text of
`rvt-ifc` and `rvt-gltf` and the module doc of `src/ifc/saved_meshes.rs`
quote Measure run 42956917709; the viewer's wasm memory in the changelog
and `docs/viewer-api.md` is Deploy viewer run 42957158734 on `main` at
979ec42 (Core Interior 308 to 383 MiB, not 324). The source changes are
help text and doc comments only.

## Testing

- `python3 tools/ci/release_preflight.py check --event workflow_dispatch
--ref-type branch --ref-name chore/release-0.18.0 --sha HEAD`: ok,
version 0.18.0.
- `python3 tools/release/changelog.py check`: ok. `rustfmt --edition
2024 --check` on the three Rust files: ok.
- The release's baseline Measure, `main` at 8334726 against v0.17.0
with every flag, the held-out models and timing: run
[42949360321](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949360321),
read into the changelog's "Measured against 0.17.0" bullets; #1691 moves
no export, run
[42954375538](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42954375538).
- The timing of the final code: run
[42956917709](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42956917709),
v0.17.0 against #1691's head (the same source as `main` from 979ec42:
`git diff --stat` over src, Cargo.toml and Cargo.lock is empty), one
runner per file, the median of three exports, 58 files.
- The dry run RELEASE.md step 7 asks for: `publish.yml` dispatched on
this branch at b001cb3, [run
42949890449](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949890449),
every job green (the wheels installed and opening a model, `cargo
install` with the CLI sample, the docs.rs preview, the viewer load
smoke), and again at bd6875d after #1691 and the notes: [run
42959626601](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42959626601);
the head since moved two commits that change CHANGELOG.md only: 4762e14
(the table's own minimum peak ratio, 1.42, an introduction sentence on
the cost, a bullet's lead) and 13373e7 (every cost reads from 0.17.0's
figure to 0.18.0's). Nothing was published.
- The same-project gates, which `arm.sh` needs on a commit holding the
PR's edits under `src/` (help text and doc comments only): Measure run
[42961127420](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42961127420)
on 4762e14, `samples=true`, default scorers: pass, 15 samples held to
their earlier saves and the Areas on 4 saves and on the 2021 save.

Unit tests: N/A.

## Audit-honesty checklist

- [x] Each entry keeps its caveats; the introduction lists what is not
measured.
- [x] The saved-mesh cost is the measured one, with what is still above
0.17.0's named (#1694).
- [x] No emojis, private paths or PII.

## Legal and contribution hygiene

- [x] Apache-2.0. No Autodesk source, internals or NDA material.

## Breaking changes

The saved-mesh default and its library names
(`SavedMeshChoice::Default`, `saved_meshes::default_scope`, new
`SavedMeshChoice::DoorsAndWindows`), listed under "Upgrading from 0.17".
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.

2 participants