Are you looking for a quick, convenient way to put a Picatinny rail in an OpenSCAD design? Do you want to generate a standalone rail with ports for mounting it with screws?
Hopefully you do, because that's what this does.
There's two .scad files. Both of them have detailed instructions as comments at the beginning of the file.
- “Picatinny-rail.scad” defines a module which can be used to create rails with a wide range of customization options. You can use it as a library.
- “Picatinny-customizer.scad” uses that library and OpenSCAD's new (as of the time of initial upload) customizer feature to create a rail that can be configured via checkboxes, sliders, and menus instead of OpenSCAD code.
I'm using dimensions from standardization agreement 4694. This is the same as an original Picatinny rail except that the dimensions are metric (standard for 3d printing anyways) and the tolerances are different (but those depend on your printer anyways).
You can set (but do not need to; all of these have defaults or can be calculated from other parameters):
- Length
- Number of slots
- Extension of the rail below the xy plane, which is useful for mounting to a surface in a design without a zero-width gap
- Chamfer at the ends of the rail
- The spacing of the recoil slots relative to the ends of the rail
- The positions of the screw ports for mounting a standalone rail
- The type of screws used (including socket head and countersunk), and clearance around them
- How the screw ports interact with recoil slots - you might not want to have recoil slots overlapping the screw positions.
Changes since 2.0:
- Changed file names to not have spaces becasue Printables replaced them with dashes, resulting in the customizer not finding the library.
- Changed how screw port positions are specified in the customizer to a comma-separated list in a string, since OpenSCAD's customizer doesn't support vectors with a variable number of elements.
Tags
The author marked this model as their own original creation.