BOSL2 libraries - how to use them?

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

BOSL2 libraries - how to use them?

skypuppy
Some wonderful tools in this library, truly.

BUT, how to I include them in my 'code?'

I wish to add small, strengthening fillets to my little BL Touch mount. 
(No, haven't subtracted the notches/holes for the wires yet.)

So, where to the include statements go?

Thanks for the help!

David


Here's the code so far:  (yeah, it's kinda ugly right now)

// Attempt at a BL Touch (BLT) mounting bracket that fits my CR-10 S5,
Ender 3 Pro, and Sunlu S8.
// Hope to do it all in variables.  :)
$fn=30;

mbd = 4;    // mounting bolt diameters
bltbd = 3;   // mounting blt diameters
mbt = 4;    // mounting base thickness
armt = 6;   // arm thickness
arml = 30;  // total arm length
armoffseth = 21.76;   // from bottom of bracket.  too low!
mountfw = 34.67;     // mount full width
armoffsetl = 18;       // arm offset left
mountfh = 37;      // mount full height
mounttbhc = 4.19;     // mount top bolt hole center, from right
mounttbhbr = 4.4;    // mount top bolt hole center, from bottom
mountbbhcr = 22;    // mount bottom bolt hole center, from right
mountbbbcb = 32;    // mount bottom bolt hole center, from bottom
armbhacr = 23.38;    // arm bolt holes (all) center, from right
// all arm bolt holes measured from base, and numbered from base
armbh1offset = 8.54;   // arm bolt hole 1 center, from base
armbh2offset = 19;     // arm bolt hole 2 center, from base
armbh3offset = 27.66;   // arm bolt hole 3 center, from base
armtop = 9;             // distanct from top of mount to top of arm

// full size base, arm, and total volume

difference () {
     cube ([mountfh, mountfw, arml]);   //full volume
     cube ([28, armoffsetl, arml]);          // subtract lower right block
     translate([31.4, mounttbhc, 0])         // set location for bolt hole 1
         cylinder(h=mountfh, d=bltbd);           // subtract bolt hole 1
     translate([13, 21.85, 0])                   // set location for
bolt hole 2
         cylinder(h=mountfh, d=bltbd);           // subtract bolt hole 2
     translate([0, armoffsetl, mbd])         // set location to remove
bottom left chunk
        cube([22, 16.7, arml]);                  // subtract that chunk

    translate([mountfh - armtop, 0, mbd])    // set location to remove
top chunk
       // cube([mountfh - armtop, mountfw, mountfh]);      // remove top
chunk
         cube([mountfh - armtop, mountfw, mountfh]);
}
     //    translate([28.25, mountfw, mbd]);             // set location
to remove top chunk
     //    cube([9, mountfw, mountfh]);
//translate ([40, 40, 0])
//    cylinder(h=40, d=15);


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

RevarBat
The main files can be included with:

    include <BOSL2/std.scad>

The docs are at:

    https://github.com/revarbat/BOSL2/wiki/

-Revar



> On Dec 12, 2020, at 12:36 AM, David <[hidden email]> wrote:
>
> Some wonderful tools in this library, truly.
>
> BUT, how to I include them in my 'code?'
>
> I wish to add small, strengthening fillets to my little BL Touch mount.  (No, haven't subtracted the notches/holes for the wires yet.)
>
> So, where to the include statements go?
>
> Thanks for the help!
>
> David
>
>
> Here's the code so far:  (yeah, it's kinda ugly right now)
>
> // Attempt at a BL Touch (BLT) mounting bracket that fits my CR-10 S5, Ender 3 Pro, and Sunlu S8.
> // Hope to do it all in variables.  :)
> $fn=30;
>
> mbd = 4;    // mounting bolt diameters
> bltbd = 3;   // mounting blt diameters
> mbt = 4;    // mounting base thickness
> armt = 6;   // arm thickness
> arml = 30;  // total arm length
> armoffseth = 21.76;   // from bottom of bracket.  too low!
> mountfw = 34.67;     // mount full width
> armoffsetl = 18;       // arm offset left
> mountfh = 37;      // mount full height
> mounttbhc = 4.19;     // mount top bolt hole center, from right
> mounttbhbr = 4.4;    // mount top bolt hole center, from bottom
> mountbbhcr = 22;    // mount bottom bolt hole center, from right
> mountbbbcb = 32;    // mount bottom bolt hole center, from bottom
> armbhacr = 23.38;    // arm bolt holes (all) center, from right
> // all arm bolt holes measured from base, and numbered from base
> armbh1offset = 8.54;   // arm bolt hole 1 center, from base
> armbh2offset = 19;     // arm bolt hole 2 center, from base
> armbh3offset = 27.66;   // arm bolt hole 3 center, from base
> armtop = 9;             // distanct from top of mount to top of arm
>
> // full size base, arm, and total volume
>
> difference () {
>     cube ([mountfh, mountfw, arml]);   //full volume
>     cube ([28, armoffsetl, arml]);          // subtract lower right block
>     translate([31.4, mounttbhc, 0])         // set location for bolt hole 1
>         cylinder(h=mountfh, d=bltbd);           // subtract bolt hole 1
>     translate([13, 21.85, 0])                   // set location for bolt hole 2
>         cylinder(h=mountfh, d=bltbd);           // subtract bolt hole 2
>     translate([0, armoffsetl, mbd])         // set location to remove bottom left chunk
>        cube([22, 16.7, arml]);                  // subtract that chunk
>
>    translate([mountfh - armtop, 0, mbd])    // set location to remove top chunk
>       // cube([mountfh - armtop, mountfw, mountfh]);      // remove top chunk
>         cube([mountfh - armtop, mountfw, mountfh]);
> }
>     //    translate([28.25, mountfw, mbd]);             // set location to remove top chunk
>     //    cube([9, mountfw, mountfh]);
> //translate ([40, 40, 0])
> //    cylinder(h=40, d=15);
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

cbernhardt
In reply to this post by skypuppy
I also wanted to try the BOSL2 library, so I downloaded it only to find that
it would not work with my old version of OpenSCAD.  So I downloaded version
2019.05 and installed it on a Windows 7, 64 bit desktop computer.  I
downloaded the BOSL2 ZIP file, "BOSL2-master.zip" and set up the BOSL2
folder per the instructions.

I tried tried three examples that I copied from the this forum and when I
try to preview any of the three examples I get the messages:
*Warning: Can't open include file 'BOSL2/std.scad'.
Warning: Can't open include file '../std.scad'.
Warning: Can't open include file '../hull.scad'.
Compiling design (CSG Tree generation)...
Warning: Ignoring unknown variable 'PHI', in
file../Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/hull.scad,line7.
*The last warning is repeated about 12 times.

I do have the "include<BOSL2/std.scad>" statement in each example.
If I go to "File", "Show Library Folder", the BOSL2 file folder is shown and
all of the unzipped files are present.

What am I doing wrong?
Thanks



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

adrianv
It sounds like you did the right thing, so I'm a little bit unsure about
what's wrong.  

If I try to run a BOSL2 example without it properly installed I get:

Parsing design (AST generation)...
WARNING: Can't open include file 'BOSL2/std.scad'.
WARNING: Can't open include file 'BOSL2/skin.scad'.
Compiling design (CSG Tree generation)...
WARNING: Ignoring unknown module 'path_sweep', in file test1.scad, line 13.

I do not get message about "../std.scad" for example.  Those messages are
odd.   What exactly is your code example?  

Just to confirm, if you look in the library folder you see the BOSL2 folder
in there, and then inside the BOSL2 folder you have std.scad and the various
other BOSL2 scad files, so the file BOSL2/std.scad exists in the library
folder?


cbernhardt wrote

