I appear to have 15 copies of offset.scad on my computer, ranging from
2014 to 2024.
I just tried to compile an OpenSCAD model that I have used for years,
and it now complains about the call to invert(), because the call has a
parameter and the module definition does not. The error message makes
sense, but I'm not sure how the old (2014) code behaved up until now, so
I'm not sure how or what to fix.
I tried using a newer version of offset.scad, but that appears to lack
inset_shell(), which I am using in my code.
Has anyone else run across this?
Code snippet from old offset.scad
====
module inset(thickness = 0.5, bbox = [5000, 5000, 5000]) {
module invert() {
difference() {
cube(bbox, true);
children();
}
}
render() {
invert(0.9 * bbox)
minkowski() {
invert() children();
cube([2 * thickness, 2 * thickness, 2 * thickness], center=true);
}
}
}
module inset_shell(thickness = 0.5, bbox = [5000, 5000, 5000]) {
render() {
difference() {
children();
translate([0, 0, -5 * thickness]) scale([1, 1, 100])
translate([0, 0, -2 * thickness])
inset(thickness, bbox)
children();
}
}
}
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
It used to be possible to pass any parameter into a module but now they
have to be listed in the parameter list.
I have an offset_3D module here:
https://github.com/nophead/NopSCADlib/blob/master/utils/offset.scad
Note that with manifold big has to be only 1000, whereas with CGAL it was
1E10.
On Fri, 29 Mar 2024 at 14:56, Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:
I appear to have 15 copies of offset.scad on my computer, ranging from
2014 to 2024.
I just tried to compile an OpenSCAD model that I have used for years,
and it now complains about the call to invert(), because the call has a
parameter and the module definition does not. The error message makes
sense, but I'm not sure how the old (2014) code behaved up until now, so
I'm not sure how or what to fix.
I tried using a newer version of offset.scad, but that appears to lack
inset_shell(), which I am using in my code.
Has anyone else run across this?
Code snippet from old offset.scad
====
module inset(thickness = 0.5, bbox = [5000, 5000, 5000]) {
module invert() {
difference() {
cube(bbox, true);
children();
}
}
render() {
invert(0.9 * bbox)
minkowski() {
invert() children();
cube([2 * thickness, 2 * thickness, 2 * thickness], center=true);
}
}
}
module inset_shell(thickness = 0.5, bbox = [5000, 5000, 5000]) {
render() {
difference() {
children();
translate([0, 0, -5 * thickness]) scale([1, 1, 100])
translate([0, 0, -2 * thickness])
inset(thickness, bbox)
children();
}
}
}
--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org