ISO-10303-21;
HEADER;
FILE_DESCRIPTION((''),'2;1');
FILE_NAME('mep_fixture.ifc','2026-08-18T00:00:00',(''),(''),'','','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1= IFCPERSON($,$,'t',$,$,$,$,$);
#2= IFCORGANIZATION($,'o',$,$,$);
#3= IFCPERSONANDORGANIZATION(#1,#2,$);
#4= IFCAPPLICATION(#2,'1','app','app');
#5= IFCOWNERHISTORY(#3,#4,$,.ADDED.,$,$,$,0);
#6= IFCCARTESIANPOINT((0.,0.,0.));
#7= IFCDIRECTION((0.,0.,1.));
#8= IFCDIRECTION((1.,0.,0.));
#9= IFCAXIS2PLACEMENT3D(#6,#7,#8);
#10= IFCLOCALPLACEMENT($,#9);
#11= IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
#12= IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.);
#13= IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.);
#14= IFCUNITASSIGNMENT((#11,#12,#13));
#15= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.E-5,#9,$);
#16= IFCPROJECT('0PRJ000000000000000000',#5,'MEP clearance fixture',$,$,$,$,(#15),#14);
#17= IFCSITE('0SIT000000000000000000',#5,'Site',$,$,#10,$,$,.ELEMENT.,$,$,$,$,$);
#18= IFCBUILDING('0BLD000000000000000000',#5,'Building',$,$,#10,$,$,.ELEMENT.,$,$,$);
#19= IFCBUILDINGSTOREY('0STY000000000000000000',#5,'Level 1',$,$,#10,$,$,.ELEMENT.,0.);
#21= IFCRELAGGREGATES('0AG1000000000000000000',#5,$,$,#16,(#17));
#22= IFCRELAGGREGATES('0AG2000000000000000000',#5,$,$,#17,(#18));
#23= IFCRELAGGREGATES('0AG3000000000000000000',#5,$,$,#18,(#19));
#24= IFCDIRECTION((0.,0.,1.));
/* Solid position for every extrusion below. It must be the ORIGIN, not the element's own
   placement axis: IfcLocalPlacement already carries the offset, and passing the offset
   placement here as well applies it twice — which put the "0.50 m in front" wall 1.25 m
   away and made every expected number in this fixture wrong. */
#25= IFCAXIS2PLACEMENT3D(#6,$,$);

/* ---- 1. Pump P1: a wall 0.10 m behind it, an obstruction 0.50 m in front ----
   Footprint 0.30 (X) x 1.00 (Y), 1.00 tall, centred on the origin. X is the thin
   horizontal axis, so that is the axis probed; -X is closed off at 0.10 m and +X open
   to 0.50 m, so +X is taken as the front. Rule "\bpump\b" requires 0.762 m depth:
   0.500 / 0.762 = 66% -> warning. */
#100= IFCCARTESIANPOINT((0.,0.,0.));
#101= IFCAXIS2PLACEMENT3D(#100,$,$);
#102= IFCLOCALPLACEMENT(#10,#101);
#103= IFCRECTANGLEPROFILEDEF(.AREA.,'pump',$,0.3,1.0);
#104= IFCEXTRUDEDAREASOLID(#103,#25,#24,1.0);
#105= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#104));
#106= IFCPRODUCTDEFINITIONSHAPE($,$,(#105));
#107= IFCPUMP('0PMP000000000000000001',#5,'Pump P1',$,$,#102,#106,$,$);

/* backing wall: x in [-0.45,-0.25] -> 0.10 m behind the pump's -X face */
#110= IFCCARTESIANPOINT((-0.35,0.,0.));
#111= IFCAXIS2PLACEMENT3D(#110,$,$);
#112= IFCLOCALPLACEMENT(#10,#111);
#113= IFCRECTANGLEPROFILEDEF(.AREA.,'wall',$,0.2,2.0);
#114= IFCEXTRUDEDAREASOLID(#113,#25,#24,2.0);
#115= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#114));
#116= IFCPRODUCTDEFINITIONSHAPE($,$,(#115));
#117= IFCWALL('0WAL000000000000000001',#5,'Backing wall',$,$,#112,#116,$,$);

/* front obstruction: x in [0.65,0.85] -> 0.50 m from the pump's +X face at 0.15 */
#120= IFCCARTESIANPOINT((0.75,0.,0.));
#121= IFCAXIS2PLACEMENT3D(#120,$,$);
#122= IFCLOCALPLACEMENT(#10,#121);
#123= IFCRECTANGLEPROFILEDEF(.AREA.,'wall',$,0.2,2.0);
#124= IFCEXTRUDEDAREASOLID(#123,#25,#24,2.0);
#125= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#124));
#126= IFCPRODUCTDEFINITIONSHAPE($,$,(#125));
#127= IFCWALL('0WAL000000000000000002',#5,'Front wall',$,$,#122,#126,$,$);

/* ---- 2. Duct D1: a slab 0.05 m above it ----
   2.00 (X) x 0.30 (Y) x 0.20 tall, top at 2.20; the slab starts at 2.25. Rule
   "duct|air.*handl|hvac" requires a 0.150 m void: 0.050 / 0.150 = 33% -> violation. */
#200= IFCCARTESIANPOINT((10.,0.,2.0));
#201= IFCAXIS2PLACEMENT3D(#200,$,$);
#202= IFCLOCALPLACEMENT(#10,#201);
#203= IFCRECTANGLEPROFILEDEF(.AREA.,'duct',$,2.0,0.3);
#204= IFCEXTRUDEDAREASOLID(#203,#25,#24,0.2);
#205= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#204));
#206= IFCPRODUCTDEFINITIONSHAPE($,$,(#205));
#207= IFCDUCTSEGMENT('0DCT000000000000000001',#5,'Supply duct D1',$,$,#202,#206,$,$);

#210= IFCCARTESIANPOINT((10.,0.,2.25));
#211= IFCAXIS2PLACEMENT3D(#210,$,$);
#212= IFCLOCALPLACEMENT(#10,#211);
#213= IFCRECTANGLEPROFILEDEF(.AREA.,'slab',$,3.0,3.0);
#214= IFCEXTRUDEDAREASOLID(#213,#25,#24,0.2);
#215= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#214));
#216= IFCPRODUCTDEFINITIONSHAPE($,$,(#215));
#217= IFCSLAB('0SLB000000000000000001',#5,'Soffit slab',$,$,#212,#216,$,$);

/* ---- 3. Duct D2: nothing above it ----
   Same duct 10 m away with clear air above, so the search runs its full 0.60 m and the
   ratio is 4.0 -> compliant. */
#300= IFCCARTESIANPOINT((20.,0.,2.0));
#301= IFCAXIS2PLACEMENT3D(#300,$,$);
#302= IFCLOCALPLACEMENT(#10,#301);
#303= IFCRECTANGLEPROFILEDEF(.AREA.,'duct',$,2.0,0.3);
#304= IFCEXTRUDEDAREASOLID(#303,#25,#24,0.2);
#305= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#304));
#306= IFCPRODUCTDEFINITIONSHAPE($,$,(#305));
#307= IFCDUCTSEGMENT('0DCT000000000000000002',#5,'Supply duct D2',$,$,#302,#306,$,$);

/* ---- 4. Pump P2 standing inside a room ----
   The transparent-class test. A 4 x 4 x 3 m IfcSpace encloses this pump completely and
   nothing else is within reach. A space is a void, so the pump must read as fully clear;
   treating the space as an obstruction would clamp it to 0.00 m and report a violation —
   which is what happens on any real model with rooms if spaces are not excluded. */
#400= IFCCARTESIANPOINT((30.,0.,0.));
#401= IFCAXIS2PLACEMENT3D(#400,$,$);
#402= IFCLOCALPLACEMENT(#10,#401);
#403= IFCRECTANGLEPROFILEDEF(.AREA.,'pump',$,0.3,1.0);
#404= IFCEXTRUDEDAREASOLID(#403,#25,#24,1.0);
#405= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#404));
#406= IFCPRODUCTDEFINITIONSHAPE($,$,(#405));
#407= IFCPUMP('0PMP000000000000000002',#5,'Pump P2',$,$,#402,#406,$,$);

#410= IFCCARTESIANPOINT((30.,0.,0.));
#411= IFCAXIS2PLACEMENT3D(#410,$,$);
#412= IFCLOCALPLACEMENT(#10,#411);
#413= IFCRECTANGLEPROFILEDEF(.AREA.,'room',$,4.0,4.0);
#414= IFCEXTRUDEDAREASOLID(#413,#25,#24,3.0);
#415= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#414));
#416= IFCPRODUCTDEFINITIONSHAPE($,$,(#415));
#417= IFCSPACE('0SPC000000000000000001',#5,'Plant room',$,$,#412,#416,$,.ELEMENT.,.INTERNAL.,$);


/* ---- 5. Duct D3 with a fitting 0.05 m above it, JOINED to it through ports ----
   The regression test for PortConnectivity, and geometrically identical to case 6 below —
   the only difference between them is the port graph. A joined neighbour is not an
   obstruction, so D3 must read clear (0.60 m, the search cap) even though F3 sits directly
   over it. Authored the IFC4 way: ports NESTED under their element with IfcRelNests, which
   is what Ifc4_Revit_ARC.ifc uses and what no O-S1 model exercises — those are all IFC2X3
   and carry IfcRelConnectsPortToElement instead. */
#600= IFCCARTESIANPOINT((40.,0.,2.0));
#601= IFCAXIS2PLACEMENT3D(#600,$,$);
#602= IFCLOCALPLACEMENT(#10,#601);
#603= IFCRECTANGLEPROFILEDEF(.AREA.,'duct',$,2.0,0.3);
#604= IFCEXTRUDEDAREASOLID(#603,#25,#24,0.2);
#605= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#604));
#606= IFCPRODUCTDEFINITIONSHAPE($,$,(#605));
#607= IFCDUCTSEGMENT('0DCT000000000000000003',#5,'Supply duct D3',$,$,#602,#606,$,$);

#610= IFCCARTESIANPOINT((40.,0.,2.25));
#611= IFCAXIS2PLACEMENT3D(#610,$,$);
#612= IFCLOCALPLACEMENT(#10,#611);
#613= IFCRECTANGLEPROFILEDEF(.AREA.,'fitting',$,0.4,0.4);
#614= IFCEXTRUDEDAREASOLID(#613,#25,#24,0.2);
#615= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#614));
#616= IFCPRODUCTDEFINITIONSHAPE($,$,(#615));
#617= IFCDUCTFITTING('0DFT000000000000000003',#5,'Elbow F3',$,$,#612,#616,$,$);

#620= IFCDISTRIBUTIONPORT('0PRT000000000000000001',#5,'D3 out',$,$,#602,$,.SOURCE.,$,$);
#621= IFCDISTRIBUTIONPORT('0PRT000000000000000002',#5,'F3 in',$,$,#612,$,.SINK.,$,$);
#622= IFCRELNESTS('0NST000000000000000001',#5,'NestedPorts',$,#607,(#620));
#623= IFCRELNESTS('0NST000000000000000002',#5,'NestedPorts',$,#617,(#621));
#624= IFCRELCONNECTSPORTS('0CPT000000000000000001',#5,'Flow',$,#620,#621,$);

/* ---- 6. Duct D4 with a fitting 0.05 m above it, NOT joined ----
   Same two boxes, no ports. Nothing says these belong to each other, so the fitting is a
   real obstruction and D4 stays a violation: 0.05 m of 0.150 m. If this one ever goes quiet
   the connectivity rule has stopped discriminating and started suppressing. */
#700= IFCCARTESIANPOINT((50.,0.,2.0));
#701= IFCAXIS2PLACEMENT3D(#700,$,$);
#702= IFCLOCALPLACEMENT(#10,#701);
#703= IFCRECTANGLEPROFILEDEF(.AREA.,'duct',$,2.0,0.3);
#704= IFCEXTRUDEDAREASOLID(#703,#25,#24,0.2);
#705= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#704));
#706= IFCPRODUCTDEFINITIONSHAPE($,$,(#705));
#707= IFCDUCTSEGMENT('0DCT000000000000000004',#5,'Supply duct D4',$,$,#702,#706,$,$);

#710= IFCCARTESIANPOINT((50.,0.,2.25));
#711= IFCAXIS2PLACEMENT3D(#710,$,$);
#712= IFCLOCALPLACEMENT(#10,#711);
#713= IFCRECTANGLEPROFILEDEF(.AREA.,'fitting',$,0.4,0.4);
#714= IFCEXTRUDEDAREASOLID(#713,#25,#24,0.2);
#715= IFCSHAPEREPRESENTATION(#15,'Body','SweptSolid',(#714));
#716= IFCPRODUCTDEFINITIONSHAPE($,$,(#715));
#717= IFCDUCTFITTING('0DFT000000000000000004',#5,'Elbow F4',$,$,#712,#716,$,$);

#500= IFCRELCONTAINEDINSPATIALSTRUCTURE('0CON000000000000000001',#5,$,$,
  (#107,#117,#127,#207,#217,#307,#407,#417,#607,#617,#707,#717),#19);
ENDSEC;
END-ISO-10303-21;
