mrWheel / YAPP_Box

Yet Another Parametric Projectbox Box
https://willem.aandewiel.nl/index.php/2022/01/02/yet-another-parametric-projectbox-generator/
MIT License
267 stars 46 forks source link

Add image labels #78

Closed zyphlar closed 6 months ago

zyphlar commented 6 months ago

Extruding an SVG can be extremely powerful compared to just text; here's an idea for adding that support, changes welcome.

mrWheel commented 6 months ago

@zyphlar ,

can you elaborate on what this actually does?

can you provide images of “before” and “after”?

zyphlar commented 6 months ago

@mrWheel sure! A screenshot isn't really important, the important thing is this adds a new array of images (svg's) that can be applied to an enclosure in the same way that text is applied with the labels array.

So if you have a logo file, you can apply that logo just like you'd apply text.

Like this:

imagesPlane =
[
  [ 10, 10, 180, 0.5, yappLid, "logo.svg", 1.25 ]
];
zyphlar commented 6 months ago

Screenshot 2024-03-18 103825 Here's an example of using this PR: the RX/TX is a text label, and the other red stuff is an SVG logo.