Changeset 546 for cpp/frams/model/geometry
 Timestamp:
 07/28/16 03:39:26 (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/geometry/modelgeometryinfo.cpp
r375 r546 7 7 #include <frams/model/geometry/meshbuilder.h> 8 8 9 void ModelGeometryInfo::findSizesAndAxesOfModel(const Model & model, const double density,9 void ModelGeometryInfo::findSizesAndAxesOfModel(const Model &input_model, const double density, 10 10 Pt3D &sizes, Orient &axes) 11 11 { 12 SolidsShapeTypeModel model(input_model); 12 13 SListTempl<Pt3D> points; 13 14 MeshBuilder::ModelApices apices(density); 14 apices.initialize(&model );15 apices.initialize(&model.getModel()); 15 16 apices.addAllPointsToList(points); 16 17 if (points.size() < 1) //maybe 1 or 2 points are also not enough for findSizesAndAxesOfPointsGroup() to work... 17 18 { 18 logPrintf("ModelGeometryInfo", "findSizesAndAxesOfModel", LOG_ERROR, "Empty points sample for model with %d part(s)", model.get PartCount());19 logPrintf("ModelGeometryInfo", "findSizesAndAxesOfModel", LOG_ERROR, "Empty points sample for model with %d part(s)", model.getModel().getPartCount()); 19 20 sizes = Pt3D_0; 20 21 axes = Orient_1; … … 65 66 } 66 67 67 double ModelGeometryInfo::volume(const Model & model, const double density)68 double ModelGeometryInfo::volume(const Model &input_model, const double density) 68 69 { 70 SolidsShapeTypeModel model(input_model); 69 71 Pt3D lowerBoundary, upperBoundary; 70 72 boundingBox(model, lowerBoundary, upperBoundary); … … 90 92 } 91 93 92 double ModelGeometryInfo::area(const Model & model, const double density)94 double ModelGeometryInfo::area(const Model &input_model, const double density) 93 95 { 96 SolidsShapeTypeModel model(input_model); 94 97 double area = 0.0; 95 98 96 for (int partIndex = 0; partIndex < model.get PartCount(); partIndex+=1)99 for (int partIndex = 0; partIndex < model.getModel().getPartCount(); partIndex+=1) 97 100 { 98 101 area += externalAreaOfPart(model, partIndex, density);
Note: See TracChangeset
for help on using the changeset viewer.