Close



Results 1 to 10 of 18

Hybrid View

  1. #1
    a couple thoughts came to mind.

    the inner diameter of the sphere is the target diameter.
    so i added twice the wall thickness to the diameter of the first sphere.

    also, if a 25mm long neck is placed on top of a 2mm thick sphere
    the effective length of the neck will be 27mm. so i tried
    subtracting the wall thickness from neck length for the cylinder height.
    seems functional.

    also, aren't variables actually constants? sorta like constant variables...

    // Example: A 220Hz

    $fn=100; // fragment number

    sd=132.48; // sphere diameter from formula
    wt=2; // wall thickness
    hd=25; // sound hole diameter
    nl=25; // neck length

    // Sphere

    difference() {
    sphere(d=sd+(2*wt)); // create sphere to be hollowed
    sphere(d=sd); // hollow the sphere to diameter from formula
    translate([0,0,-(sd/2)-wt])cylinder(d=hd,h=wt*2); // create sound hole
    }

    // Neck

    difference() {
    translate([0,0,-nl-(sd/2)+wt])cylinder(d=hd+(2*wt),h=nl-wt);
    translate([0,0,-nl-(sd/2)+wt])cylinder(d=hd,h=nl-wt);
    }

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by urglik View Post
    also, aren't variables actually constants? sorta like constant variables...
    Quote Originally Posted by curious aardvark View Post
    yeah if you want to be pedantic they're not what programmers call variables. I call them variables because you can vary them and I'm not a programmer and couldn't give a rats arse what the technical term should or shouldn't be:-)
    length of neck would probably be 25mm.
    One of the big 'flaws' in OpenScad was the fact symbols could not change value. The current version has addressed this issue. I'm not sure the OpenScad people would call those 'variables', but they are getting pretty close to that now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •