Skip to content

eachpoint(...,useLocalCoordinates=False) has a coordinate transformation bug #1098

@greyltc

Description

@greyltc

For example, the output of

import cadquery
from cadquery import cq, CQ

mwp = CQ("ZX").circle(80.0).extrude(12)
mwp = mwp.translate((99, 99, 99))
mwp = mwp.faces("<Y").workplane(centerOption="CenterOfBoundBox")
        
def minimal_plugin(wp: cq.Workplane) -> cq.Workplane:
    def minimal(loc: cadquery.Location):
        box = CQ().box(length=20, width=10, height=30, centered=False)
        return box.findSolid().moved(loc)

    return wp.eachpoint(minimal, useLocalCoordinates=False, combine=True)

cq.Workplane.minimal_plugin = minimal_plugin
mwp = mwp.rarray(1, 40, 1, 3).minimal_plugin()
show_object(mwp)

is (A)
image
but it should be (B)
image

Luckily #1097 fixes it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions