POV-Ray : Newsgroups : povray.general : How to extrude a mesh : Re: How to extrude a mesh Server Time
29 Jul 2024 18:19:05 EDT (-0400)
  Re: How to extrude a mesh  
From: Alain
Date: 9 Nov 2010 19:27:49
Message: <4cd9e705@news.povray.org>

> 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


Post a reply to this message

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