Skip to content

IfcDistributionPort has no placement: Revit's export places each port at its connector #847

Closed

Description

@DrunkOnJava

rvt-rs writes every IfcDistributionPort with no placement: its ObjectPlacement and Representation are $ (src/ifc/step_writer.rs, the IfcEntity::Port arm; the entity carries no position). Revit's export places each port at its connector, relative to its element. On RE1 Mechanical, all 150 ports have one:

#2460=IFCDISTRIBUTIONPORT('0azcsfWNWytH8TYDWLiZbU',#18,'InPort_441892_0','Flow',$,#2459,$,.SINK.);
#2459=IFCLOCALPLACEMENT(#1612,#2458);

#1612 is the element's own placement and #2458 the connector's position and direction in it.

What is known:

  • A duct's or pipe's connector entries hold each end's point, keyed by the element connected there and its connector index (RE-131). So a duct's or pipe's two end ports have positions that are read already.
  • A family instance's connectors (RE-169, from its symbol's m_arrConnectorData) are placed in its family's coordinates, which rvt-rs does not read. Their positions are not decoded.

What would close this: a placement for each port whose connector position is decoded, relative to its element's placement as Revit writes it, measured against Revit's export of the RE1 models by name (position within a tolerance, and the port's axis). A port whose position is not decoded keeps no placement rather than a guessed one.

Split from #528, whose acceptance (ports and connections, with per-model counts against Revit's export) is met. A port's direction, system classification and description are #834.

Activity

  1. added
    area:elements
    area:ifc
    priority:P3
    type:feature
    on Oct 19, 2026
  2. DrunkOnJava commented on Oct 20, 2026

    @DrunkOnJava
    OwnerAuthor

    Measured where Revit's export places a pipe's ports against rvt-rs's pipe (research branch re/847-port-places, scorer tools/re/port_places_vs_ifc.py, Measure run 39369702158). rvt-rs draws a pipe from the first end its connector entries give to the second (RE-131). For each of Revit's (In|Out)Port_<ElementId>_<index> on such a pipe, the scorer says which end the port lies at, within 0.01 ft:

    model ports index 0 at index 1 at
    RE1 Plumbing 124 on 63 pipes first end 54, second end 7 second end 56, first end 7
    RE1 Mechanical 62 on 31 flow segments first 11, second 2, neither 18 second 11, first 2, neither 18
    • "Connector i is end i" is not a rule. It holds on 110 of the 124 plumbing ports. 7 pipes have their two ports the other way round, because rvt-rs orders a pipe's ends by where it meets their entries in the partition, not by connector index. Placing ports by that order would put 14 at the wrong end, so nothing is placed yet.
    • What a rule needs: each end's entry key. The entry before an end's point holds an ElementId and a connector index (RE-131's layout). Where it names the pipe itself, the index is the pipe's own connector. Where it names the element joined there, the join list (RE-138) gives the pipe's connector at that join. partition_pipe_axes reads the points and drops the keys. Keeping them is the next step.
    • Mechanical: the 18 ports at neither end lie 0.49 to 1.32 ft from the nearer end. They are on flow segments rvt-rs draws other than as Revit's axis (ducts), so ducts need their own ends first.
    • Port axis: Revit's port Z axis points along the pipe at that end, outward on 67 of the 124 plumbing ports and inward on 57. So a port's direction comes from something else too; it may follow its In/Out naming (A port's SystemType (its connector's system classification) and an electrical port's Flow=Source/Sink description are not written (RE-212 follow-up) #834).
  3. 7 remaining items

  4. DrunkOnJava commented on Oct 20, 2026

    @DrunkOnJava
    OwnerAuthor

    #865 closed this for pipes, and #868 does the same for ducts along a model axis. On RE1 Plumbing all 124 of the ports Revit writes on pipes are within 0.01 ft of Revit's, and on RE1 Mechanical all 62 on pipes and ducts. A port's Z axis points out of its segment. Revit points In ports inward, and those wait for a read flow direction (#834). Family-instance ports, whose connectors are in their family's coordinates, are now #869.

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:elementsarea:ifcpriority:P3type:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions