Overview
Polish the demo app with syntax highlighting, examples, and export.
Parent issue: #25
Depends on: #26, #27
Goals
Features
Syntax Highlighting
struct SyntaxHighlighter {
// Keywords: Workplane, result, true, false
// Methods: .box, .cylinder, .fillet, .union
// Numbers: 10, 3.14, -5
// Strings: "XY", ">Z"
// Comments: // comment
}
Example Library
| Example |
Description |
Concepts |
| Basic Box |
Simple box with fillet |
Primitives, fillet |
| Mounting Bracket |
L-bracket with holes |
Workplanes, holes, fillet |
| Pipe Fitting |
Hollow cylinder |
Boolean cut |
| Gear |
Extruded polygon |
Polygon, extrude |
| Enclosure |
Box with shell |
Shell, fillet |
Properties Panel
Display for current model:
- Volume (mm³)
- Surface area (mm²)
- Center of mass
- Bounding box dimensions
- Face count
- Edge count
- Vertex count
Export Options
- STEP file (CAD interchange)
- STL file (3D printing)
- Copy JavaScript code
UI Enhancements
┌─────────────────────────────────────────────────────────────┐
│ OCCTSwift Playground [Examples ▼] [Export] [▶] │
├─────────────────────┬───────────────────────────────────────┤
│ // Syntax colored │ ┌─────────────────────┐ │
│ result = Workplane │ │ │ │
│ .box(10, 20, 5) │ │ [3D Viewport] │ │
│ .fillet(1) │ │ │ │
├─────────────────────┤ └─────────────────────┘ │
│ Console ├───────────────────────────────────────┤
│ ✓ Built in 0.12s │ Properties │
│ Faces: 10 │ Volume: 892.3 mm³ │
│ Edges: 24 │ Surface: 614.2 mm² │
└─────────────────────┴───────────────────────────────────────┘
Acceptance Criteria
Effort Estimate
~4 days
Overview
Polish the demo app with syntax highlighting, examples, and export.
Parent issue: #25
Depends on: #26, #27
Goals
Features
Syntax Highlighting
Example Library
Properties Panel
Display for current model:
Export Options
UI Enhancements
Acceptance Criteria
Effort Estimate
~4 days