Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4496 > unrolled thread

Getting 3d printable models out of 3d graphics in Mathematica

Started byRoger Bagula <roger.bagula@gmail.com>
First post2011-08-20 10:25 +0000
Last post2011-08-24 11:54 +0000
Articles 5 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Getting 3d printable models out of 3d graphics in Mathematica Roger Bagula <roger.bagula@gmail.com> - 2011-08-20 10:25 +0000
    Re: Getting 3d printable models out of 3d graphics in Mathematica Yves Klett <yves.klett@googlemail.com> - 2011-08-21 09:36 +0000
      Re: Getting 3d printable models out of 3d graphics in Mathematica Roger Bagula <roger.bagula@gmail.com> - 2011-08-23 09:47 +0000
        Re: Getting 3d printable models out of 3d graphics in Mathematica Roger Bagula <roger.bagula@gmail.com> - 2011-08-24 07:14 +0000
          Re: Getting 3d printable models out of 3d graphics in Mathematica Yves Klett <yves.klett@googlemail.com> - 2011-08-24 11:54 +0000

#4496 — Getting 3d printable models out of 3d graphics in Mathematica

FromRoger Bagula <roger.bagula@gmail.com>
Date2011-08-20 10:25 +0000
SubjectGetting 3d printable models out of 3d graphics in Mathematica
Message-ID<j2o22h$50p$1@smc.vnet.net>
Surfaces that appear fine in Mathematica aren't accepted
to be printed by: ( *.obj,*.dxf,*.stl,...others)
http://www.shapeways.com/
or need to be repaired at:
http://www.sculpteo.com/
http://www.sculpteo.com/en/gallery/public/user/rlbagulatftn/
I give an example of one that Mathematica 8 failed on yesterday
from my old work TFTN:
(* b=c=1 torus cycloid*)
(* b=2,c=1 baseball seam *)
(* by R. L. BAGULA 10 JULY 1997=A9 *)

a:=10;
b=2;
c=3;
Clear[f,g ]
f[t_]=Cos[t];
g[t_]=Sin[t] ;
gr=ParametricPlot3D[{f[t] f[p/b]-(a+g[t])*g[p/c],
((a+g[t])*f[p/c]+f[t] g[p/b]) f[p/b],
((a+g[t])*f[p/c]+f[t] g[p/b]) g[p/b]},
    {t,0,2Pi},
{p,0,12 Pi},
 PlotPoints->100,PlotStyle->{Orange,Specularity[White,10]},Axes-
>None,Mesh->None,Boxed->False]
Export["kleinbottle_angcycloid_2_3.stl", gr]
But I have many examples.
I want to know if there is some test I can do on a model using
Mathematica? Brice and other ray tracing programs which don't have
"physical" requirements have no trouble with Mathematica model.
One well known artist has a whole series of work based on one of my
model fractals.
(* 128*6128*128 CUBE OF xy,yz,zx  beta triangle 3D *)
(* BY R. L. BAGULA 30 May 2004=A9*)
a=64;
b1 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - y]]]
b2 = Beta[Abs[a - Abs[a - y]], Abs[a - Abs[a - z]]]
b3 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - z]]]
g=Flatten[Table[If[Mod[1/(b1*b2*b3),2]==1,
Cuboid[0.5*{x,y,z}],{}],
{x,0,2*a},{y,0,2*a},{z,0,2*a}]];
gg=Show[Graphics3D[g,Boxed->False,ViewPoint->{-3.059, 8.168, 2.221}]]
Export["betaholeycube.stl", %]
And after repair this was accepted for printing at:
http://www.sculpteo.com/

Roger Bagula

[toc] | [next] | [standalone]


#4513

FromYves Klett <yves.klett@googlemail.com>
Date2011-08-21 09:36 +0000
Message-ID<j2qjj2$d2a$1@smc.vnet.net>
In reply to#4496
Complex topic.

For one, your face normals are not directed uniformly. Try

a := 10;
b = 2;
c = 3;
Clear[f, g]
f[t_] = Cos[t];
g[t_] = Sin[t];
gr = ParametricPlot3D[{f[t] f[p/b] - (a + g[t])*
      g[p/c], ((a + g[t])*f[p/c] + f[t] g[p/b]) f[
      p/b], ((a + g[t])*f[p/c] + f[t] g[p/b]) g[p/b]}, {t, 0,
    2 Pi}, {p, 0, 12 Pi}, PlotPoints -> 100, Axes -> None,
   Mesh -> None, Boxed -> False];
Graphics3D[{FaceForm[Blue, Yellow], gr[[1]]}]

which shows by means of FaceForm the normal direction of the polygons.
If they face the wrong way, they are ignored by some interpreters and
this messes up your file. I had also an instance where non-convex
polygons were not triangulated as expected by Export, although this
would probably not happen with standard 3D plots and convex polygons.

Regards,
Yves

