Changeset 262 for cpp/frams


Ignore:
Timestamp:
12/06/14 02:26:47 (10 years ago)
Author:
Maciej Komosinski
Message:

Geometry evaluation no longer crashes for models that contain only unsupported cylinder shapes [refs #46]

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

Legend:

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

    r239 r262  
    636636                        iterator = &cylinder;
    637637                        break;
     638
     639                default:
     640                        FMprintf("MeshBuilder::PartSurface", "initialize", FMLV_WARN, "Part shape=%d not supported, skipping...", part->shape);
    638641        }
    639642}
     
    719722                        iterator = &cylinder;
    720723                        break;
     724
     725                default:
     726                        FMprintf("MeshBuilder::PartApices", "initialize", FMLV_WARN, "Part shape=%d not supported, skipping...", part->shape);
    721727        }
    722728}
  • cpp/frams/model/geometry/modelgeometryinfo.cpp

    r261 r262  
    1414        apices.initialize(&model);
    1515        apices.addAllPointsToList(points);
     16        if (points.size() < 1) //maybe 1 or 2 points are also not enough for findSizesAndAxesOfPointsGroup() to work...
     17        {
     18                FMprintf("ModelGeometryInfo", "findSizesAndAxesOfModel", FMLV_ERROR, "Empty points sample for model with %d part(s)", model.getPartCount());
     19                sizes = Pt3D_0;
     20                axes = Orient_1;
     21                return;
     22        }
    1623        GeometryUtils::findSizesAndAxesOfPointsGroup(points, sizes, axes);
    1724}
Note: See TracChangeset for help on using the changeset viewer.