discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] rotate around a "virtual axis"

YA
Yona Appletree
Fri, Jun 5, 2015 6:54 PM

misch.mash mailto:mischakavin@gmail.com
June 5, 2015 at 11:48
You may be interested in Goldberg Polyhedra. Basically, the
generalised form
of the soccer ball. Based on what I've seen in youtube videos, someone
must
have parametrised them.

@Hypher: I tried running your code in the response, but it's dependent
on a
"platonic.scad" I either don't have or am not pointed to by default
(please
excuse if this is a newbie mistake.)

--
View this message in context:
http://forum.openscad.org/rotate-around-a-virtual-axis-tp12779p12797.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Yona Appletree mailto:hypher@gmail.com
June 5, 2015 at 00:40
Emanuele,

Here's another thing that has the hexagons and pentagons calculated:
http://www.thingiverse.com/thing:334955

That thing (and most of the others I've seen) "cheat" in the sense
that they don't actually do face sub-division, which is a bit tricky
to implement in the OpenSCAD language.

I've created a gist,
https://gist.github.com/Yona-Appletree/a03bc32a5c5ca6886e38 with my
implementation of geodesic slicing. The geodesic_example.scad file
contains an example of using the library. You'll have to excuse the
quality of the code... I was just learning OpenSCAD and geodesic math
at the time, so it's kind of funky, but it does work correctly, as far
as I know.

Best,

Yona

Emanuele Spatola mailto:emanuele.spatola@gmail.com
June 4, 2015 at 17:56
After almost a day of failed attempts and research, I found out what I
wanted to create is not physically possible :)
or at least it's not possible just with hexagons, you need to put some
pentagons in the middle.
The name of the polyhedron is Geodesic Sphere dual:
http://en.wikipedia.org/wiki/Geodesic_dome#Chord_factors

the design is not as straightforward as I thought, I found a couple of
.scad sources:
http://www.thingiverse.com/thing:345775
http://www.thingiverse.com/thing:65820
but they are not parametric.

Also turned out openJsC
http://openjscad.org/#examples/sphere.jscadAD has a geodesic sphere
built in:
https://plus.google.com/+ReneKMueller/posts/5hp2CcMRJqu

So now I'm playing with the geodesic sphere source code trying to make
what I need:
http://openjscad.org/#examples/geodesic-sphere.jscad

Thanks to everybody who helped!!

Emanuele


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Emanuele Spatola mailto:emanuele.spatola@gmail.com
June 3, 2015 at 17:39
Hi guys,
I'm trying without much success to create something that looks like this:
http://www.thingiverse.com/thing:282868

To be more specific the goal is to create an empty sphere where the
surface has hexagonal-shaped holes (arranged like a bee nest).

I've tried many approaches, the one I think could be the best is the
following:

  1. cut an hexagon
  2. for ( k = [0 : 60 : 360] ) rotate([offset_deg,0,k]) cut hexagon
  3. recursively repeat for each of the six hexagon using as z-axis the
    line connecting the center of the sphere to the current hexagon.

I was not able to implement that solution since as far as I now it's
not possible to rotate around a "virtual axis"

That's another possible (buggy) implementation (it takes around 1 min
to render):
https://gist.github.com/Emanuele-Spatola/17680d59f173bbc78d79

Any help would be really appreciated!

Thanks,
Emanuele


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

