N
Neon22
Sun, Aug 30, 2015 7:51 AM
oops sorry I incorrectly transposed this section
#rotate([90,0,180-degreespan])
translate([face2dia, 0, 0])
cylinder(h=(outerradius+Delta)*2, r=face2dia, center=true, $fn =cyl_res);
shoudl have said 180-degreespan.
Now the little extra bit went away. Sorry..
SO:
// NOTE:
// - All measurements in mm
// - All frame gussets have a thickness of 6 mm (~0.25")
// and a front-to-back (non-tube side to non-tube side) of 76 mm (~3").
// - A 25 mm (~1") gap between the inner gusset face and the welded tube
joint must exist.
// - Tube-facing edges must be concaved to the same diameter of the tubing
it will interface with.
// Set resolution of rounded objects
cyl_res = 100; // res for cylindrical cuts
plate_res = 720; // higher res for the plate
Delta = 0.1; // used to get clearance for F6 conversions
// NOTE: The only thing you have to change is the fourth value on.
// The first three values are set, for your purposes.
// NOTE:
// innerradius = radius of inner curve
// outerradius = radius of outer curve
// thickness = thickness of gusset
// degreespan = width from one tube-facing edge to the other
// face1dia = diameter of tube on face 1
// face2dia = diameter of tube on face 2
// rotx = rotate around the x axis
// roty = rotate around the y axis
// rotz = rotate around the z axix
// transx = move along x axis
// transy = move along y axis
// transz = move along z axis
//gusset(76,101,6, 45,12,12, 0,0,0,0,0,0);
//gusset(76,101,6, 45,12,12, 0,-90,0,0,0,30);
// different factoring where the plate could be a different object. e.g.
Tubing, or double wall.
module tube_cut(innerradius, outerradius,
degreespan, face1dia, face2dia ) {
// Cut upper half off
#translate([outerradius/2+face1dia, 0, 0])
cube ([outerradius+Delta*2, (outerradius+Delta)*2, (face1dia+Delta)*2],
center=true);
// Use a cylinder to make rounded surface
#translate([face1dia, 0, 0])
rotate([90,0,0])
cylinder(h=(outerradius+Delta)*2, r=face1dia, center=true, $fn =cyl_res);
// Cover the lower half
#rotate([0,0,-degreespan])
translate([-outerradius/2-face2dia, 0, 0])
cube ([outerradius+Delta, (outerradius+Delta)*2, (face2dia+Delta)*2],
center=true);
// Use a cylinder to make rounded surface
#rotate([90,0,180-degreespan])
translate([face2dia, 0, 0])
cylinder(h=(outerradius+Delta)*2, r=face2dia, center=true, $fn =cyl_res);
}
module plate(thickness, outerradius, innerradius) {
// Gusset Plate
translate([0, 0, -thickness/2]) // center
rotate_extrude($fn = plate_res)
translate([outerradius - innerradius, 0, 0])
square([innerradius, thickness]);
}
//----------------
module plate_gusset(innerradius, outerradius, thickness,
degreespan, face1dia, face2dia,
rotx, roty, rotz, transx, transy, transz) {
translate([transx,transy,transz])
rotate([rotx,roty,rotz])
difference(){
plate(thickness, outerradius, innerradius);
tube_cut(innerradius, outerradius, degreespan, face1dia, face2dia);
}
}
plate_gusset(76,101,6, 12.5,12,12, 0,0,0,0,0,30);
--
View this message in context: http://forum.openscad.org/Problem-with-rotate-translate-tp13611p13645.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
oops sorry I incorrectly transposed this section
#rotate([90,0,180-degreespan])
translate([face2dia, 0, 0])
cylinder(h=(outerradius+Delta)*2, r=face2dia, center=true, $fn =cyl_res);
shoudl have said 180-degreespan.
Now the little extra bit went away. Sorry..
SO:
=========================
// NOTE:
// - All measurements in mm
// - All frame gussets have a thickness of 6 mm (~0.25")
// and a front-to-back (non-tube side to non-tube side) of 76 mm (~3").
// - A 25 mm (~1") gap between the inner gusset face and the welded tube
joint must exist.
// - Tube-facing edges must be concaved to the same diameter of the tubing
it will interface with.
// Set resolution of rounded objects
cyl_res = 100; // res for cylindrical cuts
plate_res = 720; // higher res for the plate
Delta = 0.1; // used to get clearance for F6 conversions
// NOTE: The only thing you have to change is the fourth value on.
// The first three values are set, for your purposes.
// NOTE:
// innerradius = radius of inner curve
// outerradius = radius of outer curve
// thickness = thickness of gusset
// degreespan = width from one tube-facing edge to the other
// face1dia = diameter of tube on face 1
// face2dia = diameter of tube on face 2
// rotx = rotate around the x axis
// roty = rotate around the y axis
// rotz = rotate around the z axix
// transx = move along x axis
// transy = move along y axis
// transz = move along z axis
//gusset(76,101,6, 45,12,12, 0,0,0,0,0,0);
//gusset(76,101,6, 45,12,12, 0,-90,0,0,0,30);
// different factoring where the plate could be a different object. e.g.
Tubing, or double wall.
module tube_cut(innerradius, outerradius,
degreespan, face1dia, face2dia ) {
// Cut upper half off
#translate([outerradius/2+face1dia, 0, 0])
cube ([outerradius+Delta*2, (outerradius+Delta)*2, (face1dia+Delta)*2],
center=true);
// Use a cylinder to make rounded surface
#translate([face1dia, 0, 0])
rotate([90,0,0])
cylinder(h=(outerradius+Delta)*2, r=face1dia, center=true, $fn =cyl_res);
// Cover the lower half
#rotate([0,0,-degreespan])
translate([-outerradius/2-face2dia, 0, 0])
cube ([outerradius+Delta, (outerradius+Delta)*2, (face2dia+Delta)*2],
center=true);
// Use a cylinder to make rounded surface
#rotate([90,0,180-degreespan])
translate([face2dia, 0, 0])
cylinder(h=(outerradius+Delta)*2, r=face2dia, center=true, $fn =cyl_res);
}
module plate(thickness, outerradius, innerradius) {
// Gusset Plate
translate([0, 0, -thickness/2]) // center
rotate_extrude($fn = plate_res)
translate([outerradius - innerradius, 0, 0])
square([innerradius, thickness]);
}
//----------------
module plate_gusset(innerradius, outerradius, thickness,
degreespan, face1dia, face2dia,
rotx, roty, rotz, transx, transy, transz) {
translate([transx,transy,transz])
rotate([rotx,roty,rotz])
difference(){
plate(thickness, outerradius, innerradius);
tube_cut(innerradius, outerradius, degreespan, face1dia, face2dia);
}
}
plate_gusset(76,101,6, 12.5,12,12, 0,0,0,0,0,30);
--
View this message in context: http://forum.openscad.org/Problem-with-rotate-translate-tp13611p13645.html
Sent from the OpenSCAD mailing list archive at Nabble.com.