Maris:
> Unfortunately this is a quite big problem for GRASS if nobody
> from -dev ML can not explain how GRASS internal stuff works :(

It's not so bad, Radim did leave notes.  e.g. in lib/vector/Vlib/buffer.c in 
the case of public functions they are even Doxygen-ized so they appear in the 
programmer's manual. For me "grep" does the job.


/*!
  \brief Create parrallel line
  
  \param InPoints input line
  \param distance create parrallel line in distance
  \param tolerance maximum distance between theoretical arc and polygon segments
  \param rm_end remove end points falling into distance
  \param[out] OutPoints output line

  \return
*/
void
Vect_line_parallel ( ... )
{
....
}

here is the relevant code:


Vect_line_buffer()
....
    dangle = 2 * acos( 1-tolerance/fabs(distance) ); /* angle step */


 parallel_line()
....
    atol = 2 * acos( 1-tol/fabs(d) );
....
    /* TODO: a <= PI can probably fail because of representation error */
    if ( a <= PI && a > atol)
    {
        na = (int) (a/atol);
        atol2 = a/(na+1) * side;
        for (j = 0; j < na; j++)
        {
            av+=atol2;
            nx = x[i+1] + fabs(d) * cos(av);
            ny = y[i+1] + fabs(d) * sin(av);
            Vect_append_point ( nPoints, nx, ny, 0 );
        }
    }



Hamish



      

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to