POV-Ray : Newsgroups : povray.programming : combining isosurface and CSG : combining isosurface and CSG Server Time
16 Apr 2024 11:37:40 EDT (-0400)
  combining isosurface and CSG  
From: Reiner Jung
Date: 13 Jan 2009 09:15:00
Message: <web.496ca19e2d7d22092e58f6c00@news.povray.org>
Hello,

I've searched the povray site and googled, but either I am too stupid to
formulate my question correctly or I'm blind or overlooking something.

I am working on a larger hobby project and therefore I need screws, nuts, bolts,
etc. Therefore I created a function which generates a screw thread. Also I
constructed a hexagon nut. For the hole in nut I tried to subtract the screw
thread from the nut like this:

difference {
      object {nut_body}
      union {
  isosurface {
    function{ f_helix1( x,y,z,
   1,    // number of helixes, (1 = single helix, 2 = double helix etc.)
   (2*pi)/incline,   // period,      turns on the length of 2*pi
   incline*2, // minor radius,
   nominal, // major radius,
   1,    // shape parameter,
   2.0,  // cross section type,
         // (0.0 to 1.0 = square ... rounded to circle
         // over 2.0 to 3.0 = rounded to diamond and concave diamond
   0 )   // cross section rotation angle
    }
    contained_by {box { -length/2 , length/2 }}
    threshold 0
    max_gradient 3.168
    accuracy 0.0001
    all_intersections
  }
  cylinder {<0,-length/2,0>,<0,length/2,0>,inner}
 }
}

As a result I get a nut with a squared hole in the middle instead of a hole
drilled into the nut_body by the isosurface.

The povray documentation states that isosurface can be combined with solid
objects, however this does not work in this example. So what am I missing? Or
do I have to remodel the nut_body with a function as well and subtract both
functions?

Thanks for any advice
  Reiner


Post a reply to this message

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