Loading

Parametric Project Enclosures

by thehans, published

Parametric Project Enclosures by thehans Nov 16, 2011

Description

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: gist.github.com/1361643

Recent Comments

view all

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.

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.

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)?

Liked By

view all

License

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

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

Instructions

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.

Comments

You must be logged in to post a comment.

toungewhunder on Jul 23, 2013 said:

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?

thehans on Jul 23, 2013 said:

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)?

fsamir on Mar 21, 2013 said:

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

inventworld on Dec 6, 2011 said:

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.

kludgineer on Dec 12, 2011 said:

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

casainho on Nov 17, 2011 said:

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!!

owen on Nov 16, 2011 said:

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

Top