discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

hull to create elbow not working

YS
Yvette S. Hirth, CCP, CDP
Thu, Feb 19, 2015 5:04 PM

hi everybody,

i'm trying to use a hull() to create an elbow:

hull()
translate([0, -12.5, 4]) // vertical part
cylinder(r=1.5, h=20, $fn=30);
rotate([90, 0, 45]) // horizontal part
translate([-8.9, 5.4, 8])
cylinder(r=1.5, h=20, $fn=30);

this isn't working.  the two cylinders intersect in a 90deg angle with
no smoothing or curving where they meet.

these two cylinders "route" a wire that needs to be fed.  i need the
elbow because when the wire hits the end of the horizontal part, it
refuses to go up into the vertical part and simply bends.  i'm thinking
that the elbow will ensure the wire transitions (smoothly or otherwise)
from horizontal to vertical.

anybody have any ideas?  i googled "elbow scad", and found lots of
examples, but not any scad source.

thanks in advance for any feedback!
yvette

hi everybody, i'm trying to use a hull() to create an elbow: hull() translate([0, -12.5, 4]) // vertical part cylinder(r=1.5, h=20, $fn=30); rotate([90, 0, 45]) // horizontal part translate([-8.9, 5.4, 8]) cylinder(r=1.5, h=20, $fn=30); this isn't working. the two cylinders intersect in a 90deg angle with no smoothing or curving where they meet. these two cylinders "route" a wire that needs to be fed. i need the elbow because when the wire hits the end of the horizontal part, it refuses to go up into the vertical part and simply bends. i'm thinking that the elbow will ensure the wire transitions (smoothly or otherwise) from horizontal to vertical. anybody have any ideas? i googled "elbow scad", and found lots of examples, but not any scad source. thanks in advance for any feedback! yvette
H
hagen
Thu, Feb 19, 2015 5:43 PM

the curly brackets are missing:
hull()
{
translate([0, -12.5, 4]) // vertical part
cylinder(r=1.5, h=20, $fn=30);
rotate([90, 0, 45]) // horizontal part
translate([-8.9, 5.4, 8])
cylinder(r=1.5, h=20, $fn=30);
}

--
View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p11668.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

the curly brackets are missing: hull() { translate([0, -12.5, 4]) // vertical part cylinder(r=1.5, h=20, $fn=30); rotate([90, 0, 45]) // horizontal part translate([-8.9, 5.4, 8]) cylinder(r=1.5, h=20, $fn=30); } -- View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p11668.html Sent from the OpenSCAD mailing list archive at Nabble.com.
C
clothbot
Thu, Feb 19, 2015 6:00 PM

If the missing curly braces aren't just a typo and what you're looking for is
more of a fillet type of operator, have a look at this example I came up
with a while back:

https://github.com/clothbot/ClothBotCreations/blob/master/utilities/fillet.scad

Andrew.

--
View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p11669.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

If the missing curly braces aren't just a typo and what you're looking for is more of a fillet type of operator, have a look at this example I came up with a while back: https://github.com/clothbot/ClothBotCreations/blob/master/utilities/fillet.scad Andrew. -- View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p11669.html Sent from the OpenSCAD mailing list archive at Nabble.com.
YS
Yvette S. Hirth, CCP, CDP
Thu, Feb 19, 2015 6:23 PM

On 02/19/2015 10:00 AM, clothbot wrote:

If the missing curly braces aren't just a typo and what you're looking for is
more of a fillet type of operator, have a look at this example I came up
with a while back:

https://github.com/clothbot/ClothBotCreations/blob/master/utilities/fillet.scad

thank you both!
yvette

On 02/19/2015 10:00 AM, clothbot wrote: > If the missing curly braces aren't just a typo and what you're looking for is > more of a fillet type of operator, have a look at this example I came up > with a while back: > > https://github.com/clothbot/ClothBotCreations/blob/master/utilities/fillet.scad thank you both! yvette
PF
Peter Falke
Thu, Feb 19, 2015 9:35 PM

The cylinder meet kinda crucked, so things are a little of  :)

