SX
Stillpoint X
Tue, Aug 17, 2021 1:34 PM
https://stackoverflow.com/posts/68811226/timeline
I have a openscad object that I would like to add an angle / angled profile
to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow question
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
[image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
Code:
////////////////////////////////////////////////////////
// Created by Paul Tibble - 18/7/19 //
// https://www.thingiverse.com/Paul_Tibble/about //
// Please consider tipping, if you find this useful. //
////////////////////////////////////////////////////////
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer
Diameter (bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22);
module create_profile() {
////////
// Middle
///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
//////
//length 1
/////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_10.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_10.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//////
//length 2
/////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.25,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.5,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
}
rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();
--
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful and
blissful state."
This message is confidential and is intended only for the individual(s) or
entity named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, please do not read,
copy, use or disclose the contents of this communication to others. Please
notify the sender that you have received this e-mail in error by replying
to the e-mail and then delete this email and any copies of it. Under no
circumstances may the contents hereof be disclosed to the public without
the sender's prior written permission.
<https://stackoverflow.com/posts/68811226/timeline>
I have a openscad object that I would like to add an angle / angled profile
to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow question
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
[image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
Code:
////////////////////////////////////////////////////////
// Created by Paul Tibble - 18/7/19 //
// https://www.thingiverse.com/Paul_Tibble/about //
// Please consider tipping, if you find this useful. //
////////////////////////////////////////////////////////
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer
Diameter (bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2);
module create_profile() {
////////
// Middle
///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
//////
//length 1
/////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_1*0.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_1*0.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//////
//length 2
/////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.25,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.5,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
}
rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();
--
-----
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful and
blissful state."
This message is confidential and is intended only for the individual(s) or
entity named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, please do not read,
copy, use or disclose the contents of this communication to others. Please
notify the sender that you have received this e-mail in error by replying
to the e-mail and then delete this email and any copies of it. Under no
circumstances may the contents hereof be disclosed to the public without
the sender's prior written permission.
-----
RW
Ray West
Tue, Aug 17, 2021 4:32 PM
change the polygons to reflect the angle you want like this.
a=length_1/30; // adjust to get angle you want.
//barb 1
polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
On 17/08/2021 14:34, Stillpoint X wrote:
I have a openscad object that I would like to add an angle / angled
profile to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow
question
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
1-Screenshot_2021-08-17T13-32-38.810Z.png
Code:
|//////////////////////////////////////////////////////// // Created
by Paul Tibble - 18/7/19 // //
https://www.thingiverse.com/Paul_Tibble/about
https://www.thingiverse.com/Paul_Tibble/about // // Please consider
tipping, if you find this useful. //
//////////////////////////////////////////////////////// $fn = 1001;
// Outer Diameter (bottom) outer_diameter_1 = 15; // Wall Thickness
(bottom) wall_thickness_1 = 2; // Rib Thickness (bottom), set to Zero
to remove barb_size_1 = 0.5; // Length (bottom) length_1 = 15; //
Outer Diameter (top), should be smaller than or equal to Outer
Diameter (bottom) outer_diameter_2 = 12; // Wall Thickness (top)
wall_thickness_2 = 1; // Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5; // Length (top) length_2 = 15; // Middle Diameter
mid_diameter = 17; // Middle Length mid_length = 5; //do not change
these inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22); module
create_profile() { //////// // Middle ///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
////// //length 1 /////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_10.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_10.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
////// //length 2 /////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.25,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.5,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
} rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();|
--
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful
and blissful state."
This message is confidential and is intended only for the
individual(s) or entity named above and others who have been
specifically authorized to receive it. If you are not the intended
recipient, please do not read, copy, use or disclose the contents of
this communication to others. Please notify the sender that you have
received this e-mail in error by replying to the e-mail and then
delete this email and any copies of it. Under no circumstances may the
contents hereof be disclosed to the public without the sender's prior
written permission.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
change the polygons to reflect the angle you want like this.
a=length_1/30; // adjust to get angle you want.
//barb 1
polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
On 17/08/2021 14:34, Stillpoint X wrote:
>
> I have a openscad object that I would like to add an angle / angled
> profile to the bottom of a barbed object all the way around.
>
> To see the question in a better format I created stackoverflow
> question
> https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
> <https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object>
>
> 1-Screenshot_2021-08-17T13-32-38.810Z.png
>
>
> Code:
>
>
>
> |//////////////////////////////////////////////////////// // Created
> by Paul Tibble - 18/7/19 // //
> https://www.thingiverse.com/Paul_Tibble/about
> <https://www.thingiverse.com/Paul_Tibble/about> // // Please consider
> tipping, if you find this useful. //
> //////////////////////////////////////////////////////// $fn = 100*1;
> // Outer Diameter (bottom) outer_diameter_1 = 15; // Wall Thickness
> (bottom) wall_thickness_1 = 2; // Rib Thickness (bottom), set to Zero
> to remove barb_size_1 = 0.5; // Length (bottom) length_1 = 15; //
> Outer Diameter (top), should be smaller than or equal to Outer
> Diameter (bottom) outer_diameter_2 = 12; // Wall Thickness (top)
> wall_thickness_2 = 1; // Rib Thickness (top), set to Zero to remove
> barb_size_2 = 0.5; // Length (top) length_2 = 15; // Middle Diameter
> mid_diameter = 17; // Middle Length mid_length = 5; //do not change
> these inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
> inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2); module
> create_profile() { //////// // Middle ///////
> polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
> ////// //length 1 /////
> translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
> //barb 1
> translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 2
> translate([outer_diameter_1/2,length_1*0.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 3
> translate([outer_diameter_1/2,length_1*0.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> ////// //length 2 /////
> translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
> //rib 1
> translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 2
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.25,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 3
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.5,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> } rotate_extrude(angle = 360, convexity = 10) create_profile();
> //create_profile();|
>
> --
> -----
> "There are two modes of being those in bliss and those seeking bliss,
> may each step you take and each thought you make be made in a mindful
> and blissful state."
>
> This message is confidential and is intended only for the
> individual(s) or entity named above and others who have been
> specifically authorized to receive it. If you are not the intended
> recipient, please do not read, copy, use or disclose the contents of
> this communication to others. Please notify the sender that you have
> received this e-mail in error by replying to the e-mail and then
> delete this email and any copies of it. Under no circumstances may the
> contents hereof be disclosed to the public without the sender's prior
> written permission.
> -----
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
T
tjhowse
Thu, Aug 19, 2021 12:18 AM
If I were designing this part I'd use stacked cylinders with the r1 and r2
arguments set to provide the required angle. A little bit of trig would
tell you the difference between the radii required to get the angle for a
given barb height/length
On Wed, 18 Aug 2021 at 02:43, Ray West raywest@raywest.com wrote:
change the polygons to reflect the angle you want like this.
a=length_1/30; // adjust to get angle you want.
//barb 1
polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
On 17/08/2021 14:34, Stillpoint X wrote:
I have a openscad object that I would like to add an angle / angled
profile to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow question
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
[image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
Code:
////////////////////////////////////////////////////////
// Created by Paul Tibble - 18/7/19 //
// https://www.thingiverse.com/Paul_Tibble/about //
// Please consider tipping, if you find this useful. //
////////////////////////////////////////////////////////
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22);
module create_profile() {
////////
// Middle
///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
//////
//length 1
/////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_10.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_10.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//////
//length 2
/////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.25,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.5,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
}
rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();
--
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful and
blissful state."
This message is confidential and is intended only for the individual(s) or
entity named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, please do not read,
copy, use or disclose the contents of this communication to others. Please
notify the sender that you have received this e-mail in error by replying
to the e-mail and then delete this email and any copies of it. Under no
circumstances may the contents hereof be disclosed to the public without
the sender's prior written permission.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
If I were designing this part I'd use stacked cylinders with the r1 and r2
arguments set to provide the required angle. A little bit of trig would
tell you the difference between the radii required to get the angle for a
given barb height/length
On Wed, 18 Aug 2021 at 02:43, Ray West <raywest@raywest.com> wrote:
> change the polygons to reflect the angle you want like this.
>
> a=length_1/30; // adjust to get angle you want.
>
> //barb 1
> polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
> On 17/08/2021 14:34, Stillpoint X wrote:
>
> I have a openscad object that I would like to add an angle / angled
> profile to the bottom of a barbed object all the way around.
>
> To see the question in a better format I created stackoverflow question
> https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
> [image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
>
>
> Code:
>
>
>
> ////////////////////////////////////////////////////////
> // Created by Paul Tibble - 18/7/19 //
> // https://www.thingiverse.com/Paul_Tibble/about //
> // Please consider tipping, if you find this useful. //
> ////////////////////////////////////////////////////////
>
> $fn = 100*1;
>
> // Outer Diameter (bottom)
> outer_diameter_1 = 15;
> // Wall Thickness (bottom)
> wall_thickness_1 = 2;
> // Rib Thickness (bottom), set to Zero to remove
> barb_size_1 = 0.5;
> // Length (bottom)
> length_1 = 15;
> // Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
> outer_diameter_2 = 12;
> // Wall Thickness (top)
> wall_thickness_2 = 1;
> // Rib Thickness (top), set to Zero to remove
> barb_size_2 = 0.5;
> // Length (top)
> length_2 = 15;
> // Middle Diameter
> mid_diameter = 17;
> // Middle Length
> mid_length = 5;
>
>
> //do not change these
> inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
> inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2);
>
> module create_profile() {
> ////////
> // Middle
> ///////
> polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
> //////
> //length 1
> /////
> translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
> //barb 1
> translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 2
> translate([outer_diameter_1/2,length_1*0.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 3
> translate([outer_diameter_1/2,length_1*0.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //////
> //length 2
> /////
> translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
> //rib 1
> translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 2
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.25,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 3
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.5,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> }
>
> rotate_extrude(angle = 360, convexity = 10) create_profile();
> //create_profile();
>
>
> --
> -----
> "There are two modes of being those in bliss and those seeking bliss,
> may each step you take and each thought you make be made in a mindful and
> blissful state."
>
> This message is confidential and is intended only for the individual(s) or
> entity named above and others who have been specifically authorized to
> receive it. If you are not the intended recipient, please do not read,
> copy, use or disclose the contents of this communication to others. Please
> notify the sender that you have received this e-mail in error by replying
> to the e-mail and then delete this email and any copies of it. Under no
> circumstances may the contents hereof be disclosed to the public without
> the sender's prior written permission.
> -----
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
FH
Father Horton
Thu, Aug 19, 2021 2:28 AM
Or you could trace the outline and rotate_extrude it.
On Aug 18, 2021, at 7:19 PM, tjhowse tjhowse@gmail.com wrote:
If I were designing this part I'd use stacked cylinders with the r1 and r2 arguments set to provide the required angle. A little bit of trig would tell you the difference between the radii required to get the angle for a given barb height/length
On Wed, 18 Aug 2021 at 02:43, Ray West raywest@raywest.com wrote:
change the polygons to reflect the angle you want like this.
a=length_1/30; // adjust to get angle you want.
//barb 1
polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
On 17/08/2021 14:34, Stillpoint X wrote:
I have a openscad object that I would like to add an angle / angled profile to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow question https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
<1-Screenshot_2021-08-17T13-32-38.810Z.png>
Code:
////////////////////////////////////////////////////////
// Created by Paul Tibble - 18/7/19 //
// https://www.thingiverse.com/Paul_Tibble/about //
// Please consider tipping, if you find this useful. //
////////////////////////////////////////////////////////
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22);
module create_profile() {
////////
// Middle
///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
//////
//length 1
/////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_10.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_10.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//////
//length 2
/////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.25,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.5,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
}
rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();
--
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful and blissful state."
This message is confidential and is intended only for the individual(s) or entity named above and others who have been specifically authorized to receive it. If you are not the intended recipient, please do not read, copy, use or disclose the contents of this communication to others. Please notify the sender that you have received this e-mail in error by replying to the e-mail and then delete this email and any copies of it. Under no circumstances may the contents hereof be disclosed to the public without the sender's prior written permission.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Or you could trace the outline and rotate_extrude it.
> On Aug 18, 2021, at 7:19 PM, tjhowse <tjhowse@gmail.com> wrote:
>
>
> If I were designing this part I'd use stacked cylinders with the r1 and r2 arguments set to provide the required angle. A little bit of trig would tell you the difference between the radii required to get the angle for a given barb height/length
>
>
>> On Wed, 18 Aug 2021 at 02:43, Ray West <raywest@raywest.com> wrote:
>> change the polygons to reflect the angle you want like this.
>>
>> a=length_1/30; // adjust to get angle you want.
>>
>> //barb 1
>> polygon(points=[[0,0],[0,(length_1/5)+a],[barb_size_1,(length_1/5)]]);
>>
>> On 17/08/2021 14:34, Stillpoint X wrote:
>>>
>>> I have a openscad object that I would like to add an angle / angled profile to the bottom of a barbed object all the way around.
>>>
>>> To see the question in a better format I created stackoverflow question https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
>>>
>>> <1-Screenshot_2021-08-17T13-32-38.810Z.png>
>>>
>>>
>>> Code:
>>>
>>>
>>>
>>>
>>>
>>> ////////////////////////////////////////////////////////
>>> // Created by Paul Tibble - 18/7/19 //
>>> // https://www.thingiverse.com/Paul_Tibble/about //
>>> // Please consider tipping, if you find this useful. //
>>> ////////////////////////////////////////////////////////
>>>
>>> $fn = 100*1;
>>>
>>> // Outer Diameter (bottom)
>>> outer_diameter_1 = 15;
>>> // Wall Thickness (bottom)
>>> wall_thickness_1 = 2;
>>> // Rib Thickness (bottom), set to Zero to remove
>>> barb_size_1 = 0.5;
>>> // Length (bottom)
>>> length_1 = 15;
>>> // Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
>>> outer_diameter_2 = 12;
>>> // Wall Thickness (top)
>>> wall_thickness_2 = 1;
>>> // Rib Thickness (top), set to Zero to remove
>>> barb_size_2 = 0.5;
>>> // Length (top)
>>> length_2 = 15;
>>> // Middle Diameter
>>> mid_diameter = 17;
>>> // Middle Length
>>> mid_length = 5;
>>>
>>>
>>> //do not change these
>>> inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
>>> inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2);
>>>
>>> module create_profile() {
>>> ////////
>>> // Middle
>>> ///////
>>> polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
>>> //////
>>> //length 1
>>> /////
>>> translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
>>> //barb 1
>>> translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
>>> //barb 2
>>> translate([outer_diameter_1/2,length_1*0.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
>>> //barb 3
>>> translate([outer_diameter_1/2,length_1*0.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
>>> //////
>>> //length 2
>>> /////
>>> translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
>>> //rib 1
>>> translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
>>> //rib 2
>>> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.25,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
>>> //rib 3
>>> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.5,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
>>> }
>>>
>>> rotate_extrude(angle = 360, convexity = 10) create_profile();
>>> //create_profile();
>>>
>>> --
>>> -----
>>> "There are two modes of being those in bliss and those seeking bliss,
>>> may each step you take and each thought you make be made in a mindful and blissful state."
>>>
>>> This message is confidential and is intended only for the individual(s) or entity named above and others who have been specifically authorized to receive it. If you are not the intended recipient, please do not read, copy, use or disclose the contents of this communication to others. Please notify the sender that you have received this e-mail in error by replying to the e-mail and then delete this email and any copies of it. Under no circumstances may the contents hereof be disclosed to the public without the sender's prior written permission.
>>> -----
>>>
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
AM
Adrian Mariano
Thu, Aug 19, 2021 2:52 AM
Tracing the profile and doing rotate_extrude is what the poster is trying
to do. It looks like he wants to know how to fix his profile. Making the
thing with cylinders is going to be slower to render and rather more
complicated to do, since it's 21 cylinders and then 3 to subtract. It's
always best to stay 2d as long as you possibly can to minimize render time.
There seem to be people here who love doing trig in their spare time to
make their models, but I think that doing all the trig yourself to get the
right angles would be annoying. We have computers so we don't have to do
stuff like that.
Here's a way to achieve barbs with varying backsize angles using the BOSL2
library that I think is somewhat easier to follow, with no trig. (Note, I
didn't properly use the original variables since I didn't understand their
relation to the barb sizing.) I attached a pic of the object in cross
section.
include<BOSL2/std.scad>
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer Diameter
(bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22);
module barb(ir,or)
{
seglen = 3.75;
barblen = 3;
barbthick = 0.5;
barbangle = [60,50,45];
extra=.01;
path = turtle(["move", or-ir, "left",
"xymove", [barbthick,barblen], "left", barbangle[0],
"untilx", or, "right", barbangle[0], "untily", seglen,
"xymove", [barbthick,barblen], "left", barbangle[1],
"untilx", or, "right", barbangle[1], "untily", 2seglen,
"xymove", [barbthick,barblen], "left", barbangle[2],
"untilx", or, "right", barbangle[2], "untily", 3seglen,
"move", seglen+extra, "left", "move", or-ir
], state=[ir,0]);
polygon(path);
}
rotate_extrude(convexity=10)
{
barb(ir=inner_diameter_1/2,or=outer_diameter_1/2);
back(35)yflip()barb(ir=inner_diameter_2/2,or=outer_diameter_2/2);
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
}
On Tue, Aug 17, 2021 at 9:35 AM Stillpoint X stillpointx@gmail.com wrote:
https://stackoverflow.com/posts/68811226/timeline
I have a openscad object that I would like to add an angle / angled
profile to the bottom of a barbed object all the way around.
To see the question in a better format I created stackoverflow question
https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
[image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
Code:
////////////////////////////////////////////////////////
// Created by Paul Tibble - 18/7/19 //
// https://www.thingiverse.com/Paul_Tibble/about //
// Please consider tipping, if you find this useful. //
////////////////////////////////////////////////////////
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_12);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_22);
module create_profile() {
////////
// Middle
///////
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
//////
//length 1
/////
translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
//barb 1
translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 2
translate([outer_diameter_1/2,length_10.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//barb 3
translate([outer_diameter_1/2,length_10.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
//////
//length 2
/////
translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
//rib 1
translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 2
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.25,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
//rib 3
translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_20.5,0])polygon(points=[[0,0],[0,-1(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
}
rotate_extrude(angle = 360, convexity = 10) create_profile();
//create_profile();
--
"There are two modes of being those in bliss and those seeking bliss,
may each step you take and each thought you make be made in a mindful and
blissful state."
This message is confidential and is intended only for the individual(s) or
entity named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, please do not read,
copy, use or disclose the contents of this communication to others. Please
notify the sender that you have received this e-mail in error by replying
to the e-mail and then delete this email and any copies of it. Under no
circumstances may the contents hereof be disclosed to the public without
the sender's prior written permission.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Tracing the profile and doing rotate_extrude is what the poster is trying
to do. It looks like he wants to know how to fix his profile. Making the
thing with cylinders is going to be slower to render and rather more
complicated to do, since it's 21 cylinders and then 3 to subtract. It's
always best to stay 2d as long as you possibly can to minimize render time.
There seem to be people here who love doing trig in their spare time to
make their models, but I think that doing all the trig yourself to get the
right angles would be annoying. We have computers so we don't have to do
stuff like that.
Here's a way to achieve barbs with varying backsize angles using the BOSL2
library that I think is somewhat easier to follow, with no trig. (Note, I
didn't properly use the original variables since I didn't understand their
relation to the barb sizing.) I attached a pic of the object in cross
section.
include<BOSL2/std.scad>
$fn = 100*1;
// Outer Diameter (bottom)
outer_diameter_1 = 15;
// Wall Thickness (bottom)
wall_thickness_1 = 2;
// Rib Thickness (bottom), set to Zero to remove
barb_size_1 = 0.5;
// Length (bottom)
length_1 = 15;
// Outer Diameter (top), should be smaller than or equal to Outer Diameter
(bottom)
outer_diameter_2 = 12;
// Wall Thickness (top)
wall_thickness_2 = 1;
// Rib Thickness (top), set to Zero to remove
barb_size_2 = 0.5;
// Length (top)
length_2 = 15;
// Middle Diameter
mid_diameter = 17;
// Middle Length
mid_length = 5;
//do not change these
inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2);
module barb(ir,or)
{
seglen = 3.75;
barblen = 3;
barbthick = 0.5;
barbangle = [60,50,45];
extra=.01;
path = turtle(["move", or-ir, "left",
"xymove", [barbthick,barblen], "left", barbangle[0],
"untilx", or, "right", barbangle[0], "untily", seglen,
"xymove", [barbthick,barblen], "left", barbangle[1],
"untilx", or, "right", barbangle[1], "untily", 2*seglen,
"xymove", [barbthick,barblen], "left", barbangle[2],
"untilx", or, "right", barbangle[2], "untily", 3*seglen,
"move", seglen+extra, "left", "move", or-ir
], state=[ir,0]);
polygon(path);
}
rotate_extrude(convexity=10)
{
barb(ir=inner_diameter_1/2,or=outer_diameter_1/2);
back(35)yflip()barb(ir=inner_diameter_2/2,or=outer_diameter_2/2);
polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
}
On Tue, Aug 17, 2021 at 9:35 AM Stillpoint X <stillpointx@gmail.com> wrote:
> <https://stackoverflow.com/posts/68811226/timeline>
>
> I have a openscad object that I would like to add an angle / angled
> profile to the bottom of a barbed object all the way around.
>
> To see the question in a better format I created stackoverflow question
> https://stackoverflow.com/questions/68811226/adding-an-angle-angle-profile-to-openscad-barbed-object
> [image: 1-Screenshot_2021-08-17T13-32-38.810Z.png]
>
>
> Code:
>
>
>
> ////////////////////////////////////////////////////////
> // Created by Paul Tibble - 18/7/19 //
> // https://www.thingiverse.com/Paul_Tibble/about //
> // Please consider tipping, if you find this useful. //
> ////////////////////////////////////////////////////////
>
> $fn = 100*1;
>
> // Outer Diameter (bottom)
> outer_diameter_1 = 15;
> // Wall Thickness (bottom)
> wall_thickness_1 = 2;
> // Rib Thickness (bottom), set to Zero to remove
> barb_size_1 = 0.5;
> // Length (bottom)
> length_1 = 15;
> // Outer Diameter (top), should be smaller than or equal to Outer Diameter (bottom)
> outer_diameter_2 = 12;
> // Wall Thickness (top)
> wall_thickness_2 = 1;
> // Rib Thickness (top), set to Zero to remove
> barb_size_2 = 0.5;
> // Length (top)
> length_2 = 15;
> // Middle Diameter
> mid_diameter = 17;
> // Middle Length
> mid_length = 5;
>
>
> //do not change these
> inner_diameter_1 = outer_diameter_1 - (wall_thickness_1*2);
> inner_diameter_2 = outer_diameter_2 - (wall_thickness_2*2);
>
> module create_profile() {
> ////////
> // Middle
> ///////
> polygon(points=[[inner_diameter_1/2,length_1],[mid_diameter/2,length_1],[mid_diameter/2,length_1+mid_length],[inner_diameter_2/2,length_1+mid_length]]);
> //////
> //length 1
> /////
> translate([inner_diameter_1/2,0,0])square([wall_thickness_1,length_1]);
> //barb 1
> translate([outer_diameter_1/2,0,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 2
> translate([outer_diameter_1/2,length_1*0.25,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //barb 3
> translate([outer_diameter_1/2,length_1*0.5,0])polygon(points=[[0,0],[0,(length_1/5)],[barb_size_1,(length_1/5)]]);
> //////
> //length 2
> /////
> translate([inner_diameter_2/2,length_1+mid_length,0])square([wall_thickness_2,length_2]);
> //rib 1
> translate([outer_diameter_2/2,(length_1+mid_length+length_2),0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 2
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.25,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> //rib 3
> translate([outer_diameter_2/2,(length_1+mid_length+length_2)-length_2*0.5,0])polygon(points=[[0,0],[0,-1*(length_2/5)],[barb_size_2,-1*(length_2/5)]]);
> }
>
> rotate_extrude(angle = 360, convexity = 10) create_profile();
> //create_profile();
>
>
> --
> -----
> "There are two modes of being those in bliss and those seeking bliss,
> may each step you take and each thought you make be made in a mindful and
> blissful state."
>
> This message is confidential and is intended only for the individual(s) or
> entity named above and others who have been specifically authorized to
> receive it. If you are not the intended recipient, please do not read,
> copy, use or disclose the contents of this communication to others. Please
> notify the sender that you have received this e-mail in error by replying
> to the e-mail and then delete this email and any copies of it. Under no
> circumstances may the contents hereof be disclosed to the public without
> the sender's prior written permission.
> -----
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
JB
Jordan Brown
Thu, Aug 19, 2021 3:34 AM
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 ]
]);
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 ]
]);
FH
Father Horton
Thu, Aug 19, 2021 3:41 AM
When I started using OpenSCAD, I did everything with CSG because my (very
limited) 3D design experience was from povray ray-tracing. I didn’t realize
the advantage of 2D until I dabbled in Fusion 360.
When I started using OpenSCAD, I did everything with CSG because my (very
limited) 3D design experience was from povray ray-tracing. I didn’t realize
the advantage of 2D until I dabbled in Fusion 360.
AM
Adrian Mariano
Thu, Aug 19, 2021 10:25 AM
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
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
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>
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
>
MM
Michael Möller
Thu, Aug 19, 2021 10:48 AM
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:
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> 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
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>:
> 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> 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
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
JB
Jordan Brown
Thu, Aug 19, 2021 4:45 PM
On 8/19/2021 3:25 AM, Adrian Mariano wrote:
He wants the back angle on each barb to be different, 45 on one, 50 on
another, and 60 on the third one.
I hadn't noticed that note, but that's not how I read it; I read it as
wanting an angle like 45, 50, 60 degrees - some number like that. I
don't immediately see a use for making the angles be different. Indeed,
if you want to specify anything in terms of angles, you need trig. (But
as you say, the trig might be under the covers.)
Those barbs are only 0.5mm (which seems too small), so the "angle"
underneath them is going to be maybe three layers tall and less than one
extrusion width wide. You probably couldn't tell the difference between
45 and 60.
I am reminded of a piece of my house model, where I have a wood cap on
top of a half-wall. The wood cap extends about an inch on each side of
the wall, so at scale that's about a millimeter. It's a pure overhang,
so I put a 45° bevel under it. But what about the corners, where two
bevels would meet? I put a little quarter-pyramid polyhedron there.
(Later I realized that I could intersect two bevels instead of
constructing a polyhedron.) That was one of my first attempts at
building a polyhedron, so it was a fair amount of work. After I had it
all done and fitting together right, I realized that I'd spent all that
effort on a part that with a total volume of something like a quarter of
a cubic millimeter, barely even perceptible.
On 8/19/2021 3:25 AM, Adrian Mariano wrote:
> He wants the back angle on each barb to be different, 45 on one, 50 on
> another, and 60 on the third one.
I hadn't noticed that note, but that's not how I read it; I read it as
wanting an angle like 45, 50, 60 degrees - some number like that. I
don't immediately see a use for making the angles be different. Indeed,
if you want to specify anything in terms of angles, you need trig. (But
as you say, the trig might be under the covers.)
Those barbs are only 0.5mm (which seems too small), so the "angle"
underneath them is going to be maybe three layers tall and less than one
extrusion width wide. You probably couldn't tell the difference between
45 and 60.
---
I am reminded of a piece of my house model, where I have a wood cap on
top of a half-wall. The wood cap extends about an inch on each side of
the wall, so at scale that's about a millimeter. It's a pure overhang,
so I put a 45° bevel under it. But what about the corners, where two
bevels would meet? I put a little quarter-pyramid polyhedron there.
(Later I realized that I could intersect two bevels instead of
constructing a polyhedron.) That was one of my first attempts at
building a polyhedron, so it was a fair amount of work. After I had it
all done and fitting together right, I realized that I'd spent all that
effort on a part that with a total volume of something like a quarter of
a cubic millimeter, barely even perceptible.