Skip to content

Commit 9e6d323

Browse files
authored
Merge pull request #1023 from prplz/enclosure-example-fix
Fix screw holes in parametric enclosure example
2 parents 5147dd8 + 3131a1f commit 9e6d323

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/examples.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,8 +1043,9 @@ A Parametric Enclosure
10431043
lowerLid = lid.translate((0, 0, -p_lipHeight))
10441044
cutlip = lowerLid.cut(bottom).translate((p_outerWidth + p_thickness, 0, p_thickness - p_outerHeight + p_lipHeight))
10451045

1046-
# compute centers for counterbore/countersink or counterbore
1047-
topOfLidCenters = cutlip.faces(">Z").workplane().rect(POSTWIDTH, POSTLENGTH, forConstruction=True).vertices()
1046+
# compute centers for screw holes
1047+
topOfLidCenters = (cutlip.faces(">Z").workplane(centerOption="CenterOfMass")
1048+
.rect(POSTWIDTH, POSTLENGTH, forConstruction=True).vertices())
10481049

10491050
# add holes of the desired type
10501051
if p_boreDiameter > 0 and p_boreDepth > 0:

0 commit comments

Comments
 (0)