> I also wanted to try the BOSL2 library, so I downloaded it only to find
> that
> it would not work with my old version of OpenSCAD.  So I downloaded
> version
> 2019.05 and installed it on a Windows 7, 64 bit desktop computer.  I
> downloaded the BOSL2 ZIP file, "BOSL2-master.zip" and set up the BOSL2
> folder per the instructions.
>
> I tried tried three examples that I copied from the this forum and when I
> try to preview any of the three examples I get the messages:
> *Warning: Can't open include file 'BOSL2/std.scad'.
> Warning: Can't open include file '../std.scad'.
> Warning: Can't open include file '../hull.scad'.
> Compiling design (CSG Tree generation)...
> Warning: Ignoring unknown variable 'PHI', in
> file../Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/hull.scad,line7.
> *The last warning is repeated about 12 times.
>
> I do have the "include&lt;BOSL2/std.scad&gt;" statement in each example.
> If I go to "File", "Show Library Folder", the BOSL2 file folder is shown
> and
> all of the unzipped files are present.
>
> What am I doing wrong?
> Thanks
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

cbernhardt
Yes.  All the code examples and files are in the BOSL2 folder under My
Documents\OpenSCAD\Libraries

The code examples are the ones posted here:
http://forum.openscad.org/bending-a-shape-that-s-only-slightly-complex-td31059.html

The one posted by Renaldo I added the include statement.
The ones posted by Adrianv and thehans were not changed in any way.

I did have an old version of OpenSCAD installed on this computer and I
installed the new version in a different folder.  Don't know if that would
cause my problem???
Perhaps I should uninstall everything and try again?





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

adrianv
You have the code examples in the Libraries folder, the same place where the
BOSL2 directory is located?  

It looks to me like more than one thing is wrong.  I don't think having
multiple OpenSCADs is an issue.  

But you're getting errors that don't make sense, specifically the ones about
failure to find "../std.scad" and "../hull.scad".   The only explanation I
can see for that is that your code is including BOSL2/tests/hull.scad, which
is strange, since the examples you list don't use hull.scad at all.   I've
never noticed this issue, but it would be helpful if OpenSCAD gave the file
and line number of the include it can't find.  That might give a clue about
what's going on.  

It seems like the main issue is that somehow OpenSCAD is either not finding
the file, or is finding the wrong files.   I don't know if there's any help
here:

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

If you put your example file in the same folder as the BOSL2 directory then
it should be guaranteed to work unless there's something wrong with the
BOSL2 folder itself.  

I guess we can ask the question of what exactly the contents of the BOSL2
directory are.  It should be this:

affine.scad
arrays.scad
attachments.scad
beziers.scad
bosl1compat.scad
bottlecaps.scad
changes/
common.scad
constants.scad
CONTRIBUTING.md
coords.scad
cubetruss.scad
debug.scad
distributors.scad
edges.scad
examples/
geometry.scad
githooks/
hingesnaps.scad
hull.scad
involute_gears.scad
joiners.scad
knurling.scad
LICENSE
linear_bearings.scad
masks.scad
math.scad
metric_screws.scad
mutators.scad
nema_steppers.scad
partitions.scad
paths.scad
phillips_drive.scad
polyhedra.scad
primitives.scad
quaternions.scad
queues.scad
README.md
regions.scad
rounding.scad
screws.scad
scripts/
shapes2d.scad
shapes.scad
skin.scad
sliders.scad
stacks.scad
std.scad
strings.scad
structs.scad
tests/
threading.scad
torx_drive.scad
transforms.scad
triangulation.scad
turtle3d.scad
tutorials/
vectors.scad
version.scad
vnf.scad
walls.scad
wiring.scad
WRITING_DOCS.md

Does that match what you have?   What happens if you run a test "example"
that contains simply

include<BOSL2/std.scad>

and no actual code.  


cbernhardt wrote

> Yes.  All the code examples and files are in the BOSL2 folder under My
> Documents\OpenSCAD\Libraries
>
> The code examples are the ones posted here:
> http://forum.openscad.org/bending-a-shape-that-s-only-slightly-complex-td31059.html
>
> The one posted by Renaldo I added the include statement.
> The ones posted by Adrianv and thehans were not changed in any way.
>
> I did have an old version of OpenSCAD installed on this computer and I
> installed the new version in a different folder.  Don't know if that would
> cause my problem???
> Perhaps I should uninstall everything and try again?
>
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

