thread

fun thread(profile: Shape2d, length: Double, radius: Double, pitch: Double, sides: Double): Polyhedron


fun thread(profile: Shape2d, length: Double, radius: Double, pitch: Double, sides: Double, leadInAngle: Double, leadOutAngle: Double): Polyhedron

Creates a thread shape. Wrap it around a cylinder to form a bolt.

Parameters

profile

The 2D shape of the thread. A triangle and trapezoids are a good choices. Translate it by thread radius along the x axis.

length

The length of the thread (along the z axis)

radius

The radius of the thread

pitch

The distance along the z axis between the crest of one thread to the next.

sides

The number of segments per revolution of the thread

leadInAngle

The angle in degrees of the lead-in (where the thread's size is reduced)

leadOutAngle

The angle in degrees of the lead-out (where the thread's size is reduced)