返回资讯中心
外部精选
软件工程
#开发者实时流

BIMCraft

Building information modeling; an open-source, clean-room take on the Autodesk Revit workflow, rebuilt in pure Rust.

Hacker News 最新Oarch2026/10/26 · 11 天前30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Building information modeling; an open-source, clean-room take on the Autodesk Revit workflow, rebuilt in pure Rust.

Model a building the way Revit does: levels, walls, doors and windows, floors and ceilings, rooms, columns, stairs, ramps and railings, roofs and shafts that know about each other. Draw plans, sections, elevations and a 3D view from them, lay them out on sheets, and read and write IFC. Every action is a command, so agents can drive it as well as you can.

By IPedrax.

The sample house (cargo run --release -p bimcraft -- --sample): Revit's layout in BIMCraft's own icons and colours, with dimensions, door and window tags, a spot elevation, a note, a section and the four elevation marks, all built from BIMCraft commands.

bimcraft-revits-workflow-in-pure-rust-web.mp4

BIMCraft in 34 seconds (AI-generated voiceover; download the mp4, 8.4 MB): the sample house built from 58 lines of text, its plans, sections, sheets and 3D view, a wall moved with its doors and room areas following, IFC in and out, and an agent building a house over MCP.

Screenshots · Why BIMCraft · What works today · Quick start · The desktop app · Agents, MCP and the CLI · Commands · Architecture · Roadmap · Downloads · License and credits

3D view: from the south-east, as Revit's default 3D view looks. Orbit, pan and zoom; click to select. Section: the cut in poché, the roof along its slope, what lies beyond in hidden line, levels and grids.

Sheets: views placed at a scale under a title block, printed to PDF a page each. Dark mode: the window and the views go dark; sheets stay white paper.

Snaps and the ruler: guides at angles from east and from the line before, so a 60° corner comes out exact. Wall grips: drag an end, with the same snaps and guides from the other end.

Schedules: the fields chosen, project parameters and calculated ones among them, totalled. Schedule Properties: fields, filters, sorting and grouping, as Revit's tabs have them.

Graphics overrides: what a view hides and how it draws the rest, by category, filter and element. Visibility/Graphics: categories, filters and elements, projection and cut each with their own line and fill.

Phases: what stood before in halftone, what comes down dashed red, what is new as the category draws it. Phasing: phases in order, and phase filters that say how a view shows each status.

Textures: a material's texture at its real size on the faces it lies on: brick in courses, boards, glass. Paint: a material laid over one face, as Revit's Paint does; Remove Paint takes it off.

Family Editor: parameters, types, forms (extrusions, revolves, voids) and a door's or window's plan symbols, with a preview. Materials: a texture from a pattern or a picture of yours, its tile size, and a favorite kept for every project.

Structure: beams, structural columns, isolated and wall footings and structural floors; Revit's Structure tab on one new element, the run (design). Section: a beam is cut across its section, a round run (a pipe, a steel tube) in a ring.

Beam tool: two clicks, or a chain of them, each step a beam; sketched before the click. Beam properties: heights at both ends, justification, and the system it belongs to.

Pipe tool: two clicks, or a chain; centred on its height by default, falling or rising with a second height. Pipe type: its diameter (or width and depth, if it isn't round) and its material.

Section: a pipe is cut in poché along the line, across it in a ring.

Device tool: the Type Selector lists only the families of its kind; Space turns what you place. Cable tray type: a width by a depth, or round, in a material.

Plumbing: the starter fixtures, a pipe falling to a drain and a riser, in 3D with the walls hidden. Electrical: a tray, a board, luminaires and devices at their mounting heights.

Lightning Protection (SPDA): NBR 5419's vocabulary on the same runs and fixtures; Revit has no such tab. SPDA in 3D: terminals, down conductors and the earthing ring and rods.

Data tab: outlets, a rack, a patch panel and cabling, in NBR 14565's words. Data in 3D: a tray, cables dropping to their outlets, a rack.

Performance sample

Start an original 20-storey, 9,521-element tower with bimcraft --highrise, or generate a native file with bimcraft-cli run --highrise --save highrise.bimcraft. The script is samples/highrise.txt. See the performance baseline for reproducible core/UI measurements and the remaining optimization work. Private local IFC fixtures and their results belong in the ignored test_model/ folder.

The 3D view can be drawn on the graphics card: File > Settings > Performance > Draw the 3D view on the graphics card, off until you turn it on. On that tower at 1920 × 1080 a changed frame took 1.3 ms on an NVIDIA GeForce RTX 3060, against 108 ms on the processor, and what is under the cursor is found in a bounding volume hierarchy instead of read from the picture. The card draws what the processor draws, with the same lighting, textures, edges, level lines and surfaces seen through (a mass, or what Visibility/Graphics makes transparent). Hidden line, wireframe, sections and sheets are still drawn on the processor, and so is everything when the card fails, when the window runs on OpenGL (the card is for Vulkan, Metal and DirectX 12) or when the computer has none; the Performance page says which.

The workflow you know. Revit's ribbon, the green contextual Modify tab, the Options Bar, Properties with the Type Selector and Edit Type, the Project Browser, views in tabs, and Revit's shortcuts: WA, DR, WN, RM, CL, DI, TG, MV, CO, RO, MM, AL, TR, SL, ME, CS, SA, VV, EH, MS, WB, FB, RB, UF, MH, and KS to list them all. Click to select, Ctrl adds, Shift takes away, Tab reaches what's underneath.

A real building model. Doors and windows live in their walls, rooms find their boundaries from the walls around them, walls joined at a corner stay joined when one moves, dimensions and tags follow what they measure and name, and every change is checked against the model's rules and can be undone.

Open files. IFC2x3 and IFC4 come in from Revit and other BIM tools, and IFC4 goes back out, checked with IfcOpenShell. Sheets print to PDF; any view saves as PNG, plans as SVG. Revit's own .rvt format has no public specification; bimcraft-cli reads a .rvt file with a reader fenced in docs/rvt-provenance.md: info shows its release, levels and element counts by category, and run and convert (and the MCP server's open) import its levels, walls, floors and ceilings, doors and windows, columns, rooms and roofs (flat ones by footprint, and gables and sheds by extrusion) into a project, listing what was left out and why. The desktop app's File > Open takes a .rvt too: it is read while the window says so, comes in as a new unsaved project, and a "Revit import report" lists what came in and what was left out.

