solid.Shape

Methods

Method Reference: solid.Shape.hole

solid.Shape: S = hole (S, P, D, DEPTH)

solid.Shape: S = hole (…, Name, Value, …)

Drill holes into a shape.

S = hole (S, P, D, DEPTH) drills a hole of diameter D millimetres at every row of the M-by-3 matrix P, each starting at its point and running down the z axis, DEPTH millimetres deep. An Inf DEPTH drills right through, however thick the part. The point is where the hole’s axis meets the surface of the part, and DEPTH is measured from it, as a drawing dimensions a hole. The drill comes from outside: everything on the axis before the point is cleared too, at the widest diameter of the hole, so a hole entering a sloping or curved face is clean all round. A hole started under material that its axis passes through first cuts that material as well. All the holes are cut in one operation.

D may instead name an ISO metric coarse thread, such as 'M6' or 'M2.5', from M1 to M64: the hole is then drilled at the tapping size for that thread, its nominal diameter less its pitch, so 'M6' drills 5 millimetres. The thread itself is not modelled.

Name/Value pairs shape the hole:

'Direction'
The nonzero 3-element direction the holes run in from their points, [0, 0, -1] by default.
'Counterbore'
[CD, CDEPTH]: a flat-bottomed bore of diameter CD, wider than the hole, CDEPTH deep, shallower than the hole, for the head of a cap screw.
'Countersink'
CD or [CD, ANGLE]: a conical seat of diameter CD at the surface, wider than the hole, with an included angle of ANGLE degrees, 90 by default as for ISO countersunk screws. It must be shallower than the hole.
'Tip'
The included angle in degrees of the cone a twist drill leaves at the bottom of a blind hole, 118 for a standard drill. It is beyond DEPTH, which is measured to the full diameter as a drawing dimensions it. By default a blind hole is flat-bottomed.

A counterbore and a countersink cannot both be given, and a tip applies only to a blind hole. Drilling the empty shape leaves it empty.

 
 ## A plate with four counterbored holes for M6 cap screws
 S = solid.box (80, 40, 12);
 P = [10, 10, 12; 70, 10, 12; 10, 30, 12; 70, 30, 12];
 S = hole (S, P, 6.6, Inf, 'Counterbore', [11, 6.5]);

See also: solid.Shape.subtract, solid.cylinder

Source Code: solid.Shape