discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Cannot see the error here

T
Terry
Mon, Feb 14, 2022 5:54 PM

Can anyone see the cause of this error please? Source was a YT tutorial which I
carefully transcribed. I've been staring at line 20 and its neighbours for ages
but cannot see my mistake.

ERROR: Parser error: syntax error in file , line 20

//outside dimensions for enclosure box
width = 75; //x dimension
length = 50; //y dimension
height = 25; //z dimension
//additional parameters
corner_radius = 5; //radius of corners, higher is more rounded
wa11_thickness = 4; //total thickness of each wall
post_diameter = 10; //support post diameter
hole_diameter = 3; //size for screws if using lid, 0 if not using lid
1id_thickness = 2; //how thick the lid should be, comment out lines 82—99 to
skip the lid
1id_lip = 2; // to have the lid inset into the box, 0 is flush on top
1id_tolerance = .5; //lid is made a little smaller than the opening so it fits
easily after printing

module posts(x,y,z,h,r){

translate([x,y,z]){
cylinder(r = r, h = h);
}

translate([—x,y,z]){
cylinder(r = r, h = h);
}

translate([-x,-y,z]){
cylinder(r = r, h = h);
}

translate([x,-y,z]){
cylinder(r = r, h = h);
}

}

posts(x=width, y=length, z=0, h=height , r=corner_radius);

Can anyone see the cause of this error please? Source was a YT tutorial which I carefully transcribed. I've been staring at line 20 and its neighbours for ages but cannot see my mistake. ERROR: Parser error: syntax error in file , line 20 //outside dimensions for enclosure box width = 75; //x dimension length = 50; //y dimension height = 25; //z dimension //additional parameters corner_radius = 5; //radius of corners, higher is more rounded wa11_thickness = 4; //total thickness of each wall post_diameter = 10; //support post diameter hole_diameter = 3; //size for screws if using lid, 0 if not using lid 1id_thickness = 2; //how thick the lid should be, comment out lines 82—99 to skip the lid 1id_lip = 2; // to have the lid inset into the box, 0 is flush on top 1id_tolerance = .5; //lid is made a little smaller than the opening so it fits easily after printing module posts(x,y,z,h,r){ translate([x,y,z]){ cylinder(r = r, h = h); } translate([—x,y,z]){ cylinder(r = r, h = h); } translate([-x,-y,z]){ cylinder(r = r, h = h); } translate([x,-y,z]){ cylinder(r = r, h = h); } } posts(x=width, y=length, z=0, h=height , r=corner_radius);
TP
Torsten Paul
Mon, Feb 14, 2022 5:58 PM

That "-x" in the second translate looks like an em-dash or something
else but not a normal "minus".

ciao,
Torsten.

That "-x" in the second translate looks like an em-dash or something else but not a normal "minus". ciao, Torsten.
FS
FF Systems
Mon, Feb 14, 2022 6:20 PM

Torsten got it I think.  Looks like a double minus or em-dash needs to be a
single, normal, "-" character.

On Mon, Feb 14, 2022 at 11:55 AM Terry terrypingm@gmail.com wrote:

Can anyone see the cause of this error please? Source was a YT tutorial
which I
carefully transcribed. I've been staring at line 20 and its neighbours for
ages
but cannot see my mistake.

ERROR: Parser error: syntax error in file , line 20

//outside dimensions for enclosure box
width = 75; //x dimension
length = 50; //y dimension
height = 25; //z dimension
//additional parameters
corner_radius = 5; //radius of corners, higher is more rounded
wa11_thickness = 4; //total thickness of each wall
post_diameter = 10; //support post diameter
hole_diameter = 3; //size for screws if using lid, 0 if not using lid
1id_thickness = 2; //how thick the lid should be, comment out lines 82—99
to
skip the lid
1id_lip = 2; // to have the lid inset into the box, 0 is flush on top
1id_tolerance = .5; //lid is made a little smaller than the opening so it
fits
easily after printing

module posts(x,y,z,h,r){

     translate([x,y,z]){
     cylinder(r = r, h = h);
 }

 translate([—x,y,z]){
     cylinder(r = r, h = h);
     }

 translate([-x,-y,z]){
     cylinder(r = r, h = h);
     }

 translate([x,-y,z]){
     cylinder(r = r, h = h);
     }

}

