--- name: ifc-clash-check description: Run clash detection between IFC models or element groups (architecture vs structure vs MEP) with IfcOpenShell - hard clashes, soft/clearance clashes and touching - then group them into issues by location, rank them and prepare a coordination report. Use when the user asks for clash detection, "detección de interferencias", "choques entre disciplinas", coordination before a BIM meeting, or wants to check that MEP does not cross structure, without Navisworks or Solibri. --- # IFC clash check ## Inputs - One or more .ifc files (e.g. ARQ.ifc, EST.ifc, MEP.ifc), exported from the same coordinates. Ask if they share an origin; if not, results are meaningless. - What to test against what (the clash matrix). If the user has none, propose: structure vs MEP (hard), architecture vs MEP (hard), MEP vs MEP (hard), equipment vs walls (clearance 0.05-0.6 m for maintenance access, value from the user). ## Procedure 1. `pip install ifcopenshell` (tested with 0.9.0). Check both files' units and storeys with `ifc-model-qa` first if they are new to you. 2. For each line of the clash matrix run: `python scripts/clash.py --a EST.ifc --a-select "IfcBeam, IfcColumn, IfcSlab, IfcWall" --b MEP.ifc --b-select "IfcDuctSegment, IfcPipeSegment, IfcCableCarrierSegment" --mode intersection --tolerance 0.01 --out est_mep.csv --report est_mep.md` - `intersection`: hard clashes deeper than the tolerance (use 0.01-0.025 m to ignore modelling noise; ask the user). - `clearance --clearance 0.10`: soft clashes (insulation, access, fire separation). - `collision`: any contact (useful for penetrations that need sleeves). 3. If a group has 0 elements the script stops: fix the selector (class names, or `IfcElement, Name=/.*Duct.*/` style filters). Never report "0 clashes" for a group that tested nothing. 4. Build the coordination list from the CSVs: one row per group (nearby clashes merged with `--group`), with storey, classes, element names, depth, and a proposed owner (who most likely moves: usually MEP before structure, small before big, gravity drainage last to move). 5. Mark expected interactions as "not a clash" only with the user: penetrations with sleeves, pipes through planned openings, elements embedded by design. 6. Offer BCF for the coordination tool (BIMcollab, Revizto, Solibri, Bonsai, Forma/ACC) and a 4-line summary for the meeting. ## Output - Matrix summary: pair · clashes · groups · top storey. - Top 10 issues ranked by impact (structure involved, depth, storey on the critical path). - CSV per pair, and the markdown reports. ## Never - Never decide who fixes it or approve a structural penetration; propose, the design team decides. - Never mix files with different origins or units without saying so first. - Don't drown the team: a 3,000-clash list is noise. Group, filter tolerances, and report what needs a decision.