Drawing a simple cube #547
-
When trying to draw a simple cube the edges seem to be to not match at all. I tried different approaches, but I just can't seem to get the edges to connect properly. Here is a simple example with a line: #import "@preview/cetz:0.2.2"
#cetz.canvas({
import cetz.draw: *
line((0,0), (1,0), (1,1), (1,1,0.2), (1,0,0.2), (1,0), (0,0), (0,1), (1,1), (1,1,0.2), (0,1,0.2), (0,1))
}) Here is a screenshot of the output. Notice the edges on the top right in particular, but also on the bottom right and top left. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could try changing the stroke styling, specifically |
Beta Was this translation helpful? Give feedback.
You could try changing the stroke styling, specifically
join
(https://typst.app/docs/reference/visualize/stroke/#constructor-join) ormiter-limit
(https://typst.app/docs/reference/visualize/stroke/#constructor-miter-limit). Withset-style(stroke: (join: "bevel"))
: