Repository navigation
demand: other utilities' service categories as data - #484
Merged
Merged
Conversation
data/entrance-categories.json, read by entrance.rs, holds each utility's tables of categories as printed (phases, installed load and demand ranges, breaker, measurement and the other columns, each explained), and demand picks a unit's category from it. Groups list their members, found by their own names, and a member's own document on a category is cited. First utilities: Fecoergs (RIC BT REGD 035.01.06, Anexo J; Coprel's OTD 006.01 and Cerfox's OT_NIC_019 on C18), Hidropan (RIC 2014, Tabela 11), Energisa (NDU 001 v7.0, Tabelas 16 and 18), Equatorial (NT.00001 rev 09, Tabelas 1 and 2) and Copel (NTC 901100, Tabela 2).
dansity
added a commit
that referenced
this pull request
Nov 16, 2026
# Conflicts: # CLAUDE.md # docs/areas/structure-and-mep.md # translations/project/bimcraft-project.pot # translations/project/cs.po # translations/project/de.po # translations/project/es.po # translations/project/fr.po # translations/project/it.po # translations/project/nl.po # translations/project/pl.po # translations/project/pt.po # translations/project/sv.po # translations/project/vi.po # translations/ui/bimcraft-ui.pot # translations/ui/cs.po # translations/ui/de.po # translations/ui/es.po # translations/ui/fr.po # translations/ui/it.po # translations/ui/nl.po # translations/ui/pl.po # translations/ui/pt.po # translations/ui/vi.po # translations/ui/zh.po # translations/ui/zh_TW.po
IPedrax
added a commit
that referenced
this pull request
Nov 17, 2026
The line references moved with the demand and Building Codes changes; no message changed.
IPedrax
added a commit
that referenced
this pull request
Nov 17, 2026
… the round Brings ffishman's data and entrance.rs with the maintainer's fixes: Building Codes' Demand picker and its citation list the utilities whose categories are data, a broken data file is an error in its test, and Energisa's Tabela 16 is offered only to the members its note names. No conflict with the three earlier branches; the catalogs are each side's union.
IPedrax
added a commit
that referenced
this pull request
Nov 18, 2026
…its as its Tabela 4 prints it (ffishman) The head of #511 carries the whole chain under it: dansity's five-discipline Building Codes engine (#486) and ffishman's #502, #506 and #509 on top of it, then the Hidropan rows. Joined onto main, the sections engine replaces main's building-codes.json and its electrical part, since a utility is now an amendment and a country a base code of the electrical discipline: main's `electrical`, `country` and `Model::electrical_methods` are gone, `building_code {electrical}` is refused with a message saying where the methods went, and `demand` takes the project's utility when none is named, as `building_demand` already did. Main's stair fixes (solve capped at 200 risers, the IBC numbers marked unchecked, the test module the hostile sweep reads) and #484's per-member tables (`members`, Energisa's Tabela 16, its test) are carried onto the new files. EN 1992-1-1 stays a second standard of `reinforce {check}` beside the structural code's Concrete section. FORMAT 21's note and the 20 to 21 comment in `migrate` describe `codes`. The catalogs are the union of both sides, for the round's one regeneration.
ffishman
added a commit
to ffishman/BIMCraft
that referenced
this pull request
Nov 20, 2026
Each fails under a deliberate break that the tests let through before: a range from 0 holds 0, and each row answers at its own upper end (and its demand's), in every utility's table and by every method (IPedrax#484, IPedrax#474); each building method at its least number of dwellings and not one fewer (IPedrax#483); an outdoor rule asks it of outlets only, whatever kinds a code lists (IPedrax#359); a room with its outlets and no light point is short, and enough once its light is drawn (IPedrax#280); a 3D file over the limit refused by its size, before it is read (IPedrax#393); only a common property set has the status the export writes (IPedrax#291); a beam at the view range's top is seen, and hidden by a ceiling there (IPedrax#153); Run Script says a single warning (IPedrax#391).
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.
demand: other utilities' service categories as data
demandknows three utilities, CPFL, Enel and Celesc, each written as Rust tables. Most other Brazilian utilities print the same kind of table: a category, its phases, the installed load or demand it covers, the breaker, the conductors and the earthing. This PR reads those tables from one data file, so adding a utility means adding an entry to the file, with no new code. CPFL, Enel and Celesc stay as they are.This follows the approach proposed to dansity on #474 (#474 (comment)): each utility's data carries its source, edition and page, ready to move into the Building Code menu of #386 when that lands.
The mechanism
data/entrance-categories.json, read byentrance.rs:127/220) and per use (individual,metering_centre).columns.over(or from 0) up to and includingup_to, the way the tables print "de 5,1 a 8".demandreturns for a utility of the file:candidates), for example where a single-phase and a three-phase row both cover a load;building_demand(building_demand: a building's demand by a utility's or a country's method, as data #458).changed_by.{utility, system?, entrance?, installed_kw?, demand_kva?, phases?}.Utilities in this PR
MONO 25 A).not_covered.Every value was checked against the printed page, not only against text extracted from the PDF.
Tests
They check that:
demandrefuses a parameter that a utility of the file does not take.Not in this PR
Each has a table of its own, and they will come in a later PR the same way.