Why does this BOSL library example not display a result?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does this BOSL library example not display a result?

OpenSCAD mailing list-2
I opened the file hingesnaps.scad and uncommented the first example I found. But instead of F5 displaying the hinge I got these warnings.



Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

LenStruttmann
Try uncommenting

   include <BOSL2/std.scad>

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

OpenSCAD mailing list-2
Thanks, that fixed it!

I had a little earlier uncommented and successfully displayed the first example from another file, threading.scad. Checking back I see that had four includes, all of which had already been uncommented. So presumably I should in future check that all includes have been uncommented?



Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

LenStruttmann
Actually, normally, those includes that are documented in the BOSL2 library are instructions for what you need to include in your part file(s). Generally, people do not edit the library files, but use them only as includes.  For example, in a file that I have to create a gear, I could have:

//--------------------------------------------
$fn = 24;

include <BOSL2/std.scad>
include <BOSL2/gears.scad>

gearCircularPitch = 10;
gearTeeth = 20;
gearLength = 5;

spur_gear( gearCircularPitch, _gearTeeth, splineL );

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

OpenSCAD mailing list-2
Thanks Len, very helpful. That's exactly the sort of truly basic stuff I need to learn about libraries.

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

OpenSCAD mailing list-2
In reply to this post by LenStruttmann
How did you decide which includes to include? <BOSL2/gears.scad> obviously, but <BOSL2/std.scad> ?

And what are the basic rules about folder locations for the library and your fresh scad file please?

Terry

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Why does this BOSL library example not display a result?

LenStruttmann
How did you decide which includes to include? <BOSL2/gears.scad> obviously, but <BOSL2/std.scad> ?


Because, at the top of BOSL2/gears.scad, it tells me which files to include:

//////////////////////////////////////////////////////////////////////////////////////////////
// LibFile: gears.scad
//   Spur Gears, Bevel Gears, Racks, Worms and Worm Gears.
//   Originally based on code by Leemon Baird, 2011, [hidden email]
//   Almost completely rewritten for BOSL2 by Revar Desmera, 2017-2021, [hidden email]
// Includes:
//   include <BOSL2/std.scad>
//   include <BOSL2/gears.scad>
//////////////////////////////////////////////////////////////////////////////////////////////



And what are the basic rules about folder locations for the library and your fresh scad file please?

The documentation for OpenSCAD libraries, which explains it much better than I can, is at:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries

Just download the BOSL2 distribution zip, unzip it, move it to your OpenSCAD installation's library folder, and rename it from BOSL2-master to BOSL2.



Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]