In the world of 3D modeling, crafting organic and curved surfaces can be a complex task, especially in software like FreeCAD, which may lack some advanced features found in commercial CAD programs. While FreeCAD is a powerful and versatile open-source tool, creating intricate curved shapes requires a deep understanding of its various workbenches and tools. In this tutorial, we'll explore how to create curved surfaces using FreeCAD, focusing on the Curves Workbench.
1. Understanding the Challenges of Curved Surfaces in FreeCAD
Creating curved and organic shapes in FreeCAD can be challenging due to limitations in its default toolset. While tools like Sweeps and Lofts are available, they may not cover all scenarios for complex surfaces. Fortunately, FreeCAD's modular architecture allows for the integration of additional workbenches, such as the Curves Workbench, which provides advanced tools for creating intricate curved surfaces.
2. Installing the Curves Workbench
Before diving into modeling, we need to install the Curves Workbench:
Open FreeCAD and go to Tools > Add-on Manager.
Search for "Curves" in the add-on list.
Select the Curves Workbench and click Install.
Restart FreeCAD to activate the new workbench.
3. Modeling a Computer Mouse with Curved Surfaces
To practice creating curved surfaces, we'll model a simple computer mouse. We'll use reference images to guide our design.
Importing Reference Images
Create a New Document in FreeCAD.
Go to File > Import and select the top view image of the mouse.
Repeat the process to import the side view image.
Adjusting Image Sizes and Orientation
Select the Top View Image in the tree view.
Use the Transform tool (right-click > Transform) to rotate and align the image correctly.
Adjust the Size of the image to match the desired dimensions (e.g., 65 mm in length for a portable mouse).
You can use a temporary sketch to measure and adjust the size.
Align the Side View Image in a similar manner, ensuring it matches the top view in scale and position.
4. Create Top-Town Profile Sketch
With the reference images in place, we'll begin tracing the mouse outline using sketches:
Switch to the Sketcher Workbench.
Create a New Sketch on the XY plane for the top outline.
Use the B-Spline Tool to trace the mouse's top view outline:
Follow the contours of the mouse, placing control points along the edge.
Ensure the last point connects back to the axis for mirroring.
Apply Constraints:
Use the Horizontal Constraint on the endpoints to smooth the transition.
Adjust control points to refine the curve.
Close the Sketch.
5. Create Side Profile Sketch (Middle)
Next, we'll create a side profile:
Create a New Sketch on the YZ plane for the side profile.
Project Key Points from the top sketch as reference using the External Geometry Tool.
Draw Vertical Construction Lines at key points to help align the curves.
Use the B-Spline Tool to draw the side profile curve:
Start and end beyond the construction lines to avoid issues with the Gordon Surface Tool later.
Ensure the curve follows the mouse's side profile.
Close the Sketch.
6. Generating 3D Curves from 2D Projections
Switch to the Curves Workbench.
Select Both Sketches (top and side profiles).
Click on Mixed Curve Tool to generate a 3D curve from the two 2D sketches.
This curve represents the intersection of the two profiles in 3D space.
Adjust Appearance:
Optionally change the curve's color and line width for better visibility.
7. Create Side Profile Sketch (Top)
We need a top line to act as a guide curve for our top surface.
Switch to the Sketcher workbench.
Create a sketch on the YZ plane.
Bring in the Mixed Curve as External Geometry.
Create three separate B-Splines for the side profile.
One connecting the Y axis to the front of the External Geometry reference line.
One following the top of the mouse, connecting the front and back points of the External Geometry reference line.
One connecting the Y axis to the back of the External Geometry reference line.
8. Create Top-Down Profile Sketch (Bottom)
We also need to create the bottom surface of the mouse. We want to make a simple oval, to provide a flat surface and an area to house the electronics. Make half of this oval with the B-Spline tool.
Create a new sketch on the XY plane.
Bring in the front and back parts of the previous sketch as External Geometry.
Create one B-Spline that connects the front of the mouse to the back of the mouse.
9. Creating Surfaces with the Gordon Surface Tool
Now, we'll create the mouse's curved surface using the Gordon Surface Tool:
Create Rails and Ribs
Use the Freehand B-Spline tool or additional sketches to define cross-sections in your object.
Convert Sketch Segments to B-Splines:
Select individual segment(s) of your sketches.
Use the Join Curves Tool to convert them into B-Spline objects.
Hide the original sketches to avoid confusion.
The B-Splines made from sketch parts are shown in purple in the image.
Use the Gordon Surface Tool:
Select the Rails: Click on one rail, then hold Ctrl and select the second rail.
Select the Ribs: Continue holding Ctrl and select each rib in order.
Click on the Gordon Surface Tool icon. With some luck, you should see a surface wrapped along your guides!
Troubleshooting:
If the surface doesn't generate correctly, check for gaps or misalignments.
Ensure all curves are properly connected and converted to B-Splines.
10. Create Additional Surfaces
Create additional sketches, B-Splines, and curved surfaces as necessary to finish modeling half of the mouse.
11. Finalizing the Model and Solidifying the Shape
To turn the surface into a solid model:
Join Surfaces if Necessary:
If you have multiple surfaces (e.g., top and bottom), use the Join Objects Tool to combine them.
Adjust the Tolerance parameter as necessary to get the surfaces to fully stitch together.
Mirror the combined surface
Create the other half of the mouse using the Mirror tool.
Fill the bottom
Ctrl+click the two bottom sketches (oval) to select them.
Click the Ruled Surface button to create a flat surface between sketches.
Create a Shell:
Click the Shape Builder tool.
Select Shell from faces.
Ctrl+click to select each face on the mouse in the 3D view.
Click Create.
Convert Shell to Solid:
Click the Shape Builder tool again.
Select Solid from shell.
Select the mouse shell in the 3D view.
Click Create.
Check Geometry:
Click the Check Geometry tool.
Click Run check and ensure there are no errors.
If you see errors, find, and fix them before moving to the next step.
Integrate with Part Design:
Create a new body in the Part Design Workbench.
Drag your solid into the body to create a Base Feature.
You can now use Part Design tools to add features like holes or pockets.
12. 3D Print Mouse Prototype
Once you are happy with your mouse design, you can optionally 3D print it to see how it fits in your hand!
Conclusion
Creating curved surfaces in FreeCAD requires a combination of advanced tools and careful planning. While the process can be complex, especially with experimental plugins like the Curves workbench, the ability to model intricate shapes opens up a world of possibilities.
In this tutorial, we've:
Installed and utilized the Curves Workbench.
Imported and scaled reference images.
Created 2D sketches and used B-Splines to outline the mouse.
Generated a 3D mixed curve from 2D profiles.
Used the Gordon Surface Tool to create a complex curved surface.
Converted the surface into a solid model ready for further design work or 3D printing.
While FreeCAD may lack some of the advanced features of commercial CAD software, with patience and experimentation, it can achieve impressive results. The key is understanding the tools at your disposal and how to work around limitations.