#135 Reduction in src/librt/primitives/nmg/nmg_rt_segs.c


The most body of functions state5() and state6() was united at function state56(). Duplications was removed.


  • Cliff Yapp

    Cliff Yapp - 2012-07-29

    This patch also looks like it introduces logic changes. What is the intent here?

  • Cliff Yapp

    Cliff Yapp - 2012-07-30

    I can't seem to access that image.

  • Erik Greenwald

    Erik Greenwald - 2012-08-01

    The provided patch changes far more than the linked image. Namely; it removes a large amount of functionality triggered by the "in_out" field of the a_hit struct. If the only change is the return value, please regenerate the patch file to reflect that. Remember to look over patch files by hand before submitting to verify that they include what you intend and only what you intend. Thanks!

  • Ksenija Slivko

    Ksenija Slivko - 2012-08-02

    Well, I looked through this patch again and again and I really don't understand what you mean...

    There's such code in patch file.
    static inline int
    +state56(struct seg *seghead, struct seg **seg_p, int *seg_count, struct hitmiss *a_hit, struct soltab *stp, struct application *ap, struct bn_tol *tol, int ret_val_7)
    int ret_val = -1;
    double delta;
    @@ -752,7 +745,7 @@
    delta = fabs((*seg_p)->seg_in.hit_dist - a_hit->hit.hit_dist);
    if (delta < tol->dist) {
    - ret_val = 5;
    + ret_val = ret_val_7;
    } else {
    /* complete the segment */
    BU_LIST_MAGIC_SET(&((*seg_p)->l), RT_SEG_MAGIC);
    @@ -776,98 +769,27 @@
    return ret_val;

    It means that the only difference is:
    - ret_val = 5;
    + ret_val = ret_val_7;

    The switch for a_hit struct is on the same place...Please, tell me where I'm wrong or give an example in my code. Thanks!

  • Sean Morrison

    Sean Morrison - 2012-08-14

    applied in r51999, but common function was renamed to state5and6 for now just to disambiguate slightly.

  • Sean Morrison

    Sean Morrison - 2012-08-14
    • labels: --> Compilation
    • assigned_to: nobody --> brlcad
    • status: open --> closed-accepted

Log in to post a comment.