- Home
- Skills
- Workflow Automation
- freecad skills
freecad skills
Generate production-ready FreeCAD Python scripts for 3D modeling, FeaturePython objects, and GUI tools.
Free
Works with the AI Agents you already use
freecad skills
Example session with this skill installed
Write a FreeCAD macro that creates a parametric 10x10x10 box, fillets all edges with a 1mm radius, and shows it in the document.
- Read your context and instructions
- Compiled the freecad
I have created a FreeCAD macro that generates a parametric box with filleted edges. The script uses the Part module for geometry and ensures the document is recomputed to show the results.
FreeCAD Filleted Box Macro
# -*- coding: utf-8 -*-
# FreeCAD Macro: FilletedBox
# Description: Creates a 10mm cube with 1mm fillets on all edges.
import FreeCAD
import Part
def main():
# Get the active document or create a new one
doc = FreeCAD.ActiveDocument or FreeCAD.newDocument("FilletedBoxDoc")
# Define dimensions
length = 10.0
width = 10.0
height = 10.0
fillet_radius = 1.0
# Create the base box shape
box_shape = Part.makeBox(length, width, height)
# Apply fillet to all edges
# .Edges returns a list of all edge objects in the shape
try:
final_shape = box_shape.makeFillet(fillet_radius, box_shape.Edges)
except Exception as e:
FreeCAD.Console.PrintError(f"Fillet failed: {str(e)}\n")
final_shape = box_shape
# Add the shape to the document
obj = doc.addObject("Part::Feature", "FilletedBox")
obj.Shape = final_shape
# Recompute to update the 3D view
doc.recompute()
FreeCAD.Console.PrintMessage("Parametric filleted box created successfully.\n")
if __name__ == "__main__":
main()
Next steps
- Copy the code into the FreeCAD Macro Editor (Macro > Macros... > Create).
- Click Execute to generate the geometry in your active project.
- Modify the
fillet_radiusvariable to adjust the bevel size.
Connects securely to your tools. The creator never sees your data.
About this skill
Writing Python scripts for FreeCAD manually is prone to API errors, especially when handling OpenCASCADE BRep geometry, complex topological exploration, or Pivy-based scenegraph manipulation. This skill provides production-ready automation for the FreeCAD Python environment.
What it does
- Geometry generation creates BRep solids, wires, and complex BSpline curves using the
Partmodule. - Parametric modeling develops
FeaturePythonobjects with custom properties and recompute logic. - GUI development builds custom task panels, toolbars, and
PySide2dialogs integrated into the FreeCAD interface. - Topological exploration traverses vertexes, edges, and faces for automated geometric analysis.
- Cross-workbench automation scripts operations across
Sketcher,Mesh,Path,FEM, andDraft.
How it works
- Geometric scripting generates shapes and applies boolean operations like fuses, cuts, and common intersections.
- FeaturePython implementation creates persistent, parametric objects with custom icons and view providers.
- UI integration registers new Gui Commands and custom workbenches for user-facing tools.
- Data conversion automates transformations between BRep shapes and triangulated meshes.
Frameworks & tools
Targeting FreeCAD 0.19 through 1.0+, using Python 3, PySide2 for UI, and Pivy for Coin3D scenegraph manipulation.
Why this beats prompting it yourself
Generic AI models often hallucinate FreeCAD API calls or mix up Part vs PartDesign workflows. This skill follows specific best practices for document recomputation, GUI guards, and proper property mapping to prevent crashes and file corruption.
Use cases
- Automating the generation of custom hardware like enclosures or fasteners from CSV data.
- Creating custom workbenches for specialized engineering domains.
- Batch exporting complex assemblies to STEP or STL formats.
- Developing interactive task panels for simplified user input in macros.
Known limitations
Does not support legacy Python 2 environments found in FreeCAD 0.18 and earlier. Requires FreeCAD to be in GUI mode for PySide and Pivy operations.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.
Requires FreeCAD 0.19+ and Python 3. UI and Coin3D operations require the FreeCAD GUI to be active. Does not support legacy Python 2 versions.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
- Software
Python