An idea for a script to create pockets

 From:  ed (EDDYF)
8152.1 
With a new 3D Printer on the way in January, I’m getting several projects designed in MoI in advance.

A common design element in 3D printed parts are pockets to hold metal items such as small bearings, nuts, and heat-set threaded inserts, to name a few.

My current project has 20 heat-set threaded brass inserts. To create the pockets I create a solid object in the shape of the pocket, duplicate the object 20 times, rotate and place the objects individually as needed, and Boolean-diff.

I’d like to save some effort and let the computer do most of the work. My thought is to make pre-defined 3DM objects for Boolean-diff in a directory. (Much like Max’s object library). The objects would get designed such that the top is always orientated up.

On the model I’d like to select multiple points or corners of 2D curves, pick a single object from the library (by selecting the name from a drop-down menu), and have the corresponding pockets created automatically.

The scrip would need to automatically orient the top of the object to be on the same plane as the 2D curve that contains the selected point.

So in actual usage I envision looking at the side view of a cube for example. Select the four edges of the cube’s face, Ctrl-C, Ctrl-V to create 4 curves from those edges. Join the 4 edges into a closed curve. Offset the curve by 25mm and show points. Select the four corner points of this offset curve and pick the desired object from the menu. The script orients the object’s top to the face of the cube and Boolean-diff to create the 4 pockets.

Maybe I’m missing an easier workflow. At any rate, I’m looking for a way to simply pick one or more points, pick an object, and make pockets from that object. All without duplicating, rotating, and positioning objects individually.

Any ideas? Is it possible with a script?

Ed Ferguson

Attachments: