Skip to content

Concatenate rotations and split #233

@Peque

Description

@Peque

With CadQuery, I can concatenate workplane rotations like so:

Workplane('XY').transformed(
        rotate=(0, 0, 20)
    ).transformed(
        rotate=(45, 0, 0)
    ).box(1, 1, 1)

Which works as expected, creating a cube that is rotated in two axes:

Screenshot from 2019-12-11 03-01-09

Now, I would like to:

  • Start with a cube
  • Select one of its vertices
  • Create a workplane at that vertex and apply concatenated rotations
  • Split the cube with that plane and get the lower part only

I would expect the splitting plane to be rotated in two axes, but it seems it is not:

vector = Vector(1, 1)
box = Workplane('XY').box(1, 1, 1)
box.faces(">Z").vertices(DirectionMinMaxSelector(vector, True)).first().\
    workplane().transformed(
        rotate=(0, 0, 20)
    ).transformed(
        rotate=(45, 0, 0)
    ).split(keepBottom=True)

Screenshot from 2019-12-11 03-05-30

Am I missing something or doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions