cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

`eachpoint(..., useLocalCoordinates=False)` manipulates the point's location when it shouldn't

Open greyltc opened this issue 3 years ago • 1 comments

Here's what the docs say eachpoint() should do: https://github.com/CadQuery/cadquery/blob/a5fadebe72b2a46881c3847cca748b8cf716ccd0/cadquery/cq.py#L2440-L2441

When each() is called with useLocalCoordinates=False, it does no manipulation of the object before passing it on to the callback function: https://github.com/CadQuery/cadquery/blob/a5fadebe72b2a46881c3847cca748b8cf716ccd0/cadquery/cq.py#L2423

but when eachpoint() is called with useLocalCoordinates=False, it manipulates/transforms (p * loc) the object's location before passing it on to the callback function: https://github.com/CadQuery/cadquery/blob/a5fadebe72b2a46881c3847cca748b8cf716ccd0/cadquery/cq.py#L2479

I guess it probably shouldn't do that.

greyltc avatar Jun 08 '22 09:06 greyltc

https://github.com/CadQuery/cadquery/pull/1100 should bring the code in line with how I interpret the docs.

greyltc avatar Jun 08 '22 09:06 greyltc