sdf icon indicating copy to clipboard operation
sdf copied to clipboard

`capped_cylinder` API is confusing

Open hweom opened this issue 2 years ago • 2 comments

Documentation says:

f = capped_cylinder(-Z, Z, 0.5)

But what are the first and the second arguments? I assume Z is an axis designator? Why does it need to be passed twice with opposite signs?

hweom avatar Aug 16 '23 05:08 hweom

It's the start and end point of the cylinder.

nobodyinperson avatar Aug 16 '23 07:08 nobodyinperson

Yeah, I eventually figured Z should be a unit vector for Z axis, although it's not explained anywhere.

It would be nice if the APIs for 3D primitives are normalized. For example, rounded_cylinder takes two radii and a height...

hweom avatar Aug 17 '23 04:08 hweom