POV-Ray : Newsgroups : povray.beta-test : The New Editor : Re: The New Editor Server Time
25 Apr 2024 22:56:50 EDT (-0400)
  Re: The New Editor  
From: Le Forgeron
Date: 9 Dec 2015 11:46:59
Message: <56685b03$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 09/12/2015 08:54, Thomas de Groot a écrit :
> 
>> 
>> 9 Not a function of the editor, but a REQUIRED function of
>> POV-Ray: a special switch should allow POV-Ray, instead of
>> rendering, to create an .stl file output of any given POV-Ray
>> scene. In times of 3D printing, this is just a must. POV-Ray
>> gives us such an immense control over the scene, but what is this
>> all good for, what are the decades of developing POV-Ray good
>> for, if we cannot bring our POV-Ray scenes into the real 
>> world..?
> 
> That would be nice indeed.

Not for a scene, but for an object, it has been done.
(now, what is the difference between a scene and an object ? hmmm)
The path is to make a mesh from an object, then save that mesh as a stl.

It is not perfect: the unit of stl is rather implicit, and the
adaptation from povray unit is rather scarce.

And no color so far. I will blame the dual specification for color in st
l.

Of course it is yet another branch of unofficial povray :-)

You can both render the scene and get one or many stl files from it.

Here an illustration about how the linked page's object was made:
> http://www.shapeways.com/product/JHQ6C74NL/boxarts



#version 3.7;
global_settings{ assumed_gamma 1.0 }

#declare RadiusValue = 40;
#declare ScaleFactor= RadiusValue*cos(radians(36));
camera { orthographic
location <0,0.5,-40>*ScaleFactor
up y
right image_width/image_height*x
direction z
look_at <0,0.5,0>*ScaleFactor
 angle 4.2
}

#declare IntSize = 25;
#declare Width = 1.25;
#declare ExtSize = IntSize+2*Width;
#declare MidSize = IntSize+Width;

light_source  { <-4,7,-10>*ScaleFactor, 0.5 }
light_source  { <4,7,-10>*ScaleFactor, 0.4 }
light_source  { <4,-7,-10>*ScaleFactor, 0.4 }
light_source  { <-4,-7,-10>*ScaleFactor, 0.4 }
light_source  { <-4,7,10>*ScaleFactor, 0.5 }
light_source  { <4,7,10>*ScaleFactor, 0.4 }
light_source  { <4,-7,10>*ScaleFactor, 0.4 }
light_source  { <-4,-7,10>*ScaleFactor, 0.4 }
background { color rgb <0.35,0.5,0.35> }

#declare Te= texture { pigment { color rgb <1,1,1> } };
#default{ texture { Te } }
#declare Name="BoxArts";

#declare Face=
union{
torus { IntSize/2, Width/2 }
cylinder { <MidSize/2,0,MidSize/2>, -<MidSize/2,0,MidSize/2>, Width/2 }
cylinder { <-MidSize/2,0,MidSize/2>, -<-MidSize/2,0,MidSize/2>, Width/2
}
#for(j,0,359,90)
#if (j = 990)
cylinder { <MidSize/2,0,MidSize/2>, <MidSize/2,0,-MidSize/2>, Width/2
rotate j*y }
#end
sphere {  <MidSize/2,0,MidSize/2>, Width/2 rotate j*y }
#end
}
;
#declare Ori=
difference{
union{
object { Face rotate 90*x translate z*(MidSize/2) }
object { Face rotate 90*x translate -z*(MidSize/2) }
object { Face translate -y*(MidSize/2) }
object { Face rotate 90*x rotate 90*y translate x*(MidSize/2) }
object { Face rotate 90*x rotate 90*y translate -x*(MidSize/2) }
}
box{ -ExtSize/2,ExtSize/2 inverse }
box{ -IntSize/2,IntSize/2 }
}
;
//object{Ori rotate <1,2,3> }
#declare Out=
bourke { original Ori accuracy <150,150,150>  offset 0.05 precision 20
 texture { pigment { color rgb <1,1,1> }
 }
 }
;
#declare FiName=concat(Name,".stl");
#debug FiName
#debug "\n"
stl_save{ FiName, Out }
#debug "Save Done\n"
object { Out }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlZoWwIACgkQhKAm8mTpkW2k8wQA1O0F00tRp1g7mOJ+rrHch+Cp
E3XykrwyajR8taDSWv2kyIutQ5KAKbVYxDNwtFnTARRcJPA2hiju043kfWvzfndQ
DqLMJx4bY0tmOeDZXuW9R+y4XsvpM18KdLbFhk08oHlwy5vHzH/85ykoU2tjI4CE
K2dTbV1qVTrZN9LQnTc=
=2Dcp
-----END PGP SIGNATURE-----


Post a reply to this message

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