Macros to generate 'plastic toy brick' models in FreeCAD
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Legify
images
LICENSE
README.md
legify-brick.FCMacro

README.md

freecad-legify-macros

Macros to generate 'plastic toy brick' models in FreeCAD

Why?

This is a learning exercise undertaken to master the following:

  • FreeCAD and concepts for parametric modelling: sketches, constraints, datum planes etc.
  • Python and scripting with FreeCAD
  • Detailed modelling of toy bricks

These all form the basis of a future planned project...

Installation

Tested only with FreeCAD version >= 0.18

MacOS

  1. Clone this repository:

    git clone https://github.com/vectronic/freecad-legify-macros.git

  2. Link the cloned folder and macro file into the FreeCAD macros directory:

    ln -s <local repository folder>/legify-brick.FCMacro <user preferences folder>/FreeCAD/Macro/
    ln -s <local repository folder>/Legify <user preferences folder>/FreeCAD/Macro/
    

Usage

  1. Create a new document
  2. Run the legify-brick.FCMacro
  3. Modify parameters as desired in the popup dialog
  4. Click OK
  5. Wait for for a lot of sketches, constraints, pads, pockets and fillets to be rendered
  6. Admire the resulting beauty

TODO

  • Confirm some dimensions
  • Pin Rendering
  • Technic Hole Rendering
  • Support modern tile where the bottom has a small outside pocket (and check if fillet is also required)
  • Support rib variation in modern 2x1 tile and 2x1 technic brick with 2 non-offset holes
  • Determine a replacement for internal brick ribs if side hole studs exist
  • Determine if the inner edge of open studs and hole studs should be filleted

Screenshots

Parameters

Simple

Classic

Odd

Tree View

Sketch

Credit

Initial drawing and dimensions used as reference for this work was done by Nick Turo-Shields