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

Not working #8

Closed
flegall2014 opened this issue May 31, 2019 · 1 comment
Closed

Not working #8

flegall2014 opened this issue May 31, 2019 · 1 comment

Comments

@flegall2014
Copy link

Hello,

I was able to finally build hobl3l on Windows. Tried hob3l with one of my SCAD file. Hob3l cannot generate an STL with following error (whereas it is working just great in OpenSCAD).

$ ./hob3l.exe d:/tmp/test.scad -o d:/tmp/test.stl
d:/tmp/test.scad:6:7: Error: Expected '(', found '='.
Unexpected token, found '='.
pi=3.1415926535897932384626433832795028841971693993751058209;
^
Here is an extract of the SCAD file:

//WELCOMEATS3DKEY
//include <newdata.txt>

/////////////////WRITE
//Write
pi=3.1415926535897932384626433832795028841971693993751058209;
pi2=pi*2;

//default settings
center=false;
h = 4; //mm letter height
t = 1; //mm letter thickness
space =1; //extra space between characters in (character widths)
rotate=0; // text rotation (clockwise)
font = "D:/projects/keymanager_new/bin/profiles/letters.dxf"; //default for aditional fonts

module write(word){

rotate(rotate,[0,0,-1]){
for (r = [0:len(word)]){ // count off each character
// if the letter is lower case, add an underscore to the end for file lookup
if ((word[r] == "a" ) || (word[r]== "b") || (word[r]== "c")
|| (word[r]== "d") || (word[r]== "e") || (word[r]== "f")
|| (word[r]== "g") || (word[r]== "h") || (word[r]== "i")
|| (word[r]== "j") || (word[r]== "k") || (word[r]== "l")
|| (word[r]== "m") || (word[r]== "n") || (word[r]== "o")
|| (word[r]== "p") || (word[r]== "q") || (word[r]== "r")
|| (word[r]== "s") || (word[r]== "t") || (word[r]== "u")
|| (word[r]== "v") || (word[r]== "w") || (word[r]== "x")
|| (word[r]== "y" )|| (word[r]== "z")){
if (center == true) {
translate([0,-h/2,0]){
scale([.125h,.125h,t]){
translate([ (-len(word)5.5space/2) + (r5.5space),0,0])
linear_extrude(height=1,convexity=10,center=true){
import(file = font,layer=str(word[r],"_"));
}

@moehriegitt
Copy link
Owner

Hob3l does not support variables. Use openscad to output .csg format, which is simpler Scad format with all variables resolved. This is ad very fast step and the output is readable by Hob3l.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants