Skip to content

W6: draw family instances from their saved meshes by default (decode the remaining saved-graphics faces) #1191

Open

Description

@DrunkOnJava

Summary

Loadable families other than doors and windows (furniture, fixtures, equipment, MEP devices and others) were written as their bounding box unless rvt-ifc --saved-meshes was given. With the option, the mesh Revit saved for each element's display is drawn, and it is Revit's own shape wherever all of it decodes. Since #1610 (the maintainer's decision of 2026-11-09, "All classes, whole meshes only") every boxed element of a Revit 2023 to 2027 file is drawn from its saved mesh by default, with --no-saved-meshes to keep the boxes. W6 of the 1.0 release criteria asks that no body be a bounding box.

Where things stand

Done when

  • The faces the reference models' saved graphics use decode, so that a mesh is drawn wherever Revit saved one.
  • Each class's meshes are measured against Revit's own export, every vertex within the tolerance the report states, and the supported profile says which classes are not exact and why (the maintainer drew them by default regardless, 2026-11-09).

Where to start

src/ifc/saved_meshes.rs, src/research/native_saved_mesh.rs and src/research/native_parametric_surface.rs, with tools/re/box_bodies_vs_ifc.py, which counts in Measure the bodies still drawn as their box per class.

Activity

  1. added
    area:geometry
    priority:P1
    type:feature
    on Oct 30, 2026
  2. n3ur0m4n commented on Nov 7, 2026

    @n3ur0m4n
    Contributor

    Measured on the public reference models in _project_corpus, v0.15.0 (ab5f8e1) against the same tree with five more
    saved-graphics decoders (spline profiles GHermiteSpline/GNurbSpline, HermiteSurf, nonrectangular parametric trims,
    cylinder faces with several trim loops, edge ends that miss in UV but meet in model space).

    Default export (doors and windows from saved meshes): byte-identical glTF on all six models. No door or window moves.

    --saved-meshes, tools/re/saved_meshes_vs_ifc.py (box within 0.01 ft of Revit's export):

    model v0.15.0 with the decoders
    RE1-Architecture 53 / 53 54 / 54 (+1 IfcSanitaryTerminal)
    RE1-Electrical 47 / 47 49 / 49 (+2 IfcBuildingElementProxy)
    RE1-Mechanical 68 / 68 68 / 68
    RE1-Plumbing 60 / 60 60 / 60

    tools/re/box_bodies_vs_ifc.py: record-box bodies RE1-Electrical 2 → 0, RE1-Architecture 4 → 3.

    Vertex distance to Revit's IFC mesh (ft, reference→ours / ours→reference) for the three bodies that change:

    element v0.15.0 with the decoders triangles (ours / Revit)
    369643 shower head box: 0.250 / 0.759 0.0007 / 0.0101 15,744 / 2,180
    872430 fire panel box: 0.049 / 0.028 0.0033 / 0.0070 69,540 / 29,610
    925565 BAS panel box: 0.049 / 0.028 0.0029 / 0.0079 36,048 / 34,668

    Saved-graphics decode (every element, not only exported bodies): +16 elements with no diagnostic, none lost; elements
    already clean keep identical vertices (26 drop only zero-area triangles). Cost: RE1-Electrical .glb 0.18 → 1.9 MB,
    export 1.2 → 2.0 s; the other models unchanged in size and time.

    Still open on these models: GEllipse profiles (2024_Core_Interior 34471/34930), four "disconnected UV boundary" faces
    in RE1-Architecture. Not measured on the BIM4LCA office (not available to us).

    The change is one commit on v0.15.0 (ab5f8e1), branch saved-graphics-decoders, commit 8069fb9f; cargo test --features unstable-research passes. Happy to compare before anything lands, or to open a PR if you want it.

  3. DrunkOnJava commented on Nov 8, 2026

    @DrunkOnJava
    OwnerAuthor

    @n3ur0m4n thanks, this is useful, and a default export that stays byte-identical makes it easy to take in pieces. Yes, please open pull requests, one decoder per pull request so each can be measured alone, smallest first. I'll run Measure on each head with --saved-meshes on the BIM4LCA office, which you can't reach, and post the figures.

    Three things each one should address:

    1. Prior negatives. RE-302 and RE-305 measured cylinders with holes and parametric faces trimmed by any single loop, and left them off main because the bodies they drew weren't Revit's. Your "cylinder faces with several trim loops" and "nonrectangular parametric trims" overlap those, so those two need to say what's different now, ideally that the bodies that failed in those runs pass.
    2. The bar. A saved mesh is judged by Revit's vertices lying within 0.001 ft of our surface. In your table 369643 passes at 0.0007 ft, but 872430 and 925565 are at 0.0033 and 0.0029 ft. Please say whether that's tessellation or shape; tools/re/saved_meshes_vs_ifc.py's fine tessellation (-f fine_mesh=true in Measure) can separate the two where both files write curves.
    3. Cost. RE1-Electrical's .glb goes from 0.18 to 1.9 MB, and 369643 is 15,744 triangles against Revit's 2,180. Please report triangle counts and size per pull request, and choose the chord tolerance by distance to Revit's export, as we discussed on feat(saved-graphics): mesh cone faces, spline-profile surfaces and cylinder faces with non-rectangular trims #1144.

    These only change opt-in --saved-meshes output, so a decoder that meets the bar can land without touching what the default export draws. GEllipse and the disconnected UV boundaries can stay out until there's a measurement for them.

  4. DrunkOnJava commented on Nov 9, 2026

    @DrunkOnJava
    OwnerAuthor

    @n3ur0m4n, one change that affects how your decoders are measured. #1610 makes saved meshes the default for every class on Revit 2023 to 2027 (the maintainer's decision of 2026-11-09, with --no-saved-meshes to keep the boxes), so a decoder that meets the bar now changes the default export, not only --saved-meshes.

    The three things I asked of each pull request stand, measured on the default export instead: the bar is still Revit's vertices within 0.001 ft of our surface ("ref on ours"), the figures are still triangles and size per pull request, and I run Measure on the BIM4LCA office. What changes is the cost of getting it wrong: a body that is not exact is now drawn by default where it used to be a box, so a decoder that moves a class from exact to not exact will not land. #1610 and #1191's body have today's per-class numbers (17 classes exact over 31 models; sanitary terminals, flow fittings, flow terminals and walls are not).

  5. 54 remaining items

  6. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    Rows 3c and 3d, read on 43533924030 (c0f682b0).

    3c holds, and it ends the railing question for these two. The record of r2025's railing 13680 holds one InstanceInfo; its symbol 13681 holds the 12 faces (8 HermiteSurf, 4 Plane) and no InstanceInfo or GInstance. 13684's chain (13685) is the same. So the 54 of 630 vertices of Revit's body that no face drawn explains are not in the railing's saved graphics at all, and a body drawn from them cannot meet the 0.001 ft bar.

    3d, for the office's railing 3076853, is different and not settled. Its symbol 3076854 holds 20 faces (16 HermiteSurf) and 103 nested InstanceInfo. Of Revit's 1,651 vertices of it, 1,519 are within 0.001 ft of the body drawn (92.0%), 1,540 within 0.005 ft, and 71 are over 0.05 ft away, the farthest 0.1275 ft. Which of the 103 nested symbols hold those 71, or whether any does, is the next thing to read.

    What Revit's rail looks like where the faces stop explaining it: at one station of one r2025 rail (0.25 ft wide, 0.1667 deep), Revit's body has vertices at the centre of the top and bottom faces and, at the two sides, at 0.0442 and 0.1643 ft up, which is 0.081 ft above the top face the 4 faces draw, at about every third station. The faces are right where they are (the twist and the interiors, above), and Revit's rail is taller than they are at those places.

    RE-460 section 7 has the rows and the tables. #1941 stays a draft: nothing of it lands or is on by default until a railing's whole body is within the bar, and for the r2025 railings the saved graphics cannot supply it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:geometrypriority:P1type:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions