Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coil decoration only works with a specific order #757

Open
lcnbr opened this issue Nov 25, 2024 · 2 comments
Open

Coil decoration only works with a specific order #757

lcnbr opened this issue Nov 25, 2024 · 2 comments
Labels
bug 🐛 Something isn't working

Comments

@lcnbr
Copy link

lcnbr commented Nov 25, 2024

#import "@preview/cetz:0.3.0"
#{
let a = (1,0)
let b = (0.12,0.3)
cetz.canvas(length:30%,{
  cetz.decorations.coil(cetz.draw.hobby(a,b),amplitude:0.051,segment-length:0.05112,align:"MID")
})
cetz.canvas(length:30%,{
  cetz.decorations.coil(cetz.draw.hobby(b,a),amplitude:0.051,segment-length:0.05112,align:"MID")
})
}

This code should produce identical images but the bottom one seems to be problematic. Additionally some combinations make the compiler crash. I have a document where this is the case but cannot make a MWE.

@johannes-wolf johannes-wolf added the bug 🐛 Something isn't working label Nov 25, 2024
@johannes-wolf
Copy link
Member

Setting b=(0.12, 0.4) panics because of rounding issues.

@johannes-wolf
Copy link
Member

(Has nothing to do with this bug: Please use cetz 0.3.1, as 0.3.0 has some nasty bugs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants