Regular Polygon Prism
Edit source codeThe number of sides of the polygon
Measured from corner to corner. Diameter = Across Flats ÷ cos(180° ÷ Sides)
The size on the z axis
A prism with a regular polygon as its base: all sides have the same length. With 6 sides it is a hexagonal prism, with 8 an octagonal prism, and so on.
The Diameter is measured from corner to corner. If you know the width across flats (from one flat side to the opposite side), calculate the diameter like this:
Diameter = Across Flats ÷ cos(180° ÷ Sides)
For a hexagon (6 sides) that is Diameter = Across Flats × 1.1547. Example: an M3 nut is 5.5 mm across flats, so its diameter is 6.35 mm. Add some clearance for a nut trap.
This is a first version of an idea I had. You can add different modifiers to the generated shape. Currently there is only the drilling machine that can drill a hole in the center (origin) of the shape and rotate.
Save as part
A part is this shape with your configuration saved under its own name. Save it to your account to come back to it later, or submit it for review to have it published on stl.parts.
Markdown is supported. The description is published together with the part when the part is published.