Changeset 261 for cpp/frams/model


Ignore:
Timestamp:
12/06/14 02:19:02 (6 years ago)
Author:
Maciej Komosinski
Message:

Verified return values, added error messages [closes #47]

Location:
cpp/frams/model/geometry
Files:
2 edited

Legend:

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

    r237 r261  
    8282                        break;
    8383        }
     84        FMprintf("GeometryUtils", "isPointInsidePart", FMLV_ERROR, "Part shape=%d not supported", part->shape);
    8485        return false;
    8586}
     
    101102                        break;
    102103        }
     104        FMprintf("GeometryUtils", "isPointStrictlyInsidePart", FMLV_ERROR, "Part shape=%d not supported", part->shape);
    103105        return false;
    104106}
  • cpp/frams/model/geometry/modelgeometryinfo.cpp

    r234 r261  
    9797double ModelGeometryInfo::externalAreaOfPart(const Model &model, const int partIndex, const double density)
    9898{
    99         switch (model.getPart(partIndex)->shape)
     99        Part *part = model.getPart(partIndex);
     100        switch (part->shape)
    100101        {
    101102                case Part::SHAPE_ELLIPSOID:
     
    108109                        return externalAreaOfCylinder(model, partIndex, density);
    109110        }
     111        FMprintf("ModelGeometryInfo", "externalAreaOfPart", FMLV_ERROR, "Part shape=%d not supported", part->shape);
    110112        return 0;
    111113}
Note: See TracChangeset for help on using the changeset viewer.