Parametrized Lego Bricks ported to FreeCAD

459
Downloads
3137
Views
Published on April 4, 2012

Description

Just another parametric Lego Brick

Instructions

but the lego.py in you Macro directory, create a new FreeCAD document and type:
import lego
lego.makeLego(4,2)
and change the dimensions in the property view ;)
Tags
This Thing has no tags.
Report as inappropriate

You must be logged in to post a comment.

Also try exporting legos from leocad

I run the script *without* any error messages and a "Lego" object is created in my document but it's empty. 
- Anyone knows why or how to troubleshoot?I'm using Freecad 0.12 for Windows.

 This script was created using a an unstable version of FreeCAD 0.13. If you are using version 0.12 i would suggest du remove '.removeSplitter()'
I guess that there is a doc.recompute() missing at the end of the function makeLego. You can either add it in the script, or simple change a paramter to compute the shape for the first time.

Trying this under windows, and I can't import (ImportError: No module named lego), and when I just execute the macro, I get a busted shape with the error "Lego: 'Part.TopoShape' object has no attribute 'removeSplitter'. Just getting started with FreeCAD, so I'm not sure whats going on.