Hi!Want to test the library BOSL2 - but i'm not sure if it works as desire.
Home · revarbat/BOSL2 Wiki
|
|
|
| | |
|
|
|
| |
Home · revarbat/BOSL2 Wiki
The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with ...
|
|
|
- I downloaded the zip file(https://github.com/revarbat/BOSL2 and selected "<> Code" and the green button "Code" and "Download ZIP")
the file .: BOSL2-master.zip is downloaded.
- Then unzip the file to .: "openSCAD\BOSL2-master"
Many files and directories are created.
3) Renamed the unpacked main directory (BOSL2-master) to BOSL2
4) Moved the the "BOSL2" directory to "MyDocuments\OpenSCAD\libraries\BOSL2"
So far, I think I have done the right way.
But all BOSL2 examples do not seem to work. One example is .:
"....\OpenSCAD\libraries\BOSL2\examples\boolean_geometry.scad"
This code below gives the following warning .: WARNING: Can't open include file 'BOSL2/debug.scad'
Yes, debug.scad is missing (I have no idea what this file adds)
include <BOSL2/std.scad>include <BOSL2/debug.scad>
$fn = 36;
rgn1 = [ square(100), move([50,50], p=circle(d=60)), [[35,35],[35,65],[65,65]]];
rgn2 = [ [[0,0], [100,100], [100,0]], [[27,10], [90,73], [90,10]], move([70,30], p=circle(d=25))];
polycolor=[0.5,1,0.5];outlinecolor="black";
module showit(label, rgn, poly=polycolor, outline=outlinecolor, width=0.5) { move([-50,-50]) { if(outline) color(outline) linear_extrude(height=max(0.1,1-width)) for(path=rgn) stroke(path, width=width, closed=true); if(poly) color(poly) linear_extrude(height=0.1) region(rgn); color("black") right(50) fwd(7) linear_extrude(height=0.1) text(text=label, size=8, halign="center", valign="center"); }}
ydistribute(-125) { xdistribute(120) { showit("Region A", rgn1, poly=[1,0,0,0.5]); showit("Region B", rgn2, poly=[0,0,1,0.5]); union() { showit("A and B Overlaid", rgn1, poly=[1,0,0,0.5]); showit("", rgn2, poly=[0,0,1,0.5]); } } xdistribute(120) { showit("Union A+B", union(rgn1, rgn2)); showit("Difference A-B", difference(rgn1, rgn2)); showit("Intersection A&B", intersection(rgn1, rgn2)); showit("Exclusive OR A^B", exclusive_or(rgn1, rgn2)); }}
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
- . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ .
No file in the test directory works (but you may have to do something for these files to produce something? - or...)
No error messages are displayed either.
Hi!Want to test the library BOSL2 - but i'm not sure if it works as desire.
Home · revarbat/BOSL2 Wiki
|
|
|
| | |
|
|
|
| |
Home · revarbat/BOSL2 Wiki
The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with ...
|
|
|
1) I downloaded the zip file(https://github.com/revarbat/BOSL2 and selected "<> Code" and the green button "Code" and "Download ZIP")
the file .: BOSL2-master.zip is downloaded.
2) Then unzip the file to .: "openSCAD\BOSL2-master"
Many files and directories are created.
3) Renamed the unpacked main directory (BOSL2-master) to BOSL2
4) Moved the the "BOSL2" directory to "MyDocuments\OpenSCAD\libraries\BOSL2"
So far, I think I have done the right way.
But all BOSL2 examples do not seem to work. One example is .:
"....\OpenSCAD\libraries\BOSL2\examples\boolean_geometry.scad"
This code below gives the following warning .: WARNING: Can't open include file 'BOSL2/debug.scad'
Yes, debug.scad is missing (I have no idea what this file adds)
include <BOSL2/std.scad>include <BOSL2/debug.scad>
$fn = 36;
rgn1 = [ square(100), move([50,50], p=circle(d=60)), [[35,35],[35,65],[65,65]]];
rgn2 = [ [[0,0], [100,100], [100,0]], [[27,10], [90,73], [90,10]], move([70,30], p=circle(d=25))];
polycolor=[0.5,1,0.5];outlinecolor="black";
module showit(label, rgn, poly=polycolor, outline=outlinecolor, width=0.5) { move([-50,-50]) { if(outline) color(outline) linear_extrude(height=max(0.1,1-width)) for(path=rgn) stroke(path, width=width, closed=true); if(poly) color(poly) linear_extrude(height=0.1) region(rgn); color("black") right(50) fwd(7) linear_extrude(height=0.1) text(text=label, size=8, halign="center", valign="center"); }}
ydistribute(-125) { xdistribute(120) { showit("Region A", rgn1, poly=[1,0,0,0.5]); showit("Region B", rgn2, poly=[0,0,1,0.5]); union() { showit("A and B Overlaid", rgn1, poly=[1,0,0,0.5]); showit("", rgn2, poly=[0,0,1,0.5]); } } xdistribute(120) { showit("Union A+B", union(rgn1, rgn2)); showit("Difference A-B", difference(rgn1, rgn2)); showit("Intersection A&B", intersection(rgn1, rgn2)); showit("Exclusive OR A^B", exclusive_or(rgn1, rgn2)); }}
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
- . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ . - . _ .
No file in the test directory works (but you may have to do something for these files to produce something? - or...)
No error messages are displayed either.