Title: serializers: emit IfcClassification associations in XML output by petruconduraru · Pull Request #8768 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: serializers: emit IfcClassification associations in XML output by petruconduraru · Pull Request #8768 · IfcOpenShell/IfcOpenShell
X Title: serializers: emit IfcClassification associations in XML output by petruconduraru · Pull Request #8768 · IfcOpenShell/IfcOpenShell
Description: Fixes #556. Labeled "New contributor? Try this one!" by aothms, who noted these classification associations are the kind of high-level semantic data that probably should be in the XML output. Adds a per-product `xlink:href` reference to its `IfcRelAssociatesClassification`'s `RelatingClassification` (mirroring the existing material-association pattern in `XmlSerializer.cpp`), plus a top-level `ifc.classifications` section that walks `IfcClassification`/`IfcClassificationReference` (including IFC4's `ReferencedSource` chain, deduplicated) into the output XML, following the same shape as the existing materials/types sections. Verified against the issue's own attachment (IFC2X3, 16 `IfcRelAssociatesClassification` entries) run through a real built `IfcConvert`: all classification-related `xlink:href` attributes resolve to real `ifc.classifications` entries, correctly deduplicated (16 references + 3 classifications = 19 unique nodes, not 16+16). A synthetic IFC4 file with a 3-level classification chain shared across two walls confirms the chain-walking and dedup logic (4 unique nodes, not a naive per-wall re-walk producing more). IFC2X3, which only supports a direct top-level reference (no chaining), is also handled correctly. Added automated pytest coverage for both cases (subprocess-invoking the real `IfcConvert` binary, following `test_wall_opening.py`'s existing convention). This contribution was produced with the assistance of an AI coding tool. Rebased onto v0.9.0 as one commit; the three insertions in xml_serializer.cpp were redone on the v0.9.0 value API (express::base, select::concrete(), format_entity_instance, qualify_unrooted_instance), with ReferencedSource handled through express::base since it is an entity in IFC2X3 and a select in IFC4. Syntax checked with clang for all eight schemas; not built here. The Python test skips without an IfcConvert binary, so CI is the runtime check.
Open Graph Description: Fixes #556. Labeled "New contributor? Try this one!" by aothms, who noted these classification associations are the kind of high-level semantic data that probably should be in the XML out...
X Description: Fixes #556. Labeled "New contributor? Try this one!" by aothms, who noted these classification associations are the kind of high-level semantic data that probably should be in the...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8768
X: @github
Domain: github.com
IPv4 address: 140.82.114.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:8e262883-9605-963b-3b83-435bb2d95b82 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 91F6:3B27CE:7D8156:A1F321:6B0508E5 |
| html-safe-nonce | 98f65015367bd0a5bb970785b4125ebbc1055100b97112bc73aff5106ed46fee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUY2OjNCMjdDRTo3RDgxNTY6QTFGMzIxOjZCMDUwOEU1IiwidmlzaXRvcl9pZCI6IjE4MTg0ODE4MTA1Mjc4MTU5MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 111028472ba15db1a9bd7397f988650afcb4be7330f57946256f918a656afa25 |
| hovercard-subject-tag | pull_request:4086271307 |
| 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/8768/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 #556. Labeled "New contributor? Try this one!" by aothms, who noted these classification associations are the kind of high-level semantic data that probably should be in the XML out... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| 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 | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| 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