discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Belfry OpenScad Library v2 (BOSL2)

AM
Adrian Mariano
Wed, Mar 23, 2022 11:32 PM

I just took a look at files in the examples directory.  They are all
outdated.  That definitely needs to be cleaned up.

Instead you should start by either looking at the tutorials or the wiki
reference manual.

That is, start here and select tutorials, or just read the wiki in the
order the files appear, which is a generally reasonable order:

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

Oh, and the tests are regression tests.  They are supposed to produce
output only if something is broken.

On Wed, Mar 23, 2022 at 7:10 PM Jan Öhman via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: "Jan Öhman" jan_ohman@yahoo.com
To: OpenSCAD General Discussion discuss@lists.openscad.org
Cc:
Bcc:
Date: Wed, 23 Mar 2022 22:59:28 +0000 (UTC)
Subject: [OpenSCAD] Belfry OpenScad Library v2 (BOSL2)
Hi!
Want to test the library BOSL2 - but i'm not sure if it works as desire.

Home · revarbat/BOSL2 Wiki https://github.com/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 ...
https://github.com/revarbat/BOSL2/wiki

  1. I downloaded the zip file
    (https://github.com/revarbat/BOSL2 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.

---------- Forwarded message ----------
From: "Jan Öhman via Discuss" discuss@lists.openscad.org
To: OpenSCAD General Discussion discuss@lists.openscad.org
Cc: "Jan Öhman" jan_ohman@yahoo.com
Bcc:
Date: Wed, 23 Mar 2022 22:59:28 +0000 (UTC)
Subject: [OpenSCAD] Belfry OpenScad Library v2 (BOSL2)


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

I just took a look at files in the examples directory. They are all outdated. That definitely needs to be cleaned up. Instead you should start by either looking at the tutorials or the wiki reference manual. That is, start here and select tutorials, or just read the wiki in the order the files appear, which is a generally reasonable order: https://github.com/revarbat/BOSL2/wiki Oh, and the tests are regression tests. They are supposed to produce output only if something is broken. On Wed, Mar 23, 2022 at 7:10 PM Jan Öhman via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: "Jan Öhman" <jan_ohman@yahoo.com> > To: OpenSCAD General Discussion <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Wed, 23 Mar 2022 22:59:28 +0000 (UTC) > Subject: [OpenSCAD] Belfry OpenScad Library v2 (BOSL2) > Hi! > Want to test the library BOSL2 - but i'm not sure if it works as desire. > > Home · revarbat/BOSL2 Wiki <https://github.com/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 ... > <https://github.com/revarbat/BOSL2/wiki> > > 1) I downloaded the zip file > (*https://github.com/revarbat/BOSL2 <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. > > > > > > ---------- Forwarded message ---------- > From: "Jan Öhman via Discuss" <discuss@lists.openscad.org> > To: OpenSCAD General Discussion <discuss@lists.openscad.org> > Cc: "Jan Öhman" <jan_ohman@yahoo.com> > Bcc: > Date: Wed, 23 Mar 2022 22:59:28 +0000 (UTC) > Subject: [OpenSCAD] Belfry OpenScad Library v2 (BOSL2) > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >