POV-Ray : Newsgroups : povray.general : How to "solidify" edge of clipped mesh2 surface? : Re: How to "solidify" edge of clipped mesh2 surface? Server Time
29 Jul 2024 16:30:06 EDT (-0400)
  Re: How to "solidify" edge of clipped mesh2 surface?  
From: Alain
Date: 1 Feb 2011 11:56:13
Message: <4d483b2d$1@news.povray.org>

> Thanks, Alain.
>
>> Use a difference of the mesh, a slightly scaled down copy of the mesh,
>> using a scale statement, and a box or plane.
>
> I do have already an inside vector (<0,0,1>) in my mesh2 declaration. I have
> also tried various differences, with the noted results:
>
> // Align clipping box at bottom of cut-off mesh2 surface:
> #declare TestBox = box {<0.5,0.5,0.5>,<-0.5,-0.5,-0.5>  scale<100,100,0.1>
> translate Surface_ClipPlane +<0,0,-0.05>};
>
> // The mesh2, with its bottom clipped off:
> #declare test_clipped_surf = object {Committor_50_Volmap clipped_by
> {MapBoundsPlane} bounded_by {MapBoundsBoxBig}};
>
> // Texture for all TESTOBJ*
> #declare T_TEST = texture { pigment { color rgb<0,0,1>}};
>
> // RESULT: Slab filling just the bottom "opening" of surface:
> #declare TESTOBJ = intersection {object {TestBox} object{test_clipped_surf}};
>
> // RESULT: Slab with a hole in middle (inverse of TESTOBJ):
> #declare TESTOBJ2 = difference {object {TestBox} object{test_clipped_surf}};
>
> // RESULT: Adds a small ring at bottom edge of cut surface, I guess because
> //         the (semi-transparent) surface is duplicated. Attempt to force
> //         force the color to opaque dark blue fails (mesh2 has a texture
> //         declared in it already).
> #declare TESTOBJ3 = object{test_clipped_surf #local T_Committor_50_Surface =
> texture { pigment { color rgb<0,0,1>}}; texture {T_Committor_50_Surface}
>          clipped_by {TestBox} };
>
> // RESULT: Looks like TESTOBJ2:
> #declare TESTOBJ4 = intersection {object {TESTOBJ scale 1.001} object{TESTOBJ
> scale 0.999}};
> // RESULT: Just wierd edge effects:
> #declare TESTOBJ5 = intersection {object {TESTOBJ scale 1.002} object{TESTOBJ2
> scale 0.998}};
>
> Am I doing the differencing wrong? Thanks!
> Dave
>
>

difference{
  object {Committor_50_Volmap}
  object {Committor_50_Volmap scale 0.95}
  object{MapBoundsBoxBig}
  texture{Your_texture}
  rotate Some_Rotation
  translate Somewhere
}

NO clipped_by
NO bounded_by

If you use clipped_by on a sphere, you'll also get an infinitely this 
edge, like this:
sphere{0,1 clipped_by{box{0,1}} // extremely thin wall
Cuts a quadrant out of the SURFACE of the sphere leaving the cut open.

Compare to:
difference{ // wall with thickness
  sphere{0,1} // you can replace the sphere by your mesh
  sphere{0,0.9}// ...and your mesh scaled by 0.9
  box{0,1}
  pigment{rgb 1}
}



Alain


Post a reply to this message

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