Changeset 815


Ignore:
Timestamp:
08/15/18 02:24:10 (6 years ago)
Author:
Maciej Komosinski
Message:

Use double for consistency (using float to store double value of 0.2 would cause imprecision when 0.2f becomes 0.2 in Part shape properties)

Location:
cpp/frams/model
Files:
2 edited

Legend:

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

    r732 r815  
    12301230}
    12311231
    1232 void Model::buildUsingSolidShapeTypes(const Model& src_ballandstick_shapes, Part::Shape use_shape, float thickness)
     1232void Model::buildUsingSolidShapeTypes(const Model& src_ballandstick_shapes, Part::Shape use_shape, double thickness)
    12331233{
    12341234        for (int i = 0; i < src_ballandstick_shapes.getJointCount(); i++)
     
    12751275}
    12761276
    1277 SolidsShapeTypeModel::SolidsShapeTypeModel(Model& m, Part::Shape use_shape, float thickness)
     1277SolidsShapeTypeModel::SolidsShapeTypeModel(Model& m, Part::Shape use_shape, double thickness)
    12781278{
    12791279        using_model = converted_model = NULL;
  • cpp/frams/model/model.h

    r732 r815  
    383383
    384384        /// build this model using solid shape types, based on the provided ball-and-stick model. See also shapeconvert.cpp.
    385         void buildUsingSolidShapeTypes(const Model& src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, float thickness = 0.2);
     385        void buildUsingSolidShapeTypes(const Model& src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0.2);
    386386
    387387protected:
     
    436436        Model *converted_model;
    437437        Model *using_model;
    438         SolidsShapeTypeModel(Model& m, Part::Shape use_shape = Part::SHAPE_CYLINDER, float thickness = 0.2);
     438        SolidsShapeTypeModel(Model& m, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0.2);
    439439        operator Model&() { return *using_model; }
    440440        Model& getModel() { return *using_model; }
Note: See TracChangeset for help on using the changeset viewer.