discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Fillet

RW
Raymond West
Wed, Jan 15, 2025 6:34 PM

It works with a cylinder. Maybe solves problems for those with a
Mac/whatever

quick test

replace the tube module with

////////

module tube(d){
       linear_extrude(100)
            circle(d=d);
 }

///////

seems to avoid the $fn possible problems too.

On 15/01/2025 18:24, Raymond West via Discuss wrote:

Hi Jordan,

I'm not completely clear on why this is a tube instead of a cylinder,

Because it evolved from my original effort, to generate a path on
which to use Minkowski and a special shape, and the original test was
for tubes. Possibly this fillet now could be generated differently,
but even the originators of the puzzle expected something other than
openscad to be used to generate the fillet.

From what you and Jon are saying, there are differences in the results
from openscad, depending on what platform - windows, Mac, Linux are used.

On 15/01/2025 17:26, Jordan Brown via Discuss wrote:

On 1/15/2025 9:15 AM, Jon Bondy via Discuss wrote:

Still nothing.  Has anyone been able to get this to work?

 On 1/15/2025 6:35 AM, Raymond West via Discuss wrote:
 module tube(d){
        linear_extrude(100)
       difference(){
        circle(d=d);
        circle (d=d-0.0001);
      };
  }

I'm not completely clear on why this is a tube instead of a cylinder,
but increasing the thickness of the tube (by making the 0.0001
larger) makes the fillet appear. For preview, 0.01 seems to work; for
Manifold 0.001 seem to work.


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

It works with a cylinder. Maybe solves problems for those with a Mac/whatever quick test replace the tube module with //////// module tube(d){        linear_extrude(100)             circle(d=d);  } /////// seems to avoid the $fn possible problems too. On 15/01/2025 18:24, Raymond West via Discuss wrote: > > Hi Jordan, > >> I'm not completely clear on why this is a tube instead of a cylinder, > Because it evolved from my original effort, to generate a path on > which to use Minkowski and a special shape, and the original test was > for tubes. Possibly this fillet now could be generated differently, > but even the originators of the puzzle expected something other than > openscad to be used to generate the fillet. > > From what you and Jon are saying, there are differences in the results > from openscad, depending on what platform - windows, Mac, Linux are used. > > On 15/01/2025 17:26, Jordan Brown via Discuss wrote: >> On 1/15/2025 9:15 AM, Jon Bondy via Discuss wrote: >>> >>> Still nothing.  Has anyone been able to get this to work? >>> >>>> On 1/15/2025 6:35 AM, Raymond West via Discuss wrote: >>>>> module tube(d){ >>>>>        linear_extrude(100) >>>>>       difference(){ >>>>>        circle(d=d); >>>>>        circle (d=d-0.0001); >>>>>      }; >>>>>  } >>>> >> >> I'm not completely clear on why this is a tube instead of a cylinder, >> but increasing the thickness of the tube (by making the 0.0001 >> larger) makes the fillet appear. For preview, 0.01 seems to work; for >> Manifold 0.001 seem to work. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
JJ
jon jonbondy.com
Wed, Jan 15, 2025 10:50 PM

0.001 produces not fillet; 0.01 produces this monstrosity:

[cid:part1.e0GaT98g.bf3bCNJn@jonbondy.com]

On 1/15/2025 12:26 PM, Jordan Brown wrote:
On 1/15/2025 9:15 AM, Jon Bondy via Discuss wrote:

Still nothing.  Has anyone been able to get this to work?

On 1/15/2025 6:35 AM, Raymond West via Discuss wrote:
module tube(d){
linear_extrude(100)
difference(){
circle(d=d);
circle (d=d-0.0001);
};
}

I'm not completely clear on why this is a tube instead of a cylinder, but increasing the thickness of the tube (by making the 0.0001 larger) makes the fillet appear. For preview, 0.01 seems to work; for Manifold 0.001 seem to work.

0.001 produces not fillet; 0.01 produces this monstrosity: [cid:part1.e0GaT98g.bf3bCNJn@jonbondy.com] On 1/15/2025 12:26 PM, Jordan Brown wrote: On 1/15/2025 9:15 AM, Jon Bondy via Discuss wrote: Still nothing. Has anyone been able to get this to work? On 1/15/2025 6:35 AM, Raymond West via Discuss wrote: module tube(d){ linear_extrude(100) difference(){ circle(d=d); circle (d=d-0.0001); }; } I'm not completely clear on why this is a tube instead of a cylinder, but increasing the thickness of the tube (by making the 0.0001 larger) makes the fillet appear. For preview, 0.01 seems to work; for Manifold 0.001 seem to work.
JB
Jon Bondy
Wed, Jan 15, 2025 10:54 PM

$fn is set to 100 in your code.

I see the vertical and horizontal tubes, but no fillet.

I am running under Windows.

d = d-5 produces this

On 1/15/2025 1:08 PM, Raymond West via Discuss wrote:

Hi Jon,

In order to make sure I'd not left out something, I copied back the
text in my post with the code and rounded fillet, and it is as the
original, working.

If you are getting nothing, do you not get the plain tubes without the
fillet, or is it the fillet that is missing? You may not see the
fillet if $fn is not set (or set to 1 or 3).

I've no idea with Macs, In my 60 or so years of software, I've only
touched apple a couple of times.

Maybe test what I've written, by making penultimate line of tube
module  'circle (d=d-5);'

comment out everything after '$fn=100;

then enter and run 'fillet(0,20,20,0);' and you should get something
on the screen, either after hitting fn5 or fn6.

If nothing shows,  then check your script with what I posted, and try
different values.

It works with bevel=80, too, values above that gets interesting, with
the cylinder sizes I have given.

On 15/01/2025 17:15, Jon Bondy via Discuss wrote:

Still nothing.  Has anyone been able to get this to work?

Jon

On 1/15/2025 9:15 AM, Michael Möller via Discuss wrote:

Increase the "0" values in the last line. I tried 5,a,b,5 for
example.  There is also the bevel=12.01 line slightly above that has
some effect, I'm sure.

On Wed, 15 Jan 2025 at 13:01, Jon Bondy via Discuss
discuss@lists.openscad.org wrote:

 Privately.

 I am not sure why, but your code (below) does not create a
 fillet for me in OpenSCAD 2024.01.14.

 Jon


 On 1/15/2025 6:35 AM, Raymond West via Discuss wrote:
 module tube(d){
        linear_extrude(100)
       difference(){
        circle(d=d);
        circle (d=d-0.0001);
      };
  }

  module fillet(a,b,c,d){
  hull(){
   intersection(){
          tube(30+a);  //upright tube
        translate([-0,0,50])
        rotate([0,90,0])
          tube(20+b);
          }
           intersection(){
          tube(30+c);  // side tube
        translate([-0,0,50])
        rotate([0,90,0])
          tube(20+d);
          }
  }
  }

  $fn=100;
         cylinder(d=30,h=100);
        translate([-0,0,50])
        rotate([0,90,0])
        cylinder(d=20,h=50);



      for (j= [0:2:90]){
        bevel=12.01;
          a=bevel*sin(j);
          b=bevel*cos(j);
           fillet(0,a,b,0);
      }
 <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
 	Virus-free.www.avg.com
 <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>


 <#m_3625393776829400504_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

