Function Reference: solid.revolve

drafting: S = solid.revolve (R)

drafting: S = solid.revolve (R, ANGLE)

A solid of revolution, turned from a region about its own axis.

S = solid.revolve (R) returns a solid.Shape swept by the geom.Region R turning once about the y axis of its plane, through the plane’s origin. The region is the half section of the part, its x coordinate the radius and its y coordinate the position along the axis, as a turned part is drawn. This is how a shaft, a bush, a pulley or a knob is modelled. A hole in the region becomes a closed ring-shaped cavity.

A region in the default xy plane turns about the model’s y axis. For a part along z, draw the region in the xz plane, whose y axis is the model’s z axis:

 
 ## A shaft of diameter 20 stepping down to 12, a 1 mm chamfer at its end
 R = geom.Region ([0, 0; 10, 0; 10, 30; 6, 30; 6, 49; 5, 50; 0, 50]);
 R.UCS = geom.UCS ([0, -1, 0], [0, 0, 0]);   # the xz plane: y is world z
 S = solid.revolve (R);
 volume (S)
 ⇒ 1.1669e+04

The region must lie on one side of its axis: no point of it, along its arcs too, at a negative x. It may run along the axis, as the section of a solid shaft does. Arcs turn into true tori and spheres, so a radiused shoulder or a ball end is exact.

S = solid.revolve (R, ANGLE) turns the region through ANGLE degrees only, anticlockwise seen from the tip of the axis, starting from the region’s plane. ANGLE is in the range (0, 360], and 360 is the default.

See also: geom.Region, solid.extrude, solid.helix

Source Code: solid.revolve