Skip to content

Saved planar triangulation leaves T-junctions at already-used boundary stations #2250

Backlog

Description

@shifatrHtH

Public reproduction

On 1ab34bb3526a6632fb43a4d0690db93a58072f88 (#2248 head), read the following public IFC-ECS RE1 RVT and IFC pairs. The rvt-rs witness registry pins the bytes. The reference IFCs come from the same native saves and were exported with a newer Revit release. The probe uses default Fine 3D visibility, a 2,000,000-value graph budget, and SharedBoundary recovery.

Model and public ElementId Affected Saved carrier One-sided edges, before → after Affected carrier triangles, before → after Whole-element distance to Revit / reverse, ft
RE1 Mechanical 439148 10 planar faces 3 → 0 27 → 28 < 0.000000000001 both ways
RE1 Architecture 351456 16 planar faces 6 → 0 54 → 56 0.00203722 / 0.00189708
RE1 Architecture 352342 16 planar faces 3 → 0 55 → 56 0.00192067 / 0.00194503

The reader reports complete Saved geometry with zero diagnostics throughout. Count directed triangle incidences per carrier after welding at 0.0000001, 0.000000001 and 0.0000000001 ft. All three grids reproduce the counts in the table. The distances above use vertices, triangle centroids and edge midpoints in both directions. The before and after maxima are identical.

Cause and trial

A single planar face can use a stored boundary station in one triangle and leave a longer collinear edge unsplit in another. The existing retain_boundary_points_within skips indices already marked used, so it leaves this T-junction behind. For the mechanical carrier, splitting the longer edge at the already-used station adds one triangle and removes all three one-sided incidences.

The opt-in trial runs immediately after planar boundary-point retention. It considers one-sided triangle edges and already-used boundary indices on the same face, splits at strictly interior stations collinear within 1e-10 ft in physical plane coordinates, and keeps every stored vertex position. It uses the existing triangulated area check and puts a separate bound on the station search. It requires no new graph reads, package dependencies, or public API changes. This is a planar tessellation issue alongside the cylinder loop coverage work in #2248.

A broader scan checks 1,159 selected owners across 23 checksum-verified public RVT/IFC pairs. The opt-in arm changes 74 owner outputs while preserving every selected identity and diagnostic. Of those, 61 already return complete Saved geometry. All 79 changed carriers in those 61 owners close at all three grids, and a repeat produces identical vertex, index and carrier buffers. Twenty-one complete owners meet the 0.0033 ft bidirectional IFC comparison. The other 40 already missed it in the control, and the worst sampled distance in each direction stays identical before and after for every scored owner. The remaining 13 changed owners still report partial geometry.

@oguzhanakk @DrunkOnJava Would you review this as a separate planar-mesh change? I can put the opt-in patch on a draft branch. RE1 Mechanical 439148 is the smallest public Revit-reference witness I found.

Activity

  1. shifatrHtH commented on Dec 3, 2026

    @shifatrHtH
    ContributorAuthor

    I replayed the planar change on upstream main at b201137401d3db88f91b2788c472de5c31544fad, without #2248. It reproduces the same before and after rows as the #2248-head experiment for all 1,159 selected public owners.

    The revised prototype indexes the already-used boundary vertices by physical axis and searches only within the edge's coordinate span. A trial split must preserve the source triangle's winding. Both versions produce the same rows, and all 61 complete changed outputs preserve their original vertex buffers. A standalone observer using the public Saved reader API also reproduces the smallest RE1 Mechanical case: its carrier goes from 27 to 28 triangles and from three one-sided edges to zero at each tested weld.

    This can be reviewed independently of the cylinder-loop PR. The patch and public-only reproducer are ready for a draft if that is the preferred review path.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions