Title: ifcgeom: bounding-box broad-phase for the wire self-intersection check (#5999) by petruconduraru · Pull Request #8461 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: ifcgeom: bounding-box broad-phase for the wire self-intersection check (#5999) by petruconduraru · Pull Request #8461 · IfcOpenShell/IfcOpenShell
X Title: ifcgeom: bounding-box broad-phase for the wire self-intersection check (#5999) by petruconduraru · Pull Request #8461 · IfcOpenShell/IfcOpenShell
Description: Fixes #5999. Problem On advanced b-rep / DTV models, importing is slow, bisected to the reintroduction of the wire self-intersection check. In wire_intersections(), wires with n <= 64 edges run an exhaustive O(n^2) inner loop, and each pair constructs a GeomAPI_ExtremaCurveCurve over the underlying (often NURBS) curves. That extrema computation dominates. The n > 64 path already prunes with a bounding-box broad-phase via the spatial tree; the small-n path had no broad-phase at all. Fix Precompute one Bnd_Box per edge, enlarged by the intersection tolerance eps (the same padding the tree path uses), and continue before the extrema construction when two edges' padded boxes are disjoint (IsOut). Disjoint eps-padded boxes cannot contain a qualifying crossing, so the set of detected self-intersections is identical; only the cost of the far-apart pairs is removed. Verification Correctness mirrors the already-accepted box filtering of the n > 64 branch. Bnd_Box and BRepBndLib are already used in this file, so no new includes. Not perf/build-tested (no local kernel build); compilation is covered by CI's build-ifcopenshell. Generated with the assistance of an AI coding tool. Rebased onto v0.9.0 (the file is now wire_utils.cpp in ifcopenshell::geom::util); one commit, same change.
Open Graph Description: Fixes #5999. Problem On advanced b-rep / DTV models, importing is slow, bisected to the reintroduction of the wire self-intersection check. In wire_intersections(), wires with n <= 64 edges run ...
X Description: Fixes #5999. Problem On advanced b-rep / DTV models, importing is slow, bisected to the reintroduction of the wire self-intersection check. In wire_intersections(), wires with n <= 64 edges ...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8461
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
| 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:758c330f-fd39-718c-3f61-82921ee2f357 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 993E:F8826:5ECE80:7DE28C:6B04C488 |
| html-safe-nonce | 1a0412b0f5e96aa5a416e71a4b098fb598a01a30e7ffacd90c6b9bc3b6f25da3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTNFOkY4ODI2OjVFQ0U4MDo3REUyOEM6NkIwNEM0ODgiLCJ2aXNpdG9yX2lkIjoiNDczMjczMzk3NDAzOTAyMDY4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ac8bbade82e5000e1b1e9daab7c8025b5f1e219d721b2260dff8f29bf82d2e57 |
| hovercard-subject-tag | pull_request:4029431663 |
| 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/8461/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 | Fixes #5999. Problem On advanced b-rep / DTV models, importing is slow, bisected to the reintroduction of the wire self-intersection check. In wire_intersections(), wires with n <= 64 edges run ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| 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