[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA7PB0S0XYM2TP9XTW4MZB":3,"skill-same:01M7FA7PB0S0XYM2TP9XTW4MZB":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7FA7PB0S0XYM2TP9XTW4MZB","bonsai-impl-drawing",null,"Use when generating 2D drawings from IFC models in Bonsai -- plans, sections, elevations, annotations, or sheet layouts. Prevents the common mistake of creating views without proper drawing style configuration (getting empty or unfiltered output). Covers the complete documentation pipeline from model views through annotations to printable SVG sheet output. Keywords: drawing, plan, section, elevation, annotation, sheet, SVG, titleblock, documentation, 2D drawing, Bonsai drawing, create floor plan, generate section view, print drawings.","lagzgabrielmuller-dot\u002Fkit-ingenieria-3d","lagzgabrielmuller-dot","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F333339260?v=4","01M7F985KYC0XB2XZ97B5YWH4C","01M7F985MHK8N2NVE4VAR5WBWS",0,"MIT","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: bonsai-impl-drawing\ndescription: >\n  Use when generating 2D drawings from IFC models in Bonsai -- plans, sections, elevations,\n  annotations, or sheet layouts. Prevents the common mistake of creating views without proper\n  drawing style configuration (getting empty or unfiltered output). Covers the complete\n  documentation pipeline from model views through annotations to printable SVG sheet output.\n  Keywords: drawing, plan, section, elevation, annotation, sheet, SVG, titleblock, documentation, 2D drawing, Bonsai drawing, create floor plan, generate section view, print drawings.\nlicense: MIT\ncompatibility: Designed for Claude Code. Requires Python 3.x.\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# Bonsai Drawing and Documentation: Implementation Guide\n\n> **Version**: Bonsai v0.8.x | Blender 4.2+ | Python 3.11\n> **Module path**: `bonsai.bim.module.drawing` — NEVER `blenderbim.bim.module.drawing`\n> **Dependencies**: bonsai-core-architecture (Bonsai tool\u002Fcore\u002Foperator pattern)\n\n## 1. Critical Warnings\n\n- ALWAYS use `bonsai.bim.module.drawing` — NEVER use `blenderbim.bim.module.drawing` (legacy name)\n- ALWAYS activate a drawing camera before calling `bim.create_drawing`\n- NEVER edit generated SVG files directly — ALWAYS modify annotations in Blender and regenerate\n- ALWAYS install InkScape before using sheet composition or PDF export\n- Annotations are ONLY generated for orthographic camera views — NEVER for perspective views\n- ALWAYS sync IFC data before generating drawings (`sync=True` or save first)\n- ALWAYS use project-relative paths for titleblock SVG templates\n\n## 2. Architecture Overview\n\nThe drawing module follows Bonsai's core\u002Ftool\u002Foperator pattern:\n\n```\nbonsai\u002Fcore\u002Fdrawing.py        → Pure logic (no Blender imports)\nbonsai\u002Ftool\u002Fdrawing.py         → Blender-specific implementation\nbonsai\u002Fbim\u002Fmodule\u002Fdrawing\u002F\n├── operator.py                → 40+ Blender operators\n├── prop.py                    → Property definitions\n├── ui.py                      → Panel UI\n├── annotation.py              → Annotator class (geometry creation)\n├── svgwriter.py               → SvgWriter class (SVG engine)\n├── sheeter.py                 → SheetBuilder class (sheet composition)\n├── decoration.py              → Viewport decorations\n├── gizmos.py                  → Interactive annotation gizmos\n├── handler.py                 → Event handlers\n├── helper.py                  → Utilities (format_distance, BoundingBox)\n├── scheduler.py               → Schedule\u002Ftable generation\n├── shaders.py                 → GPU shaders for viewport\n├── workspace.py               → AnnotationTool workspace + keymaps\n└── data.py                    → Data loading and caching\n```\n\n## 3. Drawing Types Decision Tree\n\n```\nWhat type of drawing do you need?\n│\n├─ Floor plan (top-down view)        → target_view=\"PLAN_VIEW\"\n├─ Vertical section (cut through)    → target_view=\"SECTION_VIEW\"\n├─ Facade\u002Fexternal view              → target_view=\"ELEVATION_VIEW\"\n├─ Reflected ceiling plan            → target_view=\"REFLECTED_PLAN_VIEW\"\n└─ 3D perspective\u002Faxonometric        → target_view=\"MODEL_VIEW\"\n```\n\nEach drawing is backed by:\n- An `IfcAnnotation` entity in an `IfcGroup`\n- Properties in `EPset_Drawing` property set:\n  - `TargetView` — one of the five view types\n  - `Scale` — diagram scale (e.g., \"1:100\")\n  - `HumanScale` — display string for scale\n  - `HasUnderlay` — render-based background image toggle\n  - `HasLinework` — vector line drawing toggle\n  - `HasAnnotation` — annotation overlay toggle\n\n## 4. Complete Drawing Pipeline\n\n### 4.1 Step 1: Create a Drawing\n\n```python\n# Bonsai v0.8.x: Add a plan view drawing\nimport bpy\n\nbpy.ops.bim.add_drawing(\n    target_view=\"PLAN_VIEW\",\n    location_hint=0  # 0 = auto-detect from active storey\n)\n```\n\n**Location hint rules**:\n- `PLAN_VIEW` \u002F `REFLECTED_PLAN_VIEW`: `location_hint` maps to building storey index\n- `SECTION_VIEW` \u002F `ELEVATION_VIEW`: `location_hint` represents direction (N\u002FS\u002FE\u002FW)\n- `MODEL_VIEW`: `location_hint` is ignored\n\n**Core function** (`bonsai\u002Fcore\u002Fdrawing.py`):\n\n```python\n# Bonsai v0.8.x: add_drawing creates:\n# 1. Unique drawing name from target_view\n# 2. Camera matrix from target_view + location_hint\n# 3. IfcAnnotation via ifcopenshell.api.run(\"root.create_entity\")\n# 4. IfcGroup for annotations\n# 5. IfcDocumentReference to SVG output path\n# 6. EPset_Drawing properties (TargetView, Scale, etc.)\n# 7. Blender camera object assigned to collection\n```\n\n### 4.2 Step 2: Configure Camera Properties\n\n```python\n# Bonsai v0.8.x: Camera\u002Fdrawing configuration\n# Access via camera object's BIMCameraProperties\n\n# Scale options (metric):\n#   1:5000, 1:2000, 1:1000, 1:500, 1:200, 1:100, 1:50,\n#   1:20, 1:10, 1:5, 1:2, 1:1, CUSTOM\n# Custom scale: custom_scale_numerator \u002F custom_scale_denominator\n\n# Camera type: ORTHO (orthographic) | PERSP (perspective)\n# Raster resolution: raster_x, raster_y (default 1000 px each)\n# DPI: default 75\n# View dimensions: width, height (default 50 m each)\n# NTS flag: is_nts (Not To Scale)\n```\n\n**Layer toggles** (control what the drawing contains):\n- `has_underlay` — render-based background image\n- `has_linework` — vector line drawing\n- `has_annotation` — annotation overlays\n\n**Filter mode**: `NONE` or include\u002Fexclude filter groups for element visibility control.\n\n### 4.3 Step 3: Add Annotations\n\n```python\n# Bonsai v0.8.x: Add annotations to the active drawing\nimport bpy\n\n# PREREQUISITE: MUST have active drawing (camera view)\n\n# Add a text annotation\nbpy.ops.bim.add_annotation(object_type=\"TEXT\")\n\n# Add a dimension with type reference\nbpy.ops.bim.add_annotation(\n    object_type=\"DIMENSION\",\n    relating_type_id=42  # IFC ID of annotation type\n)\n```\n\n**Supported annotation types**:\n\n| Type | Description | Blender Data |\n|------|-------------|-------------|\n| `TEXT` | Text labels | Mesh |\n| `TEXT_LEADER` | Text with leader line | Curve |\n| `DIMENSION` | Linear dimensions | Mesh |\n| `ANGLE` | Angular dimensions | Mesh |\n| `SECTION_LEVEL` | Section cut markers | Mesh |\n| `PLAN_LEVEL` | Level indicators | Mesh |\n| `ELEVATION` | Elevation markers (SVG symbols) | Mesh |\n| `GRID` | Grid line references | Mesh |\n| `FILL_AREA` | Hatching and fills | Mesh |\n| `STAIR_ARROW` | Stair direction indicators | Mesh |\n| `HIDDEN_LINE` | Hidden\u002Fdashed lines | Mesh |\n| `BREAKLINE` | Break line symbols | Mesh |\n\n**Text properties** (`BIMTextProperties`):\n- Font sizes (mm): 1.8, 2.5, 3.5, 5.0, 7.0\n- Horizontal alignment: left, middle, right\n- Vertical alignment: top, middle, bottom\n- Literals support 16 categories: Basic, Attributes, Property Sets, Material, Task, Cost, etc.\n- SVG output supports markdown: bold, italic, links, bullet points\n\n### 4.4 Step 4: Generate SVG Drawing\n\n```python\n# Bonsai v0.8.x: Generate SVG from active drawing\nbpy.ops.bim.create_drawing(\n    sync=True,         # Pre-sync IFC data (ALWAYS recommended)\n    print_all=False,   # False = active drawing only; True = all checked drawings\n    open_viewer=False  # Launch viewer after generation\n)\n```\n\n**SVG generation pipeline**:\n\n```\nCreateDrawing Pipeline (bim.create_drawing):\n1. Initialize camera and drawing metadata\n2. Sync IFC file (if sync=True)\n3. Generate UNDERLAY (raster render → PNG → embedded in SVG)\n4. Generate LINEWORK (vector):\n   ├─ OPENCASCADE mode → HLR via OCC library (precise, slower)\n   └─ FREESTYLE mode → Blender Freestyle SVG Exporter (artistic, faster)\n5. Generate ANNOTATIONS (via SvgWriter, orthographic only)\n6. Combine all SVG layers into final output\n```\n\n**Linework mode decision**:\n\n| Situation | Use |\n|-----------|-----|\n| Precise hidden-line removal needed | `OPENCASCADE` mode |\n| Artistic line styles preferred | `FREESTYLE` mode |\n| FREESTYLE mode selected | ALWAYS verify Freestyle SVG Exporter add-on is enabled |\n\n**Fill modes** (`fill_mode`): `NONE`, `SHAPELY` (polygon fills), `SVGFILL` (SVG-native patterns)\n\n**Cut modes** (`cut_mode`): `BISECT` (Blender mesh bisect), `OPENCASCADE` (OCC section cutting)\n\n### 4.5 Step 5: Compose Sheets\n\n```python\n# Bonsai v0.8.x: Sheet composition pipeline\n\n# Step 1: Create sheet with titleblock\nbpy.ops.bim.add_sheet()\n# Creates IfcDocumentInformation + IfcDocumentReference\n# Generates base SVG layout from titleblock template\n\n# Step 2: Add drawings to sheet\nbpy.ops.bim.add_drawing_to_sheet()\n# Links drawing (IfcDocumentReference) to the sheet\n\n# Step 3: Build final sheet\nbpy.ops.bim.create_sheets()\n# Composes all drawings into sheet SVG\n# Optionally exports to PDF\u002FDXF (requires InkScape)\n```\n\n**SheetBuilder** (`sheeter.py`) composition process:\n1. **Titleblock Processing**: embeds titleblock SVG, applies geolocation data\n2. **Drawing Integration**: embeds drawing SVGs with style isolation via `ensure_drawing_unique_styles()` (prefixes CSS classes), applies clipping paths\n3. **Document Assembly**: incorporates schedules, resolves mustache-syntax template variables\n\n**Auto-layout** (`next_drawing_location()`):\n- Default start: (30, 30) mm\n- Padding: 10 mm between drawings\n- Horizontal placement within rows, new row when exceeding titleblock width\n- Default titleblock width: 840 mm\n\n### 4.6 Step 6: Export and Open\n\n```python\n# Bonsai v0.8.x: Open generated outputs\nbpy.ops.bim.open_drawing()   # Open SVG with system viewer\nbpy.ops.bim.open_sheet()     # Open sheet with system viewer\nbpy.ops.bim.open_layout()    # Open SVG layout file\n```\n\n## 5. SVG Coordinate Pipeline\n\nThe `SvgWriter` converts 3D model coordinates to SVG canvas:\n\n```\n3D world coordinates\n    → project_point_onto_camera() (plane intersection)\n    → camera-space coordinates\n    → offset to canvas center, scale by (diagram_scale × 1000)\n    → SVG canvas coordinates (millimeters)\n```\n\nUnit conversion: IFC meters → SVG millimeters.\n\n`convert_to_mm()` normalizes CSS length units (cm, in, pt, px, Q, pc) to millimeters for positioning.\n\n## 6. Key Operator Reference\n\n| Operator | bl_idname | Purpose |\n|----------|-----------|---------|\n| AddDrawing | `bim.add_drawing` | Create new drawing view with camera |\n| CreateDrawing | `bim.create_drawing` | Generate\u002Frefresh SVG |\n| DuplicateDrawing | `bim.duplicate_drawing` | Copy drawing (optional annotation copy) |\n| AddAnnotation | `bim.add_annotation` | Add annotation to active drawing |\n| AddAnnotationType | `bim.add_annotation_type` | Create annotation type template |\n| AddSheet | `bim.add_sheet` | Create new sheet document |\n| CreateSheets | `bim.create_sheets` | Build sheets with PDF\u002FDXF export |\n| AddDrawingToSheet | `bim.add_drawing_to_sheet` | Link drawing to sheet |\n| OpenSheet | `bim.open_sheet` | Open sheet with viewer |\n| OpenDrawing | `bim.open_drawing` | Open SVG with viewer |\n| OpenLayout | `bim.open_layout` | Open SVG layout file |\n| ActivateModel | `bim.activate_model` | Switch to 3D model view |\n| SelectAllDrawings | `bim.select_all_drawings` | Batch select drawings |\n| SelectAllSheets | `bim.select_all_sheets` | Batch select sheets |\n\n## 7. Annotation Workspace\n\nThe `AnnotationTool` workspace provides dedicated annotation editing:\n\n| Shortcut | Action |\n|----------|--------|\n| `Shift+A` | Add new annotation |\n| `Shift+T` | Bulk tag (auto-adjust to selected objects) |\n| `Shift+G` | Readjust tags based on assigned products |\n| `Shift+E` | Edit text annotations |\n\n## 8. Drawing Style Configuration\n\n`DrawingStyle` PropertyGroup controls rendering appearance:\n- `render_type`: `DEFAULT` (Blender render settings) or `VIEWPORT` (viewport shading)\n- `raster_style`: JSON-formatted render configuration string\n\n## 9. Reference Files\n\n- **[references\u002Fmethods.md](references\u002Fmethods.md)** — Complete drawing API signatures\n- **[references\u002Fexamples.md](references\u002Fexamples.md)** — Working drawing workflow examples\n- **[references\u002Fanti-patterns.md](references\u002Fanti-patterns.md)** — Drawing anti-patterns and mistakes to avoid\n\n## 10. Dependencies\n\n- **InkScape**: REQUIRED for sheet composition and PDF\u002FDXF export\n- **OpenCASCADE** (via ifcopenshell): REQUIRED for OPENCASCADE linework\u002Fcut modes\n- **Shapely**: REQUIRED for SHAPELY fill mode and polygon operations\n- **Freestyle SVG Exporter**: REQUIRED when using FREESTYLE linework mode (Blender add-on)\n","# Bonsai Drawing and Documentation: Implementation Guide\n\n> **Version**: Bonsai v0.8.x | Blender 4.2+ | Python 3.11\n> **Module path**: `bonsai.bim.module.drawing` — NEVER `blenderbim.bim.module.drawing`\n> **Dependencies**: bonsai-core-architecture (Bonsai tool\u002Fcore\u002Foperator pattern)\n\n## 1. Critical Warnings\n\n- ALWAYS use `bonsai.bim.module.drawing` — NEVER use `blenderbim.bim.module.drawing` (legacy name)\n- ALWAYS activate a drawing camera before calling `bim.create_drawing`\n- NEVER edit generated SVG files directly — ALWAYS modify annotations in Blender and regenerate\n- ALWAYS install InkScape before using sheet composition or PDF export\n- Annotations are ONLY generated for orthographic camera views — NEVER for perspective views\n- ALWAYS sync IFC data before generating drawings (`sync=True` or save first)\n- ALWAYS use project-relative paths for titleblock SVG templates\n\n## 2. Architecture Overview\n\nThe drawing module follows Bonsai's core\u002Ftool\u002Foperator pattern:\n\n```\nbonsai\u002Fcore\u002Fdrawing.py        → Pure logic (no Blender imports)\nbonsai\u002Ftool\u002Fdrawing.py         → Blender-specific implementation\nbonsai\u002Fbim\u002Fmodule\u002Fdrawing\u002F\n├── operator.py                → 40+ Blender operators\n├── prop.py                    → Property definitions\n├── ui.py                      → Panel UI\n├── annotation.py              → Annotator class (geometry creation)\n├── svgwriter.py               → SvgWriter class (SVG engine)\n├── sheeter.py                 → SheetBuilder class (sheet composition)\n├── decoration.py              → Viewport decorations\n├── gizmos.py                  → Interactive annotation gizmos\n├── handler.py                 → Event handlers\n├── helper.py                  → Utilities (format_distance, BoundingBox)\n├── scheduler.py               → Schedule\u002Ftable generation\n├── shaders.py                 → GPU shaders for viewport\n├── workspace.py               → AnnotationTool workspace + keymaps\n└── data.py                    → Data loading and caching\n```\n\n## 3. Drawing Types Decision Tree\n\n```\nWhat type of drawing do you need?\n│\n├─ Floor plan (top-down view)        → target_view=\"PLAN_VIEW\"\n├─ Vertical section (cut through)    → target_view=\"SECTION_VIEW\"\n├─ Facade\u002Fexternal view              → target_view=\"ELEVATION_VIEW\"\n├─ Reflected ceiling plan            → target_view=\"REFLECTED_PLAN_VIEW\"\n└─ 3D perspective\u002Faxonometric        → target_view=\"MODEL_VIEW\"\n```\n\nEach drawing is backed by:\n- An `IfcAnnotation` entity in an `IfcGroup`\n- Properties in `EPset_Drawing` property set:\n  - `TargetView` — one of the five view types\n  - `Scale` — diagram scale (e.g., \"1:100\")\n  - `HumanScale` — display string for scale\n  - `HasUnderlay` — render-based background image toggle\n  - `HasLinework` — vector line drawing toggle\n  - `HasAnnotation` — annotation overlay toggle\n\n## 4. Complete Drawing Pipeline\n\n### 4.1 Step 1: Create a Drawing\n\n```python\n# Bonsai v0.8.x: Add a plan view drawing\nimport bpy\n\nbpy.ops.bim.add_drawing(\n    target_view=\"PLAN_VIEW\",\n    location_hint=0  # 0 = auto-detect from active storey\n)\n```\n\n**Location hint rules**:\n- `PLAN_VIEW` \u002F `REFLECTED_PLAN_VIEW`: `location_hint` maps to building storey index\n- `SECTION_VIEW` \u002F `ELEVATION_VIEW`: `location_hint` represents direction (N\u002FS\u002FE\u002FW)\n- `MODEL_VIEW`: `location_hint` is ignored\n\n**Core function** (`bonsai\u002Fcore\u002Fdrawing.py`):\n\n```python\n# Bonsai v0.8.x: add_drawing creates:\n# 1. Unique drawing name from target_view\n# 2. Camera matrix from target_view + location_hint\n# 3. IfcAnnotation via ifcopenshell.api.run(\"root.create_entity\")\n# 4. IfcGroup for annotations\n# 5. IfcDocumentReference to SVG output path\n# 6. EPset_Drawing properties (TargetView, Scale, etc.)\n# 7. Blender camera object assigned to collection\n```\n\n### 4.2 Step 2: Configure Camera Properties\n\n```python\n# Bonsai v0.8.x: Camera\u002Fdrawing configuration\n# Access via camera object's BIMCameraProperties\n\n# Scale options (metric):\n#   1:5000, 1:2000, 1:1000, 1:500, 1:200, 1:100, 1:50,\n#   1:20, 1:10, 1:5, 1:2, 1:1, CUSTOM\n# Custom scale: custom_scale_numerator \u002F custom_scale_denominator\n\n# Camera type: ORTHO (orthographic) | PERSP (perspective)\n# Raster resolution: raster_x, raster_y (default 1000 px each)\n# DPI: default 75\n# View dimensions: width, height (default 50 m each)\n# NTS flag: is_nts (Not To Scale)\n```\n\n**Layer toggles** (control what the drawing contains):\n- `has_underlay` — render-based background image\n- `has_linework` — vector line drawing\n- `has_annotation` — annotation overlays\n\n**Filter mode**: `NONE` or include\u002Fexclude filter groups for element visibility control.\n\n### 4.3 Step 3: Add Annotations\n\n```python\n# Bonsai v0.8.x: Add annotations to the active drawing\nimport bpy\n\n# PREREQUISITE: MUST have active drawing (camera view)\n\n# Add a text annotation\nbpy.ops.bim.add_annotation(object_type=\"TEXT\")\n\n# Add a dimension with type reference\nbpy.ops.bim.add_annotation(\n    object_type=\"DIMENSION\",\n    relating_type_id=42  # IFC ID of annotation type\n)\n```\n\n**Supported annotation types**:\n\n| Type | Description | Blender Data |\n|------|-------------|-------------|\n| `TEXT` | Text labels | Mesh |\n| `TEXT_LEADER` | Text with leader line | Curve |\n| `DIMENSION` | Linear dimensions | Mesh |\n| `ANGLE` | Angular dimensions | Mesh |\n| `SECTION_LEVEL` | Section cut markers | Mesh |\n| `PLAN_LEVEL` | Level indicators | Mesh |\n| `ELEVATION` | Elevation markers (SVG symbols) | Mesh |\n| `GRID` | Grid line references | Mesh |\n| `FILL_AREA` | Hatching and fills | Mesh |\n| `STAIR_ARROW` | Stair direction indicators | Mesh |\n| `HIDDEN_LINE` | Hidden\u002Fdashed lines | Mesh |\n| `BREAKLINE` | Break line symbols | Mesh |\n\n**Text properties** (`BIMTextProperties`):\n- Font sizes (mm): 1.8, 2.5, 3.5, 5.0, 7.0\n- Horizontal alignment: left, middle, right\n- Vertical alignment: top, middle, bottom\n- Literals support 16 categories: Basic, Attributes, Property Sets, Material, Task, Cost, etc.\n- SVG output supports markdown: bold, italic, links, bullet points\n\n### 4.4 Step 4: Generate SVG Drawing\n\n```python\n# Bonsai v0.8.x: Generate SVG from active drawing\nbpy.ops.bim.create_drawing(\n    sync=True,         # Pre-sync IFC data (ALWAYS recommended)\n    print_all=False,   # False = active drawing only; True = all checked drawings\n    open_viewer=False  # Launch viewer after generation\n)\n```\n\n**SVG generation pipeline**:\n\n```\nCreateDrawing Pipeline (bim.create_drawing):\n1. Initialize camera and drawing metadata\n2. Sync IFC file (if sync=True)\n3. Generate UNDERLAY (raster render → PNG → embedded in SVG)\n4. Generate LINEWORK (vector):\n   ├─ OPENCASCADE mode → HLR via OCC library (precise, slower)\n   └─ FREESTYLE mode → Blender Freestyle SVG Exporter (artistic, faster)\n5. Generate ANNOTATIONS (via SvgWriter, orthographic only)\n6. Combine all SVG layers into final output\n```\n\n**Linework mode decision**:\n\n| Situation | Use |\n|-----------|-----|\n| Precise hidden-line removal needed | `OPENCASCADE` mode |\n| Artistic line styles preferred | `FREESTYLE` mode |\n| FREESTYLE mode selected | ALWAYS verify Freestyle SVG Exporter add-on is enabled |\n\n**Fill modes** (`fill_mode`): `NONE`, `SHAPELY` (polygon fills), `SVGFILL` (SVG-native patterns)\n\n**Cut modes** (`cut_mode`): `BISECT` (Blender mesh bisect), `OPENCASCADE` (OCC section cutting)\n\n### 4.5 Step 5: Compose Sheets\n\n```python\n# Bonsai v0.8.x: Sheet composition pipeline\n\n# Step 1: Create sheet with titleblock\nbpy.ops.bim.add_sheet()\n# Creates IfcDocumentInformation + IfcDocumentReference\n# Generates base SVG layout from titleblock template\n\n# Step 2: Add drawings to sheet\nbpy.ops.bim.add_drawing_to_sheet()\n# Links drawing (IfcDocumentReference) to the sheet\n\n# Step 3: Build final sheet\nbpy.ops.bim.create_sheets()\n# Composes all drawings into sheet SVG\n# Optionally exports to PDF\u002FDXF (requires InkScape)\n```\n\n**SheetBuilder** (`sheeter.py`) composition process:\n1. **Titleblock Processing**: embeds titleblock SVG, applies geolocation data\n2. **Drawing Integration**: embeds drawing SVGs with style isolation via `ensure_drawing_unique_styles()` (prefixes CSS classes), applies clipping paths\n3. **Document Assembly**: incorporates schedules, resolves mustache-syntax template variables\n\n**Auto-layout** (`next_drawing_location()`):\n- Default start: (30, 30) mm\n- Padding: 10 mm between drawings\n- Horizontal placement within rows, new row when exceeding titleblock width\n- Default titleblock width: 840 mm\n\n### 4.6 Step 6: Export and Open\n\n```python\n# Bonsai v0.8.x: Open generated outputs\nbpy.ops.bim.open_drawing()   # Open SVG with system viewer\nbpy.ops.bim.open_sheet()     # Open sheet with system viewer\nbpy.ops.bim.open_layout()    # Open SVG layout file\n```\n\n## 5. SVG Coordinate Pipeline\n\nThe `SvgWriter` converts 3D model coordinates to SVG canvas:\n\n```\n3D world coordinates\n    → project_point_onto_camera() (plane intersection)\n    → camera-space coordinates\n    → offset to canvas center, scale by (diagram_scale × 1000)\n    → SVG canvas coordinates (millimeters)\n```\n\nUnit conversion: IFC meters → SVG millimeters.\n\n`convert_to_mm()` normalizes CSS length units (cm, in, pt, px, Q, pc) to millimeters for positioning.\n\n## 6. Key Operator Reference\n\n| Operator | bl_idname | Purpose |\n|----------|-----------|---------|\n| AddDrawing | `bim.add_drawing` | Create new drawing view with camera |\n| CreateDrawing | `bim.create_drawing` | Generate\u002Frefresh SVG |\n| DuplicateDrawing | `bim.duplicate_drawing` | Copy drawing (optional annotation copy) |\n| AddAnnotation | `bim.add_annotation` | Add annotation to active drawing |\n| AddAnnotationType | `bim.add_annotation_type` | Create annotation type template |\n| AddSheet | `bim.add_sheet` | Create new sheet document |\n| CreateSheets | `bim.create_sheets` | Build sheets with PDF\u002FDXF export |\n| AddDrawingToSheet | `bim.add_drawing_to_sheet` | Link drawing to sheet |\n| OpenSheet | `bim.open_sheet` | Open sheet with viewer |\n| OpenDrawing | `bim.open_drawing` | Open SVG with viewer |\n| OpenLayout | `bim.open_layout` | Open SVG layout file |\n| ActivateModel | `bim.activate_model` | Switch to 3D model view |\n| SelectAllDrawings | `bim.select_all_drawings` | Batch select drawings |\n| SelectAllSheets | `bim.select_all_sheets` | Batch select sheets |\n\n## 7. Annotation Workspace\n\nThe `AnnotationTool` workspace provides dedicated annotation editing:\n\n| Shortcut | Action |\n|----------|--------|\n| `Shift+A` | Add new annotation |\n| `Shift+T` | Bulk tag (auto-adjust to selected objects) |\n| `Shift+G` | Readjust tags based on assigned products |\n| `Shift+E` | Edit text annotations |\n\n## 8. Drawing Style Configuration\n\n`DrawingStyle` PropertyGroup controls rendering appearance:\n- `render_type`: `DEFAULT` (Blender render settings) or `VIEWPORT` (viewport shading)\n- `raster_style`: JSON-formatted render configuration string\n\n## 9. Reference Files\n\n- **[references\u002Fmethods.md](references\u002Fmethods.md)** — Complete drawing API signatures\n- **[references\u002Fexamples.md](references\u002Fexamples.md)** — Working drawing workflow examples\n- **[references\u002Fanti-patterns.md](references\u002Fanti-patterns.md)** — Drawing anti-patterns and mistakes to avoid\n\n## 10. Dependencies\n\n- **InkScape**: REQUIRED for sheet composition and PDF\u002FDXF export\n- **OpenCASCADE** (via ifcopenshell): REQUIRED for OPENCASCADE linework\u002Fcut modes\n- **Shapely**: REQUIRED for SHAPELY fill mode and polygon operations\n- **Freestyle SVG Exporter**: REQUIRED when using FREESTYLE linework mode (Blender add-on)\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when generating 2D drawings from IFC models in Bonsai -- plans, sections, elevations, annotations, or sheet layouts. Prevents the common mistake of creating views without proper drawing style configuration (getting empty or unfiltered output). Covers the complete documentation pipeline from model views through annotations to printable SVG sheet output. Keywords: drawing, plan, section, elevation, annotation, sheet, SVG, titleblock, documentation, 2D drawing, Bonsai drawing, create floor plan, generate section view, print drawings.\n","Designed for Claude Code. Requires Python 3.x.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot","2026-11-09 13:26:47",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill bonsai-impl-drawing",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill bonsai-impl-drawing",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill bonsai-impl-drawing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",8044,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",7094,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",10839,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fbonsai\u002Fimpl\u002Fbonsai-impl-drawing\u002Freferences\u002Fmethods.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7FBFSZ93YM463CGS91D0TZG","manimce-best-practices","Trigger when: (1) User mentions \"manim\" or \"Manim Community\" or \"ManimCE\", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes.\n\nBest practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX\u002FMathTex, 3D with ThreeDScene, camera control, styling, and CLI usage.\n\nNOT for ManimGL\u002F3b1b version (which uses `manimlib` imports and `manimgl` CLI).","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FB2K59HNNXS9WKHAMWHC3C","drawio","Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML\u002FER, org charts, Mermaid\u002FCSV conversion, existing .drawio bundles, style presets, themes, and non-publication formula diagrams. For publication figures (paper, thesis, IEEE, camera-ready) use drawio-academic-skills instead.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7FB2BWX7GWK9H2X8BGCYDDD","drawio-academic-skills","Publication-figure overlay for draw.io. Use instead of drawio whenever the diagram is for a paper, thesis, dissertation, journal, conference, IEEE\u002FACM submission, manuscript, camera-ready, Word\u002FLaTeX figure, or other publication. Applies venue, figure-type, color, caption\u002Flegend, formula, and paper-readability gates for architecture, workflow, roadmap, network-topology, and replicated paper figures.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio-academic-skills\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FB22JESEAV8T15DJT3D444","uncertainty-and-units","Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7FB1ANRSG28R335FDY9SA3R","statistical-analysis","Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7FB15KRA9D7JCPH4P9T6XJY","simpy","Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[]]