Logo vun Bonsai Impl Qto

Bonsai Impl Qto

Organisatioun
Impertio-Studio
bonsai-impl-qto

Use when calculating quantities from IFC elements in Bonsai -- area, length, volume, weight, or custom quantity sets. Prevents the common mistake of manually computing quantities instead of using QtoCalculator for automated base quantity extraction from geometry. Covers IfcElementQuantity sets, bulk quantity operations, and the complete QTO pipeline from geometry analysis to export. Keywords: quantity takeoff, QTO, IfcElementQuantity, area, volume, length, weight, QtoCalculator, base quantities, cost estimation, calculate area, how much material, measure building.

Iwwersiicht

EditeurImpertio-Studio
RepositoryBlender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
Skill-Nummbonsai-impl-qto
Stären
44
Forks
5
Matgeliwwert Fichieren
3
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 3 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum Impertio-Studio op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Bonsai Impl Qto an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/bonsai/impl/bonsai-impl-qto
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package.git /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/skills/bonsai/impl/bonsai-impl-qto .claude/skills/bonsai-impl-qto
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Bonsai Impl Qto an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Bonsai Impl Qto automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Bonsai Impl Qto net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Bonsai QTO (Quantity Takeoff): Implementation Skill

Bonsai v0.8.x | Module: bonsai.bim.module.qto | NEVER use blenderbim.bim.module.qto

1. Quick Reference

Critical Warnings

  • ALWAYS verify objects have mesh geometry before running QTO calculators. Empties, curves, and lights cause failures.
  • ALWAYS ensure objects have an IFC class assigned via Bonsai before running QTO. Calculator functions query IFC properties.
  • ALWAYS assign Pset_MaterialCommon.MassDensity BEFORE running weight calculations (get_net_weight, get_gross_weight).
  • ALWAYS re-run QTO calculations after modifying geometry. Quantities are NOT live-linked to geometry.
  • NEVER assume get_gross_volume() accounts for openings. Gross = original geometry WITHOUT openings. Net = WITH openings subtracted.
  • NEVER use the legacy blenderbim module path. ALWAYS use bonsai.bim.module.qto.

Decision Tree: Which QTO Approach?

Need quantities for IFC elements?
├── Single element, single quantity?
│   └── Use bim.calculate_single_quantity operator
│       Parameters: calculator, qto_name, prop_name, calculator_function
│
├── Single element, all base quantities?
│   └── Use bim.perform_quantity_take_off with element selected
│       Select object → Set qto_rule → Execute operator
│
├── Multiple elements, standard base quantities?
│   └── Use bim.perform_quantity_take_off in batch mode
│       Select all target objects → Set qto_rule → Execute operator
│
├── All elements of a class?
│   └── Use bim.perform_quantity_take_off with no selection
│       Operator processes all IfcElement instances matching the rule
│
├── Custom quantity (edge lengths, face areas)?
│   └── Use mesh-level operators in Edit Mode:
│       - bim.calculate_edge_lengths (selected edges)
│       - bim.calculate_face_areas (selected faces)
│       - bim.calculate_circle_radius (selected vertices)
│
└── Need gross vs net distinction?
    ├── With openings (doors/windows in walls) → Use net variants
    │   get_net_volume(), get_net_surface_area(), get_net_footprint_area()
    └── Without openings (original geometry) → Use gross variants
        get_gross_volume(), get_gross_surface_area(), get_gross_footprint_area()

2. Module Architecture

File Structure

FilePurpose
__init__.pyModule registration
operator.py8 QTO operators
prop.pyBIMQtoProperties with calculator/rule settings
ui.pyPanel UI for quantity takeoff
data.pyData loading and caching
calculator.pyGeometry calculation engine (30+ functions)
helper.pyMesh quantity calculation helpers

Two-Layer System

  1. Calculator functions (calculator.py) — Extract numeric values from Blender geometry (bpy.types.Object)
  2. QTO rules (JSON configuration) — Map IFC classes to standard quantity sets and calculator functions

Core/Tool/Operator Pattern

bonsai.core.qto        → Pure logic functions (accept tool interfaces)
bonsai.tool.Qto        → Blender-specific implementations
bonsai.bim.module.qto  → Operators that wire core to tool

3. Calculator Functions by Category

Linear Quantities

FunctionReturnsNotes
get_linear_length()Longest bounding box edgeSimple bbox calculation
get_length()Parametric axis lengthAXIS2/AXIS3 aware
get_width()Width dimensionFrom bbox or parametric data
get_height()Height (Z dimension)From bounding box
get_depth()Depth dimensionFor slabs, footings
get_perimeter()Net footprint perimeterPerimeter of lowest polygon
get_gross_perimeter()Gross footprint perimeterWithout opening subtractions

Area Quantities

FunctionReturnsNotes
get_net_footprint_area()Lowest polygon face areaNet of openings
get_gross_footprint_area()Footprint without openingsGross geometry
get_roofprint_area()Highest polygon face areaFor roofs
get_side_area()Lateral face areasDirectional filter support
get_lateral_area()Side surfacesLateral faces only
get_top_area()+Z normal facesConfigurable angle threshold (default 45 deg)
get_net_surface_area()Total surface (net)With opening subtractions
get_gross_surface_area()Total surface (gross)Without opening subtractions
get_cross_section_area()Area at cut planeFor columns, beams
get_projected_area()Projection onto x/y/zAxis-specific projection
get_opening_area()Opening areasNormal vector angle filtering
get_formwork_area()Surface minus top facesFor concrete formwork
get_side_formwork_area()Lateral surfaces onlyExcludes Z-normal faces

Volume Quantities

FunctionReturnsNotes
get_net_volume()Volume with openingsBMesh-calculated
get_gross_volume()Volume without openingsUses disable-opening-subtractions flag
get_space_net_volume()Space volume minus walls/columnsDecomposition-aware

Weight Quantities

FunctionReturnsNotes
get_net_weight()net_volume x mass_densityRequires Pset_MaterialCommon.MassDensity
get_gross_weight()gross_volume x mass_densityRequires Pset_MaterialCommon.MassDensity
Profile-based weightPset_ProfileMechanical.MassPerLength x lengthFor steel profiles

Specialized Quantities

FunctionReturnsNotes
get_stair_length()Hypotenuse of (length^2 + height^2)For stairs
get_finish_floor_height()Floor finish heightDecomposition-aware
get_finish_ceiling_height()Ceiling heightDecomposition-aware
get_contact_area()Polygon intersection between objectsRequires Shapely

4. QTO Rules (JSON Configuration)

Rules map IFC classes to standard quantity sets and calculator functions. Stored as JSON in ifc5d.qto.rules.

Rule Structure

json
{
    "Name": "Qto_WallBaseQuantities",
    "Description": "Standard wall base quantities per IFC4",
    "Calculator": "Blender",
    "Mappings": {
        "IfcWall": {
            "Qto_WallBaseQuantities": {
                "Length": "get_length",
                "Width": "get_width",
                "Height": "get_height",
                "GrossFootprintArea": "get_gross_footprint_area",
                "NetFootprintArea": "get_net_footprint_area",
                "GrossSideArea": "get_gross_surface_area",
                "NetSideArea": "get_net_surface_area",
                "GrossVolume": "get_gross_volume",
                "NetVolume": "get_net_volume"
            }
        }
    }
}

Rule Selection

  • BIMQtoProperties.qto_rule — Enum populated from tool.Qto.get_qto_rules()
  • Rules are filtered by IFC schema version (IFC4 vs IFC4X3)
  • BIMQtoProperties.fallback=True — Tries alternative calculators if primary lacks support

5. Standard Quantity Sets

IFC ClassQuantity SetKey Quantities
IfcWallQto_WallBaseQuantitiesLength, Width, Height, GrossVolume, NetVolume, GrossSideArea, NetSideArea
IfcSlabQto_SlabBaseQuantitiesWidth, Length, Depth, GrossArea, NetArea, GrossVolume, NetVolume, Perimeter
IfcColumnQto_ColumnBaseQuantitiesLength, CrossSectionArea, OuterSurfaceArea, GrossVolume, NetVolume, GrossWeight
IfcBeamQto_BeamBaseQuantitiesLength, CrossSectionArea, OuterSurfaceArea, GrossVolume, NetVolume, GrossWeight
IfcDoorQto_DoorBaseQuantitiesHeight, Width, Area
IfcWindowQto_WindowBaseQuantitiesHeight, Width, Area
IfcSpaceQto_SpaceBaseQuantitiesHeight, FinishCeilingHeight, FinishFloorHeight, GrossFloorArea, NetFloorArea
IfcRoofQto_RoofBaseQuantitiesGrossArea, NetArea, ProjectedArea
IfcStairQto_StairBaseQuantitiesLength, GrossVolume, NetVolume

6. Operators Reference

Operatorbl_idnameUse Case
CalculateCircleRadiusbim.calculate_circle_radiusSelected vertices in Edit Mode
CalculateEdgeLengthsbim.calculate_edge_lengthsSelected edges in Edit Mode
CalculateFaceAreasbim.calculate_face_areasSelected faces in Edit Mode
CalculateObjectVolumesbim.calculate_object_volumesMesh volumes in Object Mode
CalculateFormworkAreabim.calculate_formwork_areaSurface minus top faces
CalculateSideFormworkAreabim.calculate_side_formwork_areaLateral surfaces only
CalculateSingleQuantitybim.calculate_single_quantityOne quantity via specific calculator function
PerformQuantityTakeOffbim.perform_quantity_take_offBatch QTO using rules

PerformQuantityTakeOff: Primary Batch Operator

python
# Bonsai v0.8.x: Batch quantity takeoff
import bpy

bpy.ops.bim.perform_quantity_take_off(
    qto_rule="Qto_WallBaseQuantities"  # Rule name from JSON config
)

Behavior: Processes selected objects. If no objects selected, processes ALL IfcElement instances matching the rule's IFC class filter.

CalculateSingleQuantity: Targeted Calculation

python
# Bonsai v0.8.x: Single quantity calculation
bpy.ops.bim.calculate_single_quantity(
    calculator="Blender",
    qto_name="Qto_WallBaseQuantities",
    prop_name="GrossVolume",
    calculator_function="get_gross_volume"
)

7. Cost Integration

QTO integrates with Bonsai cost management:

python
# Bonsai v0.8.x: QTO-Cost linkage
# tool.Qto.get_related_cost_item_quantities(product) returns:
# [{"cost_item": <IfcCostItem>, "quantities": [<matched quantity properties>]}]

Unit conversion: tool.Qto.convert_to_project_units() handles measurement system conversion using IFC schema unit definitions.

8. External Dependencies

DependencyUsed ByPurpose
BMeshVolume calculationsMesh volume computation
mathutils.BVHTreeProximity detectionSpatial queries
Shapelyget_contact_area()2D polygon intersection
ifcopenshell.api.geometryGross calculationsShape generation with opening control

9. Gross vs. Net: Critical Distinction

Gross quantities:
  - Original element geometry WITHOUT openings
  - Wall with door opening → gross volume = solid wall volume
  - Use when: material ordering, structural analysis

Net quantities:
  - Element geometry WITH openings subtracted
  - Wall with door opening → net volume = wall volume minus door void
  - Use when: actual material in place, cost calculation

ALWAYS choose the correct variant. Using gross when net is required (or vice versa) produces incorrect quantity takeoffs.

10. Reference Files

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Bonsai Impl Qto?

Use when calculating quantities from IFC elements in Bonsai -- area, length, volume, weight, or custom quantity sets. Prevents the common mistake of manually computing quantities instead of using QtoCalculator for automated base quantity extraction from geometry. Covers IfcElementQuantity sets, bulk quantity operations, and the complete QTO pipeline from geometry analysis to export. Keywords: quantity takeoff, QTO, IfcElementQuantity, area, volume, length, weight, QtoCalculator, base quantities, cost estimation, calculate area, how much material, measure building.

Firwat Bonsai Impl Qto op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Bonsai Impl Qto besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Bonsai Impl Qto an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/bonsai/impl/bonsai-impl-qto an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Bonsai Impl Qto benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Bonsai Impl Qto benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Bonsai Impl Qto domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Bonsai Impl Qto gratis?

Jo. De Skill gëtt vum Impertio-Studio ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