POV-Ray : Newsgroups : povray.general : How to extrude a mesh : Re: How to extrude a mesh Server Time
29 Jul 2024 18:18:44 EDT (-0400)
  Re: How to extrude a mesh  
From: Darats
Date: 9 Nov 2010 21:05:01
Message: <web.4cd9fd3fe4e188d186c00c840@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > Hi there, I'd like to know if there is any way to extrude a mesh like this :
> >
> > mesh {
> > triangle {<1,13.2146,-23.2146>,<3,14.286,-24.286>,<17,14.286,-24.286>  }
> > triangle {<17,14.286,-24.286>,<19,13.2146,-23.2146>,<1,13.2146,-23.2146>  }
> > triangle {<19,13.2146,-23.2146>,<17,14.286,-24.286>,<17,18.2146,-28.2146>  }
> > triangle {<17,18.2146,-28.2146>,<19,19.2861,-29.2861>,<19,13.2146,-23.2146>  }
> > triangle {<19,19.2861,-29.2861>,<17,18.2146,-28.2146>,<3,18.2146,-28.2146>  }
> > triangle {<3,18.2146,-28.2146>,<1,19.2861,-29.2861>,<19,19.2861,-29.2861>  }
> > triangle {<1,19.2861,-29.2861>,<3,18.2146,-28.2146>,<3,14.286,-24.286>  }
> > triangle {<3,14.286,-24.286>,<1,13.2146,-23.2146>,<1,19.2861,-29.2861>  }
> > triangle {<3,15.7146,-25.7146>,<17,15.7146,-25.7146>,<17,16.786,-26.786>  }
> > triangle {<17,16.786,-26.786>,<3,16.786,-26.786>,<3,15.7146,-25.7146>  }
> > triangle {<5,14.286,-24.286>,<7,14.286,-24.286>,<7,18.2146,-28.2146>  }
> > triangle {<7,18.2146,-28.2146>,<5,18.2146,-28.2146>,<5,14.286,-24.286>  }
> > triangle {<9,14.286,-24.286>,<11,14.286,-24.286>,<11,18.2146,-28.2146>  }
> > triangle {<11,18.2146,-28.2146>,<9,18.2146,-28.2146>,<9,14.286,-24.286>  }
> > triangle {<13,14.286,-24.286>,<15,14.286,-24.286>,<15,18.2146,-28.2146>  }
> > triangle {<15,18.2146,-28.2146>,<13,18.2146,-28.2146>,<13,14.286,-24.286>  }
> > }
> >
> > I'd like to extrude it following the y axis.
> >
> > I know I can do it using the "prism" fonction by keeping only the triangles
> > points without the y coordinate, but it's kinda boring to do it manually.
> >
> > Maybe there is a solution to extrude every kind of 2D or 3D objects along an
> > axis !?
> >
> >
> > Thanks in advance for your reply.
> >
> >
>
> There is no surefire way to do that.
> You can:
> scale the mesh by a very large value along the Y axis and take the
> intersection with a box of the desired thickness.
> intersection{
>  object{Your_mesh scale<1, 1e6,1>}
>  box{<1,1,-30><19,-1,-20>}
> }
>
> Extract the outermost points and use them to define a prism.
>
> Use an external programm to create a pre-extruded prism.
>
>
>
>
> Alain

Thanks for your reply but I'm afraid these ways to do it won't be ok for me.

To extract the outermost points will request any kind of programm to do it, then
I can't and I don't want to use an external programm.

I've tried the first solution, I see what you meant by scaling it along the y
axis, but the example I gave is a inclined plane surface made of triangles, so
scaling it along y only creates another plane surface.

Let's say there is only one triangle in my mesh, like that :

mesh {
            triangle {<0,0,0>, <1,0,1>, <1,1,0>}
}

How can I extrude it using only the 3 dimensions coordinates of the 3 points of
the triangle. Of course I would like something quick and easy to do because I
have to extrude more complex mesh (like the one on my first post)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.