You will need all the files in that gist, not just the example file. Use git clone https://gist.github.com/a03bc32a5c5ca6886e38.git geodesic_example to grab them all. Here's a screenshot of what it looks like, for reference: 1v: https://www.dropbox.com/s/0u9fqhan209v1la/Screenshot%202015-06-05%2011.53.50.png?dl=0 2v: https://www.dropbox.com/s/9rc66pfocnq25v7/Screenshot%202015-06-05%2011.53.40.png?dl=0 3v: https://www.dropbox.com/s/vzd2ox8zez2rnb7/Screenshot%202015-06-05%2011.53.07.png?dl=0 > misch.mash <mailto:mischakavin@gmail.com> > June 5, 2015 at 11:48 > You may be interested in Goldberg Polyhedra. Basically, the > generalised form > of the soccer ball. Based on what I've seen in youtube videos, someone > must > have parametrised them. > > @Hypher: I tried running your code in the response, but it's dependent > on a > "platonic.scad" I either don't have or am not pointed to by default > (please > excuse if this is a newbie mistake.) > > > > -- > View this message in context: > http://forum.openscad.org/rotate-around-a-virtual-axis-tp12779p12797.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > Yona Appletree <mailto:hypher@gmail.com> > June 5, 2015 at 00:40 > Emanuele, > > Here's another thing that has the hexagons and pentagons calculated: > http://www.thingiverse.com/thing:334955 > > That thing (and most of the others I've seen) "cheat" in the sense > that they don't actually do face sub-division, which is a bit tricky > to implement in the OpenSCAD language. > > I've created a gist, > https://gist.github.com/Yona-Appletree/a03bc32a5c5ca6886e38 with my > implementation of geodesic slicing. The geodesic_example.scad file > contains an example of using the library. You'll have to excuse the > quality of the code... I was just learning OpenSCAD and geodesic math > at the time, so it's kind of funky, but it does work correctly, as far > as I know. > > Best, > > Yona > > Emanuele Spatola <mailto:emanuele.spatola@gmail.com> > June 4, 2015 at 17:56 > After almost a day of failed attempts and research, I found out what I > wanted to create is not physically possible :) > or at least it's not possible just with hexagons, you need to put some > pentagons in the middle. > The name of the polyhedron is Geodesic Sphere dual: > http://en.wikipedia.org/wiki/Geodesic_dome#Chord_factors > > the design is not as straightforward as I thought, I found a couple of > .scad sources: > http://www.thingiverse.com/thing:345775 > http://www.thingiverse.com/thing:65820 > but they are not parametric. > > Also turned out openJsC > <http://openjscad.org/#examples/sphere.jscad>AD has a geodesic sphere > built in: > https://plus.google.com/+ReneKMueller/posts/5hp2CcMRJqu > > So now I'm playing with the geodesic sphere source code trying to make > what I need: > http://openjscad.org/#examples/geodesic-sphere.jscad > > Thanks to everybody who helped!! > > Emanuele > > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > Emanuele Spatola <mailto:emanuele.spatola@gmail.com> > June 3, 2015 at 17:39 > Hi guys, > I'm trying without much success to create something that looks like this: > http://www.thingiverse.com/thing:282868 > > To be more specific the goal is to create an empty sphere where the > surface has hexagonal-shaped holes (arranged like a bee nest). > > I've tried many approaches, the one I think could be the best is the > following: > 1. cut an hexagon > 2. for ( k = [0 : 60 : 360] ) rotate([offset_deg,0,k]) cut hexagon > 3. recursively repeat for each of the six hexagon using as z-axis the > line connecting the center of the sphere to the current hexagon. > > I was not able to implement that solution since as far as I now it's > not possible to rotate around a "virtual axis" > > That's another possible (buggy) implementation (it takes around 1 min > to render): > https://gist.github.com/Emanuele-Spatola/17680d59f173bbc78d79 > > Any help would be really appreciated! > > Thanks, > Emanuele > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
MK
Mischa Kavin
Fri, Jun 5, 2015 10:28 PM

You will need all the files in that gist, not just the example file. Use git
clone https://gist.github.com/a03bc32a5c5ca6886e38.git geodesic_example to
grab them all.

Thanks. Completely misunderstood on my end; I thought gist was basically
pastebin + versioning. The page actually has a button to download the lot,
but I mistook it as an offer of software.

Code's rendering well, but I'm getting some vertices numbered twice?

> You will need all the files in that gist, not just the example file. Use git > clone https://gist.github.com/a03bc32a5c5ca6886e38.git geodesic_example to > grab them all. > Thanks. Completely misunderstood on my end; I thought gist was basically pastebin + versioning. The page actually has a button to download the lot, but I mistook it as an offer of software. Code's rendering well, but I'm getting some vertices numbered twice?
YA
Yona Appletree
Sat, Jun 6, 2015 1:48 AM

I'd like to see a screenshot of that for reference. It's probably a bug
in how I'm de-duping the vertices... I'm basically computing all the
faces separately, then using a function to find the unique vertex
locations. It's possible that a floating-point equality issue or other
bug is causing some of the vertices to be repeated. It wasn't a
requirement for my original use of the code for the vertices to be
unique, so I didn't really check that.

  • Yona

Mischa Kavin mailto:mischakavin@gmail.com
June 5, 2015 at 15:28

 You will need all the files in that gist, not just the example
 file. Use git clone
 https://gist.github.com/a03bc32a5c5ca6886e38.git geodesic_example
 to grab them all. 

Thanks. Completely misunderstood on my end; I thought gist was
basically pastebin + versioning. The page actually has a button to
download the lot, but I mistook it as an offer of software.

Code's rendering well, but I'm getting some vertices numbered twice?


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Yona Appletree mailto:hypher@gmail.com
June 5, 2015 at 11:54
You will need all the files in that gist, not just the example file.
Use git clone https://gist.github.com/a03bc32a5c5ca6886e38.git
geodesic_example to grab them all.

Here's a screenshot of what it looks like, for reference:

1v:
https://www.dropbox.com/s/0u9fqhan209v1la/Screenshot%202015-06-05%2011.53.50.png?dl=0
2v:
https://www.dropbox.com/s/9rc66pfocnq25v7/Screenshot%202015-06-05%2011.53.40.png?dl=0

3v:
https://www.dropbox.com/s/vzd2ox8zez2rnb7/Screenshot%202015-06-05%2011.53.07.png?dl=0

Yona Appletree mailto:hypher@gmail.com
June 5, 2015 at 11:51
You will need all the files in that gist, not just the example file.
Use git clone https://gist.github.com/a03bc32a5c5ca6886e38.git
geodesic_example to grab them all.

Here's a screenshot of what it looks like, for reference:

1v:

2v:

3v:

misch.mash mailto:mischakavin@gmail.com
June 5, 2015 at 11:48
You may be interested in Goldberg Polyhedra. Basically, the
generalised form
of the soccer ball. Based on what I've seen in youtube videos, someone
must
have parametrised them.

@Hypher: I tried running your code in the response, but it's dependent
on a
"platonic.scad" I either don't have or am not pointed to by default
(please
excuse if this is a newbie mistake.)

--
View this message in context:
http://forum.openscad.org/rotate-around-a-virtual-axis-tp12779p12797.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Yona Appletree mailto:hypher@gmail.com
June 5, 2015 at 00:40
Emanuele,

Here's another thing that has the hexagons and pentagons calculated:
http://www.thingiverse.com/thing:334955

That thing (and most of the others I've seen) "cheat" in the sense
that they don't actually do face sub-division, which is a bit tricky
to implement in the OpenSCAD language.

I've created a gist,
https://gist.github.com/Yona-Appletree/a03bc32a5c5ca6886e38 with my
implementation of geodesic slicing. The geodesic_example.scad file
contains an example of using the library. You'll have to excuse the
quality of the code... I was just learning OpenSCAD and geodesic math
at the time, so it's kind of funky, but it does work correctly, as far
as I know.

Best,

Yona

I'd like to see a screenshot of that for reference. It's probably a bug in how I'm de-duping the vertices... I'm basically computing all the faces separately, then using a function to find the unique vertex locations. It's possible that a floating-point equality issue or other bug is causing some of the vertices to be repeated. It wasn't a requirement for my original use of the code for the vertices to be unique, so I didn't really check that. - Yona > Mischa Kavin <mailto:mischakavin@gmail.com> > June 5, 2015 at 15:28 > > You will need all the files in that gist, not just the example > file. Use git clone > https://gist.github.com/a03bc32a5c5ca6886e38.git geodesic_example > to grab them all. > > > Thanks. Completely misunderstood on my end; I thought gist was > basically pastebin + versioning. The page actually has a button to > download the lot, but I mistook it as an offer of software. > > Code's rendering well, but I'm getting some vertices numbered twice? > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > Yona Appletree <mailto:hypher@gmail.com> > June 5, 2015 at 11:54 > You will need all the files in that gist, not just the example file. > Use git clone https://gist.github.com/a03bc32a5c5ca6886e38.git > geodesic_example to grab them all. > > Here's a screenshot of what it looks like, for reference: > > 1v: > https://www.dropbox.com/s/0u9fqhan209v1la/Screenshot%202015-06-05%2011.53.50.png?dl=0 > 2v: > https://www.dropbox.com/s/9rc66pfocnq25v7/Screenshot%202015-06-05%2011.53.40.png?dl=0 > > 3v: > https://www.dropbox.com/s/vzd2ox8zez2rnb7/Screenshot%202015-06-05%2011.53.07.png?dl=0 > > > Yona Appletree <mailto:hypher@gmail.com> > June 5, 2015 at 11:51 > You will need all the files in that gist, not just the example file. > Use git clone https://gist.github.com/a03bc32a5c5ca6886e38.git > geodesic_example to grab them all. > > Here's a screenshot of what it looks like, for reference: > > 1v: > > > > 2v: > > > > 3v: > > > > > misch.mash <mailto:mischakavin@gmail.com> > June 5, 2015 at 11:48 > You may be interested in Goldberg Polyhedra. Basically, the > generalised form > of the soccer ball. Based on what I've seen in youtube videos, someone > must > have parametrised them. > > @Hypher: I tried running your code in the response, but it's dependent > on a > "platonic.scad" I either don't have or am not pointed to by default > (please > excuse if this is a newbie mistake.) > > > > -- > View this message in context: > http://forum.openscad.org/rotate-around-a-virtual-axis-tp12779p12797.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > Yona Appletree <mailto:hypher@gmail.com> > June 5, 2015 at 00:40 > Emanuele, > > Here's another thing that has the hexagons and pentagons calculated: > http://www.thingiverse.com/thing:334955 > > That thing (and most of the others I've seen) "cheat" in the sense > that they don't actually do face sub-division, which is a bit tricky > to implement in the OpenSCAD language. > > I've created a gist, > https://gist.github.com/Yona-Appletree/a03bc32a5c5ca6886e38 with my > implementation of geodesic slicing. The geodesic_example.scad file > contains an example of using the library. You'll have to excuse the > quality of the code... I was just learning OpenSCAD and geodesic math > at the time, so it's kind of funky, but it does work correctly, as far > as I know. > > Best, > > Yona >