8000 yfxa · GitHub
[go: up one dir, main page]

Skip to content
View yfxa's full-sized avatar

Block or report yfxa

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
yfxa/README.md

Sketch to CAD

Sketch on your iPad and export clean, drafted CAD linework as DXF files that open directly in Rhino.

How It Works

No install required. Open the web page, sketch with your finger or Apple Pencil, tap "Export DXF", and open the file in Rhino. Everything runs in your browser.

iPad Safari  →  Sketch  →  Vectorize (in browser)  →  Export DXF  →  Open in Rhino

Quick Start

Option 1: Open the HTML file directly

Open static/index.html in Safari on your iPad. You can:

  • AirDrop the file to your iPad
  • Host it on any static web server (GitHub Pages, Netlify, etc.)
  • Email it to yourself and open in Safari

Option 2: Serve locally (if you have a computer available)

cd static
python3 -m http.server 8080

Then open http://<your-computer-ip>:8080 on your iPad.

Drawing Tools

Tool Description
Line Straight line from start to end point
Poly Multi-segment polyline, simplified from your stroke
Free Freehand curve with light simplification
Circle Drag from center outward to set radius
Arc Draw an arc through start, midpoint, and endpoint
Rect Drag to create a rectangle

Features

  • Douglas-Peucker simplification cleans up freehand strokes into clean linework
  • DXF export generates standard DXF files that open in Rhino, AutoCAD, etc.
  • Layers — assign strokes to Default, Construction, or Annotation layers
  • Snap to grid for precise placement
  • Configurable scale and units (mm, cm, m, inches, feet)
  • Undo and Clear controls
  • Works with touch and Apple Pencil

Workflow with Rhino

  1. Sketch on your iPad
  2. Tap Export DXF
  3. Transfer the .dxf file to your computer (AirDrop, iCloud, email, etc.)
  4. Open in Rhino: File → Open or File → Import
  5. Your sketch linework is now clean CAD geometry with layers intact

Settings

Tap the gear icon to configure:

  • Scale — pixels to CAD units ratio (default 0.1)
  • Units — mm, cm, m, inches, or feet
  • Simplify strength — how aggressively freehand strokes are cleaned up
  • Grid spacing — visual grid density
  • Snap to grid — lock points to grid intersections

Advanced: Real-time sync with Rhino

For live sync (sketch appears in Rhino as you draw), the sketch_to_cad/ Python package provides a WebSocket server and rhino3dm bridge. See the Python source for details.

pip install -r requirements.txt
python -m sketch_to_cad.server

Requirements

  • Any modern browser (Safari on iPad recommended)
  • Rhino 7/8 (or any CAD software that reads DXF) for opening exports

Popular repositories Loading

  1. yfxa yfxa Public

    Config files for my GitHub profile.

    HTML

  2. UnclePrint UnclePrint Public

    TypeScript

  3. unclefredprint unclefredprint Public

    TypeScript

  4. SMO SMO Public

    LA Basin Air Traffic Density Map — past, present, and future of Santa Monica Airport airspace

    JavaScript

  5. yfxa.github.io yfxa.github.io Public

    yfx.studio — portfolio

    HTML

  6. clicky clicky Public

    Forked from farzaa/clicky

    Swift

0