Skip to content

Freecad workbench for creating profile structures, executing mitered cuts, extending and trimming beams, notching (future).

Notifications You must be signed in to change notification settings

nmark/Metal-Working-workbench

Repository files navigation

MetalWorking Workbench for FreeCAD

A professional FreeCAD workbench for designing metal frame structures with parametric features for extrusion, joints, and alignment.

Features

🔧 Core Tools

Extrude Sketch Along Path

Create metal frame members by extruding a profile sketch along selected edges with full alignment control.

Extrude Sketch Tool

Features:

  • Multi-edge selection for batch extrusion
  • 9-point alignment grid (Top Left, Center, Bottom Right, etc.)
  • Profile rotation control
  • Horizontal and vertical offset adjustments
  • Live preview with yellow transparency

Miter Cut

Create precise miter joints between two frame members with configurable gap and offset strategies.

Miter Cut Tool

Features:

  • Bisect or Full Miter cut types
  • Gap control with symmetric, flipped, or default offset
  • Automatic geometry cleanup with removeSplitter()
  • Parametric updates when source geometry changes

Trim/Extend

Trim or extend frame members to a target face or plane with offset control.

Trim Extend Tool

Features:

  • Multi-beam selection
  • Face or plane target selection
  • Offset distance control
  • Automatic extension for proper cutting
  • Smart face detection for optimal results

Corner Joint

Create L-shaped corner joints with master/slave relationship for clean intersections.

Corner Joint Tool

Features:

  • Two-beam selection
  • Offset control for each member
  • Master beam passes through, slave beam butts against it
  • Automatic face selection for optimal joint geometry

🎯 Alignment Tools

Change Alignment

Modify alignment properties of existing frame members interactively.

Change Alignment Tool

Features:

  • 9-point alignment grid
  • Rotation control (-360° to +360°)
  • Horizontal and vertical offset adjustments
  • Auto-apply for instant feedback
  • Works on selected features or entire groups

Align to Plane

Automatically align a frame face to a target plane by calculating required offsets.

Align to Plane Tool

Features:

  • Select source face on frame member
  • Select target face or plane
  • Automatic offset calculation using Frenet frame mathematics
  • Adjusts OffsetHorizontal and OffsetVertical properties

Installation

Method 1: Manual Installation

  1. Download or clone this repository
  2. Copy the freecad/metal_working folder to your FreeCAD Mod directory:
    • Windows: C:\Users\<username>\AppData\Roaming\FreeCAD\Mod\
    • Linux: ~/.FreeCAD/Mod/
    • macOS: ~/Library/Application Support/FreeCAD/Mod/
  3. Restart FreeCAD

Usage

Getting Started

  1. Activate the Workbench

    • Select "MetalWorking" from the workbench dropdown menu

    Workbench Selection

  2. Create a Profile Sketch

    • Use the Sketcher workbench to create your frame profile (e.g., rectangle, I-beam, tube)

    Profile Sketch

  3. Create a Path Sketch

    • Create a sketch with edges defining the frame member paths

    Path Sketch

  4. Extrude Along Path

    • Click the Extrude Sketch tool
    • Select your profile sketch
    • Select one or more path edges
    • Adjust alignment, rotation, and offsets as needed
    • Click OK

Example Workflow: Simple Frame

Complete Frame Example

  1. Create a rectangular profile sketch (e.g., 40mm × 40mm)
  2. Create a path sketch with 4 edges forming a rectangle
  3. Use Extrude Sketch to create all 4 frame members
  4. Use Corner Joint to connect the corners
  5. Adjust alignment as needed with Change Alignment

Toolbars

Tools Toolbar

  • Extrude Sketch: Create frame members along paths
  • Miter Cut: Create miter joints between members
  • Trim/Extend: Trim or extend members to faces
  • Corner Joint: Create L-shaped corner joints

Alignment Toolbar

  • Change Alignment: Modify alignment of existing members
  • Align to Plane: Auto-align face to target plane

Technical Details

Parametric Features

All features are fully parametric using FreeCAD's FeaturePython framework:

  • ExtrudeFeature: Base frame member with alignment properties
  • MiterFeature: Parametric miter joint
  • TrimExtendFeature: Parametric trim/extend operation
  • CornerJointFeature: Parametric corner joint

Properties

Each ExtrudeFeature includes:

  • Profile: Link to profile sketch
  • Path: Link to path edge (DirLink)
  • RefUp: Reference up vector for orientation
  • Alignment: 9-point anchor selection
  • ProfileRotation: Rotation angle around anchor
  • OffsetHorizontal: Horizontal offset in mm
  • OffsetVertical: Vertical offset in mm

Coordinate Systems

The workbench uses Frenet frames for proper orientation:

  • Z-axis: Along extrusion direction (path edge)
  • X-axis: Horizontal (from RefUp cross Z)
  • Y-axis: Vertical (Z cross X)

Requirements

  • FreeCAD 1.0 or later
  • Python 3.8+
  • PySide6 (included with FreeCAD)

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This workbench is not released under any license.

Support

Changelog

Version 0.1.0 (Current)

  • ✅ Extrude Sketch with 9-point alignment
  • ✅ Miter Cut with gap control
  • ✅ Trim/Extend to faces
  • ✅ Corner Joint creation
  • ✅ Change Alignment tool
  • ✅ Align to Plane tool
  • ✅ Parametric feature updates
  • ✅ 3D icon set with blue/yellow theme

About

Freecad workbench for creating profile structures, executing mitered cuts, extending and trimming beams, notching (future).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published