| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Ignore tail remarks in the express schema parser
Fresh-Upgrade-1
Merging back Thomas' latest changes
Apply changes done under Engisis to the IFCRail fork
Previously there was an error if you remove all drawings:
```
Traceback (most recent call last):
File "\addons\blenderbim\bim\module\drawing\ui.py", line 182, in draw
DrawingsData.load()
File "\addons\blenderbim\bim\module\drawing\data.py", line 106, in load
"active_drawing_pset_data": cls.active_drawing_pset_data(),
File "\addons\blenderbim\bim\module\drawing\data.py", line 134, in active_drawing_pset_data
drawing = ifc_file.by_id(bpy.context.scene.DocProperties.active_drawing_id)
File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 326, in by_id
return self[id]
File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 314, in __getitem__
return entity_instance(self.wrapped_data.by_id(key), self)
File "\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 4517, in by_id
return _ifcopenshell_wrapper.file_by_id(self, id)
RuntimeError: Instance #1 077 not found
```
…-Brickschema Interface to interact with brickschema PR #1
After ab5ea4c it was always throwing wrong singature errors like below even if TypeError was caused by some internal issues inside API - it was adding couple extra steps to traceback making errors more noisy. TypeError: Incorrect function arguments provided for library.edit_library attribute 'VersionDate' for entity 'IFC2X3.IfcLibraryInformation' is expecting value of type 'ENTITY INSTANCE', got 'str'.. You specified args (<ifcopenshell.file.file object at 0x0000027EB8E6BCD0>,) and settings {'library': #1=IfcLibraryInformation('Name','Version',$,$,$), 'attributes': {'Name': 'Name', 'Version': 'Version', 'VersionDate': 'VersionDate', 'Location': 'Location', 'Description': 'Description'}} E Correct signature is (file: ifcopenshell.file.file, library: ifcopenshell.entity_instance.entity_instance, attributes: dict[str, typing.Any]) -> None See help(ifcopenshell.api.library.edit_library) for documentation.
…eets This commit adds a complete Bill of Quantities (BOQ) export system for the federation module with three critical fixes: ## Critical Fixes Applied ### Fix IfcOpenShell#1: Correct Quantity Calculation (Strategy A) - **Problem**: BOQ was summing ALL quantity types together (Length + Area + Volume) resulting in nonsensical mixed units and costs in billions - **Solution**: Use PRIMARY quantity only per element type: - IfcWall → GrossSideArea (M2) only, not mixed with NetVolume - IfcBeam → Length (M) only, not mixed with Volume - IfcDoor → Count (EA) - **Result**: Realistic costs instead of billions ### Fix IfcOpenShell#2: Friendly IFC Element Descriptions - **Problem**: BOQ showed technical names like "IfcWall" instead of readable text - **Solution**: Created ifc_labels table in database with 28 friendly names - **Examples**: - IfcWall → "Blockwork Wall (150mm)" - IfcBeam → "Structural Steel I-Beam" - IfcDuct → "Galvanized Steel Ductwork" ### Fix IfcOpenShell#3: Reference Sheets with Excel Cell Formulas - **Problem**: Users couldn't see or edit unit costs - **Solution**: Added 3 reference sheets with editable rates: - 📋 Material Rates (25+ materials) - 👷 Labor Rates (8 trades) - 🚜 Equipment Rates (7+ equipment types) - **Benefit**: Change rate in ONE place → all BOQ sheets recalculate automatically ## New Files Added 1. **comprehensive_boq_export_fixed.py** (658 lines) - Fixed BOQ exporter with Strategy A quantity logic - Dual-schema support (aggregated + enhanced databases) - Creates 13-sheet Excel: Cover + Dashboard + 3 Reference + 8 BOQ sheets - Executive Dashboard with Pie & Bar charts 2. **create_ifc_labels_table.py** (280 lines) - Creates ifc_labels table with 28 IFC class descriptions - Maps primary quantity type per element (Length, Area, Count, etc.) - Usage: python3 create_ifc_labels_table.py <database_path> 3. **BOQ_System_User_Guide_For_Accountants.md** (1040 lines) - Complete user guide for accountants & quantity surveyors - Appendix A: Cost calculation reference tables (390 lines) - Shows where to edit rates, regional adjustments, inflation factors ## Features - ✅ Primary quantity logic prevents mixed unit aggregation - ✅ IFC labels integration with graceful fallback - ✅ Excel cell formulas link BOQ to reference sheets - ✅ Executive Dashboard with charts (Pie + Bar) - ✅ Malaysian construction standards (CIDB N3C, BCISM 2024) - ✅ Dual database schema support (auto-detection) - ✅ 8 disciplines: ACMV, ARC, CW, ELEC, FP, LPG, SP, STR ## Technical Details - Database tables: elements_meta, element_properties, simple_qto, ifc_labels - Query optimization for both aggregated and enhanced schemas - openpyxl charts: PieChart, BarChart with DataBar formatting - Cost sources: CIDB N3C 2024-Q4, BCISM Cost Book, MBAM-CIDB Survey 2024 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
read_from_stream() ran the entity-scanning while loop with no enclosing try/catch. If an exception escaped construction of an instance mid-stream (e.g. malformed attribute data following a syntactically valid header), it unwound straight out of IfcFile's constructor body, which has no try/catch of its own around this call. The constructor never completes, ~IfcFile() never runs its usual byid_ cleanup, and any entities already inserted into byid_ during this same scan are leaked with nothing left to free them. Catch the exception at the loop instead, matching how a bad header is already handled via tryRead(): mark the file INVALID_SYNTAX and stop scanning, so the constructor always completes and existing cleanup paths apply to whatever was parsed so far. Caught broadly (std::exception, not just IfcException): parsing helpers below this point also use plain std::out_of_range for malformed-input control flow (e.g. FileReader::peek() at EOF), not just IfcException, and any of those escaping here is exactly as leak-prone. Found by fuzzing (fuzzer-0f1); repro is a valid IFC4 header followed by '#1=IFCPERSON(wi);#1=IFCORGANIZATION,e'. Generated with the assistance of an AI coding tool.
| Back | FazBrowse Home | New Git URL |
No description provided.