apply_ifc_rules
Turn what you read in the overview into rules the tool replays on EVERY piece of the model, including the ones you were never shown.
THIS IS HOW THE TOOL LEARNS A MODEL. read_ifc_overview gives you some fifty groups — one per object type, not one per piece. You answer with RULES on those groups, and this tool applies them to the three thousand pieces. You never give a verdict piece by piece: the result stays deterministic because a program, not you, does the matching.
THEN READ THE ANSWER BACK, AND EXPECT TO POST AGAIN. The answer gives every group with the role your rules gave it and how many pieces that is. A rule that is too wide shows up on one line — « Gaine rectangulaire cadree, 471 pieces, centrale_de_traitement_d_air » is a rule that turned every duct into an air handling unit. Narrow it and post again. Calling this tool costs nothing and may be repeated as often as you need.
WHAT NEEDS A ROLE, AND WHAT DOES NOT. Plain ducts and fittings need none: they are network by nature, and the answer marks them segment_ou_raccord so you can see at a glance whether a rule caught them by mistake. What needs a role is everything else — air handling units, fans, fire dampers, balancing dampers, silencers, louvres, diffusers — plus whatever must be kept OUT of the network, such as access zones, equipment plinths or damper motors.
TWO ROLE NAMES ARE FIXED, because circuits start from them: give air handling units, monoblocs and ventilation casings the role centrale_de_traitement_d_air, and fans the role ventilateur - exactly these words. The answer lists, under 'equipements', the GUIDs of every piece of the model that got one of them: that list is what trace_duct_circuits computes when called with only the token. Every other role name is yours to choose.
ORDER THE LIST YOURSELF, most specific first, down to the most general. The fire damper rule must come before the balancing damper rule, or « damper » takes everything. Equipment must come before terminals: « VEN_MSF_MONOBLOC_SIMPLE_FLUX_REPRISE » contains « reprise », and a return-diffuser rule placed first would claim the air handling unit.
Pieces no rule catches are simply listed, with no warning and no failure: the engineer judges on the 3D view, not on a coverage report.
NEXT: once 'equipements' lists the air handling units and fans you expect, call trace_duct_circuits with only the token. It computes nothing yet: it returns the complete list of the model's systems and units, to choose from - see trace_duct_circuits. 'equipements' counts every piece ('pieces') but lists at most thirty names: the count, not the list, is the model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | Your rules, as a JSON object. The only required key is roles.liste: an ORDERED list, FIRST MATCH WINS, most specific first. Each entry is {"role": "a_name", "si_un_de": [conditions]} and may also carry si_tout_de (all must match) and sauf_si (none may match). A condition names one field or one property, and one operation: {"champ": "nom_du_type", "contient": ["cta"]} {"propriete": "Mechanical.System Name", "commence_par": ["VEN_"]} Fields: classe, predefined_type, object_type, nom_brut, classe_du_type, nom_du_type, predefined_type_du_type, element_type_du_type - the same ones read_ifc_overview shows under 'identite'. Operations, from widest to narrowest: contient (anywhere, even inside a word), mot_commence_par (at the start of a word), commence_par (start of the string), finit_par (end of the string), mot_entier (a whole word), egal (the whole string). Case and accents are ignored, and _ - . / are read as spaces. You may also pass dimensions, noms_de_systeme and debits_et_pertes; they are kept as given. | |
| token | Yes | The model token, from ifc_upload_result or from the link the user pasted. |