Changeset 660 for cpp/frams/model


Ignore:
Timestamp:
04/24/17 18:17:56 (3 years ago)
Author:
Maciej Komosinski
Message:

Model shape conversion no longer requires const Model&

Location:
cpp/frams/model
Files:
4 edited

Legend:

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

    r658 r660  
    77#include <frams/model/geometry/meshbuilder.h>
    88
    9 void ModelGeometryInfo::findSizesAndAxes(const Model &input_model, const double density,
     9void ModelGeometryInfo::findSizesAndAxes(Model &input_model, const double density,
    1010        Pt3D &sizes, Orient &axes)
    1111{
     
    6666}
    6767
    68 double ModelGeometryInfo::volume(const Model &input_model, const double density)
     68double ModelGeometryInfo::volume(Model &input_model, const double density)
    6969{
    7070        SolidsShapeTypeModel model(input_model);
     
    9292}
    9393
    94 double ModelGeometryInfo::area(const Model &input_model, const double density)
     94double ModelGeometryInfo::area(Model &input_model, const double density)
    9595{
    9696        SolidsShapeTypeModel model(input_model);
  • cpp/frams/model/geometry/modelgeometryinfo.h

    r657 r660  
    2424namespace ModelGeometryInfo
    2525{
    26         double area(const Model &model, const double density);
    27         double volume(const Model &model, const double density);
    28         void findSizesAndAxes(const Model &model, const double density, Pt3D &sizes, Orient &axes);
     26        double area(Model &model, const double density);
     27        double volume(Model &model, const double density);
     28        void findSizesAndAxes(Model &model, const double density, Pt3D &sizes, Orient &axes);
    2929
    3030        void boundingBox(const Model &model, Pt3D &lowerBoundary, Pt3D &upperBoundary);
  • cpp/frams/model/model.cpp

    r653 r660  
    13931393}
    13941394
    1395 SolidsShapeTypeModel::SolidsShapeTypeModel(const Model& m, Part::Shape use_shape, float thickness)
     1395SolidsShapeTypeModel::SolidsShapeTypeModel(Model& m, Part::Shape use_shape, float thickness)
    13961396{
    13971397        using_model = converted_model = NULL;
  • cpp/frams/model/model.h

    r611 r660  
    471471public:
    472472        Model *converted_model;
    473         const Model *using_model;
    474         SolidsShapeTypeModel(const Model& m, Part::Shape use_shape = Part::SHAPE_CYLINDER, float thickness = 0.2);
    475         operator const Model&() const { return *using_model; }
    476         const Model& getModel() const { return *using_model; }
     473        Model *using_model;
     474        SolidsShapeTypeModel(Model& m, Part::Shape use_shape = Part::SHAPE_CYLINDER, float thickness = 0.2);
     475        operator Model&() { return *using_model; }
     476        Model& getModel() { return *using_model; }
    477477        ~SolidsShapeTypeModel() { if (converted_model) delete converted_model; }
    478478};
Note: See TracChangeset for help on using the changeset viewer.