{"id":48292470,"url":"https://github.com/bluecollar-systems/su-pdfimporter","last_synced_at":"2026-06-09T02:00:36.380Z","repository":{"id":345928885,"uuid":"1186781413","full_name":"BlueCollar-Systems/SU-PDFimporter","owner":"BlueCollar-Systems","description":"PDF Vector Importer for SketchUp — arc reconstruction, color grouping, dash patterns. Pure Ruby, no external dependencies.","archived":false,"fork":false,"pushed_at":"2026-05-24T18:53:44.000Z","size":421,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T20:28:19.281Z","etag":null,"topics":["cad","fabrication","pdf","pdf-importer","ruby","sketchup","sketchup-extension","vector-graphics"],"latest_commit_sha":null,"homepage":"https://bluecollar-systems.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueCollar-Systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-20T01:32:48.000Z","updated_at":"2026-05-24T18:53:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"20af9bd2-084c-40fd-9417-69a2e1805fb9","html_url":"https://github.com/BlueCollar-Systems/SU-PDFimporter","commit_stats":null,"previous_names":["bluecollar-systems/su-pdfimporter"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/BlueCollar-Systems/SU-PDFimporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueCollar-Systems%2FSU-PDFimporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueCollar-Systems%2FSU-PDFimporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueCollar-Systems%2FSU-PDFimporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueCollar-Systems%2FSU-PDFimporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueCollar-Systems","download_url":"https://codeload.github.com/BlueCollar-Systems/SU-PDFimporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueCollar-Systems%2FSU-PDFimporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34088013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","fabrication","pdf","pdf-importer","ruby","sketchup","sketchup-extension","vector-graphics"],"created_at":"2026-04-04T23:14:23.828Z","updated_at":"2026-06-09T02:00:36.360Z","avatar_url":"https://github.com/BlueCollar-Systems.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF Vector Importer for SketchUp\n\n**BUILT. NOT BOUGHT.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/Version-3.7.7-green.svg)]()\n[![Platform](https://img.shields.io/badge/Platform-SketchUp%202017%2B-orange.svg)]()\n[![Ruby](https://img.shields.io/badge/Ruby-2.2%2B-red.svg)]()\n\nImport PDF vector geometry as native editable SketchUp edges with arc reconstruction, color-based tag grouping, text import, dash patterns, Scale by Reference tool, and full Bezier support. Pure-Ruby PDF parser -- no external dependencies.\n\n---\n\n## Overview\n\nPDF Vector Importer parses PDF content streams directly in Ruby and reconstructs vector geometry as native SketchUp edges. No gems, no external binaries, no C extensions. It runs on every platform SketchUp supports, from SketchUp 2017 Make (Ruby 2.2) through the current Pro release.\n\nThe importer profiles each PDF document to identify its origin (fabrication drawings, CAD exports, architectural plans, vector art, or raster scans) and adapts its import strategy accordingly.\n\n---\n\n## Key Features\n\n- **4 Import Modes** (BCS-ARCH-001) — Auto (default, picks strategy per page),\n  Vector, Raster, Hybrid. Every mode targets maximum fidelity.\n- **4 Text Rendering Options** — Labels, 3D Text, Glyphs, Geometry\n  (orthogonal to mode) + separate Import text toggle\n- **Pure-Ruby PDF parser** — no gems or external dependencies required\n- **Adaptive Bezier subdivision** with configurable flatness tolerance\n- **Kasa algebraic circle fitting** for arc reconstruction from point sequences\n- **OCG layer support** — PDF Optional Content Groups map to SketchUp Tags\n- **Color-based tag grouping** with dash pattern mapping\n- **Scale by Reference** tool — select an edge, type the real-world dimension\n- **Quick Scale** with 15 architectural/engineering ratio preferences\n  (`1/4\"=1'-0\"`, `3/8\"=1'`, etc.)\n- **Architectural scale notation parsing**\n- **Import quality assessment** with warnings and performance metrics\n- **Post-import action workflow** (geometry only, scale, cleanup, feature inventory)\n- **Native DXF bridge command** from the extension menu/toolbar\n- **Tag visibility controls** for PDF layers\n- **Document profiling** (fabrication, CAD, architectural, vector art, raster)\n  drives Auto-mode strategy selection\n- **FlateDecode decompression** for compressed PDF streams\n- **Form XObject recursion** for embedded PDF forms\n\n---\n\n## Installation\n\n1. Download the latest `bc_pdf_vector_importer_vX.Y.Z.rbz` from [Releases](https://github.com/BlueCollar-Systems/SU-PDFimporter/releases)\n2. In SketchUp: **Window \u003e Extension Manager \u003e Install Extension**\n3. Select the `.rbz` file\n4. Restart SketchUp if prompted\n\nThe extension registers under **File \u003e Import** and adds a PDF Vector Importer toolbar.\n\nFor SketchUp 2025 users: native PDF import discoverability changed in SketchUp UI,\nbut this extension still provides dedicated PDF import menu and toolbar commands.\n\n---\n\n## Scale Tool\n\nThe Scale by Reference tool lets you correct imported geometry to real-world dimensions. Select any edge, type the known real dimension, and all imported geometry scales proportionally.\n\n### Quick Scale Presets\n\nThe Quick Scale dialog provides 15 architectural and engineering presets:\n\n| Preset | Scale Ratio | Factor | Common Use |\n|--------|-------------|--------|------------|\n| 1:1 | Full size | 1.0 | Detail drawings |\n| 1:2 | Half size | 0.5 | Large details |\n| 1:4 | Quarter size | 0.25 | Construction details |\n| 1:5 | 1/5 size | 0.2 | Detail drawings (metric) |\n| 1:8 | 1/8 size | 0.125 | Room plans |\n| 1:10 | 1/10 size | 0.1 | Detailed plans (metric) |\n| 1:16 | 1/16 size | 0.0625 | Section drawings |\n| 1:20 | 1/20 size | 0.05 | Building plans (metric) |\n| 1:24 | 1/24 size | 0.04167 | 1/2\"=1'-0\" plans |\n| 1:48 | 1/48 size | 0.02083 | 1/4\"=1'-0\" plans |\n| 1:50 | 1/50 size | 0.02 | General plans (metric) |\n| 1:96 | 1/96 size | 0.01042 | 1/8\"=1'-0\" plans |\n| 1:100 | 1/100 size | 0.01 | Site plans (metric) |\n| 1:192 | 1/192 size | 0.00521 | 1/16\"=1'-0\" plans |\n| 1:200 | 1/200 size | 0.005 | Site plans (metric) |\n\nThe tool also accepts freeform architectural notation such as `1/4\"=1'-0\"`, `3/8\"=1'`, `1\"=10'`, and similar formats.\n\n---\n\n## Import Report\n\nAfter every import, the extension presents a quality assessment report with three sections:\n\n### Quality Assessment (diagnostics only)\n\nThe post-import report shows a **quality grade** as a diagnostic summary of what the parser observed — not a user-selectable fidelity tier. Every import targets maximum fidelity (BCS-ARCH-001); the grade helps you decide whether to review the result, not which \"speed vs quality\" mode to use.\n\n- **Excellent** -- All vectors parsed, arcs reconstructed, no anomalies\n- **Good** -- Minor issues (small gaps, unclosed paths) that do not affect usability\n- **Fair** -- Some geometry lost or degraded; manual review recommended\n- **Poor** -- Significant parsing failures; consider alternate export settings or source PDF export settings\n\n### Warnings\n\nThe report flags common issues:\n\n- Clipping paths that may hide geometry\n- Extremely thin or zero-width strokes\n- Unsupported blend modes or transparency\n- Font-based geometry that could not be converted\n- Coordinate values outside the SketchUp modeling range\n- Pages with no extractable vector content (raster-only)\n\n### Performance Metrics\n\nEvery import logs timing and throughput data:\n\n- Total import time (seconds)\n- Objects imported (edges, arcs, faces)\n- Throughput (objects/sec)\n- PDF stream decompression time\n- Bezier subdivision iterations\n- Arc fitting attempts and successes\n\n---\n\n## Document Profiling\n\nThe importer analyzes each PDF and classifies it into one of five categories to optimize parsing:\n\n| Profile | Characteristics |\n|---------|----------------|\n| **Fabrication** | Shop drawings, cut lists, weld callouts, BOM tables |\n| **CAD** | Exported from AutoCAD, Revit, SolidWorks, or similar |\n| **Architectural** | Floor plans, elevations, sections with dimension strings |\n| **Vector Art** | Illustrator/Inkscape artwork, logos, complex fills |\n| **Raster** | Scanned documents with embedded images, minimal vectors |\n\n---\n\n## Source Structure\n\n```\nbc_pdf_vector_importer.rb            # Root loader\nbc_pdf_vector_importer/\n  main.rb                            # Extension entry point\n  pdf_parser.rb                      # Top-level PDF object parser\n  content_stream_parser.rb           # PDF content stream interpreter\n  geometry_builder.rb                # SketchUp geometry construction\n  arc_fitter.rb                      # Kasa circle fitting\n  bezier.rb                          # Adaptive Bezier subdivision\n  scale_tool.rb                      # Scale by Reference tool\n  report_dialog.rb                   # Import report UI\n  import_dialog.rb                   # Import options UI\n  unit_parser.rb                     # Architectural notation parser\n  geometry_cleanup.rb                # Post-import cleanup utilities\n  ocg_parser.rb                      # Optional Content Group parser\n  text_parser.rb                     # Text extraction and rendering\n  dimension_parser.rb                # Dimension string recognition\n  document_profiler.rb               # PDF document classification\n  generic_recognizer.rb              # Generic shape recognition\n  generic_classifier.rb              # Generic element classification\n  region_segmenter.rb                # Spatial region segmentation\n  primitive_extractor.rb             # Low-level drawing primitive extraction\n  primitives.rb                      # Primitive data structures\n  recognizer.rb                      # Pattern recognizer\n  hatch_detector.rb                  # Hatch pattern detection\n  stroke_font.rb                     # Single-stroke font rendering\n  svg_geometry_renderer.rb           # SVG geometry path renderer\n  svg_text_renderer.rb               # SVG text path renderer\n  external_text_extractor.rb         # External text extraction support\n  validator.rb                       # Input validation\n  xobject_parser.rb                  # Form XObject recursion\n  logger.rb                          # Logging utilities\n  metadata.rb                        # Version and extension metadata\n```\n\n---\n\n## Known Limitations\n\n| Limitation | Details |\n|-----------|---------|\n| **Encrypted PDFs** | Password-protected PDFs cannot be imported. Remove encryption first using Adobe Acrobat, Preview (macOS), or qpdf. |\n| **Compression filters** | FlateDecode is supported. LZWDecode, ASCII85Decode, ASCIIHexDecode, and RunLengthDecode streams are not fully supported and may be skipped. |\n| **Embedded fonts** | Text rendered with embedded subset fonts may not extract correctly. The importer can fall back to external pdftotext for higher-fidelity text extraction. |\n| **Clipped/XObject-heavy PDFs** | Deeply nested form XObjects and aggressive clipping can lead to partial geometry recovery. |\n| **Raster-only scans** | Pure image/scanned PDFs with no vector operators will not produce SketchUp edges. |\n| **Very large PDFs** | Files over 500 MB are rejected. Dense drawings with over 1 million path operators per stream are truncated. Split large documents before importing. |\n\n---\n\n## Compatibility\n\nSee **[HOST_COMPATIBILITY.md](HOST_COMPATIBILITY.md)** (SketchUp hosts) and **[COMPATIBILITY.md](COMPATIBILITY.md)** (Ruby 2.2 language rules). Summary:\n\n| SketchUp Version | Ruby Version | Status |\n|-----------------|-------------|--------|\n| Make 2017 | 2.2.4 | ⚠️ Expected (CI syntax-checked, not host-verified) |\n| Pro 2017 | 2.2.4 | ⚠️ Expected |\n| 2018–2019 | 2.5.x | ⚠️ Expected |\n| 2020–2023 | 2.7.x | ⚠️ Expected |\n| 2024 | 3.2.2 | ⚠️ Expected |\n| 2025 | 3.2.x+ | ⚠️ Expected |\n| Current Pro release | verify actual Ruby | ⚠️ Expected until host-tested |\n| 2014–2016 | 2.0.x | ⚠️ Expected only after dedicated host verification |\n\nEvidence levels:\n- `✅ Verified`: host-run validation evidence captured.\n- `⚠️ Expected`: syntax/runtime compatible but no host-run evidence yet.\n- `❌ Not supported`: outside maintained/tested compatibility scope.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n## AI Contributors\n\nThis project was developed with significant contributions from AI assistants:\n\n- **Claude \u0026 Claude Code** (Anthropic) — Architecture, code generation, debugging, and code review\n- **ChatGPT \u0026 Codex** (OpenAI) — Code generation and problem-solving assistance\n- **Gemini** (Google) — Development assistance and code suggestions\n- **Microsoft Copilot** — Code completion and development support\n\nThese AI tools were used as collaborative development partners throughout the project lifecycle.\n\n---\n\n## Author\n\n**BlueCollar Systems** -- BUILT. NOT BOUGHT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluecollar-systems%2Fsu-pdfimporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluecollar-systems%2Fsu-pdfimporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluecollar-systems%2Fsu-pdfimporter/lists"}