posts(x=width, y=length, z=0, h=height , r=corner_radius);


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Torsten got it I think. Looks like a double minus or em-dash needs to be a single, normal, "-" character. On Mon, Feb 14, 2022 at 11:55 AM Terry <terrypingm@gmail.com> wrote: > Can anyone see the cause of this error please? Source was a YT tutorial > which I > carefully transcribed. I've been staring at line 20 and its neighbours for > ages > but cannot see my mistake. > > ERROR: Parser error: syntax error in file , line 20 > > > //outside dimensions for enclosure box > width = 75; //x dimension > length = 50; //y dimension > height = 25; //z dimension > //additional parameters > corner_radius = 5; //radius of corners, higher is more rounded > wa11_thickness = 4; //total thickness of each wall > post_diameter = 10; //support post diameter > hole_diameter = 3; //size for screws if using lid, 0 if not using lid > 1id_thickness = 2; //how thick the lid should be, comment out lines 82—99 > to > skip the lid > 1id_lip = 2; // to have the lid inset into the box, 0 is flush on top > 1id_tolerance = .5; //lid is made a little smaller than the opening so it > fits > easily after printing > > module posts(x,y,z,h,r){ > > translate([x,y,z]){ > cylinder(r = r, h = h); > } > > translate([—x,y,z]){ > cylinder(r = r, h = h); > } > > translate([-x,-y,z]){ > cylinder(r = r, h = h); > } > > translate([x,-y,z]){ > cylinder(r = r, h = h); > } > } > > posts(x=width, y=length, z=0, h=height , r=corner_radius); > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
T
Terry
Mon, Feb 14, 2022 6:58 PM

Thanks both, that fixed it!

Appreciate the fast replies; it was driving me nuts.

====================

On Mon, 14 Feb 2022 12:20:03 -0600, you wrote:

Torsten got it I think.  Looks like a double minus or em-dash needs to be a
single, normal, "-" character.

On Mon, Feb 14, 2022 at 11:55 AM Terry terrypingm@gmail.com wrote:

Can anyone see the cause of this error please? Source was a YT tutorial
which I
carefully transcribed. I've been staring at line 20 and its neighbours for
ages
but cannot see my mistake.

ERROR: Parser error: syntax error in file , line 20

//outside dimensions for enclosure box
width = 75; //x dimension
length = 50; //y dimension
height = 25; //z dimension
//additional parameters
corner_radius = 5; //radius of corners, higher is more rounded
wa11_thickness = 4; //total thickness of each wall
post_diameter = 10; //support post diameter
hole_diameter = 3; //size for screws if using lid, 0 if not using lid
1id_thickness = 2; //how thick the lid should be, comment out lines 82—99
to
skip the lid
1id_lip = 2; // to have the lid inset into the box, 0 is flush on top
1id_tolerance = .5; //lid is made a little smaller than the opening so it
fits
easily after printing

module posts(x,y,z,h,r){

    translate([x,y,z]){
    cylinder(r = r, h = h);
}

translate([—x,y,z]){
    cylinder(r = r, h = h);
    }

translate([-x,-y,z]){
    cylinder(r = r, h = h);
    }

translate([x,-y,z]){
    cylinder(r = r, h = h);
    }

}

posts(x=width, y=length, z=0, h=height , r=corner_radius);


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thanks both, that fixed it! Appreciate the fast replies; it was driving me nuts. ==================== On Mon, 14 Feb 2022 12:20:03 -0600, you wrote: >Torsten got it I think. Looks like a double minus or em-dash needs to be a >single, normal, "-" character. > >On Mon, Feb 14, 2022 at 11:55 AM Terry <terrypingm@gmail.com> wrote: > >> Can anyone see the cause of this error please? Source was a YT tutorial >> which I >> carefully transcribed. I've been staring at line 20 and its neighbours for >> ages >> but cannot see my mistake. >> >> ERROR: Parser error: syntax error in file , line 20 >> >> >> //outside dimensions for enclosure box >> width = 75; //x dimension >> length = 50; //y dimension >> height = 25; //z dimension >> //additional parameters >> corner_radius = 5; //radius of corners, higher is more rounded >> wa11_thickness = 4; //total thickness of each wall >> post_diameter = 10; //support post diameter >> hole_diameter = 3; //size for screws if using lid, 0 if not using lid >> 1id_thickness = 2; //how thick the lid should be, comment out lines 82—99 >> to >> skip the lid >> 1id_lip = 2; // to have the lid inset into the box, 0 is flush on top >> 1id_tolerance = .5; //lid is made a little smaller than the opening so it >> fits >> easily after printing >> >> module posts(x,y,z,h,r){ >> >> translate([x,y,z]){ >> cylinder(r = r, h = h); >> } >> >> translate([—x,y,z]){ >> cylinder(r = r, h = h); >> } >> >> translate([-x,-y,z]){ >> cylinder(r = r, h = h); >> } >> >> translate([x,-y,z]){ >> cylinder(r = r, h = h); >> } >> } >> >> posts(x=width, y=length, z=0, h=height , r=corner_radius); >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >>
FS
FF Systems
Mon, Feb 14, 2022 7:26 PM

BTW... (this is an open broadcast) when posting an "error in line???"
query, please do something like add a bunch of less-than symbols (like this
// <<<<<< line such-n-such) to the end of the mentioned line.  Including
the comment symbols is also helpful.

Having to count lines is difficult when you are trying to read past
google's text reformatting and other vagaries.

On Mon, Feb 14, 2022 at 12:58 PM Terry terrypingm@gmail.com wrote:

Thanks both, that fixed it!

Appreciate the fast replies; it was driving me nuts.

====================

On Mon, 14 Feb 2022 12:20:03 -0600, you wrote:

Torsten got it I think.  Looks like a double minus or em-dash needs to be

a

single, normal, "-" character.

On Mon, Feb 14, 2022 at 11:55 AM Terry terrypingm@gmail.com wrote:

Can anyone see the cause of this error please? Source was a YT tutorial
which I
carefully transcribed. I've been staring at line 20 and its neighbours

for

ages
but cannot see my mistake.

ERROR: Parser error: syntax error in file , line 20

//outside dimensions for enclosure box
width = 75; //x dimension
length = 50; //y dimension
height = 25; //z dimension
//additional parameters
corner_radius = 5; //radius of corners, higher is more rounded
wa11_thickness = 4; //total thickness of each wall
post_diameter = 10; //support post diameter
hole_diameter = 3; //size for screws if using lid, 0 if not using lid
1id_thickness = 2; //how thick the lid should be, comment out lines

82—99

to
skip the lid
1id_lip = 2; // to have the lid inset into the box, 0 is flush on top
1id_tolerance = .5; //lid is made a little smaller than the opening so

it

fits
easily after printing

module posts(x,y,z,h,r){

     translate([x,y,z]){
     cylinder(r = r, h = h);
 }

 translate([—x,y,z]){
     cylinder(r = r, h = h);
     }

 translate([-x,-y,z]){
     cylinder(r = r, h = h);
     }

 translate([x,-y,z]){
     cylinder(r = r, h = h);
     }

}

posts(x=width, y=length, z=0, h=height , r=corner_radius);


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

BTW... (this is an open broadcast) when posting an "error in line???" query, please do something like add a bunch of less-than symbols (like this // <<<<<< line such-n-such) to the end of the mentioned line. Including the comment symbols is also helpful. Having to count lines is difficult when you are trying to read past google's text reformatting and other vagaries. On Mon, Feb 14, 2022 at 12:58 PM Terry <terrypingm@gmail.com> wrote: > Thanks both, that fixed it! > > Appreciate the fast replies; it was driving me nuts. > > ==================== > > > On Mon, 14 Feb 2022 12:20:03 -0600, you wrote: > > >Torsten got it I think. Looks like a double minus or em-dash needs to be > a > >single, normal, "-" character. > > > >On Mon, Feb 14, 2022 at 11:55 AM Terry <terrypingm@gmail.com> wrote: > > > >> Can anyone see the cause of this error please? Source was a YT tutorial > >> which I > >> carefully transcribed. I've been staring at line 20 and its neighbours > for > >> ages > >> but cannot see my mistake. > >> > >> ERROR: Parser error: syntax error in file , line 20 > >> > >> > >> //outside dimensions for enclosure box > >> width = 75; //x dimension > >> length = 50; //y dimension > >> height = 25; //z dimension > >> //additional parameters > >> corner_radius = 5; //radius of corners, higher is more rounded > >> wa11_thickness = 4; //total thickness of each wall > >> post_diameter = 10; //support post diameter > >> hole_diameter = 3; //size for screws if using lid, 0 if not using lid > >> 1id_thickness = 2; //how thick the lid should be, comment out lines > 82—99 > >> to > >> skip the lid > >> 1id_lip = 2; // to have the lid inset into the box, 0 is flush on top > >> 1id_tolerance = .5; //lid is made a little smaller than the opening so > it > >> fits > >> easily after printing > >> > >> module posts(x,y,z,h,r){ > >> > >> translate([x,y,z]){ > >> cylinder(r = r, h = h); > >> } > >> > >> translate([—x,y,z]){ > >> cylinder(r = r, h = h); > >> } > >> > >> translate([-x,-y,z]){ > >> cylinder(r = r, h = h); > >> } > >> > >> translate([x,-y,z]){ > >> cylinder(r = r, h = h); > >> } > >> } > >> > >> posts(x=width, y=length, z=0, h=height , r=corner_radius); > >> _______________________________________________ > >> OpenSCAD mailing list > >> To unsubscribe send an email to discuss-leave@lists.openscad.org > >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
DM
Douglas Miller
Tue, Feb 15, 2022 12:48 PM

Yes, it is exactly an em-dash, confirmed with HexEdit:

E28094 is the UTF-8 encoding for U+2014 EM DASH.

On 2/14/2022 12:58 PM, Torsten Paul wrote:

That "-x" in the second translate looks like an em-dash or something
else but not a normal "minus".

ciao,
  Torsten.

Yes, it is exactly an em-dash, confirmed with HexEdit: E28094 is the UTF-8 encoding for U+2014 EM DASH. On 2/14/2022 12:58 PM, Torsten Paul wrote: > That "-x" in the second translate looks like an em-dash or something > else but not a normal "minus". > > ciao, >   Torsten.