Skip to content

Rotation is always about the world origin #2

@FacticiusVir

Description

@FacticiusVir

For the following

Lot --> extrude(1)
        s(5, 1, 1)
        split(x) {1: A | 1: NIL | 1: B | 1: NIL | 1: C}

A --> color("red")

B --> color("green")

C --> color("blue")
        r(0, 45, 0)

I intended C to be in line with A & B, but rotated 45 degrees about its centre; instead, it is rotated about the world origin and moves out of line. I have to translate C to the origin, rotate and translate back to simulate the intended effect:

Lot --> extrude(1)
        s(5, 1, 1)
        split(x) {1: A | 1: NIL | 1: B | 1: NIL | 1: C}

A --> color("red")

B --> color("green")

C --> color("blue")
        t(-4.5, 0, 0.5)
        r(0, 45, 0)
        t(4.5, 0, -0.5)

(Also note that the translation to origin has 0.5 X & Z offsets, as lots are not centred on the world origin)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions