Skip to content
Discussion options

You must be logged in to vote

I solved my problem by taking only half the spline and duplicating it:

function p2xyz(r, d, z = 0) {
    let th = d / 180 * Math.PI
    let v = ([r * Math.cos(th), r * Math.sin (th), z])
    //Translate(v, Rotate([0, 0, 1], d, Sphere(0.1)))
    return (v)
}

let l = []
let N=6
let r = 10
let dinc = 360/N
for (let i = 0; i < N ; i++) {
    l.push (p2xyz(r * 1.1, i * dinc))
    l.push (p2xyz(r * 1.0, (i + 0.1) * dinc))
    l.push (p2xyz(r * 0.8, (i + 0.5) * dinc))
    l.push (p2xyz(r * 1.0, (i + 0.9) * dinc))
}
base = BSpline(l, true)
top = Translate([0, 0, 100], Circle(10, true))
shape1 = Loft([base, top])
cut1 = Translate([-20, -20, 0], Box(20, 40, 100, false))
semi = Intersection([shape1…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by udif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants