freecad skills

    1

    Generate production-ready FreeCAD Python scripts for 3D modeling, FeaturePython objects, and GUI tools.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    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

    1. Copy the code into the FreeCAD Macro Editor (Macro > Macros... > Create).
    2. Click Execute to generate the geometry in your active project.
    3. Modify the fillet_radius variable 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 Part module.
    • Parametric modeling develops FeaturePython objects with custom properties and recompute logic.
    • GUI development builds custom task panels, toolbars, and PySide2 dialogs 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, and Draft.

    How it works

    1. Geometric scripting generates shapes and applies boolean operations like fuses, cuts, and common intersections.
    2. FeaturePython implementation creates persistent, parametric objects with custom icons and view providers.
    3. UI integration registers new Gui Commands and custom workbenches for user-facing tools.
    4. 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.

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    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 forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed today

    • Free with an Agensi account

    Requires

    Python

    Permissions

    Read Files
    Write Files
    Network Access
    Listedtoday

    What's inside

    Frequently Asked Questions

    This skill is optimized for FreeCAD versions 0.19 through 1.0+. It utilizes Python 3 and PySide2, meaning it is not compatible with legacy Python 2 environments found in version 0.18 or older.

    Unlike generic models that often mix up Part and PartDesign APIs, this skill follows strict document recompute logic and GUI guards. This prevents common errors like scenegraph crashes, invalid BRep geometry, and broken property mapping.

    Yes, it is designed to create FeaturePython objects with custom view providers and properties. This allows you to build truly parametric models that update dynamically when input values change, rather than just generating static geometry.

    While it can generate geometric logic for any environment, UI-specific features using PySide2 or Pivy (Coin3D) scenegraph manipulation require FreeCAD to be running in GUI mode to function correctly.

    The skill includes production-ready logic for BRep geometry generation, FeaturePython implementation, custom UI development (PySide2), and topological exploration. You receive the specialized capability to automate workflows across workbenches like Sketcher, FEM, and Path.

    New in Workflow Automation