$fn is set to 100 in your code. I see the vertical and horizontal tubes, but no fillet. I am running under Windows. d = d-5 produces this On 1/15/2025 1:08 PM, Raymond West via Discuss wrote: > > Hi Jon, > > In order to make sure I'd not left out something, I copied back the > text in my post with the code and rounded fillet, and it is as the > original, working. > > If you are getting nothing, do you not get the plain tubes without the > fillet, or is it the fillet that is missing? You may not see the > fillet if $fn is not set (or set to 1 or 3). > > I've no idea with Macs, In my 60 or so years of software, I've only > touched apple a couple of times. > > Maybe test what I've written, by making penultimate line of tube > module  'circle (d=d-5);' > > comment out everything after '$fn=100; > > then enter and run 'fillet(0,20,20,0);' and you should get something > on the screen, either after hitting fn5 or fn6. > > If nothing shows,  then check your script with what I posted, and try > different values. > > It works with bevel=80, too, values above that gets interesting, with > the cylinder sizes I have given. > > > On 15/01/2025 17:15, Jon Bondy via Discuss wrote: >> >> Still nothing.  Has anyone been able to get this to work? >> >> Jon >> >> >> On 1/15/2025 9:15 AM, Michael Möller via Discuss wrote: >>> Increase the "0" values in the last line. I tried 5,a,b,5 for >>> example.  There is also the bevel=12.01 line slightly above that has >>> some effect, I'm sure. >>> >>> On Wed, 15 Jan 2025 at 13:01, Jon Bondy via Discuss >>> <discuss@lists.openscad.org> wrote: >>> >>> Privately. >>> >>> I am not sure why, but your code (below) does not create a >>> fillet for me in OpenSCAD 2024.01.14. >>> >>> Jon >>> >>> >>> On 1/15/2025 6:35 AM, Raymond West via Discuss wrote: >>>> module tube(d){ >>>>        linear_extrude(100) >>>>       difference(){ >>>>        circle(d=d); >>>>        circle (d=d-0.0001); >>>>      }; >>>>  } >>>> >>>>  module fillet(a,b,c,d){ >>>>  hull(){ >>>>   intersection(){ >>>>          tube(30+a);  //upright tube >>>>        translate([-0,0,50]) >>>>        rotate([0,90,0]) >>>>          tube(20+b); >>>>          } >>>>           intersection(){ >>>>          tube(30+c);  // side tube >>>>        translate([-0,0,50]) >>>>        rotate([0,90,0]) >>>>          tube(20+d); >>>>          } >>>>  } >>>>  } >>>> >>>>  $fn=100; >>>>         cylinder(d=30,h=100); >>>>        translate([-0,0,50]) >>>>        rotate([0,90,0]) >>>>        cylinder(d=20,h=50); >>>> >>>> >>>> >>>>      for (j= [0:2:90]){ >>>>        bevel=12.01; >>>>          a=bevel*sin(j); >>>>          b=bevel*cos(j); >>>>           fillet(0,a,b,0); >>>>      } >>> >>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> >>> Virus-free.www.avg.com >>> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> >>> >>> >>> <#m_3625393776829400504_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email todiscuss-leave@lists.openscad.org >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG antivirus software. www.avg.com
JB
Jordan Brown
Thu, Jan 16, 2025 12:42 AM

Taking the original and replacing the 0.0001 with 0.01 (and cleaning up
the indentation):

module tube(d){
    linear_extrude(100)
        difference(){
            circle(d=d);
            circle (d=d-0.01);
        };
}

module fillet(a,b,c,d){
    hull(){
        intersection(){
            tube(30+a);  //upright tube
            translate([-0,0,50])
                rotate([0,90,0])
                tube(20+b);
        }
        intersection(){
            tube(30+c);  // side tube
            translate([-0,0,50])
                rotate([0,90,0])
                tube(20+d);
        }
    }
}

$fn=100;
cylinder(d=30,h=100);
translate([-0,0,50])
    rotate([0,90,0])
    cylinder(d=20,h=50);

for (j= [0:2:90]){
    bevel=12.01;
    a=bevel*sin(j);
    b=bevel*cos(j);
    fillet(0,a,b,0);
}

yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold:

And the same for preview in 2021.01, though it takes a very long time there.

Taking the original and replacing the 0.0001 with 0.01 (and cleaning up the indentation): module tube(d){ linear_extrude(100) difference(){ circle(d=d); circle (d=d-0.01); }; } module fillet(a,b,c,d){ hull(){ intersection(){ tube(30+a); //upright tube translate([-0,0,50]) rotate([0,90,0]) tube(20+b); } intersection(){ tube(30+c); // side tube translate([-0,0,50]) rotate([0,90,0]) tube(20+d); } } } $fn=100; cylinder(d=30,h=100); translate([-0,0,50]) rotate([0,90,0]) cylinder(d=20,h=50); for (j= [0:2:90]){ bevel=12.01; a=bevel*sin(j); b=bevel*cos(j); fillet(0,a,b,0); } yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold: And the same for preview in 2021.01, though it takes a very long time there.
JJ
jon jonbondy.com
Thu, Jan 16, 2025 1:44 AM

Works perfectly!  Thank you!

On 1/15/2025 7:42 PM, Jordan Brown wrote:
Taking the original and replacing the 0.0001 with 0.01 (and cleaning up the indentation):

module tube(d){
linear_extrude(100)
difference(){
circle(d=d);
circle (d=d-0.01);
};
}

module fillet(a,b,c,d){
hull(){
intersection(){
tube(30+a);  //upright tube
translate([-0,0,50])
rotate([0,90,0])
tube(20+b);
}
intersection(){
tube(30+c);  // side tube
translate([-0,0,50])
rotate([0,90,0])
tube(20+d);
}
}
}

$fn=100;
cylinder(d=30,h=100);
translate([-0,0,50])
rotate([0,90,0])
cylinder(d=20,h=50);

for (j= [0:2:90]){
bevel=12.01;
a=bevelsin(j);
b=bevel
cos(j);
fillet(0,a,b,0);
}

yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold:

[cid:part1.2QwX8Kxt.uBUJcrJV@jonbondy.com]

And the same for preview in 2021.01, though it takes a very long time there.

Works perfectly! Thank you! On 1/15/2025 7:42 PM, Jordan Brown wrote: Taking the original and replacing the 0.0001 with 0.01 (and cleaning up the indentation): module tube(d){ linear_extrude(100) difference(){ circle(d=d); circle (d=d-0.01); }; } module fillet(a,b,c,d){ hull(){ intersection(){ tube(30+a); //upright tube translate([-0,0,50]) rotate([0,90,0]) tube(20+b); } intersection(){ tube(30+c); // side tube translate([-0,0,50]) rotate([0,90,0]) tube(20+d); } } } $fn=100; cylinder(d=30,h=100); translate([-0,0,50]) rotate([0,90,0]) cylinder(d=20,h=50); for (j= [0:2:90]){ bevel=12.01; a=bevel*sin(j); b=bevel*cos(j); fillet(0,a,b,0); } yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold: [cid:part1.2QwX8Kxt.uBUJcrJV@jonbondy.com] And the same for preview in 2021.01, though it takes a very long time there.
SP
Sanjeev Prabhakar
Thu, Jan 16, 2025 1:44 AM

For looks great to me

On Thu, 16 Jan, 2025, 6:12 am Jordan Brown via Discuss, <
discuss@lists.openscad.org> wrote:

Taking the original and replacing the 0.0001 with 0.01 (and cleaning up
the indentation):

module tube(d){
linear_extrude(100)
difference(){
circle(d=d);
circle (d=d-0.01);
};
}

module fillet(a,b,c,d){
hull(){
intersection(){
tube(30+a);  //upright tube
translate([-0,0,50])
rotate([0,90,0])
tube(20+b);
}
intersection(){
tube(30+c);  // side tube
translate([-0,0,50])
rotate([0,90,0])
tube(20+d);
}
}
}

$fn=100;
cylinder(d=30,h=100);
translate([-0,0,50])
rotate([0,90,0])
cylinder(d=20,h=50);

for (j= [0:2:90]){
bevel=12.01;
a=bevelsin(j);
b=bevel
cos(j);
fillet(0,a,b,0);
}

yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold:

And the same for preview in 2021.01, though it takes a very long time
there.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

For looks great to me On Thu, 16 Jan, 2025, 6:12 am Jordan Brown via Discuss, < discuss@lists.openscad.org> wrote: > Taking the original and replacing the 0.0001 with 0.01 (and cleaning up > the indentation): > > module tube(d){ > linear_extrude(100) > difference(){ > circle(d=d); > circle (d=d-0.01); > }; > } > > module fillet(a,b,c,d){ > hull(){ > intersection(){ > tube(30+a); //upright tube > translate([-0,0,50]) > rotate([0,90,0]) > tube(20+b); > } > intersection(){ > tube(30+c); // side tube > translate([-0,0,50]) > rotate([0,90,0]) > tube(20+d); > } > } > } > > $fn=100; > cylinder(d=30,h=100); > translate([-0,0,50]) > rotate([0,90,0]) > cylinder(d=20,h=50); > > for (j= [0:2:90]){ > bevel=12.01; > a=bevel*sin(j); > b=bevel*cos(j); > fillet(0,a,b,0); > } > > yields (Windows 11, OpenSCAD 2024.12.26, preview or Manifold: > > > And the same for preview in 2021.01, though it takes a very long time > there. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Thu, Jan 16, 2025 4:13 AM

I wasn't really sure how this worked, so I deconstructed it and made
sort of an exploded diagram showing the components of the result.

One thing that makes it a bit hard to follow is the fact that it works
with tubes rather than cylinders.  Some of the shapes being manipulated
are very very small and rely on hull to turn them back into full
shapes.  I switched it over to cylinders and that made it easier to see.

I also changed it over to being a cross-shaped intersection, because
making everything be centered got rid of some translates that were
confusing me, and made some aspects of the diagram below easier.

Here's the diagram.  Each column (0, 30, 60, 90) is one component of the
final curve; each row (A, B, C, D) is a step in the process.  This is a
very low-resolution version so that you have more of a chance of seeing
how the results fit into the final product; the original model had many
more columns so as to produce a smoother curve.

Row A1 is the combination of a horizontal cylinder with the diameter of
the object's horizontal cylinder, and a vertical cylinder that varies in
diameter from the total length of the bevel down to the diameter of the
object's original vertical cylinder.
Row A2 is sort of the transposition of A1; the vertical cylinder is the
diameter of the object's vertical cylinder, and the horizontal cylinder
grows in diameter from the diameter of the horizontal cylinder to the
total vertical length of the bevel.

Row B1 is the intersection of the two shapes in row A1, so it is a
segment of horizontal cylinder that varies in length from the total
horizontal length of the bevel down to the diameter of the vertical
cylinder.
Row B2 is similarly the intersection of the two shapes in row A2.

Row C is the union of the shapes in B1 and B2.

Row D is the hull of the shape in C.

Finally, the shapes in row D are unioned to produce the final shape to
the left.

It's a clever technique.

I wasn't really sure how this worked, so I deconstructed it and made sort of an exploded diagram showing the components of the result. One thing that makes it a bit hard to follow is the fact that it works with tubes rather than cylinders.  Some of the shapes being manipulated are very very small and rely on hull to turn them back into full shapes.  I switched it over to cylinders and that made it easier to see. I also changed it over to being a cross-shaped intersection, because making everything be centered got rid of some translates that were confusing me, and made some aspects of the diagram below easier. Here's the diagram.  Each column (0, 30, 60, 90) is one component of the final curve; each row (A, B, C, D) is a step in the process.  This is a very low-resolution version so that you have more of a chance of seeing how the results fit into the final product; the original model had many more columns so as to produce a smoother curve. Row A1 is the combination of a horizontal cylinder with the diameter of the object's horizontal cylinder, and a vertical cylinder that varies in diameter from the total length of the bevel down to the diameter of the object's original vertical cylinder. Row A2 is sort of the transposition of A1; the vertical cylinder is the diameter of the object's vertical cylinder, and the horizontal cylinder grows in diameter from the diameter of the horizontal cylinder to the total vertical length of the bevel. Row B1 is the intersection of the two shapes in row A1, so it is a segment of horizontal cylinder that varies in length from the total horizontal length of the bevel down to the diameter of the vertical cylinder. Row B2 is similarly the intersection of the two shapes in row A2. Row C is the union of the shapes in B1 and B2. Row D is the hull of the shape in C. Finally, the shapes in row D are unioned to produce the final shape to the left. It's a clever technique.
SP
Sanjeev Prabhakar
Thu, Jan 16, 2025 6:07 AM

Good explanation
One thing I would like to add here is that increase of diameters is not in
straight line but in kind of circular traces like cos theta and sin theta
for the 2 solids i.e. vertical and horizontal cylinders.

For example if vertical cylinder is increased in dia by sin 30, horizontal
cylinder is increased by cos 30.

At 0 deg 1 cylinder is increased by 1 unit while the other is at its
original shape.

This will give the desired shape of the fillet

On Thu, 16 Jan, 2025, 9:44 am Jordan Brown via Discuss, <
discuss@lists.openscad.org> wrote:

I wasn't really sure how this worked, so I deconstructed it and made sort
of an exploded diagram showing the components of the result.

One thing that makes it a bit hard to follow is the fact that it works
with tubes rather than cylinders.  Some of the shapes being manipulated are
very very small and rely on hull to turn them back into full shapes.  I
switched it over to cylinders and that made it easier to see.

I also changed it over to being a cross-shaped intersection, because
making everything be centered got rid of some translates that were
confusing me, and made some aspects of the diagram below easier.

Here's the diagram.  Each column (0, 30, 60, 90) is one component of the
final curve; each row (A, B, C, D) is a step in the process.  This is a
very low-resolution version so that you have more of a chance of seeing how
the results fit into the final product; the original model had many more
columns so as to produce a smoother curve.

Row A1 is the combination of a horizontal cylinder with the diameter of
the object's horizontal cylinder, and a vertical cylinder that varies in
diameter from the total length of the bevel down to the diameter of the
object's original vertical cylinder.
Row A2 is sort of the transposition of A1; the vertical cylinder is the
diameter of the object's vertical cylinder, and the horizontal cylinder
grows in diameter from the diameter of the horizontal cylinder to the total
vertical length of the bevel.

Row B1 is the intersection of the two shapes in row A1, so it is a segment
of horizontal cylinder that varies in length from the total horizontal
length of the bevel down to the diameter of the vertical cylinder.
Row B2 is similarly the intersection of the two shapes in row A2.

Row C is the union of the shapes in B1 and B2.

Row D is the hull of the shape in C.

Finally, the shapes in row D are unioned to produce the final shape to the
left.

It's a clever technique.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Good explanation One thing I would like to add here is that increase of diameters is not in straight line but in kind of circular traces like cos theta and sin theta for the 2 solids i.e. vertical and horizontal cylinders. For example if vertical cylinder is increased in dia by sin 30, horizontal cylinder is increased by cos 30. At 0 deg 1 cylinder is increased by 1 unit while the other is at its original shape. This will give the desired shape of the fillet On Thu, 16 Jan, 2025, 9:44 am Jordan Brown via Discuss, < discuss@lists.openscad.org> wrote: > I wasn't really sure how this worked, so I deconstructed it and made sort > of an exploded diagram showing the components of the result. > > One thing that makes it a bit hard to follow is the fact that it works > with tubes rather than cylinders. Some of the shapes being manipulated are > very very small and rely on hull to turn them back into full shapes. I > switched it over to cylinders and that made it easier to see. > > I also changed it over to being a cross-shaped intersection, because > making everything be centered got rid of some translates that were > confusing me, and made some aspects of the diagram below easier. > > Here's the diagram. Each column (0, 30, 60, 90) is one component of the > final curve; each row (A, B, C, D) is a step in the process. This is a > very low-resolution version so that you have more of a chance of seeing how > the results fit into the final product; the original model had many more > columns so as to produce a smoother curve. > > > Row A1 is the combination of a horizontal cylinder with the diameter of > the object's horizontal cylinder, and a vertical cylinder that varies in > diameter from the total length of the bevel down to the diameter of the > object's original vertical cylinder. > Row A2 is sort of the transposition of A1; the vertical cylinder is the > diameter of the object's vertical cylinder, and the horizontal cylinder > grows in diameter from the diameter of the horizontal cylinder to the total > vertical length of the bevel. > > Row B1 is the intersection of the two shapes in row A1, so it is a segment > of horizontal cylinder that varies in length from the total horizontal > length of the bevel down to the diameter of the vertical cylinder. > Row B2 is similarly the intersection of the two shapes in row A2. > > Row C is the union of the shapes in B1 and B2. > > Row D is the hull of the shape in C. > > Finally, the shapes in row D are unioned to produce the final shape to the > left. > > > It's a clever technique. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Raymond West
Thu, Jan 16, 2025 11:44 AM

There seems to be a difference in how various platforms handle scad
scripts. Maybe it would be useful if, when showing code there was an
easy way of showing and comparing settings, if problems occur. All we
have at the moment is relatively easy access to is the build version,
and it is pretty obvious that what works on one platform, does not
necessarily work on others. If there was an easily accessible list of
settings, then when things differ, then it would be easy to see what
settings, if any, were different when we have the situations similar to
this case.

On 16/01/2025 06:07, Sanjeev Prabhakar via Discuss wrote:

Good explanation
One thing I would like to add here is that increase of diameters is
not in straight line but in kind of circular traces like cos theta and
sin theta for the 2 solids i.e. vertical and horizontal cylinders.

For example if vertical cylinder is increased in dia by sin 30,
horizontal cylinder is increased by cos 30.

At 0 deg 1 cylinder is increased by 1 unit while the other is at its
original shape.

This will give the desired shape of the fillet

On Thu, 16 Jan, 2025, 9:44 am Jordan Brown via Discuss,
discuss@lists.openscad.org wrote:

 I wasn't really sure how this worked, so I deconstructed it and
 made sort of an exploded diagram showing the components of the result.

 One thing that makes it a bit hard to follow is the fact that it
 works with tubes rather than cylinders.  Some of the shapes being
 manipulated are very very small and rely on hull to turn them back
 into full shapes.  I switched it over to cylinders and that made
 it easier to see.

 I also changed it over to being a cross-shaped intersection,
 because making everything be centered got rid of some translates
 that were confusing me, and made some aspects of the diagram below
 easier.

 Here's the diagram.  Each column (0, 30, 60, 90) is one component
 of the final curve; each row (A, B, C, D) is a step in the
 process.  This is a very low-resolution version so that you have
 more of a chance of seeing how the results fit into the final
 product; the original model had many more columns so as to produce
 a smoother curve.


 Row A1 is the combination of a horizontal cylinder with the
 diameter of the object's horizontal cylinder, and a vertical
 cylinder that varies in diameter from the total length of the
 bevel down to the diameter of the object's original vertical cylinder.
 Row A2 is sort of the transposition of A1; the vertical cylinder
 is the diameter of the object's vertical cylinder, and the
 horizontal cylinder grows in diameter from the diameter of the
 horizontal cylinder to the total vertical length of the bevel.

 Row B1 is the intersection of the two shapes in row A1, so it is a
 segment of horizontal cylinder that varies in length from the
 total horizontal length of the bevel down to the diameter of the
 vertical cylinder.
 Row B2 is similarly the intersection of the two shapes in row A2.

 Row C is the union of the shapes in B1 and B2.

 Row D is the hull of the shape in C.

 Finally, the shapes in row D are unioned to produce the final
 shape to the left.


 It's a clever technique.

 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

There seems to be a difference in how various platforms handle scad scripts. Maybe it would be useful if, when showing code there was an easy way of showing and comparing settings, if problems occur. All we have at the moment is relatively easy access to is the build version, and it is pretty obvious that what works on one platform, does not necessarily work on others. If there was an easily accessible list of settings, then when things differ, then it would be easy to see what settings, if any, were different when we have the situations similar to this case. On 16/01/2025 06:07, Sanjeev Prabhakar via Discuss wrote: > Good explanation > One thing I would like to add here is that increase of diameters is > not in straight line but in kind of circular traces like cos theta and > sin theta for the 2 solids i.e. vertical and horizontal cylinders. > > For example if vertical cylinder is increased in dia by sin 30, > horizontal cylinder is increased by cos 30. > > At 0 deg 1 cylinder is increased by 1 unit while the other is at its > original shape. > > This will give the desired shape of the fillet > > On Thu, 16 Jan, 2025, 9:44 am Jordan Brown via Discuss, > <discuss@lists.openscad.org> wrote: > > I wasn't really sure how this worked, so I deconstructed it and > made sort of an exploded diagram showing the components of the result. > > One thing that makes it a bit hard to follow is the fact that it > works with tubes rather than cylinders.  Some of the shapes being > manipulated are very very small and rely on hull to turn them back > into full shapes.  I switched it over to cylinders and that made > it easier to see. > > I also changed it over to being a cross-shaped intersection, > because making everything be centered got rid of some translates > that were confusing me, and made some aspects of the diagram below > easier. > > Here's the diagram.  Each column (0, 30, 60, 90) is one component > of the final curve; each row (A, B, C, D) is a step in the > process.  This is a very low-resolution version so that you have > more of a chance of seeing how the results fit into the final > product; the original model had many more columns so as to produce > a smoother curve. > > > Row A1 is the combination of a horizontal cylinder with the > diameter of the object's horizontal cylinder, and a vertical > cylinder that varies in diameter from the total length of the > bevel down to the diameter of the object's original vertical cylinder. > Row A2 is sort of the transposition of A1; the vertical cylinder > is the diameter of the object's vertical cylinder, and the > horizontal cylinder grows in diameter from the diameter of the > horizontal cylinder to the total vertical length of the bevel. > > Row B1 is the intersection of the two shapes in row A1, so it is a > segment of horizontal cylinder that varies in length from the > total horizontal length of the bevel down to the diameter of the > vertical cylinder. > Row B2 is similarly the intersection of the two shapes in row A2. > > Row C is the union of the shapes in B1 and B2. > > Row D is the hull of the shape in C. > > Finally, the shapes in row D are unioned to produce the final > shape to the left. > > > It's a clever technique. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
RW
Raymond West
Thu, Jan 16, 2025 12:56 PM

try this - gives a flange.

 up=40; //diameter of upright rod
 hor=20; // diameter of horizontal rod
 hup =100; //height of upright
 lhor = 50; //length of horizontal (from centre)
 bevel=15;
fl=3; //flange width

 module rod(d){
       linear_extrude(100)
            circle(d=d);
 }

 module fillet(a,b,c,d){
   hull(){
     intersection(){
         rod(up+a);  //upright tube
       translate([-0,0,50])
       rotate([0,90,0])
         rod(hor+b);
         }
          intersection(){
         rod(up+c);  // side tube
       translate([-0,0,50])
       rotate([0,90,0])
         rod(hor+d);
         }
 }
 }

 $fn=100;
        cylinder(d=up,h=hup);
       translate([-0,0,50])
       rotate([0,90,0])
       cylinder(d=hor,h=lhor);

     for (j= [0:2:90]){
       a=bevelsin(j);
         b=bevel
cos(j);
          fillet(fl2,a,b,fl2);
     }

 /*

to do -

make tubes of given wall thickness

angle joint

make tube joints smooth on inside. (difference a smaller fillet, possibly )

*/

try this - gives a flange.  up=40; //diameter of upright rod  hor=20; // diameter of horizontal rod  hup =100; //height of upright  lhor = 50; //length of horizontal (from centre)  bevel=15; fl=3; //flange width  module rod(d){        linear_extrude(100)             circle(d=d);  }  module fillet(a,b,c,d){    hull(){      intersection(){          rod(up+a);  //upright tube        translate([-0,0,50])        rotate([0,90,0])          rod(hor+b);          }           intersection(){          rod(up+c);  // side tube        translate([-0,0,50])        rotate([0,90,0])          rod(hor+d);          }  }  }  $fn=100;         cylinder(d=up,h=hup);        translate([-0,0,50])        rotate([0,90,0])        cylinder(d=hor,h=lhor);      for (j= [0:2:90]){        a=bevel*sin(j);          b=bevel*cos(j);           fillet(fl*2,a,b,fl*2);      }  /* to do - make tubes of given wall thickness angle joint make tube joints smooth on inside. (difference a smaller fillet, possibly ) */