discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

making a round container with the help of rotate (?)

F
FPA
Sun, Nov 24, 2024 3:35 PM

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60^o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2^nd segment which is not
properly positioned on the inner circle, 60^o away from the first^one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred ^

Hello, as part of my learning, I want to make a round screw container (see image attached). It supposed to be a round container with a middle section (small circle), 6 segments arranged around around it (60^o each) and a outer circle as the outer edge. I'm struggling now while creating the segment walls inside, around the inner circle. I will attach the code I came up with so far. As you can see the struggle begins with the 2^nd segment which is not properly positioned on the inner circle, 60^o away from the first^one. My suspicion is the 2nd rotate command is going out of 'whack'. I would appreciate f someone could point me to the correct approach to resolve the problem. Any help is much appreciated. TIA Fred ^
FH
Father Horton
Sun, Nov 24, 2024 3:49 PM

I use BOSL2’s turtle function for things like this.

On Sun, Nov 24, 2024 at 9:36 AM FPA via Discuss discuss@lists.openscad.org
wrote:

Hello,

as part of my learning, I want to make a round screw container (see image
attached).

It supposed to be a round container with a middle section (small circle),
6 segments arranged around around it (60o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2nd segment which is not
properly positioned on the inner circle, 60o away from the first one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred


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

I use BOSL2’s turtle function for things like this. On Sun, Nov 24, 2024 at 9:36 AM FPA via Discuss <discuss@lists.openscad.org> wrote: > Hello, > > as part of my learning, I want to make a round screw container (see image > attached). > > It supposed to be a round container with a middle section (small circle), > 6 segments arranged around around it (60o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2nd segment which is not > properly positioned on the inner circle, 60o away from the first one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
DP
Dan Perry
Sun, Nov 24, 2024 3:50 PM

I didn't fix your Z displacement errors (exercise for the student), but
here's how to array objects around a circle/cylinder:

module obj2() {
for (i = [0:5]) {
rotate([0,0,i*60]) translate([radius1-0.005, 0, 0])
cube([radius2-radius1, wall, height2], center = false);
}
};

Dan

On Sun, Nov 24, 2024 at 3:36 PM FPA via Discuss discuss@lists.openscad.org
wrote:

Hello,

as part of my learning, I want to make a round screw container (see image
attached).

It supposed to be a round container with a middle section (small circle),
6 segments arranged around around it (60o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2nd segment which is not
properly positioned on the inner circle, 60o away from the first one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred


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

I didn't fix your Z displacement errors (exercise for the student), but here's how to array objects around a circle/cylinder: module obj2() { for (i = [0:5]) { rotate([0,0,i*60]) translate([radius1-0.005, 0, 0]) cube([radius2-radius1, wall, height2], center = false); } }; Dan On Sun, Nov 24, 2024 at 3:36 PM FPA via Discuss <discuss@lists.openscad.org> wrote: > Hello, > > as part of my learning, I want to make a round screw container (see image > attached). > > It supposed to be a round container with a middle section (small circle), > 6 segments arranged around around it (60o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2nd segment which is not > properly positioned on the inner circle, 60o away from the first one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
TP
Torsten Paul
Sun, Nov 24, 2024 3:52 PM

On 24.11.24 16:35, FPA via Discuss wrote:

My suspicion is the 2nd rotate command is going out of 'whack'.

I think this is caused by first rotating and translating after
that. For this type of positioning, you need to translate first
and rotate in place as second step.

Also an option might be staying in 2D mostly and only extrude to
3D as last step, example below.

ciao,
Torsten.


$fa = 2;
$fs = 0.2;

od = 80;
id = 5;
wall = 2;
height = 30;

linear_extrude(wall) difference() {
circle(d = od);
circle(d = id);
}
linear_extrude(height) offset(-wall) offset(wall) difference() {
union() {
difference() {
circle(d = od);
circle(d = od - 2 * wall);
}
for (a = [0:2])
rotate(120 * a)
square([wall, od - wall], center = true);
circle(d = id + 2 * wall);
}
circle(d = id);
}

On 24.11.24 16:35, FPA via Discuss wrote: > My suspicion is the 2nd rotate command is going out of 'whack'. I think this is caused by first rotating and translating after that. For this type of positioning, you need to translate first and rotate in place as second step. Also an option might be staying in 2D mostly and only extrude to 3D as last step, example below. ciao, Torsten. -------------------------------------- $fa = 2; $fs = 0.2; od = 80; id = 5; wall = 2; height = 30; linear_extrude(wall) difference() { circle(d = od); circle(d = id); } linear_extrude(height) offset(-wall) offset(wall) difference() { union() { difference() { circle(d = od); circle(d = od - 2 * wall); } for (a = [0:2]) rotate(120 * a) square([wall, od - wall], center = true); circle(d = id + 2 * wall); } circle(d = id); }
RW
Raymond West
Sun, Nov 24, 2024 4:28 PM

based on your sketch, I thought it was something else.   🙁 Anyway,
maybe a clue within

radius1 = 15;                  // inner circle
radius2 = 40;                 // outer circle
height1 = 1;                  // heigth of bottom
height2 = 7;                  // heigth of walls
wall = 1.5;

var=45; // adjust for transition 'twixt cylinder and cone
heightcone= 60;

heightbase=60;

$fn=100;

// round base
 module base(){ cylinder(d=radius2*2, h=var);
 }

 //hex top
 module top(){
 cylinder (d1=radius22,d2= radius12,$fn=6, h=60);
 }

 hull(){
 translate([0,0,heightbase])
 top();
 base();
 }

On 24/11/2024 15:35, FPA via Discuss wrote:

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60^o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2^nd segment which is not
properly positioned on the inner circle, 60^o away from the first^one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred ^


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

based on your sketch, I thought it was something else.   🙁 Anyway, maybe a clue within radius1 = 15;                  // inner circle radius2 = 40;                 // outer circle height1 = 1;                  // heigth of bottom height2 = 7;                  // heigth of walls wall = 1.5; var=45; // adjust for transition 'twixt cylinder and cone heightcone= 60; heightbase=60; $fn=100; // round base  module base(){ cylinder(d=radius2*2, h=var);  }  //hex top  module top(){  cylinder (d1=radius2*2,d2= radius1*2,$fn=6, h=60);  }  hull(){  translate([0,0,heightbase])  top();  base();  } On 24/11/2024 15:35, FPA via Discuss wrote: > > Hello, > > as part of my learning, I want to make a round screw container (see > image attached). > > It supposed to be a round container with a middle section (small > circle), 6 segments arranged around around it (60^o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2^nd segment which is not > properly positioned on the inner circle, 60^o away from the first^one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred ^ > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
RW
Raymond West
Sun, Nov 24, 2024 5:16 PM

incircled = 30;  // change to your names/values
outcircled= 150;
height=20;
wallw=4;

//make in 2d and extrude

module triangle(){   //large 60 degree triangle  (bigger than outer
diameter)
  hd= sqrt((200200)-(100100));  //pythagically to get x
  points=([[ 0,0], [hd,-100],[hd,100]]);
  polygon(points);
}

module segment(){
   difference(){
    intersection(){
     triangle();
     circle(d=outcircled);  // round outer edge of triangle
   }
   circle(d=incircled);   // round inner edge of triasngle
  }
}

//segment();

module wall(){
   linear_extrude(height){
      difference(){
       segment();  //outer shape
         offset(r=-wallw/2)  // inner shape differenced
         segment();
    }
  }
}
wall(); //this will be walls for removable segment trays

On 24/11/2024 15:35, FPA via Discuss wrote:

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60^o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2^nd segment which is not
properly positioned on the inner circle, 60^o away from the first^one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred ^


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

incircled = 30;  // change to your names/values outcircled= 150; height=20; wallw=4; //make in 2d and extrude module triangle(){   //large 60 degree triangle  (bigger than outer diameter)   hd= sqrt((200*200)-(100*100));  //pythagically to get x   points=([[ 0,0], [hd,-100],[hd,100]]);   polygon(points); } module segment(){    difference(){     intersection(){      triangle();      circle(d=outcircled);  // round outer edge of triangle    }    circle(d=incircled);   // round inner edge of triasngle   } } //segment(); module wall(){    linear_extrude(height){       difference(){        segment();  //outer shape          offset(r=-wallw/2)  // inner shape differenced          segment();     }   } } wall(); //this will be walls for removable segment trays On 24/11/2024 15:35, FPA via Discuss wrote: > > Hello, > > as part of my learning, I want to make a round screw container (see > image attached). > > It supposed to be a round container with a middle section (small > circle), 6 segments arranged around around it (60^o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2^nd segment which is not > properly positioned on the inner circle, 60^o away from the first^one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred ^ > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
F
FPA
Sun, Nov 24, 2024 6:44 PM

You guys are awesome!

That gives me a lot to digest.

I haven't expected that it would go so much into the nitty gritty, But
that's good so.

Fred

On 2024-11-24 10:35, FPA via Discuss wrote:

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60^o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2^nd segment which is not
properly positioned on the inner circle, 60^o away from the first^one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred ^


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

You guys are awesome! That gives me a lot to digest. I haven't expected that it would go so much into the nitty gritty, But that's good so. Fred On 2024-11-24 10:35, FPA via Discuss wrote: > > Hello, > > as part of my learning, I want to make a round screw container (see > image attached). > > It supposed to be a round container with a middle section (small > circle), 6 segments arranged around around it (60^o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2^nd segment which is not > properly positioned on the inner circle, 60^o away from the first^one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred ^ > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
RW
Raymond West
Mon, Nov 25, 2024 7:35 PM

If anyone is interested, this is fully parametric, (in my world). It
has  rounded corners in the containers, easier to get the contents, and
rounded corners on the edges. I could chamfer the base (not fillet) for
ease of printing. I may or may not add a locking, folding handle.

On 24/11/2024 18:44, FPA via Discuss wrote:

You guys are awesome!

That gives me a lot to digest.

I haven't expected that it would go so much into the nitty gritty, But
that's good so.

Fred

On 2024-11-24 10:35, FPA via Discuss wrote:

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60^o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around
the inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2^nd segment which is not
properly positioned on the inner circle, 60^o away from the first^one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach
to resolve the problem.

Any help is much appreciated.

TIA

Fred ^


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

If anyone is interested, this is fully parametric, (in my world). It has  rounded corners in the containers, easier to get the contents, and rounded corners on the edges. I could chamfer the base (not fillet) for ease of printing. I may or may not add a locking, folding handle. On 24/11/2024 18:44, FPA via Discuss wrote: > > You guys are awesome! > > That gives me a lot to digest. > > I haven't expected that it would go so much into the nitty gritty, But > that's good so. > > Fred > > > On 2024-11-24 10:35, FPA via Discuss wrote: >> >> Hello, >> >> as part of my learning, I want to make a round screw container (see >> image attached). >> >> It supposed to be a round container with a middle section (small >> circle), 6 segments arranged around around it (60^o each) >> >> and a outer circle as the outer edge. >> >> I'm struggling now while creating the segment walls inside, around >> the inner circle. >> >> I will attach the code I came up with so far. >> >> As you can see the struggle begins with the 2^nd segment which is not >> properly positioned on the inner circle, 60^o away from the first^one. >> >> My suspicion is the 2nd rotate command is going out of 'whack'. >> >> I would appreciate f someone could point me to the correct approach >> to resolve the problem. >> >> Any help is much appreciated. >> >> TIA >> >> Fred ^ >> >> >> _______________________________________________ >> 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
MH
Matthieu Hendriks
Mon, Nov 25, 2024 7:39 PM

I'm interested :)

Met vriendelijke groet,

Matthieu Hendriks


Raymond West via Discuss schreef op 2024-11-25 20:35:

If anyone is interested, this is fully parametric, (in my world). It
has  rounded corners in the containers, easier to get the contents, and
rounded corners on the edges. I could chamfer the base (not fillet) for
ease of printing. I may or may not add a locking, folding handle.

On 24/11/2024 18:44, FPA via Discuss wrote:

You guys are awesome!

That gives me a lot to digest.

I haven't expected that it would go so much into the nitty gritty, But
that's good so.

Fred

On 2024-11-24 10:35, FPA via Discuss wrote:

Hello,

as part of my learning, I want to make a round screw container (see
image attached).

It supposed to be a round container with a middle section (small
circle), 6 segments arranged around around it (60o each)

and a outer circle as the outer edge.

I'm struggling now while creating the segment walls inside, around the
inner circle.

I will attach the code I came up with so far.

As you can see the struggle begins with the 2nd segment which is not
properly positioned on the inner circle, 60o away from the first one.

My suspicion is the 2nd rotate command is going out of 'whack'.

I would appreciate f someone could point me to the correct approach to
resolve the problem.

Any help is much appreciated.

TIA

Fred


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

I'm interested :) Met vriendelijke groet, Matthieu Hendriks ------------------------- Raymond West via Discuss schreef op 2024-11-25 20:35: > If anyone is interested, this is fully parametric, (in my world). It > has rounded corners in the containers, easier to get the contents, and > rounded corners on the edges. I could chamfer the base (not fillet) for > ease of printing. I may or may not add a locking, folding handle. > > On 24/11/2024 18:44, FPA via Discuss wrote: > > You guys are awesome! > > That gives me a lot to digest. > > I haven't expected that it would go so much into the nitty gritty, But > that's good so. > > Fred > > On 2024-11-24 10:35, FPA via Discuss wrote: > > Hello, > > as part of my learning, I want to make a round screw container (see > image attached). > > It supposed to be a round container with a middle section (small > circle), 6 segments arranged around around it (60o each) > > and a outer circle as the outer edge. > > I'm struggling now while creating the segment walls inside, around the > inner circle. > > I will attach the code I came up with so far. > > As you can see the struggle begins with the 2nd segment which is not > properly positioned on the inner circle, 60o away from the first one. > > My suspicion is the 2nd rotate command is going out of 'whack'. > > I would appreciate f someone could point me to the correct approach to > resolve the problem. > > Any help is much appreciated. > > TIA > > Fred > > _______________________________________________ > 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
K
Ken
Mon, Nov 25, 2024 7:55 PM

I also am interested, it would be good if you wouldn't mind sharing the source code?

On 2024-11-26 06:35, Raymond West via Discuss wrote:

If anyone is interested, this is fully parametric, (in my world). It has  rounded corners in the containers, easier to get the contents, and rounded corners on the edges. I could chamfer the base (not fillet) for ease of printing. I may or may not add a locking, folding handle.

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com
https://vk7krj.com/running.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!

I also am interested, it would be good if you wouldn't mind sharing the source code? On 2024-11-26 06:35, Raymond West via Discuss wrote: > > If anyone is interested, this is fully parametric, (in my world). It has  rounded corners in the containers, easier to get the contents, and rounded corners on the edges. I could chamfer the base (not fillet) for ease of printing. I may or may not add a locking, folding handle. > > -- Cheers, Ken bats059@gmail.com https://vk7krj.com https://vk7krj.com/running.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Your job as parents is to teach them to control all three. My job as a grandad is to tell you how you are doing it all wrong!