hello every body, i work on creation a ball with a lot of holes
just i make 2 sphere in difference function but to make holes
every square space of it, i got problem also for the code which
it's slow to generate it :
*// Sex Month ball
// BDSM Fétiche
// Bâillon Boule
// Bâillon-boule en caoutchouc.
module boule(){
difference(){
sphere(r=12.5, center=true, $fn = 280);
sphere(r=11.9, center=true, $fn = 280);
}
}
difference(){
boule();
holes();
}
module holes(){
module sp_1(){
for (i = [0:8]) {
//echo(60i/90, sin(60i/90)80, cos(60i/90)80);
translate([sin(360i/9)11.6, cos(360i/9)*11.6, 0])
sphere(r=2.2, center=true, $fn = 280);
}
}
module H_BDSM(){
sp_1();
mirror([1,0,1]){
sp_1();
}
}
H_BDSM();
}
/*
hull(){
rotate([45,45,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,37,-10]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,52,12]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
*/
/*
mirror([1,0,1]){
H_BDSM();
*/
/*hull(){
rotate([-45,-145,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,208,-9]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,222,9.4]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
}
*/
//difference(){
//#left();
//rotate([1,234,18.4])
//translate([10.5,-0.6,0])
//}
module in_1(){
scale([0.3,1.2,1]){
difference(){
sphere(r=2, $fn=200);
translate([-2,-2,0])
cube([4.1,4.1,4.1]);
}
}
}
module out_1(){
scale([1.2,2.2,2]){
difference(){
sphere(r=0.8, $fn=200);
translate([-1,-1,0])
cube([2,2,1.7]);
}
}
}
module left(){
rotate([-84,-173,86]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-145,10])
translate([11.8,0,0])
left();
module right(){
rotate([95,185,90]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-135,10])
translate([-11.8,0,0])
right();*
i hope you can find an other way to make the code simple and did the holes
without interferes, and thank you
--
Sent from: http://forum.openscad.org/
Without addressing a different method to create your model, I can suggest a substantial improvement by reducing the $fn from 200 and 280 to as low as 90. This will give a faster preview at the very least.
The sphere command defaults to the center and does not need that parameter in lines 7, 8 and 21 and will remove those errors as well.
On Thursday, January 2, 2020, 5:42:16 PM EST, Higraphics <hichm19956@gmail.com> wrote:
hello every body, i work on creation a ball with a lot of holes
just i make 2 sphere in difference function but to make holes
every square space of it, i got problem also for the code which
it's slow to generate it :
*// Sex Month ball
// BDSM Fétiche
// Bâillon Boule
// Bâillon-boule en caoutchouc.
module boule(){
difference(){
sphere(r=12.5, center=true, $fn = 280);
sphere(r=11.9, center=true, $fn = 280);
}
}
difference(){
boule();
holes();
}
module holes(){
module sp_1(){
for (i = [0:8]) {
//echo(60i/90, sin(60i/90)80, cos(60i/90)80);
translate([sin(360i/9)11.6, cos(360i/9)*11.6, 0])
sphere(r=2.2, center=true, $fn = 280);
}
}
module H_BDSM(){
sp_1();
mirror([1,0,1]){
sp_1();
}
}
H_BDSM();
}
/*
hull(){
rotate([45,45,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,37,-10]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,52,12]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
*/
/*
mirror([1,0,1]){
H_BDSM();
*/
/*hull(){
rotate([-45,-145,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,208,-9]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,222,9.4]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
}
*/
//difference(){
//#left();
//rotate([1,234,18.4])
//translate([10.5,-0.6,0])
//}
module in_1(){
scale([0.3,1.2,1]){
difference(){
sphere(r=2, $fn=200);
translate([-2,-2,0])
cube([4.1,4.1,4.1]);
}
}
}
module out_1(){
scale([1.2,2.2,2]){
difference(){
sphere(r=0.8, $fn=200);
translate([-1,-1,0])
cube([2,2,1.7]);
}
}
}
module left(){
rotate([-84,-173,86]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-145,10])
translate([11.8,0,0])
left();
module right(){
rotate([95,185,90]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-135,10])
translate([-11.8,0,0])
right();*
i hope you can find an other way to make the code simple and did the holes
without interferes, and thank you
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I could not run your example, sorry, but perhaps this might help you, if
I understood your design issue.
rad=12.5;
module boule(){
difference(){
sphere(r=12.5, center=true, $fn = 30);
sphere(r=11.9, center=true, $fn = 30);
}
}
difference(){
boule()
// rotate the whole sphere
for( j=[0:20:360]){
// holes on one side
for( k=[115:12:185]){
rotate([j,0,0])
translate([sin(k)*rad,cos(k)*rad,0])
sphere(.6);
}
// holes on other side
for( k=[185:12:245]){
rotate([j,0,0])
translate([sin(k)*rad,cos(k)*rad,0])
sphere(.6);
}
}
}
On 1/2/20 6:00 PM, Higraphics wrote:
hello every body, i work on creation a ball with a lot of holes
just i make 2 sphere in difference function but to make holes
every square space of it, i got problem also for the code which
it's slow to generate it :
*// Sex Month ball
// BDSM Fétiche
// Bâillon Boule
// Bâillon-boule en caoutchouc.
module boule(){
difference(){
sphere(r=12.5, center=true, $fn = 280);
sphere(r=11.9, center=true, $fn = 280);
}
}
difference(){
boule();
holes();
}
module holes(){
module sp_1(){
for (i = [0:8]) {
//echo(60i/90, sin(60i/90)80, cos(60i/90)80);
translate([sin(360i/9)11.6, cos(360i/9)*11.6, 0])
sphere(r=2.2, center=true, $fn = 280);
}
}
module H_BDSM(){
sp_1();
mirror([1,0,1]){
sp_1();
}
}
H_BDSM();
}
/*
hull(){
rotate([45,45,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,37,-10]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,52,12]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
*/
/*
mirror([1,0,1]){
H_BDSM();
*/
/*hull(){
rotate([-45,-145,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,208,-9]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,222,9.4]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
}
*/
//difference(){
//#left();
//rotate([1,234,18.4])
//translate([10.5,-0.6,0])
//}
module in_1(){
scale([0.3,1.2,1]){
difference(){
sphere(r=2, $fn=200);
translate([-2,-2,0])
cube([4.1,4.1,4.1]);
}
}
}
module out_1(){
scale([1.2,2.2,2]){
difference(){
sphere(r=0.8, $fn=200);
translate([-1,-1,0])
cube([2,2,1.7]);
}
}
}
module left(){
rotate([-84,-173,86]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-145,10])
translate([11.8,0,0])
left();
module right(){
rotate([95,185,90]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-135,10])
translate([-11.8,0,0])
right();*
i hope you can find an other way to make the code simple and did the holes
without interferes, and thank you
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 1/2/20 6:00 PM, Higraphics wrote:
hello every body, i work on creation a ball with a lot of holes
just i make 2 sphere in difference function but to make holes
every square space of it, i got problem also for the code which
it's slow to generate it :
*// Sex Month ball
// BDSM Fétiche
// Bâillon Boule
// Bâillon-boule en caoutchouc.
module boule(){
difference(){
sphere(r=12.5, center=true, $fn = 280);
sphere(r=11.9, center=true, $fn = 280);
}
}
difference(){
boule();
holes();
}
module holes(){
module sp_1(){
for (i = [0:8]) {
//echo(60i/90, sin(60i/90)80, cos(60i/90)80);
translate([sin(360i/9)11.6, cos(360i/9)*11.6, 0])
sphere(r=2.2, center=true, $fn = 280);
}
}
module H_BDSM(){
sp_1();
mirror([1,0,1]){
sp_1();
}
}
H_BDSM();
}
/*
hull(){
rotate([45,45,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,37,-10]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,52,12]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
*/
/*
mirror([1,0,1]){
H_BDSM();
*/
/*hull(){
rotate([-45,-145,0]){
translate([13.5,0,0])
cylinder(r=0.9, h=6.3, center=true, $fn=6);
}
rotate([50,208,-9]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
rotate([50,222,9.4]){
translate([12,0,0])
rotate([90,90,90]){
cylinder(r=0.9, h=3.3, center=true, $fn=6);
}
}
}
}
*/
//difference(){
//#left();
//rotate([1,234,18.4])
//translate([10.5,-0.6,0])
//}
module in_1(){
scale([0.3,1.2,1]){
difference(){
sphere(r=2, $fn=200);
translate([-2,-2,0])
cube([4.1,4.1,4.1]);
}
}
}
module out_1(){
scale([1.2,2.2,2]){
difference(){
sphere(r=0.8, $fn=200);
translate([-1,-1,0])
cube([2,2,1.7]);
}
}
}
module left(){
rotate([-84,-173,86]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-145,10])
translate([11.8,0,0])
left();
module right(){
rotate([95,185,90]){
difference(){
in_1();
out_1();
}
}
}
rotate([-45,-135,10])
translate([-11.8,0,0])
right();*
i hope you can find an other way to make the code simple and did the holes
without interferes, and thank you
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I hope it can help:
$fn = 120;
R_SPHERE = 12.5;
R_HOLE = R_SPHERE/5;
module boule(){
difference(){
sphere(r=R_SPHERE);
sphere(r=R_SPHERE-1);
}
}
module holes_dodecahedron() {
cylinder(r=R_HOLE,h=3R_SPHERE,center=true);
for (ii=[0:4]) rotate([0,0,ii72]) rotate([116.55,0,0])
cylinder(r=R_HOLE,h=3*R_SPHERE,center=true);
}
module holes_icosahedron() {
cylinder(r=R_HOLE,h=3R_SPHERE,center=true);
for (ii=[0:4]) rotate([0,0,ii72]) rotate([37.4,0,0])
cylinder(r=R_HOLE,h=3R_SPHERE,center=true);
for (ii=[0:4]) rotate([0,0,ii72]) rotate([37.4+41.8,0,0])
cylinder(r=R_HOLE,h=3R_SPHERE,center=true);
for (ii=[0:4]) rotate([0,0,ii72+36]) rotate([20.9+41.8,0,0])
cylinder(r=R_HOLE,h=3*R_SPHERE,center=true);
}
difference(){
boule();
//holes_dodecahedron();
holes_icosahedron();
}
http://forum.openscad.org/file/t2459/holes.png
--
Sent from: http://forum.openscad.org/
Hello everyone,
Thank you for our help
i try those code and i can't see the holes on the ball (/maybe because i use
the older version/)
just i did a trick is to create cylinders in different orientation and
subtract it in the ball using difference
https://s2.gulfupload.com/i/00098/7q05orgadxhd_t.jpg
https://s2.gulfupload.com/i/00098/csixm5z39e2j_t.jpg
Thank You to every one, and if the script code not work for me that not mean
is false
but i learn lot when you post our knowledge.
--
Sent from: http://forum.openscad.org/