From 3131a1f9eadf1dcbe7297750186d9478f796774b Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Sat, 5 Mar 2022 18:11:24 +1100 Subject: [PATCH] Fix screw holes in parametric enclosure example --- doc/examples.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/examples.rst b/doc/examples.rst index 4cd5cf133..15316089b 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -1043,8 +1043,9 @@ A Parametric Enclosure lowerLid = lid.translate((0, 0, -p_lipHeight)) cutlip = lowerLid.cut(bottom).translate((p_outerWidth + p_thickness, 0, p_thickness - p_outerHeight + p_lipHeight)) - # compute centers for counterbore/countersink or counterbore - topOfLidCenters = cutlip.faces(">Z").workplane().rect(POSTWIDTH, POSTLENGTH, forConstruction=True).vertices() + # compute centers for screw holes + topOfLidCenters = (cutlip.faces(">Z").workplane(centerOption="CenterOfMass") + .rect(POSTWIDTH, POSTLENGTH, forConstruction=True).vertices()) # add holes of the desired type if p_boreDiameter > 0 and p_boreDepth > 0: