solid.Shape

Methods

Method Reference: solid.Shape.facefillet

solid.Shape: S = facefillet (S, F)

solid.Shape: S = facefillet (S, F, R)

Round a shape between faces chosen by index.

S = facefillet (S, F) makes a full round on each row of the N-by-3 matrix F, a row of face indices [A, M, B] as solid.Shape.faces returns them: the middle face M is replaced by a round tangent to the sides A and B and to the face M itself, so the end of a wall becomes a half cylinder. There is no radius to give: between parallel sides it is half the distance between them.

The three faces must be flat, and parallel to the edges M shares with A and B, so that the round is part of a cylinder; sides need not be parallel to each other. Every other face M borders must be flat and square to those edges, as the front and back of a wall are to its end. Parallel and square are judged across each face: a face may stray from them by 1e-7 millimetres, the precision of Open CASCADE. M must meet each side at an outside corner, and the round must touch each face within it. Rows may share sides, but the middle face of a row cannot appear in another row. model.Viewer.pick returns faces in the order they are clicked, so a row can be picked side, middle, side.

S = facefillet (S, F, R) rounds, on each row of the N-by-2 matrix F, the edges the two faces of the row share, to the radius R millimetres, as solid.Shape.fillet rounds them. The two faces must share at least one edge.

solid.Shape.fillet cannot use up a face: two fillets that would meet across it, such as two of radius 10 on the ends of a face 20 wide, raise an error. A full round builds that shape.

 
 ## A wall 50 long, 5 thick and 20 high with rounded ends
 W = solid.box (50, 5, 20);
 top = faces (W, 'Normal', [0, 0, 1]);
 bottom = faces (W, 'Normal', [0, 0, -1]);
 left = faces (W, 'Normal', [-1, 0, 0]);
 right = faces (W, 'Normal', [1, 0, 0]);
 W = facefillet (W, [top, left, bottom; top, right, bottom]);
 numfaces (W)
 ⇒ 6

See also: solid.Shape.faces, solid.Shape.fillet

Source Code: solid.Shape