lar3ry
adrianv wrote

> But you're getting errors that don't make sense, specifically the ones
> about
> failure to find "../std.scad" and "../hull.scad".   The only explanation I
> can see for that is that your code is including BOSL2/tests/hull.scad,
> which
> is strange, since the examples you list don't use hull.scad at all.   I've
> never noticed this issue, but it would be helpful if OpenSCAD gave the
> file
> and line number of the include it can't find.  That might give a clue
> about
> what's going on.  

hull.scad is included by std.scad, but I don't know if it would try to open
it, or if so, if it would generate an error for an unknown variable.

But the thing I find strange is that two of the error messages seem to be in
conflict.

Warning: Can't open include file '../hull.scad'.
and
Warning: Ignoring unknown variable 'PHI', in
file../Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/hull.scad,line7.

So I have to ask "was hull.scad found or not?".




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

lar3ry
This post was updated on .
Another strangeness is that hull.scad has no references to PHI. There is only
one "phi" contained in a comment.

So.
It could not find hull.scad
It found hull.scad
It found an error for a variable that was not usd in hull.scad.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

adrianv
In reply to this post by lar3ry
lar3ry wrote

> adrianv wrote
>> But you're getting errors that don't make sense, specifically the ones
>> about
>> failure to find "../std.scad" and "../hull.scad".   The only explanation
>> I
>> can see for that is that your code is including BOSL2/tests/hull.scad,
>> which
>> is strange, since the examples you list don't use hull.scad at all.  
>> I've
>> never noticed this issue, but it would be helpful if OpenSCAD gave the
>> file
>> and line number of the include it can't find.  That might give a clue
>> about
>> what's going on.  
>
> hull.scad is included by std.scad, but I don't know if it would try to
> open
> it, or if so, if it would generate an error for an unknown variable.

No, hull.scad is NOT included by std.scad.  


> But the thing I find strange is that two of the error messages seem to be
> in
> conflict.
>
> Warning: Can't open include file '../hull.scad'.
> and
> Warning: Ignoring unknown variable 'PHI', in
> file../Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/hull.scad,line7.
>
> So I have to ask "was hull.scad found or not?".

Actually you have drawn my attention to an important clue.  The correct
hull.scad file does not reference PHI on line 7.  The file which does is
tests/hull.scad.  And tests/hull.scad does include ../hull.scad, so this
explains much of what's going on .  It sounds like the directory structure
may have been collapsed when BOSL2 was unzipped.  The BOSL2 directory
doesn't have the right files and folder structure in it.  

I still don't understand why hull.scad was being referenced at all, though.  

 




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

lar3ry
adrianv wrote
> No, hull.scad is NOT included by std.scad.  

Right. I was just about to come here and correct my error.


>> Warning: Can't open include file '../hull.scad'.
>> and
>> Warning: Ignoring unknown variable 'PHI', in
>> file../Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/hull.scad,line7.
>>
>> So I have to ask "was hull.scad found or not?".
>
> Actually you have drawn my attention to an important clue.  The correct
> hull.scad file does not reference PHI on line 7.  The file which does is
> tests/hull.scad.  And tests/hull.scad does include ../hull.scad, so this
> explains much of what's going on .  It sounds like the directory structure
> may have been collapsed when BOSL2 was unzipped.  The BOSL2 directory
> doesn't have the right files and folder structure in it.  

Ahh.. that's probably it.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

cbernhardt
This post was updated on .
I removed the previous 2019.05 version, reloaded version 2019.05 and placed
the .scad files in the libraries/BOSL2 folder.  I still have the old version
of OpenSCAD 2015.03-2 loaded on the computer.
Still getting the errors. Here is the complete error message:

