Ignore:
Timestamp:
12/11/20 20:23:42 (3 years ago)
Author:
oriona
Message:

Part of GeometryTestUtils? functions moved to GeometryUtils?.

File:
1 edited

Legend:

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

    r1032 r1045  
    180180        double calculateSolidVolume(Part *part);
    181181        bool isSolidPartScaleValid(const Part::Shape &partShape, const Pt3D &scale);
     182
     183    /**
     184    * @brief Adds anchor to the specified Model.
     185    * @details An anchor has two functions. First is to provide Model consistency. Some functions in
     186    *     GeometryTestUtils namespace requires Model passed to them as an argument to contain at
     187    *     least one Part. All new Parts are bonded to the rest of Model using Joint connecting them
     188    *     with first Part of Model. Second is to provide reference which helps to understand Model
     189    *     position, scale and orientation. Anchor is built from four Parts: small sphere placed in
     190    *     global coordinate system origin and three cuboids visualising global coordinate system
     191    *     axes.
     192    * @see addAxesToModel.
     193    * @param[in] model Owner of Parts to be created.
     194    */
     195    void addAnchorToModel(Model &model);
     196
     197    /**
     198     * @brief Adds point marker to Model.
     199     * @details Marker of point is a small sphere (radius = 0.05).
     200     * @param[in] point Location of marker.
     201     * @param[in] model Owner of Part to be created, must contain at least one part.
     202     */
     203    void addPointToModel(const Pt3D &point, Model &model);
     204
     205    /**
     206     * @brief Adds axes markers to Model.
     207     * @details Axes markers are three streched (one of scales = 0.5, others = 0.05) and colored
     208     *     cuboids. Cuboid visualising OX axis is red, OY - green, and OZ - blue.
     209     * @param[in] sizes Axes visual lengths.
     210     * @param[in] axes Axes orientation, relatively to global coordinate system axes.
     211     * @param[in] center Axes intersection point, relatively to global coordinate system origin.
     212     * @param[in] model Owner of Parts to be created, must contain at least one part.
     213     */
     214    void addAxesToModel(const Pt3D &sizes, const Orient &axes, const Pt3D &center, Model &model);
     215
     216    /**
     217     * @brief Merges two Models.
     218     * @details Moves all parts from source Model to target Model and - to provide Model
     219     *     consistency - creates Joint between firsts Parts of each of them. Each model must contain
     220     *     at least one Part.
     221     * @param[in] target Target Model, must contain at least one part.
     222     * @param[in] source Source Model, must contain at least one part.
     223     */
     224    void mergeModels(Model &target, Model &source);
     225
     226    /**
     227     * @brief Randomizes position, scale and rotations of Part.
     228     * @details Sets coords of Part position to random values from range (1.5, 2.5), scales to
     229     *     random values from range (0.1, 1.0), and rotations around each axis to random values from
     230     *     range (0, M_PI).
     231     * @param[in] part Part which position, scale and orient should be randomized.
     232     */
     233    void randomizePositionScaleAndOrient(Part *part);
    182234}
    183235
Note: See TracChangeset for help on using the changeset viewer.