Extern :
- C3d aggiornamento delle librerie ( 117962).
This commit is contained in:
@@ -38,6 +38,7 @@ class MATH_CLASS MbOrientedBox;
|
||||
class MATH_CLASS MbMeshUnwrapParams;
|
||||
class MATH_CLASS MbMeshUnwrapResult;
|
||||
class MATH_CLASS MbObjectAlignmentParams;
|
||||
class MATH_CLASS MbObjectAlignmentResult;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Данные диагностики полигонального объекта.
|
||||
@@ -754,10 +755,10 @@ MATH_FUNC( MbResultType ) UnwrapMesh( const MbMeshUnwrapParams & params, MbMeshU
|
||||
\en Object to which another object is aligned. \~
|
||||
\param[in] moving - \ru Объект, для которого находим трансформацию.
|
||||
\en Object which is being aligned. \~
|
||||
\param[in] params - \ru Параметры алгоритма.
|
||||
\en Parameters. \~
|
||||
\param[out] matrix - \ru Трансформация, необходимая для выравнивания.
|
||||
\en Transformation needed for alignment. \~
|
||||
\param[in] params - \ru Параметры совмещения объектов.
|
||||
\en Parameters of object alignment. \~
|
||||
\param[out] result - \ru Результат совмещения объектов.
|
||||
\en Result of object alignment. \~
|
||||
\return \ru Код результата операции.
|
||||
\en Returns the operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
@@ -766,6 +767,6 @@ MATH_FUNC( MbResultType ) UnwrapMesh( const MbMeshUnwrapParams & params, MbMeshU
|
||||
MATH_FUNC( MbResultType ) AlignObjects( const MbItem & fixed,
|
||||
const MbItem & moving,
|
||||
const MbObjectAlignmentParams & params,
|
||||
MbMatrix3D & matrix );
|
||||
MbObjectAlignmentResult & result );
|
||||
|
||||
#endif // __ACTION_MESH_H
|
||||
|
||||
@@ -708,11 +708,11 @@ MATH_FUNC (MbCurve3D *) CreateJoinedCurve( const RPArray<MbCurveEdge> & edges,
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Shell_Modeling
|
||||
\deprecated \ru Функция устарела, взамен использовать #FacesFillet с #MbFacesFilletParams.
|
||||
\en The function is deprecated, use #FacesFillet with #MbFacesFilletParams instead. \~
|
||||
\deprecated \ru Функция устарела, взамен использовать #FacesFillet с #MbFilletData.
|
||||
\en The function is deprecated, use #FacesFillet with #MbFilletData instead. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( FacesFillet with MbFacesFilletParams )
|
||||
DEPRECATE_DECLARE_REPLACE( FacesFillet with MbFilletData )
|
||||
MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
|
||||
const MbFace & face1,
|
||||
const MbSolid & solid2,
|
||||
@@ -736,8 +736,8 @@ MATH_FUNC (MbResultType) FacesFillet( const MbSolid & solid1,
|
||||
\ingroup Shell_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) FacesFillet( const MbFacesFilletParams & params,
|
||||
c3d::SolidSPtr & result );
|
||||
MATH_FUNC (MbResultType) FacesFillet( const MbFilletData & params,
|
||||
c3d::SolidSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Методы построения каркаса.
|
||||
\en Functions for wire frame creation. \~
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ACTION_WIREFRAME_H
|
||||
#define __ACTION_WIREFRAME_H
|
||||
|
||||
|
||||
#include <wire_frame.h>
|
||||
|
||||
class MATH_CLASS MbWireFrameFilletsParams;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать скругленный каркас.
|
||||
\en Create a filleted wire frame. \~
|
||||
\details \ru Создать каркас в виде плавного соединения (скругления) всех ребер каркаса. \n
|
||||
Если два ребра в каркасе гладко стыкуются, в этом стыке скругление не делается, радиус игнорируется. \n
|
||||
\en Create a wire frame as fillet of all the edges of a wire frame. \n
|
||||
If two edges in wire frame are smoothly connected, the fillet is not created at this joint, the radius is ignored. \n \~
|
||||
\param[in] wireframe - \ru Исходный каркас.
|
||||
\en The initial wire frame. \~
|
||||
\param[in] sameEdges - \ru Режим копирования входного каркаса.
|
||||
\en Whether to copy the input wire frame. \~
|
||||
\param[in] params - \ru Параметры скругления.
|
||||
\en A fillet parameters. \~
|
||||
\param[out] result - \ru Скругленный каркас.
|
||||
\en The filleted wire frame. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup WireFrame_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) CreateWireFrameFillets( c3d::WireFrameSPtr & wireframe,
|
||||
MbeCopyMode sameEdges,
|
||||
const MbWireFrameFilletsParams & params,
|
||||
c3d::WireFrameSPtr & result );
|
||||
|
||||
#endif // __ACTION_WIREFRAME_H
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
|
||||
public:
|
||||
const c3d::string_t & GetValue() const { return value_; } ///< \ru Выдать значение. \en Get a value.
|
||||
bool SetValue( c3d::string_t & ); ///< \ru Установить новое значение. \en Set new value.
|
||||
bool SetValue( const c3d::string_t & ); ///< \ru Установить новое значение. \en Set new value.
|
||||
|
||||
protected:
|
||||
virtual ~MbStringAttribute(); // Use AddRef/Release or smart pointer SPtr<MbAttribute> to destruct it correctly.
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
|
||||
public:
|
||||
const std::vector<unsigned char> & GetValue() const { return value_; } ///< \ru Выдать значение. \en Get a value.
|
||||
bool SetValue( std::vector<unsigned char> & ); ///< \ru Установить новое значение. \en Set new value.
|
||||
bool SetValue( const std::vector<unsigned char> & ); ///< \ru Установить новое значение. \en Set new value.
|
||||
size_t Count() const { return value_.size(); } ///< \ru Выдать число элементов в массиве. \en Get a number of elements in the array.
|
||||
unsigned char operator [] ( size_t k ) const { return value_[k]; } ///< \ru Доступ к элементу массива по индексу (без проверки на выход за границы). \en Access to array element by index (without bounds checking).
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <mb_data.h>
|
||||
#include <conv_predefined.h>
|
||||
#include <reference_item.h>
|
||||
#include <tool_cstring.h>
|
||||
#include <map>
|
||||
|
||||
class MbProductInfo;
|
||||
@@ -40,7 +41,7 @@ class MbProductInfo;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Константы единиц массы.
|
||||
\en Mass units constants.\~
|
||||
\en Mass units constants.\~
|
||||
\ingroup Data_Interface
|
||||
*/
|
||||
// ---
|
||||
@@ -79,6 +80,8 @@ enum MbeConverterStrings {
|
||||
cvs_STEPOrganization, ///< \ru Организация для конвертера STEP. \en The organization, the author is related with, in STEP.
|
||||
cvs_STEPComment, ///< \ru Комментарий файла формата STEP. \en Annotation, in STEP.
|
||||
cvs_CAD_NAME, ///< \ru Название САПР при экспорте. \en CAD Name for export.
|
||||
cvs_STEPPreprocessorVersion, ///< \ru Поле Preprocerssor version из формата STEP. \en Preprocerssor version, in STEP.
|
||||
cvs_STEPAuthorization, ///< \ru Поле Authorization из формата STEP. \en Authorization, in STEP.
|
||||
cvs_END ///< \ru Для удобства перебора. \en For lookup only.
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Строитель скругления каркаса.
|
||||
\en Wire frame fillets creator.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_FILLET_WIREFRAME_H
|
||||
#define __CR_FILLET_WIREFRAME_H
|
||||
|
||||
#include <creator.h>
|
||||
|
||||
class MATH_CLASS MbWireFrameFilletsParams;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель скругления каркаса.
|
||||
\en Wire frame fillets creator. \~
|
||||
\details \ru Строитель скругления каркаса.\n
|
||||
\en Wire frame fillets creator.\n \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFilletWireFrameCreator : public MbCreator {
|
||||
private:
|
||||
MbeConnectingType _type; ///< \ru Тип выполняемых скруглений. \en Fillet type( ordinary or on a surface ).
|
||||
c3d::DoubleVector _radiuses; ///< \ru Множество радиусов скругления. \en An array of fillet radii.
|
||||
MbPrecision _precision; ///< \ru Точность построения объекта. \en The precision of object construction.
|
||||
public:
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbFilletWireFrameCreator( const MbWireFrameFilletsParams & params );
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbFilletWireFrameCreator() {};
|
||||
|
||||
protected:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbFilletWireFrameCreator( const MbFilletWireFrameCreator & other, MbRegDuplicate * iReg );
|
||||
|
||||
private:
|
||||
MbFilletWireFrameCreator(); // \ru Не реализовано \en Not implemented
|
||||
|
||||
public:
|
||||
// \ru Общие функции строителя. \en The common functions of the creator.
|
||||
MbeCreatorType IsA() const override; // \ru Тип элемента \en A type of element
|
||||
MbCreator & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Сделать копию \en Create a copy
|
||||
|
||||
bool IsSame ( const MbCreator &, double accuracy ) const override; // \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSimilar( const MbCreator & ) const override; // \ru Являются ли объекты подобными \en Whether the objects are similar
|
||||
bool SetEqual ( const MbCreator & ) override; // \ru Сделать равным \en Make equal
|
||||
|
||||
void Transform( const MbMatrix3D &, MbRegTransform * = nullptr ) override; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix
|
||||
void Move ( const MbVector3D &, MbRegTransform * = nullptr ) override; // \ru Сдвиг \en Translation
|
||||
void Rotate ( const MbAxis3D &, double angle, MbRegTransform * = nullptr ) override; // \ru Повернуть вокруг оси \en Rotate about an axis
|
||||
|
||||
MbePrompt GetPropertyName() override; // \ru Дать имя свойства объекта \en Get the object property name
|
||||
void GetProperties ( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
|
||||
void SetProperties ( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
|
||||
|
||||
// \ru Построить кривую по журналу построения. \en Create a curve from the history tree
|
||||
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbFilletWireFrameCreator )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFilletWireFrameCreator )
|
||||
}; // MbFilletWireFrameCreator
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbFilletWireFrameCreator )
|
||||
|
||||
|
||||
|
||||
#endif // __CR_FILLET_WIREFRAME_H
|
||||
@@ -93,6 +93,7 @@ enum MbeCreatorType {
|
||||
ct_UnwrapCurveCreator = 214, ///< \ru Строитель развёрнутой кривой. \en Constructor of the unwrapped curve. \n
|
||||
ct_WrapCurveCreator = 215, ///< \ru Строитель cвёрнутой кривой. \en Constructor of the wrapped curve. \n
|
||||
ct_BeamCurveCreator = 216, ///< \ru Строитель балочной кривой. \en Constructor of the beam curve. \n
|
||||
ct_FilletWireCreator = 217, ///< \ru Строитель скругленного каркаса. \en Constructor of the filleted wireframe. \n
|
||||
|
||||
// \ru Строители полигональных объектов. \en Creators of polygonal objects.
|
||||
ct_SimpleMeshCreator = 400, ///< \ru Строитель полигонального объекта без истории. \en Constructor of a polygonal object without history.
|
||||
|
||||
@@ -309,8 +309,62 @@ DEPRECATE_DECLARE_REPLACE( CheckClosed )
|
||||
MbeLocation PointLocation( const MbCartPoint & pnt, double eps = Math::LengthEps ) const override;
|
||||
|
||||
double PointProjection( const MbCartPoint & ) const override; // \ru Проекция точки на кривую \en Point projection on the curve
|
||||
|
||||
/** \brief \ru Найти проекцию точки на контур.
|
||||
\en Find the point projection to the contour. \~
|
||||
\details \ru Найти ближайшую проекцию точки на контур в диапазоне изменения параметра или на его продолжении.
|
||||
По умолчанию ('tRange' = nullptr), диапазон изменения параметра совпадает с областью определения контура.
|
||||
Если же 'tRange' задан, то диапазон изменения параметра совпадает с 'tRange' (заданный диапазон может
|
||||
выходить за пределы области определения контура).
|
||||
Режим работы метода зависит от 'ext'.
|
||||
При 'ext' = true, параметру 't' присваивается значение, соответствующее ближайшей проекции
|
||||
в рамках диапазона изменения параметра или на его продолжении. Результат выполнения метода - true.
|
||||
При 'ext' = false, метод производит поиск ближайшей проекции только в рамках диапазона изменения параметра.
|
||||
Если проекция находится, параметру 't' присваивается соответствующее значение. Результат выполнения метода - true.
|
||||
Если ближайшая проекция не находится, проекция "загоняется" в диапазон и
|
||||
параметру 't' присваивается значение ближайшей границы диапазона. Результат выполнения метода - false.
|
||||
Если имеют место несколько равноудаленных проекций с минимальным расстоянием,
|
||||
выбор производится следующим образом:
|
||||
- при 'ext' = true, всегда возвращается точка, лежащая в диапазоне поиска;
|
||||
- из проекций, лежащих в диапазоне выбирается проекция с минимальным значением параметра;
|
||||
- если все ближайшие проекции лежат вне диапазона ('ext' = true), выбирается ближайшая к области определения проекция.
|
||||
Используется метод Ньютона.
|
||||
\en Find the nearest projection of a point to the contour within the parameter range or its extension.
|
||||
By default ('tRange' = nullptr), the parameter range coincides with the contour's domain.
|
||||
If the 'tRange' is defined, the parameter range aligns with the 'tRange' (range may not belong to the contour's domain).
|
||||
The method's results depend on the 'ext' flag.
|
||||
When 'ext' = true, the parameter 't' is assigned the value corresponding to the nearest projection within
|
||||
the parameter range or its extension. The method's result is true.
|
||||
When 'ext' = false, the method searches for the nearest projection only within the parameter range.
|
||||
If a projection is found, the parameter 't' is assigned the corresponding value. The method's result is true.
|
||||
If the nearest projection is not found, the projection is confined within the range,
|
||||
and the parameter 't' is assigned the value corresponding to the nearest boundary of the range. The method's result is false.
|
||||
If there are multiple equidistant projections with the minimum distance,
|
||||
the selection is made according to the following rules:
|
||||
- when 'ext' = true, a point within the parameter range is always returned;
|
||||
- among the projections within the parameter range, the projection with the minimum parameter value is chosen;
|
||||
- if all nearest projections are located outside the parameter range ('ext' = true),
|
||||
the projection closest to the contour's domain is chosen.
|
||||
Newton's method is used. \~
|
||||
\param[in] pnt - \ru Заданная точка.
|
||||
\en A given point. \~
|
||||
\param[in] xEpsilon - \ru Точность определения проекции по оси x.
|
||||
\en A tolerance of detection of the projection by x axis. \~
|
||||
\param[in] yEpsilon - \ru Точность определения проекции по оси y.
|
||||
\en A tolerance of detection of the projection by y axis. \~
|
||||
\param[in,out] t - \ru На входе - начальное приближение, на выходе - параметр кривой, соответствующий ближайшей проекции.
|
||||
\en Input - initial approximation, output - parameter of a curve corresponding to the nearest projection. \~
|
||||
\param[in] ext - \ru Флаг, определяющий, искать ли проекцию на продолжении диапазона изменения параметра (если true, то искать).
|
||||
\en A flag defining whether to seek projection on the extension of the curve. \~
|
||||
\param[in] tRange - \ru Диапазон изменения параметра, в котором надо найти решение.
|
||||
\en A range of parameter changing in which the solution should be found. \~
|
||||
\return \ru Возвращает true, если найденный параметр находится в допустимом диапазоне (в соответствии с заданными параметрами ext, tRange),
|
||||
или false - в противном случае.
|
||||
\en Returns true if the found parameter is in a valid range (according to the given ext, tRange parameters),
|
||||
or false - otherwise. \~
|
||||
*/
|
||||
bool NearPointProjection( const MbCartPoint &, double xEpsilon, double yEpsilon,
|
||||
double & t, bool ext, MbRect1D * tRange = nullptr ) const override; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
|
||||
double & t, bool ext, MbRect1D * tRange = nullptr ) const override;
|
||||
|
||||
/** \brief \ru Параметрическое расстояние до ближайшей границы.
|
||||
\en Parametric distance to the nearest boundary.
|
||||
|
||||
@@ -193,8 +193,59 @@ public:
|
||||
/// \ru Подобные ли кривые для объединения (слива). \en Whether the curves to union (joining) are similar.
|
||||
bool IsSimilarToCurve( const MbCurve3D & other, double precision = METRIC_PRECISION ) const override;
|
||||
|
||||
// \ru Все проекции точки на кривую \en All point projections on the curve
|
||||
// \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve
|
||||
/** \brief \ru Найти проекцию точки на контур.
|
||||
\en Find the point projection to the contour. \~
|
||||
\details \ru Найти ближайшую проекцию точки на контур в диапазоне изменения параметра или на его продолжении.
|
||||
По умолчанию ('tRange' = nullptr), диапазон изменения параметра совпадает с областью определения контура.
|
||||
Если же 'tRange' задан, то диапазон изменения параметра совпадает с 'tRange' (заданный диапазон может
|
||||
выходить за пределы области определения контура).
|
||||
Режим работы метода зависит от 'ext'.
|
||||
При 'ext' = true, параметру 't' присваивается значение, соответствующее ближайшей проекции
|
||||
в рамках диапазона изменения параметра или на его продолжении. Результат выполнения метода - true.
|
||||
При 'ext' = false, метод производит поиск ближайшей проекции только в рамках диапазона изменения параметра.
|
||||
Если проекция находится, параметру 't' присваивается соответствующее значение. Результат выполнения метода - true.
|
||||
Если ближайшая проекция не находится, проекция "загоняется" в диапазон и
|
||||
параметру 't' присваивается значение ближайшей границы диапазона. Результат выполнения метода - false.
|
||||
Если имеют место несколько равноудаленных проекций с минимальным расстоянием,
|
||||
выбор производится следующим образом:
|
||||
- при 'ext' = true, всегда возвращается точка, лежащая в диапазоне поиска;
|
||||
- из проекций, лежащих в диапазоне выбирается проекция с минимальным значением параметра;
|
||||
- если все ближайшие проекции лежат вне диапазона ('ext' = true), выбирается ближайшая к области определения проекция.
|
||||
Используется метод Ньютона.
|
||||
\en Find the nearest projection of a point to the contour within the parameter range or its extension.
|
||||
By default ('tRange' = nullptr), the parameter range coincides with the contour's domain.
|
||||
If the 'tRange' is defined, the parameter range aligns with the 'tRange' (range may not belong to the contour's domain).
|
||||
The method's results depend on the 'ext' flag.
|
||||
When 'ext' = true, the parameter 't' is assigned the value corresponding to the nearest projection within
|
||||
the parameter range or its extension. The method's result is true.
|
||||
When 'ext' = false, the method searches for the nearest projection only within the parameter range.
|
||||
If a projection is found, the parameter 't' is assigned the corresponding value. The method's result is true.
|
||||
If the nearest projection is not found, the projection is confined within the range,
|
||||
and the parameter 't' is assigned the value corresponding to the nearest boundary of the range. The method's result is false.
|
||||
If there are multiple equidistant projections with the minimum distance,
|
||||
the selection is made according to the following rules:
|
||||
- when 'ext' = true, a point within the parameter range is always returned;
|
||||
- among the projections within the parameter range, the projection with the minimum parameter value is chosen;
|
||||
- if all nearest projections are located outside the parameter range ('ext' = true),
|
||||
the projection closest to the contour's domain is chosen.
|
||||
Newton's method is used. \~
|
||||
\param[in] pnt - \ru Заданная точка.
|
||||
\en A given point. \~
|
||||
\param[in] xEpsilon - \ru Точность определения проекции по оси x.
|
||||
\en A tolerance of detection of the projection by x axis. \~
|
||||
\param[in] yEpsilon - \ru Точность определения проекции по оси y.
|
||||
\en A tolerance of detection of the projection by y axis. \~
|
||||
\param[in,out] t - \ru На входе - начальное приближение, на выходе - параметр кривой, соответствующий ближайшей проекции.
|
||||
\en Input - initial approximation, output - parameter of a curve corresponding to the nearest projection. \~
|
||||
\param[in] ext - \ru Флаг, определяющий, искать ли проекцию на продолжении диапазона изменения параметра (если true, то искать).
|
||||
\en A flag defining whether to seek projection on the extension of the curve. \~
|
||||
\param[in] tRange - \ru Диапазон изменения параметра, в котором надо найти решение.
|
||||
\en A range of parameter changing in which the solution should be found. \~
|
||||
\return \ru Возвращает true, если найденный параметр находится в допустимом диапазоне (в соответствии с заданными параметрами ext, tRange),
|
||||
или false - в противном случае.
|
||||
\en Returns true if the found parameter is in a valid range (according to the given ext, tRange parameters),
|
||||
or false - otherwise. \~
|
||||
*/
|
||||
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override;
|
||||
|
||||
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину \en Calculate the metric length
|
||||
|
||||
@@ -75,8 +75,9 @@ protected :
|
||||
\en Auxiliary data are used for fast calculations. \n \~
|
||||
*/
|
||||
mutable MbCube cube; ///< \ru Габаритный куб. \en Bounding box.
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of a curve. \~
|
||||
mutable double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of a curve.
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of the curve. \~
|
||||
mutable double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of the curve.
|
||||
mutable MbCartPoint3D weightCenter; ///< \ru Центр тяжести кривой. \en Center of mass of the curve.
|
||||
mutable double curveRadius; ///< \ru Радиус кривой, если она является дугой окружности в пространстве. \en The radius of the curve, if the curve is a spatial arc.
|
||||
mutable c3d::DoublePair radiusAccuracy; ///< \ru Точности вычисления curveRadius. \en The precisions for the calculation of curveRadius.
|
||||
mutable ThreeStates isStraight; ///< \ru Флаг прямолинейности. \en A straightness flag.
|
||||
|
||||
@@ -29,6 +29,7 @@ const GCE_app_geom GCE_NOGEOM = 0; ///< \en Specifies an undefined object of th
|
||||
typedef void ( *GCE_geom_registered )( GCE_app_geom ag ); ///< Application geom was registered in the solver.
|
||||
typedef void ( *GCE_geom_unregistered )( GCE_app_geom ag );
|
||||
typedef bool ( *GCE_allow_zero_radius )( GCE_app_geom ag ); ///<
|
||||
typedef bool ( *GCE_allow_zero_length )( GCE_app_geom ag ); ///<
|
||||
typedef bool ( *GCE_abort )(); ///< Query to interrupt calculations
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -52,6 +53,7 @@ typedef struct GCE_CLASS
|
||||
Geometry properties
|
||||
*/
|
||||
GCE_allow_zero_radius allowZeroRadius; ///< Permit circle to have zero radius.
|
||||
GCE_allow_zero_length allowZeroLength; ///< Permit curve to have zero length.
|
||||
} GCE_callback_table;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <gcm_geom.h>
|
||||
#include <gcm_manager.h>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Чёрный ящик.
|
||||
\en Blackbox. \~
|
||||
@@ -40,6 +41,8 @@
|
||||
//---
|
||||
struct GCM_CLASS ItGCBlackbox
|
||||
{
|
||||
using GeomPlace = std::pair<const ItGeom*, MbPlacement3D>;
|
||||
|
||||
/// \ru Выдать независимые геометрические объекты. \en The function collects in the array independent geoms of a blackbox.
|
||||
virtual void CollectMyInGeoms( IFC_Array<ItGeom> & ) const = 0;
|
||||
/// \ru Выдать зависимые геометрические объекты. \en The function collects in the array dependent geoms of a blackbox.
|
||||
@@ -55,9 +58,29 @@ struct GCM_CLASS ItGCBlackbox
|
||||
\return \ru true, если функция корректно исполнена.
|
||||
\en true if the function performed succeeded. \~
|
||||
*/
|
||||
virtual bool Calculate( const SArray<MbPlacement3D> & inPlaces
|
||||
, const ItGeom & depGeom
|
||||
, MbPlacement3D & depPlace ) const = 0;
|
||||
// Deprecated.
|
||||
virtual bool Calculate( const SArray<MbPlacement3D> & /*inPlaces*/, const ItGeom & /*depGeom*/
|
||||
, MbPlacement3D & /*depPlace*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/** \brief \ru Рассчитать положение зависимого объекта.
|
||||
\en Calculate position of a dependent geometric object. \~
|
||||
*/
|
||||
virtual GCM_dependent_result CalculateDependent( const std::vector<GeomPlace> & inGeomPlaces
|
||||
, GeomPlace & depPlace ) const
|
||||
{
|
||||
SArray<MbPlacement3D> inPlaces( inGeomPlaces.size() );
|
||||
for ( const GeomPlace & inPlace : inGeomPlaces )
|
||||
{
|
||||
inPlaces.push_back( inPlace.second );
|
||||
}
|
||||
if ( depPlace.first != nullptr )
|
||||
return Calculate( inPlaces, *depPlace.first, depPlace.second ) ? GCM_DEP_RESULT_Ok : GCM_DEP_RESULT_None;
|
||||
return GCM_DEP_RESULT_InternalError;
|
||||
}
|
||||
|
||||
/// \ru Является ли данный объект зависимым для черного ящика? \en Check if the given geometric item is dependent
|
||||
virtual bool IsMyOutGeom( const ItGeom & ) const = 0;
|
||||
/**
|
||||
|
||||
@@ -465,6 +465,18 @@ struct GCM_CLASS GCM_extra_param
|
||||
GCM_extra_param() { funcId = 0, funcData = 0; }
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Resulting code is returned by callback ItGCBlackbox::CalculateDependent.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
GCM_DEP_RESULT_Ok, // The dependent geom calculated successfully. The calculated value satisfies GCM_DEPENDENT constraint.
|
||||
GCM_DEP_RESULT_None, // No result.
|
||||
GCM_DEP_RESULT_NoSolution, // There is no solution to the dependent object for the given the values of the independent objects.
|
||||
GCM_DEP_RESULT_InputListInappropriate, // C3D Solver sent an inappropriate or deprecated list of independent geoms via callback. C3D Solver прислал неверный список независимых аргументов в функцию обратного вызова..
|
||||
GCM_DEP_RESULT_InternalError,
|
||||
} GCM_dependent_result;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// The function calculates position of a dependent geom regarding to other independent geoms.
|
||||
/*
|
||||
|
||||
@@ -170,6 +170,7 @@ enum MbePrompt
|
||||
IDS_ITEM_0269, ///< \ru Развернутая кривая. \en Unwrapped curve.
|
||||
IDS_ITEM_0270, ///< \ru Свёрнутая кривая. \en Wrapped curve.
|
||||
IDS_ITEM_0271, ///< \ru Балочная кривая. \en Beam curve.
|
||||
IDS_ITEM_0272, ///< \ru Скругленный каркас. \en Filleted wire frame.
|
||||
|
||||
|
||||
// \ru Типы параметрических поверхностей. \en Types of parametric surfaces.
|
||||
|
||||
+1
-1
@@ -227,7 +227,7 @@ public:
|
||||
}
|
||||
/// \ru Получить все точки триангуляции. \en Get all triangulations points.
|
||||
template <class Point, class PointsVector>
|
||||
void GetGridsPoints( PointsVector & points )
|
||||
void GetGridsPoints( PointsVector & points ) const
|
||||
{
|
||||
size_t addPointsCnt = 0;
|
||||
|
||||
|
||||
@@ -601,6 +601,14 @@ public:
|
||||
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbIntCurveResults() : _label( cbt_Ordinary ) {}
|
||||
|
||||
/// \ru Обнулить данные. \en Reset the data.
|
||||
void Reset()
|
||||
{
|
||||
_curve1.reset();
|
||||
_curve2.reset();
|
||||
_wireFrame.reset();
|
||||
}
|
||||
OBVIOUS_PRIVATE_COPY( MbIntCurveResults )
|
||||
};
|
||||
|
||||
@@ -1023,9 +1031,9 @@ KNOWN_OBJECTS_RW_REF_OPERATORS( MbCurveExtensionParameters3D ) // \ru Для р
|
||||
//-------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры создания фаски.
|
||||
\en Parameters for the chamfer creation. \~
|
||||
\details \ru Параметры создания фаски для пары соседних сегментов контура (или полилинии).
|
||||
\details \ru Параметры создания фаски для пары соседних сегментов контура (или полилинии).
|
||||
\en Parameters for the chamfer creation between two adjacent contour (or polyline) segments. \n \~
|
||||
\ingroup Data_Structures
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
// ---
|
||||
struct MATH_CLASS MbCornerChamferParams {
|
||||
@@ -1154,22 +1162,22 @@ public:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры для переноса копий двумерных кривых на другой носитель.
|
||||
\en Parameters for transferring copies of two-dimensional curves on another medium. \~
|
||||
\details \ru Точка xy плоскости XY локальной системы координат должна совпадать с точкой uv
|
||||
параметрической области UV поверхности.
|
||||
При параметрах angle = 0 и sense = true наложение плоскости на поверхность
|
||||
делается таким образом, что оси 'xy' плоскости и 'uv' поверхности соответственно сопадают.
|
||||
При параметрах 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.
|
||||
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 \~
|
||||
\ingroup Curve3D_Building_Parameters
|
||||
\details \ru Точка xy плоскости XY локальной системы координат должна совпадать с точкой uv
|
||||
параметрической области UV поверхности.
|
||||
При параметрах angle = 0 и sense = true наложение плоскости на поверхность
|
||||
делается таким образом, что оси 'xy' плоскости и 'uv' поверхности соответственно сопадают.
|
||||
При параметрах 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.
|
||||
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 \~
|
||||
\ingroup Curve3D_Building_Parameters
|
||||
*/ // ---
|
||||
class MATH_CLASS MbCurvesWrappingParams : public MbPrecision {
|
||||
private:
|
||||
|
||||
@@ -845,11 +845,35 @@ public:
|
||||
\en Hot point. \~
|
||||
\param[in] dir - \ru Направление.
|
||||
\en Direction. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
\return \ru Возвращает "true" в случае успеха.
|
||||
\en Returns "true" in case of success. \~
|
||||
*/
|
||||
//DEPRECATE_DECLARE_REPLACE(GetFilletRadiusSetHotPoint with MbAxis3D)
|
||||
bool GetFilletRadiusSetHotPoint( MbCartPoint3D & pnt,
|
||||
MbVector3D & dir ) const;
|
||||
|
||||
/** \brief \ru Получить нормаль и хот-точку на первой грани для операции по установке радиусов граням скругления.
|
||||
\en Get normal and hot point on first face for operation of setting radius of fillet faces . \~
|
||||
\details \ru В центре грани скругления берётся точка pointOnFilletFace. Через неё строится
|
||||
плоскость, перпендикулярная поверхности скругления или содержащая линию u(или v) = const.
|
||||
Эта линию является дугой окружности в этой плоскости. Ось circleCenter начинается
|
||||
из центра этой дуги и направлена перпендикулярно этой плоскости. Таким образом, расстояние
|
||||
между началом оси и точкой на грани равно радиусу сругления.
|
||||
\en The point 'pointOnFilletFace' is located in the center of the fillet face.
|
||||
There us a plane that contains this point and the u(or v)=const line of the fillet face.
|
||||
This line is an arc on this plane. Axis circleCenter starts from the center of this arc and
|
||||
the direction is perpendicular to the plane. So, the distance between the axis start point and
|
||||
the point on the face equals fillet radius.\~
|
||||
\param[out] pointOnFilletFace - \ru Точка, лежащая на грани скругления нового радиуса.
|
||||
\en Point on the new radius fillet face. \~
|
||||
\param[out] circleCenter - \ru Ось вдоль оси грани скругления.
|
||||
\en Axis along the fillet axis.\~
|
||||
\return \ru Возвращает "true", если хот-точка была рассчитана.
|
||||
\en Returns "true" if the hot-point is calculated. \~
|
||||
*/
|
||||
bool GetFilletRadiusSetHotPoint( MbCartPoint3D & pointOnFilletFace,
|
||||
MbAxis3D & circleCenter ) const;
|
||||
// \ru Очистка. \en Reset.
|
||||
void Reset()
|
||||
{
|
||||
|
||||
@@ -716,11 +716,58 @@ public:
|
||||
}; // MbMeshUnwrapResult
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Режим использования подсказки при совмещении объектов по алгоритму ICP.
|
||||
\en Hint usage mode for object alignment by the ICP algorithm. \~
|
||||
\details \ru Режим использования подсказки при совмещении объектов по алгоритму ICP.
|
||||
Режим без использования подсказки подразумевает совмещение объектов в их исходном положении.
|
||||
Другие режимы допускают начальную трансформацию движущегося объекта.
|
||||
\en Hint usage mode for object alignment by the ICP algorithm.
|
||||
The mode without any hint implies object alignment from their initial positions.
|
||||
Other modes assume some initial transformation of a moving object. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
enum class MbeIcpHintUsageMode
|
||||
{
|
||||
noHint, ///< \ru Не использовать подсказку. \en Do not use any hint.
|
||||
autoHint, ///< \ru Автоопределение подсказки по инерционным характеристикам. \en Automatic detection of a hint by means of inertial properties.
|
||||
givenHint ///< \ru Использовать подсказку, заданную пользователем. \en Use a hint given by a user.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Режим отбраковки точек при совмещении объектов по алгоритму ICP.
|
||||
\en Point rejection mode for object alignment by the ICP algorithm. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
enum class MbeIcpPointRejectionMode
|
||||
{
|
||||
noReject, ///< \ru Не отбраковывать точки. \en No point rejection.
|
||||
automatic, ///< \ru Автоопределение порога для отбраковки. \en Automatic detection of a rejection threshold.
|
||||
constant ///< \ru Отбраковка заданной доли из общего числа точек. \en Reject a given percentage of points.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры совмещения объектов.
|
||||
\en Parameters of object alignment. \~
|
||||
\details \ru Параметры совмещения объектов.
|
||||
\en Parameters of object alignment. \~
|
||||
В соответствии с полем _hintUsageMode возможны три режима работы алгоритма:
|
||||
- без использования подсказки (объекты совмещаются в их исходном положении; подходит для объектов с частичным перекрытием),
|
||||
- с автоматическим определением подсказки (к движущемуся объекту применяется начальная трансформация,
|
||||
рассчитанная по инерционным характеристикам объектов; подходит для одинаковых или почти одинаковых по форме объектов),
|
||||
- с набором заданных подсказок (алгоритм совмещения запускается для набора начальных трансформаций из массива _hintArray,
|
||||
выбирается лучший результат).
|
||||
\en Parameters of object alignment.
|
||||
According to _hintUsageMode there are three working options:
|
||||
- without any hint (object alignment from their initial positions; most suitable for partially overlapping objects),
|
||||
- with automatic hint detection (for a moving object some initial transformation calculated by means of inertial properties is applied;
|
||||
most suitable for objects identical or nearly identical in shape),
|
||||
- with a given hint array (having launched the alignment procedure for every given initial transformation, the best result is chosen). \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
@@ -728,18 +775,89 @@ public:
|
||||
class MATH_CLASS MbObjectAlignmentParams
|
||||
{
|
||||
private:
|
||||
size_t _iterationMax; ///< \ru Максимальное количество итераций. \en Maximum iteration count.
|
||||
MbeIcpHintUsageMode _hintUsageMode; ///< \ru Режим использования подсказки. \en Hint usage mode.
|
||||
MbeIcpPointRejectionMode _pointRejectionMode; ///< \ru Режим отбраковки точек. \en Point rejection mode.
|
||||
size_t _pointPairsMax; ///< \ru Максимальное количество пар точек. \en Maximum count of point pairs.
|
||||
size_t _iterationMax; ///< \ru Максимальное количество итераций. \en Maximum iteration count.
|
||||
std::vector<MbMatrix3D> _hintArray; ///< \ru Набор подсказок от пользователя. \en Hint array given by a user.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbObjectAlignmentParams( size_t iterationMax = 10000 ) : _iterationMax( iterationMax ) {}
|
||||
MbObjectAlignmentParams( MbeIcpHintUsageMode hintUsageMode )
|
||||
: _hintUsageMode ( hintUsageMode )
|
||||
, _pointRejectionMode( MbeIcpPointRejectionMode::automatic )
|
||||
, _pointPairsMax ( 10000 )
|
||||
, _iterationMax ( 10000 )
|
||||
{}
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbObjectAlignmentParams( std::vector<MbMatrix3D> hintArray )
|
||||
: _hintUsageMode ( MbeIcpHintUsageMode::givenHint )
|
||||
, _pointRejectionMode( MbeIcpPointRejectionMode::automatic )
|
||||
, _pointPairsMax ( 10000 )
|
||||
, _iterationMax ( 10000 )
|
||||
, _hintArray ( hintArray )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbObjectAlignmentParams() {}
|
||||
|
||||
public:
|
||||
/// \ru Задать режим отбраковки точек. \en Set the point rejection mode. \~
|
||||
void SetPointRejectionMode( MbeIcpPointRejectionMode pointRejectionMode ) { _pointRejectionMode = pointRejectionMode; }
|
||||
/// \ru Задать максимальное количество пар точек. \en Set the maximum count of point pairs. \~
|
||||
void SetPointPairsMax( size_t pointPairsMax ) { _pointPairsMax = pointPairsMax; }
|
||||
/// \ru Задать максимальное количество итераций. \en Set the maximum iteration count. \~
|
||||
void SetIterationMax( size_t iterationMax ) { _iterationMax = iterationMax; }
|
||||
/// \ru Задать набор подсказок. \en Set the hint array. \~
|
||||
void SetHintArray( const std::vector<MbMatrix3D> & hintArray ) { _hintArray = hintArray; }
|
||||
/// \ru Получить режим использования подсказки. \en Get the hint usage mode. \~
|
||||
MbeIcpHintUsageMode GetHintUsageMode() const { return _hintUsageMode; }
|
||||
/// \ru Получить режим отбраковки точек. \en Get the point rejection mode. \~
|
||||
MbeIcpPointRejectionMode GetPointRejectionMode() const { return _pointRejectionMode; }
|
||||
/// \ru Получить максимальное количество пар точек. \en Get the maximum count of point pairs. \~
|
||||
size_t GetPointPairsMax() const { return _pointPairsMax; }
|
||||
/// \ru Получить максимальное количество итераций. \en Get the maximum iteration count. \~
|
||||
size_t GetIterationMax() const { return _iterationMax; }
|
||||
/// \ru Получить набор заданных подсказок. \en Get the given hint array. \~
|
||||
const std::vector<MbMatrix3D> & GetHintArray() const { return _hintArray; }
|
||||
}; // MbObjectAlignmentParams
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результат совмещения объектов.
|
||||
\en Result of object alignment. \~
|
||||
\details \ru Результат совмещения объектов.
|
||||
\en Result of object alignment. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbObjectAlignmentResult
|
||||
{
|
||||
private:
|
||||
MbMatrix3D _matrix; ///< \ru Трансформация, необходимая для выравнивания. \en Transformation needed for alignment.
|
||||
double _error; ///< \ru Значение ошибки совмещения. \en Alignment error value.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
explicit MbObjectAlignmentResult()
|
||||
: _matrix( )
|
||||
, _error ( MB_MAXDOUBLE )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbObjectAlignmentResult() {}
|
||||
|
||||
public:
|
||||
/// \ru Получить результирующую трансформацию. \en Get the result transformation. \~
|
||||
const MbMatrix3D & GetMatrix() const { return _matrix; }
|
||||
/// \ru Получить результирующую трансформацию для изменения. \en Get the result transformation for changing. \~
|
||||
MbMatrix3D & SetMatrix() { return _matrix; }
|
||||
/// \ru Получить значение ошибки совмещения. \en Get alignment error value. \~
|
||||
double GetAlignmentErrorValue() const { return _error; }
|
||||
/// \ru Получить значение ошибки совмещения для изменения. \en Get alignment error value for changing. \~
|
||||
double & SetAlignmentErrorValue() { return _error; }
|
||||
}; // MbObjectAlignmentResult
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Тип позиционного ограничения.
|
||||
\en Position constraint type. \~
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
#include <cur_contour_on_surface.h>
|
||||
#include <cur_arc3d.h>
|
||||
#include <cr_split_data.h>
|
||||
#include <mb_nurbs_function.h>
|
||||
#include <op_direct_mod_parameter.h> // deprecated
|
||||
@@ -22,6 +23,7 @@
|
||||
#include <surf_spine.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbArc3D;
|
||||
class MATH_CLASS MbPoint3D;
|
||||
class MATH_CLASS MbPolyCurve3D;
|
||||
class MATH_CLASS MbPolyline3D;
|
||||
@@ -5491,6 +5493,17 @@ OBVIOUS_PRIVATE_COPY( MbBooleanOperationParams )
|
||||
// ---
|
||||
class MATH_CLASS MbElementarySolidParams {
|
||||
|
||||
public:
|
||||
/** \brief \ru Тип точки, находящейся в центре плейсмента параллелепипеда.
|
||||
\en The type of point located in the center of the placement of the parallelepiped. \~
|
||||
*/
|
||||
enum class BlockPointType
|
||||
{
|
||||
vertex = 0, ///< \ru Вершина параллелепипеда. \en Vertex of a parallelepiped.
|
||||
edgeCenter = 1, ///< \ru Центр ребра параллелепипеда, направленного по оси Ox. \en Center of the parallelepiped edge directed along the Ox axis.
|
||||
faceCenter = 2 ///< \ru Центр грани лежащей в плоскости XY. \en The center of a face lying in the XY plane.
|
||||
};
|
||||
|
||||
public:
|
||||
ElementaryShellType _solidType; ///< \ru Тип создаваемого тела. \en The solid type.
|
||||
|
||||
@@ -5539,9 +5552,9 @@ public:
|
||||
~MbElementarySolidParams() {}
|
||||
|
||||
/** \brief \ru Метод инициализации параметров элементарного тела.
|
||||
\en Initializtion method for elementary solid parameters. \~
|
||||
\en Initialization method for elementary solid parameters. \~
|
||||
\details \ru Метод инициализации параметров элементарного тела по типу тела и набору точек.
|
||||
\en Initializtion method for elementary solid parameters by solid type and a set of points. \~
|
||||
\en Initialization method for elementary solid parameters by solid type and a set of points. \~
|
||||
\param[in] solidType - \ru Тип создаваемого тела.
|
||||
\en The solid type. \~
|
||||
\param[in] points - \ru Множество точек.
|
||||
@@ -5552,9 +5565,9 @@ public:
|
||||
bool Init( const ElementaryShellType & solidType, const c3d::SpacePointsVector & points );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров элементарного тела.
|
||||
\en Initializtion method for elementary solid parameters. \~
|
||||
\en Initialization method for elementary solid parameters. \~
|
||||
\details \ru Метод инициализации параметров элементарного тела по элементарной поверхности.
|
||||
\en Initializtion method for elementary solid parameters by an elementary surface. \~
|
||||
\en Initialization method for elementary solid parameters by an elementary surface. \~
|
||||
\param[in] surface - \ru Элементарная поверхность.\n
|
||||
Допускается тип поверхности - шар, тор, цилиндр, конус.
|
||||
\en Elementary surface.\n
|
||||
@@ -5564,6 +5577,141 @@ public:
|
||||
*/
|
||||
bool Init( const SPtr<const MbElementarySurface> & surface );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров элементарного тела для конуса.
|
||||
\en Initialization method of elementary solid parameters for cone. \~
|
||||
\details \ru Метод инициализации параметров элементарного тела для конуса по плейсменту, радиусам оснований конуса и
|
||||
значению, которое может быть высотой (отрицательной или положительной) или углом при вершине конуса.
|
||||
\en Initialization method for elementary solid parameters by placement, radiuses of the cone bases
|
||||
and a value that can be the height or angle at the cone vertex. \~
|
||||
\param[in] place - \ru Плейсмент. \n
|
||||
\en Placement. \~
|
||||
\param[in] r1 - \ru Радиус основания конуса на плоскости XY. \n
|
||||
\en Radius of the cone base on the XY plane. \~
|
||||
\param[in] r2 - \ru Радиус второго основания конуса, 0 ≤ r2 < r1. \n
|
||||
\en Radius of the second cone base, 0 ≤ r2 < r1. \~
|
||||
\param[in] bHeight - \ru Если true, то value - высота, иначе угол. \n
|
||||
\en If true, then a value is a height, else the value is an angle. \~
|
||||
\param[in] value - \ru Если bHeight = true, то value = высота (отрицательная или положительная),
|
||||
иначе value = угол при вершине конуса (между двумя противоположными образующими),
|
||||
0 < угол < Pi. \n
|
||||
\en If bHeight = true, then value = height (negative or positive), else value = angle
|
||||
at the cone vertex (between two opposite generatrices), 0 < angle < Pi \~
|
||||
\return \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitCone( const MbPlacement3D & place,
|
||||
double r1,
|
||||
double r2,
|
||||
bool bHeight,
|
||||
double value );
|
||||
|
||||
/**\brief \ru Метод инициализации параметров элементарного тела для сферы.
|
||||
\en Initialization method of elementary solid parameters for sphere. \~
|
||||
\details \ru Метод инициализации параметров элементарного тела для сферы по плейсменту и радиусу сферы.
|
||||
\en Initialization method of elementary solid parameters for sphere by placement and radius of the sphere. \~
|
||||
\param[in] place - \ru Плейсмент. \n
|
||||
\en Placement. \~
|
||||
\param[in] r - \ru Радиус сферы. \n
|
||||
\en Radius of sphere. \~
|
||||
\return \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitSphere( const MbPlacement3D & place, double r );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров элементарного тела для сферы.
|
||||
\en Initialization method of elementary solid parameters for sphere. \~
|
||||
\details \ru Метод инициализации параметров элементарного тела для сферы по дуге, определяющей центр, диаметр, и плейсмент сферы.
|
||||
\en Initialization method of elementary solid parameters for sphere by an arc that defines the center, diameter,
|
||||
and placement of the sphere. \~
|
||||
\param[in] arc - \ru Дуга, определяющая центр, диаметр, и плейсмент сферы. \n
|
||||
\en An arc defining the center, diameter, and placement of a sphere. \~
|
||||
\return \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitSphere( const MbArc3D & arc );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров тела параллелепипеда.
|
||||
\en Method for initializing block body parameters. \~
|
||||
\details \ru Метод инициализации параметров тела параллелепипеда по
|
||||
плесменту, точке диагонали и высотам.
|
||||
\en Method for initializing parameters of a parallelepiped body by
|
||||
placement, diagonal point and heights. \~
|
||||
\param[in] place - \ru Плейсмент. Центр плейсмента является одной из вершин параллелепипеда.
|
||||
\en Placement. The center of placement is one of the vertices of the parallelepiped. \~
|
||||
\param[in] pt - \ru Точка, проекция которой является вершиной параллелепипеда лежащей
|
||||
в плоскоси XY по диагонали относительно центра плейсмента.\n
|
||||
\en A point whose projection is the vertex of a parallelepiped lying
|
||||
in the XY plane diagonally relative to the center of the placement. \~
|
||||
\param[in] h1 - \ru Высота параллелепипеда от плоскости XY в направлении оси Z.
|
||||
\en The height of the parallelepiped from the XY plane in the direction of the Z axis. \~
|
||||
\param[in] h2 - \ru Высота параллелепипеда от плоскости XY противоположно оси Z.
|
||||
\en The height of the parallelepiped from the XY plane is opposite to the Z axis. \~
|
||||
\return - \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitBlock( const MbPlacement3D & place, const MbCartPoint3D & pt, double h1, double h2 );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров тела параллелепипеда.
|
||||
\en Method for initializing block body parameters. \~
|
||||
\details \ru Метод инициализации параметров тела параллелепипеда по плесменту,
|
||||
длине, ширине и высотам.
|
||||
\en Method for initializing the parameters of a parallelepiped body by placement,
|
||||
length, width and heights. \~
|
||||
\param[in] place - \ru Плейсмент.
|
||||
\en Placement. \~
|
||||
\param[in] dx - \ru Длина.
|
||||
\en Length. \~
|
||||
\param[in] dy - \ru Ширина.
|
||||
\en Width. \~
|
||||
\param[in] h1 - \ru Высота параллелепипеда от плоскости XY в направлении оси Z.
|
||||
\en The height of the parallelepiped from the XY plane in the direction of the Z axis. \~
|
||||
\param[in] h2 - \ru Высота параллелепипеда от плоскости XY противоположно оси Z.
|
||||
\en The height of the parallelepiped from the XY plane is opposite to the Z axis. \~
|
||||
\param[in] pointType - \ru Тип точки, находящейся в центре плейсмента:
|
||||
1. Вершина.
|
||||
2. Центр ребра направленного по оси X.
|
||||
3. Центр нижнего основания.
|
||||
\en Type of point located in the center of the placement:
|
||||
1. Vertex.
|
||||
2. Center of the edge directed along the X axis.
|
||||
3. Center of the lower base. \~
|
||||
\return - \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitBlock( const MbPlacement3D & place, double dx, double dy, double h1, double h2, BlockPointType pointType );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров тела цилиндра.
|
||||
\en Method for initializing cylinder body parameters. \~
|
||||
\details \ru Метод инициализации параметров тела цилиндра по плесменту, радиусу и высотам.
|
||||
\en Method for initializing cylinder body parameters by placement, radius and heights. \~
|
||||
\param[in] place - \ru Плейсмент.
|
||||
\en Placement. \~
|
||||
\param[in] r - \ru Радиус.
|
||||
\en Radius. \~
|
||||
\param[in] h1 - \ru Высота цилиндра от плоскости XY в направлении оси Z.
|
||||
\en The height of the cylinder from the XY plane in the direction of the Z axis. \~
|
||||
\param[in] h2 - \ru Высота цилиндра от плоскости XY противоположно оси Z.
|
||||
\en The height of the cylinder from the XY plane is opposite to the Z axis. \~
|
||||
\return - \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitCylinder( const MbPlacement3D & place, double r, double h1, double h2 );
|
||||
|
||||
/** \brief \ru Метод инициализации параметров тела цилиндра.
|
||||
\en Method for initializing cylinder body parameters. \~
|
||||
\details \ru Метод инициализации параметров тела цилиндра по окружности основания и высотам.
|
||||
\en Method for initializing the parameters of a cylinder body by base circumference and heights. \~
|
||||
\param[in] arc - \ru Основание цилиндра.\n
|
||||
\en Cylinder base. \~
|
||||
\param[in] h1 - \ru Высота цилиндра от плоскости XY в направлении оси Z.
|
||||
\en The height of the cylinder from the XY plane in the direction of the Z axis. \~
|
||||
\param[in] h2 - \ru Высота цилиндра от плоскости XY противоположно оси Z.
|
||||
\en The height of the cylinder from the XY plane is opposite to the Z axis. \~
|
||||
\return - \ru Возвращает true в случае успеха.
|
||||
\en Returns true in case of success. \~
|
||||
*/
|
||||
bool InitCylinder( const MbArc3D & arc, double h1, double h2 );
|
||||
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
|
||||
const MbSNameMaker & GetNameMaker() const { return *_operNames; }
|
||||
|
||||
@@ -5730,45 +5878,92 @@ OBVIOUS_PRIVATE_COPY( MbHoleSolidParams )
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFaceFilletBundle
|
||||
class MATH_CLASS MbFilletBundle
|
||||
{
|
||||
private:
|
||||
c3d::ConstSolidSPtr _solid; ///< \ru Тело. Всегда не null. \en The solid. Not null.
|
||||
c3d::ConstFacesSPtrVector _faces; ///< \ru Грани тела. Хотя бы одна грань не null. \en The faces of the solid. At least one face is not null.
|
||||
std::vector<bool> _faceSide; ///< \ru Сторона грани, с которой ее будет касаться поверхность скругления (синхронизованно с _faces). \en Side of a face that fillet surface will touch (synchronized with _faces).
|
||||
std::vector<MbItemIndex> _faceIndex; ///< \ru Номера опорных граней. \en The reference face numbers (may be empty). \~
|
||||
c3d::FunctionSPtr _function; ///< \ru Функция радиуса для набора граней (всегда не null). \en The function of the fillet radius for the face set (always not null).
|
||||
c3d::SolidSPtr _solid; ///< \ru Тело. Всегда не null. \en The solid. Not null.
|
||||
c3d::FacesSPtrVector _faces; ///< \ru Грани тела. Хотя бы одна грань не null. \en The faces of the solid. At least one face is not null.
|
||||
std::vector<bool> _faceSide; ///< \ru Сторона грани, с которой ее будет касаться поверхность скругления (синхронизованно с _faces). \en Side of a face that fillet surface will touch (synchronized with _faces).
|
||||
std::vector<MbItemIndex> _faceIndex; ///< \ru Номера опорных граней. \en The reference face numbers (may be empty). \~
|
||||
c3d::FunctionSPtr _function; ///< \ru Функция радиуса для набора граней (всегда не null). \en The function of the fillet radius for the face set (always not null).
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Empty constructor.
|
||||
MbFaceFilletBundle();
|
||||
MbFilletBundle();
|
||||
/// \ru Конструктор по параметрам для набора граней. \en Constructor by parameters for a face set.
|
||||
MbFaceFilletBundle( const c3d::ConstSolidSPtr & solid, const c3d::FunctionSPtr & func,
|
||||
const c3d::ConstFacesSPtrVector & faces, const std::vector<bool> & faceSide );
|
||||
MbFilletBundle( const c3d::SolidSPtr & sol, const c3d::FunctionSPtr & func,
|
||||
const c3d::FacesSPtrVector & faces, const std::vector<bool> & fSide );
|
||||
/// \ru Конструктор по параметрам для одной грани. \en Constructor by parameters for one face.
|
||||
MbFaceFilletBundle( const c3d::ConstSolidSPtr & solid, const c3d::FunctionSPtr & func,
|
||||
const c3d::ConstFaceSPtr & face, bool faceSide );
|
||||
MbFilletBundle( const c3d::SolidSPtr & sol, const c3d::FunctionSPtr & func,
|
||||
const c3d::FaceSPtr & face, bool fSide );
|
||||
/// \ru Конструктор копирования не реализован. \en Copy-constructor not realize.
|
||||
MbFilletBundle( const MbFilletBundle & other );
|
||||
/// \ru Конструктор копирования с регистратором. \en Copy constructor with registrator.
|
||||
MbFaceFilletBundle( const MbFaceFilletBundle & other, MbRegDuplicate * iReg = nullptr );
|
||||
MbFilletBundle( const MbFilletBundle & other, MbRegDuplicate * iReg );
|
||||
|
||||
public:
|
||||
/// \ru Получить тело. \en Get the solid.
|
||||
const c3d::ConstSolidSPtr & GetSolid() const { return _solid; }
|
||||
const c3d::SolidSPtr & GetSolid() const { return _solid; }
|
||||
/// \ru Получить тело. \en Get the solid.
|
||||
void SetSolid( MbSolid & sol ) { if (_solid.get() != &sol) _solid = / }
|
||||
|
||||
/// \ru Добавить в данные поверхность. \en Add surface to data. \~
|
||||
bool AddFace( MbFace & face, bool side, MbSolid * sol = nullptr, MbFunction * func = nullptr);
|
||||
/// \ru Получить грани. \en Get faces.
|
||||
const c3d::ConstFacesSPtrVector & GetFaces() const { return _faces; }
|
||||
/// \ru Получить стороны граней, с которых их будет касаться поверхность скругления. \en Get sides of a faces that fillet surface will touch.
|
||||
/// \ru Выдать количество опорных граней. \en Get guide faces count.
|
||||
size_t GetFacesCount() const { return _faces.size(); }
|
||||
/// \ru Выдать грани. \en Get faces.
|
||||
const c3d::FacesSPtrVector & GetFaces() const { return _faces; }
|
||||
void GetFaces( c3d::FacesSPtrVector & fas ) const;
|
||||
void GetFaces( RPArray<MbFace> & fas ) const;
|
||||
/// \ru Выдать опорную грань. \en Get guide face.
|
||||
const MbFace * GetFace( size_t i ) const { return ( i < _faces.size() ) ? _faces[i].get() : nullptr; }
|
||||
|
||||
/// \ru Выдать количество опорных граней. \en Get guide faces count.
|
||||
size_t GetFaceSideCount() const { return _faceSide.size(); }
|
||||
/// \ru С каких сторон касаться поверхностей? \en On which sides to touch surfaces?
|
||||
const std::vector<bool> & GetFaceSide() const { return _faceSide; }
|
||||
bool GetFaceSide( size_t i ) const { return _faceSide[i]; }
|
||||
void GetFaceSide( std::vector<bool> & fSide ) const;
|
||||
/// \ru Установить сторону касания грани. \en Set face side.
|
||||
void SetFaceSide( size_t i, bool s ) { if ( i < _faceSide.size() ) _faceSide[i] = s; }
|
||||
void AddFaceSide( bool s ) { _faceSide.push_back( s ); }
|
||||
|
||||
/// \ru Выдать количество опорных граней. \en Get guide faces count.
|
||||
size_t GetFaceIndexCount() const { return _faceIndex.size(); }
|
||||
/// \ru Выдать номера опорных граней. \en Get reference face numbers.
|
||||
const std::vector<MbItemIndex> & GetFaceIndex() const { return _faceIndex; }
|
||||
void GetFaceIndex( std::vector<MbItemIndex> & fInd ) const;
|
||||
const MbItemIndex & GetFaceIndex( size_t i ) const { return _faceIndex[i]; }
|
||||
void AddFaceIndex( MbItemIndex & ind ) { _faceIndex.push_back( ind ); }
|
||||
|
||||
/// \ru Получить функцию радиуса скругления для набора граней. \en Get the function of fillet radius for the face set.
|
||||
const c3d::FunctionSPtr GetFunction() const { return _function; }
|
||||
const c3d::FunctionSPtr & GetFunction() const { return _function; }
|
||||
/// \ru Установить функцию радиуса скругления для набора граней. \en Set the function of fillet radius for the face set.
|
||||
void SetFunction( MbFunction & f ) { if ( _function.get() != &f) _function = &f; }
|
||||
|
||||
/// \ru Преобразовать объект. \en Transform the object. \~
|
||||
void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Сдвинуть объект. \en Move the object. \~
|
||||
void Move ( const MbVector3D & to, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Повернуть объект. \en Rotate the object. \~
|
||||
void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Определить, являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const MbFilletBundle & other, double accuracy ) const;
|
||||
/// \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. \~
|
||||
bool IsSimilar( const MbFilletBundle & other ) const;
|
||||
/// \ru Сделать объекты равным. \en Make objects equal. \~
|
||||
bool SetEqual ( const MbFilletBundle & other );
|
||||
/// \ru Выдать базовые объекты. \en Get basis objects.
|
||||
void GetBasisItems(RPArray<MbSpaceItem>& s) const;
|
||||
/// \ru Заполнить контейнер граней по контейнеру индексаов. \en Find a set of faces by a set of combined indices.
|
||||
void FindFaceByIndex();
|
||||
|
||||
/// \ru Оператор присваивания без копирования топологических объектов. \en Assignment operator without copying topological objects.
|
||||
void operator = ( const MbFaceFilletBundle & other );
|
||||
};
|
||||
void operator = ( const MbFilletBundle & other );
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbFilletBundle ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
|
||||
}; // MbFilletBundle
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -5783,23 +5978,27 @@ public:
|
||||
\warning \ru Член класса SmoothValues _params будет удален в версии 2024. \en Class member SmoothValues _params will be removed in version 2024.
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbFacesFilletParams : public MbPrecision
|
||||
class MATH_CLASS MbFilletData : public MbPrecision
|
||||
{
|
||||
private:
|
||||
MbFaceFilletBundle _faceSet1; ///< \ru Первый набор сопрягаемых граней. \en The first set of conjugating faces.
|
||||
MbFaceFilletBundle _faceSet2; ///< \ru Второй набор сопрягаемых граней. \en The second set of conjugating faces.
|
||||
bool _faceSplit; ///< \ru Разделять оболочку на грани по сегментам опорных кривых. \en Split the shell into faces by segments of support curves.
|
||||
bool _elongated; ///< \ru Обрезать опорную оболочку на границе по касательной (true)/по нормали (false) к граничному ребру. \en The support shell will cutted along the tangent (true)/along the normal (false) to the boundary edge. \~
|
||||
MbeSideShape _sideShape; ///< \ru Форма обрезки боков поверхности. \en The form of cropping the sides of the surface.
|
||||
double _conic; ///< \ru Коэффициент формы, изменяется от 0.05 до 0.95 (при 0 - дуга окружности). \en Coefficient of shape is changed from 0.05 to 0.95 (if 0 - circular arc).
|
||||
bool _prolong; ///< \ru Продолжить по касательной. \en Prolong along the tangent.
|
||||
ThreeStates _keepCant; ///< \ru Автоопределение сохранения кромки (ts_neutral), сохранение поверхности (ts_negative), сохранение кромки (ts_positive). \en Auto detection of boundary saving (ts_neutral), surface saving (ts_negative), boundary saving (ts_positive).
|
||||
bool _equable; ///< \ru Флаг обработки некасательных стыков. True, если в углах сочленения вставлять тороидальную поверхность. \en Non tangent joints handling flag. True, if insert toroidal surface in corners of the joint.
|
||||
SPtr<MbSNameMaker> _nameMaker; ///< \ru Именователь операции. \en An object defining names generation in the operation.
|
||||
MbFilletBundle _faceSet1; ///< \ru Первый набор сопрягаемых граней. \en The first set of conjugating faces. \~
|
||||
MbFilletBundle _faceSet2; ///< \ru Второй набор сопрягаемых граней. \en The second set of conjugating faces. \~
|
||||
MbeCopyMode _copyMode; ///< \ru Способы передачи данных при копировании оболочек. \en Methods of transferring data while copying shells. \~
|
||||
MbeSmoothForm _sform; ///< \ru Форма поверхности сопряжения (скругления или фаски). \en The blend surface cross-section form (fillet or chamfer). \~
|
||||
c3d::FunctionSPtr _descript; ///< \ru Функция управления сечением (дискриминант, может быть nullptr). \en Section control function (discriminant). \~
|
||||
MbeSideShape _sideShape; ///< \ru Форма обрезки боков поверхности. \en The form of cropping the sides of the surface. \~
|
||||
MbeFaceHandling _handling; ///< \ru Обработка исходных опорных граней. \en The processing of initial reference faces. \~
|
||||
bool _faceSplit; ///< \ru Разделять оболочку на грани по сегментам опорных кривых. \en Split the shell into faces by segments of support curves. \~
|
||||
bool _elongated; ///< \ru Обрезать опорную оболочку на границе по касательной (true)/по нормали (false) к граничному ребру. \en The support shell will cutted along the tangent (true)/along the normal (false) to the boundary edge. \~
|
||||
bool _prolong; ///< \ru Продолжить по касательной. \en Prolong along the tangent. \~
|
||||
ThreeStates _keepCant; ///< \ru Автоопределение сохранения кромки (ts_neutral), сохранение поверхности (ts_negative), сохранение кромки (ts_positive). \en Auto detection of boundary saving (ts_neutral), surface saving (ts_negative), boundary saving (ts_positive). \~
|
||||
bool _equable; ///< \ru Флаг обработки некасательных стыков. True, если в углах сочленения вставлять тороидальную поверхность. \en Non tangent joints handling flag. True, if insert toroidal surface in corners of the joint. \~
|
||||
double _buildSag; ///< \ru Шаг построения. \en Build step.
|
||||
MbSNameMaker _nameMaker; ///< \ru Именователь операции. \en An object defining names generation in the operation.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Empty constructor.
|
||||
MbFacesFilletParams();
|
||||
MbFilletData();
|
||||
|
||||
/** \brief \ru Конструктор по параметрам. \en Constructor by parameters. \~
|
||||
\details \ru Конструктор данных построения гладкого сопряжения двух несвязных наборов граней.
|
||||
@@ -5827,36 +6026,70 @@ public:
|
||||
\param[in] nameMaker - \ru Именователь новых граней операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
*/
|
||||
MbFacesFilletParams( const MbFaceFilletBundle & faces1, const MbFaceFilletBundle & faces2,
|
||||
bool faceSplit, bool elongated, MbeSideShape sideShape,
|
||||
double conic, bool prolong, ThreeStates keepCant, bool equable,
|
||||
const MbSNameMaker & nameMaker );
|
||||
MbFilletData( const MbFilletBundle & faces1, const MbFilletBundle & faces2,
|
||||
bool split, bool elong, MbeSideShape shape,
|
||||
bool prol, ThreeStates kCant, bool equable, const MbSNameMaker & nameMaker );
|
||||
|
||||
/// \ru Конструктор копирования не реализован. \en Copy-constructor not realize.
|
||||
MbFilletData( const MbFilletData & other );
|
||||
/// \ru Конструктор копирования с регистратором. \en Copy-constructor with registrator.
|
||||
MbFacesFilletParams( const MbFacesFilletParams & other, MbRegDuplicate * iReg );
|
||||
MbFilletData( const MbFilletData & other, MbRegDuplicate * iReg );
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbFacesFilletParams() {};
|
||||
~MbFilletData() {};
|
||||
|
||||
public:
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
|
||||
const MbSNameMaker & GetNameMaker() const { return *_nameMaker; }
|
||||
|
||||
/// \ru Получить первый набор сопрягаемых граней. \en Get the first solid and set of conjugating faces.
|
||||
const MbFilletBundle & GetFaceSet1() const { return _faceSet1; }
|
||||
MbFilletBundle & SetFaceSet1() { return _faceSet1; }
|
||||
/// \ru Получить второй набор сопрягаемых граней. \en Get the second solid and set of conjugating faces.
|
||||
const MbFilletBundle & GetFaceSet2() const { return _faceSet2; }
|
||||
MbFilletBundle & SetFaceSet2() { return _faceSet2; }
|
||||
|
||||
/// \ru Получить первое тело. \en Get the first solid.
|
||||
const c3d::ConstSolidSPtr & GetSolid1() const { return _faceSet1.GetSolid(); }
|
||||
const c3d::SolidSPtr & GetSolid1() const { return _faceSet1.GetSolid(); }
|
||||
/// \ru Получить второе тело. \en Get the second solid.
|
||||
const c3d::ConstSolidSPtr & GetSolid2() const { return _faceSet2.GetSolid(); }
|
||||
const c3d::SolidSPtr & GetSolid2() const { return _faceSet2.GetSolid(); }
|
||||
|
||||
/// \ru Получить грань в случае скругления двух граней. \en Get the face when creating a fillet face between two faces.
|
||||
const c3d::ConstFaceSPtr & GetFace1() const { return _faceSet1.GetFaces().at( 0 ); }
|
||||
/// \ru Получить грань в случае скругления двух граней. \en Get the face when creating a fillet face between two faces.
|
||||
const c3d::ConstFaceSPtr & GetFace2() const { return _faceSet2.GetFaces().at( 0 ); }
|
||||
/// \ru Получить грань первого набора по индексу. \en Get the face by index in first bundle.
|
||||
const MbFace * GetFace1( size_t i = 0 ) const { return _faceSet1.GetFace( i ); }
|
||||
/// \ru Получить грань второго набора по индексу. \en Get the face by index in second bundle.
|
||||
const MbFace * GetFace2( size_t i = 0 ) const { return _faceSet2.GetFace( i ); }
|
||||
/// \ru Установить первый набор сопрягаемых граней. \en Get the first set of conjugating faces.
|
||||
void SetFaceSet1( const MbFilletBundle & set ) { _faceSet1 = set; }
|
||||
/// \ru Установить второй набор сопрягаемых граней. \en Get the second set of conjugating faces.
|
||||
void SetFaceSet2( const MbFilletBundle & set ) { _faceSet2 = set; }
|
||||
|
||||
/// \ru Получить первый набор сопрягаемых граней. \en Get the first set of conjugating faces.
|
||||
const MbFaceFilletBundle & GetSet1() const { return _faceSet1; }
|
||||
/// \ru Получить второй набор сопрягаемых граней. \en Get the second set of conjugating faces.
|
||||
const MbFaceFilletBundle & GetSet2() const { return _faceSet2; }
|
||||
/// \ru Получить функцию радиуса скругления для первого набора граней. \en Get the function of fillet radius for the first face set.
|
||||
const c3d::FunctionSPtr & GetFunction1() const { return _faceSet1.GetFunction(); }
|
||||
/// \ru Получить функцию радиуса скругления для второго набора граней. \en Get the function of fillet radius for the second face set.
|
||||
const c3d::FunctionSPtr & GetFunction2() const { return _faceSet2.GetFunction(); }
|
||||
/// \ru Установить функцию радиуса скругления для набора граней. \en Set the function of fillet radius for the face set.
|
||||
void SetFunction1( MbFunction & f ) { _faceSet1.SetFunction( f ); }
|
||||
/// \ru Установить функцию радиуса скругления для набора граней. \en Set the function of fillet radius for the face set.
|
||||
void SetFunction2( MbFunction & f ) { _faceSet2.SetFunction( f ); }
|
||||
|
||||
/// \ru Получить cпособы передачи данных при копировании оболочек. \en Get methods of transferring data while copying shells. \~
|
||||
MbeCopyMode GetCopyMode() const { return _copyMode; }
|
||||
/// \ru Установить cпособы передачи данных при копировании оболочек. \en Set methods of transferring data while copying shells. \~
|
||||
void SetCopyMode( MbeCopyMode m ) { _copyMode = m; }
|
||||
/// \ru Выдать форму поверхности сопряжения (скругления или фаски). \en Get a blend surface cross-section form (fillet or chamfer). \~
|
||||
MbeSmoothForm GetSubForm() const { return _sform; }
|
||||
/// \ru Установить форму поверхности сопряжения (скругления или фаски). \en Set a blend surface cross-section form (fillet or chamfer). \~
|
||||
void SetSubForm(MbeSmoothForm f) { _sform = f; }
|
||||
|
||||
/// \ru Выдать данные управления сечением. \en Get section control data.
|
||||
const c3d::FunctionSPtr & GetDescript() const { return _descript; }
|
||||
const MbFunction * GetDescription() const { return _descript.get(); }
|
||||
MbFunction * SetDescription() { return _descript.get(); }
|
||||
|
||||
/// \ru Выдать форму обрезки боков поверхности. \en Get the shape of cropping the sides of the surface. \~
|
||||
MbeSideShape GetSideShape() const { return _sideShape; }
|
||||
/// \ru Установить форму обрезки боков поверхности. \en Set the shape of cropping the sides of the surface. \~
|
||||
void SetSideShape( MbeSideShape s ) { _sideShape = s; }
|
||||
MbeFaceHandling GetHandling() const { return _handling; }
|
||||
void SetHandling( MbeFaceHandling h ) { _handling = h; }
|
||||
bool GetFaceSplit() const { return _faceSplit; }
|
||||
/// \ru Установить деление оболочки на грани по сегментам направляющих кривых. \en Set division the shell into faces by segments of guides.
|
||||
void SetFaceSplit( bool s ) { _faceSplit = s; }
|
||||
@@ -5864,33 +6097,52 @@ public:
|
||||
bool GetElongated() const { return _elongated; }
|
||||
/// \ru Установить обрезку опорной оболочки на границе к граничному ребру. \en Set the support shell cutting on the boundary edge. \~
|
||||
void SetElongated( bool e ) { _elongated = e; }
|
||||
/// \ru Выдать форму обрезки боков поверхности. \en Get the shape of cropping the sides of the surface. \~
|
||||
MbeSideShape GetSideShape() const { return _sideShape; }
|
||||
/// \ru Установить форму обрезки боков поверхности. \en Set the shape of cropping the sides of the surface. \~
|
||||
void SetSideShape( MbeSideShape s ) { _sideShape = s; }
|
||||
|
||||
/// \ru Получить функцию радиуса скругления для первого набора граней. \en Get the function of fillet radius for the first face set.
|
||||
const c3d::FunctionSPtr GetRadiusFunction1() const { return _faceSet1.GetFunction(); }
|
||||
/// \ru Получить функцию радиуса скругления для второго набора граней. \en Get the function of fillet radius for the second face set.
|
||||
const c3d::FunctionSPtr GetRadiusFunction2() const { return _faceSet2.GetFunction(); }
|
||||
|
||||
/// \ru Получить коэффициент формы. \en Get coefficient of shape.
|
||||
double GetFormCoef() const { return _conic; }
|
||||
|
||||
/// \ru Получить флаг продолжения по касательной. \en Get prolong along the tangent flag.
|
||||
bool GetProlong() const { return _prolong; }
|
||||
|
||||
bool GetProlong() const { return _prolong; }
|
||||
/// \ru Установить флаг продолжения по касательной. \en Set prolong along the tangent flag.
|
||||
void SetProlong( bool p ) { _prolong = p; }
|
||||
/// \ru Получить флаг сохранения кромки. \en Get keep cant state flag.
|
||||
ThreeStates GetKeepCant() const { return _keepCant; }
|
||||
|
||||
ThreeStates GetKeepCant() const { return _keepCant; }
|
||||
/// \ru Установить флаг сохранения кромки. \en Set keep cant state flag.
|
||||
void SetKeepCant( ThreeStates ts ) { _keepCant = ts; }
|
||||
/// \ru Получить флаг обработки некасательных стыков. \en Get non tangent joints handling flag.
|
||||
bool GetEquable() const { return _equable; }
|
||||
bool GetEquable() const { return _equable; }
|
||||
/// \ru Установить флаг обработки некасательных стыков. \en Set non tangent joints handling flag.
|
||||
void SetEquable( bool e ) { _equable = e; }
|
||||
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
|
||||
double GetBuildSag() const { return _buildSag; }
|
||||
void SetBuildSag( double s = Math::deviateSag ) { _buildSag = s; }
|
||||
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
|
||||
const MbSNameMaker & GetNameMaker() const { return _nameMaker; }
|
||||
///< \ru Установить именователь операции. \en Set an object defining names generation in the operation.
|
||||
void SetNameMaker( const MbSNameMaker & name );
|
||||
|
||||
/// \ru Возвращает true, если скругляются ровно две несвязные грани. \en Returns true if filleting exactly two disjoint faces.
|
||||
bool IsTwoFaceFillet() const { return _faceSet1.GetFaces().size() == 1 && _faceSet2.GetFaces().size() == 1; }
|
||||
bool IsTwoFaceFillet() const { return _faceSet1.GetFaces().size() == 1 && _faceSet2.GetFaces().size() == 1; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbFacesFilletParams )
|
||||
};
|
||||
/// \ru Преобразовать объект. \en Transform the object. \~
|
||||
void Transform( const MbMatrix3D & matr, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Сдвинуть объект. \en Move the object. \~
|
||||
void Move ( const MbVector3D & to, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Повернуть объект. \en Rotate the object. \~
|
||||
void Rotate ( const MbAxis3D & axis, double angle, MbRegTransform * iReg = nullptr );
|
||||
/// \ru Определить, являются ли объекты равными? \en Determine whether an object is equal?
|
||||
bool IsSame( const MbFilletData & other, double accuracy ) const;
|
||||
/// \ru Определить, являются ли объекты подобными. \en Determine whether the objects are similar. \~
|
||||
bool IsSimilar( const MbFilletData & other ) const;
|
||||
/// \ru Сделать объекты равным. \en Make objects equal. \~
|
||||
bool SetEqual ( const MbFilletData & other );
|
||||
/// \ru Выдать базовые объекты. \en Get basis objects.
|
||||
void GetBasisItems( RPArray<MbSpaceItem> & s ) const;
|
||||
// \ru Выдать версию апостьроения. \en Get the build version. \~
|
||||
VERSION GetVersion() const { return _nameMaker.GetMathVersion(); }
|
||||
/// \ru Оператор присваивания без копирования топологических объектов. \en Assignment operator without copying topological objects.
|
||||
void operator = ( const MbFilletData & other );
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbFilletData ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
|
||||
}; // MbFilletData
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -2018,6 +2018,7 @@ private:
|
||||
MbSectionRail rail1; ///< \ru Данные начального края сечения. \en The data of the begining of section. \~
|
||||
MbSectionRail rail2; ///< \ru Данные конечного края сечения. \en The data of the end of section. \~
|
||||
c3d::SpaceCurveSPtr apexCurve; ///< \ru Кривая вершин (может отсутствовать). \en The apex curve (may be nullptr). \~
|
||||
MbeCopyMode copyMode; ///< \ru Способы передачи данных при копировании оболочек. \en Methods of transferring data while copying shells. \~
|
||||
MbSectionRule descript; ///< \ru Функция управления сечением поверхности (радиус или дискриминант, может быть nullptr). \en The section control function (radius or discriminant). \~
|
||||
SPtr<MbPolyCurve> pattern; ///< \ru Образующая кривая при form==cs_Shape (для других форм nullptr). \en Forming curve for form==cs_Shape (nullptr on other case). \~
|
||||
MbVector3D direction; ///< \ru Направление, от которого отсчитывается угол при form==cs_Linea. \en The direction from which the angle is calculated when form==cs_Linea. \~
|
||||
@@ -2223,6 +2224,10 @@ public:
|
||||
MbCurve3D * SetApexCurve() { return apexCurve.get(); }
|
||||
/// \ru Выдать кривую вершин. \en Get apex curve.
|
||||
const MbCurve3D * GetApexCurve() const { return apexCurve.get(); }
|
||||
/// \ru Получить cпособы передачи данных при копировании оболочек. \en Get methods of transferring data while copying shells. \~
|
||||
MbeCopyMode GetCopyMode() const { return copyMode; }
|
||||
/// \ru Установить cпособы передачи данных при копировании оболочек. \en Set methods of transferring data while copying shells. \~
|
||||
void SetCopyMode( MbeCopyMode m ) { copyMode = m; }
|
||||
|
||||
/// \ru Выдать данные управления сечением. \en Get section control data.
|
||||
const MbSectionRule & GetSectionRule() const { return descript; }
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Параметры операций над каркасом.
|
||||
\en Parameters of operations on the wire frame. \~
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __OP_WIREFRAME_PARAMETERS_H
|
||||
#define __OP_WIREFRAME_PARAMETERS_H
|
||||
|
||||
#include <wire_frame.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры скругления каркаса.
|
||||
\en Parameters of wire frame fillets. \~
|
||||
\details \ru Параметры скругления каркаса: \n
|
||||
type - тип скругления( обычное или на поверхности ). \n
|
||||
radiuses - радиусы скругления, i-й радиус соответствует стыку i-го и i+1-го ребра. \n
|
||||
\en Parameters of wire frame fillets: \n
|
||||
'type' is a fillet type( ordinary or on a surface ). \n
|
||||
'radiuses' are the fillet radii, the i-th radius corresponds to the joint of the i-th and the i+1-th edges. \n \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup WireFrame_Parameters
|
||||
*/ // ---
|
||||
class MATH_CLASS MbWireFrameFilletsParams : public MbPrecision {
|
||||
private:
|
||||
MbeConnectingType _type; ///< \ru Тип выполняемых скруглений. \en Fillet type( ordinary or on a surface ).
|
||||
c3d::DoubleVector _radiuses; ///< \ru Множество радиусов скругления. \en An array of fillet radii.
|
||||
c3d::SNameMakerSPtr _snMaker; ///< \ru Именователь с версией операции. \en Names maker with operation version.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters.\~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters.\~
|
||||
\param[in] type - \ru Тип выполняемых скруглений. \en Fillet type.\~
|
||||
\param[in] radiuses - \ru Множество радиусов скругления. \en An array of fillet radii. \~
|
||||
\param[in] nameMaker - \ru Именователь с версией операции. \en Names maker with operation version.\~
|
||||
*/
|
||||
MbWireFrameFilletsParams( MbeConnectingType type, const c3d::DoubleVector & radiuses, const MbSNameMaker & nameMaker );
|
||||
/// \ru Конструктор для чтения. \en Constructor for reading.
|
||||
MbWireFrameFilletsParams( TapeInit tapeInit );
|
||||
/// \ru Деструктор. \ en Destructor.
|
||||
~MbWireFrameFilletsParams() {}
|
||||
|
||||
public:
|
||||
/// \ru Получить множество радиусов скругления. \en Get an array of fillet radii.
|
||||
const c3d::DoubleVector & GetRadii() const { return _radiuses; }
|
||||
/// \ru Получить тип выполняемых скруглений. \en Get the type of fillets.
|
||||
MbeConnectingType GetConnectingType() const { return _type; }
|
||||
/// \ru Получить именователь. \en Get names maker.
|
||||
const MbSNameMaker & GetNameMaker() const { return *_snMaker; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbWireFrameFilletsParams )
|
||||
};
|
||||
|
||||
#endif // __OP_WIREFRAME_PARAMETERS_H
|
||||
+30
-4
@@ -1782,10 +1782,36 @@ public:
|
||||
bool AngleWithEdge( const MbEdge &, double & angle ) const;
|
||||
/// \ru Найти угол между плоскими гранями. \en Find an edge between planar faces.
|
||||
bool AngleWithFace( const MbFace &, double & angle ) const;
|
||||
|
||||
/// \ru Найти проекцию точки на ближайшее ребро грани. \en Find a point projection to the nearest edge of a face.
|
||||
bool GetNearestEdge( const MbCartPoint & pOnFace, c3d::IndicesPair & edgeLoc, double & tEdgeCurve,
|
||||
bool & orientation, double & distance, double paramEpsilon = Math::paramEpsilon ) const;
|
||||
/** \brief \ru Найти ближайшее в 2д ребро грани к заданной точке через процирование.
|
||||
\en Find the closest edge in 2d to a specific point via projection.\~
|
||||
\details \ru Точка должна содержать координаты на UV-области поверхности, принадлежащей грани.
|
||||
Поиск осуществляется именно в 2d на поверхности через проецирование на граничные кривые.
|
||||
В 3d результат может быть другим.
|
||||
\en The point must contain coordinates on the UV-area of the surface corresponding to the face.
|
||||
The search is perfrormed namely in 2d on the surface by projecting on the bounding curves.
|
||||
In 3d result may be different.\~
|
||||
\param[in] pOnSurface - \ru Исследуемая точка на поверхности грани, в uv-области поверхности.
|
||||
\en A point on the face's surface, in uv-area of the surface.\~
|
||||
\param[out] edgeIndex - \ru Номер найденного ребра, где edgeIndex.first - номер цикла грани, edgeIndex.second - номер ребра в цикле.
|
||||
\en An index of found edge, where edgeIndex.first - face loop number, edgeIndex.second - edge number in loop.\~
|
||||
\param[out] tEdgeCurve - \ru Параметр t точки 2д кривой ребра, принадлежащей этой грани, ближайшей к pOnSurface.
|
||||
\en A t-parameter of the edge's 2d-curve closest to the pOnSurface. Curve corresponds to this face.\~
|
||||
\param[out] orientation - \ru Ориентация найденного ребра.
|
||||
\en Found edge orientation. \~
|
||||
\param[out] distance - \ru Расстояние от pOnSurface до ребра на UV-пространстве поверхности в 2д.
|
||||
\en Distance between pOnSurface and edge in 2d UV-area of the face's surface.\~
|
||||
\param[in] paramEpsilon - \ru Параметрическая погрешность (нормируется на dU и dV).
|
||||
\en Parameteric precision (is normalised on dU and dV).\~
|
||||
\return \ru Возвращает true, если ребро было найдено.
|
||||
\en Returns true if the edge is found.\~
|
||||
\ingroup Topology_Items
|
||||
*/
|
||||
bool GetNearestEdge( const MbCartPoint & pOnSurface,
|
||||
c3d::IndicesPair & edgeIndex,
|
||||
double & tEdgeCurve,
|
||||
bool & orientation,
|
||||
double & distance,
|
||||
double paramEpsilon = Math::paramEpsilon ) const;
|
||||
|
||||
/// \ru Найти ребра, пересекающиеся с габаритом своим габаритами. \en Find edges by intersections of two-dimensional bounding boxes.
|
||||
bool GetRectIntersectingEdges( const MbRect & rect, std::vector<c3d::IndicesPair> & edgeLocs, double eps ) const;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user