cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

height is used in a 2-dimensional-sense in the docs and it is wrong/confusing

Open inktrap opened this issue 1 year ago • 0 comments

Useage of height in docs/examples is unexpected. E.g.: https://cadquery.readthedocs.io/en/latest/examples.html#plate-with-hole

# The dimensions of the box. These can be modified rather than changing the
# object's code directly.
length = 80.0
height = 60.0
thickness = 10.0
center_hole_dia = 22.0

# Create a box based on the dimensions above and add a 22mm center hole
result = (
    cq.Workplane("XY")
    .box(length, height, thickness)
    .faces(">Z")
    .workplane()
    .hole(center_hole_dia)
)

The module docs state that box() takes length, width, height which is conventional and expected. Calling it with length, height, thickness is confusing. The underlying issue here is that height is used in a 2-dimensional-sense, so I would advocate for using length, width, height consistently in all examples and to not bother with thickness, and more importantly, to use width instead of height.

I also noticed this is in the first example I worked through and started to edit the docs but had the need to discuss this first.

inktrap avatar Feb 17 '25 21:02 inktrap