#162 Refactor pipe element calculation in pipe.c

Analysis (17)
Csaba Nagy

The calculation of the linear/bent elements needed to construct a pipe based on it's control points is repeated a few times in the code.

This patch is extracting it in a separate function, and replaces 2 of the occurrences with call to this new function.

There is one more occurrence in the rt_pipe_tess function, but that code has either already drifted or it really does something different, so I didn't touch it - needs review from somebody who knows that code.


  • Csaba Nagy

    Csaba Nagy - 2013-04-05
    • milestone: --> 387257
  • Csaba Nagy

    Csaba Nagy - 2013-04-05

    This solution is not satisfactory, I will work on a new patch.

  • Csaba Nagy

    Csaba Nagy - 2013-04-07

    Patch version 1 uploaded.

  • adrisons

    adrisons - 2013-04-10

    Hi, sorry for this stupid question but i've never used sourceforge, how can i see where the file pipe.c is located?

  • Csaba Nagy

    Csaba Nagy - 2013-04-11

    adrisons: the path is src/librt/primitives/pipe/pipe.c
    (you can find it in the patch too)


  • Sean Morrison

    Sean Morrison - 2013-04-12

    Almost a perfect patch! It applied cleanly but had numerous whitespace/indent inconsistency errors. You might want to run sh/ws.sh on your file before making future patches/commits or reviewing the indentation rules described in our HACKING file.

    Applied in r55134. Your name is reflected in our AUTHORS file too. Thanks!

  • Sean Morrison

    Sean Morrison - 2013-04-12
    • assigned_to: nobody --> brlcad
    • milestone: 387257 --> Untested
    • labels: 622310 --> Analysis
    • status: open --> closed-accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks