# TactileBIM → FreeCAD plugin

Python-macro that imports a TactileBIM JSON export into FreeCAD as Arch / Draft objects.

## Status

Beta. Supports walls, lines, rectangles, circles, polylines, doors, and windows. Property-set preservation is partial — labels and layer names carry over, custom `notes`/`ifcClass` fields currently drop.

## Install

1. Download [`tactilebim_import.FCMacro`](./tactilebim_import.FCMacro).
2. Copy it to your FreeCAD macros folder:
   - Linux: `~/.FreeCAD/Macro/`
   - macOS: `~/Library/Preferences/FreeCAD/Macro/`
   - Windows: `%APPDATA%\FreeCAD\Macro\`
3. Open FreeCAD → `Macro` → `Macros…` → select `tactilebim_import` → `Execute`.

## Usage

1. In TactileBIM (`app.tactilebim.com`): **File → Export → JSON** to download a `.tbim.json` file.
2. Run the macro in FreeCAD and pick the file.
3. The drawing materialises as a new document (or into the active one) using the Arch + Draft workbenches.

## Round-trip

| Direction            | Status   | Notes |
|----------------------|----------|-------|
| TactileBIM → FreeCAD | Beta     | Walls, lines, rect, circle, polyline, door, window |
| FreeCAD → TactileBIM | Planned  | IFC export from FreeCAD works today as a workaround |

For production round-trips today, use **IFC 4.3** as the exchange format — both TactileBIM and FreeCAD's Arch workbench write compliant IFC.

## Troubleshooting

- **"Cannot find FreeCAD.Arch"**: Install the Arch workbench (default in FreeCAD 0.21+).
- **Doors/windows appear free-standing**: The macro places openings without a host wall when one can't be auto-detected. Move them manually in the 3D view or re-run with cleaner wall geometry.
- **Scale looks off**: The macro assumes millimetres. Check that FreeCAD's default unit is mm (Edit → Preferences → Units).

## Feedback

Open an issue at [github.com/Chrsolli/tactilebim-2](https://github.com/Chrsolli/tactilebim-2/issues) or email christofferlundsolli@gmail.com.
