Parametric Project Enclosures

by thehans, published

Parametric Project Enclosures by thehans Nov 16, 2011



Parametric Project Enclosures by thehans is licensed under the GNU - LGPL license.

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

6594Views 1794Downloads


This is a Python script for FreeCAD which generates parametric project enclosure boxes. All the dimensions and various other features of the box are completely configurable.

Source also available on gist: https://gist.github.com/1361643


Save the ProjectEnclosure.py file to your FreeCAD macros directory.

From the FreeCAD interface, you can use the "Tools -> Macros..." menu to view or change your macro directory. Once the macro is in place, you can execute the macro from the same dialog.

This script is implemented as a FreeCAD Python Feature which means that you can edit all the parameters from the FreeCAD gui without touching any Python code at all. Select the box, and click on the "Data" tab in the left pane to see and edit any of the parameters. One of the screenshots shows an example of this.

All Apps

Upgrade this Thing with Thingiverse Apps

No results.

The updated macro that works with the current version of FreeCAD can be found in this thread. http://forum.freecadweb.org/viewtopic.php?f=22&t=6983

Any chance that you could update this macro to work with the current version of FreeCAD? From what I've been told, you need an older version of FreeCAD to use your macro. The current version 0.14.3700 (Git) uses the new unit system. The macro is not aware of this new feature.

Is there any other prerequisites? I just installed OpenCAD from sourceforge, Installed this macro by placing it inside a folder in My Documents and changing the macro location to match. When I attempt to execute the macro it returns with, "error in line 244", which happens to be the line, "makeBoxEnclosure()". What am I doing wrong?

You say you are running OpenCAD, but I don't know what that is, and this script is written for FreeCAD, so I'm going to assume that was a typo. What version of FreeCAD are you running, and what OS? Could you paste the full text of the error? Does it mention other lines of code(a stack trace)?

Yes, I am sorry, FreeCAD. I am running FreeCAD version 0.13 revision 1828. On Windows 7 32bit, 2Gb RAM.

Here is (most of) the full text: Traceback (most recent call last): File "C:/Users/Daniel/FreeCAD Macros/projectenclosure,py", line 244, in MakeBoxEnclosure() File: "C:/Users/Daniel/FreeCAD Macros/projectenclosure,py", line 237, in MakeBoxEnclosure() a=FreeCAD.ActiveDocument.addobject("Part::FeaturePython","BoxEnclosure"). It continues but I cannot see it.

I stumbled upon that problem too, as a first time FreeCad user, and realised you have to do "File->New" to actually open an empty file where the macro can be applied.

Nice macro. I was looking forward to move from OpenSCAD to FreeCad and this macro will help a lot.

Hey I love these enclosures but I don't use FreeCAD so I cant Print them. Would you be able to post the .STL files so those of us that use other programs could still utilize this. Thanks, and again, I love these designs.

The scrup can generate any size box, so there is no single STL file that he could post.

The nice thing about FreeCAD is it's, um, free, so you can download it and generate your own STL's easily enough. You can get a basic introduction to working with FreeCAD scripted models at http://mendelmax.com/tikiwiki/tiki-index.php?page=Getting+Started+with+FreeCAD+scriptinghttp://mendelmax.com/tikiwiki/...

Thanks. I'll look into it. I only asked because I don't really want to spend the effort to learn yet another cad interface. I use AutoDesk Inventor and ProD right now.

.stl would really be practical. i think its more common for most thingiversiants.

When working in 3D i need an easy-to-use interface like Cinema4D and Rhino (Wentachee) or i risk getting eyecancer for watching too much lines, Numbers or jibberish programming code.

I use FreeCAD for design objects to 3D Printing!!! FreeCAD + Blender are my favorite tools ;-)

FreeCAD is being better all over the time :-)

Thanks for sharing!!

I don't use FreeCad unfortunately. Awesome work. :)