Skip to content

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

Open
@greyltc

Description

@greyltc
Contributor

Here's what the docs say eachpoint() should do:

cadquery/cadquery/cq.py

Lines 2440 to 2441 in a5fadeb

Same as each(), except each item on the stack is converted into a point before it
is passed into the callback function.

When each() is called with useLocalCoordinates=False, it does no manipulation of the object before passing it on to the callback function:

r = callback(obj)

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:

res = [callback(p * loc) for p in pnts]

I guess it probably shouldn't do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @greyltc

      Issue actions

        `eachpoint(..., useLocalCoordinates=False)` manipulates the point's location when it shouldn't · Issue #1099 · CadQuery/cadquery