Changeset 536


Ignore:
Timestamp:
07/20/16 14:57:42 (8 years ago)
Author:
Maciej Komosinski
Message:

"Shaped" models use the same p.mass calculation as "old" models (influences simulation stability)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r534 r536  
    918918                        p->owner = this;
    919919                        p->refno = i;
    920                         if (p->shape == 0)
    921                         {
    922                                 if (checklevel > 0)
    923                                         p->mass = 0.0;
    924                         }
     920                        if (checklevel > 0)
     921                                p->mass = 0.0;
    925922                        //VALIDMINMAX(p,part,mass);//mass is very special
    926923                        // VALIDMINMAX are managed manually when adding part properties in f0-def!
     
    976973                                j->p2_refno = j->part2->refno;
    977974                                if (checklevel > 0)
    978                                 {
    979                                         if (j->part1->shape == 0)
    980                                                 j->part1->mass += 1.0;
    981                                         if (j->part2->shape == 0)
    982                                                 j->part2->mass += 1.0;
    983                                 }
     975                                        {
     976                                        j->part1->mass += 1.0;
     977                                        j->part2->mass += 1.0;
     978                                        }
    984979                                if ((j->usedelta) && ((j->d.x != JOINT_DELTA_MARKER) || (j->d.y != JOINT_DELTA_MARKER) || (j->d.z != JOINT_DELTA_MARKER)))
    985980                                { // delta positioning -> calc. orient.
     
    10711066                {
    10721067                        p = (Part*)parts(i);
    1073                         if (p->shape == 0)
    1074                                 if (p->mass <= 0.001)
    1075                                         p->mass = 1.0;
     1068                        if (p->mass <= 0.001)
     1069                                p->mass = 1.0;
    10761070                        p->flags &= ~LINKFLAG;
    10771071                }
Note: See TracChangeset for help on using the changeset viewer.