discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fwd: Re: Adding an angle / angle profile to openscad barbed object

RW
Ray West
Thu, Aug 19, 2021 9:17 PM

exactly as I suggested, b4. Guessing from most of the stuff on
thingiverse, it's all generic, if it looks right, then it is right. For
this fitting. If I was the OP and wanted to make this thing, for all
practical purposes, the simple calculation I suggested would do. Even
print it as is and file off the sharp edges. If the angles need to be
more precise, then easy enough to calculate the value by using  basic
sin/cos/tan equations. No need to reinvent a method, or use any outside
libraries/whatever, although nothing to stop anyone if they so wish. Of
course, if the OP does not know much about openscad, but wanted to
learn, then maybe a dialogue could be established. I guess such a guy
would have no idea what I originally implied, and is looking for a plug
and play solution. These days, generally lots of cut and paste in all
software development, and little fundamental studying. But if either
method gets the desired result, is one right and the other wrong?

(a couple of things for blokes to be aware of as you get older - 1) your
prostate, 2)  becoming more right wing, and hence more right! )

On 19/08/2021 11:48, Michael Möller wrote:

Knowing the precision of the average 3d printer, and guessing this is
to fit a flexible hose pipe, a simple linear interpolation of the two
known values is probably enough.

Besides, using the "known values" is still trigonometry, even if you
do not use sin() :-) ☺

Msquare

tor. 19. aug. 2021 12.26 skrev Adrian Mariano <avm4@cornell.edu
mailto:avm4@cornell.edu>:

 Jordan,

 He wants the back angle on each barb to be different, 45 on one,
 50 on another, and 60 on the third one.   I don't know if the
 length of each barb is required to stay the same or not.  I
 assumed they did, which means there's also a little flat area
 behind each barb that varies in size depending on what that angle
 was.  If you special case the angles you can avoid explicit use of
 trig with 45 and 60 deg angles (because you know the trig function
 values for those angles), but not with 50---but if you want a
 clean general solution you will need to use trig.

 On Wed, Aug 18, 2021 at 11:34 PM Jordan Brown
 <openscad@jordan.maileater.net
 <mailto:openscad@jordan.maileater.net>> wrote:

     On 8/18/2021 7:28 PM, Father Horton wrote:
     Or you could trace the outline and rotate_extrude it.
     That's what I would think of, where "trace" means "construct a
     single polygon".

     I wouldn't have thought of using trig at all, because I would
     have thought that the inputs would be the dimensions of the
     barbs, not the angles.  (But the cylinder solution wouldn't
     need trig either, since again you wouldn't have angles as inputs.)

     Here's what I would come up with.  Generalizing to a
     double-ended barbed thing is left as an exercise for the reader:

         outer_diameter = 12;
         wall_thickness = 1;
         barb_size = 0.5;
         barb_front_h = 10;
         barb_back_h = 1;
         nbarb = 3;

         // Some derived values
         inner_diameter = outer_diameter - wall_thickness;
         barb_od = outer_diameter + 2*barb_size;
         barb_h = barb_back_h + barb_front_h;
         h = barb_h * nbarb;

         rotate_extrude() polygon([
              for (i=[0:nbarb-1]) let(z = i*barb_h) each [
                  [ outer_diameter, z ],
                  [ barb_od, z + barb_back_h ],
              ],
              [ outer_diameter, h ],
              [ inner_diameter, h ],
              [ inner_diameter, 0 ]
         ]);


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

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

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

exactly as I suggested, b4. Guessing from most of the stuff on thingiverse, it's all generic, if it looks right, then it is right. For this fitting. If I was the OP and wanted to make this thing, for all practical purposes, the simple calculation I suggested would do. Even print it as is and file off the sharp edges. If the angles need to be more precise, then easy enough to calculate the value by using  basic sin/cos/tan equations. No need to reinvent a method, or use any outside libraries/whatever, although nothing to stop anyone if they so wish. Of course, if the OP does not know much about openscad, but wanted to learn, then maybe a dialogue could be established. I guess such a guy would have no idea what I originally implied, and is looking for a plug and play solution. These days, generally lots of cut and paste in all software development, and little fundamental studying. But if either method gets the desired result, is one right and the other wrong? (a couple of things for blokes to be aware of as you get older - 1) your prostate, 2)  becoming more right wing, and hence more right! ) On 19/08/2021 11:48, Michael Möller wrote: > Knowing the precision of the average 3d printer, and guessing this is > to fit a flexible hose pipe, a simple linear interpolation of the two > known values is probably enough. > > Besides, using the "known values" is still trigonometry, even if you > do not use sin() :-) ☺ > > Msquare > > tor. 19. aug. 2021 12.26 skrev Adrian Mariano <avm4@cornell.edu > <mailto:avm4@cornell.edu>>: > > Jordan, > > He wants the back angle on each barb to be different, 45 on one, > 50 on another, and 60 on the third one.   I don't know if the > length of each barb is required to stay the same or not.  I > assumed they did, which means there's also a little flat area > behind each barb that varies in size depending on what that angle > was.  If you special case the angles you can avoid explicit use of > trig with 45 and 60 deg angles (because you know the trig function > values for those angles), but not with 50---but if you want a > clean general solution you will need to use trig. > > On Wed, Aug 18, 2021 at 11:34 PM Jordan Brown > <openscad@jordan.maileater.net > <mailto:openscad@jordan.maileater.net>> wrote: > > On 8/18/2021 7:28 PM, Father Horton wrote: >> Or you could trace the outline and rotate_extrude it. > > That's what I would think of, where "trace" means "construct a > single polygon". > > I wouldn't have thought of using trig at all, because I would > have thought that the inputs would be the dimensions of the > barbs, not the angles.  (But the cylinder solution wouldn't > need trig either, since again you wouldn't have angles as inputs.) > > Here's what I would come up with.  Generalizing to a > double-ended barbed thing is left as an exercise for the reader: > > outer_diameter = 12; > wall_thickness = 1; > barb_size = 0.5; > barb_front_h = 10; > barb_back_h = 1; > nbarb = 3; > > // Some derived values > inner_diameter = outer_diameter - wall_thickness; > barb_od = outer_diameter + 2*barb_size; > barb_h = barb_back_h + barb_front_h; > h = barb_h * nbarb; > > rotate_extrude() polygon([ > for (i=[0:nbarb-1]) let(z = i*barb_h) each [ > [ outer_diameter, z ], > [ barb_od, z + barb_back_h ], > ], > [ outer_diameter, h ], > [ inner_diameter, h ], > [ inner_diameter, 0 ] > ]); > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to > discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > <mailto:discuss-leave@lists.openscad.org> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org