Title: Bonsai: preserve flow direction when splicing a bend into a duct connection by petruconduraru · Pull Request #8733 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: preserve flow direction when splicing a bend into a duct connection by petruconduraru · Pull Request #8733 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: preserve flow direction when splicing a bend into a duct connection by petruconduraru · Pull Request #8733 · IfcOpenShell/IfcOpenShell
Description: Root cause MEPAddBend hardcoded direction="NOTDEFINED" for both new fitting<->segment port connections when splicing a bend into an existing connection between two duct segments. This unconditionally wiped any pre-existing SOURCE/SINK pairing the two segments had, matching the reported "flow is reset". Manually re-establishing the direction afterwards (one connection at a time, via the Ports panel) can easily leave the fitting's own two ports non-complementary (e.g. both effectively inconsistent relative to each other), since nothing ties the two independent per-connection assignments together, which is the reported "reversed in the fitting" symptom. Fix Instead of hardcoding NOTDEFINED, derive the direction for each new connection from the segments' pre-existing FlowDirection pairing via the already-existing direction_from_port_pair helper (the same helper used by split_mep_segment for an analogous "preserve flow across a splice" problem). Each new fitting port takes over the role the other segment used to play, so the fitting's two ports come out correctly complementary automatically, with no manual re-establishment needed. Verification Live, against the reporter's actual attached file: before the fix, splicing a bend into an established SOURCE/SINK pair reset both new fitting ports to NOTDEFINED. After the fix, segments keep their direction unchanged and the new fitting's two ports come out correctly complementary (one SINK, one SOURCE). Confirmed no regression for segments with no pre-existing flow direction (stays NOTDEFINED, byte-for-byte identical to old behavior), and confirmed the re-edit path (e.g. changing a bend's radius, which deletes and recreates the fitting) also preserves direction correctly. Added 3 regression tests against the reporter's actual fixture file, run through the real bim.mep_add_bend operator. Ran the full existing model/system test suites (570 tests): no regressions. Fixes #6278 Generated with the assistance of an AI coding tool.
Open Graph Description: Root cause MEPAddBend hardcoded direction="NOTDEFINED" for both new fitting<->segment port connections when splicing a bend into an existing connection between two duct segments. Th...
X Description: Root cause MEPAddBend hardcoded direction="NOTDEFINED" for both new fitting<->segment port connections when splicing a bend into an existing connection between two d...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8733
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bd9b1998-17e4-8291-aa5e-0cd593e5f589 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D15C:72378:2864FC:35F0F4:6B04B692 |
| html-safe-nonce | 5345164cb2416cfc3f514bc91ef9463fda6563f94130bc4b7434442502c4c5ad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTVDOjcyMzc4OjI4NjRGQzozNUYwRjQ6NkIwNEI2OTIiLCJ2aXNpdG9yX2lkIjoiNjY3MDk2NTY2NDMyNjY2MTc3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 97b366d358cde04f2ee06f0abf645d9355c2c2b38783e80f9a2ae2003ab66db1 |
| hovercard-subject-tag | pull_request:4082765064 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/8733/files |
| twitter:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| og:image:alt | Root cause MEPAddBend hardcoded direction="NOTDEFINED" for both new fitting<->segment port connections when splicing a bend into an existing connection between two duct segments. Th... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b032e77f1ea437ede6c115446a0a467709b468e7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width