​R=5;

rc=1.5;

x1=[0, -12.5, 4];

translate(x1+[0,0,R+rc]) // vertical part

cylinder(r=1.5, h=20, $fn=30);

rotate([90, 0, 45]) // horizontal part

translate([-8.9, 5.4, 8]+[0,0,R+rc-.7])

cylinder(r=1.5, h=20, $fn=30);

module bent(){

translate([0,0,R+rc])

rotate([0,90,0])

translate([0,-R,0])

difference(){

rotate_extrude($fn=60,convexity=4)

translate([R,0])circle(rc,$fn=30);

translate([0,-2R,0])cube(4R,true);

translate([-2R,0,0])cube(4R,true);

}

}

translate(x1)

rotate(45)

bent();

2015-02-19 19:23 GMT+01:00 Yvette S. Hirth, CCP, CDP yvette@dbtgroup.com:

On 02/19/2015 10:00 AM, clothbot wrote:

If the missing curly braces aren't just a typo and what you're looking

for is
more of a fillet type of operator, have a look at this example I came up
with a while back:

https://github.com/clothbot/ClothBotCreations/blob/master/
utilities/fillet.scad

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

The cylinder meet kinda crucked, so things are a little of :) ​R=5; rc=1.5; x1=[0, -12.5, 4]; translate(x1+[0,0,R+rc]) // vertical part cylinder(r=1.5, h=20, $fn=30); rotate([90, 0, 45]) // horizontal part translate([-8.9, 5.4, 8]+[0,0,R+rc-.7]) cylinder(r=1.5, h=20, $fn=30); module bent(){ translate([0,0,R+rc]) rotate([0,90,0]) translate([0,-R,0]) difference(){ rotate_extrude($fn=60,convexity=4) translate([R,0])circle(rc,$fn=30); translate([0,-2*R,0])cube(4*R,true); translate([-2*R,0,0])cube(4*R,true); } } translate(x1) rotate(45) bent(); 2015-02-19 19:23 GMT+01:00 Yvette S. Hirth, CCP, CDP <yvette@dbtgroup.com>: > On 02/19/2015 10:00 AM, clothbot wrote: > > If the missing curly braces aren't just a typo and what you're looking >> for is >> more of a fillet type of operator, have a look at this example I came up >> with a while back: >> >> https://github.com/clothbot/ClothBotCreations/blob/master/ >> utilities/fillet.scad >> > > thank you both! > yvette > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
YA
Yona Appletree
Thu, Feb 19, 2015 10:42 PM

I didn't look closely at the rotation and translation code, but I
suspected that there was something wrong with that part, not the actual
bending part.

When removing that code (which could easily be added back in to the
entire object), things line up correctly:

R=5;
rc=1.5;

detail=30;

translate([0,0,R+rc])// vertical part
cylinder(r=rc, h=20, $fn=detail);

translate([0,-R,rc])
rotate([90,0,0])
cylinder(r=rc, h=20, $fn=detail);

modulebent(){
translate([0,0,R+rc])
rotate([0,90,0])
translate([0,-R,0])
difference(){
rotate_extrude($fn=60,convexity=4)
translate([R,0])rotate([0,0,360/detail/2])circle(rc,$fn=detail);
translate([0,-2R,0])cube(4R,true);
translate([-2R,0,0])cube(4R,true);
}
}

bent();

  • Yona

Peter Falke mailto:stempeldergeschichte@googlemail.com
February 19, 2015 at 13:35

The cylinder meet kinda crucked, so things are a little of  :)

R=5;

rc=1.5;

x1=[0, -12.5, 4];

translate(x1+[0,0,R+rc]) // vertical part

cylinder(r=1.5, h=20, $fn=30);

rotate([90, 0, 45]) // horizontal part

translate([-8.9, 5.4, 8]+[0,0,R+rc-.7])

cylinder(r=1.5, h=20, $fn=30);

module bent(){

translate([0,0,R+rc])

rotate([0,90,0])

translate([0,-R,0])

difference(){

rotate_extrude($fn=60,convexity=4)

translate([R,0])circle(rc,$fn=30);

translate([0,-2R,0])cube(4R,true);

translate([-2R,0,0])cube(4R,true);

}

}

translate(x1)

rotate(45)

bent();

--
stempeldergeschichte@googlemail.com mailto:karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I didn't look closely at the rotation and translation code, but I suspected that there was something wrong with that part, not the actual bending part. When removing that code (which could easily be added back in to the entire object), things line up correctly: R=5; rc=1.5; detail=30; translate([0,0,R+rc])// vertical part cylinder(r=rc, h=20, $fn=detail); translate([0,-R,rc]) rotate([90,0,0]) cylinder(r=rc, h=20, $fn=detail); modulebent(){ translate([0,0,R+rc]) rotate([0,90,0]) translate([0,-R,0]) difference(){ rotate_extrude($fn=60,convexity=4) translate([R,0])rotate([0,0,360/detail/2])circle(rc,$fn=detail); translate([0,-2*R,0])cube(4*R,true); translate([-2*R,0,0])cube(4*R,true); } } bent(); - Yona > Peter Falke <mailto:stempeldergeschichte@googlemail.com> > February 19, 2015 at 13:35 > > The cylinder meet kinda crucked, so things are a little of :) > > R=5; > > rc=1.5; > > x1=[0, -12.5, 4]; > > > translate(x1+[0,0,R+rc]) // vertical part > > cylinder(r=1.5, h=20, $fn=30); > > rotate([90, 0, 45]) // horizontal part > > translate([-8.9, 5.4, 8]+[0,0,R+rc-.7]) > > cylinder(r=1.5, h=20, $fn=30); > > > module bent(){ > > translate([0,0,R+rc]) > > rotate([0,90,0]) > > translate([0,-R,0]) > > difference(){ > > rotate_extrude($fn=60,convexity=4) > > translate([R,0])circle(rc,$fn=30); > > translate([0,-2*R,0])cube(4*R,true); > > translate([-2*R,0,0])cube(4*R,true); > > } > > } > > translate(x1) > > rotate(45) > > bent(); > > > > > > -- > stempeldergeschichte@googlemail.com <mailto:karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
K
K.C.C.
Tue, Jan 19, 2016 3:18 AM

his seem to clear it up.

R=5;

rc=1.5;

x1=[0, -12.5, 4];

translate(x1+[0,0,R+rc]) // vertical part

cylinder(r=1.5, h=20, $fn=30);

rotate([90, 0, 45]) // horizontal part

translate([-8.9, 5.5, 8]+[0,0,R+rc-.7])

cylinder(r=1.5, h=20, $fn=30);

module bent(){

translate([0,0,R+rc])

rotate([0,90,0])

translate([0,-R,0])

difference(){

rotate_extrude($fn=60,convexity=4)

translate([R,0])circle(rc,$fn=30);

translate([0,-2R,0])cube(4R,true);

translate([-2R,0,0])cube(4R,true);

}

}

translate(x1)

rotate(44)

bent();

--
View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p15755.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

his seem to clear it up. R=5; rc=1.5; x1=[0, -12.5, 4]; translate(x1+[0,0,R+rc]) // vertical part cylinder(r=1.5, h=20, $fn=30); rotate([90, 0, 45]) // horizontal part translate([-8.9, 5.5, 8]+[0,0,R+rc-.7]) cylinder(r=1.5, h=20, $fn=30); module bent(){ translate([0,0,R+rc]) rotate([0,90,0]) translate([0,-R,0]) difference(){ rotate_extrude($fn=60,convexity=4) translate([R,0])circle(rc,$fn=30); translate([0,-2*R,0])cube(4*R,true); translate([-2*R,0,0])cube(4*R,true); } } translate(x1) rotate(44) bent(); -- View this message in context: http://forum.openscad.org/hull-to-create-elbow-not-working-tp11667p15755.html Sent from the OpenSCAD mailing list archive at Nabble.com.