Am 20.08.2011 12:25, schrieb Roger Bagula:
> Surfaces that appear fine in Mathematica aren't accepted
> to be printed by: ( *.obj,*.dxf,*.stl,...others)
> http://www.shapeways.com/
> or need to be repaired at:
> http://www.sculpteo.com/
> http://www.sculpteo.com/en/gallery/public/user/rlbagulatftn/
> I give an example of one that Mathematica 8 failed on yesterday
> from my old work TFTN:
> (* b=c=1 torus cycloid*)
> (* b=2,c=1 baseball seam *)
> (* by R. L. BAGULA 10 JULY 1997=A9 *)
> 
> a:=10;
> b=2;
> c=3;
> Clear[f,g ]
> f[t_]=Cos[t];
> g[t_]=Sin[t] ;
> gr=ParametricPlot3D[{f[t] f[p/b]-(a+g[t])*g[p/c],
> ((a+g[t])*f[p/c]+f[t] g[p/b]) f[p/b],
> ((a+g[t])*f[p/c]+f[t] g[p/b]) g[p/b]},
>     {t,0,2Pi},
> {p,0,12 Pi},
>  PlotPoints->100,PlotStyle->{Orange,Specularity[White,10]},Axes-
>> None,Mesh->None,Boxed->False]
> Export["kleinbottle_angcycloid_2_3.stl", gr]
> But I have many examples.
> I want to know if there is some test I can do on a model using
> Mathematica? Brice and other ray tracing programs which don't have
> "physical" requirements have no trouble with Mathematica model.
> One well known artist has a whole series of work based on one of my
> model fractals.
> (* 128*6128*128 CUBE OF xy,yz,zx  beta triangle 3D *)
> (* BY R. L. BAGULA 30 May 2004=A9*)
> a=64;
> b1 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - y]]]
> b2 = Beta[Abs[a - Abs[a - y]], Abs[a - Abs[a - z]]]
> b3 = Beta[Abs[a - Abs[a - x]], Abs[a - Abs[a - z]]]
> g=Flatten[Table[If[Mod[1/(b1*b2*b3),2]==1,
> Cuboid[0.5*{x,y,z}],{}],
> {x,0,2*a},{y,0,2*a},{z,0,2*a}]];
> gg=Show[Graphics3D[g,Boxed->False,ViewPoint->{-3.059, 8.168, 2.221}]]
> Export["betaholeycube.stl", %]
> And after repair this was accepted for printing at:
> http://www.sculpteo.com/
> 
> Roger Bagula
> 

[toc] | [prev] | [next] | [standalone]


#4525

FromRoger Bagula <roger.bagula@gmail.com>
Date2011-08-23 09:47 +0000
Message-ID<j2vsun$2iu$1@smc.vnet.net>
In reply to#4513
On Aug 21, 2:36 am, Yves Klett <yves.kl...@googlemail.com> wrote:
Yves Klett
Thanks.
That makes sense: I'm trying it.
What also seems to work is plotting a lot more points.
200 instead of 100.
Uses a lot more memory,
but the new machines are faster and have more memory
and Mathematica 8
doesn't reject everything like 2.0 did, LOL.
Roger Bagula

[toc] | [prev] | [next] | [standalone]


#4537

FromRoger Bagula <roger.bagula@gmail.com>
Date2011-08-24 07:14 +0000
Message-ID<j328di$b3b$1@smc.vnet.net>
In reply to#4525
On Aug 23, 2:47 am, Roger Bagula <roger.bag...@gmail.com> wrote:
Yves Klett
I don't think that will help.
Maybe if I don't use
EdgeForm[] or Mesh->None
( which I use to make the graphic look better)
the model would be stronger?
Shapeways certainly is giving me trouble as they won't print
most of good my models.
Roger Bagula

[toc] | [prev] | [next] | [standalone]


#4554

FromYves Klett <yves.klett@googlemail.com>
Date2011-08-24 11:54 +0000
Message-ID<j32opj$duh$1@smc.vnet.net>
In reply to#4537
There are all kinds of thingies like
overlapping/intersecting/degenerated faces/edges, open/multiple shells,
holes and such that can make your life hard.

Some 3D-modelling programs offer the option to reorient face normals in
a consistent fashion and some allow for "repair" of STL meshes. I used
Rhino3D for this purpose, but the result is not always optimal. Unless
you know exactly why some interpreter has problems with your geometry,
solving this will be hard.

Regards,
Yves

Am 24.08.2011 09:14, schrieb Roger Bagula:
> On Aug 23, 2:47 am, Roger Bagula <roger.bag...@gmail.com> wrote:
> Yves Klett
> I don't think that will help.
> Maybe if I don't use
> EdgeForm[] or Mesh->None
> ( which I use to make the graphic look better)
> the model would be stronger?
> Shapeways certainly is giving me trouble as they won't print
> most of good my models.
> Roger Bagula
> 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web