Loaded design
'C:/Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/bosl2.scad
Parsing design (AST generation)...
WARNING: Can't open include file 'BOSL2/std.scad'.
WARNING: Can't open include file '../std.scad'.
WARNING: Can't open include file '../hull.scad'.
Compiling design (CSG Tree generation)...
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
WARNING: Ignoring unknown variable 'EPSILON', in file vectors.scad, line
133.
WARNING: Ignoring unknown variable 'EPSILON', in file vectors.scad, line 40.
ERROR: Assertion 'is_vector(v)' failed: "Expected a vector. Got: [1, undef,
0]" in file vectors.scad, line 132
TRACE: called by 'unit', in file hull.scad, line 11.
Compiling design (CSG Products generation)...
Geometries in cache: 0
Geometry cache size in bytes: 0
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized CSG tree has 0 elements
Compile and preview finished.
Total rendering time: 0 hours, 0 minutes, 0 seconds


If I open a new file and include just one line "include<BOSL2/std.scad>"
I get an error message:
ERROR: Parser error in line 101:syntax error
ERROR: Compilation failed

My BOSL2 folder contains only files, no folders.

Any other suggestions?




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

adrianv
As I said, I don't think the OpenSCAD versions have anything to do with the
problem.  

Your BOSL2 directory contains at least one wrong file, namely a file that
should be in BOSL2/test.  If one file is wrong, probably many other things
are wrong too.  Messing with OpenSCAD won't fix this.  

You need to wipe out all your BOSL2 files, and unzip BOSL2 again and make
sure it creates the full directory structure and that you have exactly the
files I listed above (no other ones) in your BOSL2 directory.   Note that
you don't want all the .scad files from BOSL2 in the BOSL2 folder.  The
tests need to stay in the tests folder.  (Or you actually don't need them at
all.)  The output below shows that the correct hull.scad in BOSL2 has been
overwritten by tests/hull.scad.  


cbernhardt wrote

> I removed the previous 2019.05 version, reloaded version 2019.05 and
> placed
> the .scad files in the libraries/BOSL2 folder.  I still have the old
> version
> of OpenSCAD 2015.03-2 loaded on the computer.
> Still getting the errors. Here is the complete error message:
>
> Loaded design
> 'C:/Users/Graphics/Documents/OpenSCAD/libraries/BOSL2/bosl2.scad
> Parsing design (AST generation)...
> WARNING: Can't open include file 'BOSL2/std.scad'.
> WARNING: Can't open include file '../std.scad'.
> WARNING: Can't open include file '../hull.scad'.
> Compiling design (CSG Tree generation)...
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 7.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 8.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
> WARNING: Ignoring unknown variable 'PHI', in file hull.scad, line 9.
> WARNING: Ignoring unknown variable 'EPSILON', in file vectors.scad, line
> 133.
> WARNING: Ignoring unknown variable 'EPSILON', in file vectors.scad, line
> 40.
> ERROR: Assertion 'is_vector(v)' failed: "Expected a vector. Got: [1,
> undef,
> 0]" in file vectors.scad, line 132
> TRACE: called by 'unit', in file hull.scad, line 11.
> Compiling design (CSG Products generation)...
> Geometries in cache: 0
> Geometry cache size in bytes: 0
> CGAL Polyhedrons in cache: 0
> CGAL cache size in bytes: 0
> Compiling design (CSG Products normalization)...
> Normalized CSG tree has 0 elements
> Compile and preview finished.
> Total rendering time: 0 hours, 0 minutes, 0 seconds
>
> Any other suggestions?
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

cbernhardt
I downloaded the BOSL files here:
https://github.com/revarbat/BOSL2/archive/master.zip

There is no directory structure in the ZIP file.

Where should I get the proper file?



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

adrianv
I think that's the right file.  I downloaded and examined its contents and I
see this:

  Length      Date    Time    Name                                                                                      
---------  ---------- -----   ----                                                                                      
        0  2020-12-11 19:24   BOSL2-master/                                                                              
        0  2020-12-11 19:24   BOSL2-master/.github/                                                                      
        0  2020-12-11 19:24   BOSL2-master/.github/ISSUE_TEMPLATE/                                                      
      522  2020-12-11 19:24  
BOSL2-master/.github/ISSUE_TEMPLATE/bug_report.md                                          
      655  2020-12-11 19:24  
