# Changeset 658

Ignore:
Timestamp:
04/24/17 03:14:21 (6 years ago)
Message:
• One function name made shorter
• Fixed some typos
• Predictable behavior for empty (zero-Part) Models (that should never happen)
Location:
cpp/frams
Files:
4 edited

Unmodified
Removed
• ## cpp/frams/_demos/geometry/info_test.cpp

 r534 Orient axes; // Calculating approximate sizes and axes of model. These values are calculated together because // they depends on each other. Sizes are distances between furthest points on model surface // they depend on each other. Sizes are distances between furthest points on model surface // measured along corresponding axes. Fields sizes.x and axes.x describes the 'length' of 3D // model. Fields sizes.y and axes.y desctibes 'width' of 2D model created by projecting original // points created for each unit of length. It means, that for each square unit of surface area // of parts of model, at least density^2 points will be created. ModelGeometryInfo::findSizesAndAxesOfModel(model, density, sizes, axes); ModelGeometryInfo::findSizesAndAxes(model, density, sizes, axes); // Creating output variables. Pt3D lowerBoundary, upperBoundary; // Calculationg bounding box of model. Result is stored in variables lowerBoundary and // Calculating bounding box of model. Result is stored in variables lowerBoundary and // upperBoundary. ModelGeometryInfo::boundingBox(model, lowerBoundary, upperBoundary);
• ## cpp/frams/model/geometry/geometryutils.cpp

 r375 double GeometryUtils::pointPosition(const int pointIndex, const int numberOfPoints) { return pointIndex / (numberOfPoints-1.0); if (numberOfPoints == 1) return 0; else return pointIndex / (numberOfPoints-1.0); }
• ## cpp/frams/model/geometry/modelgeoclass.cpp

 r548 onDensityChanged(); if (cached_sizes.x < 0) //calculate if invalid ModelGeometryInfo::findSizesAndAxesOfModel(*model, density, cached_sizes, cached_axes); ModelGeometryInfo::findSizesAndAxes(*model, density, cached_sizes, cached_axes); VectorObject* n = new VectorObject;
• ## cpp/frams/model/geometry/modelgeometryinfo.cpp

 r546 #include void ModelGeometryInfo::findSizesAndAxesOfModel(const Model &input_model, const double density, void ModelGeometryInfo::findSizesAndAxes(const Model &input_model, const double density, Pt3D &sizes, Orient &axes) { } bool ModelGeometryInfo::boundingBox(const Model &model, Pt3D &lowerBoundary, Pt3D &upperBoundary) void ModelGeometryInfo::boundingBox(const Model &model, Pt3D &lowerBoundary, Pt3D &upperBoundary) { if (model.getPartCount() == 0) if (model.getPartCount() == 0) //should never happen. Invalid model provided? { return false; lowerBoundary = Pt3D_0; upperBoundary = Pt3D_0; return; } upperBoundary.getMax(partUpperBoundary); } return true; }
Note: See TracChangeset for help on using the changeset viewer.