Repository navigation
feat(ifc): a door's and a slab's IsExternal, from its type's Function (B28, #35) - #621
Merged
Merged
Conversation
tests/is_external.rs: on RE1 Architecture, every Pset_DoorCommon and Pset_SlabCommon IsExternal Revit writes (5 doors, interior and exterior, and 2 floors) must be rvt-rs's. Red on main (draft #618, run 37145114521, Corpus health tier 2): ---- re1_door_and_slab_is_external_are_revits stdout ---- thread 're1_door_and_slab_is_external_are_revits' panicked at tests/is_external.rs:183:9: RE1 Architecture: 7 of Revit's 7 door and slab IsExternal values are not rvt-rs's ((tag, set), Revit's, rvt-rs's); first: [(("416336", "Pset_DoorCommon"), "IFCBOOLEAN(.F.)", None), (("416703", "Pset_DoorCommon"), "IFCBOOLEAN(.F.)", None), (("416909", "Pset_DoorCommon"), "IFCBOOLEAN(.F.)", None), (("417097", "Pset_DoorCommon"), "IFCBOOLEAN(.F.)", None), (("418660", "Pset_SlabCommon"), "IFCBOOLEAN(. ... test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.67s
… (B28, #35) RE-158: the door and floor types' FUNCTION_PARAM (-1001006) entry, an i64 id followed by a u32, is Revit's IsExternal on 5 of 5 RE1 doors (interior and exterior) and 2 of 2 floors. - partition_room_parameters: FUNCTION_PARAMETER and scan_integer_parameter (the u32 after the id, in the element's own data object; disagreeing entries give nothing). - partition_schema_mvp: m_type_function on doors and slabs whose type is known. - export_content: IsExternal (IfcBoolean) in Pset_DoorCommon or Pset_SlabCommon for Function 0 or 1; nothing for another value, which RE1 does not show.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: IsExternal omitted without common pset
- add_is_external now creates Pset_DoorCommon or Pset_SlabCommon with IsExternal when reference export did not already add that common set.
Or push these changes by commenting:
@cursor push 5c89ad200b
Preview (5c89ad200b)
diff --git a/src/ifc/export_content.rs b/src/ifc/export_content.rs
--- a/src/ifc/export_content.rs
+++ b/src/ifc/export_content.rs
@@ -1075,7 +1075,7 @@
/// slab's `Pset_SlabCommon` among `sets`, from its type's Function, 0
/// interior or 1 exterior (RE-158). Nothing for another Function, which RE1
/// does not show, or when the type's Function was not read.
-fn add_is_external(sets: &mut [PropertySet], ifc_type: &str, decoded: &DecodedElement) {
+fn add_is_external(sets: &mut Vec<PropertySet>, ifc_type: &str, decoded: &DecodedElement) {
let common = match ifc_type {
"IFCDOOR" => "Pset_DoorCommon",
"IFCSLAB" => "Pset_SlabCommon",
@@ -1094,10 +1094,16 @@
Some(1) => true,
_ => return,
};
+ let property = Property {
+ name: "IsExternal".into(),
+ value: PropertyValue::Boolean(external),
+ };
if let Some(set) = sets.iter_mut().find(|set| set.name == common) {
- set.properties.push(Property {
- name: "IsExternal".into(),
- value: PropertyValue::Boolean(external),
+ set.properties.push(property);
+ } else {
+ sets.push(PropertySet {
+ name: common.into(),
+ properties: vec![property],
});
}
}You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 87cd770. Configure here.
…s' IsExternal, with the maintainer's approval (B28)
… doors' IsExternal, with the maintainer's approval (B28)
DrunkOnJava
enabled auto-merge (squash)
October 3, 2026 19:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


RE-158 (#620): a door's and a floor's IsExternal is its type's FUNCTION_PARAM (-1001006: Interior 0, Exterior 1), an i64 id followed by a u32 in the type's own data object (5 of 5 RE1 doors, interior and exterior; 2 of 2 floors).
The walls' IsExternal, LoadBearing and ExtendToStructure stay out: they never vary on RE1, so no parameter is identified (RE-158 §3).
Test: tests/is_external.rs (real target). Red on main: draft #618, run 37145114521, 7 of 7 missing; the output is in the test commit's message.
Note
Medium Risk
Changes IFC property-set output for doors and slabs and adds partition binary scanning; behavior is gated on Revit 2024+ and fail-closed on conflicting parameter reads, but export parity affects downstream IFC consumers.
Overview
RE-158 wires Revit type Function (
FUNCTION_PARAM, interior0/ exterior1) from partition data into IFCIsExternalon doors and floor slabs, aligned with Revit's export.Partition scanning adds
scan_integer_parameterandFUNCTION_PARAMETER, used byattach_type_functionsto setm_type_functionon door and slab instances from their type ElementIds (Revit 2024+). During IFC export,add_is_externalappendsIsExternal(IfcBoolean) toPset_DoorCommonorPset_SlabCommonwhen Function is0or1; other values are omitted.A new corpus test
tests/is_external.rscomparesIsExternalon tagged elements against Revit's reference IFC for RE1 Architecture, and CI listsis_externalas a real target.Reviewed by Cursor Bugbot for commit 87cd770. Configure here.