discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Anchor does not seem to work

BR
Bob Roos
Thu, Apr 24, 2025 9:09 AM

Hello OpenSCAD,

If I omit anchor it defaults to BOTTOM, but if I specify anything it goes to CENTER and not what I specify
I pulled in the latest BOSL library thinking that might be that I had old code but it did not make any difference.

include <BOSL2/std.scad> //or screws or threading
$fn=24;
Inch=25.4;

L = 6*Inch; // overall length
W = 20;  // overall Width
T = 5;  // overall thickness
Sw = 6; // slot width

TPI = 20;  // threads per inch
BHT = 2;  // Bolt head thickness
NT = 3;    // Nut thickness

rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM);

--
Best regards,
Bob                          mailto:roosbob@wybatap.com

Hello OpenSCAD, If I omit anchor it defaults to BOTTOM, but if I specify anything it goes to CENTER and not what I specify I pulled in the latest BOSL library thinking that might be that I had old code but it did not make any difference. include <BOSL2/std.scad> //or screws or threading $fn=24; Inch=25.4; L = 6*Inch; // overall length W = 20; // overall Width T = 5; // overall thickness Sw = 6; // slot width TPI = 20; // threads per inch BHT = 2; // Bolt head thickness NT = 3; // Nut thickness rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM); -- Best regards, Bob mailto:roosbob@wybatap.com
AM
Adrian Mariano
Thu, Apr 24, 2025 12:21 PM

It went where you specified: TOP+BOTTOM cancels, so your anchor is LEFT,
which is where it went. It is not at CENTER.

On Thu, Apr 24, 2025 at 05:10 Bob Roos via Discuss <
discuss@lists.openscad.org> wrote:

Hello OpenSCAD,

If I omit anchor it defaults to BOTTOM, but if I specify anything it goes
to CENTER and not what I specify
I pulled in the latest BOSL library thinking that might be that I had old
code but it did not make any difference.

include <BOSL2/std.scad> //or screws or threading
$fn=24;
Inch=25.4;

L = 6*Inch; // overall length
W = 20;  // overall Width
T = 5;  // overall thickness
Sw = 6; // slot width

TPI = 20;  // threads per inch
BHT = 2;  // Bolt head thickness
NT = 3;    // Nut thickness

rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM);

--
Best regards,
Bob                          mailto:roosbob@wybatap.com


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

It went where you specified: TOP+BOTTOM cancels, so your anchor is LEFT, which is where it went. It is not at CENTER. On Thu, Apr 24, 2025 at 05:10 Bob Roos via Discuss < discuss@lists.openscad.org> wrote: > Hello OpenSCAD, > > If I omit anchor it defaults to BOTTOM, but if I specify anything it goes > to CENTER and not what I specify > I pulled in the latest BOSL library thinking that might be that I had old > code but it did not make any difference. > > > > include <BOSL2/std.scad> //or screws or threading > $fn=24; > Inch=25.4; > > L = 6*Inch; // overall length > W = 20; // overall Width > T = 5; // overall thickness > Sw = 6; // slot width > > TPI = 20; // threads per inch > BHT = 2; // Bolt head thickness > NT = 3; // Nut thickness > > > rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM); > > -- > Best regards, > Bob mailto:roosbob@wybatap.com > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
BR
Bob Roos
Thu, Apr 24, 2025 3:25 PM

Hi Adrian,

THANK YOU.  Somehow I removed BACK and replaced it with BOTTOM.
 
Forest and Trees!  :)

Thursday, April 24, 2025, 8:21:06 AM, you wrote:

It went where you specified: TOP+BOTTOM cancels, so your anchor is LEFT, which is where it went. It is not at CENTER. 
On Thu, Apr 24, 2025 at 05:10 Bob Roos via Discuss discuss@lists.openscad.org wrote:

Hello OpenSCAD,

If I omit anchor it defaults to BOTTOM, but if I specify anything it goes to CENTER and not what I specify
I pulled in the latest BOSL library thinking that might be that I had old code but it did not make any difference.

  include <BOSL2/std.scad> //or screws or threading
$fn=24;
Inch=25.4;

L = 6*Inch; // overall length 
W = 20;  // overall Width
T = 5;  // overall thickness
Sw = 6; // slot width

TPI = 20;  // threads per inch
BHT = 2;   // Bolt head thickness
NT = 3;    // Nut thickness

rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM);

-- 
have Fun,
 Bob                           mailto:roosbob@wybatap.com

Hi Adrian, THANK YOU.  Somehow I removed BACK and replaced it with BOTTOM.   Forest and Trees!  :) Thursday, April 24, 2025, 8:21:06 AM, you wrote: > It went where you specified: TOP+BOTTOM cancels, so your anchor is LEFT, which is where it went. It is not at CENTER.  > On Thu, Apr 24, 2025 at 05:10 Bob Roos via Discuss <discuss@lists.openscad.org> wrote: >> Hello OpenSCAD, >> If I omit anchor it defaults to BOTTOM, but if I specify anything it goes to CENTER and not what I specify >> I pulled in the latest BOSL library thinking that might be that I had old code but it did not make any difference. >>   include <BOSL2/std.scad> //or screws or threading >> $fn=24; >> Inch=25.4; >> L = 6*Inch; // overall length  >> W = 20;  // overall Width >> T = 5;  // overall thickness >> Sw = 6; // slot width >> TPI = 20;  // threads per inch >> BHT = 2;   // Bolt head thickness >> NT = 3;    // Nut thickness >> rect_tube(size=[W,L],isize=[Sw,L-2*Sw],l=T,rounding=2,anchor=TOP+LEFT+BOTTOM); --  have Fun,  Bob                           mailto:roosbob@wybatap.com