Extern :
- C3d aggiornamento delle librerie ( 117955).
This commit is contained in:
@@ -238,6 +238,84 @@ MATH_FUNC( void ) FacesMinMaxCurvature( const RPArray<MbFace> & faces,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти точки оболочки, в которых выбранная кривизна принимает наибольшие по модулю значения.
|
||||
\en Find the points of the shell at which the selected curvature takes the most modulo values. \~
|
||||
\details \ru Ищутся точки на оболочке, в которых выбранная кривизна принимают наибольшее положительное и наименьшее отрицательное значение.
|
||||
\en Finds points on the shell at which the selected curvature takes the largest positive and lowest negative values. \~
|
||||
\param[in] faces - \ru Грани оболочки.
|
||||
\en Faces of the shell. \~
|
||||
\param[in] func - \ru Функция расчета кривизны в точке.
|
||||
\en The function of calculating the curvature at a point. \~
|
||||
\param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого).
|
||||
\en The largest in modulus value negative curvature (0, if there is no such). \~
|
||||
\param[out] maxNegFace - \ru Грань, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The face at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxNegLoc - \ru Точка, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The point at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxPosCurv - \ru Наибольшее положительное значение кривизны (0, если нет такого).
|
||||
\en The greatest positive value of curvature (0, if there is no such). \~
|
||||
\param[out] maxPosFace - \ru Грань, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The face at which the curvature takes the most positive value. \~
|
||||
\param[out] maxPosLoc - \ru Точка, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The point at which the curvature takes the most positive value. \~
|
||||
\param[in] borderControl - \ru Учитывать границы граней при поиске экстремумов.
|
||||
\en Take into account the boundaries of the faces when searching for extrema. \~
|
||||
\param[in] method - \ru Алгоритм поиска экстремумов.
|
||||
\en Extremum search algorithm. \~
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
MATH_FUNC( void ) FacesMinMaxCurvature( const c3d::ConstFacesVector & faces,
|
||||
SurfaceFunction func,
|
||||
double & maxNegCurv,
|
||||
const MbFace *& maxNegFace,
|
||||
MbCartPoint & maxNegLoc,
|
||||
double & maxPosCurv,
|
||||
const MbFace *& maxPosFace,
|
||||
MbCartPoint & maxPosLoc,
|
||||
bool borderControl = false,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти точки оболочки, в которых выбранная кривизна принимает наибольшие по модулю значения.
|
||||
\en Find the points of the shell at which the selected curvature takes the most modulo values. \~
|
||||
\details \ru Ищутся точки на оболочке, в которых выбранная кривизна принимают наибольшее положительное и наименьшее отрицательное значение.
|
||||
\en Finds points on the shell at which the selected curvature takes the largest positive and lowest negative values. \~
|
||||
\param[in] faces - \ru Грани оболочки.
|
||||
\en Faces of the shell. \~
|
||||
\param[in] func - \ru Функция расчета кривизны в точке.
|
||||
\en The function of calculating the curvature at a point. \~
|
||||
\param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого).
|
||||
\en The largest in modulus value negative curvature (0, if there is no such). \~
|
||||
\param[out] maxNegFace - \ru Грань, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The face at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxNegLoc - \ru Точка, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The point at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxPosCurv - \ru Наибольшее положительное значение кривизны (0, если нет такого).
|
||||
\en The greatest positive value of curvature (0, if there is no such). \~
|
||||
\param[out] maxPosFace - \ru Грань, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The face at which the curvature takes the most positive value. \~
|
||||
\param[out] maxPosLoc - \ru Точка, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The point at which the curvature takes the most positive value. \~
|
||||
\param[in] borderControl - \ru Учитывать границы граней при поиске экстремумов.
|
||||
\en Take into account the boundaries of the faces when searching for extrema. \~
|
||||
\param[in] method - \ru Алгоритм поиска экстремумов.
|
||||
\en Extremum search algorithm. \~
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
MATH_FUNC( void ) FacesMinMaxCurvature( const c3d::ConstFacesSPtrVector & faces,
|
||||
SurfaceFunction func,
|
||||
double & maxNegCurv,
|
||||
const MbFace *& maxNegFace,
|
||||
MbCartPoint & maxNegLoc,
|
||||
double & maxPosCurv,
|
||||
const MbFace *& maxPosFace,
|
||||
MbCartPoint & maxPosLoc,
|
||||
bool borderControl = false,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти точки на поверхности, в которых главные нормальные кривизны принимают наибольшие по модулю значения.
|
||||
\en Find the points on the surface at which the major normal curvatures take the largest values in the module. \~
|
||||
@@ -301,6 +379,78 @@ MATH_FUNC( void ) FacesMinMaxCurvature( const RPArray<MbFace> & faces,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти точки на оболочке, в которых главные нормальные кривизны принимают наибольшие по модулю значения.
|
||||
\en Find the points on the shell at which the major normal curvatures take the largest values in the module. \~
|
||||
\details \ru Ищутся точки на оболочке, в которых главные нормальные кривизны принимают наибольшее положительное и наименьшее отрицательное значение.
|
||||
\en Looks for points on the shell at which the major normal curvatures take the largest positive and smallest negative values. \~
|
||||
\param[in] faces - \ru Грани оболочки.
|
||||
\en Faces of the shell. \~
|
||||
\param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого).
|
||||
\en The largest in modulus value negative curvature (0, if there is no such). \~
|
||||
\param[out] maxNegFace - \ru Грань, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The face at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxNegLoc - \ru Точка, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The point at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxPosCurv - \ru Наибольшее положительное значение кривизны (0, если нет такого).
|
||||
\en The greatest positive value of curvature (0, if there is no such). \~
|
||||
\param[out] maxPosFace - \ru Грань, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The face at which the curvature takes the most positive value. \~
|
||||
\param[out] maxPosLoc - \ru Точка, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The point at which the curvature takes the most positive value. \~
|
||||
\param[in] borderControl - \ru Учитывать границы граней при поиске экстремумов.
|
||||
\en Take into account the boundaries of the faces when searching for extrema. \~
|
||||
\param[in] method - \ru Алгоритм поиска экстремумов.
|
||||
\en Extremum search algorithm. \~
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
MATH_FUNC( void ) FacesMinMaxCurvature( const c3d::ConstFacesVector & faces,
|
||||
double & maxNegCurv,
|
||||
const MbFace *& maxNegFace,
|
||||
MbCartPoint & maxNegLoc,
|
||||
double & maxPosCurv,
|
||||
const MbFace *& maxPosFace,
|
||||
MbCartPoint & maxPosLoc,
|
||||
bool borderControl = false,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти точки на оболочке, в которых главные нормальные кривизны принимают наибольшие по модулю значения.
|
||||
\en Find the points on the shell at which the major normal curvatures take the largest values in the module. \~
|
||||
\details \ru Ищутся точки на оболочке, в которых главные нормальные кривизны принимают наибольшее положительное и наименьшее отрицательное значение.
|
||||
\en Looks for points on the shell at which the major normal curvatures take the largest positive and smallest negative values. \~
|
||||
\param[in] faces - \ru Грани оболочки.
|
||||
\en Faces of the shell. \~
|
||||
\param[out] maxNegCurv - \ru Наибольшее по модулю отрицательное значение кривизны (0, если нет такого).
|
||||
\en The largest in modulus value negative curvature (0, if there is no such). \~
|
||||
\param[out] maxNegFace - \ru Грань, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The face at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxNegLoc - \ru Точка, в которой кривизна принимает наибольшее по модулю отрицательное значение.
|
||||
\en The point at which the curvature takes the largest in modulus negative value. \~
|
||||
\param[out] maxPosCurv - \ru Наибольшее положительное значение кривизны (0, если нет такого).
|
||||
\en The greatest positive value of curvature (0, if there is no such). \~
|
||||
\param[out] maxPosFace - \ru Грань, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The face at which the curvature takes the most positive value. \~
|
||||
\param[out] maxPosLoc - \ru Точка, в которой кривизна принимает наибольшее положительное значение.
|
||||
\en The point at which the curvature takes the most positive value. \~
|
||||
\param[in] borderControl - \ru Учитывать границы граней при поиске экстремумов.
|
||||
\en Take into account the boundaries of the faces when searching for extrema. \~
|
||||
\param[in] method - \ru Алгоритм поиска экстремумов.
|
||||
\en Extremum search algorithm. \~
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
MATH_FUNC( void ) FacesMinMaxCurvature( const c3d::ConstFacesSPtrVector & faces,
|
||||
double & maxNegCurv,
|
||||
const MbFace *& maxNegFace,
|
||||
MbCartPoint & maxNegLoc,
|
||||
double & maxPosCurv,
|
||||
const MbFace *& maxPosFace,
|
||||
MbCartPoint & maxPosLoc,
|
||||
bool borderControl = false,
|
||||
MbeExtremsSearchingMethod method = esm_LineSegregation );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Ориентированная кривизна для плоской кривой.
|
||||
\en Oriented curvature for a plane curve. \~
|
||||
|
||||
+78
-19
@@ -3,15 +3,11 @@
|
||||
\file
|
||||
\brief \ru Методы прямого редактирования тел.
|
||||
\en Functions for direct editing of solids. \~
|
||||
\details \ru Прямое моделирование позволяет редактировать и создавать подобные тела
|
||||
путём непосредственной модификации элементов уже построенных тел. \n
|
||||
Представленные ниже функции пока не доведены до коммерческого состояния
|
||||
и позволяют лишь познакомиться с будущими возможностями геометрического ядра.
|
||||
\en The direct modeling allows to edit and to create similar solids
|
||||
by direct modification of elements of already constructed solids. \n
|
||||
The following functions do not conform to the state of a commercial product yet
|
||||
and allows just to acquaint oneself with the future features of the geometrical kernel. \~
|
||||
|
||||
\details
|
||||
\ru Прямое моделирование позволяет редактировать и создавать подобные тела
|
||||
путём непосредственной модификации элементов уже построенных тел.\n
|
||||
\en The direct modeling allows to edit and to create similar solids
|
||||
by direct modification of elements of already constructed solids.\n\~
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -20,21 +16,31 @@
|
||||
|
||||
|
||||
#include <templ_s_array.h>
|
||||
#include <mb_cart_point3d.h>
|
||||
#include <space_item.h>
|
||||
#include <op_shell_parameter.h>
|
||||
#include <topology_faceset.h>
|
||||
#include <mb_operation_result.h>
|
||||
|
||||
#include <templ_array2.h>
|
||||
#include <templ_rp_array.h>
|
||||
#include <hash32.h>
|
||||
#include <mb_enum.h>
|
||||
#include <op_direct_mod_parameter.h>
|
||||
|
||||
class MATH_CLASS MbCartPoint3D;
|
||||
class MATH_CLASS MbCurve;
|
||||
class MATH_CLASS MbCurve3D;
|
||||
class MATH_CLASS MbSurface;
|
||||
class MATH_CLASS MbSplineSurface;
|
||||
class MATH_CLASS MbCurveEdge;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbSolid;
|
||||
class MATH_CLASS MbFaceShell;
|
||||
class MATH_CLASS MbModifiedSolidParams;
|
||||
class MATH_CLASS MbModifiedSolidResults;
|
||||
class MATH_CLASS MbPlacement3D;
|
||||
class MATH_CLASS MbSNameMaker;
|
||||
class MATH_CLASS MbSolid;
|
||||
class MATH_CLASS MbSplineSurface;
|
||||
class MATH_CLASS MbSurface;
|
||||
class MATH_CLASS MbSurfaceIntersectionCurve;
|
||||
|
||||
struct MATH_CLASS ModifyValues;
|
||||
struct MATH_CLASS NurbsBlockValues;
|
||||
struct MATH_CLASS NurbsValues;
|
||||
struct MATH_CLASS TransformValues;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -101,6 +107,56 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Модифицировать или построить тело методами прямого моделирования.
|
||||
\en Modify a solid by the methods of direct modeling. \~
|
||||
\details \ru В зависимости от параметров модификации #MbModifiedSolidParams метод выполняет одно из следующих действий: \n
|
||||
1. Удаление из тела выбранных граней с окружением (dmt_Remove). \n
|
||||
2. Создание тела из выбранных граней с окружением (dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (dmt_Action). \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса) (dmt_Offset). \n
|
||||
5. Изменение радиуса выбранных граней скругления (dmt_FilletChange). \n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования (dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (dmt_Purify). \n
|
||||
8. Слияние вершин ребёр и удаление рёбер (dmt_Merger). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (dmt_United). \n
|
||||
10. Поворот выбранных граней (dmt_Rotate). \n
|
||||
11. Удаление из тела скруглений определённого радиуса (dmt_PurifyRange).\n
|
||||
Одновременно с построением оболочки функция создаёт её строитель.\n
|
||||
\en The method performs one of the following actions depending on the parameter #MbModifiedSolidParams: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (dmt_Remove). \n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (dmt_Action). \n
|
||||
4. Replacement of the specified faces by offset faces (dmt_Offset). \n
|
||||
5. Radius change of the specified fillet faces (dmt_FilletChange). \n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (dmt_Purify). \n
|
||||
8. Edge vertices merging and edges removal (dmt_Merger). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (dmt_United). \n
|
||||
10. Rotation of the chosen faces (dmt_Rotate). \n
|
||||
11. Remove the fillets with specific radius from a solid (dmt_PurifyRange).\n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
\param[in] solid - \ru Исходное тело.
|
||||
\en The initial solid. \~
|
||||
\param[in] sameShell - \ru Режим копирования исходного тела.
|
||||
\en The mode of copying of the initial solid. \~
|
||||
\param[in] params - \ru Параметры модификации.
|
||||
\en Parameters of the modification. \~
|
||||
\param[out] results - \ru Результаты модификации.
|
||||
\en Results of the modifcation. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Direct_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) ModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbModifiedSolidParams & params,
|
||||
MbModifiedSolidResults & results );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Модифицировать или построить тело методами прямого моделирования.
|
||||
\en Modify a solid by the methods of direct modeling. \~
|
||||
\deprecated \ru Метод устарел и будет удален в версии 2024.
|
||||
\en The method is deprecated and will be removed in version 2024. \~
|
||||
\details \ru В зависимости от параметров модификации #ModifyValues метод выполняет одно из следующих действий: \n
|
||||
1. Удаление из тела выбранных граней с окружением (param.way==dmt_Remove). \n
|
||||
2. Создание тела из выбранных граней с окружением (param.way==dmt_Create). \n
|
||||
@@ -138,6 +194,7 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
\ingroup Direct_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( ModifiedSolid with MbModifiedSolidParams )
|
||||
MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & params,
|
||||
@@ -148,6 +205,8 @@ MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Модифицировать или построить тело методами прямого моделирования.
|
||||
\en Modify a solid by the methods of direct modeling. \~
|
||||
\deprecated \ru Метод устарел и будет удален в версии 2024.
|
||||
\en The method is deprecated and will be removed in version 2024. \~
|
||||
\details \ru Метод выполняет удаление указанных рёбер, слияние их вершин и модификацию окружающих граней (param.way==dmt_Merger).
|
||||
По направлению вектора "param.direction" определяется: начальная ли вершина ребра будет слита с конечной вершиной, или конечная вершина ребра будет слита с начальной вершиной. \n
|
||||
\en The method performs the deletion of selectsd edges, merging their vertices and modification of surrounding faces (param.way==dmt_Merger).
|
||||
@@ -169,7 +228,7 @@ MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
|
||||
\ingroup Direct_Modeling
|
||||
*/
|
||||
// ---
|
||||
|
||||
//DEPRECATE_DECLARE_REPLACE( ModifiedSolid with MbModifiedSolidParams )
|
||||
MATH_FUNC (MbResultType) EdgeModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & params,
|
||||
|
||||
@@ -35,6 +35,8 @@ class MATH_CLASS MbConvexHullParams3D;
|
||||
class MATH_CLASS MbMeshToInstanceParams;
|
||||
class MATH_CLASS MbMeshToInstanceResults;
|
||||
class MATH_CLASS MbOrientedBox;
|
||||
class MATH_CLASS MbMeshUnwrapParams;
|
||||
class MATH_CLASS MbMeshUnwrapResult;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Данные диагностики полигонального объекта.
|
||||
@@ -720,4 +722,24 @@ MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMesh & mesh, const MbM
|
||||
*/ // ---
|
||||
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMeshSimplificationParams & params, MbMesh & mesh );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Построение развёртки сетки на плоскость.
|
||||
\en Construct a unwrapping the mesh on a plane. \~
|
||||
\details \ru Построение развёртки сетки на плоскость.
|
||||
\en Construct a unwrapping the mesh on a plane. \~
|
||||
\param[in] params - \ru Параметры алгоритма. Перед вызовом необходимо у параметров вызвать метод InitBaseMesh и (опционально) InitRemeshedMesh. Если есть ремешированная сетка,
|
||||
работает с ней, иначе с базовой.
|
||||
\en The parameters. It is necessary to call method InitBaseMesh and (optionally) InitRemeshedMesh. If remeshed mesh exists,
|
||||
we will work on it, otherwise on base mesh. \~
|
||||
\param[out] results - \ru Результат операции. Содержит в себе копию сетки из параметров, содержащую 2Д параметры, соответствующие развертке.
|
||||
\en The operation result. Contains the copy of the mesh from parameters with filled 2D coordinates in according to unwrapped result. \~
|
||||
\return \ru Код результата операции.
|
||||
\en Returns the operation result code. \n
|
||||
\ingroup Polygonal_Objects
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) UnwrapMesh( const MbMeshUnwrapParams & params, MbMeshUnwrapResult & results );
|
||||
#endif // __ACTION_MESH_H
|
||||
|
||||
@@ -1023,7 +1023,7 @@ MATH_FUNC( MbResultType ) LoftedResult( const c3d::SolidSPtr & srcSolid,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
|
||||
MATH_FUNC( MbResultType ) LoftedResult( MbSolid & srcSolid,
|
||||
MbeCopyMode copyMode,
|
||||
SArray<MbPlacement3D> & places,
|
||||
@@ -1081,7 +1081,7 @@ MATH_FUNC( MbResultType ) LoftedResult( MbSolid & srcSolid,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( LoftedResult with 'MbLoftedSolidParams' argument )
|
||||
MATH_FUNC( MbResultType ) LoftedResult( MbSolid & srcSolid,
|
||||
MbeCopyMode copyMode,
|
||||
RPArray<MbSurface> & surfaces,
|
||||
@@ -1626,7 +1626,7 @@ MATH_FUNC (MbResultType) SplitSolid( MbSolid & solid,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidParams' argument )
|
||||
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbPlacement3D & neutralPlace,
|
||||
@@ -1656,12 +1656,37 @@ MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidResult' argument )
|
||||
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbDraftSolidParams & draftParams,
|
||||
c3d::SolidSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Уклонить указанные грани тела.
|
||||
\en Slope the specified faces of the solid. \~
|
||||
\details \ru Уклонить указанные грани тела от нейтральной изоплоскости или нейтральных ребер на заданный угол. \n
|
||||
\en Slope the specified faces of the solid at the specified angle relative to the neutral isoplane or neutral edges. \n \~
|
||||
\param[in] solid - \ru Исходное тело.
|
||||
\en The source solid. \~
|
||||
\param[in] sameShell - \ru Режим копирования входного тела.
|
||||
\en Whether to copy the input solid. \~
|
||||
\param[in] draftParams - \ru Параметры уклона.
|
||||
\en Draft parameters. \~
|
||||
\param[out] result - \ru Результаты построения тела уклона.
|
||||
\en Results of creating a draft's solid. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbDraftSolidParams & draftParams,
|
||||
MbDraftSolidResults & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Выполнить объединение пересекающихся тел.
|
||||
\en Perform the union of intersecting solids. \~
|
||||
@@ -2170,7 +2195,7 @@ MATH_FUNC (MbResultType) HoleSolid( const c3d::SolidSPtr & solid,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( ShellPart with MbShellPartParams )
|
||||
DEPRECATE_DECLARE_REPLACE( ShellPart with MbShellPartParams )
|
||||
MATH_FUNC (MbResultType) ShellPart( const MbSolid & solid,
|
||||
size_t id,
|
||||
const MbPath & path,
|
||||
@@ -2247,7 +2272,7 @@ MATH_FUNC (MbResultType) DuplicationSolid( const MbSolid & soli
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE(IngotSolid with MbIngotSolidParams)
|
||||
DEPRECATE_DECLARE_REPLACE(IngotSolid with MbIngotSolidParams)
|
||||
MATH_FUNC (MbResultType) IngotSolid( RPArray<MbItem> & solids,
|
||||
bool makeCopy,
|
||||
const MbSNameMaker & names,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <attr_common_attribute.h>
|
||||
#include <topology.h>
|
||||
#include <mb_placement3d.h>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Родительский класс атрибутов изделий.
|
||||
\en Base calss of product attributes.
|
||||
\en Base class of product attributes.
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbProductAttribute : public MbAttribute {
|
||||
|
||||
@@ -21,18 +21,28 @@
|
||||
\en Interface of configuration selection. \~
|
||||
\details \ru Вызывается при импорте однократно, если импортируемоя модель содержит более одной конфигурации.
|
||||
\en Called on import once if the model contains contains more than one configurations. \~
|
||||
\note \ru ЭКСПЕРИМЕНТАЛЬНАЯ.
|
||||
\en EXPEREIMENTAL. \~
|
||||
*/
|
||||
// ---
|
||||
class IConfigurationSelector : public MbRefItem
|
||||
{
|
||||
public:
|
||||
// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
IConfigurationSelector() = default;
|
||||
|
||||
// \ru Деструктор. \en Destructor.
|
||||
virtual ~IConfigurationSelector() = default;
|
||||
|
||||
// \ru Добавить конфигурацию для выбора пользователем. \en Add configuration for selection by user.
|
||||
virtual void AddConfiguration ( const c3d::string_t& configurationName ) = 0;
|
||||
|
||||
// \ru Указать индекс активной конфигурации. \en Specify the index of active configuration.
|
||||
virtual void SetActiveConfiguration ( const size_t index ) = 0;
|
||||
|
||||
// \ru Получить индекс конфигурации выбранной пользователем. \en Get index of configuration chosen by user.
|
||||
virtual size_t GetConfiguration () const = 0;
|
||||
|
||||
// \ru Индекс конфигурации для прекращения чтения по запросу пользователя. \en Index which should be returned if user canceled import.
|
||||
static const size_t configurationIdToCancel = SYS_MAX_T;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,61 @@
|
||||
class MATH_CLASS MbEvolutionShellParams;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Направляющая кинематической операции.
|
||||
\en Spine for sweep operation. \~
|
||||
\details \ru Направляющая кинематической операции. Кривая или проволочный каркас. \n
|
||||
\en Spine for sweep operation. Curve or wireFrame \n \~
|
||||
\ingroup Surface_Modeling
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbSpineData {
|
||||
private:
|
||||
SPtr<MbCurve3D> _spineCurve; ///< \ru Направляющая кривая. \en Spine curve.
|
||||
SPtr<MbWireFrame> _spineFrame; ///< \ru Направляющая кривая в виде проволочного каркаса. \en Spine curve as a wire frame. \~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по кривой. \en Constructor by curve.
|
||||
MbSpineData( const MbCurve3D & spineCurve )
|
||||
:_spineCurve( static_cast<MbCurve3D *>(&spineCurve.Duplicate()) )
|
||||
,_spineFrame( nullptr ) {}
|
||||
|
||||
/// \ru Конструктор по каркасу. \en Constructor by wire frame.
|
||||
MbSpineData( const MbWireFrame & spineFrame )
|
||||
:_spineCurve( nullptr )
|
||||
,_spineFrame( static_cast<MbWireFrame *>(&spineFrame.Duplicate()) ) {}
|
||||
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbSpineData();
|
||||
/// \ru конструктор-копия. \en Copy constructor.
|
||||
MbSpineData( const MbSpineData & init, MbRegDuplicate * ireg );
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbSpineData() {}
|
||||
|
||||
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ); ///< \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix
|
||||
void Move ( const MbVector3D &, MbRegTransform * = nullptr ); ///< \ru Сдвиг \en Translation
|
||||
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ); ///< \ru Повернуть вокруг оси \en Rotate around an axis
|
||||
void GetProperties( MbProperties & ); ///< \ru Выдать свойства объекта \en Get properties of the object
|
||||
void SetProperties( const MbProperties & ); ///< \ru Записать свойства объекта \en Set properties of the object
|
||||
void GetBasisItems ( RPArray<MbSpaceItem> & s ); ///< \ru Дать базовые объекты \en Get the base objects
|
||||
bool IsSame( const MbSpineData &, double accuracy ) const; ///< \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSimilar( const MbSpineData & ) const; ///< \ru Являются ли объекты подобными \en Whether the objects are similar
|
||||
bool SetEqual ( const MbSpineData & ); ///< \ru Сделать равным \en Make equal
|
||||
|
||||
/// \ru Перестроить объект по журналу построения. Для перестроения проволочного каркаса. \en Rebuild object according to the history tree. For rebuilding the wire frame.
|
||||
void RebuildItem();
|
||||
|
||||
/// \ru Получить направляющую кривую. \en Get the spine curve. \~
|
||||
const MbCurve3D * GetSpineCurve() const { return _spineCurve; }
|
||||
|
||||
/// \ru Получить направляющую кривую в виде проволочного каркаса. \en Get the spine curve as a wire frame. \~
|
||||
const MbWireFrame * GetSpineFrame() const { return _spineFrame; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbSpineData )
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbSpineData )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель оболочки кинематического тела.
|
||||
\en Constructor of shell of evolution solid. \~
|
||||
@@ -29,7 +84,7 @@ class MATH_CLASS MbEvolutionShellParams;
|
||||
class MATH_CLASS MbCurveEvolutionSolid : public MbCurveSweptSolid {
|
||||
protected :
|
||||
MbSweptData sweptData; ///< \ru Данные об образующей. \en Generating curve data.
|
||||
SPtr<MbCurve3D> spineCurve; ///< \ru Направляющая кривая. \en Spine curve.
|
||||
MbSpineData spineData; ///< \ru Данные о направляющей кривой. \en Spine curve data.
|
||||
SPtr<MbCurve3D> directionCurve; ///< \ru Кривая вектора ориентации матрицы преобразования (может быть nullptr для простой траектории). \en A curve of the transformation matrix orientation (it may be nullptr for a simple trajectory).
|
||||
MbVector3D direction; ///< \ru Вектор ориентации матрицы преобразования (может быть нулевой, в случае автоопределения). \en Vector of transformation matrix orientation (it's equal zero in the mode of automatic direction calculation).
|
||||
SPtr<MbSNameMaker> spineNames; ///< \ru Именователь направляющей. \en An object defining the name of the spine curve.
|
||||
@@ -93,6 +148,33 @@ public :
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineNames_ );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по смешанной образующей.
|
||||
\en Constructor by combined generating curve. \~
|
||||
\param[in] sweptData_ - \ru Образующая.
|
||||
\en Generating curve. \~
|
||||
\param[in] spineFrame_ - \ru Направляющая кривая в виде проволочного каркаса.
|
||||
\en The spine curve as a wire frame. \~
|
||||
\param[in] params - \ru Параметры кинематической операции.
|
||||
\en Parameters of the sweeping operation. \~
|
||||
\param[in] oType - \ru Тип булевой операции с предыдущим результатом.
|
||||
\en Type of Boolean operation with the previous result. \~
|
||||
\param[in] operNames - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Имена контуров образующей для именования граней.
|
||||
\en Generatrix contours' names for naming faces. \~
|
||||
\param[in] spineNames - \ru Имена направляющей.
|
||||
\en Generating curve names. \~
|
||||
*/
|
||||
MbCurveEvolutionSolid( const MbSweptData & sweptData_,
|
||||
const MbWireFrame & spineFrame_,
|
||||
const EvolutionValues & params,
|
||||
OperationType oType,
|
||||
const MbSNameMaker & operNames,
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineNames_ );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по смешанной образующей.
|
||||
|
||||
@@ -110,7 +110,7 @@ IMPL_PERSISTENT_OPS( MbExtensionShell )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( ExtensionShellShell with MbExtensionShellParams )
|
||||
DEPRECATE_DECLARE_REPLACE( ExtensionShellShell with MbExtensionShellParams )
|
||||
MATH_FUNC (MbCreator *) CreateExtensionShell( MbFaceShell * solid,
|
||||
MbeCopyMode sameShell,
|
||||
const RPArray<MbCurveEdge> & edges,
|
||||
|
||||
@@ -181,7 +181,7 @@ MbFaceShell * MakeJoinShell( const MbSurfaceCurve & curve1,
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
|
||||
MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
|
||||
MbSurfaceCurve & curve2,
|
||||
JoinSurfaceValues & parameters,
|
||||
@@ -228,7 +228,7 @@ MATH_FUNC (MbCreator *) CreateJoinShell( MbSurfaceCurve & curve1,
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateJoinShell with MbJoinShellParams )
|
||||
MATH_FUNC (MbCreator *) CreateJoinShell( const RPArray<MbCurveEdge> & edges1,
|
||||
const SArray<bool> & orients1,
|
||||
const RPArray<MbCurveEdge> & edges2,
|
||||
|
||||
@@ -97,7 +97,7 @@ IMPL_PERSISTENT_OPS( MbMeshShell )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateMeshShell with MbMeshShellParameters )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateMeshShell with MbMeshShellParameters )
|
||||
MATH_FUNC (MbCreator *) CreateMeshShell( MeshSurfaceValues & parameters,
|
||||
const MbSNameMaker & operNames,
|
||||
bool isPhantom,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <creator.h>
|
||||
#include <op_shell_parameter.h>
|
||||
#include <op_direct_mod_parameter.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -35,30 +36,32 @@
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFaceModifiedSolid : public MbCreator {
|
||||
private:
|
||||
MbVector3D _direction; ///< \ru Для обратной совместимости с dmt_Merger. \en For backward compatability with dmt_Merger.
|
||||
protected: // \ru Данные класса. \en Data of class.
|
||||
ModifyValues parameters; ///< \ru Параметры редактирования оболочки. \en Shell editing parameters.
|
||||
SArray<MbItemIndex> faceIndices; ///< \ru Идентификаторы модифицированных граней. \en Identifiers of the modified faces.
|
||||
SArray<MbEdgeFacesIndexes> edgeIndices; ///< \ru Идентификаторы модифицированных рёбер. \en Identifiers of the modified edges.
|
||||
RPArray<MbSurface> surfaces; ///< \ru Массив-указателей на nurbs поверхности граней. \en Array of pointers to NURBS surfaces of the faces.
|
||||
MbModifiedSolidParams _parameters; ///< \ru Параметры редактирования оболочки. \en Shell editing parameters.
|
||||
|
||||
public:
|
||||
// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbFaceModifiedSolid( const ModifyValues & p, const SArray<MbItemIndex> & faces,
|
||||
RPArray<MbSurface> & surfs, const MbSNameMaker & names );
|
||||
// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbFaceModifiedSolid( const ModifyValues & p, const SArray<MbEdgeFacesIndexes> edges,
|
||||
const MbSNameMaker & names );
|
||||
private:
|
||||
// \ru Конструктор дублирующий. \en Duplicating constructor.
|
||||
MbFaceModifiedSolid( const MbFaceModifiedSolid & init, MbRegDuplicate * ireg );
|
||||
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
|
||||
MbFaceModifiedSolid( const MbFaceModifiedSolid & init );
|
||||
|
||||
public: // \ru Деструктор \en Destructor
|
||||
public:
|
||||
// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
//DEPRECATE_DECLARE_REPLACE( MbFaceModifiedSolid with MbModifiedSolidParams )
|
||||
MbFaceModifiedSolid( const ModifyValues & p, const SArray<MbItemIndex> & faces,
|
||||
RPArray<MbSurface> & surfs, const MbSNameMaker & names );
|
||||
// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
//DEPRECATE_DECLARE_REPLACE( MbFaceModifiedSolid with MbModifiedSolidParams )
|
||||
MbFaceModifiedSolid( const ModifyValues & p, const SArray<MbEdgeFacesIndexes> edges,
|
||||
const MbSNameMaker & names );
|
||||
|
||||
// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbFaceModifiedSolid( const MbModifiedSolidParams & params );
|
||||
|
||||
// \ru Деструктор \en Destructor
|
||||
~MbFaceModifiedSolid();
|
||||
|
||||
public:
|
||||
|
||||
// \ru Общие функции математического объекта \en Common functions of the mathematical object
|
||||
|
||||
MbeCreatorType IsA() const override; // \ru Тип элемента \en A type of element
|
||||
@@ -76,25 +79,21 @@ public:
|
||||
void SetBasisPoints( const MbControlData3D & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
|
||||
|
||||
/// \ru Построение оболочки \en Creation of a shell
|
||||
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
|
||||
RPArray<MbSpaceItem> * items = nullptr ) override;
|
||||
bool CreateShell( MbFaceShell *& shell,
|
||||
MbeCopyMode sameShell,
|
||||
RPArray<MbSpaceItem> * = nullptr ) override;
|
||||
void Refresh( MbFaceShell & outer ) override; ///< \ru Обновить форму оболочки \en Update shape of the shell
|
||||
|
||||
// \ru Дать параметры. \en Get the parameters.
|
||||
void GetParameters( ModifyValues & params ) const { params = parameters; }
|
||||
//DEPRECATE_DECLARE
|
||||
void GetParameters ( ModifyValues & params ) const;
|
||||
// \ru Установить параметры. \en Set the parameters.
|
||||
void SetParameters( const ModifyValues & params ) { parameters = params; }
|
||||
//DEPRECATE_DECLARE
|
||||
void SetParameters ( const ModifyValues & params );
|
||||
|
||||
void GetFaceIndices( SArray<MbItemIndex> & faces ) const { faces = faceIndices; } // \ru Идентификаторы модифицированных граней. \en Identifiers of the modified faces.
|
||||
void GetEdgeIndices( SArray<MbEdgeFacesIndexes> & edges ) const { edges = edgeIndices; } // \ru Идентификаторы модифицированных рёбер. \en Identifiers of the modified edges.
|
||||
|
||||
private:
|
||||
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
|
||||
void operator = ( const MbFaceModifiedSolid & );
|
||||
void SurfacesFree(); // \ru Удалить поверхности \en Delete the surfaces
|
||||
void SurfacesAddRef(); // \ru Учесть поверхности \en Consider the surfaces
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFaceModifiedSolid )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFaceModifiedSolid )
|
||||
OBVIOUS_PRIVATE_COPY( MbFaceModifiedSolid )
|
||||
}; // MbFaceModifiedSolid
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbFaceModifiedSolid )
|
||||
@@ -129,6 +128,8 @@ IMPL_PERSISTENT_OPS( MbFaceModifiedSolid )
|
||||
9. Replacement of the smoothly joined faces with a single face (param.way==dmt_United). \n
|
||||
10. Rotation of the chosen faces (param.way==dmt_Rotate). \n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
\deprecated \ru Метод устарел и будет удален в версии 2024.
|
||||
\en The method is deprecated and will be removed in version 2024. \~
|
||||
\param[in] outer - \ru Исходная оболочка.
|
||||
\en The source shell. \~
|
||||
\param[in] sameShell - \ru Режим копирования исходной оболочки.
|
||||
@@ -150,6 +151,7 @@ IMPL_PERSISTENT_OPS( MbFaceModifiedSolid )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE
|
||||
MATH_FUNC (MbCreator *) CreateFaceModifiedSolid( MbFaceShell * outer,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & parameters,
|
||||
@@ -158,6 +160,4 @@ MATH_FUNC (MbCreator *) CreateFaceModifiedSolid( MbFaceShell * ou
|
||||
const MbSNameMaker & names,
|
||||
MbResultType & res,
|
||||
MbFaceShell *& shell );
|
||||
|
||||
|
||||
#endif // __CR_MODIFIED_SOLID_H
|
||||
|
||||
@@ -108,7 +108,7 @@ IMPL_PERSISTENT_OPS( MbNurbsSurfacesSolid )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateNurbsShell with MbNurbsSurfacesShellParams )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateNurbsShell with MbNurbsSurfacesShellParams )
|
||||
MATH_FUNC (MbCreator *) CreateNurbsShell( NurbsSurfaceValues & parameters,
|
||||
const MbSNameMaker & operNames,
|
||||
bool isPhantom,
|
||||
|
||||
@@ -103,7 +103,7 @@ IMPL_PERSISTENT_OPS( MbRuledShell )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateRuledShell with MbRuledShellParams )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateRuledShell with MbRuledShellParams )
|
||||
MATH_FUNC (MbCreator *) CreateRuledShell( RuledSurfaceValues & parameters,
|
||||
const MbSNameMaker & operNames,
|
||||
bool isPhantom,
|
||||
|
||||
@@ -105,7 +105,7 @@ IMPL_PERSISTENT_OPS( MbBuildSheetMetalSolid )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( ConvertShellToSheetMetall with 'MbSolidToSheetMetalParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( ConvertShellToSheetMetall with 'MbSolidToSheetMetalParams' argument )
|
||||
MATH_FUNC (MbCreator *) ConvertShellToSheetMetall( MbFaceShell * initialShell,
|
||||
const MbeCopyMode sameShell,
|
||||
const MbFace & initFace,
|
||||
|
||||
@@ -93,7 +93,7 @@ IMPL_PERSISTENT_OPS( MbNormalizeHolesSolid )
|
||||
\ingroup Sheet_Metal_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( NormalizeHolesSides with 'MbNormalizeCutSidesParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( NormalizeHolesSides with 'MbNormalizeCutSidesParams' argument )
|
||||
MATH_FUNC (MbCreator *) NormalizeHolesSides ( MbFaceShell *& initialShell,
|
||||
const MbeCopyMode sameShell,
|
||||
const MbSNameMaker & nameMaker,
|
||||
|
||||
@@ -158,7 +158,7 @@ MATH_FUNC (c3d::CreatorSPtr) CreateSheetRib( const c3d::ShellSPtr & solid
|
||||
//------------------------------------------------------------------------------
|
||||
// Построение элементов ребра жёсткости.
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateSheetRibParts with MbSheetRibSolidParams )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateSheetRibParts with MbSheetRibSolidParams )
|
||||
MATH_FUNC (MbResultType) CreateSheetRibParts( MbFaceShell * solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbPlacement3D & place,
|
||||
|
||||
@@ -134,7 +134,7 @@ IMPL_PERSISTENT_OPS( MbStampSolid )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateStamp with 'MbStampParams' argument )
|
||||
DEPRECATE_DECLARE_REPLACE( CreateStamp with 'MbStampParams' argument )
|
||||
MATH_FUNC (MbCreator *) CreateStamp( SPtr<MbFaceShell> & initialShell, // исходная оболочка
|
||||
const MbeCopyMode sameShell, // флаг способа использования исходной оболочки
|
||||
const MbFace * face, // грань штамповки
|
||||
|
||||
+1
-17
@@ -59,22 +59,6 @@ private:
|
||||
\{
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Состояние определенности системы геометрических ограничений.
|
||||
\en Difinition State of geometric constraints system.
|
||||
*/ //---
|
||||
typedef enum
|
||||
{
|
||||
GCE_STATE_Unknown = 0 ///< \ru О состоянии ничего не известно. \en State is unknown.
|
||||
, GCE_STATE_WellConstrained ///< \ru Полностью определенная система - все степени свободы нулевые. \en Well-constrained system: all degrees of freedom are zero.
|
||||
, GCE_STATE_UnderConstrained ///< \ru Недоопределенная система - имеются ненулевые степени свободы. \en Underconstrained system: there are non-zero degrees of freedom.
|
||||
, GCE_STATE_UnresolvedRedundancy ///< \ru Имеются не удовлетворенные избыточные ограничения. There are unresolved redundant constraints.
|
||||
/*
|
||||
\ru Идентификаторы не менять (возможна запись в файлы)!
|
||||
\en Don't change identifiers (record to files is possible)!
|
||||
*/
|
||||
} GCE_s_state;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Проверка: Останется ли система удовлетворенной, если изменить координаты точки.
|
||||
\en Check: Whether the system remains satisfied if the point coordinates are changed.
|
||||
@@ -300,7 +284,7 @@ GCE_FUNC(GCE_system) GCE_RestoreFromJournal( const char * fName );
|
||||
\note Used only for testing
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(const GCE_diagnostic_pars &) GCE_DiagnosticPars( GCE_system gSys );
|
||||
GCE_FUNC(GCE_diagnostic_pars) GCE_DiagnosticPars( GCE_system gSys );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
||||
+31
-1
@@ -879,6 +879,33 @@ GCE_FUNC(bool) GCE_IsSatisfied( GCE_system gSys, constraint_item cItem );
|
||||
// ---
|
||||
GCE_FUNC(GCE_c_status) GCE_ConstraintStatus( GCE_system gSys, constraint_item cItem );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Выдать состояние определенности системы ограничений.
|
||||
\en Get constraint system definition state.
|
||||
|
||||
\param[in] gSys - \ru Система ограничений.
|
||||
\en System of constraints. \~
|
||||
\details
|
||||
\ru Функция вернет состояние #GCE_STATE_Underconstrained, если имеется хотя бы
|
||||
один геометрический объект с ненулевой степенью свободы.
|
||||
Состояние #GCE_STATE_WellConstrained означает, что геометрия полностью определена, а другое
|
||||
состояние #GCE_STATE_UnresolvedRedundancy означает, что в модели имеются нерешенные
|
||||
избыточные ограничения.
|
||||
\en The function will return #GCE_STATE_Underconstrained if there is at least
|
||||
one geometric object with nonzero degree of freedom. State code #GCE_STATE_WellConstrained
|
||||
means that the geometry is fully-defined. And the other state is #GCE_STATE_UnresolvedRedundancy
|
||||
means there are unresolved redundant constraints (non solved overdefinition). \n
|
||||
|
||||
\return \ru Одно из состояний, перечисленного набором: "Система недоопределена",
|
||||
"Полностью определена" или "Есть не решенные избыточные ограничения".
|
||||
\en One of the states enumerated by a set: "Under-defined", "Well-defined" and
|
||||
"There are unsolved redundant constraints (non solved overdefinition)". \~
|
||||
\note \ru Сложность выполнения функции сопоставима с GCE_Evaluate.
|
||||
\en Function complexity is comparable to GCE_Evaluate.
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(GCE_s_state) GCE_DefinitionState( GCE_system gSys );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/**
|
||||
brief \ru Выполнить диагностику геометрических объектов.
|
||||
@@ -1112,6 +1139,7 @@ GCE_FUNC(constraint_item) GCE_AddPointOnPercent( GCE_system gSys, geom_item curv
|
||||
Например, для окружности параметрическая область равна интервалу [-PI ... PI].
|
||||
Если k = 0, то ограничение прикрепит точку pnt[2] к началу участка, если k = 1.0,
|
||||
то ограничение прикрепит точку pnt[2] к концу участка.
|
||||
Переменное значение коэффициента k поддерживается для сплайнов.
|
||||
|
||||
\en The method creates a constraint specifying the point location on
|
||||
a piece of a curve which is set by the coefficient (proportional) of its arc length.
|
||||
@@ -1121,10 +1149,12 @@ GCE_FUNC(constraint_item) GCE_AddPointOnPercent( GCE_system gSys, geom_item curv
|
||||
the percentage k is calculated coincides with the whole parametric region of a curve.
|
||||
For example, in a case of circle the parametric range is equal to the interval [-PI ... PI].
|
||||
If k = 0, then the constraint attaches the point pnt[2] to the beginning of the piece, if k = 1.0,
|
||||
then the constraint attaches the point pnt[2] to the end of the piece. \~
|
||||
then the constraint attaches the point pnt[2] to the end of the piece.
|
||||
The percentage k as a variable is supported for splines.\~
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(constraint_item) GCE_AddPointByMetricPercent( GCE_system gSys, geom_item curve, geom_item pnt[3], double k );
|
||||
GCE_FUNC(constraint_item) GCE_AddPointByMetricPercent( GCE_system gSys, geom_item curve, geom_item pnt[3], var_item k );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Задать ограничение "Фиксация положения точки, лежащей на кривой".
|
||||
|
||||
@@ -324,6 +324,22 @@ typedef enum
|
||||
|
||||
} GCE_c_status;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Состояние определенности системы геометрических ограничений.
|
||||
\en Difinition State of geometric constraints system.
|
||||
*/ //---
|
||||
typedef enum
|
||||
{
|
||||
GCE_STATE_Unknown = 0 ///< \ru О состоянии ничего не известно. \en State is unknown.
|
||||
, GCE_STATE_WellConstrained ///< \ru Полностью определенная система - все степени свободы нулевые. \en Well-constrained system: all degrees of freedom are zero.
|
||||
, GCE_STATE_UnderConstrained ///< \ru Недоопределенная система - имеются ненулевые степени свободы. \en Underconstrained system: there are non-zero degrees of freedom.
|
||||
, GCE_STATE_UnresolvedRedundancy ///< \ru Имеются не удовлетворенные избыточные ограничения. There are unresolved redundant constraints.
|
||||
/*
|
||||
\ru Идентификаторы не менять (возможна запись в файлы)!
|
||||
\en Don't change identifiers (record to files is possible)!
|
||||
*/
|
||||
} GCE_s_state;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Вернет 'true' в случае успешного результата. \en Return true, if the result code is successful.
|
||||
// ---
|
||||
|
||||
@@ -49,7 +49,7 @@ struct GCM_CLASS GCM_c_params
|
||||
GCM_c_type m_Type; ///< \ru Тип сопряжения. \en Type of mating.
|
||||
GCM_alignment m_Align;
|
||||
GCM_tan_choice m_TanChoice;
|
||||
GCM_angle_type m_AngType;
|
||||
GCM_angle_type m_AngType;
|
||||
GCM_scale m_Scale;
|
||||
GCM_coord_name m_CrdName;
|
||||
double m_RealPar; ///< \ru Вещественный параметр. \en Real parameter.
|
||||
@@ -227,8 +227,7 @@ private:
|
||||
|
||||
private: // (!) The members below will be removed in a future version (V17 or later).
|
||||
typedef GCM_geom_axis PlanarAngleAxis;
|
||||
typedef GCM_angle_type EnAngleType;
|
||||
typedef GCM_alignment EnAlignCondition;
|
||||
typedef GCM_angle_type EnAngleType;
|
||||
|
||||
private: // (!) The members below will be removed in a future version (V17 or later).
|
||||
virtual ItGeomPtr GeomOne() const { return GeomItem(1); }
|
||||
@@ -560,6 +559,21 @@ GCM_FUNC(GCM_c_record) GCM_ConstraintRecord( GCM_system gSys, GCM_constraint con
|
||||
//---
|
||||
GCM_FUNC(std::string&) GCM_SExprRecord( GCM_system gSys, GCM_constraint conId, std::string& str );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить интерфейсный объект геометрического ограничения ItConstraintItem по дескриптору.
|
||||
\en Get an interface object ItConstraintItem of geometric constraint by the descriptor. \~
|
||||
\note Internal use only
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(const ItConstraintItem *) GCM_ConstraintItem( GCM_system gSys, GCM_constraint conId );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить геометрическое ограничение типа GCM_constraint из типа ItConstraintItem *.
|
||||
\en Get a geometric constraint of type GCM_constraint from type of ItConstraintItem *. \~
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC( GCM_constraint ) GCM_ConstraintId( GCM_system gSys, const ItConstraintItem * cPtr );
|
||||
|
||||
#endif // __GCM_CONSTRAINT_H
|
||||
|
||||
// eof
|
||||
|
||||
+23
-1
@@ -64,7 +64,7 @@ typedef GCM_c_type MtMateType;
|
||||
//---
|
||||
struct GCM_CLASS ItGeom
|
||||
{
|
||||
MtGeomId objectId; // (!) Будет закрыто
|
||||
mutable MtGeomId objectId; // (!) Будет закрыто
|
||||
ItGeom() : objectId( GCM_NULL ) {}
|
||||
/// \ru Тип геометрического объекта. \en Type of geometric object. \~
|
||||
virtual GCM_g_type GeomType() const { return GCM_LCS; }
|
||||
@@ -437,6 +437,20 @@ inline void MtMatingGeometry::SetNull()
|
||||
_ClearMatrix();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить геометрический объект типа GCM_geom из типа ItGeom *.
|
||||
\en Get a geometric object of type GCM_geom from type of ItGeom *. \~
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC( GCM_geom ) GCM_GeomId( GCM_system gSys, const ItGeom * gPtr );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить запись геометрического объекта по типу MtGeomVariant.
|
||||
\en Get the geometric record of the variant data type.
|
||||
*/
|
||||
// ---
|
||||
GCM_FUNC( GCM_g_record ) GCM_GeomRecord( const MtGeomVariant & );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Конвертировать структуру MtMatingGeometry в аргумент ограничения.
|
||||
\en Convert the structure MtMatingGeometry to the argument of constraint. \~
|
||||
@@ -446,6 +460,14 @@ inline void MtMatingGeometry::SetNull()
|
||||
//---
|
||||
GCM_FUNC(MtGeomVariant) GeomArgument( const MtMatingGeometry &, VERSION cVer );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Internal use only
|
||||
/*
|
||||
Returns a pointer equal gPtr, if the operation succeeded.
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(const ItGeom *) GCM_SetDependencyGeom( GCM_system gSys, MtGeomId, const ItGeom * gPtr );
|
||||
|
||||
/** \} */
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
+13
-21
@@ -458,9 +458,9 @@ public:
|
||||
/// \ru Удалить чёрный ящик из системы ограничений. \en Remove black box from constraint system.
|
||||
MtResultCode3D RemoveBlackbox( ItGCBlackbox & );
|
||||
/// \ru Удалить геометрический объект из системы ограничений. \en Remove geometric object from constraint system.
|
||||
bool RemoveGeom( ItGeom * );
|
||||
bool RemoveGeom( const ItGeom * );
|
||||
/// \ru Освободить геометрический объект от фиксации в ГСК. \en Free geometric object from fixation in the WCS.
|
||||
MtResultCode3D UnfixGeom( ItGeom & );
|
||||
MtResultCode3D UnfixGeom( const ItGeom & );
|
||||
|
||||
/**
|
||||
\}
|
||||
@@ -469,10 +469,12 @@ public:
|
||||
\{
|
||||
*/
|
||||
public:
|
||||
/// \ru Оценить наилучшее приближение параметров, удовлетворяющих сопряжение. \en The function evaluates a closest parameters that tend to satisfy dimension or constraint.
|
||||
GCM_closest_params ClosestParams( const ItConstraintItem * ) const;
|
||||
/// \ru Узнать удовлетворено ли ограничение? \en Check if constraint is satisfied?
|
||||
bool IsSatisfied( const ItConstraintItem & );
|
||||
bool IsSatisfied( const ItConstraintItem & );
|
||||
/// \ru Узнать является ли тело полно-заданным или фиксированным ? \en Check if solid is fully-specified or fixed?
|
||||
MtStateOfFreedom IsWellConstrained( const ItGeom & );
|
||||
GCM_dof_result IsWellConstrained( const ItGeom & );
|
||||
/**
|
||||
\brief \ru Разослать диагностические коды ограничениям.
|
||||
\en Send out diagnostic codes to constraints. \~
|
||||
@@ -484,7 +486,7 @@ public:
|
||||
The function doesn't have a substantial amount of time if have already tried to
|
||||
solve the constraint system before. \~
|
||||
*/
|
||||
void DiagnoseConstraints();
|
||||
void DiagnoseConstraints();
|
||||
/**
|
||||
\brief \ru Решить систему сопряжений. \en Solve the constraint system. \~
|
||||
\details \ru Меняет положение геометрических объектов в соответствии с геометрическими ограничениями.
|
||||
@@ -559,7 +561,7 @@ public:
|
||||
defines the angular position of the component and given in radians. Mode is stopped by
|
||||
calling void FinishReposition(). \~
|
||||
*/
|
||||
MtResultCode3D PrepareReposition( ItGeom & rotGeom, const MbCartPoint3D & org, const MbVector3D & axis );
|
||||
MtResultCode3D PrepareReposition( ItGeom & rotGeom, const MbCartPoint3D & org, const MbVector3D & axis );
|
||||
/**
|
||||
\brief \ru Решить систему для произвольного изменения положения одного тела.
|
||||
\en Solve the system for an arbitrary change of position of one solid. \~
|
||||
@@ -658,7 +660,11 @@ public:
|
||||
protected:
|
||||
const ItGeom * _SetDependencyGeom( MtGeomId gId, const ItGeom * gItem );
|
||||
|
||||
public:
|
||||
private:
|
||||
// Constructing a solver.
|
||||
friend GCM_FUNC(SPtr<MtGeomSolver>) GCM_CreateSolver( SPtr<ItPositionManager> posMan );
|
||||
// It will be removed. For testing purposes.
|
||||
friend GCM_FUNC(SPtr<MtGeomSolver>) GCT_GetSolver( GCM_system gSys );
|
||||
// Constructor for internal use only. Use the call GCM_CreareSolver.
|
||||
MtGeomSolver( SPtr<ItPositionManager> );
|
||||
// Constructor for internal use only. Use the call GCM_GetSolver.
|
||||
@@ -699,13 +705,6 @@ private:
|
||||
//---
|
||||
GCM_FUNC(SPtr<MtGeomSolver>) GCM_CreateSolver( SPtr<ItPositionManager> pMan );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Выдать решатель для данной системы геометрических ограничений.
|
||||
\en Get the solver of the given geometric constraint system.
|
||||
*/
|
||||
//---
|
||||
GCM_FUNC(SPtr<MtGeomSolver>) GCM_GetSolver( GCM_system gSys );
|
||||
|
||||
/** \} */
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -718,13 +717,6 @@ GCM_FUNC(SPtr<MtGeomSolver>) GCM_GetSolver( GCM_system gSys );
|
||||
//---
|
||||
GCM_FUNC(GCM_system) GCM_CreateSystem( ItPositionManager * );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Запрос на аргумент (создать впервые или найти имеющийся), основано на базовом API
|
||||
/*
|
||||
Internal use only.
|
||||
*/
|
||||
//---
|
||||
GCM_geom GCM_QueryArgument( GCM_system gSys, const MtArgument & gArg );
|
||||
|
||||
/*
|
||||
Deprecated typenames
|
||||
|
||||
@@ -71,22 +71,18 @@ public:
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// \ru Элементарный кирпич для наложения сопряжений. \en Elementary box for the overlay of mates.
|
||||
// ---
|
||||
class GCM_CLASS TMBox : public ItGeom
|
||||
, public MtRefItem
|
||||
/** \brief \ru Тестовая модель бокса с отверстием.
|
||||
\en Testing model as a box with a hole.
|
||||
*/
|
||||
//---
|
||||
class GCM_CLASS MtTestBox : public ItGeom
|
||||
, public MtRefItem
|
||||
{
|
||||
public:
|
||||
enum MateMarker ///< \ru маркер для наложения сопряжения. \en marker for overlay of mate.
|
||||
{
|
||||
front,
|
||||
back,
|
||||
left,
|
||||
right,
|
||||
up,
|
||||
down,
|
||||
axis,
|
||||
distance
|
||||
front, back, left, right, up, down, axis, center,
|
||||
hole = axis
|
||||
};
|
||||
|
||||
private:
|
||||
@@ -95,72 +91,78 @@ private:
|
||||
c3d::mt_string name; // \ru Имя. \en Name.
|
||||
|
||||
public:
|
||||
TMBox( const MbPlacement3D & p, const TMBoxSize & sz, const c3d::mt_char * n = _T("B") ); // \ru Конструктор. \en Constructor.
|
||||
MtTestBox( const MbPlacement3D & p, const TMBoxSize & sz, const c3d::mt_char * n = _T("B") ); // \ru Конструктор. \en Constructor.
|
||||
|
||||
public:
|
||||
/// \ru Задать новую ЛСК. \en Set the new LCS.
|
||||
void SetPlacement( const MbPlacement3D & p ) { place.Init( p ); }
|
||||
void SetName( const c3d::mt_char * n ) { name = n; } // \ru Задать имя. \en Set the name.
|
||||
double Length() const { return size.length; } // \ru Выдать длину. \en Get the length.
|
||||
double Width() const { return size.width; } // \ru Выдать ширину. \en Get the width.
|
||||
double Height() const { return size.height; } // \ru Выдать высоту. \en Get the height.
|
||||
double Radius() const { return size.radius; } // \ru Выдать радиус. \en Get the radius.
|
||||
bool IsHoled() const { return size.radius > c3d::MIN_RADIUS - GcPrecision::lengthRegion; } // \ru С цилиндром ли кирпич. \en Whether there is a hole.
|
||||
MbVector3D CylinderAxis() const { return place.GetAxisX(); } // \ru выдать ось цилиндра. \en Get the cylinder axis.
|
||||
|
||||
public: // Реализация ItGeom
|
||||
void SetPlacement( const MbPlacement3D & p ) { place.Init( p ); }
|
||||
void SetName( const c3d::mt_char * n ) { name = n; } // \ru Задать имя. \en Set the name.
|
||||
double Length() const { return size.length; } // \ru Выдать длину. \en Get the length.
|
||||
double Width() const { return size.width; } // \ru Выдать ширину. \en Get the width.
|
||||
double Height() const { return size.height; } // \ru Выдать высоту. \en Get the height.
|
||||
double Radius() const { return size.radius; } // \ru Выдать радиус. \en Get the radius.
|
||||
bool IsHoled() const { return size.radius > c3d::MIN_RADIUS - GcPrecision::lengthRegion; } // \ru С цилиндром ли кирпич. \en Whether there is a hole.
|
||||
// Get the cylinder axis.
|
||||
MbVector3D CylinderAxis() const { return place.GetAxisX(); }
|
||||
// Get a center of the box.
|
||||
MbCartPoint3D Center() const { return place.GetOrigin(); }
|
||||
|
||||
public: /* ItGeom virtual methods.
|
||||
*/
|
||||
/// \ru Выдать положение объекта ItGeom; \en Get position of ItGeom object;
|
||||
virtual void GetPlacement( MbPlacement3D & p ) const { p.Init(place); }
|
||||
virtual void GetPlacement( MbPlacement3D & p ) const { p.Init(place); }
|
||||
/// \ru Выдать null-terminated строку имени геометрического объекта \en Get null-terminated name string of geometric object
|
||||
virtual const c3d::mt_char * GetName() const { return name.c_str(); }
|
||||
virtual refcount_t AddRef() const { return MtRefItem::AddRef(); }
|
||||
virtual refcount_t Release() const { return MtRefItem::Release(); }
|
||||
virtual refcount_t AddRef() const { return MtRefItem::AddRef(); }
|
||||
virtual refcount_t Release() const { return MtRefItem::Release(); }
|
||||
|
||||
private:
|
||||
TMBox();
|
||||
TMBox( const TMBox & );
|
||||
TMBox & operator = ( const TMBox & );
|
||||
// Get an OZ-pair of a box face in the LCS of the box.
|
||||
std::pair<MbCartPoint3D, MbVector3D> PairOZ( MateMarker ) const;
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MtTestBox );
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// \ru Наложение сопряжения на 2 кирпича. \en Overlaying mate onto two boxes.
|
||||
// ---
|
||||
/** \brief \ru Наложение сопряжения на 2 кирпича.
|
||||
\en Overlaying mate onto two boxes.
|
||||
*/
|
||||
//---
|
||||
class GCM_CLASS MtBoxConstraint : public MtRefItem
|
||||
, public ItConstraintItem
|
||||
{
|
||||
SPtr<TMBox> box1; // \ru Кирпич 1. \en Box 1.
|
||||
SPtr<TMBox> box2; // \ru Кирпич 2. \en Box 2.
|
||||
TMBox::MateMarker side1; // \ru Маркер сопряжения 1. \en Marker of mate 1.
|
||||
TMBox::MateMarker side2; // \ru Маркер сопряжения 2. \en Marker of mate 2.
|
||||
GCM_alignment aligncond; // \ru Условие выравнивания. \en Condition of alignment.
|
||||
MtMateType matetype; // \ru Тип сопряжения. \en The mate type.
|
||||
double realpar; // \ru Расстояние. \en Distance.
|
||||
MtResultCode3D rescode; // \ru Коды ошибки сопряжения. \en Error code of mate.
|
||||
using MateMarker = MtTestBox::MateMarker;
|
||||
SPtr<MtTestBox> box1; // \ru Кирпич 1. \en Box 1.
|
||||
SPtr<MtTestBox> box2; // \ru Кирпич 2. \en Box 2.
|
||||
MtTestBox::MateMarker side1; // \ru Маркер сопряжения 1. \en Marker of mate 1.
|
||||
MtTestBox::MateMarker side2; // \ru Маркер сопряжения 2. \en Marker of mate 2.
|
||||
GCM_alignment m_alignType; // \ru Условие выравнивания. \en Condition of alignment.
|
||||
MtMateType m_cType; // \ru Тип сопряжения. \en The mate type.
|
||||
double m_dValue; // \ru Расстояние. \en Distance.
|
||||
MtResultCode3D m_resCode; // Error code of the mate.
|
||||
|
||||
public:
|
||||
MtBoxConstraint( TMBox & b1, TMBox::MateMarker s1, TMBox & b2, TMBox::MateMarker s2, TMParameters );
|
||||
MtBoxConstraint( MtTestBox & b1, MateMarker s1, MtTestBox & b2, MateMarker s2, TMParameters );
|
||||
|
||||
public: // \ru Запросы (const-методы) \en Requests (const-methods)
|
||||
virtual GCM_alignment AlignType() const { return aligncond; } // \ru Выдать параметр условия выравнивания \en Get the parameter of alignment condition
|
||||
public: // \ru Запросы (const-методы) \en Requests (const-methods).
|
||||
virtual GCM_alignment AlignType() const { return m_alignType; } // \ru Выдать параметр условия выравнивания \en Get the parameter of alignment condition
|
||||
virtual GCM_angle_type AngleType() const { return GCM_NONE_ANGLE; } // \ru Выдать тип угла (3D или планарный) \en Get the angle type (3D or planar)
|
||||
virtual GCM_geom_axis AxisOfPlanarAngle() const { return GCM_geom_axis(); } // \ru Выдать ось для планарного углового сопряжения, заданную в ЛСК некоторого тела \en Get the axis for planar angular mate. Axis is given in the LCS of some solid
|
||||
virtual MbVector3D AxisOf3DAngleType() const { return MbVector3D::zero; } // \ru Взять ось для планарного углового сопряжения \en Get the axis for planar angular mate
|
||||
virtual MtMateType ConstraintType() const { return matetype; } // \ru Выдать тип сопряжения \en Get the mate type
|
||||
virtual MtMateType ConstraintType() const { return m_cType; } // \ru Выдать тип сопряжения \en Get the mate type
|
||||
virtual ItGeomPtr GeomItem( int nb ) const { return (nb==1)? box1.get(): box2.get(); } // \ru Выдать первый сопрягаемый объект \en Get the first mating object
|
||||
virtual double DimParameter() const { return realpar; } // \ru Выдать вещественный параметр \en Get the real parameter
|
||||
virtual double DimParameter() const { return m_dValue; } // \ru Выдать вещественный параметр \en Get the real parameter
|
||||
virtual GCM_tan_choice TangencyChoice() const { return GCM_TAN_NONE; } // \ru Выдать вариант касания \en Get the tangency choice
|
||||
/// \ru Диагностический код ошибки, прикрепленный к данному ограничению. \en Diagnostic error code attached to this constraint.
|
||||
virtual MtResultCode3D ErrorCode() const { return rescode; }
|
||||
virtual MtResultCode3D ErrorCode() const { return m_resCode; }
|
||||
virtual VERSION Version() const { return GetCurrentMathFileVersion(); } // \ru Выдать версию сопряжения, которая совпадает с версией потока \en Get the mate version which same as the stream version
|
||||
|
||||
public:
|
||||
void SetDistance( double dist ) { realpar = dist; }
|
||||
void SetDistance( double dist ) { m_dValue = dist; }
|
||||
|
||||
public: // \ru Методы для обратной связи (задающие) \en Callback methods
|
||||
/// \ru Задать код ошибки для неудовлетворенного сопряжения \en Set the error code for unsatisfied mate
|
||||
virtual void SetErrorCode( MtResultCode3D res ) { rescode = res; }
|
||||
virtual void SetErrorCode( MtResultCode3D res ) { m_resCode = res; }
|
||||
/// \ru Задать ось для углового сопряжения с трехмерным типом измерения; \en Set axis for angular mate with three-dimensional type of dimension;
|
||||
virtual void SetAxisOf3DAngleType( const MbVector3D & /*axis*/ ) { /*planarang.axis = axis;*/ }
|
||||
|
||||
@@ -231,7 +233,7 @@ private:
|
||||
TMBoxPositioner & operator = ( const TMBoxPositioner & );
|
||||
};
|
||||
|
||||
typedef std::vector<SPtr<TMBox> > MtBoxVector;
|
||||
typedef std::vector<SPtr<MtTestBox> > MtBoxVector;
|
||||
typedef std::vector<MtBoxVector> MtBlocksVector;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
+23
-67
@@ -372,46 +372,13 @@ GCM_FUNC(bool) GetMatingGeometry( const ItConstraintItem & cItem, int geomNb, bo
|
||||
GCM_FUNC(MtGeomVariant) GCM_GeomArgument( const MbSpaceItem *, bool orient );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить геометрический объект типа GCM_geom из типа ItGeom *.
|
||||
\en Get a geometric object of type GCM_geom from type of ItGeom *. \~
|
||||
/** \brief \ru Получить список редактируемых и нередактируемых свойств на систему ограничений целиком.
|
||||
\en Get a list of editable and non-editable properties for the entire constraint system. \~
|
||||
\note \ru Эта функция применяется в качестве аналитического инстумента разработчика.
|
||||
\en The function is used as an analytical tool for the developer.
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(GCM_geom) GCM_GeomId( GCM_system gSys, const ItGeom * gPtr );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить геометрическое ограничение типа GCM_constraint из типа ItConstraintItem *.
|
||||
\en Get a geometric constraint of type GCM_constraint from type of ItConstraintItem *. \~
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(GCM_constraint) GCM_ConstraintId( GCM_system gSys, const ItConstraintItem * cPtr );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить запись геометрического объекта по типу MtGeomVariant.
|
||||
\en Get the geometric record of the variant data type.
|
||||
*/
|
||||
// ---
|
||||
GCM_FUNC(GCM_g_record) GCM_GeomRecord( const MtGeomVariant & );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Получить интерфейсный объект геометрического ограничения ItConstraintItem по дескриптору.
|
||||
\en Get an interface object ItConstraintItem of geometric constraint by the descriptor. \~
|
||||
\note Internal use only
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(const ItConstraintItem *) GCM_ConstraintItem( GCM_system gSys, GCM_constraint conId );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Internal use only
|
||||
/*
|
||||
Returns a pointer equal gPtr, if the operation succeeded.
|
||||
*/
|
||||
//--
|
||||
GCM_FUNC(const ItGeom *) GCM_SetDependencyGeom( GCM_system gSys, MtGeomId, const ItGeom * gPtr );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// for testing only
|
||||
//---
|
||||
GCM_FUNC(void) GCM_GetProperties( GCM_system gSys , MbProperties & props );
|
||||
GCM_FUNC(void) GCM_GetProperties( GCM_system gSys, MbProperties & props );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Специфическая диагностика объекта, зависимого от истории построения.
|
||||
@@ -473,40 +440,29 @@ GCM_FUNC(size_t) VolumeOfAlignOption( const ItConstraintItem & );
|
||||
//---
|
||||
GCT_FUNC(bool) CheckSatisfaction( GCM_system );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// for testing only.
|
||||
//---
|
||||
GCT_FUNC(size_t) GCT_GeomsCount( GCM_system gSys );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get current value of a geometry position and orientation in the world CS.
|
||||
// for testing only.
|
||||
//---
|
||||
GCT_FUNC(MbPlacement3D) GCT_Placement( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get current value of a geometry position the world CS.
|
||||
// for testing only.
|
||||
//---
|
||||
GCT_FUNC(MbCartPoint3D) GCT_Origin( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get current value of a first radius.
|
||||
// for testing only.
|
||||
//---
|
||||
GCT_FUNC(double) GCT_RadiusA( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get current value of a second radius.
|
||||
// for testing only.
|
||||
//---
|
||||
GCT_FUNC(double) GCT_RadiusB( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get a range to traverse constraints of the system.
|
||||
//---
|
||||
GCT_FUNC(void) GCM_GetConstraints( GCM_system gSys, CNodeIterator & begIter, CNodeIterator & endIter );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// The function evaluates a closest parameters that tend to satisfy dimension or constraint.
|
||||
// For testing purposes.
|
||||
//---
|
||||
GCM_FUNC(GCM_closest_params) GCM_ClosestParameters( GCM_system gSys, const GCM_c_record & cRec );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// The function evaluates a closest parameters that tend to satisfy dimension or constraint.
|
||||
// For testing purposes.
|
||||
//---
|
||||
GCM_FUNC(GCM_closest_params) GCM_ClosestParameters( GCM_system gSys, GCM_constraint conId );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Change a constraint option of alignment.
|
||||
// For testing purposes.
|
||||
//---
|
||||
GCM_FUNC(GCM_result) GCM_ChangeAlignment( GCM_system gSys, GCM_constraint conId, GCM_alignment aVal );
|
||||
|
||||
#endif // __GCM_ROUTINES_H
|
||||
|
||||
// eof
|
||||
|
||||
+26
-9
@@ -33,7 +33,6 @@ const MtObjectId _GCM_GROUND = 0;
|
||||
#endif // GCM_ID_TYPE
|
||||
|
||||
|
||||
|
||||
/** \addtogroup GCM_3D_API
|
||||
\{
|
||||
*/
|
||||
@@ -47,21 +46,21 @@ typedef struct MtSystemHolder* GCM_system;
|
||||
#endif // GCM_SYSTEM_TYPE
|
||||
|
||||
/// \ru Дескриптор геометрического объекта, зарегистрированного в контексте решателя. \en Descriptor of geometrical object registered in the constraint system.
|
||||
typedef MtObjectId GCM_object;
|
||||
typedef MtObjectId GCM_object;
|
||||
/// \ru Дескриптор геометрического объекта, зарегистрированного в контексте решателя. \en Descriptor of geometrical object registered in the constraint system.
|
||||
typedef GCM_object GCM_geom;
|
||||
typedef GCM_object GCM_geom;
|
||||
/// \ru Дескриптор числовой переменной, зарегистрированной в системе ограничений. \en Descriptor of numeric variable registered in the constraint system.
|
||||
typedef GCM_object GCM_var;
|
||||
typedef GCM_object GCM_var;
|
||||
/// \ru Дескриптор ограничения, зарегистрированного в решателе. \en Descriptor of a constraint registered in the solver.
|
||||
typedef GCM_object GCM_constraint;
|
||||
typedef GCM_object GCM_constraint;
|
||||
/// \ru Дескриптор паттерна, зарегистрированного в решателе. \en Descriptor of a pattern registered in the solver.
|
||||
typedef GCM_object GCM_pattern;
|
||||
typedef GCM_object GCM_pattern;
|
||||
/// \ru Дескриптор пустого объекта или ограничения. \en Descriptor of empty object or constraint. \~
|
||||
const GCM_object GCM_NULL = _GCM_NULL;
|
||||
const GCM_object GCM_NULL = _GCM_NULL;
|
||||
/** \brief \ru Дескриптор неподвижного подмножества объектов, заданных в глобальной системой координат.
|
||||
\en Descriptor of rigid subset of objects which are given in global coordinate system. \~
|
||||
*/
|
||||
const GCM_geom GCM_GROUND = _GCM_GROUND;
|
||||
const GCM_geom GCM_GROUND = _GCM_GROUND;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Словарь типов аргументов геометрических ограничений.
|
||||
@@ -288,6 +287,7 @@ typedef enum
|
||||
, GCM_RESULT_IncorrectDimensionInterval ///< \ru Задан некорректный интервал для размерного ограничения. \en Incorrect interval for interval dimension constraint.
|
||||
, GCM_RESULT_Unregistered ///< \ru Обращение к недействительному объекту. \en Access to invalid object.
|
||||
, GCM_RESULT_InternalError
|
||||
, GCM_RESULT_ImmutableData
|
||||
, GCM_RESULT_Aborted ///< \ru Процесс вычислений был прерван по запросу приложения. \en The evaluation process aborted by the application. \~
|
||||
, GCM_RESULT_Last_ // The last error code of user for mates (adding before this line)
|
||||
} GCM_result;
|
||||
@@ -573,7 +573,7 @@ struct GCM_CLASS GCM_c_arg
|
||||
*/
|
||||
struct GCM_CLASS GCM_c_record
|
||||
{
|
||||
static const size_t argsN = 5;
|
||||
static constexpr size_t argsN = 5;
|
||||
GCM_c_type type; // \ru Тип ограничения. \en Type of constraint.
|
||||
GCM_c_arg args[argsN]; // \ru Аргументы ограничения. \en Arguments of constraint.
|
||||
};
|
||||
@@ -593,6 +593,23 @@ inline const uint32 & _id( const MtObjectId & obj ) { return obj; }
|
||||
|
||||
#endif // GCM_ID_TYPE
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Скалярные параметры геометрического ограничения или размера.
|
||||
\en Scalar parameters of geometric constraint or dimension.
|
||||
*/
|
||||
//---
|
||||
struct GCM_CLASS GCM_closest_params
|
||||
{
|
||||
GCM_result result; // The result of a query GCM_ClosestParameters.
|
||||
GCM_c_arg dimValue; // Measured dimension value.
|
||||
GCM_alignment alignVal; // Estimated alignment option.
|
||||
GCM_tan_choice tanChoice;// Estimated tangency choice (it is yet always = GCM_TAN_NONE, i.e. yet not used in the query of closest params).
|
||||
GCM_closest_params()
|
||||
: result( GCM_RESULT_None )
|
||||
, dimValue()
|
||||
, alignVal( GCM_NO_ALIGNMENT )
|
||||
, tanChoice( GCM_TAN_NONE ) {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// It represents a journal that logs Solver API transactions.
|
||||
|
||||
@@ -21,11 +21,8 @@
|
||||
|
||||
|
||||
class MATH_CLASS MbPlacement3D;
|
||||
class MATH_CLASS MbSolid;
|
||||
class MATH_CLASS MbTopologyItem;
|
||||
class MATH_CLASS MbGrid;
|
||||
class MATH_CLASS MbFloatGrid;
|
||||
class MATH_CLASS MbMapBodiesPArray;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
\warning \ru Для внутреннего использования.
|
||||
\en For internal use only. \~
|
||||
*/
|
||||
void CreateFirst( const RPArray<MbLump> & lumps,
|
||||
MbResultType CreateFirst( const RPArray<MbLump> & lumps,
|
||||
const MbMatrix3D & into, double znear,
|
||||
bool perspective, const MbMapVisibilityMode & visMode, VERSION version,
|
||||
const std::vector<MbLumpCube> * prevCubes = nullptr );
|
||||
@@ -202,56 +202,4 @@ OBVIOUS_PRIVATE_COPY( MbMapBodiesPArray )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Определение участков граничной кривой.
|
||||
\en The definition of boundary curve regions. \~
|
||||
\details \ru Определение участков граничной кривой местного вида, выносного элемента,
|
||||
местного разреза (или сечения).
|
||||
\en The definition of regions of a local view boundary curve, a detail view,
|
||||
a local cutaway (or section). \~
|
||||
\param[in] lumps - \ru Проецируемые объекты.
|
||||
\en Projected objects. \~
|
||||
\param[in] contour - \ru Граничная кривая.
|
||||
\en A boundary curve. \~
|
||||
\param[in] cross - \ru Точки пересечения граничной кривой с линиями чертежа.
|
||||
\en Points of intersection between boundary curve and lines of drawing. \~
|
||||
\param[in] baseViewInfo - \ru Информация о базовом виде, на котором построен местный вид\разрез:\n
|
||||
тип вида:\n
|
||||
mvt_View - Вид,\n
|
||||
mvt_Cut - Разрез,\n
|
||||
mvt_Section - Сечечние;\n
|
||||
плоскость вида, разреза или сечения.\n
|
||||
\en The information about basic view on witch a local view(cutaway) is constructed:\n
|
||||
a view type:\n
|
||||
mvt_View - View,\n
|
||||
mvt_Cut - Cutaway,\n
|
||||
mvt_Section - Section;\n
|
||||
a plane of view, cutaway or section.\n \~
|
||||
\param[in] viewInfo - \ru Информация о производном виде:\n
|
||||
тип вида:\n
|
||||
mvt_View - Местный вид, Выносной элемент,\n
|
||||
mvt_Cut - Местный разрез,\n
|
||||
mvt_Section - Местное сечение;\n
|
||||
плоскость вида, разреза или сечения.\n
|
||||
Если тип производного и базового вида != mvt_View, то тип производного вида должен совпадать с видом базового.\n
|
||||
\en The information about derived view:\n
|
||||
a view type:\n
|
||||
mvt_View - A local view, a detail view,\n
|
||||
mvt_Cut - A local cutaway,\n
|
||||
mvt_Section - A local section;\n
|
||||
a plane of view, cutaway or section.\n
|
||||
If the type of derived and basic view is not equal to the mvt_View then the type of the derived view must coincide with the type of the basic view.\n \~
|
||||
\param[out] curves - \ru Результат - набор участков граничной кривой.
|
||||
\en The result is a set of boundary curve regions. \~
|
||||
\warning \ru Для внутреннего использования.
|
||||
\en For internal use only. \~
|
||||
*/ // ---
|
||||
void LimitCurveSectionsVisibility( const RPArray<MbLump> & lumps, // проецируемые объекты
|
||||
const MbCurve & contour,
|
||||
const SArray<MbCrossPoint> & cross,
|
||||
const MbMapViewInfo & baseViewInfo,
|
||||
const MbMapViewInfo & viewInfo,
|
||||
RPArray<MbCurve> & curves ); // результат
|
||||
|
||||
|
||||
#endif // __MAP_IMPLEMENTATION_H
|
||||
|
||||
@@ -102,6 +102,9 @@ public :
|
||||
void PointOn( const double & t, MbCartPoint3D & p ) const { p.Set( origin, axisZ, t ); }
|
||||
MbCartPoint3D PointOn( const double & t ) const { return origin + axisZ*t; }
|
||||
|
||||
void GetProperties( MbProperties & properties ); // \ru Выдать свойства объекта \en Get properties of the object
|
||||
void SetProperties( const MbProperties & ); // \ru Записать свойства объекта \en Set properties of the object
|
||||
|
||||
/** \} */
|
||||
/** \ru \name Функции доступа к полям
|
||||
\en \name Functions for access to fields
|
||||
|
||||
+448
-40
@@ -3,6 +3,10 @@
|
||||
\file
|
||||
\brief \ru Элемент аннотации.
|
||||
\en Annotation item.
|
||||
\details \ru Элемент аннотации и сопутствующие классы: текстовые элементы, выноски,
|
||||
хранилище номинала и диапазона.
|
||||
\en Annotation item and related classes: text elements, callouts,
|
||||
value and range storage.
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -12,8 +16,10 @@
|
||||
#define __MB_PMI_H
|
||||
|
||||
#include <legend.h>
|
||||
#include <topology_item.h>
|
||||
#include <model_item.h>
|
||||
#include <mb_placement.h>
|
||||
#include <curve.h>
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Элемент текста объекта аннотации.
|
||||
@@ -38,6 +44,7 @@ public:
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbTextItem );
|
||||
protected:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbTextItem();
|
||||
OBVIOUS_PRIVATE_COPY( MbTextItem )
|
||||
};
|
||||
@@ -54,14 +61,56 @@ IMPL_PERSISTENT_OPS( MbTextItem )
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
enum MbeTextLiteralForm
|
||||
enum class MbeTextLiteralForm
|
||||
{
|
||||
tlf_UnformattedString = 0, ///< \ru Текст без кодов форматирования. \en Text as is.
|
||||
tlf_PreDefinedCode = 1, ///< \ru Код специального символа. \en Text is a code of a symbol.
|
||||
tlf_FormattedString = 2 ///< \ru Текст с элементами форматирования форматирования. \en Formatted text.
|
||||
unformattedString = 0, ///< \ru Текст без кодов форматирования. \en Text as is.
|
||||
preDefinedCode = 1, ///< \ru Код специального символа. \en Text is a code of a symbol.
|
||||
formattedString = 2 ///< \ru Текст с элементами форматирования форматирования. \en Formatted text.
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Тип кривой с терминаторами.
|
||||
\en Type of curve with terminators. \~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
enum class MbeCalloutCurveType
|
||||
{
|
||||
callout = 0, ///< \ru Кривая-выноска. \en Callout.
|
||||
dimensionCurve = 1, ///< \ru Размерная кривая. \en Dimension curve.
|
||||
projectionCurve = 2 ///< \ru Кривая к характеризуемому объекту. \en Projection curve.
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Тип численной характеристики.
|
||||
\en Type of numerical characteristic. \~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
enum class MbeNumericCharacteristicType
|
||||
{
|
||||
linearDimension, ///< \ru Линейный размер. \en Linear dimension.
|
||||
angularDimension, ///< \ru Угловой размер. \en Angular dimension.
|
||||
radialDimension, ///< \ru Радиальный размер. \en Radial dimension.
|
||||
diameterDimension ///< \ru Диаметральный размер. \en Diameter dimension.
|
||||
};
|
||||
|
||||
|
||||
/// \ru Предопределённый тип терминатора - закрашенная стрелка. \en Pre-defined type of terminator - filled arrow.
|
||||
const c3d::string_t c3d_terminatorFilledArrow = _T("C3D TERMINATOR FILLED ARROW");
|
||||
|
||||
/// \ru Предопределённый тип терминатора - незакрашенная стрелка. \en Pre-defined type of terminator - unfilled arrow.
|
||||
const c3d::string_t c3d_terminatorUnfilledArrow = _T("C3D TERMINATOR UNFILLED ARROW");
|
||||
|
||||
/// \ru Предопределённый тип терминатора - незакрашенный прямоугольник. \en Pre-defined type of terminator - unfilled box.
|
||||
const c3d::string_t c3d_terminatorUnfilledBox = _T("C3D TERMINATOR UNFILLED BOX");
|
||||
|
||||
/// \ru Предопределённый тип терминатора - незакрашенный круг. \en Pre-defined type of terminator - unfilled circle.
|
||||
const c3d::string_t c3d_terminatorUnfilledCircle = _T("C3D TERMINATOR UNFILLED CIRCLE");
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Текстовый элемент, несущий содержание.
|
||||
\en Text element which has content. \~
|
||||
@@ -70,7 +119,7 @@ enum MbeTextLiteralForm
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbTextLiteral : public MbTextItem
|
||||
class MATH_CLASS MbTextLiteral final : public MbTextItem
|
||||
{
|
||||
c3d::string_t m_text; ///< \ru Текст или код символа. \en Text or symbol's code.
|
||||
c3d::string_t m_font; ///< \ru Шрифт. \en Font.
|
||||
@@ -85,7 +134,16 @@ class MATH_CLASS MbTextLiteral : public MbTextItem
|
||||
MbeTextLiteralForm m_textForm; ///< \ru Способ интерпретации текста. \en Meaning of the text field..
|
||||
public:
|
||||
|
||||
explicit MbTextLiteral( const c3d::string_t & initText, const MbPlacement & place, MbeTextLiteralForm preDefinedCode );
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] initText - \ru Текст,
|
||||
\en Text, \~
|
||||
\param[in] place - \ru Расположение в плоскости,
|
||||
\en Location in plane, \~
|
||||
\param[in] textForm - \ru Тип текстового элемента.
|
||||
\en Type of text element. \~
|
||||
*/
|
||||
explicit MbTextLiteral( const c3d::string_t & initText, const MbPlacement & place, MbeTextLiteralForm textForm );
|
||||
|
||||
/// \ru Получить текст. \en Get text.
|
||||
c3d::string_t GetText() const;
|
||||
@@ -94,7 +152,7 @@ public:
|
||||
/// \ru Получить ширину. \en Get width.
|
||||
double GetWidth() const;
|
||||
/// \ru Получить высоту. \en Get height.
|
||||
double SetHeight() const;
|
||||
double GetHeight() const;
|
||||
/// \ru Задать ширину. \en Set width.
|
||||
bool SetWidth( double w );
|
||||
/// \ru Задать высоту. \en Set height.
|
||||
@@ -107,9 +165,9 @@ public:
|
||||
void SetFont( const c3d::string_t & font );
|
||||
|
||||
/// \ru Создать копию объекта. \en Create a copy of an object.
|
||||
SPtr<MbTextItem> Clone( MbRegDuplicate * = nullptr ) const override;
|
||||
SPtr<MbTextItem> Clone( MbRegDuplicate * = nullptr ) const final;
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbTextItem & to, double accuracy ) const override;
|
||||
bool IsSame( const MbTextItem & to, double accuracy ) const final;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTextLiteral )
|
||||
OBVIOUS_PRIVATE_COPY( MbTextLiteral )
|
||||
@@ -126,24 +184,32 @@ IMPL_PERSISTENT_OPS( MbTextLiteral )
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbCompositeText : public MbTextItem
|
||||
class MATH_CLASS MbCompositeText final : public MbTextItem
|
||||
{
|
||||
/// \ru Элементы группы текстовых элементов. \en Grouped items.
|
||||
std::vector<SPtr<MbTextItem>> m_textItems;
|
||||
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
explicit MbCompositeText( std::vector<SPtr<MbTextItem>> && textItems );
|
||||
public:
|
||||
/** \brief \ru Создать составной текстовый элемент.
|
||||
|
||||
/** \brief \ru Создать составной текстовый элемент.
|
||||
\en Create composite text element. \~
|
||||
\details \ru Элемент создаётся только в том случае, если в исходных данных будет два или более ненулевых элемента.
|
||||
\en New element is created if two or more text items found in the source array. \~
|
||||
*/
|
||||
static SPtr<MbCompositeText> Create( const std::vector<SPtr<MbTextItem>> & textItems );
|
||||
private:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
explicit MbCompositeText( std::vector<SPtr<MbTextItem>> && textItems );
|
||||
|
||||
/// \ru Получить количество текстовых элементов. \en Get count of text items.
|
||||
size_t GetTextItemsCount() const;
|
||||
|
||||
/// \ru Получить текстовый элемент по индексу. \en Get text item at the specified postion.
|
||||
SPtr<MbTextItem> GetTextItem( size_t index ) const;
|
||||
|
||||
/// \ru Создать копию объекта. \en Create a copy of an object.
|
||||
SPtr<MbTextItem> Clone( MbRegDuplicate * = nullptr ) const override;
|
||||
SPtr<MbTextItem> Clone( MbRegDuplicate * = nullptr ) const final;
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbTextItem & to, double accuracy ) const override;
|
||||
bool IsSame( const MbTextItem & to, double accuracy ) const final;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCompositeText )
|
||||
OBVIOUS_PRIVATE_COPY( MbCompositeText )
|
||||
@@ -153,14 +219,303 @@ private:
|
||||
IMPL_PERSISTENT_OPS( MbCompositeText )
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Значение и диапазон изменения величины.
|
||||
\en Value and range. \~
|
||||
\details \ru Может быть определён либо номинал, либо диапазон изменения, либо и то и другое. Контроль данных не производится. \n
|
||||
\en Value or range or both can be defined. The check of falues is not performed. \n\~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbValueRange final : public TapeBase {
|
||||
double m_nominalValue; ///< \ru Номинал. \en Nominal value.
|
||||
double m_upperValue; ///< \ru Верхняя граница диапазона. \en Upper value of range.
|
||||
double m_lowerValue; ///< \ru Нижняя граница диапазона. \en Lower value of range.
|
||||
bool m_nominalDefined; ///< \ru Признак, определён ли номинал. \en Flag if the value is defined.
|
||||
bool m_rangeDefined; ///< \ru Признак, определён ли диапазон. \en Flag if the range is defined.
|
||||
public:
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] valie - \ru Номинал.
|
||||
\en Value. \~
|
||||
*/
|
||||
MbValueRange( double value );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] lower - \ru Нижняя граница диапазона,
|
||||
\en Lower value of range, \~
|
||||
\param[in] upper - \ru Верхняя граница диапазона.
|
||||
\en Upper value of range. \~
|
||||
*/
|
||||
MbValueRange( double lower, double upper );
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] value - \ru Номинал,
|
||||
\en Value, \~
|
||||
\param[in] lower - \ru Нижняя граница диапазона,
|
||||
\en Lower value of range, \~
|
||||
\param[in] upper - \ru Верхняя граница диапазона.
|
||||
\en Upper value of range. \~
|
||||
*/
|
||||
|
||||
MbValueRange( double value, double lower, double upper );
|
||||
|
||||
/// \ru Конструктор по умолчанию удалён. \en Default constructor obviously deleted.
|
||||
MbValueRange() = delete;
|
||||
|
||||
/// \ru Конструктор копирования реализован по умолчанию. \en Copy constructor has default implementation.
|
||||
MbValueRange( const MbValueRange & ) = default;
|
||||
|
||||
/// \ru Оператор присваивания реализован по умолчанию. \en Assignment operators has default implementation.
|
||||
MbValueRange( MbValueRange && ) = default;
|
||||
|
||||
/** \brief \ru Определён ли номинал.
|
||||
\en Wether the value is defined. \~
|
||||
\param[out] value - \ru Номинал, если определён, иначе значение не меняется.
|
||||
\en Value if defined, not changed otherwise. \~
|
||||
\return \ru Флаг, задан ли номинал.
|
||||
\en Flag wether the value is defined. \~
|
||||
*/
|
||||
bool IsValueDefined( double & value ) const;
|
||||
|
||||
|
||||
/** \brief \ru Определён ли диапазон.
|
||||
\en Wether the range is defined. \~
|
||||
\param[out] lower - \ru Нижняя граница диапазона, иначе значение не меняется,
|
||||
\en Lower value of range, not changed otherwise, \~
|
||||
\param[out] upper - \ru Верхняя граница диапазона, иначе значение не меняется.
|
||||
\en Upper value of range, not changed otherwise. \~
|
||||
\return \ru Флаг, задан ли диапазон.
|
||||
\en Flag wether the range is defined. \~
|
||||
*/
|
||||
bool IsRangeDefined( double & lower, double & upper ) const;
|
||||
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbValueRange & to, double accuracy ) const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbValueRange )
|
||||
};
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbValueRange )
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Отображаемый знак.
|
||||
\en Terminator. \~
|
||||
\details \ru Предназначен для отображения специально выделенных точек на кривых PMI. \n
|
||||
\en Designed to dispay points on PMI curves with special meaning. \n\~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbTerminator final : public MbRefItem, public TapeBase
|
||||
{
|
||||
MbPlacement m_location; ///< \ru Расположение терминатора в плоскости отображения. \en Location of terminator in the display plane.
|
||||
c3d::string_t m_terminatorType; ///< \ru Тип терминатора. \en Terminator type.
|
||||
double m_sizeX; ///< \ru Размер терминатора по координате x расположения. \en Size of the terminator in the x direction of the location.
|
||||
double m_sizeY; ///< \ru Размер терминатора по координате y расположения. \en Size of the terminator in the y direction of the location.
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] location - \ru Расположение терминатора в плоскости отображения,
|
||||
\en Location of terminator in the display plane, \~
|
||||
\param[in] type - \ru Тип терминатора.
|
||||
\en Terminator type. \~
|
||||
\param[in] sizeX - \ru Размер терминатора по координате x расположения.
|
||||
\en Size of the terminator in the x direction of the location.. \~
|
||||
\param[in] sizeY - \ru Размер терминатора по координате y расположения.
|
||||
\en Size of the terminator in the y direction of the location.. \~
|
||||
*/
|
||||
MbTerminator( const MbPlacement & location, const c3d::string_t & type, double sizeX, double sizeY );
|
||||
public:
|
||||
/** \brief \ru Создать терминатор.
|
||||
\en Create terminator. \~
|
||||
\param[in] location - \ru Расположение терминатора в плоскости отображения,
|
||||
\en Location of terminator in the display plane, \~
|
||||
\param[in] type - \ru Тип терминатора,
|
||||
\en Terminator type, \~
|
||||
\param[in] sizeX - \ru Размер терминатора по координате x расположения,
|
||||
\en Size of the terminator in the x direction of the location, \~
|
||||
\param[in] sizeY - \ru Размер терминатора по координате y расположения.
|
||||
\en Size of the terminator in the y direction of the location. \~
|
||||
\return \ru Экземпляр терминатора, если строка типа не пуста и размеры больше Math::lengthEpsilon, иначе нулевой указатель.
|
||||
\en Instance of terminator, if the type string not empty and sizses greater than Math::lengthEpsilon, otherwise null pointer. \~
|
||||
*/
|
||||
static SPtr<MbTerminator> Create( const MbPlacement & location, const c3d::string_t & type, double sizeX, double sizeY );
|
||||
|
||||
|
||||
/// \ru Инициализировтаь терминатор по исходному. \en Initialize terminator.
|
||||
void Init( const MbTerminator& );
|
||||
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbTerminator & to, double accuracy ) const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbTerminator )
|
||||
};
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbTerminator )
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Кривая к терминаторами.
|
||||
\en Curve with terminators. \~
|
||||
\details \ru Может быть связана с характеризуемым объектом. \n
|
||||
\en Can have reference to the characterized object. \n\~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbCalloutCurve final : public MbRefItem, public TapeBase
|
||||
{
|
||||
SPtr<MbCurve> m_curve; ///< \ru Кривая-выноска. \en Callout curve.
|
||||
std::vector<SPtr<MbTerminator>> m_terminators; ///< \ru Терминаторы. \en Termniators.
|
||||
SPtr<MbTopologyItem> m_characterizedObject; ///< \ru Характеризуемый объект. \en Charactrrized object.
|
||||
MbeCalloutCurveType m_curveType; ///< \ru Вид кривой. \en Callout type.
|
||||
public:
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] curveType - \ru Вид кривой,
|
||||
\en Callout type, \~
|
||||
\param[in] curveToObject - \ru Кривая-выноска,
|
||||
\en Callout curve. \~
|
||||
\param[in] terminators - \ru Терминаторы.
|
||||
\en Terminators, \~
|
||||
\param[in] objectCalloutTo - \ru Характеризуемый объект.
|
||||
\en Charactrrized object. \~
|
||||
*/
|
||||
MbCalloutCurve( MbeCalloutCurveType curveType, SPtr<MbCurve> curveToObject, const std::vector<SPtr<MbTerminator>> & terminators, SPtr<MbTopologyItem> objectCalloutTo );
|
||||
|
||||
/** \brief \ru Получить кривую-выноску.
|
||||
\en Get callout curve. \~
|
||||
\return \ru Кривая-выноска.
|
||||
\en Callout curve. \~
|
||||
*/
|
||||
SPtr<MbCurve> GetCurve() const;
|
||||
|
||||
/** \brief \ru Получить количество терминаторов.
|
||||
\en Get count of terminators. \~
|
||||
\return \ru Количество терминаторов.
|
||||
\en Count of terminators. \~
|
||||
*/
|
||||
size_t TerminatorsCount() const;
|
||||
|
||||
/** \brief \ru Получить терминатор по индексу.
|
||||
\en Get terminator by index. \~
|
||||
\return \ru Терминатор по указанному индексу, если тот не превышает количество, иначе нулевой указатель.
|
||||
\en Terminator at the index if the index less than count, null pointer otherwise. \~
|
||||
*/
|
||||
SPtr<MbTerminator> GetTerminator( size_t index ) const;
|
||||
|
||||
/** \brief \ru Получить вид кривой-выноски.
|
||||
\en Get type of callout curve. \~
|
||||
\return \ru Вид кривой-выноски.
|
||||
\en Type of callout curve. \~
|
||||
*/
|
||||
MbeCalloutCurveType GetCurveType() const;
|
||||
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbCalloutCurve & to, double accuracy ) const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbCalloutCurve )
|
||||
};
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbCalloutCurve )
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Численная характеристика объекта.
|
||||
\en Numerical characteristic of an object. \~
|
||||
\details \ru Группа из более, чем одного текстового элемента. \n
|
||||
\en Group of two or more text items. \n\~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbNumericalCharacteristic final : public MbRefItem, public TapeBase
|
||||
{
|
||||
MbValueRange m_valueWithRange; ///< \ru Численные значения. \en Numerical values.
|
||||
MbeNumericCharacteristicType m_CharacteristicType; ///< \ru Тип характеристики. \en Type of characteristics.
|
||||
std::vector<SPtr<MbCalloutCurve>> m_callouts; ///< \ru Линии выноски. \en Callout lines.
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] type - \ru Тип характеристики,
|
||||
\en Type of characteristics, \~
|
||||
\param[in] rangeValue - \ru Численные значения,
|
||||
\en Numerical values, \~
|
||||
\param[in] callouts - \ru Линии-выноски.
|
||||
\en Callout lines. \~
|
||||
*/
|
||||
MbNumericalCharacteristic( MbeNumericCharacteristicType type, MbValueRange&&rangeValue, std::vector< SPtr<MbCalloutCurve> > && callouts );
|
||||
public:
|
||||
|
||||
|
||||
/** \brief \ru Сформировать размер.
|
||||
\en Create annotation item. \~
|
||||
\param[in] dimensionType - \ru Тип размера,
|
||||
\en Type of dimension, \~
|
||||
\param[in] rangeValue - \ru Численные значения,
|
||||
\en Numerical values, \~
|
||||
\param[in] baseObject - \ru Один из объектов привязки,
|
||||
\en One of the objects the dimension is between, \~
|
||||
\param[in] coObject - \ru Другой из объектов привязки.
|
||||
\en Another object the dimension is between. \~
|
||||
\return \ru Численное значение линейного размера с объектами привязки.
|
||||
\en Numerical value of a linear dimension with bind objects. \~
|
||||
\note \ru В контейнере выносных линий обязательно должна присутствовать размерная линия. Количество проекционных линий:
|
||||
- В случае линейного, углового или диаметрального размера размера две или ни одной.
|
||||
- В случае радиального размера ни одной.
|
||||
\en . \~
|
||||
*/
|
||||
static SPtr<MbNumericalCharacteristic> CreateDimension( MbeNumericCharacteristicType dimensionType, MbValueRange && rangeValue, std::vector<SPtr<MbCalloutCurve>> && callouts );
|
||||
|
||||
/// \ru Получить тип характеристики. \en Get the type of characteristic.
|
||||
MbeNumericCharacteristicType GetType() const;
|
||||
|
||||
/// \ru Опредлено ли значение. \en Whether the value is defined.
|
||||
bool IsValueDefined( double & value ) const;
|
||||
|
||||
/// \ru Опредлен ли диапазон. \en Whether the range is defined.
|
||||
bool IsRangeDefined( double & lower, double & upper ) const;
|
||||
|
||||
size_t GetDecoratedCurvesCount() const;
|
||||
|
||||
SPtr<MbCalloutCurve> GetDecoratedCurve( size_t index ) const;
|
||||
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbNumericalCharacteristic & to, double accuracy ) const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbNumericalCharacteristic )
|
||||
};
|
||||
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbNumericalCharacteristic )
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Тип элемента аннотации.
|
||||
\en Type of PMI. \~
|
||||
\details \ru Текст или специальный символ. \n
|
||||
\en Object counting number of its owners. \n\~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
enum class MbePMIType
|
||||
{
|
||||
general = 0, ///< \ru Общего вида. \en General type.
|
||||
numericalCharacteristic = 1, ///< \ru Численная характеристика. \en Numerical characteristics.
|
||||
technicalRequiremets = 2 ///< \ru Технические требования. Предназначены для передачи преимущественно текста вне окна модели. \en Technical requirements. Should be used to store mainly text items not to be displaied in the model view.
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Элемент аннотации.
|
||||
\en Reference-counted object. \~
|
||||
\ingroup Legend
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbPMI : public MbLegend
|
||||
class MATH_CLASS MbPMI final : public MbLegend
|
||||
{
|
||||
/// \ru Тип элемента аннотации. \en Type of PMI.
|
||||
MbePMIType m_PMIType;
|
||||
/// \ru Плоскость для отображения текста. \en The plane text is shown in.
|
||||
MbPlacement3D m_planeTextDisplay;
|
||||
/// \ru Заголовок элемента аннотации. \en The title of the annotation item.
|
||||
@@ -169,10 +524,12 @@ class MATH_CLASS MbPMI : public MbLegend
|
||||
c3d::ItemsSPtrVector m_nonTextItems;
|
||||
/// \ru Текстовые элементы. \en The text items of the annotation.
|
||||
std::vector<SPtr<MbTextItem>> m_textItems;
|
||||
/// \ru Численная характеристика с элементами оформления. \en Numerical characteristics with visual apearance.
|
||||
SPtr<MbNumericalCharacteristic> m_numericalCharacteristics;
|
||||
public:
|
||||
|
||||
/** \brief \ru Создать элемент аннотации.
|
||||
\en Create annotation item. \~
|
||||
/** \brief \ru Создать элемент аннотации общего вида.
|
||||
\en Create annotation item of general type. \~
|
||||
\param[in] plane - \ru Плоскость для отображения плоских элементов,
|
||||
\en Plane for planar elements transformation into space, \~
|
||||
\param[in] pmiName - \ru Название элемента аннотации,
|
||||
@@ -186,11 +543,56 @@ public:
|
||||
\en Returns pointer to new annotation element if only at least one text or geometric
|
||||
element is given, otherwise null pointer. \~
|
||||
*/
|
||||
static SPtr<MbPMI> Create ( const MbPlacement3D & plane = MbPlacement3D::global,
|
||||
static SPtr<MbPMI> CreateGeneral ( const MbPlacement3D & plane = MbPlacement3D::global,
|
||||
const c3d::string_t & pmiName = c3d::string_t(),
|
||||
const c3d::ItemsSPtrVector & pmiVisual = c3d::ItemsSPtrVector(),
|
||||
const std::vector<SPtr<MbTextItem>> & pmiText = std::vector<SPtr<MbTextItem>>() );
|
||||
|
||||
/** \brief \ru Создать элемент вида "Технические требования".
|
||||
\en Create annotation item of the "Tehcnical requirements" type. \~
|
||||
\param[in] plane - \ru Плоскость для отображения плоских элементов,
|
||||
\en Plane for planar elements transformation into space, \~
|
||||
\param[in] pmiName - \ru Название элемента аннотации,
|
||||
\en Captrion of the annotation element, \~
|
||||
\param[in] pmiVisual - \ru Геометрические компоненты элемента аннотации,
|
||||
\en Geometric items ot the annotation element, \~
|
||||
\param[in] pmiText \ru Текстовые компоненты элемента аннотации.
|
||||
\en Text items ot the annotation element. \~
|
||||
\return \ru Возвращает указатель на элемент аннотации, если передаётся хотя бы один
|
||||
ненулевой текстовый или геометрический элемент, иначе нулевой указатель.
|
||||
\en Returns pointer to new annotation element if only at least one text or geometric
|
||||
element is given, otherwise null pointer. \~
|
||||
*/
|
||||
static SPtr<MbPMI> CreateTechnicalRequirements ( const MbPlacement3D & plane = MbPlacement3D::global,
|
||||
const c3d::string_t & pmiName = c3d::string_t(),
|
||||
const c3d::ItemsSPtrVector & pmiVisual = c3d::ItemsSPtrVector(),
|
||||
const std::vector<SPtr<MbTextItem>> & pmiText = std::vector<SPtr<MbTextItem>>() );
|
||||
|
||||
/** \brief \ru Создать элемент вида "Технические требования".
|
||||
\en Create annotation item of the "Tehcnical requirements" type. \~
|
||||
\param[in] numericalCharacteristics - \ru Численная характеристика,
|
||||
\en Numerical characteristics, \~
|
||||
\param[in] plane - \ru Плоскость для отображения плоских элементов,
|
||||
\en Plane for planar elements transformation into space, \~
|
||||
\param[in] pmiName - \ru Название элемента аннотации,
|
||||
\en Captrion of the annotation element, \~
|
||||
\param[in] pmiVisual - \ru Геометрические компоненты элемента аннотации,
|
||||
\en Geometric items ot the annotation element, \~
|
||||
\param[in] pmiText \ru Текстовые компоненты элемента аннотации.
|
||||
\en Text items ot the annotation element. \~
|
||||
\return \ru Возвращает указатель на элемент аннотации, если передаётся хотя бы один
|
||||
ненулевой текстовый или геометрический элемент, иначе нулевой указатель.
|
||||
\en Returns pointer to new annotation element if only at least one text or geometric
|
||||
element is given, otherwise null pointer. \~
|
||||
*/
|
||||
static SPtr<MbPMI> CreateNumericalCharacteristics ( SRef<MbNumericalCharacteristic> numericalCharacteristics,
|
||||
const MbPlacement3D & plane = MbPlacement3D::global,
|
||||
const c3d::string_t & pmiName = c3d::string_t(),
|
||||
const c3d::ItemsSPtrVector & pmiVisual = c3d::ItemsSPtrVector(),
|
||||
const std::vector<SPtr<MbTextItem>> & pmiText = std::vector<SPtr<MbTextItem>>() );
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
@@ -203,9 +605,12 @@ protected:
|
||||
\param[in] pmiText \ru Текстовые компоненты элемента аннотации.
|
||||
\en Text items ot the annotation element. \~
|
||||
*/
|
||||
MbPMI( const MbPlacement3D & plane, const c3d::string_t & pmiName, c3d::ItemsSPtrVector &&, std::vector<SPtr<MbTextItem>> && pmiText );
|
||||
MbPMI( MbePMIType pmiType, const MbPlacement3D & plane, const c3d::string_t & pmiName, SPtr<MbNumericalCharacteristic>, c3d::ItemsSPtrVector &&, std::vector<SPtr<MbTextItem>> && pmiText );
|
||||
public:
|
||||
|
||||
/// \ru Получить тип элемента аннотации. \en Get PMI type.
|
||||
MbePMIType GetPMIType() const;
|
||||
|
||||
/// \ru Получить плоскость для отображения плоских элементов. \en Get plane for planar elements transformation into space.
|
||||
MbPlacement3D GetLocation() const;
|
||||
|
||||
@@ -235,30 +640,33 @@ public:
|
||||
\en Element if index is valid, null pointer otherwise. \~
|
||||
*/
|
||||
SPtr<MbTextItem> GetTextElement( size_t elementIndex ) const;
|
||||
|
||||
MbeSpaceType IsA () const override; // \ru Тип объекта. \en A type of an object.
|
||||
MbeSpaceType Type () const override; // \ru Групповой тип объекта. \en Group type of object.
|
||||
MbSpaceItem & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию. \en Create a copy.
|
||||
bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const override; // \ru Являются ли объекты равными? \en Are the objects equal?
|
||||
bool SetEqual ( const MbSpaceItem & ) override; // \ru Сделать объекты равным. \en Make the objects equal.
|
||||
|
||||
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ) override; // \ru Преобразовать согласно матрице. \en Transform according to the matrix.
|
||||
void Move ( const MbVector3D &, MbRegTransform * = nullptr ) override; // \ru Сдвинуть вдоль вектора. \en Translate along a vector.
|
||||
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override; // \ru Повернуть вокруг оси. \en Rotate around an axis.
|
||||
bool IsSimilar( const MbSpaceItem & init ) const override; // \ru Являются ли объекты подобными? \en Determine whether the objects are similar.
|
||||
double DistanceToPoint ( const MbCartPoint3D & ) const override; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point.
|
||||
void AddYourGabaritTo( MbCube & r ) const override; // \ru Добавь свой габарит в куб. \en Add bounding box into a cube.
|
||||
|
||||
void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const override; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh.
|
||||
|
||||
MbProperty & CreateProperty( MbePrompt n ) const override; // \ru Создать собственное свойство. \en Create a custom property.
|
||||
void GetProperties( MbProperties & properties ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
|
||||
void SetProperties( const MbProperties & properties ) override; // \ru Установить свойства объекта. \en Set properties of the object.
|
||||
void SetNumericalCharacteristics( SRef<MbNumericalCharacteristic> numericahCharacteristics );
|
||||
SPtr<MbNumericalCharacteristic> GetNumericalCharacteristics() const;
|
||||
|
||||
MbeSpaceType IsA () const final; // \ru Тип объекта. \en A type of an object.
|
||||
MbeSpaceType Type () const final; // \ru Групповой тип объекта. \en Group type of object.
|
||||
MbSpaceItem & Duplicate( MbRegDuplicate * = nullptr ) const final; // \ru Создать копию. \en Create a copy.
|
||||
bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const final; // \ru Являются ли объекты равными? \en Are the objects equal?
|
||||
bool SetEqual ( const MbSpaceItem & ) final; // \ru Сделать объекты равным. \en Make the objects equal.
|
||||
|
||||
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ) final; // \ru Преобразовать согласно матрице. \en Transform according to the matrix.
|
||||
void Move ( const MbVector3D &, MbRegTransform * = nullptr ) final; // \ru Сдвинуть вдоль вектора. \en Translate along a vector.
|
||||
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) final; // \ru Повернуть вокруг оси. \en Rotate around an axis.
|
||||
bool IsSimilar( const MbSpaceItem & init ) const final; // \ru Являются ли объекты подобными? \en Determine whether the objects are similar.
|
||||
double DistanceToPoint ( const MbCartPoint3D & ) const final; // \ru Вычислить расстояние до точки. \en Calculate the distance to a point.
|
||||
void AddYourGabaritTo( MbCube & r ) const final; // \ru Добавь свой габарит в куб. \en Add bounding box into a cube.
|
||||
|
||||
void CalculateMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const final; // \ru Построить полигональную копию mesh. \en Build polygonal copy mesh.
|
||||
|
||||
MbProperty & CreateProperty( MbePrompt n ) const final; // \ru Создать собственное свойство. \en Create a custom property.
|
||||
void GetProperties( MbProperties & properties ) final; // \ru Выдать свойства объекта. \en Get properties of the object.
|
||||
void SetProperties( const MbProperties & properties ) final; // \ru Установить свойства объекта. \en Set properties of the object.
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbPMI )
|
||||
private:
|
||||
MbPMI( const MbPMI& );
|
||||
const MbPMI& operator=( const MbPMI& ) = delete;
|
||||
const MbPMI& operator=( const MbPMI & ) = delete;
|
||||
};
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbPMI )
|
||||
|
||||
@@ -88,6 +88,7 @@ enum MbePrompt
|
||||
IDS_ITEM_0102, ///< \ru Вектор. \en Vector.
|
||||
IDS_ITEM_0103, ///< \ru Матрица преобразования. \en Transformation matrix.
|
||||
IDS_ITEM_0104, ///< \ru Локальная система координат. \en Local coordinate system.
|
||||
IDS_ITEM_0105, ///< \ru Ось. \en Axis.
|
||||
|
||||
IDS_ITEM_0107, ///< \ru Перемещение. \en Translation.
|
||||
IDS_ITEM_0108, ///< \ru Вращение. \en Rotation.
|
||||
@@ -389,8 +390,9 @@ enum MbePrompt
|
||||
|
||||
IDS_ITEM_0671, ///< \ru Условное обозначение. \en Symbolic Notation.
|
||||
IDS_ITEM_0672, ///< \ru Элемент аннотации. \en PMI object.
|
||||
IDS_ITEM_0673, ///< \ru Текстовый элемент. \en Text item.
|
||||
IDS_ITEM_0674, ///< \ru Составной текст. \en Composite text.
|
||||
IDS_ITEM_0673, ///< \ru Тип элемента аннотации. \en PMI type.
|
||||
IDS_ITEM_0674, ///< \ru Текстовый элемент. \en Text item.
|
||||
IDS_ITEM_0675, ///< \ru Составной текст. \en Composite text.
|
||||
|
||||
// \ru Объекты. \en Objects.
|
||||
|
||||
@@ -656,6 +658,7 @@ enum MbePrompt
|
||||
IDS_PROP_0277, ///< \ru Удаление выбранных скруглений. \en Remove selected features.
|
||||
IDS_PROP_0278, ///< \ru Слияние вершин выбранных ребер. \en Merging vertices of selected edges.
|
||||
IDS_PROP_0279, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
IDS_PROP_0280, ///< \ru Поворот граней. \en Faces rotation.
|
||||
|
||||
IDS_PROP_0282, ///< \ru Вектор модификации. \en The vector of modification.
|
||||
IDS_PROP_0283, ///< \ru Количество модифицированных граней. \en Number of modified faces.
|
||||
@@ -1169,6 +1172,7 @@ enum MbePrompt
|
||||
IDS_PROP_0932, ///< \ru Исходный проволочный каркас. \en Initial wire frame.
|
||||
IDS_PROP_0933, ///< \ru Признак строгого построения уклона 1. \en Sign of strict construction a slope angle 1.
|
||||
IDS_PROP_0934, ///< \ru Признак строгого построения уклона 2. \en Sign of strict construction a slope angle 2.
|
||||
IDS_PROP_0935, ///< \ru Направляющий проволочный каркас. \en Guide wire frame.
|
||||
|
||||
// \ru Конвертеры \en Converters
|
||||
|
||||
|
||||
@@ -507,6 +507,8 @@ public:
|
||||
}
|
||||
/// \ru Создать новый временный объект информации о топологии полигонального объекта. \en Create new temporary maintenance object information about polygonal object topology.
|
||||
MbMeshTopology * CreateMeshTopology( bool keepExisting ) const;
|
||||
/// \ru Получить временный объект информации о топологии полигонального объекта. \en Get temporary maintenance object information about polygonal object topology.
|
||||
const MbMeshTopology * GetMeshTopology() const;
|
||||
/// \ru Удалить информацию о топологии полигонального объекта. \en Delete a information about polygonal object topology.
|
||||
void ResetMeshTopology() const;
|
||||
/// \ru Инициализировать по топологии полигонального объекта. \en Initialize by polygonal object topology.
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
#include <math_define.h>
|
||||
#include <mb_variables.h>
|
||||
#include <mb_cart_point3d.h>
|
||||
#include <attr_hotpoint_attribute.h>
|
||||
#include <templ_sptr.h>
|
||||
|
||||
#include <hash32.h>
|
||||
|
||||
|
||||
@@ -22,6 +25,17 @@ class MATH_CLASS MbCurveEdge;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbFaceShell;
|
||||
|
||||
struct MbItemIndex;
|
||||
struct MbEdgeFacesIndexes;
|
||||
|
||||
|
||||
namespace c3d // namespace C3D
|
||||
{
|
||||
typedef std::pair<MbItemIndex, MbItemIndex> ItemIndexPair;
|
||||
typedef std::vector<MbItemIndex> ItemIndices;
|
||||
typedef std::vector<MbEdgeFacesIndexes> EdgeFacesIndices;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Точность построения объектов.
|
||||
@@ -35,26 +49,22 @@ class MATH_CLASS MbPrecision {
|
||||
protected:
|
||||
double precision; ///< \ru Заданная метрическая точность построения объектов. \en The metric precision of the construction of objects.
|
||||
double deviation; ///< \ru Заданная угловая точность построения объектов. \en The angular precision of the construction of objects.
|
||||
double tolerance; ///< \ru Толерантность построенных объектов. \en The tolerance of the constructed objects.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbPrecision()
|
||||
: precision( METRIC_PRECISION )
|
||||
, deviation( ANGLE_REGION )
|
||||
, tolerance( METRIC_EPSILON )
|
||||
, deviation( ANGLE_REGION )
|
||||
{}
|
||||
/// \ru Конструктор по заданной точности. \en Constructor by the specified precision.
|
||||
MbPrecision( double _precision, double _deviation, double _tolerance = METRIC_EPSILON )
|
||||
MbPrecision( double _precision, double _deviation )
|
||||
: precision( _precision )
|
||||
, deviation( _deviation )
|
||||
, tolerance( _tolerance )
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbPrecision( const MbPrecision & other )
|
||||
: precision( other.precision )
|
||||
, deviation( other.deviation )
|
||||
, tolerance( other.tolerance )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbPrecision() {}
|
||||
@@ -83,19 +93,16 @@ public:
|
||||
void Init( const MbPrecision & other ) {
|
||||
precision = other.precision;
|
||||
deviation = other.deviation;
|
||||
tolerance = other.tolerance;
|
||||
}
|
||||
/// \ru Функция инициализации. \en Initialization function.
|
||||
void Init( double _precision ) {
|
||||
precision = _precision;
|
||||
deviation = METRIC_EPSILON;
|
||||
tolerance = METRIC_EPSILON;
|
||||
}
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
MbPrecision & operator = ( const MbPrecision & other ) {
|
||||
precision = other.precision;
|
||||
deviation = other.deviation;
|
||||
tolerance = other.tolerance;
|
||||
return *this;
|
||||
}
|
||||
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
@@ -104,12 +111,10 @@ public:
|
||||
/// \ru Получить точность. \en Get precision.
|
||||
double GetPrecision() const { return precision; }
|
||||
double GetDeviation() const { return deviation; }
|
||||
double GetTolerance() const { return tolerance; }
|
||||
|
||||
/// \ru Установить точность. \en Set precision.
|
||||
void SetPrecision( double a ) { precision = a; }
|
||||
void SetDeviation( double a ) { deviation = a; }
|
||||
void SetTolerance( double a ) { tolerance = a; }
|
||||
|
||||
/// \ru Оператор чтения. \en Read operator.
|
||||
friend MATH_FUNC( reader & ) operator >> ( reader &, MbPrecision & );
|
||||
@@ -121,6 +126,61 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Обобщенные результаты операции.
|
||||
\en The common operation results. \~
|
||||
\details \ru Класс содержит достигнутую точность построения объектов, а также \n
|
||||
дополнительные данные, в виде хот-точек операции.
|
||||
\en The class contains the tolerance of the constructed objects and also \n
|
||||
additional data in the form of hot points. \n \~
|
||||
\ingroup Build_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbOperationResults {
|
||||
protected:
|
||||
double _tolerance; ///< \ru Толерантность построенных объектов. \en The tolerance of the constructed objects.
|
||||
SPtr<MbHotPointAttribute> _hotPoint; ///< \ru Атрибут хот-точки операции. \en Hot-point's attribute.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbOperationResults()
|
||||
: _tolerance( METRIC_EPSILON )
|
||||
, _hotPoint ( )
|
||||
{}
|
||||
/// \ru Конструктор по заданной точности. \en Constructor by the specified precision.
|
||||
MbOperationResults( double tolerance )
|
||||
: _tolerance( tolerance )
|
||||
, _hotPoint ( )
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbOperationResults( const MbOperationResults & other )
|
||||
: _tolerance( other._tolerance )
|
||||
, _hotPoint ( other._hotPoint )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbOperationResults() {}
|
||||
|
||||
public:
|
||||
/// \ru Функция инициализации. \en Initialization function.
|
||||
void Init( const SPtr<MbHotPointAttribute> & hotPoint,
|
||||
double accuracy = METRIC_EPSILON) {
|
||||
_hotPoint = hotPoint;
|
||||
_tolerance = accuracy;
|
||||
}
|
||||
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const MbOperationResults & other, double accuracy ) const;
|
||||
/// \ru Получить значение толерантности построенных объектов. \en Get tolerance of the constructed objects.
|
||||
double GetTolerance() const { return _tolerance; }
|
||||
/// \ru Получить атрибут хот-точки операции. \en Get hot-point's attribute.
|
||||
const SPtr<MbHotPointAttribute> & GetHotPointAttribute() const { return _hotPoint; }
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
MbOperationResults & operator = ( const MbOperationResults & other );
|
||||
|
||||
DECLARE_NEW_DELETE_CLASS( MbOperationResults )
|
||||
DECLARE_NEW_DELETE_CLASS_EX( MbOperationResults )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Индекс идентификации объекта.
|
||||
\en Index of object identification. \~
|
||||
@@ -269,13 +329,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
namespace c3d // namespace C3D
|
||||
{
|
||||
typedef std::pair<MbItemIndex, MbItemIndex> ItemIndexPair;
|
||||
typedef std::vector<MbItemIndex> ItemIndices;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Расширенный индекс идентификации объекта.
|
||||
\en Extended index of object identification. \~
|
||||
|
||||
@@ -0,0 +1,767 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Параметры прямого редактирования тела.
|
||||
\en Direct modeling parameters. \~
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __OP_DIRECT_MOD_PARAMETERS_H
|
||||
#define __OP_DIRECT_MOD_PARAMETERS_H
|
||||
|
||||
|
||||
#include <mb_axis3d.h>
|
||||
#include <solid.h>
|
||||
|
||||
|
||||
struct DirectModValues;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Старые типы модификации.
|
||||
\en Old type of modification. \~
|
||||
\details \ru Тип определяет действия при прямом моделировании.
|
||||
\en Type determines direct modeling actions. \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
enum MbeModifyingType {
|
||||
dmt_Remove = 0, ///< \ru Удаление из тела выбранных граней с окружением. \en Removal of the specified faces with the neighborhood from a solid.
|
||||
dmt_Create, ///< \ru Создание тела из выбранных граней с окружением. \en Creation of a solid from the specified faces with the neighborhood.
|
||||
dmt_Action, ///< \ru Перемещение выбранных граней с окружением относительно оставшихся граней тела. \en Translation of the specified faces with neighborhood relative to the other faces of the solid.
|
||||
dmt_Offset, ///< \ru Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса). \en Replacement of the specified faces of a solid with the offset faces (translation along the normal, change of the radius).
|
||||
dmt_Fillet, ///< \ru Изменение радиусов выбранных граней скругления на заданную величину. \en Change of radii of the specified fillet faces for the set value.
|
||||
dmt_Supple, ///< \ru Замена выбранных граней тела деформируемыми гранями (превращение в NURBS для редактирования). \en Replacement of the specified faces of a solid with a deformable faces (conversion to NURBS for editing).
|
||||
dmt_Purify, ///< \ru Удаление из тела выбранных скруглений. \en Removal of the specified fillets from a solid.
|
||||
dmt_Merger, ///< \ru Слияние вершин ребёр и удаление рёбер. \en Merging vertices of edges and edges removal.
|
||||
dmt_United, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
dmt_Rotate, ///< \ru Поворот выбранных граней тела. \en Rotate the chosen faces.
|
||||
dmt_Undefined, ///< \ru Служебный. \en Inner type.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Типы модификации.
|
||||
\en Type of modification. \~
|
||||
\details \ru Тип определяет действия при прямом моделировании.
|
||||
\en Type determines direct modeling actions. \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
enum MbeModifyingMode {
|
||||
dmm_Undefined = 0, ///< \ru Служебный. \en Inner type.
|
||||
|
||||
dmm_RemoveFaces = 10, ///< \ru Удаление из тела выбранных граней. \en Removal of the specified faces.
|
||||
dmm_RemoveFacesWithAdjacentFillets = 11, ///< \ru Удаление из тела выбранных граней с прилегающими скруглениями. \en Removal of the specified faces with the adjacent fillets from a solid.
|
||||
dmm_RemoveBelowRadius = 12, ///< \ru Удаление замкнутых цилиндрических, сферических граней, граней вращения и выдавливания радиуса меньше заданного. \en Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius.
|
||||
dmm_RemoveBelowRadiusWithAdjacentFillets = 13, ///< \ru Удаление замкнутых цилиндрических, сферических граней, граней вращения и выдавливания радиуса меньше заданного вместе с прилегающими скруглениями. \en Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius with the adjacent fillets.
|
||||
|
||||
dmm_Create = 30, ///< \ru Создание тела из выбранных граней с окружением. \en Creation of a solid from the specified faces with the neighborhood.
|
||||
|
||||
dmm_MoveFacesByVector = 40, ///< \ru Перемещение выбранных граней с окружением относительно оставшихся граней тела. \en Translation of the specified faces with neighborhood relative to the other faces of the solid.
|
||||
|
||||
dmm_OffsetFaces = 50, ///< \ru Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса). \en Replacement of the specified faces of a solid with the offset faces (translation along the normal, change of the radius).
|
||||
|
||||
dmm_ConvertFacesToNurbs = 60, ///< \ru Замена выбранных граней тела деформируемыми гранями (превращение в NURBS для редактирования). \en Replacement of the specified faces of a solid with a deformable faces (conversion to NURBS for editing).
|
||||
|
||||
dmm_PurifyFillets = 70, ///< \ru Удаление из тела выбранных скруглений. \en Removal of the specified fillets from a solid.
|
||||
dmm_PurifyFilletsChains = 71, ///< \ru Удаление из тела цепочек скруглений гладко стыкующихся с выбранными скруглениями. \en Removal of the links of fillets smoothly connected to the chosen fillets.
|
||||
dmm_PurifyFilletsBelowRadius = 72, ///< \ru Удаление из тела скруглений, меньших заданного радиуса. \en Remove the fillets with radius less then specified radius from a solid.
|
||||
|
||||
//dmm_PurifyFilletsInRange = 80, ///< \ru Пока не реализовано. Удаление из тела скруглений определённого радиуса. \en Not implemented. Remove the fillets with specific radius from a solid.
|
||||
|
||||
dmm_DeleteEdges = 90, ///< \ru Слияние вершин ребёр и удаление рёбер. \en Merging vertices of edges and edges removal.
|
||||
|
||||
dmm_UniteFaces = 100, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
|
||||
dmm_RotateFaces = 110, ///< \ru Поворот выбранных граней тела. \en Rotate the chosen faces.
|
||||
|
||||
dmm_FilletsRadiusChange = 120, ///< \ru Изменение радиусов выбранных граней скругления на заданную величину. \en Change of radii of the specified fillet faces for the set value.
|
||||
|
||||
dmm_FilletsRadiusSet = 130, ///< \ru В разработке. Установка радиусов выбранных граней скругления. \en Under development. Set the radii for the specified fillet faces.
|
||||
|
||||
//dmm_ChangeFaceSurface = 140, ///< \ru В разработке. \en Under development.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Старые параметры прямого редактирования тела.
|
||||
\en Old parameters for a solid direct modification. \~
|
||||
\details
|
||||
\ru Параметры прямого редактирования тела содержат тип операции (#MbeModifyingType) и её параметры.
|
||||
В зависимости от параметра way возможны следующие действия: \n
|
||||
1. Удаление из тела выбранных граней с окружением (way==dmt_Remove).
|
||||
По-умолчанию грани удаляются вместе с прилегающими скруглениями.
|
||||
Для удаления без прилегающих скруглений выставить флаг removeWithFillets = false.\n
|
||||
2. Создание тела из выбранных граней с окружением (way==dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (way==dmt_Action).
|
||||
Направление и величину перемещения определяет вектор direction. \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса)
|
||||
(way==dmt_Offset). Расстояние смещения определяется параметром value или длиной вектора direction.\n
|
||||
5. Изменение радиуса выбранных граней скругления (way==dmt_Fillet).
|
||||
Величина изменения радиуса определяется параметром value или длиной вектора direction.\n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования (way==dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (way==dmt_Purify). \n
|
||||
8. Слияние вершин ребёр и удаление рёбер (way==dmt_Merger). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (way==dmt_United). \n
|
||||
10. Поворот выбранных граней (way==dmt_Rotate). Угол поворота определяется параметром value,
|
||||
ось поворота определяется точкой origin и направлением direction.\n
|
||||
|
||||
\en Parameters for a solid direct modification include the type of operation (#MbeModifyingType) and its parameters.
|
||||
The possible operations depend on the 'way' parameter and are listed below: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (way==dmt_Remove).
|
||||
By default the faces are removed with the connected fillets.
|
||||
To remove without connected fillets set the flag removeWithFillets = false.\n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (way==dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (way==dmt_Action).
|
||||
The translation direction is defined by the 'direction' vector.\n
|
||||
4. Replacement of the specified faces by offset faces (way==dmt_Offset).
|
||||
The distance of the offset (or radius change) is defined by 'value' or by the length of 'direction'. \n
|
||||
5. Radius change of the specified fillet faces (way==dmt_Fillet).
|
||||
The value of radius change is defined by 'value' or by the length of 'direction'.\n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (way==dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (way==dmt_Purify). \n
|
||||
8. Edge vertices merging and edges removal (way==dmt_Merger). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (way==dmt_United). \n
|
||||
10. Rotation of the chosen faces (way==dmt_Rotate). The rotation angle is defined by the 'value',
|
||||
the rotation axis is defined by the point 'origin' and 'direction' vector.\n \~
|
||||
\deprecated \ru Класс устарел и будет удален в версии 2024. Взамен использовать MbModifiedSolidParams.
|
||||
\en The class is deprecated and will be removed in version 2024. Use MbModifiedSolidParams intead.\~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
struct MATH_CLASS ModifyValues {
|
||||
public:
|
||||
MbeModifyingType way; ///< \ru Тип модификации. \en Type of modification.
|
||||
MbVector3D direction; ///< \ru Перемещение при модификации. \en Moving when modifying.
|
||||
MbCartPoint3D origin; ///< \ru Точка опоры при модификации. \en Fulcrum when modifying.
|
||||
double value; ///< \ru Величина смещения/изменение радиуса. \en Offset value/change of radius.
|
||||
double tolerance; ///< \ru Точность построения. \en Operation tolerance.
|
||||
bool removeWithFillets; ///< \ru Удалять ребро вместе с прилегающими скруглениями. \en Whether to delete a face toghether with adjacent fillets.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор параметров операции удаления из тела выбранных граней.
|
||||
\en Constructor of operation parameters of removing the specified faces from the solid. \~
|
||||
*/
|
||||
ModifyValues()
|
||||
: way ( dmt_Remove )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( 0.0 )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и вектору перемещения. \en Constructor by way of modification and movement vector.
|
||||
ModifyValues( MbeModifyingType w, const MbVector3D & p )
|
||||
: way ( w )
|
||||
, direction( p )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( 0.0 )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и скалярному параметру. \en Constructor by way of modification and the scalar value.
|
||||
ModifyValues( MbeModifyingType w, double val, double eps = Math::metricAccuracy )
|
||||
: way ( w )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( val )
|
||||
, tolerance( eps )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и скалярному параметру. \en Constructor by way of modification and the scalar value.
|
||||
ModifyValues( MbeModifyingType w, double val, bool removeAdjacentFillets )
|
||||
: way ( w )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( val )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( removeAdjacentFillets )
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
ModifyValues( const ModifyValues & other )
|
||||
: way ( other.way )
|
||||
, direction( other.direction )
|
||||
, origin ( other.origin )
|
||||
, value ( other.value )
|
||||
, tolerance( other.tolerance )
|
||||
, removeWithFillets ( other.removeWithFillets)
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~ModifyValues() {}
|
||||
public:
|
||||
/// \ru Функция копирования. \en Copy function.
|
||||
void Init( const ModifyValues & other ) {
|
||||
way = other.way;
|
||||
direction = other.direction;
|
||||
origin = other.origin;
|
||||
value = other.value;
|
||||
tolerance = other.tolerance;
|
||||
removeWithFillets = other.removeWithFillets;
|
||||
}
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
ModifyValues & operator = ( const ModifyValues & other ) {
|
||||
way = other.way;
|
||||
direction = other.direction;
|
||||
origin = other.origin;
|
||||
value = other.value;
|
||||
tolerance = other.tolerance;
|
||||
removeWithFillets = other.removeWithFillets;
|
||||
return *this;
|
||||
}
|
||||
/// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix.
|
||||
void Transform( const MbMatrix3D & matr );
|
||||
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
|
||||
void Move ( const MbVector3D & to );
|
||||
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
|
||||
void Rotate ( const MbAxis3D & axis, double ang );
|
||||
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const ModifyValues & other, double accuracy ) const;
|
||||
|
||||
/// \ru Перемещение при модификации. \en Moving when modifying.
|
||||
const MbVector3D & GetDirection() const { return direction; }
|
||||
void SetDirection( const MbVector3D & d ) { direction = d; }
|
||||
/// \ru Точка опоры при модификации. \en Fulcrum when modifying.
|
||||
const MbCartPoint3D & GetOrigin() const { return origin; }
|
||||
void SetOrigin( const MbCartPoint3D & p ) { origin = p; }
|
||||
/// \ru Величина смещения/изменение радиуса. \en Offset value/change of radius.
|
||||
double GetValue() const { return value; }
|
||||
void SetValue( double v ) { value = v; }
|
||||
/// \ru Точность построения. \en Operation tolerance.
|
||||
double GetTolerance() const { return tolerance; }
|
||||
void SetTolerance( double t ) { tolerance = ::fabs( t ); }
|
||||
/// \ru Установить флаг удаления сопряжённых скруглений. \en Set the flag to remove adjacent fillets.
|
||||
void SetRemoveFillets( bool remove ) { removeWithFillets = remove; }
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( ModifyValues ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
};
|
||||
|
||||
|
||||
// Forward declaration for the deprecated friend function
|
||||
MATH_FUNC (MbCreator *) CreateFaceModifiedSolid( MbFaceShell * outer,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & oldParams,
|
||||
const RPArray<MbFace> & faces,
|
||||
const RPArray<MbCurveEdge> & edges,
|
||||
const MbSNameMaker & names,
|
||||
MbResultType & res,
|
||||
MbFaceShell *& shell );
|
||||
// Forward declaration for the deprecated friend function
|
||||
MATH_FUNC (MbResultType) EdgeModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & oldParams,
|
||||
const RPArray<MbCurveEdge> & edges,
|
||||
const MbSNameMaker & names,
|
||||
MbSolid *& result );
|
||||
// Forward declaration for the deprecated friend function
|
||||
MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & params,
|
||||
const RPArray<MbFace> & faces,
|
||||
const MbSNameMaker & names,
|
||||
MbSolid *& result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры прямого редактирования тела.
|
||||
\en Parameters for a solid direct modification. \~
|
||||
\details
|
||||
\ru Параметры прямого редактирования тела содержат тип операции (#MbeModifyingMode) и её параметры.
|
||||
В зависимости от параметра _modificationType возможны следующие действия: \n
|
||||
1. Удаление из тела выбранных граней без прилегающих скруглений dmm_RemoveFaces.\n
|
||||
Для удаления грани вместе с прилегающими скруглениями dmm_RemoveFacesWithAdjacentFillets.\n
|
||||
Удаление замкнутых цилиндрических, сферических граней, граней вращения и выдавливания радиуса меньше заданного
|
||||
без прилегающих скруглений dmm_RemoveBelowRadius.\n
|
||||
Удаление замкнутых цилиндрических, сферических граней, граней вращения и выдавливания радиуса меньше заданного
|
||||
вместе с прилегающими скруглениями dmm_RemoveBelowRadiusWithAdjacentFillets. \n
|
||||
2. Создание тела из выбранных граней с окружением dmm_Create. \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела dmm_MoveFacesByVector.
|
||||
Направление и величину перемещения определяет вектор direction. \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса)
|
||||
dmm_OffsetFaces. Расстояние смещения определяется параметром value.\n
|
||||
5. Изменение радиуса выбранных граней скругления на заданную величину dmm_FilletsRadiusChange.
|
||||
Величина изменения радиуса определяется параметром value.\n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования dmm_ConvertFacesToNurbs. \n
|
||||
7. Удаление выбранных граней скругления тела dmm_PurifyFillets.
|
||||
Для удаления также всех гладко прилегающих скруглений _modificationType==dmm_PurifyFilletsChains.
|
||||
Для удаления всех скруглений тела, меньших определённого радиуса _modificationType==dmm_PurifyFilletsBelowRadius.\n
|
||||
8. Слияние вершин ребёр и удаление рёбер dmm_DeleteEdges. \n
|
||||
9. Замена гладко стыкующихся граней одной гранью dmm_UniteFaces. \n
|
||||
10. Поворот выбранных граней dmm_RotateFaces. Угол поворота определяется параметром value,
|
||||
ось поворота определяется осью.\n
|
||||
|
||||
\en Parameters for a solid direct modification include the type of operation (#MbeModifyingMode) and its parameters.
|
||||
The possible operations depend on the '_modificationType' parameter and are listed below: \n
|
||||
1. Removal of the specified faces without the adjacent fillets dmm_RemoveFaces.\n
|
||||
Removal of the specified faces with the adjacent fillets dmm_RemoveFacesWithAdjacentFillets.
|
||||
Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius
|
||||
with the adjacent fillets dmm_RemoveBelowRadiusWithAdjacentFillets.\n
|
||||
Remove the close cylindric, spherical faces, extrusion and rotation faces below specified radius
|
||||
without the adjacent fillets dmm_RemoveBelowRadius.\n
|
||||
2. Creation of a solid from the specified faces with the neighborhood dmm_Create. \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid dmm_MoveFacesByVector.
|
||||
The translation direction is defined by the 'direction' vector.\n
|
||||
4. Replacement of the specified faces by offset faces dmm_OffsetFaces.
|
||||
The distance of the offset (or radius change) is defined by 'value'. \n
|
||||
5. Radius change of the specified fillet faces dmm_FilletChange.
|
||||
The value of radius change is defined by 'value'.\n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing dmm_ConvertFacesToNurbs. \n
|
||||
7. Remove of the specified fillet faces from a solid dmm_PurifyFillets.
|
||||
Remove of the specified fillet faces with all smoothly connected fillets _modificationType==dmm_PurifyFilletsChains.
|
||||
Remove all fillets below specified radius from a solid _modificationType==dmm_PurifyFilletsBelowRadius.\n
|
||||
8. Edge vertices merging and edges removal dmm_DeleteEdges. \n
|
||||
9. Replacement of the smoothly joined faces with a single face dmm_UniteFaces. \n
|
||||
10. Rotation of the chosen faces dmm_RotateFaces. The parameters are the rotation angle
|
||||
and the rotation axis.\n
|
||||
\~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbModifiedSolidParams : public MbPrecision
|
||||
{
|
||||
protected:
|
||||
MbSNameMaker _names; ///< \ru Именователь. \en Name maker.
|
||||
MbeModifyingMode _modificationType; ///< \ru Тип модификации. \en Type of modification.
|
||||
std::shared_ptr<DirectModValues> _modValues; ///< \ru Уникальные параметры в зависимости от типа операции. \en The unique values, depending on the operation.
|
||||
|
||||
private:
|
||||
MbModifiedSolidParams();
|
||||
MbModifiedSolidParams( MbeModifyingMode type );
|
||||
MbModifiedSolidParams( MbeModifyingMode type, const MbSNameMaker & names );
|
||||
|
||||
/** \ru \name Конструкторы без набора граней.
|
||||
\en \name Constructors without faces array.
|
||||
\{ */
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_OffsetFaces, dmm_FilletChange.
|
||||
\en Modification type. Available types for this constructor are: dmm_OffsetFaces, dmm_FilletChange. \~
|
||||
\param[in] value - \ru Величина сдвига для dmm_OffsetFaces или величина изменения радиуса для dmm_FilletChange.
|
||||
\en Offset value for dmm_OffsetFaces or calue of fillet radius change for dmm_FilletChange. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
double value );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces. \~
|
||||
\param[in] axis - \ru Ось вращения.
|
||||
\en Rotation axis. \~
|
||||
\param[in] angle - \ru Угол вращения.
|
||||
\en Rotation angle. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const MbAxis3D & axis,
|
||||
double angle );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_MoveFacesByVector.
|
||||
\en Modification type. Available types for this constructor are: dmm_MoveFacesByVector. \~
|
||||
\param[in] direction - \ru Направление перемещения.
|
||||
\en Direction for the move. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const MbVector3D & direction );
|
||||
/** \} */
|
||||
|
||||
public:
|
||||
MbModifiedSolidParams( const MbModifiedSolidParams & other, MbRegDuplicate * iReg = nullptr ); ///< \ru Конструктор копирования. \en Copy contructor.
|
||||
MbModifiedSolidParams( TapeInit ); ///< \ru Конструктор для чтения. \en The read constructor.
|
||||
/** \ru \name Конструкторы по набору граней.
|
||||
\en \name Constructors by faces array.
|
||||
\{ */
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] modType - \ru Тип модификации. Для данного конструктора доступны: dmm_UniteFaces, dmm_Create, dmm_ConvertFacesToNurbs, dmm_PurifyFillets*.
|
||||
\en Modification type. Available types for this constructor are: dmm_UniteFaces, dmm_Create, dmm_ConvertFacesToNurbs, dmm_PurifyFillets*. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
\en Faces for the modification. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode modType,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::ItemIndices & faces );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_OffsetFaces, dmm_FilletChange,
|
||||
dmm_RemoveBelowRadius, dmm_RemoveBelowRadiusWithAdjacentFillets, dmm_PurifyFilletsBelowRadius.
|
||||
\en Modification type. Available types for this constructor are: dmm_OffsetFaces, dmm_FilletChange,
|
||||
dmm_RemoveBelowRadius, dmm_RemoveBelowRadiusWithAdjacentFillets, dmm_PurifyFilletsBelowRadius.\~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
\en Faces for the modification. \~
|
||||
\param[in] value - \ru Величина сдвига для dmm_OffsetFaces,
|
||||
величина изменения радиуса для dmm_FilletChange,
|
||||
величина максимального радиуса для dmm_Remove* и dmm_Purify*.
|
||||
\en Offset value for dmm_OffsetFaces,
|
||||
value of fillet radius change for dmm_FilletChange,
|
||||
max value of a radius for dmm_Remove* and dmm_Purify*. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::ItemIndices & faces,
|
||||
double value )
|
||||
: MbModifiedSolidParams( type, names, value )
|
||||
{
|
||||
AddFaces( faces );
|
||||
}
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
\en Faces for the modification. \~
|
||||
\param[in] axis - \ru Ось вращения.
|
||||
\en Rotation axis. \~
|
||||
\param[in] angle - \ru Угол вращения.
|
||||
\en Rotation angle. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::ItemIndices & faces,
|
||||
const MbAxis3D & axis,
|
||||
double angle )
|
||||
: MbModifiedSolidParams( type, names, axis, angle )
|
||||
{
|
||||
AddFaces( faces );
|
||||
}
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_MoveFacesByVector.
|
||||
\en Modification type. Available types for this constructor are: dmm_MoveFacesByVector. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
\en Faces for the modification. \~
|
||||
\param[in] direction - \ru Направление сдвига.
|
||||
\en Shiftdirection. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::ItemIndices & faces,
|
||||
const MbVector3D & direction )
|
||||
: MbModifiedSolidParams( type, names, direction )
|
||||
{
|
||||
AddFaces( faces );
|
||||
}
|
||||
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_ConvertFacesToNurbs.
|
||||
\en Modification type. Available types for this constructor are: dmm_ConvertFacesToNurbs. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
\en Faces for the modification. \~
|
||||
\param[in] surfaces - \ru Поверхности замены (может быть пустым массивом).
|
||||
\en Surfaces for the change (may be empty). \~
|
||||
*/
|
||||
template<class SurfArray>
|
||||
MbModifiedSolidParams( MbeModifyingMode type,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::ItemIndices & faces,
|
||||
const SurfArray & surfaces )
|
||||
: MbModifiedSolidParams( type, names )
|
||||
{
|
||||
AddFaces( faces );
|
||||
AddSurfaces( surfaces );
|
||||
}
|
||||
//
|
||||
/** \} */
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] modType - \ru Тип модификации. Для данного конструктора доступны: dmm_DeleteEdges.
|
||||
\en Modification type. Available types for this constructor are: dmm_DeleteEdges. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] edges - \ru Список рёбер для модификации.
|
||||
\en Edges for the modification. \~
|
||||
\param[in] beginOrEnd - \ru Удалять начало или конец соответствующего ребра.
|
||||
\en Delete the beginning or the end of the corresponding edge. \~
|
||||
*/
|
||||
MbModifiedSolidParams( MbeModifyingMode modType,
|
||||
const MbSNameMaker & names,
|
||||
const c3d::EdgeFacesIndices & edges,
|
||||
const c3d::BoolVector & beginOrEnd )
|
||||
: MbModifiedSolidParams( modType, names )
|
||||
{
|
||||
AddEdges( edges, beginOrEnd );
|
||||
}
|
||||
|
||||
~MbModifiedSolidParams(){} ///< \ru Деструктор. \en Destructor.
|
||||
|
||||
private:
|
||||
/** \ru \name Функции инициализации.
|
||||
\en \name Initialization functions.
|
||||
\{ */
|
||||
bool CreateValues(); ///< \ru Инициализация при чтении. \en Read Initialization.
|
||||
void Init ( double value ); ///< \ru Инициализация. \en Initialization.
|
||||
void Init ( const MbAxis3D & axis, double angle ); ///< \ru Инициализация. \en Initialization.
|
||||
void Init ( const MbVector3D & direction ); ///< \ru Инициализация. \en Initialization.
|
||||
void Init ( const ModifyValues & oldParams,
|
||||
MbFaceShell * inputShell,
|
||||
const SArray<MbItemIndex> *faces,
|
||||
const SArray<MbEdgeFacesIndexes> * edges,
|
||||
RPArray<MbSurface> * surfaces ); ///< \ru Обратная совместимость. \en Backward compatability
|
||||
/** \} */
|
||||
// \ru Выдать значения запрошенного типа без проверок. \en Get the values of the requested type.
|
||||
template<class DMValues>
|
||||
inline
|
||||
std::shared_ptr<DMValues> _GetValues() const
|
||||
{
|
||||
return std::static_pointer_cast<DMValues>( _modValues );
|
||||
};
|
||||
MbModifiedSolidParams & operator = ( const MbModifiedSolidParams & ); ///< \ru Оператор копирования. \en Copy operator.
|
||||
|
||||
public:
|
||||
void Init ( const MbModifiedSolidParams & other, MbRegDuplicate * iReg = nullptr ); ///< \ru Инициализация. \en Initialization.
|
||||
|
||||
/** \ru \name Функции добавления граней.
|
||||
\en \name Functions to add faces.
|
||||
\{ */
|
||||
/** \brief \ru Добавить грань в параметры.
|
||||
\en Add face to values. \~
|
||||
\details \ru Добавить грань в параметры с проверкой на повторы.
|
||||
\en Add face to values wihout repeats. \~
|
||||
\param[in] face - \ru Индекс грани.
|
||||
\en Face pointer.\~
|
||||
*/
|
||||
void AddFace( const MbItemIndex & face );
|
||||
/** \brief \ru Добавить грани в параметры.
|
||||
\en Add faces to values. \~
|
||||
\details \ru Добавить грани в параметры с проверкой на повторы.
|
||||
\en Add faces to values wihout repeats. \~
|
||||
\param[in] faces - \ru Массив указателей на грани тела.
|
||||
\en Array of faces pointers.\~
|
||||
*/
|
||||
void AddFaces( const c3d::ItemIndices & faces )
|
||||
{
|
||||
for ( const auto & face : faces )
|
||||
AddFace ( face );
|
||||
}
|
||||
/** \brief \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\details \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\param[out] faces - \ru Массив указателей на грани тела, имеющиеся добавляются в конец.
|
||||
\en Array of faces pointers, existing values are added at the end.\~
|
||||
*/
|
||||
void GetFaces( c3d::ItemIndices & faces ) const;
|
||||
/** \brief \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\details \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\param[out] faces - \ru Массив указателей на грани тела, имеющиеся добавляются в конец.
|
||||
\en Array of faces pointers, existing values are added at the end.\~
|
||||
*/
|
||||
void GetFaces( SArray<MbItemIndex> & faces ) const;
|
||||
/** \} */
|
||||
|
||||
/** \ru \name Функции добавления рёбер.
|
||||
\en \name Functions to add edges.
|
||||
\{ */
|
||||
/** \brief \ru Добавить ребро в параметры.
|
||||
\en Add edge to values. \~
|
||||
\details \ru Добавить ребро в параметры с проверкой на повторы.
|
||||
\en Add edge to values wihout repeats. \~
|
||||
\param[in] edge - \ru Индекс ребра.
|
||||
\en Edge index.\~
|
||||
\param[in] beginOrEnd - \ru Удалить начало или конец ребра.
|
||||
\en Delete the beginning or the end of the edge.\~
|
||||
*/
|
||||
void AddEdge( const MbEdgeFacesIndexes & edge, bool beginOrEnd );
|
||||
/** \brief \ru Добавить рёбра в параметры.
|
||||
\en Add edges to values. \~
|
||||
\details \ru Добавить рёбра в параметры с проверкой на повторы.
|
||||
\en Add edges to values wihout repeats. \~
|
||||
\param[in] edges - \ru Массив индексов рёбер тела.
|
||||
\en Array of edge indices.\~
|
||||
\param[in] beginOrEnds - \ru Массив флагов, удалять начало или конец ребра.
|
||||
\en Array of flags showing whether to delete the beginning or the end of the edge.\~
|
||||
*/
|
||||
void AddEdges( const c3d::EdgeFacesIndices & edges, const c3d::BoolVector & beginOrEnds )
|
||||
{
|
||||
const size_t eSize = edges.size();
|
||||
if ( eSize < beginOrEnds.size() ) {
|
||||
C3D_ASSERT( eSize < beginOrEnds.size() );
|
||||
}
|
||||
else {
|
||||
for ( size_t i = 0; i < eSize; ++i )
|
||||
AddEdge( edges[i], beginOrEnds[i] );
|
||||
}
|
||||
}
|
||||
/** \brief \ru Получить рёбра из параметров.
|
||||
\en Get edges from values. \~
|
||||
\details \ru Получить рёбра из параметров.
|
||||
\en Get edges from values. \~
|
||||
\param[out] edges - \ru Массив индексов рёбер тела, имеющиеся добавляются в конец..
|
||||
\en Array of edges indices, existing values are added at the end.\~
|
||||
*/
|
||||
void GetEdges( c3d::EdgeFacesIndices & edges, c3d::BoolVector & beginOrEnds ) const;
|
||||
/** \brief \ru Получить рёбра из параметров.
|
||||
\en Get edges from values. \~
|
||||
\details \ru Получить рёбра из параметров.
|
||||
\en Get edges from values. \~
|
||||
\param[out] edges - \ru Массив индексов рёбер тела, имеющиеся добавляются в конец..
|
||||
\en Array of edges indices, existing values are added at the end.\~
|
||||
*/
|
||||
void GetEdges( SArray<MbEdgeFacesIndexes> & edges, c3d::BoolVector & beginOrEnds ) const;
|
||||
/** \} */
|
||||
|
||||
/** \ru \name Функции добавления поверхностей.
|
||||
\en \name Functions to add surfaces.
|
||||
\{ */
|
||||
/** \brief \ru Добавить поверхность для замены граней.
|
||||
\en Add surface to change faces. \~
|
||||
\details \ru Добавить поверхность для замены граней.
|
||||
\en Add surface to change faces. \~
|
||||
\param[in] surf - \ru Указатель на поверхность.
|
||||
\en Surface pointer.\~
|
||||
*/
|
||||
void AddSurface( MbSurface * surf );
|
||||
/** \brief \ru Добавить поверхности для замены граней.
|
||||
\en Add surfaces to change faces. \~
|
||||
\details \ru Добавить поверхности для замены граней.
|
||||
\en Add surfaces to change faces. \~
|
||||
\param[in] surfs - \ru Массив указателей на поверхности.
|
||||
\en Surface pointers array.\~
|
||||
*/
|
||||
template <class SurfArray>
|
||||
void AddSurfaces( const SurfArray & surfs );
|
||||
/** \brief \ru Получить поверхности для замены граней.
|
||||
\en Get surfaces to change faces. \~
|
||||
\details \ru Получить поверхности для замены граней.
|
||||
\en Get surfaces to change faces. \~
|
||||
\param[in] surfs - \ru Массив указателей на поверхности.
|
||||
\en Surface pointers array.\~
|
||||
*/
|
||||
void GetSurfaces( c3d::SurfacesVector & surfs );
|
||||
/** \} */
|
||||
|
||||
/** \brief \ru Валидны ли созданные параметры.
|
||||
\en Whether the created parameters are valid.\~
|
||||
\details \ru Валидны ли созданные параметры для заданной оболочки. Проверяется массив присланных объектов (граней, рёбер, поверхностей),
|
||||
установленные значения операции, соответствие типа и параметров.
|
||||
\en Whether the created parameters are valid for the specified shell. Checks the input objects arrays (faces, edges, sufaces),
|
||||
input operation values, consistency between type and parameters.\~
|
||||
\param[in] shell - \ru Указатель на оболочку, на которой будет производиться операция.
|
||||
\en Pointer to the to-be-modified shell .\~
|
||||
*/
|
||||
bool IsValid( const MbFaceShell * shell = nullptr ) const;
|
||||
/// \ru Выдать тип модификации. \en Get the modification type.
|
||||
MbeModifyingMode GetType() const { return _modificationType; }
|
||||
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
|
||||
const MbSNameMaker & GetNameMaker() const { return _names; }
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
|
||||
MbSNameMaker & SetNameMaker() { return _names; }
|
||||
/// \ru Установить именователь операции. \en Set the object defining names generation in the operation.
|
||||
void SetNameMaker( const MbSNameMaker & other, bool setVersion = true ) { _names.SetNameMaker( other, setVersion ); }
|
||||
|
||||
/// \ru Выдать значения запрошенного типа. \en Get the values of the requested type.
|
||||
template<class DMValues>
|
||||
std::shared_ptr<DMValues> GetValues() const;
|
||||
|
||||
void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = nullptr ); ///< \ru Преобразовать по матрице. \en Transform by matrix.
|
||||
void Move( const MbVector3D &to, MbRegTransform *ireg = nullptr ); ///< \ru Сдвиг. \en Move.
|
||||
void Rotate( const MbAxis3D &axis, double angle, MbRegTransform *ireg = nullptr ); ///< \ru Поворот. \en Rotate.
|
||||
|
||||
void GetProperties( MbProperties & properties ); ///< \ru Выдать свойства объекта \en Get properties of the object
|
||||
void SetProperties( const MbProperties & properties ); ///< \ru Записать свойства объекта \en Set properties of the object
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbModifiedSolidParams ); // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
friend class MATH_CLASS MbFaceModifiedSolid;
|
||||
friend MATH_FUNC (MbCreator *) CreateFaceModifiedSolid( MbFaceShell * outer,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & oldParams,
|
||||
const RPArray<MbFace> & faces,
|
||||
const RPArray<MbCurveEdge> & edges,
|
||||
const MbSNameMaker & names,
|
||||
MbResultType & res,
|
||||
MbFaceShell *& shell );
|
||||
friend MATH_FUNC (MbResultType) EdgeModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & oldParams,
|
||||
const RPArray<MbCurveEdge> & edges,
|
||||
const MbSNameMaker & names,
|
||||
MbSolid *& result );
|
||||
friend MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const ModifyValues & params,
|
||||
const RPArray<MbFace> & faces,
|
||||
const MbSNameMaker & names,
|
||||
MbSolid *& result );
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результаты прямого редактирования тела.
|
||||
\en Results for a solid direct modification. \~
|
||||
\details \ru Результаты прямого редактирования тела.
|
||||
\en Results for a solid direct modification. \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbModifiedSolidResults
|
||||
{
|
||||
public:
|
||||
SPtr<MbSolid> _resSolid; ///< \ru Результирующее тело. \en The resulting body.
|
||||
double _maxDifUnited; ///< \ru Максимальное отклонение объединённой поверхности от присланных граней (оценочная величина). \en The maximum deviation of the united surfaces from the input surfaces (approximate value).
|
||||
std::vector<SPtr<MbSurface>> _surfaces; ///< \ru Список поверхностей (только для dmm_ConvertFacesToNurbs). \en The list of surfaces (only for dmm_ConvertFacesToNurbs)
|
||||
|
||||
// \ru Конструктор. \en Constructor.
|
||||
MbModifiedSolidResults()
|
||||
: _maxDifUnited( -1. )
|
||||
{}
|
||||
|
||||
// \ru Очистка. \en Reset.
|
||||
void Reset()
|
||||
{
|
||||
_resSolid.reset();
|
||||
_surfaces.clear();
|
||||
_maxDifUnited = -1.;
|
||||
}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbModifiedSolidResults );
|
||||
};
|
||||
|
||||
#endif // __OP_DIRECT_MOD_PARAMETERS_H
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <op_binding_data.h>
|
||||
#include <curve3d.h>
|
||||
#include <curve.h>
|
||||
#include <mesh.h>
|
||||
|
||||
class MATH_CLASS MbFaceShell;
|
||||
class MATH_CLASS MbStepData;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры операции упрощения триангуляции.
|
||||
@@ -584,4 +588,130 @@ public:
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbCurveFitResults3D )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры развёртки триангуляции на плоскость.
|
||||
\en Parameter for an unwrapping the mesh on a plane. \~
|
||||
\details \ru Параметры развёртки триангуляции на плоскость. \n
|
||||
Параметры содержат информацию о положении развёртки и свойствах материала.
|
||||
\en Parameter for an unwrapping the mesh on a plane. \n
|
||||
The parameters contain information about the scan position and material properties. \~
|
||||
\ingroup Shell_Building_Parameters
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbMeshUnwrapParams
|
||||
{
|
||||
protected:
|
||||
MbPlacement3D _place; ///< \ru Локальная система координат развернутой поверхности. \en The local coordinate system for result surface. \~
|
||||
double _coefPoisson; ///< \ru Коэффициент Пуассона материала поверхности. \en The Poisson's ratio of suface material. \~
|
||||
SPtr<MbMesh> _baseMesh; ///< \ru Базовая триангуляция. \en The base triangulation. \~
|
||||
SPtr<MbMesh> _remeshedMesh; ///< \ru Ремешированная триангуляция. \en The remeshed triangulation. \~
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
*/
|
||||
MbMeshUnwrapParams();
|
||||
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbMeshUnwrapParams( const MbPlacement3D & place, double poisson = 0.25 );
|
||||
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbMeshUnwrapParams( const MbMeshUnwrapParams & that );
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbMeshUnwrapParams() {}
|
||||
|
||||
public:
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
MbMeshUnwrapParams & operator = ( const MbMeshUnwrapParams & that );
|
||||
/// \ru Установить локальную систему координат развернутой поверхности сетки. \en Set local coordinate system for mesh unwrapping. \~
|
||||
void SetPlacement( const MbPlacement3D & pl ) { _place.Init( pl ); }
|
||||
// \ru Получить локальную систему координат развернутой поверхности сетки. \en Get local coordinate system for mesh unwrapping. \~
|
||||
const MbPlacement3D & GetPlacement() const { return _place; }
|
||||
/// \ru Установить коэффициент Пуассона материала грани. \en Set the Poisson's ratio of face material. \~
|
||||
void SetPoissonsRatio( double poisson ) { _coefPoisson = poisson; }
|
||||
/// \ru Получить коэффициент Пуассона материала грани. \en Get the Poisson's ratio of face material. \~
|
||||
double GetPoissonsRatio() const { return _coefPoisson; }
|
||||
/// \ru Получить базовую сетку. \en Get the base mesh. \~
|
||||
const SPtr<MbMesh> & GetBaseMesh() const { return _baseMesh; }
|
||||
/// \ru Получить ремешированную сетку. \en Get the remeshed mesh. \~
|
||||
const SPtr<MbMesh> & GetRemeshedMesh() const { return _remeshedMesh; }
|
||||
|
||||
/// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix.
|
||||
void Transform( const MbMatrix3D & matr );
|
||||
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
|
||||
void Move( const MbVector3D & to );
|
||||
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
|
||||
void Rotate( const MbAxis3D & axis, double ang );
|
||||
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const MbMeshUnwrapParams & that, double accuracy ) const;
|
||||
/// \ru Инициализировать базовую сетку по оболочке. \en Initialize base mesh by shell.
|
||||
bool InitBaseMesh( const MbFaceShell & shell, const MbStepData & stepData );
|
||||
/// \ru Инициализировать ремешированную сетку с заданным размером треугольника (если triangleSize < 0, размер будет оценен автоматически). \en Initialize remeshed mesh with defined triangle size. If triangleSize < 0, then it will be estimated automatically.
|
||||
bool InitRemeshedMesh( double triangleSize, bool bReparam = false );
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbMeshUnwrapParams ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
}; // MbMeshUnwrapParams
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результат развёртки триангуляции на плоскость.
|
||||
\en Result of an unwrapping the mesh on a plane. \~
|
||||
\details \ru Результат развёртки триангуляции на плоскость. \n
|
||||
\en Result of an unwrapping the mesh on a plane. \n
|
||||
\ingroup Shell_Building_Parameters
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbMeshUnwrapResult
|
||||
{
|
||||
protected:
|
||||
MbPlacement3D _place; ///< \ru Локальная система координат развернутой поверхности грани. \en The local coordinate system for result surface. \~
|
||||
double _coefPoisson; ///< \ru Коэффициент Пуассона материала грани. \en The Poisson's ratio of face material. \~
|
||||
size_t _idNearest; ///< \ru Индекс ближайшего к началу локальной системы координат треугольника. \en Index of the nearest to the local coordinate system origin triangle. \~
|
||||
SPtr<MbMesh> _unwrappedMesh; ///< \ru Результат - триангуляция (3Д копия сетки из MbMeshUnwrapParams) с заполненными 2Д параметрами точек на плоскости развертки. \en Result - mesh (3D copy of the mesh from MbMeshUnwrapParams ) with filled 2D parameters on the unwrapped plane. \~
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
*/
|
||||
MbMeshUnwrapResult();
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbMeshUnwrapResult() {}
|
||||
|
||||
public:
|
||||
/// \ru Получить локальную систему координат развернутой поверхности сетки. \en Get local coordinate system for mesh unwrapping. \~
|
||||
const MbPlacement3D & GetPlacement() const { return _place; }
|
||||
// \ru Получить коэффициент Пуассона материала грани. \en Get the Poisson's ratio of face material. \~
|
||||
double GetPoissonsRatio() const { return _coefPoisson; }
|
||||
/// \ru Получить сетку. \en Get the base mesh. \~
|
||||
const SPtr<MbMesh> & GetUnwrappedMesh() const { return _unwrappedMesh; }
|
||||
/// \ru Получить индекс ближайшего треугольника. \en Get the nearest triangle index. \~
|
||||
size_t GetNearestTriangleId() const { return _idNearest; }
|
||||
|
||||
/// \ru Рассчитать плоскую триангуляцию-развертку. \en Calculate the flat unwrapped mesh. \~
|
||||
void GetFlatUnwrappedMesh( SPtr<MbMesh> & flatMesh ) const;
|
||||
/// \ru Рассчитать регулярную прямоугольную сетку с заданным размером ячейки. \en Calculate the regular quad mesh with defined cell size. \~
|
||||
void GetQuadMesh( double cellSize, SPtr<MbMesh> & quadMesh );
|
||||
/// \ru Получить деформации треугольников. \en Get triangles deformations. \~
|
||||
void GetTrianglesDeformations( c3d::SpaceVectorsVector & deformations ) const;
|
||||
/// \ru Получить напряжения треугольников для заданного модуля Юнга. \en Get triangles strains for defined Young modulus. \~
|
||||
void GetTrianglesStrains( double young, c3d::DoubleVector & strains ) const;
|
||||
|
||||
/// \ru Функции для внутреннего использования. \en Functions for internal use. \~
|
||||
/// \ru Инициализировать по параметрам. \en Initialize by parameters. \~
|
||||
void InitByParams( const MbMeshUnwrapParams & params );
|
||||
/// \ru Получить ремешированную сетку. \en Get the remeshed mesh. \~
|
||||
SPtr<MbMesh> & SetUnwrappedMesh() { return _unwrappedMesh; }
|
||||
/// \ru Установить индекс ближайшего треугольника. \en Set the nearest triangle index. \~
|
||||
void SetNearestTriangleId( size_t id ) { _idNearest = id; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbMeshUnwrapResult );
|
||||
}; // MbMeshUnwrapResult
|
||||
#endif // __OP_MESH_PARAMETERS_H
|
||||
|
||||
+150
-261
@@ -11,39 +11,20 @@
|
||||
#define __OP_SHELL_PARAMETERS_H
|
||||
|
||||
|
||||
#include <templ_rp_array.h>
|
||||
#include <templ_array2.h>
|
||||
#include <templ_css_array.h>
|
||||
#include <templ_sptr.h>
|
||||
#include <math_version.h>
|
||||
#include <math_define.h>
|
||||
#include <mb_nurbs_function.h>
|
||||
#include <op_binding_data.h>
|
||||
#include <op_boolean_flags.h>
|
||||
#include <curve.h>
|
||||
#include <cr_split_data.h>
|
||||
#include <solid.h>
|
||||
#include <surface.h>
|
||||
#include <cur_contour_on_surface.h>
|
||||
#include <cr_split_data.h>
|
||||
#include <mb_nurbs_function.h>
|
||||
#include <op_direct_mod_parameter.h> // deprecated
|
||||
#include <op_swept_parameter.h>
|
||||
#include <surf_plane.h>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <part_solid.h>
|
||||
#include <topology_faceset.h>
|
||||
#include <position_data.h>
|
||||
#include <surf_plane.h>
|
||||
#include <part_solid.h>
|
||||
#include <surf_spine.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbPoint3D;
|
||||
class MATH_CLASS MbPolyCurve3D;
|
||||
class MATH_CLASS MbPolyline3D;
|
||||
class MATH_CLASS MbSurfaceCurve;
|
||||
class MATH_CLASS MbPlane;
|
||||
class MATH_CLASS MbCurveEdge;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbFaceShell;
|
||||
class MATH_CLASS MbSNameMaker;
|
||||
class MbRegTransform;
|
||||
class MbRegDuplicate;
|
||||
class MATH_CLASS IProgressIndicator;
|
||||
@@ -229,6 +210,25 @@ public:
|
||||
/// \ru Дать радиус кривизны/катет на второй поверхности. \en Get radius of curvature/leg on the second surface.
|
||||
double GetDistance2() const { return distance2; }
|
||||
|
||||
///< \ru Тип сопряжения скругление/фаска. \en Mate type of fillet/chamfer.
|
||||
MbeSmoothForm GetForm() const { return form; }
|
||||
void SetForm( MbeSmoothForm f ) { form = f; }
|
||||
///< \ru Способ обработки углов стыковки трёх рёбер. \en Method of processing corners of connection by three edges.
|
||||
CornerForm GetSmoothCorner() const { return smoothCorner; }
|
||||
void SetSmoothCorner( CornerForm f ) { smoothCorner = f; }
|
||||
///< \ru Продолжить по касательной. \en Prolong along the tangent.
|
||||
bool GetProlong() const { return prolong; }
|
||||
void SetProlong( bool p ) { prolong = p; }
|
||||
///< \ru Автоопределение сохранения кромки (ts_neutral), сохранение поверхности (ts_negative), сохранение кромки (ts_positive). \en Auto detection of boundary saving (ts_neutral), surface saving (ts_negative), boundary saving (ts_positive).
|
||||
ThreeStates GetKeepCant() const { return keepCant; }
|
||||
void SetKeepCant( ThreeStates s ) { keepCant = s; }
|
||||
///< \ru При false скруглить хотя бы то, что возможно. \en If false - round at least what is possible.
|
||||
bool GetStrict() const { return strict; }
|
||||
void SetStrict( bool s ) { strict = s; }
|
||||
///< \ru В углах сочленения вставлять тороидальную поверхность (для штамповки листового тела). \en In corners of the joint insert toroidal surface (for stamping sheet solid).
|
||||
bool GetEquable() const { return equable; }
|
||||
void SetEquable( bool e ) { equable = e; }
|
||||
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
SmoothValues & operator = ( const SmoothValues & other ) {
|
||||
Init( other );
|
||||
@@ -1447,184 +1447,6 @@ KNOWN_OBJECTS_RW_REF_OPERATORS( TransformValues ) // \ru Для работы с
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Типы модификации.
|
||||
\en Type of modification. \~
|
||||
\details \ru Тип определяет действия при прямом моделировании.
|
||||
\en Type determines direct modeling actions. \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
enum MbeModifyingType {
|
||||
dmt_Remove = 0, ///< \ru Удаление из тела выбранных граней с окружением. \en Removal of the specified faces with the neighborhood from a solid.
|
||||
dmt_Create, ///< \ru Создание тела из выбранных граней с окружением. \en Creation of a solid from the specified faces with the neighborhood.
|
||||
dmt_Action, ///< \ru Перемещение выбранных граней с окружением относительно оставшихся граней тела. \en Translation of the specified faces with neighborhood relative to the other faces of the solid.
|
||||
dmt_Offset, ///< \ru Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса). \en Replacement of the specified faces of a solid with the offset faces (translation along the normal, change of the radius).
|
||||
dmt_Fillet, ///< \ru Изменение радиусов выбранных граней скругления. \en Change of radii of the specified fillet faces.
|
||||
dmt_Supple, ///< \ru Замена выбранных граней тела деформируемыми гранями (превращение в NURBS для редактирования). \en Replacement of the specified faces of a solid with a deformable faces (conversion to NURBS for editing).
|
||||
dmt_Purify, ///< \ru Удаление из тела выбранных скруглений. \en Removal of the specified fillets from a solid.
|
||||
dmt_Merger, ///< \ru Слияние вершин ребёр и удаление рёбер. \en Merging vertices of edges and edges removal.
|
||||
dmt_United, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
dmt_Rotate, ///< \ru Поворот выбранных граней тела. \en Rotate the chosen faces.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры прямого редактирования тела.
|
||||
\en Parameters for a solid direct modification. \~
|
||||
\details
|
||||
\ru Параметры прямого редактирования тела содержат тип операции (#MbeModifyingType) и её параметры.
|
||||
В зависимости от параметра way возможны следующие действия: \n
|
||||
1. Удаление из тела выбранных граней с окружением (way==dmt_Remove).
|
||||
По-умолчанию грани удаляются вместе с прилегающими скруглениями.
|
||||
Для удаления без прилегающих скруглений выставить флаг removeWithFillets = false.\n
|
||||
2. Создание тела из выбранных граней с окружением (way==dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (way==dmt_Action).
|
||||
Направление и величину перемещения определяет вектор direction. \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса)
|
||||
(way==dmt_Offset). Расстояние смещения определяется параметром value или длиной вектора direction.\n
|
||||
5. Изменение радиуса выбранных граней скругления (way==dmt_Fillet).
|
||||
Величина изменения радиуса определяется параметром value или длиной вектора direction.\n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования (way==dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (way==dmt_Purify). \n
|
||||
8. Слияние вершин ребёр и удаление рёбер (way==dmt_Merger). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (way==dmt_United). \n
|
||||
10. Поворот выбранных граней (way==dmt_Rotate). Угол поворота определяется параметром value,
|
||||
ось поворота определяется точкой origin и направлением direction.\n
|
||||
|
||||
\en Parameters for a solid direct modification include the type of operation (#MbeModifyingType) and its parameters.
|
||||
The possible operations depend on the 'way' parameter and are listed below: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (way==dmt_Remove).
|
||||
By default the faces are removed with the connected fillets.
|
||||
To remove without connected fillets set the flag removeWithFillets = false.\n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (way==dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (way==dmt_Action).
|
||||
The translation direction is defined by the 'direction' vector.\n
|
||||
4. Replacement of the specified faces by offset faces (way==dmt_Offset).
|
||||
The distance of the offset (or radius change) is defined by 'value' or by the length of 'direction'. \n
|
||||
5. Radius change of the specified fillet faces (way==dmt_Fillet).
|
||||
The value of radius change is defined by 'value' or by the length of 'direction'.\n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (way==dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (way==dmt_Purify). \n
|
||||
8. Edge vertices merging and edges removal (way==dmt_Merger). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (way==dmt_United). \n
|
||||
10. Rotation of the chosen faces (way==dmt_Rotate). The rotation angle is defined by the 'value',
|
||||
the rotation axis is defined by the point 'origin' and 'direction' vector.\n \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
struct MATH_CLASS ModifyValues {
|
||||
public:
|
||||
MbeModifyingType way; ///< \ru Тип модификации. \en Type of modification.
|
||||
MbVector3D direction; ///< \ru Перемещение при модификации. \en Moving when modifying.
|
||||
MbCartPoint3D origin; ///< \ru Точка опоры при модификации. \en Fulcrum when modifying.
|
||||
double value; ///< \ru Величина смещения/изменение радиуса. \en Offset value/change of radius.
|
||||
double tolerance; ///< \ru Точность построения. \en Operation tolerance.
|
||||
bool removeWithFillets; ///< \ru Удалять грань вместе с прилегающими скруглениями. \en Whether to delete a face toghether with ajacent fillets.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор параметров операции удаления из тела выбранных граней.
|
||||
\en Constructor of operation parameters of removing the specified faces from the solid. \~
|
||||
*/
|
||||
ModifyValues()
|
||||
: way ( dmt_Remove )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( 0.0 )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и вектору перемещения. \en Constructor by way of modification and movement vector.
|
||||
ModifyValues( MbeModifyingType w, const MbVector3D & p )
|
||||
: way ( w )
|
||||
, direction( p )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( 0.0 )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и скалярному параметру. \en Constructor by way of modification and the scalar value.
|
||||
ModifyValues( MbeModifyingType w, double val, double eps = Math::metricAccuracy )
|
||||
: way ( w )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( val )
|
||||
, tolerance( eps )
|
||||
, removeWithFillets ( true )
|
||||
{}
|
||||
/// \ru Конструктор по способу модификации и скалярному параметру. \en Constructor by way of modification and the scalar value.
|
||||
ModifyValues( MbeModifyingType w, double val, bool removeAjacentFillets )
|
||||
: way ( w )
|
||||
, direction( 0.0, 0.0, 0.0 )
|
||||
, origin ( 0.0, 0.0, 0.0 )
|
||||
, value ( val )
|
||||
, tolerance( Math::metricAccuracy )
|
||||
, removeWithFillets ( removeAjacentFillets )
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
ModifyValues( const ModifyValues & other )
|
||||
: way ( other.way )
|
||||
, direction( other.direction )
|
||||
, origin ( other.origin )
|
||||
, value ( other.value )
|
||||
, tolerance( other.tolerance )
|
||||
, removeWithFillets ( other.removeWithFillets)
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~ModifyValues() {}
|
||||
public:
|
||||
/// \ru Функция копирования. \en Copy function.
|
||||
void Init( const ModifyValues & other ) {
|
||||
way = other.way;
|
||||
direction = other.direction;
|
||||
origin = other.origin;
|
||||
value = other.value;
|
||||
tolerance = other.tolerance;
|
||||
removeWithFillets = other.removeWithFillets;
|
||||
}
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
ModifyValues & operator = ( const ModifyValues & other ) {
|
||||
way = other.way;
|
||||
direction = other.direction;
|
||||
origin = other.origin;
|
||||
value = other.value;
|
||||
tolerance = other.tolerance;
|
||||
removeWithFillets = other.removeWithFillets;
|
||||
return *this;
|
||||
}
|
||||
/// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix.
|
||||
void Transform( const MbMatrix3D & matr );
|
||||
/// \ru Сдвинуть объект вдоль вектора. \en Move an object along a vector.
|
||||
void Move ( const MbVector3D & to );
|
||||
/// \ru Повернуть объект вокруг оси на заданный угол. \en Rotate an object at a given angle around an axis.
|
||||
void Rotate ( const MbAxis3D & axis, double ang );
|
||||
/// \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const ModifyValues & other, double accuracy ) const;
|
||||
|
||||
/// \ru Перемещение при модификации. \en Moving when modifying.
|
||||
const MbVector3D & GetDirection() const { return direction; }
|
||||
/// \ru Перемещение при модификации. \en Moving when modifying.
|
||||
void SetDirection( const MbVector3D & d ) { direction = d; }
|
||||
/// \ru Точка опоры при модификации. \en Fulcrum when modifying.
|
||||
const MbCartPoint3D & GetOrigin() const { return origin; }
|
||||
/// \ru Точка опоры при модификации. \en Fulcrum when modifying.
|
||||
void SetOrigin( const MbCartPoint3D & p ) { origin = p; }
|
||||
/// \ru Величина смещения/изменение радиуса. \en Offset value/change of radius.
|
||||
double GetValue() const { return value; }
|
||||
/// \ru Величина смещения/изменение радиуса. \en Offset value/change of radius.
|
||||
void SetValue( double v ) { value = v; }
|
||||
/// \ru Точность построения. \en Operation tolerance.
|
||||
double GetTolerance() const { return tolerance; }
|
||||
/// \ru Точность построения. \en Operation tolerance.
|
||||
void SetTolerance( double t ) { tolerance = ::fabs( t ); }
|
||||
/// \ru Установить флаг удаления сопряжённых скруглений. \en Set the flag to remove ajacent fillets.
|
||||
void SetRemoveFillets( bool remove ) { removeWithFillets = remove; }
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( ModifyValues ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры деформируемой грани.
|
||||
\en Parameters of the deformable face. \~
|
||||
@@ -4882,7 +4704,8 @@ class MATH_CLASS MbEvolutionShellParams : public MbPrecision
|
||||
protected:
|
||||
const MbSweptData & _sweptData; ///< \ru Данные об образующей. \en The generating curve data. \~
|
||||
const MbCurve3D * _spineCurve; ///< \ru Направляющая кривая. \en The spine curve. \~
|
||||
const MbSpine * _spine; ///< \ru Направляющая кривая c дополнительной информацией. \en The spine curve with additional data. \~
|
||||
const MbWireFrame * _spineFrame; ///< \ru Направляющая кривая в виде проволочного каркаса. \en Spine curve as a wire frame. \~
|
||||
const MbSpine * _spine; ///< \ru Направляющая кривая c дополнительной информацией. \en The spine curve with additional data. \~
|
||||
const MbSNameMaker & _operName; ///< \ru Именователь операции. \en An object defining names generation in the operation. \~
|
||||
const MbSNameMaker & _spineName; ///< \ru Именователь направляющей. \en An object defining the name of a spine curve. \~
|
||||
std::vector<const MbSNameMaker *> _contoursNames; ///< \ru Именователь контуров образующей. \en An object defining the names of generating curve contours. \~
|
||||
@@ -4896,25 +4719,25 @@ public:
|
||||
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en An operation progress indicator.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spineCurve - \ru Направляющая кривая.
|
||||
\en The spine curve. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spineCurve - \ru Направляющая кривая.
|
||||
\en The spine curve. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
MbEvolutionShellParams( const MbSweptData & sweptData,
|
||||
const MbCurve3D & spineCurve,
|
||||
const EvolutionValues & evolParams,
|
||||
@@ -4923,25 +4746,52 @@ public:
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spineFrame - \ru Направляющая кривая в виде проволочного каркаса.
|
||||
\en Spine curve as a wire frame. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
MbEvolutionShellParams( const MbSweptData & sweptData,
|
||||
const MbWireFrame & spineFrame,
|
||||
const EvolutionValues & evolParams,
|
||||
const MbSNameMaker & operName,
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
MbEvolutionShellParams( const MbSweptData & sweptData,
|
||||
const MbSpine & spine,
|
||||
const EvolutionValues & evolParams,
|
||||
@@ -4950,29 +4800,29 @@ public:
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] funcs - \ru Функции ограничений, наложенных на сегменты контуров образующей (при использовании динамической параметризации сечения).
|
||||
\en Functions of constraints imposed on segments of generating curve contours (when using variable section). \~
|
||||
\param[in] sectionData - \ru Интерфейс для получения сечений в кинематической операции с динамической параметризацией сечения.
|
||||
\en An interface for obtaining sections for sweeping operation with variable section. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] funcs - \ru Функции ограничений, наложенных на сегменты контуров образующей (при использовании динамической параметризации сечения).
|
||||
\en Functions of constraints imposed on segments of generating curve contours (when using variable section). \~
|
||||
\param[in] sectionData - \ru Интерфейс для получения сечений в кинематической операции с динамической параметризацией сечения.
|
||||
\en An interface for obtaining sections for sweeping operation with variable section. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
\param[in] prog - \ru Индикатор прогресса выполнения операции.
|
||||
\en An operation progress indicator. \~
|
||||
*/
|
||||
MbEvolutionShellParams( const MbSweptData & sweptData,
|
||||
const MbSpine & spine,
|
||||
const EvolutionValues & evolParams,
|
||||
@@ -4995,6 +4845,9 @@ public:
|
||||
/// \ru Получить направляющую кривую с дополнительной информацией. \en Get the spine curve with additional information. \~
|
||||
const MbSpine * GetSpine() const;
|
||||
|
||||
/// \ru Получить направляющую кривую в виде проволочного каркаса. \en Get the spine curve as a wire frame. \~
|
||||
const MbWireFrame * GetSpineFrame() const;
|
||||
|
||||
/// \ru Получить параметры операции. \en Get the operation parameters. \~
|
||||
const EvolutionValues & GetEvolutionParameters() const;
|
||||
|
||||
@@ -6686,4 +6539,40 @@ private:
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru результаты построения тела уклона.
|
||||
\en Results of creating a draft's solid. \~
|
||||
\details \ru Результаты построения тела уклона содержат тело уклона и атрибут хот-точки уклона.
|
||||
\en Results of creating a draft's solid contains draft's solid and hot-point's attribute. \~
|
||||
\ingroup ingroup Shell_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbDraftSolidResults : public MbOperationResults
|
||||
{
|
||||
private:
|
||||
c3d::SolidSPtr _resultSolid; ///< \ru Результирующее тело. \en The resulting solid.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor. \~
|
||||
MbDraftSolidResults()
|
||||
: MbOperationResults()
|
||||
, _resultSolid ()
|
||||
{}
|
||||
/// \ru Функция инициализации. \en Initialization function.
|
||||
void Init( const MbOperationResults & operatResults,
|
||||
const c3d::SolidSPtr & resultSolid ) {
|
||||
MbOperationResults::Init( operatResults.GetHotPointAttribute(), operatResults.GetTolerance() );
|
||||
_resultSolid = resultSolid;
|
||||
}
|
||||
/// \ru Функция инициализации. \en Initialization function.
|
||||
void Init( const c3d::SolidSPtr & resultSolid ) {
|
||||
_resultSolid = resultSolid;
|
||||
}
|
||||
/// \ru Получить результирующее тело. \en Get resulting solid.
|
||||
c3d::SolidSPtr GetResultSolid() const { return _resultSolid; }
|
||||
/// \ru Получить результирующее тело. \en Get resulting solid.
|
||||
c3d::SolidSPtr & SetResultSolid() { return _resultSolid; }
|
||||
OBVIOUS_PRIVATE_COPY( MbDraftSolidResults )
|
||||
}; // MbDraftSolidResults
|
||||
|
||||
#endif // __OP_SHELL_PARAMETERS_H
|
||||
|
||||
@@ -22,6 +22,7 @@ const VERSION SPINE_ALG_VERSION2 = 0x0D000023L; // \ru Добавлено соз
|
||||
|
||||
|
||||
class MATH_CLASS MbSpine;
|
||||
class MATH_CLASS MbWireFrame;
|
||||
|
||||
namespace c3d // namespace C3D
|
||||
{
|
||||
@@ -251,6 +252,43 @@ public:
|
||||
static MbSpine * Create( const MbCurve3D & sp, bool sameS, const MbSurface & surf, const MbCurve * pCrv,
|
||||
VERSION vers );
|
||||
|
||||
/** \brief \ru Конструктор каркасу.
|
||||
\en Constructor by wireFrame. \~
|
||||
\details \ru Конструктор каркасу.\n
|
||||
\en Constructor by wireFrame. \n \~
|
||||
\param[in] wireFrame - \ru Каркас с направляющей кривой.
|
||||
\en Wire frame with a spine curve. \~
|
||||
\param[in] same - \ru Признак использования оригинала направляющей кривой, а не ее копии
|
||||
\en Attribute of using the original of spine curve instead of its copy \~
|
||||
\param[in] direction - \ru Вектор ориентации матрицы преобразования.
|
||||
\en Vector of transformation matrix orientation. \~
|
||||
\param[in] parallel - \ru Признак параллельного переноса
|
||||
\en Attribute of parallel translation. \~
|
||||
\param[in] version - \ru Версия вычисления осей локальной системы координат.
|
||||
\en Version of calculation the local coordinate system. \~
|
||||
\return \ru Возвращает указатель на созданный объект или нулевой указатель в случае неудачи.
|
||||
\en Returns pointer to the created object or null pointer in case of failure. \~
|
||||
*/
|
||||
static MbSpine * Create( const MbWireFrame & wireFrame, bool same, const MbVector3D * direction, bool parallel, VERSION version );
|
||||
/** \brief \ru Конструктор каркасу.
|
||||
\en Constructor by wireFrame. \~
|
||||
\details \ru Конструктор каркасу.\n
|
||||
\en Constructor by wireFrame. \n \~
|
||||
\param[in] wireFrame - \ru Направляющая кривая
|
||||
\en A spine curve \~
|
||||
\param[in] same - \ru Признак использования оригинала направляющей кривой, а не ее копии
|
||||
\en Attribute of using the original of spine curve instead of its copy \~
|
||||
\param[in] surface - \ru Поверхность направляющей кривой.
|
||||
\en The surface of the sp, it should be curve on surface. \~
|
||||
\param[in] pCurve - \ru Двумерная кривая на поверхности направляющей кривой.
|
||||
\en The two-dimensional curve on the surface of the guide curve. \~
|
||||
\param[in] version - \ru Версия вычисления осей локальной системы координат.
|
||||
\en Version of calculation the local coordinate system. \~
|
||||
\return \ru Возвращает указатель на созданный объект или нулевой указатель в случае неудачи.
|
||||
\en Returns pointer to the created object or null pointer in case of failure. \~
|
||||
*/
|
||||
static MbSpine * Create( const MbWireFrame & wireFrame, bool same, const MbSurface & surface, const MbCurve * pCurve, VERSION version );
|
||||
|
||||
/** \} */
|
||||
/** \ru \name Базовые функции
|
||||
\en \name Base functions
|
||||
|
||||
@@ -75,7 +75,11 @@
|
||||
// https://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler
|
||||
// https://software.intel.com/en-us/articles/c14-features-supported-by-intel-c-compiler
|
||||
// https://software.intel.com/en-us/articles/c17-features-supported-by-intel-c-compiler
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1914)) || (C3D_GCC_VERSION >= 70000) || (C3D_ICC_VERSION >= 1910) || \
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1929)) || (C3D_GCC_VERSION >= 120000) || \
|
||||
(!defined(__apple_build_version__) && C3D_CLANG_VERSION >= 1600) || \
|
||||
(defined(__apple_build_version__) && __apple_build_version__ >= 1400)
|
||||
#define C3D_STANDARD_CXX 2020
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1914)) || (C3D_GCC_VERSION >= 70000) || (C3D_ICC_VERSION >= 1910) || \
|
||||
(!defined(__apple_build_version__) && C3D_CLANG_VERSION >= 500) || \
|
||||
(defined(__apple_build_version__) && __apple_build_version__ >= 901)
|
||||
#define C3D_STANDARD_CXX 2017
|
||||
|
||||
@@ -14,10 +14,8 @@
|
||||
#include <templ_rp_array.h>
|
||||
#include <templ_css_array.h>
|
||||
#include <templ_three_states.h>
|
||||
#include <templ_sptr.h>
|
||||
#include <tool_multithreading.h>
|
||||
#include <mb_rect.h>
|
||||
#include <mb_placement3d.h>
|
||||
#include <mb_rect1d.h>
|
||||
#include <mb_data.h>
|
||||
#include <mb_enum.h>
|
||||
@@ -45,7 +43,6 @@ class MATH_CLASS MbOrientedEdge;
|
||||
class MATH_CLASS MbLoop;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbFunction;
|
||||
struct MATH_CLASS MbItemIndex;
|
||||
class MbFaceTemp;
|
||||
|
||||
|
||||
|
||||
@@ -1499,26 +1499,25 @@ public:
|
||||
explicit MbCheckTopologyParams( bool doMergingEdges,
|
||||
const MbSNameMaker & nMaker,
|
||||
double tolerance = Math::paramAccuracy )
|
||||
: MbPrecision()
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( )
|
||||
: MbPrecision ( tolerance, ANGLE_REGION )
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( )
|
||||
{
|
||||
SetTolerance( tolerance );
|
||||
}
|
||||
template <class Faces>
|
||||
explicit MbCheckTopologyParams( bool doMergingEdges,
|
||||
const MbSNameMaker & nMaker,
|
||||
const Faces & faces,
|
||||
double tolerance = Math::paramAccuracy )
|
||||
: MbPrecision()
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( )
|
||||
: MbPrecision ( tolerance, ANGLE_REGION )
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( )
|
||||
{
|
||||
size_t facesCnt = faces.size();
|
||||
if ( facesCnt > 0 ) {
|
||||
@@ -1527,7 +1526,6 @@ public:
|
||||
controlFaces.push_back( faces[k] );
|
||||
std::sort( controlFaces.begin(), controlFaces.end() );
|
||||
}
|
||||
SetTolerance( tolerance );
|
||||
}
|
||||
template <class Faces>
|
||||
explicit MbCheckTopologyParams( bool doMergingEdges,
|
||||
@@ -1535,12 +1533,12 @@ public:
|
||||
const Faces & faces,
|
||||
const c3d::ConstEdgesVector & edges,
|
||||
double tolerance = Math::paramAccuracy )
|
||||
: MbPrecision()
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( edges )
|
||||
: MbPrecision ( tolerance, ANGLE_REGION )
|
||||
, mergeEdges ( doMergingEdges )
|
||||
, nameMaker ( &nMaker.Duplicate() )
|
||||
, lastMainName ( c3d::SIMPLENAME_MAX ) // \ru Неизвестно. \en Unknown.
|
||||
, controlFaces ( )
|
||||
, boundaryEdges( edges )
|
||||
{
|
||||
size_t facesCnt = faces.size();
|
||||
if ( facesCnt > 0 ) {
|
||||
@@ -1550,7 +1548,6 @@ public:
|
||||
std::sort( controlFaces.begin(), controlFaces.end() );
|
||||
}
|
||||
std::sort( boundaryEdges.begin(), boundaryEdges.end() );
|
||||
SetTolerance( tolerance );
|
||||
}
|
||||
~MbCheckTopologyParams() {}
|
||||
public:
|
||||
|
||||
@@ -354,6 +354,8 @@ private:
|
||||
bool IsConnectedWith( const MbEdge & );
|
||||
/// \ru Нормализовать ребро (выставить общую вершину замкнутого ребра) \en Normalize an edge (set the common vertex af a closed edge)
|
||||
void NormalizeEdge( MbEdge & );
|
||||
/// \ru Инициализировать ребро по кривой и ее ориентации в ребре. \en Init an edge by a curve and its orientation in relation to an edge.
|
||||
MbEdge * InitEdge( const MbCurve3D &, bool sense );
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbWireFrame )
|
||||
OBVIOUS_PRIVATE_COPY( MbWireFrame )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user