I've written a hull which in itself isn't dreadful, but which has revealed

fragility in the way OpenSCAD handles name collisions. This makes mixing
libraries highly problematic. Needs thought.
This commit is contained in:
Simon Brooke 2025-09-06 22:18:59 +01:00
parent d2399a464c
commit 113546782f
4 changed files with 86 additions and 4 deletions

65
model/hull.scad Normal file
View file

@ -0,0 +1,65 @@
// hull.scad
// (c) Simon Brooke 2025; CC-BY-SA
include <BOSL2/std.scad>
include <BOSL2/skin.scad>
// doesn't work, but it's promising
module hull_i() {
color("darkgreen", 0.5)
difference() {
translate([1000, 0, 600])
rotate([0, 5, 0])
scale([3.49, .79, 1.19])
difference() {
sphere(r=500);
cube([1000, 1000, 1000]);
}
intersection() {
translate([1000, 0, 600])
rotate([0, 5, 0])
scale([3.5, .8, 1.2])
sphere(r=500);
rotate([0, 95, 0])
translate([-500,0,0])
prismoid(size1=[1000, 1000],
size2=[500, 600],
height=3000);
}
}
}
module hull() {
intersection() {
translate([2000,0,0])
rotate([180, 90, 0])
scale([20, 16, 20])
rotate_extrude()
//rotate([ 0, 90, 0])
import("library/hull-volume-of-rotation.svg");
translate([-900,0, -110])
rotate([0, 90, 0])
prismoid(size1=[1100, 1000],
size2=[400, 600],
height=3000);
}
rotate([0,90,0])
translate([0,0,-2070])
difference() {
skin(
[ellipse($fn=64,r=[350,30],center=true),
ellipse($fn=64,r=[430,340],center=true)], z=[0,1200],
slices=40,sampling="length",method="reindex");
skin(
[ellipse($fn=64,r=[344,24],center=true),
ellipse($fn=64,r=[424,334],center=true)], z=[-1,1201],
slices=40,sampling="length",method="reindex");
}
}
hull();