How to Sweep a Profile Along a Path in FreeCAD
Sweeping in FreeCAD allows you to generate complex 3D geometry by extruding a 2D profile along an open or closed trajectory path. This guide covers the complete process of preparing your sketches, using the primary sweep tools in both the Part Design and Part workbenches, and resolving common errors like self-intersections.
1. Prepare the Sketches
To create a clean sweep, you must construct two separate sketches on intersecting or perpendicular planes: the cross-section profile and the trajectory path.
- Create the Trajectory (Path):
- Create a new sketch on a standard plane (e.g., the XY-plane).
- Draw the path using lines, arcs, or B-splines.
- Ensure there are no sharp, acute corners that could cause geometry to overlap. Close the sketch.
- Create the Cross-Section (Profile):
- Create a second sketch on a plane perpendicular to the start of the path (e.g., the XZ-plane).
- Draw the closed shape you wish to sweep (such as a circle, rectangle, or custom shape).
- Constrain the center or an edge of the profile directly to the starting vertex of the path sketch using the Coincident constraint or external geometry.
- Close the sketch.
2. Method 1: Using the Part Design Workbench (Additive Pipe)
In parametric modeling with the Part Design workbench, the sweep operation is called the Additive Pipe.
- In the tree view, select the sketch representing your profile.
- Click the Additive Pipe icon on the toolbar (or select Part Design > Create an additive feature > Additive Pipe).
- In the Task panel on the left, locate the Path along to sweep section.
- Click the Object button, then select the sketch representing your path from the 3D view or the tree view.
- Choose your Orientation mode:
- Standard: Keeps the profile at a constant angle relative to the path.
- Fixed: Maintains the original orientation of the sketch plane along the sweep.
- Frenet: Calculates orientation based on path curvature (best for 3D splines).
- Click OK to generate the solid.
3. Method 2: Using the Part Workbench (Sweep Utility)
If you are not working inside a Part Design Body, you can use the direct Sweep tool in the Part workbench.
- Switch to the Part Workbench.
- Click the Utility to sweep icon (or choose Part > Sweep...).
- In the Sweep dialog:
- Select your profile sketch from the Available
profiles list and click the right arrow (
>) to move it to the Selected profiles box. - Click the Sweep Path button, then click on the path lines directly in the 3D view.
- Check the Create solid checkbox to ensure a solid object is generated instead of a hollow shell.
- Check Frenet if following a 3D curved path to prevent twisting.
- Select your profile sketch from the Available
profiles list and click the right arrow (
- Click OK to execute the sweep.
4. Best Practices and Troubleshooting
- Avoid Self-Intersection: If the profile is wider than the radius of a curve along the path, the geometry will overlap on the inside corner, causing the operation to fail. Increase your bend radiuses or reduce the profile dimensions.
- Anchor the Profile: Ensure the profile is physically attached to the path at the start point. A disconnected profile can cause unexpected warping or orientation errors.
- Keep Profiles Closed: If your cross-section is not a closed wire, FreeCAD will generate a surface sheet instead of a solid object.