Changeset 1118 for cpp/frams/model


Ignore:
Timestamp:
03/31/21 03:05:28 (4 years ago)
Author:
Maciej Komosinski
Message:

Introduced a common constant for default stick thickness when converting "ball-and-stick" models to "solid-shape" models

Location:
cpp/frams/model
Files:
2 edited

Legend:

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

    r1115 r1118  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    389389
    390390        /// build this model using solid shape types, based on the provided ball-and-stick model. See also shapeconvert.cpp.
    391         void buildUsingSolidShapeTypes(const Model &src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0.1);
     391        void buildUsingSolidShapeTypes(const Model &src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = Part::DEFAULT_STICK_RADIUS);
    392392
    393393protected:
     
    442442        Model *converted_model;
    443443        Model *using_model;
    444         SolidsShapeTypeModel(Model &m, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0.2);
     444        SolidsShapeTypeModel(Model &m, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = Part::DEFAULT_STICK_RADIUS);
    445445        operator Model &() { return *using_model; }
    446446        Model &getModel() { return *using_model; }
  • cpp/frams/model/modelparts.h

    r1039 r1118  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    103103        };
    104104        static const char* getShapeName(Shape sh);
     105        static constexpr double DEFAULT_STICK_RADIUS = 0.1; //used in SHAPETYPE_BALL_AND_STICK to SHAPETYPE_SOLIDS Model conversion
    105106
    106107        double mass, size, density, friction, ingest, assim, hollow;
Note: See TracChangeset for help on using the changeset viewer.