Built for agents. Every tool, button and field is a command. Agents call any of them with JSON, inspect the model to check their work, and render any view to look at it, over MCP or the CLI.

Fast and native. Pure Rust and egui: no Electron, no web view. Packaged for Windows, Linux and macOS; developed on Linux, and the macOS app isn't tried by hand yet.

Free. MIT OR Apache-2.0, with no account and no subscription.

What works today

BIMCraft is in early, fast development. Honest status:

The IFC4 export is checked with IfcOpenShell 0.9: the sample house has no schema or EXPRESS rule errors, every element builds its geometry, and the walls' volumes (with the openings cut out), the roof's and the slabs' and ceilings' (with their shafts cut out) match a hand calculation, as do the roofs' of an L-shaped house with a dormer and an extrusion roof beside it, and of houses round a courtyard, their floors and ceilings open over it too, and of a house of layered walls, floors, ceilings and roofs, each with its material layer set, and of a flat furnished from the library, a mirrored chair among it. Import is checked against it too: the sample comes back the same from IFC, element by element, also with its geometry turned into triangle meshes by IfcOpenShell, and a building IfcOpenShell's API writes comes in whole, its roofs (slabs per slope, round a courtyard too, or a profile extruded) and its floors and ceilings round a courtyard (a profile with a void, or a mesh) among it, and its walls' and slabs' layers on the faces their layer sets are stacked from, and its furniture (a stool type placed twice, one turned, a proxy, a meshed basin) as components where it stood. Project parameters go out as property sets IfcOpenShell reads back typed as they were (text, a real, a length, a boolean), and come in from a property set its API writes, in metres. A phased sample has no schema or EXPRESS rule errors either, and IfcOpenShell reads each element's BIMCraft_Phasing set and the project's list of phases; they come back from IFC as they went out, and from a set its API writes (labels and a list value), while a set another tool calls its own, Phasing say, is left unread.

The engine and the CLI need Rust 1.90 or later; the desktop app needs 1.95 (egui 0.36).

git clone https://github.com/IPedrax/bimcraft cd bimcraft cargo run --release -p bimcraft -- --sample # opens the sample house

Without a window:

cargo build --release ./target/release/bimcraft-cli run --sample --save house.bimcraft --save house.ifc --save plan.png

That builds the sample house and saves the project, an IFC4 file and the Level 1 plan:

--cmd 'render {"view": "{3D}", "path": "house-3d.png"}' adds the 3D view (azimuth and elevation turn it); render {"view": "Section 1"} draws the sample's section, South (or North, East, West) one of its elevations, and render {"view": "A102"} one of its sheets. --save sheets.pdf prints every sheet, a page each.

A script is one command per line, id {json params}, with lengths in millimetres:

wall {"points": [[0,0],[8000,0],[8000,6000],[0,6000]], "closed": true, "type": "Exterior - 300mm"} door {"at": [2000, 0]} window {"at": [8000, 3000]} room {"point": [4000, 3000], "name": "Living"} floor {} roof {}

A script stops at its first failing line and names it. Through MCP, script {"text": …, "atomic": true} runs it all or nothing: a line that fails takes back the lines before it, and one that goes through is a single undo step.

bimcraft-cli run --script house.txt --save house.ifc bimcraft-cli convert building.ifc building.bimcraft # an IFC file from Revit or any BIM tool, as a project bimcraft-cli info house.bimcraft # levels, counts, types and warnings bimcraft-cli info building.rvt # a Revit file: release, last save, levels, elements by category bimcraft-cli convert building.rvt building.ifc # a Revit project, imported, then written as IFC4 bimcraft-cli convert house.bimcraft plan.svg bimcraft-cli commands # every command and its parameters

The desktop app

bimcraft [FILE] [--sample] opens a .bimcraft project, imports an .ifc file, or starts on the sample house. The layout is Revit's, so it should feel familiar: the Quick Access Toolbar; the ribbon's File, Architecture, Annotate, View and Modify tabs, with a green contextual tab (Modify | Place Wall, Modify | Walls) for the tool or the selection; the Options Bar; Properties over the Project Browser; views in tabs with a navigation bar; and the tool's prompt in the status bar. The icons and colours are BIMCraft's own, in a light theme or a dark one: BIMCraft starts in your system's, and View > Dark Mode or File > Settings switches.

Autosave runs in the background every two minutes while the model has unsaved changes (File > Settings > Files changes the interval or disables it). A saved project's recovery copy is <project filename>.autosave.bimcraft beside the project; an untitled project's copy is un

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →