User Tools

Site Tools


moestuinbordjes_garden_tags

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
moestuinbordjes_garden_tags [2021/11/10 12:42] jolienmoestuinbordjes_garden_tags [2021/11/10 12:50] jolien
Line 9: Line 9:
 * You'll also need a library on thingyverse: https://www.thingiverse.com/thing:3004457 Download both files and put them in your library folder within the openSCAD folder. * You'll also need a library on thingyverse: https://www.thingiverse.com/thing:3004457 Download both files and put them in your library folder within the openSCAD folder.
 * Open openSCAD and copy this code: * Open openSCAD and copy this code:
 +<code>
 +use <fontmetrics.scad>;
  
 +//Adjust text below
 +tekst = ["BLEEKSELDERIJ","AARDAPPEL", "ANDIJVIE", "PEPER", "PLUKSLA", "KNOFLOOK", "BONEN", "SUIKERMAIS", "SPERZIEBONEN", "Wortels","Ui","Snijbiet", "Sla", "Erwt", "Komkommer", "Kool", "Biet", "Artisjok", "Dille","Rucola", "Tomaten", "Knolselderij", "Pastinaak"];
 +//Adjust font below
 +font = "Liberation Sans Narrow:style=Bold";
 +//Adjust height with size
 +size = 15;
 +spalk=size/2;
 +
 +//Adjust total lenght and triangle length below
 +breedtetotaal= 210;
 +breedtedriehoek=70;
 +
 +
 +
 +
 +//The functions and modules (make a single tag)
 +function Capitalise (string) = 
 +    chr([for (c = string) if (ord(c)>=97 && ord(c)<= 122) (ord(c)-32) else ord(c)]);
 +    
 +
 +module Tagify (inputt) {
 +    plantnaam= Capitalise(inputt);
 +    
 +    w = measureText(plantnaam, font=font, size=size,spacing=0.9);
 +    breedtemidstuk= breedtetotaal-breedtedriehoek-w;      
 +    translate([w,0,0]){
 +        translate([(-w/2),0,0])
 +            drawText(plantnaam,font=font, size=size, spacing=0.9, halign=    "center");
 +            
 +            
 +        translate([(-w*0.995),-size/2,0])
 +            square([(w*0.995)+breedtemidstuk,size/2]);
 +             
 +         
 +        square([breedtemidstuk,size]);
 +        polygon([[breedtemidstuk,-spalk],[breedtemidstuk,size],[breedtemidstuk+breedtedriehoek,(spalk+size)/2 - spalk]]); 
 +    }   
 +}
 +
 +
 +// The for loop (makes multiple tags)
 +for (i = [0:len(tekst)-1]) {
 +   translate([0,((size+spalk+1)*i),0])
 +    Tagify (tekst[i]);
 +    }
 +
 +</code>
 +
 + * You can adjust the text. The code will automatically capitalise the text. 
 + * You can also adjust the font, but only standard issue fonts are available.
 + * Run (F5) and render (F6) to get your vector file
 + * Export as .dxf and you're ready to load it in the laser!
  
-* You can adjust the text. The code will automatically capitalise the text.  
-* You can also adjust the font, but only standard issue fonts are available. 
-* Run and render to get your vector file 
-* Export as .dxf and you're ready to load it in the laser! 
  
  
-Font adjust 
moestuinbordjes_garden_tags.txt · Last modified: 2021/11/14 09:09 by jolien