BOSL2-master/.github/ISSUE_TEMPLATE/feature_reques                                        
t.md                                                                                            
        0  2020-12-11 19:24   BOSL2-master/.github/workflows/                                                            
     1669  2020-12-11 19:24   BOSL2-master/.github/workflows/docsgen.yml                                                
     2427  2020-12-11 19:24   BOSL2-master/.github/workflows/main.yml                                                    
     1233  2020-12-11 19:24   BOSL2-master/.gitignore                                                                    
     2142  2020-12-11 19:24   BOSL2-master/CONTRIBUTING.md                                                              
     1323  2020-12-11 19:24   BOSL2-master/LICENSE                                                                      
     9095  2020-12-11 19:24   BOSL2-master/README.md                                                                    
     7365  2020-12-11 19:24   BOSL2-master/WRITING_DOCS.md                                                              
    19395  2020-12-11 19:24   BOSL2-master/affine.scad                                                                  
    58617  2020-12-11 19:24   BOSL2-master/arrays.scad                                                                  
    59833  2020-12-11 19:24   BOSL2-master/attachments.scad                                                              
    60436  2020-12-11 19:24   BOSL2-master/beziers.scad                                                                  
     3623  2020-12-11 19:24   BOSL2-master/bosl1compat.scad                                                              
    13340  2020-12-11 19:24   BOSL2-master/bottlecaps.scad                                                              
        0  2020-12-11 19:24   BOSL2-master/changes/                                                                      
     1464  2020-12-11 19:24   BOSL2-master/changes/REMOVED.txt                                                          
    24779  2020-12-11 19:24   BOSL2-master/common.scad                                                                  
     3918  2020-12-11 19:24   BOSL2-master/constants.scad                                                                
    13907  2020-12-11 19:24   BOSL2-master/coords.scad                                                                  
    22465  2020-12-11 19:24   BOSL2-master/cubetruss.scad                                                                
    18696  2020-12-11 19:24   BOSL2-master/debug.scad                                                                    
    43965  2020-12-11 19:24   BOSL2-master/distributors.scad                                                            
    14743  2020-12-11 19:24   BOSL2-master/edges.scad                                                                    
        0  2020-12-11 19:24   BOSL2-master/examples/                                                                    
     1429  2020-12-11 19:24   BOSL2-master/examples/BOSL2logo.scad                                                      
      591  2020-12-11 19:24   BOSL2-master/examples/attachments.scad                                                    
     2506  2020-12-11 19:24   BOSL2-master/examples/bezier_patches.scad                                                  
     1371  2020-12-11 19:24   BOSL2-master/examples/boolean_geometry.scad                                                
      163  2020-12-11 19:24   BOSL2-master/examples/conical_anchors.scad                                                
      156  2020-12-11 19:24   BOSL2-master/examples/cube_anchors.scad                                                    
      235  2020-12-11 19:24  
BOSL2-master/examples/cubic_sphere_packing.scad                                            
      155  2020-12-11 19:24   BOSL2-master/examples/cylinder_anchors.scad                                                
      505  2020-12-11 19:24   BOSL2-master/examples/fractal_tree.scad                                                    
      311  2020-12-11 19:24   BOSL2-master/examples/hex_sphere_packing.scad                                              
     4168  2020-12-11 19:24   BOSL2-master/examples/lsystems.scad                                                        
     2465  2020-12-11 19:24   BOSL2-master/examples/orientations.scad                                                    
      167  2020-12-11 19:24   BOSL2-master/examples/prismoid_anchors.scad                                                
     1089  2020-12-11 19:24  
