Skip to content

Transfomations are messing with the shape #21

@anandology

Description

@anandology

This code shows only one shape even when two of them are shown. Looks like there is an issue with state.

def path(d, stroke_width=1, fill="none", stroke="black"):
    return Shape("path", d=d, stroke_width=stroke_width, fill=fill, storke=stroke)

# make your own SVG path from https://yqnn.github.io/svg-path-editor/
d = "M 4 8 L 10 1 L 13 0 L 12 3 L 5 9 C 6 10 6 11 7 10 C 7 11 8 12 7 12 A 1.42 1.42 0 0 1 6 13 A 5 5 0 0 0 4 10 Q 3.5 9.9 3.5 10.5 T 2 11.8 T 1.2 11 T 2.5 9.5 T 3 9 A 5 5 90 0 0 0 7 A 1.42 1.42 0 0 1 1 6 C 1 5 2 6 3 6 C 2 7 3 7 4 8 M 10 1 L 10 3 L 12 3 L 10.2 2.8 L 10 1"
dagger = path(d, stroke_width=1/3, fill="none") | scale(3) | rotate(45) | translate(y=-28, x=23)
#show(dagger)

dagger2 = path(d, stroke_width=1/3, fill="none") | scale(3) | rotate(45) | translate(y=-28, x=23)

shape = dagger | translate(x=100) | repeat(18, rotate(20))

shape2 = dagger | translate(x=-80) | repeat(20, rotate(20))
show(shape2)
show(shape)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions