/blender-bim-sverchok:ifcos-impl-geometryfrom Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok
Use when extracting 3D geometry from IFC files, creating geometric representations, or processing IFC geometry for visualization. Prevents the performance mistake of calling create_shape() per element instead of using the geometry iterator. Covers geometry settings, create_shape(), geometry iterator, extrusion/CSG/BRep creation, and coordinate transforms. Keywords: geometry, create_shape, geometry iterator, mesh extraction, extrusion, CSG, BRep, IfcShapeRepresentation, coordinates, 3D, visualization, get vertices from IFC, extract mesh, convert IFC to 3D.
Ships in Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Need geometry from IFC elements?
├── Extract existing geometry? (read/process)
│ ├── Single element → ifcopenshell.geom.create_shape(settings, element)
│ ├── Multiple elements (100+) → ifcopenshell.geom.iterator(settings, model, cpu_count)
│ └── Specific entity attributes → Manual traversal (element.Representation)
│
└── Create new geometry? (write/author)
├── Simple wall block → geometry.add_wall_representation()
├── Extruded profile (beam/column) → geometry.add_profile_representation()
├── Arbitrary mesh (furniture/equipment) → geometry.add_mesh_representation()
├── Boolean operation (opening/cut) → geometry.add_boolean()
├── Custom parametric shape → ShapeBuilder + builder.get_representation()
└── Slab/door/window/railing → geometry.add_{type}_representation()
What do you need the geometry for?
├── Visualization / rendering / game engine / export to mesh format
│ └── Tessellation (default) — triangulated mesh output
│ settings.set(settings.USE_BREP_DATA, False) # default
│
├── CAD operations / boolean operations / precise measurements
│ └── BRep — exact OpenCASCADE TopoDS_Shape
│ settings.set(settings.USE_BREP_DATA, True)
│ Requires: pythonOCC (PythonOCC-Core) for advanced operations
│
└── Geometry export to glTF/OBJ
└── Use serializer (ifcopenshell.geom.serializers)
What coordinate space?
├── Need absolute position in the model
│ └── USE_WORLD_COORDS = True
│ Vertices include full placement chain (element → storey → building → site)
│
├── Need position relative to element origin
│ └── USE_WORLD_COORDS = False (default)
│ Apply shape.transformation.matrix manually if needed
│
└── Need to compare positions across elements
└── USE_WORLD_COORDS = True (ALWAYS for cross-element comparison)
create_shape() in try/except RuntimeError. Not all IfcProduct subtypes have geometry (IfcProject, IfcBuildingStorey, some IfcSite).create_shape() in a loop due to internal caching and multithreading.context.add_context() for the root 3D context, then a subcontext for Body/MODEL_VIEW.geometry.edit_object_placement() on elements that have geometry. Elements without a placement are positioned at the global origin.ifcopenshell.util.unit.calculate_unit_scale(model) to get the conversion factor to meters.shape.geometry.verts without checking that create_shape() did not raise an exception.model.create_entity("IfcExtrudedAreaSolid", ...) for production code when geometry.add_profile_representation() or geometry.add_wall_representation() is available. The API functions handle context assignment, representation types, and validation automatically.# IfcOpenShell: all schema versions
import ifcopenshell.geom
settings = ifcopenshell.geom.settings()
# Most common configuration for mesh extraction:
settings.set(settings.USE_WORLD_COORDS, True) # Absolute coordinates
settings.set(settings.WELD_VERTICES, True) # Clean mesh
settings.set(settings.USE_BREP_DATA, False) # Triangulated output
# For BRep/CAD operations:
settings_brep = ifcopenshell.geom.settings()
settings_brep.set(settings_brep.USE_BREP_DATA, True)
settings_brep.set(settings_brep.USE_WORLD_COORDS, True)
# For fast preview (skip openings):
settings_fast = ifcopenshell.geom.settings()
settings_fast.set(settings_fast.DISABLE_OPENING_SUBTRACTIONS, True)
settings_fast.set(settings_fast.USE_WORLD_COORDS, True)
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.geom
import numpy as np
model = ifcopenshell.open("model.ifc")
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_WORLD_COORDS, True)
wall = model.by_type("IfcWall")[0]
try:
shape = ifcopenshell.geom.create_shape(settings, wall)
except RuntimeError:
print("No geometry or processing failed")
shape = None
if shape:
verts = np.array(shape.geometry.verts).reshape(-1, 3)
faces = np.array(shape.geometry.faces).reshape(-1, 3)
edges = np.array(shape.geometry.edges).reshape(-1, 2)
print(f"Vertices: {len(verts)}, Triangles: {len(faces)}")
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.geom
import multiprocessing
import numpy as np
model = ifcopenshell.open("model.ifc")
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_WORLD_COORDS, True)
iterator = ifcopenshell.geom.iterator(
settings, model, multiprocessing.cpu_count())
if iterator.initialize():
while True:
shape = iterator.get()
element = model.by_id(shape.id)
verts = np.array(shape.geometry.verts).reshape(-1, 3)
faces = np.array(shape.geometry.faces).reshape(-1, 3)
# ... process geometry ...
if not iterator.next():
break
# IfcOpenShell: all schema versions
# Process only walls
iterator = ifcopenshell.geom.iterator(
settings, model, multiprocessing.cpu_count(),
include=model.by_type("IfcWall"))
# OR exclude spaces (invisible elements)
iterator = ifcopenshell.geom.iterator(
settings, model, multiprocessing.cpu_count(),
exclude=model.by_type("IfcSpace"))
if iterator.initialize():
while True:
shape = iterator.get()
# ... process ...
if not iterator.next():
break
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.api
model = ifcopenshell.api.run("project.create_file", version="IFC4")
project = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcProject", name="My Project")
ifcopenshell.api.run("unit.assign_unit", model)
# Step 1: Root 3D context (REQUIRED)
model3d = ifcopenshell.api.run("context.add_context", model,
context_type="Model")
# Step 2: Body subcontext (REQUIRED for geometry)
body = ifcopenshell.api.run("context.add_context", model,
context_type="Model", context_identifier="Body",
target_view="MODEL_VIEW", parent=model3d)
# IfcOpenShell: all schema versions
wall = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcWall", name="W-01")
# Parametric wall: length=5m, height=3m, thickness=0.2m
wall_rep = ifcopenshell.api.run("geometry.add_wall_representation", model,
context=body, length=5.0, height=3.0, thickness=0.2)
ifcopenshell.api.run("geometry.assign_representation", model,
product=wall, representation=wall_rep)
# Set placement (identity = origin, or use a 4x4 matrix)
ifcopenshell.api.run("geometry.edit_object_placement", model,
product=wall)
# IfcOpenShell: all schema versions
column = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcColumn", name="C-01")
# Create a rectangle profile
profile = model.create_entity("IfcRectangleProfileDef",
ProfileType="AREA", XDim=0.3, YDim=0.3)
# Extrude the profile
col_rep = ifcopenshell.api.run("geometry.add_profile_representation", model,
context=body, profile=profile, depth=3.0)
ifcopenshell.api.run("geometry.assign_representation", model,
product=column, representation=col_rep)
ifcopenshell.api.run("geometry.edit_object_placement", model,
product=column)
# IfcOpenShell: all schema versions
element = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcFurniture", name="Table")
vertices = [[0,0,0],[1,0,0],[1,1,0],[0,1,0],
[0,0,0.8],[1,0,0.8],[1,1,0.8],[0,1,0.8]]
faces = [[0,1,2,3],[4,7,6,5],[0,4,5,1],[1,5,6,2],[2,6,7,3],[3,7,4,0]]
mesh_rep = ifcopenshell.api.run("geometry.add_mesh_representation", model,
context=body, vertices=vertices, faces=faces)
ifcopenshell.api.run("geometry.assign_representation", model,
product=element, representation=mesh_rep)
ifcopenshell.api.run("geometry.edit_object_placement", model,
product=element)
# IfcOpenShell: all schema versions
import numpy as np
import ifcopenshell.util.placement
wall = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcWall", name="Rotated Wall")
# Start with identity matrix
matrix = np.eye(4)
# Rotate 90 degrees around Z axis
matrix = ifcopenshell.util.placement.rotation(90, "Z") @ matrix
# Set position: X=2, Y=3, Z=0
matrix[:, 3][0:3] = (2.0, 3.0, 0.0)
ifcopenshell.api.run("geometry.edit_object_placement", model,
product=wall, matrix=matrix, is_si=True)
# IfcOpenShell: all schema versions
# Create a wall with an opening (boolean subtraction)
wall = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcWall", name="Wall with Opening")
wall_rep = ifcopenshell.api.run("geometry.add_wall_representation", model,
context=body, length=5.0, height=3.0, thickness=0.2)
ifcopenshell.api.run("geometry.assign_representation", model,
product=wall, representation=wall_rep)
# Create an opening element
opening = ifcopenshell.api.run("root.create_entity", model,
ifc_class="IfcOpeningElement", name="Door Opening")
opening_rep = ifcopenshell.api.run("geometry.add_wall_representation", model,
context=body, length=0.9, height=2.1, thickness=0.2)
ifcopenshell.api.run("geometry.assign_representation", model,
product=opening, representation=opening_rep)
# Create void relationship (boolean subtraction)
ifcopenshell.api.run("void.add_opening", model,
opening=opening, element=wall)
For detailed code examples of these operations, see Working Code Examples:
ifcopenshell.util.shape for grouped vertex/edge/face arraysFor complete settings and data structure tables, see API Method Signatures.
ifcopenshell.geom is schema-agnostic. The same create_shape() and iterator calls work for IFC2X3, IFC4, and IFC4X3 files.ifcopenshell.api.geometry.* is also schema-agnostic — the API handles schema differences internally.ShapeBuilder utility (ifcopenshell.util.shape_builder) works across all schema versions.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lagzgabrielmuller-dot/kit-ingenieria-3d --plugin blender-bim-sverchok73 skills in this plugin
/aec-agents-workflow-orchestratorUse when a task spans multiple AEC technologies (Blender, IfcOpenShell, Bonsai, Sverchok) and you need to decide which tool handles which step, or when orchestrating multi-step BIM pipelines such as IFC creation to visualization to authoring. Prevents the common mistake of mixing IfcStore.get_file() with ifcopenshell.open() in the same context, or calling Bonsai operators outside a Bonsai-loaded session. Provides decision trees for technology selection, workflow sequencing, and bridge patterns between tools. Keywords: cross-technology, workflow orchestration, BIM pipeline, technology selection, Blender IfcOpenShell Bonsai integration, multi-step AEC, bridge pattern, which tool should I use, combine Blender and IFC, multi-tool workflow, how to connect tools.
/aec-core-bim-workflowsUse when implementing end-to-end BIM workflows that combine IfcOpenShell, Bonsai, and Blender -- such as IFC creation from scratch, model enrichment, validation pipelines, geometry extraction, or batch processing of building models. Prevents the common mistake of skipping unit and context setup before creating geometry, or directly modifying IFC attributes instead of using ifcopenshell.api.run(). Covers property set management across tools, spatial hierarchy patterns, and version compatibility for IFC2X3/IFC4/IFC4X3. Keywords: BIM workflow, IFC creation, model validation, property extraction, batch processing, spatial hierarchy, cross-technology, IfcOpenShell Bonsai Blender, pset management, how to create IFC model, step by step BIM, get properties from IFC.
Other plugins' skills for the same job