- C3d aggiornamento librerie ( 118037).
This commit is contained in:
SaraP
2025-06-05 08:23:20 +02:00
parent eebbd2f314
commit 52f91a1dbb
46 changed files with 430 additions and 915 deletions
-43
View File
@@ -480,49 +480,6 @@ MATH_FUNC( double ) CurveOrientedCurvature( const MbCurve3D & curve,
const MbVector3D * planeNorm = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Найти точки на кривой, в которых кривизна принимает наибольшее и наименьшее значения.
\en Find the points on the curve at which the curvature takes the largest and smallest values. \~
\details \ru Для плоской кривой наибольшее и наименьшее значение может уходить в отрицательную область.
Для неплоской кривой наибольшее и наименьшее значение всегда неотрицательны.
\en For a flat curve, the largest and smallest value may go into the negative region.
For a non-planar curve, the largest and smallest values are always non-negative. \~
\deprecated \ru Метод устарел, взамен использовать #CurveMinMaxCurvature с набором параметров #MbCurveMinMaxCurvatureParams.
\en The method is deprecated, instead use #CurveMinMaxCurvature with the parameter list #MbCurveMinMaxCurvatureParams. \~
\param[in] curve - \ru Исследуемая кривая.
\en Test curve. \~
\param[out] maxCurv - \ru Наибольшее значение кривизны.
\en The greatest value of curvature. \~
\param[out] maxParam - \ru Точка, в которой кривизна принимает наибольшее значение.
\en The point at which the curvature takes the largest value. \~
\param[out] minCurv - \ru Наименьшее значение кривизны.
\en The smallest value of curvature. \~
\param[out] minParam - \ru Точка, в которой кривизна принимает наименьшее значение.
\en The point at which the curvature takes the smallest value. \~
\param[out] bendPoints - \ru Массив параметров точек перегиба.
\en Array of parameters of bend points. \~
\param[out] maxPoints - \ru Массив параметров, в которых достигается локальный максимум кривизны по модулю.
\en An array of parameters in which the local maximum curvature modulo is reached. \~
\param[out] minPoints - \ru Массив параметров, в которых достигается локальный минимум кривизны по модулю.
\en An array of parameters in which the local minimum curvature modulo is reached. \~
\param[out] rapPoints - \ru Массив параметров, в которых кривизна терпит разрыв.
Для каждого разрыва вставляются две точки, до и после.
\en Array of parameters in which curvature breaks.
For each break two points are inserted, before and after. \~
\ingroup Algorithms_3D
*/
DEPRECATE_DECLARE_REPLACE( CurveMinMaxCurvature with MbCurveMinMaxCurvatureParams)
MATH_FUNC( void ) CurveMinMaxCurvature( const MbCurve3D & curve,
double & maxCurv,
double & maxParam,
double & minCurv,
double & minParam,
c3d::DoubleVector * bendPoints = nullptr,
c3d::DoubleVector * maxPoints = nullptr,
c3d::DoubleVector * minPoints = nullptr,
c3d::DoublePairsVector * rapPoints = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Направление максимальной нормальной кривизны поверхности.
\en The direction of the maximum normal surface curvature. \~
-26
View File
@@ -468,30 +468,4 @@ MATH_FUNC( MbResultType ) ConvertMeshToShell( MbMesh & mesh, MbFaceShell *& shel
// ---
MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, MbFaceShell *& shell, const MbMeshProcessorValues & params = MbMeshProcessorValues() );
//------------------------------------------------------------------------------
/** \brief \ru Вписать поверхность в множество полигонов сетки.
\en Fit the surface into polygon set. \~
\details \ru Вписать поверхность заданного типа в множество полигонов триангуляции. \n
В случае если множество полигонов не задано, используются
все полигоны триангуляции.
\en Fit a surface of a given type into the polygon set. \n
If the set of polygons is not specified, all triangulation polygons are used. \~
\param[in] grid - \ru Исходная триангуляция.
\en The initial triangulation. \~
\param[in] params - \ru Параметры вписывания поверхности.
\en The fitting parameters. \~
\param[out] results - \ru Результаты вписывания поверхности.
\en Results of surface fitting. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Polygonal_Objects
\deprecated
*/
// ---
DEPRECATE_DECLARE_REPLACE( MbSurfaceFitter )
MATH_FUNC( MbResultType ) FitSurfaceToGrid( const MbGrid & grid, const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results );
#endif // __ACTION_B_SHAPER_H
+26
View File
@@ -876,4 +876,30 @@ MATH_FUNC ( MbCurve * ) SetProportionalParametrization( MbCurve * curve,
*/
// ---
MATH_FUNC( MbResultType ) FitCurve( const MbCurveFitParameters & params, MbCurveFitResults & results );
//------------------------------------------------------------------------------
/** \brief \ru Построить срединную кривую.
\en Create median curve. \~
\details \ru Построить срединную кривую.
\en Create median curve. \~
\param[in] baseCurve - \ru Базовая кривая.
\en The base curve. \~
\param[in] responseCurve - \ru Ответная кривая.
\en The response curve. \~
\param[in] params - \ru Параметры построения.
\en The parameters for creating median curve. \~
\param[out] results - \ru Результаты построения.
\en The results of creating median curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve_Modeling
\warning \ru В разработке.
\en Under development. \~
*/
// ---
MATH_FUNC( MbResultType ) MedianCurve( const MbCurve & baseCurve,
const MbCurve & responseCurve,
const MbMedianCurveParams & params,
MbMedianCurveResults & results );
#endif // __ACTION_CURVE_H
-30
View File
@@ -195,36 +195,6 @@ MATH_FUNC (MbResultType) NurbsCurve( const SArray<MbCartPoint3D> & pointList,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать Nurbs кривую с сортировкой точек по расстоянию, проходящую по набору точек.
\en Create a Nurbs curve with sorting points by distance passing through a set of points. \~
\details \ru Создать Nurbs кривую с сортировкой точек по расстоянию, проходящую по набору точек, следующего типа: \n
\en Create a Nurbs curve with sorting points by distance passing through a set of points that has the following type: \n
\param[in] pointList - \ru Исходные точки.
\en The initial curve. \~
\param[in] curveClosed - \ru Замкнутость кривой.
\en Closure of the curve. \~
\param[in] degree - \ru Степень кривой (для Nurbs).
\en A curve degree (for Nurbs). \~
\param[in] mode - \ru Вариант построения кривой.
\en A Curve construction option. \~
\param[in/out] accuracy - \ru Требуемая точность / максимальное отклонение построенной кривой.
\en Thye desired accuracy / max deviation of constructed curve. \~
\param[out] result - \ru Построенная кривая.
\en The constructed curve. \~
\return \ru Возвращает среднее отклонение построенной кривой.
\en Returns average deviation of constructed curve. \~
\ingroup Curve3D_Modeling
*/
// ---
DEPRECATE_DECLARE MATH_FUNC (double) NurbsFitting( const std::vector<MbCartPoint3D> & pointList,
bool curveClosed,
size_t degree,
size_t mode,
double & accuracy,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать копию кривой в виде NURBS.
\en Create a copy of a curve as a NURBS-curve. \~
-26
View File
@@ -625,19 +625,6 @@ MATH_FUNC (MbResultType) CalculateBallPivotingGrid( const MbCollection & collect
// ---
MATH_FUNC(MbOrientedBox) CalculateBoundingBox( const MbMesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Исправить несовместную ориентацию полигонов сетки по отношению друг к другу.
\en Repair inconsistent orientation of mesh polygons with respect to each other. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
\deprecated
*/ // ---
DEPRECATE_DECLARE_REPLACE( RepairInconsistentMesh with parameter )
MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
//------------------------------------------------------------------------------
/** \brief \ru Исправить несовместную ориентацию полигонов сетки по отношению друг к другу.
\en Repair inconsistent orientation of mesh polygons with respect to each other. \~
@@ -803,19 +790,6 @@ protected:
MbDrapMaker() {}
public:
/** \brief \ru Создать экземпляр класса по параметрам развертки и размеру ячейки.
\en Create class instance by parameters and cell size. \~
\details \ru Создать экземпляр класса по параметрам развертки и размеру ячейки. Пользователь должен сам удалить объект.
\en Create class instance by parameters and cell size. User must delete created object. \~
\param[in] params - \ru Параметры развертки. \n
\en Unwrapping parameters. \~
\param[in] cellSize - \ru Размер ячейки ткани. \n
\en Fiber cell size. \~
\return \ru Возвращает указатель на созданный объект.
\en Returns pointer to created object. \~
*/
DEPRECATE_DECLARE_REPLACE( DrapeShell )
static MbDrapMaker * Create( const MbMeshUnwrapParams & params, double cellSize );
/// \ru Деструктор. \en Destructor.
virtual ~MbDrapMaker() {}
-46
View File
@@ -149,24 +149,6 @@ MATH_FUNC( void ) GetPolymeshRegionBoundaries( const MbPolymesh &
std::vector<c3d::IndicesVector> & boundaries );
//------------------------------------------------------------------------------
/** \brief \ru Получить границы региона фасетов.
\en Get the border edges of a given region. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[in] region - \ru Набор фасетов, составляющих регион.
\en Facet array which forms a region. \~
\param[out] borders - \ru Границы региона (набор граничных ребер).
\en Border edges of a region. \~
\warning \ru В разработке.
\en Under development. \~
*/ // ---
DEPRECATE_DECLARE_REPLACE( GetPolymeshRegionBoundaries )
MATH_FUNC( void ) GetPolymeshRegionBorders( const MbPolymesh & mesh,
const c3d::IndicesVector & region,
std::vector<c3d::IndicesVector> & borders );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сетки.
\en Get the open boundary edges of a polymesh. \~
@@ -180,20 +162,6 @@ MATH_FUNC( void ) GetPolymeshRegionBorders( const MbPolymesh &
MATH_FUNC( void ) GetPolymeshOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сетки.
\en Get the open border edges of a polymesh. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[out] borders - \ru Открытые границы (наборы граничных ребер).
\en Arrays of open border edges. \~
\warning \ru В разработке.
\en Under development. \~
*/ // ---
DEPRECATE_DECLARE_REPLACE( GetPolymeshOpenBoundaries )
MATH_FUNC( void ) GetPolymeshOpenBorders( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & borders );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сегментации.
\en Get open segmentation boundaries. \~
@@ -207,20 +175,6 @@ MATH_FUNC( void ) GetPolymeshOpenBorders( const MbPolymesh & mesh, std::vector<c
MATH_FUNC( void ) GetSegmOpenBoundaries( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & boundaries );
//------------------------------------------------------------------------------
/** \brief \ru Получить открытые границы сегментации.
\en Get open segmentation borders. \~
\param[in] mesh - \ru Полигональный объект с топологией.
\en A polygonal object with topology. \~
\param[out] borders - \ru Открытые границы (наборы граничных ребер сегментации).
\en Arrays of open border edges of a segmentation. \~
\warning \ru В разработке.
\en Under development. \~
*/ // ---
DEPRECATE_DECLARE_REPLACE( GetSegmOpenBoundaries )
MATH_FUNC( void ) GetSegmOpenBorders( const MbPolymesh & mesh, std::vector<c3d::IndicesVector> & borders );
/// \ru Получить полилинию для ребра сегментации.
MATH_FUNC( bool ) GetPolymeshEdgePolyline( const MbPolymesh & mesh, size_t iEdSegm, c3d::SpacePointsVector & polyline );
+4 -18
View File
@@ -82,8 +82,8 @@ public:
\en Add a new instance of a reused solid into the component. \~
\param[in] compItem - \ru Компонент, которому будет принадлежать экземпляр.
\en A component to witch the instance will belong.
\param[in] solidItem - \ru Оригинальное тело, добавленное методом #AddSolid, по которому изготавливается экземпляр.
\en An original solid added by the method #AddSolid by which the instance is made.
\param[in] solidItem - \ru Оригинальное тело, добавленное методом #AddItem, по которому изготавливается экземпляр.
\en An original solid added by the method #AddItem by which the instance is made.
\param[in] place - \ru Положение, которое занимает тело экземпляра в глобальной СК.
\en The placement that the instance solid takes in global space.
\return \ru Новый экземпляр тела, зарегистрированный в аппарате контроля столкновений.
@@ -175,8 +175,6 @@ public: // the functions below can be deprecated in future version.
cdet_item AddSolid( const MbLumpAndFaces & );
/// \note \ru Вызов устарел. Вместо него используйте AddInstance. \en The call is deprecated. Use AddInstance instead. \~
cdet_item AddMesh( const MbMesh & mesh, const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL, double delta = 0. );
/// \ru Добавить тело с заданным положением. \en Add a solid with a given placement.
DEPRECATE_DECLARE cdet_item AddSolid(const MbSolid &, const MbPlacement3D &, cdet_app_item = CDET_APP_NULL, double delta = 0.);
/// \ru Удалить твердотельную модель или луч из детектора столкновений. \en Remove a solid model or ray from a collision detector.
void RemoveSolid( cdet_item );
/// \ru Выдать количество добавленных твердотельных моделей или лучей. \en Get number of added solid models or rays.
@@ -220,18 +218,6 @@ public: /*
// For testing purposes
const MtRefItem * _ComputeBVTree( cdet_item );
private:
/*
\brief \ru Добавить объект геометрической модели в набор для контроля столкновений.
\en Add an object of geometric model to the set of collision detection control. \~
\return \ru Объект в наборе для контроля столкновений. \en Object of the set of collision detection. \~
*/
cdet_item AddItem( const MbItem & );
// Set an assembly to detect collisions between its elements
void SetAssembly( const MbAssembly & );
void UpdateGeometry();
private:
OBVIOUS_PRIVATE_COPY( CdCollisionDetection );
@@ -259,8 +245,8 @@ MATH_FUNC(cdet_bvt_pair) BvtSubNodes( cdet_item, cdet_bvt_node );
//---
MATH_FUNC(void) GetOrientedBox( cdet_item, cdet_bvt_node, MbMatrix3D & );
// deprecated typename.
using MbCollisionDetectionUtility = CdCollisionDetection;
// deprecated typename since 2025.05. Use CdCollisionDetection instead.
using MbCollisionDetectionUtility = struct {};
#endif // __CDET_UTILITY_H
+2
View File
@@ -60,6 +60,8 @@ public:
/** \} */
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
OBVIOUS_PRIVATE_COPY( MbBeamCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBeamCreator )
+2 -27
View File
@@ -37,10 +37,6 @@ private:
MbExtendCurveCreator(); // \ru Не реализовано. \en Not implemented.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
DEPRECATE_DECLARE_REPLACE ( without MbCurve3D )
MbExtendCurveCreator( const MbCurve3D & curve, const MbCurveExtensionParameters3D & extendParams );
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbExtendCurveCreator( const MbCurveExtensionParameters3D & extendParams );
@@ -66,6 +62,8 @@ public:
/** \} */
bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell, RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построить проволочный каркас по исходным данным. \en Create a wire-frame from the source data. \~
const MbPrecision & GetPrecision() const override { return _parameters; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbExtendCurveCreator & );
@@ -76,27 +74,4 @@ private:
IMPL_PERSISTENT_OPS( MbExtendCurveCreator )
//------------------------------------------------------------------------------
/** \brief \ru Создание строителя продления кривой.
\en Create a constructor of curve extending. \~
\details \ru Создание строителя продления кривой.\n
\en Create a constructor of extending curve.\n \~
\param[in] sourceCurve - \ru Исходная (продлеваемая) кривая.
\en Source (extended) curve. \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of the operation. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Возвращаемая (удлиненная) кривая. Может быть nullptr.
\en The curve returned (extended). Can be nullptr. \~
\result \ru Возвращает строитель.
\en Returns the creator. \~
\ingroup Curve3D_Modeling
*/
// ---
DEPRECATE_DECLARE
MATH_FUNC( c3d::CreatorSPtr ) CreateExtendedCurve( const MbCurve3D & sourceCurve,
const MbCurveExtensionParameters3D & parameters,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
#endif // __CR_EXTENDING_CURVE_H
+2
View File
@@ -60,6 +60,8 @@ public:
// \ru Построить кривую по журналу построения. \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _precision; } // \ru Выдать точность построения. \en Get the precision of object construction.
OBVIOUS_PRIVATE_COPY( MbFilletWireFrameCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFilletWireFrameCreator )
+2 -34
View File
@@ -69,6 +69,8 @@ public:
// \ru Построение оболочки по исходным данным \en Construction of a shell from the given data
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return precision; } // \ru Выдать точность построения. \en Get the precision of object construction.
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( MedianShellValues & params ) const { params = parameters; }
@@ -82,40 +84,6 @@ public:
IMPL_PERSISTENT_OPS( MbMedianShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить срединную оболочку между выбранными парами граней тела.
\en Build a median shell between selected faces of solid. \~
\details \ru Построить срединную оболочку между выбранными парами граней тела.
Выбранные грани должны быть эквидистантны по отношению друг к другу.
Грани должны принадлежать одному и тому же телу.
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Build a median shell between suitable selected face pairs of solid.
Suitable face pairs should be offset from each other.
The faces must belong to the same body.
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходное тело.
\en The initial solid. \~
\param[in] parameters - \ru Параметры операции.
\en Parameters of operation. ~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] medianFaces - \ru Множество граней для создания срединной оболочки.
\en Set of faces for build a median shell. \~
\param[out] shell - \ru Построенная срединная оболочка.
\en Constructed median shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
DEPRECATE_DECLARE_REPLACE( CreateMedianShell with MbMedianShellResults )
MATH_FUNC (MbCreator *) CreateMedianShell( const MbFaceShell & solid,
const MbMedianShellParams & params,
MbResultType & res,
MedianShellFaces & medianFaces,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить срединную оболочку между выбранными парами граней тела.
\en Build a median shell between selected faces of solid. \~
+2
View File
@@ -64,6 +64,8 @@ public:
void SetProperties ( const MbProperties & ) override; ///< \ru Записать свойства объекта. \en Set properties of the object.
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override; ///< \ru Построить каркас по журналу построения \en Create an offset wire frame from the history tree.
const MbPrecision & GetPrecision() const override { return _parameters; } // \ru Выдать точность построения. \en Get the precision of object construction.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbOffsetWireFrameCreator )
}; // MbOffsetWireFrameCreator
+2 -34
View File
@@ -102,40 +102,6 @@ public :
void SetIndices( const c3d::IndicesVector & indices ) { partsIndicies = indices; }
/** \} */
/** \brief \ru Создать оболочку на поверхности переменного сечения.
\en Create a shell on mutable section surface. \~
\details \ru Построить оболочку путём движения образующей кривой по направляющей кривой
и выполнить булеву операцию с оболочкой, если последняя задана. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en Create a shell by moving the generating curve along the spine curve
and perform the Boolean operation with the shell if it is specified. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Набор граней, к которым дополняется построение.
\en Face set the construction is complemented with respect to. \~
\param[in] sameShell - \ru Способ копирования граней.
\en The method of copying faces. \~
\param[in] data - \ru Данные о поверхности переменного сечения.
\en Data about mutable section surface. \~
\param[in] names - \ru Именователь грани оболочки.
\en Generating face names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] shell - \ru Результирующая оболочка.
\en Resultant shell. \~
\param[out] opResult - \ru Обобщенные результаты операции.
\en Common operation results. \~
\result \ru Возвращает строитель.
\en Returns the constructor of operation. \~
*/
DEPRECATE_DECLARE_REPLACE( Create with MbFaceFilletMaker )
static
c3d::CreatorSPtr Create( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
MbResultType & res,
c3d::ShellSPtr & shell,
MbOperationResults & opResult );
/** \brief \ru Создать оболочку на поверхности переменного сечения.
\en Create a shell on mutable section surface. \~
\details \ru Построить оболочку путём движения образующей кривой по направляющей кривой
@@ -157,6 +123,8 @@ DEPRECATE_DECLARE_REPLACE( Create with MbFaceFilletMaker )
c3d::CreatorSPtr Create( const MbFaceFilletMaker & fMaker,
MbeSelectOption option,
const c3d::IndicesVector & indices = c3d::IndicesVector() );
const MbPrecision & GetPrecision() const override { return sectionData; } // \ru Выдать точность построения. \en Get the precision of object construction.
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
+1
View File
@@ -64,6 +64,7 @@ public:
// \ru Построить кривую по журналу построения \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _precision; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
MbTrimmedWireFrameCreator(); // \ru Не реализовано \en Not implemented
+2 -1
View File
@@ -53,7 +53,8 @@ public:
// \ru Построить кривую по журналу построения \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
MbUnwrapCurveCreator(); // \ru Не реализовано \en Not implemented
+2
View File
@@ -53,6 +53,8 @@ public:
// \ru Построить каркас о журналу построения \en Create a wireframe from the history tree.
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
MbUnWrapPointCreator(); // \ru Не реализовано \en Not implemented
+2 -1
View File
@@ -56,8 +56,9 @@ public:
// \ru Построить кривую по журналу построения \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
OBVIOUS_PRIVATE_COPY( MbWrapCurveCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbWrapCurveCreator )
}; // MbWrapCurveCreator
+2 -1
View File
@@ -53,7 +53,8 @@ public:
// \ru Построить каркас о журналу построения \en Create a wireframe from the history tree.
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
const MbPrecision & GetPrecision() const override { return _params; } // \ru Выдать точность построения. \en Get the precision of object construction.
private:
MbWrapPointCreator(); // \ru Не реализовано \en Not implemented
+2
View File
@@ -525,6 +525,8 @@ public :
virtual void SetYourVersion( VERSION version, bool forAll );
/// \ru Выдать версию объекта. \en Get the object version.
VERSION GetYourVersion() const { return names->GetMathVersion(); }
/// \ru Выдать точность построения. \en Get the precision of object construction.
virtual const MbPrecision & GetPrecision() const { return MbPrecision::defaultPrecision; }
/// \ru Выдать именователь объекта. \en Get the name-maker.
const MbSNameMaker & GetYourNameMaker() const { return *names; }
+41
View File
@@ -77,6 +77,24 @@ public :
\en The version. \~
*/
MbOffsetCurve3D( const MbCurve3D & baseCurve, const MbVector3D & offsetVector, bool sameCurve, bool ort, VERSION version = Math::DefaultMathVersion() );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор эквидистантной кривой по спайну и вектору, с заданным вектором ориентации матрицы преобразования.\n
\en Constructor by a curve and offset vector in start point, with defined vector of transformation matrix orientation.\n \~
\param[in] baseCurve - \ru Базовая кривая.
\en The base curve. \~
\param[in] offsetVector - \ru Вектор смещения начальной точки кривой.
\en Offset in start point. \~
\param[in] dir - \ru Вектор ориентации матрицы преобразования. \~
\en Vector of transformation matrix orientation. \~
\param[in] sameCurve - \ru Использовать присланную кривую (true) или ее копию (false).
\en Use same curve (true) or copy (false). \~
\param[in] ort - \ru Ортогонализовать вектор к касательной кривой в начальной точке.
\en Ortogonalize offset vector (true) or same vector (false). \~
\param[in] version - \ru Версия исполнения.
\en The version. \~
*/
MbOffsetCurve3D( const MbCurve3D & baseCurve, const MbVector3D & offsetVector, const MbVector3D & dir, bool sameCurve, bool ort, VERSION version );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор эквидистантной кривой по спайну и вектору в режим по нормали к поверхности. \n
@@ -101,6 +119,29 @@ public :
MbOffsetCurve3D( const MbCurve3D & baseCurve, bool sameCurve, c3d::ConstSurfaceSPtr & surface, const MbVector3D & offsetVector, bool ort, VERSION version = Math::DefaultMathVersion() );
private :
MbOffsetCurve3D( const MbOffsetCurve3D & ); // \ru Не реализовано. \en Not implemented.
/** \brief \ru Инициализация эквидистантной кривой по спайну и вектору.
\en Initialization by a curve and offset vector in start point. \~
\details \ru Инициализация эквидистантной кривой по спайну и вектору, с заданным вектором ориентации матрицы преобразования.\n
\en Initialization by a curve and offset vector in start point, with defined vector of transformation matrix orientation.\n \~
\param[in] baseCurve - \ru Базовая кривая.
\en The base curve. \~
\param[in] offsetVector - \ru Вектор смещения начальной точки кривой.
\en Offset in start point. \~
\param[in] dir - \ru Вектор ориентации матрицы преобразования. \~
\en Vector of transformation matrix orientation. \~
\param[in] sameCurve - \ru Использовать присланную кривую (true) или ее копию (false).
\en Use same curve (true) or copy (false). \~
\param[in] ort - \ru Ортогонализовать вектор к касательной кривой в начальной точке.
\en Ortogonalize offset vector (true) or same vector (false). \~
\param[in] version - \ru Версия исполнения.
\en The version. \~
*/
void InitOffset( const MbCurve3D & c,
const MbVector3D & off,
const MbVector3D & dir,
bool same,
bool ort,
VERSION version );
protected:
MbOffsetCurve3D( const MbOffsetCurve3D & init, MbRegDuplicate * ireg );
+9
View File
@@ -132,6 +132,15 @@ GCM_FUNC(GCM_g_record) GCM_NullGeom();
//---
GCM_FUNC(GCM_g_record) GCM_Point( const MbCartPoint3D & );
//----------------------------------------------------------------------------------------
/** \brief \ru Запись оси, заданной её точкой и направляющим вектором.
\en Record of axis specified by the point and direction vector. \~
*/
//---
GCM_FUNC(GCM_g_record) GCM_Axis( const MbCartPoint3D & org
, const MbVector3D & axisZ );
//----------------------------------------------------------------------------------------
/** \brief \ru Запись прямой, заданной её точкой и направляющим вектором.
\en Record of line specified by the point and direction vector. \~
+45 -63
View File
@@ -15,6 +15,7 @@
#include <tool_cstring.h>
#include <templ_sptr.h>
#include <mb_axis3d.h>
#include <mb_matrix3d.h>
#include <mb_placement3d.h>
#include <marker.h>
@@ -177,6 +178,7 @@ public: /* Assigning methods.
MtGeomVariant & SetAsPlane( const MbCartPoint3D & org, const MbVector3D & normal );
MtGeomVariant & SetAsPlane( const MbPlacement3D & );
MtGeomVariant & SetAsMarker( const MbCartPoint3D & org, const MbVector3D & zAxis, const MbVector3D & xAxis );
MtGeomVariant & SetAsAxis( const MbCartPoint3D & org, const MbVector3D & zAxis);
MtGeomVariant & Transform( const MbMatrix3D & );
public: /* Methods for internal use.
@@ -230,34 +232,23 @@ MtGeomVariant & MtGeomVariant::Assign( const GeomDS * gDs )
class GCM_CLASS MtMatingGeometry
{
public:
enum Orient ///< \ru Трехзначное свойство ориентации \en Three-valued property of orientation
{
Opposite = 0, ///< \ru "Обратное направление" \en "Reverse direction"
Cooriented = 1, ///< \ru "Прямое направление" \en "Forward direction"
Unoriented = 2 ///< \ru Ориентация не свойственна или "Прямое направление" \en Orientation is nonrelevant or "Forward direction"
};
static const MtGeomType geom_Marker = GCM_MARKER;
private:
MtGeomType myGeomType; // \ru Кодирует тип сопрягаемой геометрии \en Encodes type of mating geometry
SPtr<const MbSpaceItem> myGeom; // \ru Геометрический объект сопряжения \en Geometric object of mating
Orient myOrientation; // \ru Ориентация геометрического объекта myMatingGeom \en Orientation of geometric object myMatingGeom
MbMatrix3D * myLCSMatrix; // \ru Матрица преобразования (ЛСК сопрягаемого тела) \en Transformation matrix (LCS of the mating solid)
using Orient = GCM_alignment; ///< \ru Трехзначное свойство ориентации \en Three-valued property of orientation.
static const Orient Opposite = GCM_OPPOSITE; ///< \ru "Обратное направление" \en "Reverse direction"
static const Orient Cooriented = GCM_COORIENTED; ///< \ru "Прямое направление" \en "Forward direction"
static const Orient Unoriented = GCM_NO_ALIGNMENT; ///< \ru Ориентация не свойственна или "Прямое направление" \en Orientation is nonrelevant or "Forward direction"
public:
MtMatingGeometry( const MtMatingGeometry & ) = default;
MtMatingGeometry & operator = ( const MtMatingGeometry & ) = default;
MtMatingGeometry()
: myGeom( nullptr )
, myOrientation( Unoriented )
, myLCSMatrix( nullptr )
, myLCSMatrix( MbMatrix3D::identity )
, myGeomType(GCM_UNKNOWN_GTYPE)
{}
~MtMatingGeometry()
{
_ClearMatrix();
}
public:
/// \ru Выдать тип сопрягаемой геометрии \en Get type of mating geometry
MtGeomType GetGeomType() const { return myGeomType; }
/// \ru Выдать ориентацию; \en Get orientation;
Orient GetOrientation() const { return myOrientation; }
/// \ru Выдать геометрический объект сопряжения. Если =nullptr, то это точка, заданная MtMatingGeometry::myMatingPoint; \en Get geometric object of the mating. If =nullptr, then this is a point specified by MtMatingGeometry::myMatingPoint;
@@ -282,6 +273,10 @@ public:
\en gArg is marker (! the argument is not transferred to the structure ownership) \~
*/
void SetAsMarker( const MbMarker & );
/**
\brief \ru Инициализировать структуру данных осью. \en Initialize the data structure with an axis.\~
*/
void Set( const MbAxis3D & );
/// \ru Присвоить структуре значение ЛСК; \en Assign this data structure with a value of LCS \~
void SetAsLCS( const MbPlacement3D & lcs );
@@ -316,12 +311,15 @@ public:
MtGeomVariant GeomVariant( VERSION c3dVer ) const;
private:
void _SetLCSMatrix( const MbMatrix3D & );
void _ClearMatrix();
// Get type of mating geometry.
MtGeomType GetGeomType() const { return myGeomType; }
void _SetLCSMatrix( const MbMatrix3D & );
private: // \ru Реализовать при необходимости \en Implement if necessary
MtMatingGeometry( const MtMatingGeometry & );
MtMatingGeometry & operator = ( const MtMatingGeometry & );
private:
MtGeomType myGeomType; // \ru Кодирует тип сопрягаемой геометрии \en Encodes type of mating geometry
SPtr<const MbSpaceItem> myGeom; // \ru Геометрический объект сопряжения \en Geometric object of mating
Orient myOrientation; // \ru Ориентация геометрического объекта myMatingGeom \en Orientation of geometric object myMatingGeom
MbMatrix3D myLCSMatrix; // \ru Матрица преобразования (ЛСК сопрягаемого тела) \en Transformation matrix (LCS of the mating solid)
};
@@ -330,9 +328,7 @@ private: // \ru Реализовать при необходимости \en Imp
//---
inline const MbMatrix3D & MtMatingGeometry::LCSMatrix() const
{
if ( myLCSMatrix != nullptr )
return *myLCSMatrix;
return MbMatrix3D::identity;
return myLCSMatrix;
}
//----------------------------------------------------------------------------------------
@@ -343,7 +339,7 @@ inline void MtMatingGeometry::SetAsLine( const MbCartPoint3D & org, const MbVect
myGeomType = GCM_LINE;
myGeom = new MbLine3D( org, dir );
myOrientation = Cooriented;
_ClearMatrix();
myLCSMatrix = MbMatrix3D::identity;
}
//----------------------------------------------------------------------------------------
@@ -355,7 +351,7 @@ inline void MtMatingGeometry::SetAsMarker( MtGeomType gType, const MbMarker & gA
myGeomType = gType;
myGeom = new MbMarker( gArg );
myOrientation = Unoriented;
_ClearMatrix();
myLCSMatrix = MbMatrix3D::identity;
}
//----------------------------------------------------------------------------------------
@@ -363,10 +359,21 @@ inline void MtMatingGeometry::SetAsMarker( MtGeomType gType, const MbMarker & gA
//---
inline void MtMatingGeometry::SetAsMarker( const MbMarker & gArg )
{
myGeomType = GCM_MARKER;
myGeomType = gArg.GetAxisX().IsZero() ? GCM_AXIS : GCM_MARKER;
myGeom = new MbMarker( gArg );
myOrientation = Unoriented;
_ClearMatrix();
myLCSMatrix = MbMatrix3D::identity;
}
//----------------------------------------------------------------------------------------
//
//---
inline void MtMatingGeometry::Set( const MbAxis3D& gArg )
{
myGeomType = GCM_AXIS;
myGeom = new MbMarker( gArg.GetOrigin(), gArg.GetAxisZ() );
myOrientation = Unoriented;
myLCSMatrix = MbMatrix3D::identity;
}
//----------------------------------------------------------------------------------------
@@ -375,10 +382,7 @@ inline void MtMatingGeometry::SetAsMarker( const MbMarker & gArg )
//---
inline void MtMatingGeometry::SetAsMarker( const MbCartPoint3D & org, const MbVector3D & z, const MbVector3D & x )
{
myGeomType = GCM_MARKER;
myGeom = new MbMarker( org, z, x );
myOrientation = Unoriented;
_ClearMatrix();
SetAsMarker({org, z, x});
}
//----------------------------------------------------------------------------------------
@@ -397,45 +401,23 @@ inline void MtMatingGeometry::SetAsLCS( const MbPlacement3D & lcs )
//---
inline void MtMatingGeometry::SetAsMatingGeomItem( SPtr<const MbSpaceItem> gItem
, Orient gDir
, const MbMatrix3D & gSpan )
, const MbMatrix3D & mat )
{
if ( gItem )
{
myGeomType = GCM_LAST_GTYPE;
myGeom = gItem;
myOrientation = gDir;
_SetLCSMatrix( gSpan );
_SetLCSMatrix( mat );
}
}
//----------------------------------------------------------------------------------------
//
//---
inline void MtMatingGeometry::_ClearMatrix()
inline void MtMatingGeometry::_SetLCSMatrix( const MbMatrix3D & lcs )
{
if ( myLCSMatrix != nullptr )
{
delete myLCSMatrix;
}
myLCSMatrix = nullptr;
}
//----------------------------------------------------------------------------------------
//
//---
inline void MtMatingGeometry::_SetLCSMatrix( const MbMatrix3D & gSpan )
{
if ( gSpan.IsSingle() )
{
_ClearMatrix(); // \ru Единичная матрица эквивалентна её очистке \en Unit matrix is equal to its flush
}
else
{
if ( myLCSMatrix == nullptr )
myLCSMatrix = new MbMatrix3D( gSpan );
else
*myLCSMatrix = gSpan;
}
myLCSMatrix = lcs;
}
//----------------------------------------------------------------------------------------
@@ -446,7 +428,7 @@ inline void MtMatingGeometry::SetNull()
myGeomType = GCM_NULL_GTYPE;
myGeom = nullptr;
myOrientation = Unoriented;
_ClearMatrix();
myLCSMatrix = MbMatrix3D::identity;
}
//----------------------------------------------------------------------------------------
+58 -22
View File
@@ -433,6 +433,31 @@ GCM_FUNC(void) GCM_ImportToC3D( GCM_system gSys, const TCHAR * c3dFile );
// ---
GCM_FUNC(size_t) VolumeOfAlignOption( const ItConstraintItem & );
//----------------------------------------------------------------------------------------
/** \brief \ru Вычислить степени свободы, включая соответствующие им возможные трансляции,
для точки геометрического объекта в системе ограничений.
\en Evaluate degrees of freedom including their corresponding possible translations
for a point of a geometric object in a system of constraints. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] g - \ru Дескриптор геометрического объекта.
\en Descriptor of geometric object. \~
\param[in] ctrlPnt - \ru Контрольная точка (начало координат по умолчанию), заданная в ЛСК геометрического объекта.
- \en Control point (origin by default) specified with respect to LCS of geometric object. \~
\result \ru Запись о вычисленных степенях свободы.
\en Record on evaluated degrees of freedom. \~
\details \ru Возвращаемая структура содержит код `result` результата вычисления
и, в случае успеха, информацию о трансляционных степенях свободы: их количество `tdof`
и векторы `dir1`, `dir2` возможных перемещений, если `tdof == 1` (тогда `dir1 == dir2`) или `tdof == 2`.
\en The structure subject to return contains code `result` of the evaluation result
and, on success, information about translational degrees of freedom: their number `tdof`
and vectors `dir1`, `dir2` of possible motions if `tdof == 1` (in such a case, `dir1 == dir2`) or `tdof == 2`. \~
\note \ru Вычисление результата опирается на линейный анализ системы ограничений.
\en Evaluation of the result relies on linear analysis of the constraint system. \~
*/
//---
GCM_FUNC(GCM_dof_record) GCM_PointDOF( GCM_system gSys, GCM_geom g, const MbCartPoint3D& ctrlPnt = MbCartPoint3D::origin );
/** \} */ // GCM_3D_Routines
//----------------------------------------------------------------------------------------
@@ -464,29 +489,40 @@ GCM_FUNC(GCM_closest_params) GCM_ClosestParameters( GCM_system gSys, GCM_constra
GCM_FUNC(GCM_result) GCM_ChangeAlignment( GCM_system gSys, GCM_constraint conId, GCM_alignment aVal );
//----------------------------------------------------------------------------------------
/** \brief \ru Вычислить степени свободы, включая соответствующие им возможные трансляции,
для точки геометрического объекта в системе ограничений.
\en Evaluate degrees of freedom including their corresponding possible translations
for a point of a geometric object in a system of constraints. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] g - \ru Дескриптор геометрического объекта.
\en Descriptor of geometric object. \~
\param[in] ctrlPnt - \ru Контрольная точка (начало координат по умолчанию), заданная в ЛСК геометрического объекта.
- \en Control point (origin by default) specified with respect to LCS of geometric object. \~
\result \ru Запись о вычисленных степенях свободы.
\en Record on evaluated degrees of freedom. \~
\details \ru Возвращаемая структура содержит код `result` результата вычисления
и, в случае успеха, информацию о трансляционных степенях свободы: их количество `tdof`
и векторы `dir1`, `dir2` возможных перемещений, если `tdof == 1` (тогда `dir1 == dir2`) или `tdof == 2`.
\en The structure subject to return contains code `result` of the evaluation result
and, on success, information about translational degrees of freedom: their number `tdof`
and vectors `dir1`, `dir2` of possible motions if `tdof == 1` (in such a case, `dir1 == dir2`) or `tdof == 2`. \~
\note \ru Вычисление результата опирается на линейный анализ системы ограничений.
\en Evaluation of the result relies on linear analysis of the constraint system. \~
*/
/** \brief \ru Оценить снизу и сверху количество формальных степеней свободы
геометрического объекта. Определяются минимальным набором линейно независимых
параметров, задающих мгновенное движение жесткого тела (в системе ограничений).
\en Estimate from below and above the amount of formal degrees of freedom
for a geometric object. It is defined by a minimal set of linearly independent
parameters determining instanteneous motion of a rigid (constrained) body. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] g - \ru Дескриптор геометрического объекта.
\en Descriptor of geometric object. \~
\result \ru Количественная оценка (нижняя и верхняя границы с включением) формальных степеней свободы.
\en Quantitative estimation (lower and upper bounds with inclusion) on formal degrees of freedom. \~
\note \ru Для целей тестирования.
\en For testing purposes. \~
**/
//---
GCM_FUNC(GCM_dof_record) GCM_PointDOF( GCM_system gSys, GCM_geom g, const MbCartPoint3D& ctrlPnt = MbCartPoint3D::origin );
GCM_FUNC( GCM_dof_estimation ) GCM_FormalDOF( GCM_system gSys, GCM_geom g );
//----------------------------------------------------------------------------------------
/** \brief \ru Вычислить чистые трансляционные степени свободы геометрического объекта.
Такие степени остаются у тела (в системе ограничений) после устранения любых возможностей вращения.
\en Compute pure translational degrees of freedom of a geometric object.
Such degrees remains for a (constrained) body after eliminating any possibilities of rotation.
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] g - \ru Дескриптор геометрического объекта.
\en Descriptor of geometric object. \~
\result \ru Запись о вычисленных чистых трансляционных степенях свободы.
\en Record on evaluated pure translational degrees of freedom. \~
\note \ru Для целей тестирования.
\en For testing purposes. \~
**/
//---
GCM_FUNC( GCM_dof_record ) GCM_PureTDOF( GCM_system gSys, GCM_geom g );
#endif // __GCM_ROUTINES_H
+19 -4
View File
@@ -45,6 +45,8 @@ typedef MtRefItem* GCM_system;
typedef struct MtSystemHolder* GCM_system;
#endif // GCM_SYSTEM_TYPE
/// \ru Тип целочисленной степени свободы. \en Type of integer-valued degree of freedom.
typedef ptrdiff_t GCM_dof_type;
/// \ru Дескриптор геометрического объекта, зарегистрированного в контексте решателя. \en Descriptor of geometrical object registered in the constraint system.
typedef MtObjectId GCM_object;
/// \ru Дескриптор геометрического объекта, зарегистрированного в контексте решателя. \en Descriptor of geometrical object registered in the constraint system.
@@ -97,9 +99,9 @@ typedef enum
, GCM_CIRCLE ///< \ru Окружность. \en Circle.
, GCM_LCS ///< \ru Система координат. \en Coordinate system.
, GCM_MARKER ///< \ru Точка и пара ортонормированных векторов. \en Point and pair of orthonormalized vectors.
, GCM_AXIS ///< \ru Ось, заданная точкой и единичным вектор. \en Axis specified by point and unite vector.
, GCM_SPLINE ///< \ru Сплайновая кривая. \en Spline curve.
, GCM_VECTOR // Unit vector (internal use only)
, GCM_AXIS // Point with unit vector (internal use only)
, GCM_VECTOR // Unit vector (internal use only)
, GCM_UNKNOWN_GTYPE // \ru Геометрический тип, не поддерживаемый решателем. \en Some geometric type, which is not supported by the solver. \~
, GCM_LAST_GTYPE // \ru Количество типов. \en The count of types.
} GCM_g_type;
@@ -285,6 +287,7 @@ typedef enum
*/
, GCM_RESULT_ItsNotDrivingDimension ///< \ru Данное ограничение должно быть управляющим размером. \en Given constraint should be a driving dimension.
, GCM_RESULT_IncorrectDimensionInterval ///< \ru Задан некорректный интервал для размерного ограничения. \en Incorrect interval for interval dimension constraint.
, GCM_RESULT_IncorrectGeomData ///< \ru Некорректно заполнена структура `GCM_g_record`. \en Data structure `GCM_g_record` specified incorrectly.
, GCM_RESULT_Unregistered ///< \ru Обращение к недействительному объекту. \en Access to invalid object.
, GCM_RESULT_InternalError
, GCM_RESULT_ImmutableData
@@ -416,6 +419,18 @@ typedef enum
, GCM_DOF_RESULT_Unknown ///< \ru Степень свободы геометрического объекта не вычислена. \en The geometric object state of freedom is not calculated.
} GCM_dof_result;
//----------------------------------------------------------------------------------------
/** \brief \ru Количественная оценка степеней свободы геометрического объекта.
\en An amount estimation for degrees of freedom of a geometric object.
\note Internal use only. The feature is under development.
*/
//---
struct GCM_CLASS GCM_dof_estimation
{
GCM_dof_type lowerBound{ 0 };
GCM_dof_type upperBound{ 6 };
};
//----------------------------------------------------------------------------------------
/** \brief \ru Развернутая информация о степени свободы геометрического объекта.
\en Detailed info about geometric degree of freedom.
@@ -427,11 +442,11 @@ struct GCM_CLASS GCM_dof_record
/// \ru Код результата вычисления степени свободы геометрического объекта. \en Resulting code of evaluating the geometric degrees of freedom. \~
GCM_dof_result result;
// Translational degree of freedom info.
size_t tdof;
GCM_dof_type tdof;
GCM_vec3d dir1;
GCM_vec3d dir2;
// Rotational degree of freedom info.
size_t rdof;
GCM_dof_type rdof;
GCM_point center;
GCM_vec3d axis1 ;
GCM_vec3d axis2 ;
-9
View File
@@ -203,9 +203,6 @@ public:
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
virtual bool IsBoundaryEdge( size_t e ) const = 0;
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
DEPRECATE_DECLARE_REPLACE( IsBoundaryEdge )
virtual bool IsBorderEdge( size_t e ) const = 0;
OBVIOUS_PRIVATE_COPY( MbHalfedgeBoundaryCriterionBase );
};
@@ -236,12 +233,6 @@ public:
const auto & ed = _topo.Edge( e );
return ed.IsActive() ? ( !ed.IsTwinDefined() || _mark.GetValue( e ) ) : false;
}
/// \ru Проверить, является ли ребро граничным. \en Check whether an edge is a boundary edge.
DEPRECATE_DECLARE_REPLACE( IsBoundaryEdge )
bool IsBorderEdge( size_t e ) const override
{
return IsBoundaryEdge( e );
}
OBVIOUS_PRIVATE_COPY( MbHalfedgeBoundaryCriterionMarked );
};
+4 -2
View File
@@ -107,6 +107,7 @@
#define C3D_2024_VERSION 0x17001002L ///< \ru Версия файла - C3D 2024. \en The file version - C3D 2024. \~ \ingroup Base_Tools
#define MATH_24_VERSION 0x18000001L ///< \ru Версия файла - 24.0. \en The file version - 24.0. \~ \ingroup Base_Tools
#define MATH_24_UHF_VERSION 0x18000101L ///< \ru Версия файла - 24.0 UHF (Upper Hot Fix). \en The file version - 24.0 UHF (Upper Hot Fix). \~ \ingroup Base_Tools
#define C3D_2025_VERSION 0x18001001L ///< \ru Версия файла - C3D 2025. \en The file version - C3D 2025. \~ \ingroup Base_Tools
//------------------------------------------------------------------------------
/// \ru Является ли версия файла 16-битной. \en Whether there is a 16-bit file version. \~ \ingroup Base_Tools
@@ -163,9 +164,10 @@ enum MbeWritableReleaseVersion
wrv_MATH_23 = MATH_23_VERSION, ///< \ru Версия файла - 23.0. \en The file version - 23.0.
wrv_C3D_2024 = C3D_2024_VERSION, ///< \ru Версия файла - C3D 2024. \en The file version - C3D 2024.
wrv_MATH_24 = MATH_24_VERSION, ///< \ru Версия файла - 24.0. \en The file version - 24.0.
wrv_C3D_2025 = C3D_2025_VERSION, ///< \ru Версия файла - C3D 2025. \en The file version - C3D 2025.
wrv_PrevRelease = wrv_C3D_2024, ///< \ru Версия потока предпоследнего релиза. \en The previous release version.
wrv_LastRelease = wrv_MATH_24, ///< \ru Версия потока последнего релиза. \en The last release version.
wrv_PrevRelease = wrv_MATH_24, ///< \ru Версия потока предпоследнего релиза. \en The previous release version.
wrv_LastRelease = wrv_C3D_2025, ///< \ru Версия потока последнего релиза. \en The last release version.
wrv_MaxPossible = SYS_MAX_INT32 ///< \ru Использовать последнюю версия потока. \en Use current working version.
};
+4 -1
View File
@@ -50,6 +50,9 @@ 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.
public:
static const MbPrecision defaultPrecision; ///< \ru Точность по умолчанию (METRIC_PRECISION, ANGLE_REGION); \en Default precision (METRIC_PRECISION, ANGLE_REGION);
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbPrecision()
@@ -97,7 +100,7 @@ public:
/// \ru Функция инициализации. \en Initialization function.
void Init( double _precision ) {
precision = _precision;
deviation = METRIC_EPSILON;
deviation = ANGLE_REGION;
}
/// \ru Оператор присваивания. \en Assignment operator.
MbPrecision & operator = ( const MbPrecision & other ) {
+147 -441
View File
@@ -1254,37 +1254,40 @@ public:
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры, определяющие положение объектов внутри поверхности и плоскости в операциях
сворачивание/разворачивание кривых.
\en Parameters determining the objects position in the surface and the plane in curve
/** \brief \ru Параметры, определяющие взаимное расположение поверхности и плоскости в операциях
сворачивания/разворачивания кривых и точек.
\en Parameters determining mutual location of the surface and the plane in curves/points
wrap/unwrap operation. \~
\details \ru Точка _xy плоскости XY локальной системы координат должна совпадать с точкой _uv
параметрической области UV поверхности. \n
При параметрах _angle = 0 и _sense = true наложение плоскости на поверхность
делается таким образом, что оси 'x' и 'y' плоскости соответственно совпадают с осями 'u' и 'v' поверхности.
При параметрах _angle = 0 и _sense = false наложение плоскости на поверхность делается таким образом,
что оси 'y' плоскости и 'v' поверхности совпадают, оси 'x' и 'u' направлены противоположно.
Далее, значение угла _angle показывает, насколько нужно повернуть систему координат XY плоскости
относительно её оси Z. \n
\en The point _xy of the XY plane of the local coordinate system must coincide with the point _uv of the
parametric region UV of the surface.
With parameters _angle = 0 and _sense = true the overlay of the plane on the surface matches 'x' and 'y' plane axes
to the 'u' and 'v' surface axes correspondingly.
With parameters angle = 0 and sense = false the overlay of the plane on the surface matches 'y' plane axis
to the 'v' surface axis, with 'x' and 'u' axes directed oppositely.
Then the value of 'angle' shows how much the plane coordinate system XY is turned in respect to its Z axis. \n
\details \ru Параметры, определяющие взаимное расположение поверхности и плоскости в операциях
сворачивания/разворачивания кривых и точек. \n
В алгоритме считается, что соблюдены следующие условия: плоскость (_place) в точке _xy
касается поверхности (_surface) в точке _uv; во всех точках касания нормаль к поверхности
сонаправлена с нормалью к плоскости; направление оси Y для _place совпадает с направлением
нулевой кривизны поверхности; у _place правая тройка векторов. \n
В случае, если данные условия не соблюдаются, либо _angle != 0 (угол поворота плоскости),
либо _sense = false (_place является левой системой координат), то будет выполнено линейное
преобразование результата операции с учетом соответствующих факторов. \~
\en Parameters determining mutual location of the surface and the plane in curves/points
wrap/unwrap operation. \n
The following conditions are considered to be satisfied in the algorithm: the plane (_place) is tangent
to the surface (_surface) at the points _xy (_place) and _uv (surface); surface normals are co-directional
vectors with the plane normal in every tangent point; direction of Y-axis of _place coincides with zero-curvature
direction of _surface; _place is right-handed coordinate system. \n
If these conditions are not satisfied or _angle != 0 (the rotation angle of the plane) or _sense = false
(_place is left-handed coordinate system) then the operation result will be linearly transformed
according to corresponding parameters. \~
\ingroup Curve3D_Building_Parameters
*/
// ---
class MATH_CLASS MbWrapValues {
private:
MbPlacement3D _place; ///< \ru Локальная система координат (ЛСК). \en The local coordinate system (LCS) of the curves. \~
MbPlacement3D _place; ///< \ru Локальная система координат (ЛСК) плоскости. \en The local coordinate system (LCS) of the plane. \~
c3d::SurfaceSPtr _surface; ///< \ru Поверхность. Всегда не nullptr. \en The surface. It is always not nullptr. \~
MbCartPoint _xy; ///< \ru Точка привязки на плоскости XY локальной системы координат. \en The anchor point on the "XY" plane of the LCS that will be aligned with the uv point on the parametric plane of the surface. \~
MbCartPoint _uv; ///< \ru Точка привязки в параметрической плоскости "UV" параметров поверхности. \en The anchor point in the parametric plane "UV" of the surface parameters. \~
double _angle; ///< \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
bool _sense; ///< \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности? \en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
MbCartPoint _xy; ///< \ru Точка привязки на _place. \en The anchor point on _place. \~
MbCartPoint _uv; ///< \ru Точка привязки в параметрической области поверхности. \en The anchor point in the parametric region of the surface. \~
double _angle; ///< \ru Угол поворота _place вокруг его оси Z. \en The rotation angle of _place around its Z-axis. \~
bool _sense; ///< \ru Признак левой или правой системы координат для _place. \en Indicator of right-/left-handed coordinate system of _place. \~
bool _keepLength; ///< \ru Должны ли длины кривых на другом носителе соответствовать оригиналам? \en Should the lengths of the curves on another carrier match the originals? \~
public:
@@ -1292,20 +1295,20 @@ public:
\en Constructor by parameters. \~
\details \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] place - \ru Локальная система координат (ЛСК). XY - плоскость сворачивания/разворачивания.
\en The local coordinate system (LCS). XY - is the wrapping/unwrapping plane. \~
\param[in] xy - \ru Точка привязки на плоскости.
\en The anchor point on the plane. \~
\param[in] surf - \ru Поверхность для разворачивания.
\en The surface to unwrap. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor UV point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] uv - \ru Точка привязки в параметрической области поверхности.
\en The anchor point in the parametric region of the surface. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] angle - \ru Угол поворота плоскости place вокруг его оси Z.
\en The rotation angle of the plane place around its Z-axis. \~
\param[in] sense - \ru Признак левой или правой системы координат для плоскости.
\en Indicator of right-/left-handed coordinate system of the plane. \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals? \~
*/
@@ -1336,20 +1339,20 @@ public:
\en Initialize parameters. \~
\details \ru Инициализация параметров.
\en Initialize parameters. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] place - \ru Локальная система координат (ЛСК). XY - плоскость сворачивания/разворачивания.
\en The local coordinate system (LCS). XY - is the wrapping/unwrapping plane. \~
\param[in] xy - \ru Точка привязки на плоскости.
\en The anchor point on the plane. \~
\param[in] surf - \ru Поверхность для разворачивания.
\en The surface to unwrap. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor UV point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] uv - \ru Точка привязки в параметрической области поверхности.
\en The anchor point in the parametric region of the surface. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] angle - \ru Угол поворота плоскости place вокруг его оси Z.
\en The rotation angle of the plane place around its Z-axis. \~
\param[in] sense - \ru Признак левой или правой системы координат для плоскости.
\en Indicator of right-/left-handed coordinate system of the plane. \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals? \~
*/
@@ -1386,16 +1389,16 @@ public:
/// \ru Дать поверхность. \en Get the surface. \~
const MbSurface & GetSurface( bool base = false ) const { return base? _surface->GetSurface() : *_surface; }
/// \ru Дать точку на плоскости XY локальной системы координат. \en Get a point on the XY plane of the local coordinate system. \~
/// \ru Дать точку привязки на плоскости. \en Get the anchor point in the plane. \~
const MbCartPoint & GetPlacePoint() const { return _xy; }
/// \ru Дать точку в области параметров UV поверхности. \en Get a point on the parametric region UV of the surface. \~
/// \ru Дать точку привязки в параметрической области поверхности. \en Get the anchor point in the parametric region of the surface. \~
const MbCartPoint & GetSurfacePoint() const { return _uv; }
/// \ru Дать угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en Get the angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
/// \ru Дать угол поворота плоскости вокруг нормали. \en Get the rotation angle of plane around the normal. \~
double GetAngle() const { return _angle; }
/// \ru Совпадают ли ориентации осей "X-Y" ЛСК и осей "U-V" поверхности. \en Whether the orientations of LCS "X-Y" axes and the surface "U-V" axes are same. \~
/// \ru Является ли система координат плоскости правой? \en Whether the coordinate system of the plane is right-handed. \~
bool IsSense() const { return _sense; }
/// \ru Должна ли совпадать длина итоговых кривых оригинальным. \en Should the result curve length be equal to the original curve length? \~
@@ -1491,226 +1494,6 @@ private:
bool cutByBounds );
public:
/** \brief \ru Конструктор по двумерным кривым.
\en Constructor by two-dimension curves.\~
\details \ru Конструктор по двумерным кривым.
\en Constructor by two-dimension curves.\~
\param[in] curves - \ru Двумерные кривые, копии которых будут свёрнуты/развёрнуты.
\en Two-dimensional curves, copies of which will be wrapped/unwrapped. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
\en The surface to wrap to/unwrap from. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals?\~
\param[in] accuracy - \ru Точность построения.
\en The accuracy. \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\deprecated Внимание! Инициализируется всегда для разворачивания. Не будет работать для сворачивания.
*/
DEPRECATE_DECLARE_REPLACE( with MbWrapValues )
MbCurvesWrappingParams( const c3d::ConstPlaneCurvesSPtrVector & curves,
const MbPlacement3D & place,
const MbCartPoint & xy,
const MbSurface & surface,
const MbCartPoint & uv,
const MbSNameMaker & operNames,
double angle,
bool sense,
bool keepLength,
double accuracy,
bool copyCurves,
bool copySurface );
/** \brief \ru Конструктор по пространственным кривым.
\en Constructor by spatial curves.\~
\details \ru Конструктор по пространственным кривым.
\en Constructor by spatial curves.\~
\param[in] curves - \ru Трёхмерные кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- двумерные кривые на поверхности или плоскости.
\en Three-dimension curves, copies of which will be wrapped/unwrapped. It is expected that there are two-dimension curves on a surface or a plane inside.\~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
\en The surface to wrap to/unwrap from. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals?\~
\param[in] accuracy - \ru Точность построения.
\en The accuracy. \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\deprecated Внимание! Инициализируется всегда для разворачивания. Не будет работать для сворачивания.
*/
DEPRECATE_DECLARE_REPLACE( with MbWrapValues )
MbCurvesWrappingParams( const c3d::ConstSpaceCurvesSPtrVector & curves,
const MbPlacement3D & place,
const MbCartPoint & xy,
const MbSurface & surface,
const MbCartPoint & uv,
const MbSNameMaker & operNames,
double angle,
bool sense,
bool keepLength,
double accuracy,
bool copyCurves,
bool copySurface );
/** \brief \ru Конструктор по точкам.
\en Constructor by points.\~
\details \ru Конструктор по точкам.
\en Constructor by points.\~
\param[in] points - \ru Двумерные точки, которые будут перенесены на новый носитель.
\en Two-dimension points to be translated to a new carrier. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
\en The surface to wrap to/unwrap from. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] accuracy - \ru Точность построения.
\en The accuracy. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\deprecated Внимание! Инициализируется всегда для разворачивания. Не будет работать для сворачивания.
*/
DEPRECATE_DECLARE_REPLACE( with MbWrapValues )
MbCurvesWrappingParams( const c3d::ParamPointsVector & points,
const MbPlacement3D & place,
const MbCartPoint & xy,
const MbSurface & surface,
const MbCartPoint & uv,
const MbSNameMaker & operNames,
double angle,
bool sense,
double accuracy,
bool copySurface );
/** \brief \ru Конструктор по двумерным кривым и точкам.
\en Constructor by two-dimension curves and points.\~
\details \ru Конструктор по двумерным кривым и точкам.
\en Constructor by two-dimension curves and points.\~
\param[in] curves - \ru Двумерные кривые, копии которых будут свёрнуты/развёрнуты.
\en Two-dimensional curves, copies of which will be wrapped/unwrapped. \~
\param[in] points - \ru Двумерные точки, которые будут перенесены на новый носитель.
\en Two-dimension points to be translated to a new carrier. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
\en The surface to wrap to/unwrap from. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals?\~
\param[in] accuracy - \ru Точность построения.
\en The accuracy. \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\deprecated Внимание! Инициализируется всегда для разворачивания. Не будет работать для сворачивания.
*/
DEPRECATE_DECLARE_REPLACE( with MbWrapValues )
MbCurvesWrappingParams( const c3d::ConstPlaneCurvesSPtrVector & curves,
const c3d::ParamPointsVector & points,
const MbPlacement3D & place,
const MbCartPoint & xy,
const MbSurface & surface,
const MbCartPoint & uv,
const MbSNameMaker & operNames,
double angle,
bool sense,
bool keepLength,
double accuracy,
bool copyCurves,
bool copySurface );
/** \brief \ru Конструктор по пространственным кривым и (двумерным) точкам.
\en Constructor by spatial curves and (two-dimension) points.\~
\details \ru Конструктор по пространственным кривым и (двумерным) точкам.
\en Constructor by spatial curves and (two-dimension) points.\~
\param[in] curves - \ru Пространственные кривые, копии которых будут свёрнуты/развёрнуты.
\en Spatial curves, copies of which will be wrapped/unwrapped.\~
\param[in] points - \ru Двумерные точки, которые будут перенесены на новый носитель.
\en Two-dimension points to be translated to a new carrier. \~
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
\en The local coordinate system (LCS) of the plane. \~
\param[in] xy - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
\en The surface to wrap to/unwrap from. \~
\param[in] uv - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] angle - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
\param[in] sense - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
\en Should the lengths of the curves on another carrier match the originals?\~
\param[in] accuracy - \ru Точность построения.
\en The accuracy. \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
\en Whether to save the surface copy in this parameter class. \~
\deprecated Внимание! Инициализируется всегда для разворачивания. Не будет работать для сворачивания.
*/
DEPRECATE_DECLARE_REPLACE( with MbWrapValues )
MbCurvesWrappingParams( const c3d::ConstSpaceCurvesSPtrVector & curves,
const c3d::ParamPointsVector & points,
const MbPlacement3D & place,
const MbCartPoint & xy,
const MbSurface & surface,
const MbCartPoint & uv,
const MbSNameMaker & operNames,
double angle,
bool sense,
bool keepLength,
double accuracy,
bool copyCurves,
bool copySurface );
/** \brief \ru Конструктор по параметрам для сворачивания.
\en Constructor by parameters for wrapping. \~
\details \ru Конструктор по параметрам для сворачивания.
@@ -1958,180 +1741,6 @@ public:
bool copyCurves,
MbRegDuplicate * iReg = nullptr );
/// \ru Дать локальную систему координат. \en Get the local coordinate system. \~
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
const MbPlacement3D & GetPlacement() const { return _wrpValues.GetPlacement(); }
/// \ru Установить локальную систему координат. \en Set the local coordinate system. \~
DEPRECATE_DECLARE
void SetPlacement( const MbPlacement3D & p );
/// \ru Дать локальную систему координат. \en Get the local coordinate system. \~
DEPRECATE_DECLARE
MbPlacement3D & SetPlacement() { return const_cast<MbPlacement3D &>( _wrpValues.GetPlacement() ); }
/// \ru Дать точку на плоскости XY локальной системы координат. \en Get a point on the "XY" plane of the LCS that will be aligned with the uv point on the parametric plane of the surface. \~
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
const MbCartPoint & GetPlacePoint() const { return _wrpValues.GetPlacePoint(); }
/// \ru Установить точку на плоскости XY локальной системы координат. \en Set a point on the "XY" plane of the LCS that will be aligned with the uv point on the parametric plane of the surface. \~
DEPRECATE_DECLARE
void SetPlacePoint( const MbCartPoint & p );
/** \brief \ru Дать поверхность.
\en Get the surface. \~
\details \ru Дать поверхность.
\en Get the surface. \~
\param[in] base - \ru Если true, будет выдаваться базовая поверхность.
\en If it is true the base surface will be returned. \~
*/
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
const MbSurface & GetSurface( bool base = false ) const { return _wrpValues.GetSurface( base ); };
/** \brief \ru Установить поверхность.
\en Set the surface. \~
\details \ru Установить поверхность.
\en Set the surface. \~
\param[in] surf - \ru Устанавливаемая поверхность (заменяющая исходную).
\en The surface for set (replacing the source one). \~
\param[in] copy - \ru Если true, будет установлена копия заданной поверхности.
\en If it is true the copy of surf will be set. \~
\param[in] iReg - \ru Регистратор.
\en Registrator. \~
*/
DEPRECATE_DECLARE
void SetSurface( MbSurface & surf, bool copy, MbRegDuplicate * iReg = nullptr );
/// \ru Дать поверхность. \en Get the surface. \~
DEPRECATE_DECLARE
MbSurface & SetSurface() { return const_cast<MbSurface &>( _wrpValues.GetSurface() ); }
/// \ru Установить поверхность. \en Set the surface. \~
DEPRECATE_DECLARE
void SetSurfacePtr( const c3d::ConstSurfaceSPtr & surf );
/// \ru Дать точку в области параметров поверхности. \en Get a point on the parametric plane "UV" of the surface corresponding to the point xy on the plane. \~
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
const MbCartPoint & GetSurfacePoint() const { return _wrpValues.GetSurfacePoint(); }
/// \ru Установить точку в области параметров поверхности. \en Set a point on the parametric plane "UV" of the surface corresponding to the point xy on the plane. \~
DEPRECATE_DECLARE
void SetSurfacePoint( const MbCartPoint & p );
/// \ru Дать угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en Get the angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
double GetAngle() const { return _wrpValues.GetAngle(); }
/// \ru Установить угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en Set the angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
DEPRECATE_DECLARE
void SetAngle( double a );
/// \ru Совпадают ли ориентации осей "X-Y" ЛСК и осей "U-V" поверхности. \en Whether the orientations of LCS "X-Y" axes and the surface "U-V" axes are same. \~
DEPRECATE_DECLARE_REPLACE( method of the class MbWrapValues )
bool IsSense() const { return _wrpValues.IsSense(); }
/// \ru Установить флаг совпадения направления оси "X" ЛСК и оси "U" поверхности. \en Set the coincidence of the directions of the "X" axis of the LSC and the "U" axis of the surface. \~
DEPRECATE_DECLARE
void SetSense( bool s );
/// \ru Должна ли совпадать длина итоговых кривых оригинальным. \en Should the result curve length be equal to the original curve length? \~
DEPRECATE_DECLARE_REPLACE( MbWrapValues::IsLengthKept )
bool IsEquals() const { return _wrpValues.IsLengthKept(); }
/// \ru Установить требование совпадения длины кривых в плоскости и на поверхности? \en Set the curves length correspondence to the originals on the surface? \~
DEPRECATE_DECLARE
void SetEquals( bool e );
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
DEPRECATE_DECLARE
void SetCurve( size_t i, const MbCurve & c, bool copy );
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
DEPRECATE_DECLARE
void SetCurve( size_t i, MbCurve * c, bool copy );
/// \ru Дать точность построения. \en Get an accuracy. \~
DEPRECATE_DECLARE
double GetAccuracy() const { return GetPrecision(); }
/// \ru Установить точность построения. \en Set an accuracy. \~
DEPRECATE_DECLARE
void SetAccuracy( double acc ) { SetPrecision( acc ); }
/// \ru Задать именователь. \en Set names maker.
DEPRECATE_DECLARE
void SetNameMaker( const MbSNameMaker & newOperName ) { _snMaker->SetNameMaker( newOperName, true ); }
/// \ru Проверка на валидность: например поверхность не null и часть кривых не null. \en The validity check: e.g. whether surface is not null and some of the curves are not null. \~
DEPRECATE_DECLARE
bool IsValid () const;
/** \brief \ru Нужно ли сдвинуть кривые, попавшие одним краем на шов Umax.
\en Whether to shift curves with one end on Umax seam.\~
\details \ru Нужно ли сдвинуть кривые, попавшие краем на шов Umax. Если кривая попадает одним краем на шов Umax,
а другим не попадает ни на Umax, ни на Umin, то сдвинуть эту кривую на Umax-Umin. Это упрощённая
стыковка кривых, которые в 3D соединяются краями на шве, но в 2D разнесены на период. При включении
этого флага на развёртке они также будут стыковаться.
\en Whether to shift curves with one end on Umax seam. If one curve end is on the Umax seam and the other
is neither on Umax nor Umin, then shift the curve for Umax-Umin. This is a simplified stitching of
curves which have connected edges in 3D on the seam, but in 2D are spaced apart on a period.
If this flag is enabled, those unwrapped curves are alse connected. \~
*/
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams::_surfBreakParam )
bool GetUSeamStitch() const { return false; }
/** \brief \ru Нужно ли сдвинуть кривые, попавшие одним краем на шов Umax.
\en Whether to shift curves with one end on Umax seam.\~
\details \ru Нужно ли сдвинуть кривые, попавшие краем на шов Umax. Если кривая попадает одним краем на шов Umax,
а другим не попадает ни на Umax, ни на Umin, то сдвинуть эту кривую на Umax-Umin. Это упрощённая
стыковка кривых, которые в 3D соединяются краями на шве, но в 2D разнесены на период. При включении
этого флага на развёртке они также будут стыковаться.
\en Whether to shift curves with one end on Umax seam. If one curve end is on the Umax seam and the other
is neither on Umax nor Umin, then shift the curve for Umax-Umin. This is a simplified stitching of
curves which have connected edges in 3D on the seam, but in 2D are spaced apart on a period.
If this flag is enabled, those unwrapped curves are also connected. \~
*/
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams::_surfBreakParam )
void SetUSeamStitch( bool /*s*/ ) { }
/** \brief \ru Инициализация параметров для алгоритма сворачивания.
\en Initialize parameters for wrapping algorithm. \~
\details \ru Инициализация параметров для алгоритма сворачивания.
\en Initialize parameters for wrapping algorithm. \~
\param[in] curves - \ru Кривые, копии которых будут свёрнуты.
\en Curves, copies of which will be wrapped. \~
\param[in] points - \ru Двумерные точки, которые будут свёрнуты.
\en Two-dimension points to be wrapped. \~
\param[in] vals - \ru Параметры операции сворачивания.
\en The parameters of wrap operation.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] cutByBounds - \ru Нужно ли обрезать полученные кривые по границам поверхности?
\en Whether the result curves to be cut with the surface bounds? \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
*/
template<class CurvesVector> // c3d::ConstPlaneCurvesSPtrVector, c3d::ConstSpaceCurvesSPtrVector
DEPRECATE_DECLARE_REPLACE( InitWrap with parameters removeExistCurves and removeExistPoints )
void InitWrap( const CurvesVector & curves,
const c3d::ParamPointsVector & points,
const MbWrapValues & vals,
const MbSNameMaker & operNames,
bool cutByBounds,
bool copyCurves );
/** \brief \ru Инициализация параметров для алгоритма разворачивания.
\en Initialize parameters for unwrapping algorithm. \~
\details \ru Инициализация параметров для алгоритма разворачивания.
\en Initialize parameters for unwrapping algorithm. \~
\param[in] curves - \ru Кривые, копии которых будут развёрнуты.
\en Curves, copies of which will be unwrapped. \~
\param[in] points - \ru Двумерные точки, которые будут развёрнуты.
\en Two-dimension points to be unwrapped. \~
\param[in] vals - \ru Параметры операции разворачивания.
\en The parameters of unwrap operation.\~
\param[in] operNames - \ru Именователь с версией операции.
\en Names maker with operation version. \~
\param[in] surfBreakParam - \ru Место резки периодической поверхности.
\en The place, where the periodic surface is to be cut. \~
\param[in] copyCurves - \ru Сохранить ли в этом классе параметров копии кривых.
\en Whether to save the curves copies in this parameter class. \~
*/
template<class CurvesVector> // c3d::ConstPlaneCurvesSPtrVector, c3d::ConstSpaceCurvesSPtrVector
DEPRECATE_DECLARE_REPLACE( InitUnwrap with parameters removeExistCurves and removeExistPoints )
void InitUnwrap( const CurvesVector & curves,
const c3d::ParamPointsVector & points,
const MbWrapValues & vals,
const MbSNameMaker & operNames,
double surfBreakParam,
bool copyCurves );
private:
/// \ru Добавить двумерные или трехмерные кривые с проверкой на нули. \en Add two- or three-dimension curves with nullptr check. \~
template<class CurveVector>
@@ -2754,4 +2363,101 @@ OBVIOUS_PRIVATE_COPY( MbRemoveSelfIntParams )
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры операции построения срединной кривой.
\en The parameters for creating median curve. \~
\details \ru Параметры операции построения срединной кривой. \n
\en The parameters for creating median curve. \n \~
\ingroup Data_Structures
\warning \ru В разработке.
\en Under development. \~
*/
// ---
class MATH_CLASS MbMedianCurveParams : public MbPrecision {
private:
c3d::BoolPair _invNormals; ///< \ru Каждый флаг из пары задает признак инвертирования нормали для соответствующей кривой. \en Each flag from pair indicates inversion of normal for corresponding curve.
bool _respCurveExt; ///< \ru Флаг определяет, будет ли при необходимости продолжена ответная кривая. \en A flag defines whether the response curve may be extended when necessary.
bool _smoothing; ///< \ru Флаг определяет, будет ли использовано сглаживание для срединной кривой. \en A flag defines whether smoothing of median curve will be used.
double _smoothingTolerance; ///< \ru Желаемая точность аппроксимации при использовании сглаживания. \en Desired approximation accuracy when smoothing is used.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbMedianCurveParams()
: _invNormals ( false, false )
, _respCurveExt ( false )
, _smoothing ( false )
, _smoothingTolerance ( 0.0 )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbMedianCurveParams( const c3d::BoolPair & invNormals, const bool respCurveExt )
: _invNormals ( invNormals )
, _respCurveExt ( respCurveExt )
, _smoothing ( false )
, _smoothingTolerance ( 0.0 )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbMedianCurveParams( const c3d::BoolPair & invNormals,
const bool respCurveExt,
const bool smoothing,
const double smoothingTolerance )
: _invNormals ( invNormals )
, _respCurveExt ( respCurveExt )
, _smoothing ( smoothing )
, _smoothingTolerance ( smoothingTolerance )
{}
/// \ru Выдать значение параметра. \en Get the value of parameter.
const c3d::BoolPair & GetInvNormals() const { return _invNormals; }
/// \ru Установить значение параметра. \en Set the value of parameter.
void GetInvNormals( const c3d::BoolPair & invNormals ) { _invNormals = invNormals; }
/// \ru Выдать значение параметра. \en Get the value of parameter.
bool GetRespCurveExt() const { return _respCurveExt; }
/// \ru Установить значение параметра. \en Set the value of parameter.
void SetRespCurveExt( const bool respCurveExt ) { _respCurveExt = respCurveExt; }
/// \ru Выдать значение параметра. \en Get the value of parameter.
bool GetSmoothing() const { return _smoothing; }
/// \ru Установить значение параметра. \en Set the value of parameter.
void SetSmoothing( const bool smoothing ) { _smoothing = smoothing; }
/// \ru Выдать значение параметра. \en Get the value of parameter.
bool GetSmoothingTolerance() const { return _smoothingTolerance; }
/// \ru Установить значение параметра. \en Set the value of parameter.
void SetSmoothingTolerance( const double smoothingTolerance ) { _smoothingTolerance = smoothingTolerance; }
};
//------------------------------------------------------------------------------
/** \brief \ru Результаты построения срединной кривой.
\en The results of creating median curve. \~
\details \ru Результаты построения срединной кривой. \n
\en The results of creating median curve. \n \~
\ingroup Data_Structures
\warning \ru В разработке.
\en Under development. \~
*/
// ---
class MATH_CLASS MbMedianCurveResults : public MbOperationResults {
private:
c3d::PlaneCurveSPtr _medianCurve; ///< \ru Срединная кривая. \en Median curve.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbMedianCurveResults()
: _medianCurve ( nullptr )
{}
/// \ru Выдать срединную кривую. \en Get the median curve.
const c3d::PlaneCurveSPtr & GetMedianCurve() const { return _medianCurve; }
/// \ru Инициализировать данные. \en Initialize data.
void Init( const c3d::PlaneCurveSPtr & medianCurve, double tolerance ) { _medianCurve = medianCurve; _tolerance = tolerance; }
};
#endif // __OP_CURVE_PARAMETERS_H
+20 -8
View File
@@ -396,17 +396,27 @@ class MATH_CLASS MbMeshToInstanceParams : public MbPrecision
private:
/// \ru Использовать относительную или абсолютную точность при сравнении точек.\en Use absolute or relative tolerance for points comparison.\~
bool _isAbsoluteAccuracy;
/// \ru Все объекты выходного массива - вставки.\en All objects in the output array are instances.\~
bool _replaceOriginByInstance;
public:
/// \ru Конструктор по-умолчанию. \en Default constructor.\~
MbMeshToInstanceParams ()
: MbPrecision ( )
, _isAbsoluteAccuracy( true )
MbMeshToInstanceParams ()
: MbPrecision ( )
, _isAbsoluteAccuracy ( true )
, _replaceOriginByInstance( false )
{}
/// \ru Конструктор. \en Constructor. \~
MbMeshToInstanceParams ( double precision, bool isAbsoluteAccuracy )
: MbPrecision ( precision, ANGLE_REGION )
, _isAbsoluteAccuracy( isAbsoluteAccuracy )
MbMeshToInstanceParams ( double precision, bool isAbsoluteAccuracy )
: MbPrecision ( precision, ANGLE_REGION )
, _isAbsoluteAccuracy ( isAbsoluteAccuracy )
, _replaceOriginByInstance( false )
{}
/// \ru Конструктор. \en Constructor. \~
MbMeshToInstanceParams ( double precision, bool isAbsoluteAccuracy, bool eachObjectInstancing )
: MbPrecision ( precision, ANGLE_REGION )
, _isAbsoluteAccuracy ( isAbsoluteAccuracy )
, _replaceOriginByInstance( eachObjectInstancing )
{}
/// \ru Деструктор. \en Destructor. \~
~MbMeshToInstanceParams() {}
@@ -414,7 +424,9 @@ public:
/// \ru Переключатель между абсолютной и относительной точностью. \en Switch between absolute and relative accuracy. \~
void SetAbsoluteAccuracy( bool isAbs ) { _isAbsoluteAccuracy = isAbs; }
/// \ru Установлена абсолютная или относительная точность. \en Whether the accuracy is set to absolute or relative. \~
bool IsAbsoluteAccuracy () const { return _isAbsoluteAccuracy; }
bool IsAbsoluteAccuracy() const { return _isAbsoluteAccuracy; }
/// \ru Все объекты выходного массива - вставки или нет. \en All objects in the output array are instances or not. \~
bool IsOriginReplacedByInstance() const { return _replaceOriginByInstance; }
OBVIOUS_PRIVATE_COPY( MbMeshToInstanceParams );
};
-9
View File
@@ -80,9 +80,6 @@ public:
const c3d::IndicesVector & GetFixedEdges() const { return _fixedEdges; }
///< \ru Зафиксировать открытые границы. \en Fix open boundaries.
void FixOpenBoundaries( MbPolymesh & mesh );
///< \ru Зафиксировать открытые границы. \en Fix open borders.
DEPRECATE_DECLARE_REPLACE( FixOpenBoundaries )
void FixOpenBorders( MbPolymesh & mesh );
OBVIOUS_PRIVATE_COPY( MbRemeshParams );
};
@@ -591,9 +588,6 @@ public:
void SetMaxIter( size_t maxIter ) { _maxIter = maxIter; }
// \ru Установить флаг сохранения границ. \en Set the save boundaries flag. \~
void SetFixBoundaries( bool bFixBoundaries ) { _bFixBoundaries = bFixBoundaries; }
// \ru Установить флаг сохранения границ. \en Set the save boundaries flag. \~
DEPRECATE_DECLARE_REPLACE( SetFixBoundaries )
void SetFixBorders( bool bFixBorders ) { _bFixBoundaries = bFixBorders; }
// \ru Установить набор индексов фасетов для сглаживания. \en Set facet indices to smooth. \~
void SetFacets( const c3d::IndicesVector & facets ) { _facets = facets; }
// \ru Установить набор фиксированных вершин. \en Set the fixed vertex indices. \~
@@ -608,9 +602,6 @@ public:
size_t GetMaxIter() const { return _maxIter; }
// \ru Получить флаг сохранения границ. \en Get the save boundaries flags. \~
bool GetFixBoundaries() const { return _bFixBoundaries; }
// \ru Получить флаг сохранения границ. \en Get the save boundaries flags. \~
DEPRECATE_DECLARE_REPLACE( GetFixBoundaries )
bool GetFixBorders() const { return _bFixBoundaries; }
// \ru Получить набор индексов фасетов для сглаживания. \en Get facet indices to smooth. \~
const c3d::IndicesVector & GetFacets() const { return _facets; }
// \ru Получить набор фиксированных вершин. \en Get the fixed vertex indices. \~
+6
View File
@@ -2203,6 +2203,7 @@ private:
bool defaultDir1; ///< \ru Направление сопряжения на границе 1 по умолчанию. \en Default mate direction through the boundary 1.
bool defaultDir2; ///< \ru Направление сопряжения на границе 2 по умолчанию. \en Default mate direction through the boundary 2.
bool defaultDir3; ///< \ru Направление сопряжения на границе 3 по умолчанию. \en Default mate direction through the boundary 3.
bool autoDirection; ///< \ru Тип автоопределения направления \en Type of automatic direction detection
mutable uint8 directOrderV;///< \ru По второму семейству кривых порядок кривых совпадает. \en Order of the curves coincides by the second set of curves.
bool tesselate; ///< \ru Достраивать ли дополнительные сечения. \en Whether to build additional sections.
bool g2Cont; ///< \ru Требуется ли гладкость g2 для граней оболочки. \en Is the smoothness g2 required for the faces of the shell.
@@ -2523,6 +2524,11 @@ public:
void SetProportional( bool val ) { useProport = val; }
/// \ru Требуется ли гладкость g2 для граней оболочки. \en Is the smoothness g2 required for the faces of the shell.
bool IsSmooth() const { return g2Cont; }
/// \ru Установить тип автоопределения направления \en Set the auto-detect direction type.
void SetAutoDirection( bool fl ) { autoDirection = fl; }
/// \ru Получить тип автоопределения направления \en Get the auto-detect direction type.
bool GetAutoDirection() const { return autoDirection; }
/// \ru Получить поверхность сопряжения к граничной кривой по параметру на кривой.
/// \en Get the mating surface to the border curve by the curve parameter.
static const MbSurface *
+4
View File
@@ -156,6 +156,10 @@ struct MATH_CLASS ItTreeVariable
virtual double GetValue() const = 0;
/// \ru Установить переменную. \en Set variable.
virtual void SetValue( double ) = 0;
/// \ru Дать строковую переменную. \en Get string variable.
virtual void GetStringValue( c3d::string_t & ) const = 0;
/// \ru Установить строковую переменную. \en Set string variable.
virtual void SetStringValue( const c3d::string_t & ) = 0;
/// \ru Дать координату. \en Get coordinate.
virtual const ItCoord & GetCoord() const = 0;
/// \ru Вычислить размер в байтах. \en Get size in bytes.
+6 -2
View File
@@ -76,6 +76,10 @@ public:
double GetValue () const override { return m_coord.GetValue(); }
/// \ru Установить значение. \en Set value.
void SetValue ( double v ) override { m_coord.SetValue( v ); }
/// \ru Дать строковую переменную. \en Get string variable.
void GetStringValue( c3d::string_t & ) const override {}
/// \ru Установить строковую переменную. \en Set string variable.
void SetStringValue( const c3d::string_t & ) override {}
/// \ru Получить координату. \en Get coordinate.
const MbCoord & GetCoord () const override { return m_coord; }
/// \ru Вычислить размер переменной в байтах. \en Get size of variable in bytes.
@@ -134,9 +138,9 @@ public:
void SetName( const TCHAR* s ) override { m_name.assign(s ? s : _T("")); };
/// \ru Дать строковую переменную. \en Get string variable.
const c3d::string_t & GetStringValue() const { return m_value; }
void GetStringValue( c3d::string_t & value ) const override { value = m_value; }
/// \ru Установить строковую переменную. \en Set string variable.
void SetStringValue( const c3d::string_t & value ) { m_value = value; }
void SetStringValue( const c3d::string_t & value ) override { m_value = value; }
/// \ru Вычислить размер переменной в байтах. \en Get size of variable in bytes.
size_t SizeOf() const override { return sizeof(m_name) + sizeof(m_value) + sizeof(MbCoord) + sizeof(size_t); }
/// \ru Дать тип переменной. \en Get type of variable.
-43
View File
@@ -237,27 +237,6 @@ protected:
double yAcc; ///< \ru Погрешность вдоль оси y. \en Accuracy along y-axis.
double angleAcc; ///< \ru Угловая погрешность. \en Angular accuracy.
public:
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по типу операции и флагам допустимости самокасаний и объединения подобных сегментов.
\en Constructor by a operation type and flags for self-touches and similar segments merging. \~
\deprecated \ru Метод устарел. \en The method is deprecated. \~
\param[in] type - \ru Тип булевой операции.
\en А Boolean operation type. \~
\param[in] allowSelfTouch - \ru Флаг допустимости самокасаний.
\en The flag of self-touching acceptability. \~
\param[in] mergeCurves - \ru Флаг объединения подобных сегментов.
\en The flag of similar segments merging. \~
*/
DEPRECATE_DECLARE_REPLACE( MbRegionBooleanParams with accuracy )
MbRegionBooleanParams( RegionOperationType type, bool selfTouch = true, bool mergeCrvs = true )
: operType( type )
, allowSelfTouch( selfTouch )
, mergeCurves( mergeCrvs )
, xAcc( Math::LengthEps )
, yAcc( Math::LengthEps )
, angleAcc( Math::AngleEps )
{}
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по типу операции, флагам допустимости самокасаний и объединения подобных сегментов и погрешностями.
@@ -401,28 +380,6 @@ MATH_FUNC (bool) CreateBooleanResultRegions( MbRegion & region1, MbRegion & regi
MbResultType * resInfo = nullptr );
//-------------------------------------------------------------------------------
/** \brief \ru Выполнить объединение регионов.
\en Perform union of regions. \~
\details \ru Выполнить объединение регионов.
\en Perform union of regions. \~
\deprecated \ru Функция устарела, взамен использовать #MakeUnionRegions с набором параметров #MbRegionBooleanParams.
\en The function is deprecated, instead use #MakeUnionRegions with the parameter list #MbRegionBooleanParams. \~
\param[in,out] regions - \ru Начальные и конечные регионы.
\en Initial and resulting regions. \~
\param[in] allowSelfTouch - \ru Допустимость самокасаний в результате.
\en Admissibility of self-touches as a result. \~
\param[in] mergeCurves - \ru Объединять подобные сегменты кривых.
\en Merge similar segments of curves. \~
\return \ru true, если какие-то регионы были объединены.
\en Returns true if a pair of regions has been united. \~
\ingroup Algorithms_2D
*/
// ---
DEPRECATE_DECLARE_REPLACE( MakeUnionRegions with MbRegionBooleanParams )
MATH_FUNC (bool) MakeUnionRegions( RPArray<MbRegion> & regions, bool allowSelfTouch = true, bool mergeCurves = true );
//-------------------------------------------------------------------------------
/** \brief \ru Выполнить объединение регионов.
\en Perform union of regions. \~
+2 -2
View File
@@ -351,7 +351,7 @@ public:
\en Whether to add a point to the second curve \~
*/
bool InsertPoints( double & t1, const MbCartPoint & p1, bool add1,
double & t2, const MbCartPoint & p2, bool add2 ) override;
double & t2, const MbCartPoint & p2, bool add2, VERSION vers ) override;
/** \brief \ru Проверить наличие полюса.
\en Check pole availability. \~
@@ -387,7 +387,7 @@ private:
void CheckPole(); // \ru Проверить полюса \en Check poles
// \ru Добавить точку в опорные кривые границы поверхности с постоянной хордой. \en Add a point to the support curves of the boundary of surface with constant chord. \~
bool InsertForSpan( double & t1, const MbCartPoint & p1, bool add1,
double & t2, const MbCartPoint & p2, bool add2 );
double & t2, const MbCartPoint & p2, bool add2, VERSION vers );
void operator = ( const MbChannelSurface & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbChannelSurface )
+2 -5
View File
@@ -192,7 +192,7 @@ public:
};
mutable CacheManager<MbMeshSurfaceAuxiliaryData> cache;
public:
private:
/** \brief \ru Конструктор поверхности.
\en Constructor of surface. \~
\details \ru Конструктор поверхности по двум семействам кривых. Каждая кривая семейства U должна пересекаться или
@@ -218,7 +218,6 @@ public:
\param[in] vers - \ru Версия реализации поверхности.
\en Version of surface implementation. \~
*/
DEPRECATE_DECLARE_REPLACE( MbMeshSurface::Create )
MbMeshSurface( RPArray<MbCurve3D> & initU, RPArray<MbCurve3D> & initV,
bool uClosed, bool vClosed,
bool same, const SArray<uint> * types = nullptr,
@@ -250,7 +249,6 @@ public:
\param[in] vers - \ru Версия реализации поверхности.
\en Version of surface implementation. \~
*/
DEPRECATE_DECLARE_REPLACE( MbMeshSurface::Create )
MbMeshSurface( RPArray<MbCurve3D> & initU, RPArray<MbCurve3D> & initV,
bool uClosed, bool vClosed, bool g2,
bool same, const SArray<uint> * types,
@@ -285,7 +283,6 @@ public:
\param[in] vers - \ru Версия реализации поверхности.
\en Version of surface implementation. \~
*/
DEPRECATE_DECLARE_REPLACE( MbMeshSurface::Create )
MbMeshSurface( RPArray<MbCurve3D> & initU, RPArray<MbCurve3D> & initV,
SArray<double> & parsU, SArray<double> & parsV,
bool uClosed, bool vClosed,
@@ -323,13 +320,13 @@ public:
\param[in] vers - \ru Версия реализации поверхности.
\en Version of surface implementation. \~
*/
DEPRECATE_DECLARE_REPLACE( MbMeshSurface::Create )
MbMeshSurface( RPArray<MbCurve3D> & initU, RPArray<MbCurve3D> & initV,
SArray<double> & parsU, SArray<double> & parsV,
bool uClosed, bool vClosed, bool g2,
bool same, const SArray<uint> * types,
MbeMeshSurfaceVersion vers );
public:
/** \brief \ru Функция создания поверхности.
\en Surface creation function. \~
\details \ru Функция создания поверхности по сети кривых. Возвращает созданную поверхность
+3 -2
View File
@@ -514,7 +514,7 @@ protected :
// \ru Вычисление пересечений направляющих с плоскостью сечения поверхности. \ en Calculating the intersections of guides with the surface cross-section plane.
bool SectionData( const MbCurve3D * curve0, const double & v, MbPlacement3D & place,
MbCartPoint & xy0, double & t0,
MbCartPoint & xy1, MbVector & vec1, double & t1,
MbCartPoint & xy1, MbVector & vec1, double & t1,
MbCartPoint & xy2, MbVector & vec2, double & t2 ) const;
// \ru // Уточнение точек пересечений направляющих с плоскостью сечения поверхности. \ en Refinement of the intersections points of guides with the surface cross-section plane.
bool SmoothSection( const double & v, const MbPlacement3D & place, const double & t1, const double & t2,
@@ -552,7 +552,8 @@ protected :
void Section ( const double & u, const double & v, MbCartPoint3D & pnt,
MbVector3D * uDer, MbVector3D * vDer,
MbVector3D * uuDer, MbVector3D * uvDer, MbVector3D * vvDer,
MbVector3D * uuuDer, MbVector3D * uuvDer, MbVector3D * uvvDer, MbVector3D * vvvDer ) const;
MbVector3D * uuuDer, MbVector3D * uuvDer, MbVector3D * uvvDer, MbVector3D * vvvDer,
MbSectionSurfaceAuxiliaryData * loccache ) const;
void PointOn ( double & v, double & u, bool ext, MbCartPoint3D & p ) const; // \ru Вычисления точки поверхности. \en Calculate surface point.
void DeriveU ( double & u, double & v, bool ext, MbVector3D & ) const; // \ru Первая производная по u. \en The first derivative with respect to u.
void DeriveV ( double & u, double & v, bool ext, MbVector3D & ) const; // \ru Первая производная по v. \en The first derivative with respect to v.
+1 -1
View File
@@ -298,7 +298,7 @@ public:
\en Whether to add a point to the second curve \~
*/
virtual bool InsertPoints( double & t1, const MbCartPoint & p1, bool add1,
double & t2, const MbCartPoint & p2, bool add2 );
double & t2, const MbCartPoint & p2, bool add2, VERSION vers );
/** \brief \ru Продлить поверхность.
\en Prolong surface. \~
+3 -1
View File
@@ -632,7 +632,9 @@ template <class Type>
inline bool RPArray<Type>::CatchMemory() {
if ( upper == count )
return set_Rarray_size( *this, upper + AutoDelta() );
return true;
if ( parr != nullptr )
return true;
return false;
}
+3 -1
View File
@@ -761,7 +761,9 @@ template <class Type>
inline bool SArray<Type>::CatchMemory() {
if ( upper == count )
return set_array_size( *this, upper + AutoDelta(), false/*clear*/ );
return true;
if ( parr != nullptr )
return true;
return false;
}
-2
View File
@@ -983,8 +983,6 @@ public :
/// \ru Получить параметры разрезки для периодического ребра. \en Get the cutting parameters for a periodic edge.
bool CutPeriodicEdge( const MbVector3D & eye, SSArray<double> & trimParams,
double & delT1, double & delT2 ) const;
/// \ru Согласовать тип кривой пересечения. \en Agree on the type of intersection curve.
DEPRECATE_DECLARE void AgreeBuildType( double tCurve );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
OBVIOUS_PRIVATE_COPY( MbCurveEdge )
-10
View File
@@ -79,18 +79,8 @@ public :
MbWireFrame();
/// \ru Конструктор по кривой и строителю. \en Constructor by a curve and creator.
MbWireFrame( const MbCurve3D &, const MbCreator * = nullptr );
/// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator.
DEPRECATE_DECLARE MbWireFrame( const RPArray<MbCurve3D> &, const MbCreator * = nullptr );
/// \ru Конструктор по множеству кривых и строителю. \en Constructor by a set of curves and creator.
DEPRECATE_DECLARE MbWireFrame( const c3d::SpaceCurvesSPtrVector &, const MbCreator * = nullptr );
/// \ru Конструктор по ребру и строителю. \en Constructor by an edge and creator.
MbWireFrame( const MbEdge &, const MbCreator * = nullptr, bool same = true );
/// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator.
DEPRECATE_DECLARE MbWireFrame( const RPArray<MbEdge> &, const MbCreator * = nullptr, bool same = true );
/// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator.
DEPRECATE_DECLARE MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbCreator * = nullptr, bool same = true );
/// \ru Конструктор по множеству рёбер и строителю. \en Constructor by a set of edges and creator.
DEPRECATE_DECLARE MbWireFrame( const c3d::WireEdgesSPtrVector &, const MbWireFrame & oldFrame, const MbCreator * = nullptr );
/** \brief \ru Создать каркас.
\en Create wireframe. \~
\details \ru Создать каркас по множеству ребер и строителю.\n
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.