BOSL2-master/examples/randomized_fractal_tree.scad                                        
      362  2020-12-11 19:24   BOSL2-master/examples/screw_anchors.scad                                                  
      149  2020-12-11 19:24   BOSL2-master/examples/sphere_anchors.scad                                                  
      638  2020-12-11 19:24   BOSL2-master/examples/spherical_patch.scad                                                
      348  2020-12-11 19:24   BOSL2-master/examples/tagged_diff.scad                                                    
    90325  2020-12-11 19:24   BOSL2-master/geometry.scad                                                                
        0  2020-12-11 19:24   BOSL2-master/githooks/                                                                    
      492  2020-12-11 19:24   BOSL2-master/githooks/pre-commit                                                          
      492  2020-12-11 19:24   BOSL2-master/githooks/pre-merge-commit
     8773  2020-12-11 19:24   BOSL2-master/hingesnaps.scad
    10319  2020-12-11 19:24   BOSL2-master/hull.scad
    56372  2020-12-11 19:24   BOSL2-master/involute_gears.scad
    48826  2020-12-11 19:24   BOSL2-master/joiners.scad
     7736  2020-12-11 19:24   BOSL2-master/knurling.scad
     5213  2020-12-11 19:24   BOSL2-master/linear_bearings.scad
    35938  2020-12-11 19:24   BOSL2-master/masks.scad
    62541  2020-12-11 19:24   BOSL2-master/math.scad
    23651  2020-12-11 19:24   BOSL2-master/metric_screws.scad
    28253  2020-12-11 19:24   BOSL2-master/mutators.scad
    27637  2020-12-11 19:24   BOSL2-master/nema_steppers.scad
     9150  2020-12-11 19:24   BOSL2-master/partitions.scad
    54922  2020-12-11 19:24   BOSL2-master/paths.scad
     3030  2020-12-11 19:24   BOSL2-master/phillips_drive.scad
    43053  2020-12-11 19:24   BOSL2-master/polyhedra.scad
    11691  2020-12-11 19:24   BOSL2-master/primitives.scad
    22514  2020-12-11 19:24   BOSL2-master/quaternions.scad
     6350  2020-12-11 19:24   BOSL2-master/queues.scad
    44527  2020-12-11 19:24   BOSL2-master/regions.scad
   131233  2020-12-11 19:24   BOSL2-master/rounding.scad
    74355  2020-12-11 19:24   BOSL2-master/screws.scad
        0  2020-12-11 19:24   BOSL2-master/scripts/
    31014  2020-12-11 19:24   BOSL2-master/scripts/docs_gen.py
     2446  2020-12-11 19:24   BOSL2-master/scripts/func_coverage.py
     2459  2020-12-11 19:24   BOSL2-master/scripts/gencheat.sh
     1375  2020-12-11 19:24   BOSL2-master/scripts/genindex.sh
      678  2020-12-11 19:24   BOSL2-master/scripts/linecount.sh
     1463  2020-12-11 19:24   BOSL2-master/scripts/make_all_docs.sh
      958  2020-12-11 19:24   BOSL2-master/scripts/make_tutorials.sh
      783  2020-12-11 19:24   BOSL2-master/scripts/run_tests.sh
    10763  2020-12-11 19:24   BOSL2-master/scripts/tutorial_gen.py
    74428  2020-12-11 19:24   BOSL2-master/shapes.scad
    93235  2020-12-11 19:24   BOSL2-master/shapes2d.scad
    91793  2020-12-11 19:24   BOSL2-master/skin.scad
     6255  2020-12-11 19:24   BOSL2-master/sliders.scad
     6556  2020-12-11 19:24   BOSL2-master/stacks.scad
     1069  2020-12-11 19:24   BOSL2-master/std.scad
    30164  2020-12-11 19:24   BOSL2-master/strings.scad
     4523  2020-12-11 19:24   BOSL2-master/structs.scad
        0  2020-12-11 19:24   BOSL2-master/tests/
     2107  2020-12-11 19:24   BOSL2-master/tests/hull.scad
     1443  2020-12-11 19:24   BOSL2-master/tests/polyhedra.scad
     9040  2020-12-11 19:24   BOSL2-master/tests/test_affine.scad
    18264  2020-12-11 19:24   BOSL2-master/tests/test_arrays.scad
    12844  2020-12-11 19:24   BOSL2-master/tests/test_common.scad
     9727  2020-12-11 19:24   BOSL2-master/tests/test_coords.scad
      393  2020-12-11 19:24   BOSL2-master/tests/test_cubetruss.scad
      433  2020-12-11 19:24   BOSL2-master/tests/test_debug.scad
     9694  2020-12-11 19:24   BOSL2-master/tests/test_edges.scad
    43448  2020-12-11 19:24   BOSL2-master/tests/test_geometry.scad
    14835  2020-12-11 19:24   BOSL2-master/tests/test_hull.scad
      885  2020-12-11 19:24   BOSL2-master/tests/test_linear_bearings.scad
    39201  2020-12-11 19:24   BOSL2-master/tests/test_math.scad
     1359  2020-12-11 19:24   BOSL2-master/tests/test_mutators.scad
    13098  2020-12-11 19:24   BOSL2-master/tests/test_primitives.scad
    13414  2020-12-11 19:24   BOSL2-master/tests/test_quaternions.scad
     1586  2020-12-11 19:24   BOSL2-master/tests/test_queues.scad
    21661  2020-12-11 19:24   BOSL2-master/tests/test_shapes.scad
    73395  2020-12-11 19:24   BOSL2-master/tests/test_shapes2d.scad
      880  2020-12-11 19:24   BOSL2-master/tests/test_skin.scad
     1684  2020-12-11 19:24   BOSL2-master/tests/test_stacks.scad
    11736  2020-12-11 19:24   BOSL2-master/tests/test_strings.scad
     1645  2020-12-11 19:24   BOSL2-master/tests/test_structs.scad
     1808  2020-12-11 19:24   BOSL2-master/tests/test_torx_drive.scad
    13778  2020-12-11 19:24   BOSL2-master/tests/test_transforms.scad
     5070  2020-12-11 19:24   BOSL2-master/tests/test_vectors.scad
     3493  2020-12-11 19:24   BOSL2-master/tests/test_version.scad
     4497  2020-12-11 19:24   BOSL2-master/tests/test_vnf.scad
    37058  2020-12-11 19:24   BOSL2-master/threading.scad
     4636  2020-12-11 19:24   BOSL2-master/torx_drive.scad
    42030  2020-12-11 19:24   BOSL2-master/transforms.scad
     6567  2020-12-11 19:24   BOSL2-master/triangulation.scad
    47621  2020-12-11 19:24   BOSL2-master/turtle3d.scad
        0  2020-12-11 19:24   BOSL2-master/tutorials/
    13203  2020-12-11 19:24   BOSL2-master/tutorials/Basic_Shapes.md
        5508  2020-12-11 19:24   BOSL2-master/tutorials/Distributors.md
     3305  2020-12-11 19:24   BOSL2-master/tutorials/FractalTree.md
     6141  2020-12-11 19:24   BOSL2-master/tutorials/Transforms.md
     9489  2020-12-11 19:24   BOSL2-master/vectors.scad
     4901  2020-12-11 19:24   BOSL2-master/version.scad
    38204  2020-12-11 19:24   BOSL2-master/vnf.scad
    19250  2020-12-11 19:24   BOSL2-master/walls.scad
     3580  2020-12-11 19:24   BOSL2-master/wiring.scad

That has a directory structure.  Is your file different?    If you're not
seeing a directory structure I guess maybe you need a different unzipping
program?  (Or you need different settings for your unzip?)  I tried this on
a Windows computer and it just worked:  clicking on the zip file revealed
the above structure and extracting the files did the right thing.  

Anybody else have any thoughts on what could be going wrong here?  


cbernhardt wrote

> I downloaded the BOSL files here:
> https://github.com/revarbat/BOSL2/archive/master.zip
>
> There is no directory structure in the ZIP file.
>
> Where should I get the proper file?
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

cbernhardt
I unzipped the file without the directory structure.
Unzipping with the "Use folder names" checked solved the problem.
Thanks all.
Charles



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: BOSL2 libraries - how to use them?

MichaelAtOz
Administrator
I think you were confounded by this bug
https://github.com/openscad/openscad/issues/3531 
The warning can report the wrong file.

When I downloaded BOSL2, unzipped it into directory 'BOSL2', it had an extra
directory 'BOSL2-master/', so the includes wouldn't work, I just had to move
everything up one level, ie copy contents of 'BOSL2-master/' up, then delete
the empty 'BOSL2-master/'.



-----
OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

* on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain;
to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.