Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91eb150ddb | |||
| 525666c31c | |||
| 188bfef8ef | |||
| a8a38a24d1 | |||
| bf3a3fa297 | |||
| f2abee4c18 | |||
| 1bec402cd9 | |||
| eb33340a77 | |||
| cc631ec3b3 | |||
| 4a24dfc4b3 |
@@ -144,8 +144,10 @@ private:
|
||||
MbeRejectOutliersType _typeReject; ///< \ru Способ отбраковки выбросов. \en Outliers rejection mode.
|
||||
double _valueReject; ///< \ru Пороговое значения для отбраковки выбросов. \en Outliers rejection mode treshold value.
|
||||
MbSurfaceFitConstraint _fitConstraint; ///< \ru Ограничение. \en Constraint.
|
||||
size_t _pointsFittingMax; ///< \ru Максимальное количество точек для вписывания. \en Maximum count of fitting points.
|
||||
bool _withRefinement; ///< \ru Уточнять ли поверхность по всем точкам. \en Refine the surface by all the points or not.
|
||||
|
||||
///< \ru Предельные значения параметров аналитических поверхностей. \en Tresholds for analytical surfaces parameters.
|
||||
///< \ru Предельные значения параметров аналитических поверхностей. \en Thresholds for analytical surfaces parameters.
|
||||
double _angleConeMin; ///< \ru Минимально возможный половинный угол конуса (градусы). \en Mininmum allowed cone half-angle ( degrees ).
|
||||
double _angleConeMax; ///< \ru Максимально возможный половинный угол конуса (градусы). \en Maximum allowed cone half-angle( degrees ).
|
||||
double _radiusAnalyticShapeMax; ///< \ru Максимально возможный радиальный размер аналитических поверхностей. \en Maximum allowed analytical shapes radial size.
|
||||
@@ -163,6 +165,8 @@ private:
|
||||
, _indicies ( )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
, _withRefinement ( false )
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
@@ -181,6 +185,8 @@ public:
|
||||
, _indicies ( indicies )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
, _withRefinement ( false )
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
@@ -200,6 +206,8 @@ public:
|
||||
, _indicies ( indicies )
|
||||
, _typeReject ( rejectType )
|
||||
, _valueReject ( rejectValue )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
, _withRefinement ( false )
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
@@ -222,6 +230,8 @@ public:
|
||||
, _indicies ( indicies )
|
||||
, _typeReject ( rejectType )
|
||||
, _valueReject ( rejectValue )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
, _withRefinement ( false )
|
||||
, _order ( c3d::NURBS_DEGREE )
|
||||
, _countCpMax ( c3d::NURBS_POINTS_MAX_COUNT )
|
||||
, _smoothCoef ( METRIC_ACCURACY )
|
||||
@@ -242,6 +252,8 @@ public:
|
||||
, _indicies ( indicies )
|
||||
, _typeReject ( rot_NoReject )
|
||||
, _valueReject ( 0. )
|
||||
, _pointsFittingMax ( 10000 )
|
||||
, _withRefinement ( false )
|
||||
, _order ( order )
|
||||
, _countCpMax ( countCpMax )
|
||||
, _smoothCoef ( smoothCoef )
|
||||
@@ -274,7 +286,11 @@ public:
|
||||
double GetRadiusAnalyticShapeMax() const { return _radiusAnalyticShapeMax; }
|
||||
/// \ru Выдать ограничение. \en Get the constraint.
|
||||
const MbSurfaceFitConstraint & GetFitConstraint() const { return _fitConstraint; }
|
||||
/// \ru Установить предельные значения параметров аналитических поверхностей. \en Set tresholds for analytical surfaces parameters.
|
||||
/// \ru Выдать максимальное количество точек для вписывания. \en Get the maximum count of fitting points.
|
||||
size_t GetPointsFittingMax() const { return _pointsFittingMax; }
|
||||
/// \ru Выдать флаг уточнения поверхности по всем точкам. \en Get the flag of surface refinement by all the points.
|
||||
bool GetWithRefinement() const { return _withRefinement; }
|
||||
/// \ru Установить предельные значения параметров аналитических поверхностей. \en Set thresholds for analytical surfaces parameters.
|
||||
void SetAnalyticBounds( double angleConeMin, double angleConeMax, double radiusAnalyticShapeMax )
|
||||
{
|
||||
_angleConeMin = angleConeMin;
|
||||
@@ -554,6 +570,10 @@ public:
|
||||
{
|
||||
return _fitConstraint.InitializeZW( typeSurface, typeDim, fixedValues, place );
|
||||
}
|
||||
/// \ru Установить максимальное количество точек для вписывания. \en Set the maximum count of fitting points.
|
||||
void SetPointsFittingMax( size_t value ) { _pointsFittingMax = value; }
|
||||
/// \ru Установить флаг уточнения поверхности по всем точкам. \en Set the flag of surface refinement by all the points.
|
||||
void SetWithRefinement( bool value ) { _withRefinement = value; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbSurfaceFitToGridParameters )
|
||||
};
|
||||
|
||||
@@ -17,30 +17,32 @@
|
||||
#define __ACTION_CURVE3D_H
|
||||
|
||||
|
||||
#include <hash32.h>
|
||||
#include <templ_s_array.h>
|
||||
#include <templ_sptr.h>
|
||||
#include <mb_cart_point3d.h>
|
||||
#include <space_item.h>
|
||||
#include <mb_operation_result.h>
|
||||
#include <wire_frame.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class MATH_CLASS MbCurve;
|
||||
class MATH_CLASS MbCurve3D;
|
||||
class MATH_CLASS MbNurbs3D;
|
||||
class MATH_CLASS MbContour3D;
|
||||
class MATH_CLASS MbWireFrame;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbSurface;
|
||||
class MATH_CLASS MbItem;
|
||||
class MATH_CLASS MbName;
|
||||
class MATH_CLASS MbSweptData;
|
||||
class MATH_CLASS MbSNameMaker;
|
||||
class MATH_CLASS MbContourChamferParams;
|
||||
struct MATH_CLASS MbNurbsParameters;
|
||||
class MATH_CLASS MbNurbsCopyCurveResult;
|
||||
class MATH_CLASS MbCurvesWrappingParams;
|
||||
class MATH_CLASS MbCurvesWrappingResults;
|
||||
class MATH_CLASS MbCurveFitParameters3D;
|
||||
class MATH_CLASS MbCurveFitResults3D;
|
||||
class MATH_CLASS MbCurveExtensionParameters3D;
|
||||
|
||||
struct MATH_CLASS EvolutionValues;
|
||||
|
||||
@@ -1538,7 +1540,7 @@ MATH_FUNC ( MbCurve3D * ) SetProportionalParametrization( MbCurve3D * curve,
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) ExtendCurve( const MbCurve3D & sourceCurve,
|
||||
const MbCurveExtensionParameters3D & parameters,
|
||||
c3d::WireFrameSPtr & resFrame );
|
||||
SPtr<MbWireFrame> & resFrame );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -1575,39 +1577,39 @@ MATH_FUNC (MbResultType) CreateContourChamfer( const MbContourChamferParams & pa
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
/** \brief \ru Построить развертку кривых на плоскость.
|
||||
\en Construct unwrapped curves. \~
|
||||
\details \ru Построение развертки кривых на плоскость. См. также #CurvesUnwrapping.\n
|
||||
\en Construct unwrapped curves on a plane. Also check out #CurvesUnwrapping.\n \~
|
||||
\param[in] params - \ru Параметры разворачивания.
|
||||
\en Unwrapping parameters. \~
|
||||
\param[in] resFrame - \ru Развёрнутые 3д-кривые на присланной плоскости.
|
||||
\en Unwrapped 3d-curves on the input plane. \~
|
||||
/** \brief \ru Построить развертку кривых и точек на плоскость.
|
||||
\en Construct unwrapped curves and points. \~
|
||||
\details \ru Построение развертки кривых и точек на плоскость. См. также #CurvesUnwrapping.\n
|
||||
\en Construct unwrapped curves and points on a plane. Also check out #CurvesUnwrapping.\n \~
|
||||
\param[in] params - \ru Параметры разворачивания.
|
||||
\en Unwrapping parameters. \~
|
||||
\param[out] result - \ru Результат разворачивания.
|
||||
\en Wrapping result. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) UnwrapCurve( const MbCurvesWrappingParams & parameters,
|
||||
c3d::WireFrameSPtr & resFrame );
|
||||
MATH_FUNC (MbResultType) UnwrapCurve( const MbCurvesWrappingParams & parameters,
|
||||
MbCurvesWrappingResults & result );
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
/** \brief \ru Выполнить операцию сворачивания кривых на поверхность.
|
||||
\en Perform the operation of wrapping curves on a surface. \~
|
||||
/** \brief \ru Выполнить операцию сворачивания кривых и точек на поверхность.
|
||||
\en Perform the operation of wrapping curves and points on a surface. \~
|
||||
\details \ru Выполнить операцию сворачивания кривых на поверхность. См. также #CurvesWrapping.\n
|
||||
\en Perform the operation of wrapping curves on a surface. Also check out #CurvesWrapping.\n \~
|
||||
\param[in] params - \ru Параметры сворачивания.
|
||||
\en Wrapping parameters. \~
|
||||
\param[out] resFrame - \ru Каркас из свёрнутых 3д-кривых на присланной поверхности.
|
||||
\en Wireframe of wrapped 3d-curves on the input surface. \~
|
||||
\param[in] params - \ru Параметры сворачивания.
|
||||
\en Wrapping parameters. \~
|
||||
\param[out] result - \ru Результат сворачивания.
|
||||
\en Wrapping result. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) WrapCurve( const MbCurvesWrappingParams & parameters,
|
||||
c3d::WireFrameSPtr & resFrame );
|
||||
MATH_FUNC( MbResultType ) WrapCurve( const MbCurvesWrappingParams & parameters,
|
||||
MbCurvesWrappingResults & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -164,8 +164,8 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
Удаления всех скруглений тела, меньших определённого радиуса (dmm_PurifyFilletsBelowRadius).\n
|
||||
8. Слияние вершин ребёр и удаление рёбер (dmm_DeleteEdges). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (dmm_UniteFaces). \n
|
||||
10. Поворот выбранных граней (dmm_RotateFaces). Угол поворота определяется параметром angle,
|
||||
ось поворота определяется осью axis.\n
|
||||
10. Поворот выбранных граней с адаптацией прилегающих скруглений (dmm_RotateFaces) или без (dmm_RotateFacesNoFilletAdaptation).
|
||||
Угол поворота определяется параметром angle, ось поворота определяется осью axis.\n
|
||||
11. Замена выбранных граней тела (dmm_ReplaceFaces).\n
|
||||
Одновременно с построением оболочки функция создаёт её строитель.\n
|
||||
\en The method performs one of the following actions depending on the parameter #MbModifiedSolidParams: \n
|
||||
@@ -188,8 +188,8 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
Remove of all fillets below specified radius from a solid (dmm_PurifyFilletsBelowRadius).\n
|
||||
8. Edge vertices merging and edges removal (dmm_DeleteEdges). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (dmm_UniteFaces). \n
|
||||
10. Rotation of the chosen faces (dmm_RotateFaces). The parameters are the rotation angle
|
||||
and the rotation axis.\n
|
||||
10. Rotation of the chosen faces with the adjacent fillets adaptation (dmm_RotateFaces)
|
||||
or without (dmm_RotateFacesNoFilletAdaptation ). The parameters are the rotation angle and the rotation axis.\n
|
||||
11. Replacement of the specified faces of a solid (dmm_ReplaceFaces).\n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
\param[in] solid - \ru Исходное тело.
|
||||
|
||||
@@ -319,7 +319,11 @@ MATH_FUNC (bool) IsSolidsIntersection( const MbSolid & solid1, const MbSolid & s
|
||||
\param[in] checkTouchPoints - \ru Искать точки касания.
|
||||
\en Find touch points. \~
|
||||
\param[out] intData - \ru Информация о пересечении двух тел.
|
||||
\en Information about two solids intersection. \~
|
||||
Если одно из пересекаемых тел не замкнуто, то
|
||||
тела, полученные в результате, могут быть не валидны для операций.
|
||||
\en Information about two solids intersection.
|
||||
If one of the intersecting bodies is not closed, then
|
||||
the resulting bodies may not be valid for operations. \~
|
||||
\return \ru Возвращает true, если найдено хотя бы одно пересечение.
|
||||
\en Returns 'true' if at least one intersection is detected. \~
|
||||
\ingroup Algorithms_3D
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -375,6 +375,8 @@ MATH_FUNC( MbResultType ) SmoothPositionData( const MbSmoothPositionDataParams &
|
||||
\en Create a function by one of three coordinates of curve. \~
|
||||
\details \ru Для указанной координаты кривой построить склярную функцию её изменения, зависящую от параметра кривой. \n
|
||||
\en A function creation for behavior of selected curve coordinate with curve parameter. \n
|
||||
\deprecated \ru Метод устарел. Взамен использовать #CreateFunction с набором параметров #MbFunctionParameters.
|
||||
\en The method is deprecated. Use instead #CreateFunction with the parameters #MbFunctionParameters. \~
|
||||
\param[in] curve - \ru Кривая.
|
||||
\en The curve. \~
|
||||
\param[in] place - \ru Локальная система координат, в которой используется кривая.
|
||||
@@ -386,11 +388,30 @@ MATH_FUNC( MbResultType ) SmoothPositionData( const MbSmoothPositionDataParams &
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE(CreateFunction with MbFunctionParameters)
|
||||
MATH_FUNC (MbFunction *) CreateFunction( const MbCurve3D & curve,
|
||||
const MbPlacement3D & place,
|
||||
size_t coordinate );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Построение скалярной функции изменения Y-координаты кривой.
|
||||
\en Create a scalar function by Y-coordinate of curve. \~
|
||||
\details \ru Для Y-координаты кривой построить скалярную функцию её изменения, зависящую от X-координаты кривой. \n
|
||||
\en A function creation for behavior of Y-curve coordinate with X-curve parameter. \n
|
||||
\param[in] curve - \ru Кривая.
|
||||
\en The curve. \~
|
||||
\param[in] params - \ru Параметры скалярной функции.
|
||||
\en The parameters of the scalar function. \~
|
||||
\return \ru Возвращает построенную функцию.
|
||||
\en Returns the created function. \~
|
||||
\ingroup Algorithms_3D
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (c3d::FunctionSPtr) CreateFunction( const MbCurve & curve,
|
||||
const MbFunctionParameters & params );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Вычисление данных фантома для торцев поверхности переменного сечения.
|
||||
\en Calculation of the phantom data for the ends of the mutable section surface. \~
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -105,10 +105,63 @@ class MATH_CLASS IProgressIndicator;
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( ElementarySolid with 'MbElementarySolidResults' argument )
|
||||
MATH_FUNC (MbResultType) ElementarySolid( const MbElementarySolidParams & params,
|
||||
c3d::SolidSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать элементарное тело.
|
||||
\en Create an elementary solid. \~
|
||||
\details \ru Создать одно из элементарных тел по заданным параметрам.\n
|
||||
1. Создать одно из элементарных тел по заданным точкам и типу: \n
|
||||
solidType = et_Sphere - шар (3 точки), \n
|
||||
solidType = et_Torus - тор (3 точки), \n
|
||||
solidType = et_Cylinder - цилиндр (3 точки), \n
|
||||
solidType = et_Cone - конус (3 точки, если конус не усеченный),
|
||||
(4 точки, если конус усеченный), \n
|
||||
solidType = et_Block - блок (4 точки), \n
|
||||
solidType = et_Wedge - клин (4 точки), \n
|
||||
solidType = et_Prism - призма (количество вершин основания+1 точка), \n
|
||||
solidType = et_Pyramid - пирамида (количество вершин основания+1 точка), \n
|
||||
solidType = et_Plate - плита (4 точки),
|
||||
solidType = et_Icosahedron - икосаэдр (3 точки), \n
|
||||
solidType = et_Polyhedron - многогранник (3 точки), \n
|
||||
solidType = et_Tetrapipe - тетра-труба (3 точки), \n
|
||||
solidType = et_Octapipe - окта-труба (3 точки). \n
|
||||
2. Создать тело по элементарной поверхности. \n
|
||||
Допускается только тип поверхности - цилиндр, конус, сфера, тор. \n
|
||||
\en Create one of the elementary solids according to the specified parameters.\n
|
||||
1. Create one of elementary solids from the specified points and type: \n
|
||||
solidType = et_Sphere - a sphere (3 points), \n
|
||||
solidType = et_Torus - a torus (3 points), \n
|
||||
solidType = et_Cylinder - a cylinder (3 points), \n
|
||||
solidType = et_Cone - a cone (3 points), in the case of non-frustum cone,
|
||||
(4 points), in the case of frustum cone, \n
|
||||
solidType = et_Block - a block (4 points), \n
|
||||
solidType = et_Wedge - a wedge (4 points), \n
|
||||
solidType = et_Prism - a prism (points count is equal to the base vertices count + 1), \n
|
||||
solidType = et_Pyramid - a pyramid (points count is equal to the base vertices count + 1), \n
|
||||
solidType = et_Plate - a plate (4 points), \n
|
||||
solidType = et_Icosahedron - an icosahedron (3 points), \n
|
||||
solidType = et_Polyhedron - a polyhedron (3 points), \n
|
||||
solidType = et_Tetrapipe - a tetra-pipe (3 points), \n
|
||||
solidType = et_Octapipe - an octa-pipe (3 points). \n \~
|
||||
2. Create a solid from an elementary surface. \n
|
||||
The only acceptable surface types are cylinder, cone, sphere, torus. \~
|
||||
\param[in] params - \ru Параметры операции.
|
||||
\en Parameters of operation. ~
|
||||
\param[out] results - \ru Результаты операции.
|
||||
\en The operation result. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) ElementarySolid( const MbElementarySolidParams & params,
|
||||
MbElementarySolidResults & results );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать тело на основе полигональной модели.
|
||||
\en Create a solid on the basis of a polygonal geometric object. \~
|
||||
@@ -827,6 +880,8 @@ MATH_FUNC (MbResultType) RevolutionResult( MbSolid & solid,
|
||||
\en The additional turn for generating line. \~
|
||||
\param[in] version - \ru Версия операции.
|
||||
\en The version of the operation. \~
|
||||
\param[out] matrix - \ru Указатель на матрицу преобразование сечения к ближайшему концу направляющей кривой.
|
||||
\en The pointer to matrix, which transform section to nearest end of spine curve. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\warning \ru Вспомогательная функция операций EvolutionSolid и EvolutionResult.
|
||||
@@ -840,7 +895,8 @@ MATH_FUNC (MbResultType) EvolutionNormalize( const MbSurface & surface,
|
||||
const EvolutionValues & parameters,
|
||||
MbAxis3D & axis,
|
||||
double & angle,
|
||||
VERSION version );
|
||||
VERSION version,
|
||||
MbMatrix3D * matrix = nullptr );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -1220,26 +1220,30 @@ MATH_FUNC (MbResultType) CreateContourFillets( const MbContour3D & contour,
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( WrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC (MbResultType) CurvesWrapping( const MbCurvesWrappingParams & parameters,
|
||||
c3d::PlaneCurvesSPtrVector & surfaceCurves );
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
/** \brief \ru Построить кривые, оборачивающие поверхность.
|
||||
\en Construct curves that wrap the surface. \~
|
||||
\details \ru Построить кривые, оборачивающие поверхность. \n
|
||||
\en Construction of curves that wrap the surface. \n \~
|
||||
\param[in] parameters - \ru Параметры #MbCurvesWrappingParams для переноса копий двумерных кривых на другой носитель.
|
||||
\en Parameters #MbCurvesWrappingParams for transferring copies of two-dimensional curves on another medium. \~
|
||||
\param[out] resultCurves - \ru Построенные 3д-кривые на присланной поверхности.
|
||||
\en Constructed 3d-curves based on the input surface. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
/** \brief \ru Построить кривые, оборачивающие поверхность.
|
||||
\en Construct curves that wrap the surface. \~
|
||||
\details \ru Построить кривые, оборачивающие поверхность. \n
|
||||
\en Construction of curves that wrap the surface. \n \~
|
||||
\param[in] parameters - \ru Параметры #MbCurvesWrappingParams для переноса копий двумерных кривых на другой носитель.
|
||||
\en Parameters #MbCurvesWrappingParams for transferring copies of two-dimensional curves on another medium. \~
|
||||
\param[out] resultCurves - \ru Построенные 3д-кривые на присланной поверхности.
|
||||
\en Constructed 3d-curves based on the input surface. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( WrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC (MbResultType) CurvesWrapping( const MbCurvesWrappingParams & parameters,
|
||||
c3d::SpaceCurvesSPtrVector & resultCurves );
|
||||
|
||||
@@ -1255,9 +1259,11 @@ MATH_FUNC (MbResultType) CurvesWrapping( const MbCurvesWrappingParams & para
|
||||
\en Unwrapped 2d-curves. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( UnwrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC (MbResultType) CurvesUnwrapping( const MbCurvesWrappingParams & params,
|
||||
c3d::PlaneCurvesSPtrVector & surfaceCurves );
|
||||
|
||||
@@ -1273,9 +1279,11 @@ MATH_FUNC (MbResultType) CurvesUnwrapping( const MbCurvesWrappingParams & pa
|
||||
\en Unwrapped 3d-curves on the input plane. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( UnwrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC (MbResultType) CurvesUnwrapping( const MbCurvesWrappingParams & parameters,
|
||||
c3d::SpaceCurvesSPtrVector & resultCurves );
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\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;
|
||||
class MATH_CLASS MbNurbsWireFrameParams;
|
||||
class MATH_CLASS MbTrimmedWireFrameParams;
|
||||
class MATH_CLASS MbWireFrameProjParams;
|
||||
class MATH_CLASS MbWireFrameProjResult;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \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 );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Построить NURBS копию каркаса.
|
||||
\en Construct a NURBS copy of a wire frame. \~
|
||||
\details \ru Строит проволочный каркас, содержащий NURBS кривые, аппроксимирующие заданный каркас.
|
||||
По возможности, строит точные кривые, возможно, с кратными узлами.
|
||||
Количеством узлов для NURBS определяется в зависимости от кривой.
|
||||
\en Constructs a wire frame contains NURBS curves which approximates a given wire frame.
|
||||
If it is possible, constructs the accurate curves, perhaps with multiple knots.
|
||||
The number of knots for NURBS is defined depending on the curve. \~
|
||||
\param[in] wireFrame - \ru Исходный каркас.
|
||||
\en The initial wire frame. \~
|
||||
\param[in] sameWire - \ru Режим копирования входного каркаса.
|
||||
\en Whether to copy the input wire frame. \~
|
||||
\param[in] params - \ru Параметры скругления.
|
||||
\en A fillet parameters. \~
|
||||
\param[out] result - \ru Построенный каркас с NURBS кривыми или nullptr при неуспешном построении.
|
||||
\en he constructed wire frame with NURBS curve or nullptr in a case of failure. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) CreateNurbsWireFrame( c3d::WireFrameSPtr & wireFrame,
|
||||
MbeCopyMode sameWire,
|
||||
const MbNurbsWireFrameParams & params,
|
||||
c3d::WireFrameSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать усеченный каркас.
|
||||
\en Create trimmed wire frame. \~
|
||||
\details \ru Создать каркас в виде связной цепочки ребер исходного каркаса, заключенной между заданными точками усечения. \n
|
||||
Исходный каркас должен быть нормализован.\n
|
||||
\en Create a wire frame in the form of a connected chain of edges of the original wire frame enclosed between truncation points. \n
|
||||
Init wire frame should be normalized. \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 Trimmed parameters. \~
|
||||
\param[out] result - \ru Усеченный каркас.
|
||||
\en The trimmed wire frame. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup WireFrame_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) CreateTrimmedWireFrame( c3d::WireFrameSPtr & wireframe,
|
||||
MbeCopyMode sameEdges,
|
||||
const MbTrimmedWireFrameParams & params,
|
||||
c3d::WireFrameSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Найти проекцию точки на проволочный каркас.
|
||||
\en Find the point projection to the wire frame. \~
|
||||
\details \ru Найти ближайшую проекцию точки на проволочный каркас в диапазоне изменения параметра или на его продолжении.
|
||||
Аналог MbContour3D::NearPointProjection().
|
||||
Проволочный каркас должен быть нормализован.
|
||||
\en Find the nearest projection of a point to the wire frame within the parameter range or its extension.
|
||||
Analogue of MbContour3D::NearPointProjection().
|
||||
The wire frame must be normalized. \~
|
||||
\param[in] wireFrame - \ru Проволочный каркас для поиска проекции.
|
||||
\en Wire frame for searching projection. \~
|
||||
\param[in] params - \ru Параметры операции.
|
||||
\en Operation parameters. \~
|
||||
\param[in] result - \ru Результаты операции.
|
||||
\en Results of the operation. \~
|
||||
\return \ru Код результата операции.
|
||||
\en Operation result code. \~
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) NearPointProjection( const MbWireFrame & wireFrame,
|
||||
const MbWireFrameProjParams & params,
|
||||
MbWireFrameProjResult & result );
|
||||
|
||||
|
||||
#endif // __ACTION_WIREFRAME_H
|
||||
@@ -974,7 +974,7 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/// \ru Получить общий вектора поиска. \en Get general search direction.
|
||||
/// \ru Получить флаг добавления в результат равных расстояний. \en Get the flag for adding equal distances to the result.
|
||||
bool GetUseEqualDistances() const { return useEqualDistances; }
|
||||
/// \ru Получить желаемое число выдаваемых минимумов. \en Get desired minima number.
|
||||
size_t GetDesiredMinimaNumber() const { return desiredMinimaNumber; }
|
||||
@@ -1024,12 +1024,18 @@ public:
|
||||
MbMinMaxItemItemDistances<Param1, Param2> allResults; ///< \ru Все результаты. \en All results. \~
|
||||
MbMinMaxItemItemDistances<Param1, Param2> minResults; ///< \ru Результаты-минимумы. \en Results-minimums. \~
|
||||
MbMinMaxItemItemDistances<Param1, Param2> maxResults; ///< \ru Результаты-максимумы. \en Results-maximums. \~
|
||||
private:
|
||||
MbResultType resType { rt_Empty }; ///< \ru Код результата операции. \en Operation result code. \~
|
||||
|
||||
public:
|
||||
/// \ru Получить фактическое число минимумов. \en Get real minima number.
|
||||
size_t GetActualMinimaNumber() const { return minResults.GetCount(); }
|
||||
size_t GetActualMinimaNumber() const { return minResults.GetCount(); }
|
||||
/// \ru Получить фактическое число максимумов. \en Get desired maxima number.
|
||||
size_t GetActualMaximaNumber() const { return maxResults.GetCount(); }
|
||||
size_t GetActualMaximaNumber() const { return maxResults.GetCount(); }
|
||||
/// \ru Получить код результата операции. \en Get operation result code.
|
||||
MbResultType GetOperationResultCode() const { return resType; }
|
||||
/// \ru Установить код результата операции. \en Set operation result code.
|
||||
void SetOperationResultCode( MbResultType rt ) { resType = rt; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ public:
|
||||
/// \ru Отрисовать полигон. \en Draw a polygon.
|
||||
virtual void DrawPolygon( const MbPolygon3D * polygon, int R, int G, int B, int width = 1 ) = 0;
|
||||
/// \ru Отрисовать трехмерную точку. \en Draw a three-dimensional point.
|
||||
virtual void DrawItem( const MbCartPoint3D & gi, int R, int G, int B, int width = 2 ) = 0;
|
||||
/// \ru Отрисовать трехмерную точку. \en Draw a three-dimensional point.
|
||||
virtual void DrawPoint( const MbCartPoint3D * gi, int R, int G, int B, int width = 2 ) = 0;
|
||||
/// \ru Отрисовать трехмерный отрезок. \en Draw a three-dimensional segment.
|
||||
virtual void DrawLine( const MbCartPoint3D & q1, const MbCartPoint3D & q2, int R, int G, int B, int width = 1 ) = 0;
|
||||
@@ -288,6 +290,7 @@ public:
|
||||
\en The width of the draw lines. \~
|
||||
\ingroup Drawing
|
||||
*/
|
||||
static void DrawItem( const MbCartPoint3D & gi, int R, int G, int B, int width = 2 );
|
||||
static void DrawPoint( const MbCartPoint3D * gi, int R, int G, int B, int width = 2 );
|
||||
|
||||
/** \brief \ru Отрисовать трехмерный отрезок.
|
||||
|
||||
@@ -38,6 +38,9 @@ public:
|
||||
/// \ru Конструктор по значениям компонентов. \en Constructor by components values.
|
||||
MbRGBA( uint8 red, uint8 green, uint8 blue, uint8 alpha = SYS_MAX_UINT8 );
|
||||
|
||||
/// \ru Конструктор по uint32. \en Constructor by uint32.
|
||||
MbRGBA( uint32 );
|
||||
|
||||
/// \ru Конструктор по значениям компонентов. \en Constructor by components values.
|
||||
MbRGBA( float red, float green, float blue, float alpha = 1.0 );
|
||||
|
||||
@@ -286,6 +289,9 @@ public :
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbVisual();
|
||||
|
||||
/// \ru Создать по составляющей цвета. \en Create an object by a color component.
|
||||
static SPtr<MbVisual> Create( uint32 c );
|
||||
|
||||
// \ru Общие функции объекта \en Common functions of object.
|
||||
|
||||
MbeAttributeType AttributeType() const override; // \ru Дать подтип атрибута. \en Get subtype of an attribute.
|
||||
@@ -343,6 +349,9 @@ public :
|
||||
void SetOpacityInt ( uint8 v ) { _opacity = v; } // \ru Установить коэффициент непрозрачности. \en Set an opacity coefficient.
|
||||
void SetChromInt ( uint8 v ) { _chrom = v; } // \ru Установить коэффициент зеркального отражения объектов. \en Set a coefficient of specular reflection for objects.
|
||||
|
||||
uint32 GetColor() const { return _diffuse.Get(); } // \ru Выдать составляющую цвета. \en Get a color component.
|
||||
void SetColor( uint32 c ) { _diffuse.Init( c ); } // \ru Установить составляющую цвета. \en Set a color component.
|
||||
|
||||
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
|
||||
size_t SetProperties( const MbProperties & ) override; // \ru Установить свойства объекта. \en Set properties of object.
|
||||
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта. \en Get a name of object property.
|
||||
@@ -439,6 +448,25 @@ MATH_FUNC( SPtr<MbVisual> ) ColorToVisual( const MbColor & cAttr );
|
||||
MATH_FUNC( SPtr<MbVisual> ) ColorToVisual( const MbColor & cAttr, const MbVisual & vAttr );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Преобразовать атрибуты цвета в атрибут MbVisual.
|
||||
\en Convert color attributes into MbVisual attribute. \~
|
||||
\details \ru Создать новый атрибут MbVisual на базе заданного атрибута MbVisual,
|
||||
в котором компонент diffuse содержит заданный MbColor. \n
|
||||
\en Create a MbVisual attribute on base of the MbVisual attribute
|
||||
where the diffuse component contains the value of the MbColor attribute. \n \~
|
||||
\param[in] cAttr - \ru Указатель на атрибут MbColor.
|
||||
\en MbColor attribute pointer. \~
|
||||
\param[in] vAttr - \ru Указатель на атрибут MbVisual.
|
||||
\en MbVisual attribute pointer. \~
|
||||
\result \ru Возвращает указатель на созданный атрибут MbVisual.
|
||||
\en Returns a pointer to the created MbVisual attribute. \~
|
||||
\ingroup Model_Attributes
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( SPtr<MbVisual> ) ColorToVisual( const SPtr<MbColor> & cAttr, const SPtr<MbVisual> & vAttr );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Преобразовать цвет по трём компонентам в uint32.
|
||||
\en Convert a color by 3 components in uint32. \~
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
draftHP, ///< \ru Хот-точка операции уклона. \en The draft operation hot point.
|
||||
conicSectionHP, ///< \ru Хот-точка операции построения переменного конического сечения. \en The conic section operation hot point.
|
||||
DMFilletRadiusSetHP, ///< \ru Хот-точка операции прямого моделирования по установке радиусов граням скругления. \en The direct modeling operation's hot point by set fillet face's radius.
|
||||
elementaryHP, ///< \ru Хот-точка операции построения элементарного тела. \en The elementary solid operation hot point.
|
||||
DMReplaceFacesHP, ///< \ru Хот-точка операции модифицирования граней. \en Hot point of the face modification operation.
|
||||
// \ru Вставлять новые типы перед этим типом. \en Insert new types before this type.
|
||||
endHP = SYS_MAX_INT16
|
||||
};
|
||||
|
||||
@@ -567,13 +567,15 @@ namespace c3d // namespace C3D
|
||||
/// \ru Подсказка для идентификатора элемента при обмене данными. \en Prompt for the item identifier in model exchange operations.
|
||||
constexpr TCHAR c3dStr_ItemIdentifierExchange[] = _T( "c3d_ItemIdentifierExchange" );
|
||||
/// \ru Подсказка для URL текстуры при обмене данными. \en Prompt for the URL of texture in model exchange operations.
|
||||
constexpr TCHAR c3dStr_TextureUrl[] = _T("C3D_Texture_URL");
|
||||
|
||||
/// \ru Подсказка для атрибута хот-точки в уклоне. \en Prompt for attribute of hot point in draft operations.
|
||||
constexpr TCHAR c3d_DraftOperationHotPoint[] = _T("c3d_DraftOperationHotPoint");
|
||||
constexpr TCHAR c3dStr_TextureUrl[] = _T( "C3D_Texture_URL" );
|
||||
/// \ru Подсказка для идентификатора компонента. \en Prompt for the item identifier.
|
||||
constexpr TCHAR c3dStr_UniqueCompId[] = _T( "c3d_UniqueCompID" );
|
||||
|
||||
/// \ru Подсказка для типа замкнутости оболочки в исходных данных. \en Prompt for shell closure type in source data.
|
||||
constexpr TCHAR c3d_ShellOpenClosedOriginal[] = _T( "c3d_ShellOpenClosedOriginal" );
|
||||
|
||||
/// \ru Подсказка для атрибута хот-точки в уклоне. \en Prompt for attribute of hot point in draft operations.
|
||||
constexpr TCHAR c3d_DraftOperationHotPoint[] = _T( "c3d_DraftOperationHotPoint" );
|
||||
/// \ru Подсказка для атрибута простой хот-точки. \en Prompt for attribute of simple hot point.
|
||||
constexpr TCHAR c3d_OperationSingleHotPoint[] = _T( "c3d_OperationSingleHotPoint" );
|
||||
/// \ru Подсказка для атрибута композитной хот-точки. \en Prompt for attribute of composite hot point.
|
||||
|
||||
@@ -67,7 +67,10 @@ public:
|
||||
\en Add a poligonal object with given placement to the collision detection set. \~
|
||||
\return \ru Дескриптор объекта для контроля столкновений. \en Descriptor of object for collision detection. \~
|
||||
*/
|
||||
cdet_item AddMesh( const MbMesh & mesh, const MbPlacement3D & place, cdet_app_item appItem = CDET_APP_NULL );
|
||||
cdet_item AddMesh( const MbMesh & mesh
|
||||
, const MbPlacement3D & place
|
||||
, cdet_app_item appItem = CDET_APP_NULL
|
||||
, double gap = 0. );
|
||||
/**
|
||||
\brief \ru Добавить новый компонент контроля соударений и параметров близости.
|
||||
\en Add a new component to track collisions and proximity parameters. \~
|
||||
@@ -132,7 +135,7 @@ public: // the functions below can be deprecated in future version.
|
||||
*/
|
||||
cdet_item AddSolid( const MbLumpAndFaces & );
|
||||
/// \ru Добавить тело с заданным положением. \en Add a solid with a given placement.
|
||||
cdet_item AddSolid( const MbSolid &, const MbPlacement3D &, cdet_app_item = CDET_APP_NULL );
|
||||
cdet_item AddSolid( const MbSolid &, const MbPlacement3D &, cdet_app_item = CDET_APP_NULL, double gap = 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.
|
||||
|
||||
@@ -373,11 +373,11 @@ public:
|
||||
double GetSizeX() const; ///< \ru Получить размер по x. \en Get size by x.
|
||||
double GetSizeY() const; ///< \ru Получить размер по y. \en Get size by y.
|
||||
void GetSize( double& x, double& y ) const; ///< \ru Получить размеры. \en Get sizes.
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MaSpecificSymbol )
|
||||
|
||||
|
||||
virtual MaeTextType IsA() const;
|
||||
virtual SPtr<MaTextItem> Duplicate() const;
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MaSpecificSymbol )
|
||||
};
|
||||
|
||||
|
||||
@@ -549,6 +549,13 @@ typedef std::vector< SPtr<MaTextItem> > vector_of_text;
|
||||
CONV_FUNC( SPtr<MbPMI> ) ConvertPMI( const MaAnnotationItem& it );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Преобразовать элемент технического требования.
|
||||
\en Transform technical requirements. \~
|
||||
*/
|
||||
// ---
|
||||
CONV_FUNC( SPtr<MbPMI> ) ConvertTechnicalRequirements( const MaAnnotationItem& it );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Преобразовать элемент аннотации.
|
||||
@@ -661,7 +668,7 @@ public:
|
||||
/// \ru Задать кривую, вдоль которой проводится измерение. \en Set the curve the measurement is performed along.
|
||||
void SetPath( MbCurve3D* inPath );
|
||||
/// \ru Получить кривую, вдоль которой проводится измерение. \en Get the curve the measurement is performed along.
|
||||
MbCurve3D* GetPath();
|
||||
MbCurve3D* GetPath() const;
|
||||
|
||||
/// \ru Создать дубликат и трансформировать его согласно матрице. \en Create a replica then transform it.
|
||||
virtual SPtr<MaAnnotationItem> ShallowDuplicateTransform( const MbMatrix3D &, MbRegDuplicate* partDuplicateRegistry = nullptr );
|
||||
|
||||
@@ -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.
|
||||
};
|
||||
|
||||
@@ -255,6 +258,7 @@ enum eMsgDetail {
|
||||
|
||||
emd_WarningACISUnsupportedInterpoleCurveType, ///< \ru Данный подтип ACIS интерполяционной кривой не поддерживается. \en Interpolation curve type is not supported by SAT converter.
|
||||
emd_WarningACISUnsupportedParametricCurveType, ///< \ru Данный подтип ACIS параметрической кривой не поддерживается. \en Parametric curve type is not supported by SAT converter.
|
||||
emd_WarningACISUnsupportedSplineSurfaceType, ///< \ru Данный подтип ACIS сплайновой поверхности не поддерживается. \en Spline surface type is not supported by SAT converter.
|
||||
emd_ErrorACISUnsupportedVersion, ///< \ru Данная версия ACIS NT не поддерживается. \en Th version of file is not supported by SAT converter.
|
||||
emd_WarningACISCannotImportEntityId, ///< \ru Не удалось импортировать объект с данным Id. \en Cannot import this object by SAT converter.
|
||||
emd_WarningACISIncorrectIntAttribute, ///< \ru Некорректный целочисленный атрибут. \en Incorrect integer attribute.
|
||||
|
||||
@@ -203,9 +203,9 @@ MbElementarySolid::MbElementarySolid( const PointsVector & pnts, ElementaryShell
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE
|
||||
MATH_FUNC (MbCreator *) CreateElementary( const MbElementarySolidParams & params,
|
||||
MbResultType & res,
|
||||
c3d::ShellSPtr & shell );
|
||||
|
||||
|
||||
#endif // __CR_ELEMENTARY_SOLID_H
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,66 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Строитель NURBS копии каркаса.
|
||||
\en Creator NURBS copies of the wire frame.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_NURBS_WIREFRAME_H
|
||||
#define __CR_NURBS_WIREFRAME_H
|
||||
|
||||
#include <creator.h>
|
||||
#include <wire_frame.h>
|
||||
#include <op_wireframe_parameter.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель NURBS копии каркаса.
|
||||
\en Creator NURBS copies of the wire frame. \~
|
||||
\details \ru Строитель NURBS копии каркаса.
|
||||
\en Creator NURBS copies of the wire frame.\n \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbNurbsWireFrameCreator : public MbCreator {
|
||||
private:
|
||||
MbNurbsWireFrameInfo _frameIntoNurbsInfo; ///< \ru Параметры построения NURBS копии каркаса. \en Parameters of the NURBS copies of the wire frame..
|
||||
|
||||
protected:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbNurbsWireFrameCreator( const MbNurbsWireFrameCreator & other, MbRegDuplicate * iReg );
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbNurbsWireFrameCreator( const MbNurbsWireFrameParams & params );
|
||||
|
||||
public:
|
||||
virtual ~MbNurbsWireFrameCreator() {};
|
||||
|
||||
// \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;
|
||||
|
||||
private:
|
||||
MbNurbsWireFrameCreator(); // \ru Не реализовано \en Not implemented
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbNurbsWireFrameCreator )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbsWireFrameCreator )
|
||||
}; // MbNurbsFrameCreator
|
||||
|
||||
#endif // __CR_NURBS_WIREFRAME_H
|
||||
@@ -0,0 +1,78 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Строитель усечения каркаса.
|
||||
\en Trimmed wire frame creator.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_TRIMMED_WIREFRAME_H
|
||||
#define __CR_TRIMMED_WIREFRAME_H
|
||||
|
||||
|
||||
#include <creator.h>
|
||||
#include <templ_dptr.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbTrimmedWireFrameParams;
|
||||
class MbTrimmedWireFrameInfo;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель усечения каркаса.
|
||||
\en Wire frame trimmed creator. \~
|
||||
\details \ru Строитель усечения каркаса.\n
|
||||
\en Wire frame trimmed creator.\n \~
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbTrimmedWireFrameCreator : public MbCreator {
|
||||
private:
|
||||
DPtr<MbTrimmedWireFrameInfo> _trimmedWireFrameInfo; ///< \ru Параметры усечения каркаса. \en Parameters of trimmed the wire frame.
|
||||
MbPrecision _precision; ///< \ru Точность построения объекта. \en The precision of object construction.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbTrimmedWireFrameCreator( const MbTrimmedWireFrameParams & params );
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbTrimmedWireFrameCreator();
|
||||
|
||||
protected:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbTrimmedWireFrameCreator( const MbTrimmedWireFrameCreator & other,
|
||||
MbRegDuplicate * iReg );
|
||||
|
||||
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;
|
||||
|
||||
private:
|
||||
MbTrimmedWireFrameCreator(); // \ru Не реализовано \en Not implemented
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbTrimmedWireFrameCreator )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTrimmedWireFrameCreator )
|
||||
}; // MbTrimmedWireFrameCreator
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbTrimmedWireFrameCreator )
|
||||
|
||||
|
||||
|
||||
#endif // __CR_TRIMMED_WIREFRAME_H
|
||||
@@ -87,8 +87,10 @@ IMPL_PERSISTENT_OPS( MbUnwrapCurveCreator )
|
||||
\result \ru Возвращает строитель.
|
||||
\en Returns the creator. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( UnWrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC( c3d::CreatorSPtr ) CreateUnwrappedCurve( const MbCurvesWrappingParams & parameters,
|
||||
MbResultType & res,
|
||||
c3d::WireFrameSPtr & resWire );
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Строитель развернутой точки.
|
||||
\en Unwrapped point creator.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_UNWRAP_POINT_H
|
||||
#define __CR_UNWRAP_POINT_H
|
||||
|
||||
#include <creator.h>
|
||||
#include <op_curve_parameter.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель развернутой точки.
|
||||
\en Unwrapped point creator. \~
|
||||
\details \ru Строитель развернутой точки.
|
||||
\en Unwrapped point creator. \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbUnWrapPointCreator : public MbCreator {
|
||||
private:
|
||||
MbCurvesWrappingParams _params; ///< \ru Параметры разворачивания. \en Parameters of the unwrapping.
|
||||
|
||||
protected:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbUnWrapPointCreator( const MbUnWrapPointCreator & other, MbRegDuplicate * iReg );
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbUnWrapPointCreator( const MbCurvesWrappingParams & params );
|
||||
|
||||
public:
|
||||
virtual ~MbUnWrapPointCreator() {};
|
||||
|
||||
// \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 wireframe from the history tree.
|
||||
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
|
||||
|
||||
private:
|
||||
MbUnWrapPointCreator(); // \ru Не реализовано \en Not implemented
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbUnWrapPointCreator )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbUnWrapPointCreator )
|
||||
}; // MbUnWrapPointCreator
|
||||
|
||||
#endif // __CR_UNWRAP_POINT_H
|
||||
@@ -0,0 +1,82 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Построение проволочного каркаса без истории.
|
||||
\en Construction of wireframe without history. \~
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_WIREFRAME_CREATOR_H
|
||||
#define __CR_WIREFRAME_CREATOR_H
|
||||
|
||||
|
||||
#include <creator.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель проволочного каркаса без истории.
|
||||
\en Constructor of a wireframe without history. \~
|
||||
\details \ru Строитель проволочного каркаса без истории. \n
|
||||
\en Constructor of a wireframe without history. \n \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbSimpleWireFrameCreator : public MbCreator {
|
||||
public:
|
||||
c3d::WireEdgesSPtrVector _edges; ///< \ru Множество ребер. \en A set of edges.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по данным проволочного каркаса.
|
||||
\en Constructor by wireframe data. \~
|
||||
\param[in] edges - \ru Множество указателей на ребра.
|
||||
\en A set of pointers to edges.
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] same - \ru Признак использования оригиналов данных.
|
||||
\en Flag of using the original data. \~
|
||||
*/
|
||||
MbSimpleWireFrameCreator ( c3d::WireEdgesSPtrVector & edges,
|
||||
const MbSNameMaker & names,
|
||||
bool same );
|
||||
|
||||
private:
|
||||
MbSimpleWireFrameCreator ( const MbSimpleWireFrameCreator &,
|
||||
MbRegDuplicate * iReg ); // \ru Конструктор копирования с регистратором \en Copy-constructor with the registrator
|
||||
public:
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbSimpleWireFrameCreator();
|
||||
/** \ru \name Общие функции строителя проволочного каркаса.
|
||||
\en \name Common functions of the wireframe creator.
|
||||
\{ */
|
||||
MbeCreatorType IsA() const override; // \ru Тип элемента \en Type of element
|
||||
MbCreator & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию \en Create a copy
|
||||
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 a name of object property
|
||||
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
|
||||
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
|
||||
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
|
||||
|
||||
/// \ru Построить проволочный каркас по исходным данным. \en Create a wire-frame from the source data.
|
||||
bool CreateWireFrame( MbWireFrame *&,
|
||||
MbeCopyMode,
|
||||
RPArray<MbSpaceItem> * ) override;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSimpleWireFrameCreator )
|
||||
OBVIOUS_PRIVATE_COPY( MbSimpleWireFrameCreator )
|
||||
};// MbSimpleWireFrameCreator
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbSimpleWireFrameCreator )
|
||||
|
||||
#endif // __CR_WIREFRAME_CREATOR_H
|
||||
@@ -85,8 +85,10 @@ DECLARE_PERSISTENT_CLASS_NEW_DEL( MbWrapCurveCreator )
|
||||
\result \ru Возвращает строитель.
|
||||
\en Returns the creator. \~
|
||||
\ingroup Curve3D_Modeling
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
// ---
|
||||
DEPRECATE_DECLARE_REPLACE( WrapCurve with MbCurvesWrappingResults )
|
||||
MATH_FUNC( c3d::CreatorSPtr ) CreateWrappedCurve( const MbCurvesWrappingParams & parameters,
|
||||
MbResultType & res,
|
||||
c3d::WireFrameSPtr & resWire );
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Строитель свёрнутой точки.
|
||||
\en Wrapped point creator.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CR_WRAP_POINT_H
|
||||
#define __CR_WRAP_POINT_H
|
||||
|
||||
#include <creator.h>
|
||||
#include <op_curve_parameter.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель свёрнутой точки.
|
||||
\en Wrapped point creator. \~
|
||||
\details \ru Строитель свёрнутой точки.
|
||||
\en Wrapped point creator. \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbWrapPointCreator : public MbCreator {
|
||||
private:
|
||||
MbCurvesWrappingParams _params; ///< \ru Параметры cворачивания. \en Parameters of the wrapping.
|
||||
|
||||
protected:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbWrapPointCreator( const MbWrapPointCreator & other, MbRegDuplicate * iReg );
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по параметрам. \en Constructor by parameters.
|
||||
MbWrapPointCreator( const MbCurvesWrappingParams & params );
|
||||
|
||||
public:
|
||||
virtual ~MbWrapPointCreator() {};
|
||||
|
||||
// \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 wireframe from the history tree.
|
||||
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
|
||||
|
||||
private:
|
||||
MbWrapPointCreator(); // \ru Не реализовано \en Not implemented
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbWrapPointCreator )
|
||||
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbWrapPointCreator )
|
||||
}; // MbWrapPointCreator
|
||||
|
||||
#endif // __CR_WRAP_POINT_H
|
||||
+11
-3
@@ -77,6 +77,7 @@ enum MbeCreatorType {
|
||||
ct_PointsCreator = 101, ///< \ru Строитель точечного каркаса. \en Constructor of point-frame. \n
|
||||
|
||||
// \ru Строители кривых. \en Creators of curves.
|
||||
ct_SimpleWireFrameCreator = 200, ///< \ru Строитель каркаса без истории. \en Constructor of wire frame without history.
|
||||
ct_Curve3DCreator = 201, ///< \ru Строитель кривой. \en Constructor of curve.
|
||||
ct_Nurbs3DCreator = 202, ///< \ru Строитель сплайна с сопряжениями. \en Constructor of spline with tangents.
|
||||
ct_SurfaceSplineCreator = 203, ///< \ru Строитель сплайна на поверхности с сопряжениями. \en Constructor of spline on a surface with tangents.
|
||||
@@ -93,6 +94,13 @@ 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
|
||||
|
||||
ct_WireFrameIntoNurbsCreator= 218, ///< \ru Строитель NURBS-кривой по каркасу. \en Constructor of the NURBS-curve by wire frame. \n
|
||||
ct_TrimmedWireFrameCreator = 219, ///< \ru Строитель усечения каркаса. \en Constructor of the trimmed wireframe. \n
|
||||
|
||||
ct_UnwrapPointCreator = 220, ///< \ru Строитель развёрнутой точки. \en Constructor of the unwrapped point. \n
|
||||
ct_WrapPointCreator = 221, ///< \ru Строитель cвёрнутой точки. \en Constructor of the wrapped point. \n
|
||||
|
||||
// \ru Строители полигональных объектов. \en Creators of polygonal objects.
|
||||
ct_SimpleMeshCreator = 400, ///< \ru Строитель полигонального объекта без истории. \en Constructor of a polygonal object without history.
|
||||
@@ -235,7 +243,7 @@ public :
|
||||
\en \name Common functions of the shell creator.
|
||||
\{ */
|
||||
/// \ru Получить регистрационный тип (для копирования, дублирования). \en Get the registration type (for copying, duplication).
|
||||
MbeRefType RefType() const override;
|
||||
MbeRefType RefType() const override;
|
||||
/// \ru Получить тип объекта. \en Get the object type.
|
||||
virtual MbeCreatorType IsA() const = 0;
|
||||
/// \ru Получить групповой тип объекта. \en Get the group type of the object.
|
||||
@@ -519,7 +527,7 @@ public :
|
||||
/// \ru Выдать именователь объекта. \en Get the name-maker.
|
||||
const MbSNameMaker & GetYourNameMaker() const { return *names; }
|
||||
/// \ru Выдать именователь объекта для редактирования. \en Get the object's name-maker for editing.
|
||||
MbSNameMaker & SetYourNameMaker() { return *names; }
|
||||
MbSNameMaker & SetYourNameMaker() { return *names; }
|
||||
/// \ru Установить именователь объекта. \en Set the object's name-maker.
|
||||
void SetNameMaker( const MbSNameMaker & n ) { names->SetNameMaker( n, true ); }
|
||||
|
||||
@@ -528,7 +536,7 @@ public :
|
||||
/// \ru Установить главное имя объекта. \en Set the main name of the object.
|
||||
void SetMainName( SimpleName n ) { names->SetMainName(n); }
|
||||
/// \ru Выдать флаг состояния. \en Get the flag of state.
|
||||
MbeProcessState GetStatus() const { return status; }
|
||||
MbeProcessState GetStatus() const { return status; }
|
||||
/// \ru Установить флаг состояния. \en Set the flag of state.
|
||||
void SetStatus( MbeProcessState l ) { status = l; }
|
||||
|
||||
|
||||
+10
-4
@@ -16,6 +16,7 @@
|
||||
#include <alg_base.h>
|
||||
#include <alg_curve_distance.h>
|
||||
#include <tool_mutex.h>
|
||||
#include <mb_dim_accuracy.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbLine;
|
||||
@@ -73,8 +74,8 @@ protected :
|
||||
\details \ru Вспомогательные данные служат для ускорения работы объекта.
|
||||
\en Auxiliary data are used for fast calculations. \n \~
|
||||
*/
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding rectangle.
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of curve.
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding rectangle.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of curve.
|
||||
|
||||
public :
|
||||
/** \brief \ru Конструктор окружности с параметрами по умолчанию.
|
||||
@@ -522,7 +523,10 @@ public:
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS-copy of the curve
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbCurve * Offset ( double rad ) const override; // \ru Смещение дуги эллипса \en Elliptical arc offset
|
||||
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
|
||||
// \ru Возвращает результат: \en Returning result:
|
||||
@@ -606,10 +610,12 @@ public:
|
||||
initSense не должно быть равным нулю.
|
||||
\en Direction. initSense > 0 - counterclockwise, initSense < 0 - clockwise.
|
||||
initSense can't be equal to zero. \~
|
||||
\param[in] xyEps - \ru Компонента xyEps.x соответствует точности по оси x, xyEps.y - по оси y.
|
||||
\en The xyEps.x component corresponds to x-axis accuracy, xyEps.y corresponds to y-axis accuracy. \~
|
||||
\return \ru Значение угла.
|
||||
\en Value of angle. \~
|
||||
*/
|
||||
void InitByPositionAngles( double a1, double a2, int initSense ); // \ru Инициализация параметров по значениям углов в локальной системе \en Initialization of the parameters by values of angles in the local system
|
||||
void InitByPositionAngles( double a1, double a2, int initSense, const MbDimAccuracy & xyEps = MbDimAccuracy::twoDimRgn ); // \ru Инициализация параметров по значениям углов в локальной системе \en Initialization of the parameters by values of angles in the local system
|
||||
/** \} */
|
||||
/** \ru \name Функции для работы с данными.
|
||||
\en \name Functions for working with data.
|
||||
|
||||
+10
-4
@@ -14,6 +14,7 @@
|
||||
#include <curve3d.h>
|
||||
#include <mb_placement3d.h>
|
||||
#include <mb_cube.h>
|
||||
#include <mb_dim_accuracy.h>
|
||||
|
||||
|
||||
constexpr size_t CONIC_COUNT = 32;
|
||||
@@ -249,7 +250,7 @@ public :
|
||||
|
||||
/** \brief \ru Конструктор дуги эллипса.
|
||||
\en Constructor of an elliptical arc. \~
|
||||
\details \ru Создается дуга эллипса с локальной системой координат и полуосями заданного эллипса.
|
||||
\details \ru Создается дуга эллипса с локальной системой координат и полуосями заданного эллипса c учетом трехмерной точности.
|
||||
t1 и t2 определяют начальный и конечный углы дуги. Углы отсчитываются от оси OX против часовой стрелки.
|
||||
Углы заданы в радианах.
|
||||
Параметр initSense определяет направление дуги. Если initSense > 0, то направление движения против часовой стрелки.
|
||||
@@ -267,8 +268,10 @@ public :
|
||||
initSense не должно быть равным нулю.
|
||||
\en Direction. initSense > 0 - moving counterclockwise, clockwise < 0 - clockwise.
|
||||
'initSense' can't be equal to zero. \~
|
||||
\param[in] xyzEps - \ru Трехмерная точность.
|
||||
\en Three-dimensional accuracy. \~
|
||||
*/
|
||||
MbArc3D( const MbArc3D & init, double t1, double t2, int initSense );
|
||||
MbArc3D( const MbArc3D & init, double t1, double t2, int initSense, const MbDimAccuracy & xyzEps = MbDimAccuracy::threeDimAcc );
|
||||
|
||||
/** \brief \ru Конструктор дуги эллипса.
|
||||
\en Constructor of an elliptical arc. \~
|
||||
@@ -469,7 +472,7 @@ public:
|
||||
|
||||
void Init( const MbArc3D & );
|
||||
void Init( const MbPlacement3D &, double aa, double bb, double angle );
|
||||
void Init( const MbArc3D & init, double t1, double t2, int initSense );
|
||||
void Init( const MbArc3D & init, double t1, double t2, int initSense, const MbDimAccuracy & xyzEps = MbDimAccuracy::threeDimAcc );
|
||||
/// \ru Инициализация окружности или дуги окружности по трем точкам, (n == 0) - окружность или дуга по центру и двум точкам, (n == 1) - окружность или дуга по трем точкам. Возвращает true в случае удачи. \en Initialization of a circular arc by three points; (n == 0) - a circle or an arc by the center and two points, (n == 1) - a circle or an arc by three points. Return true if successful.
|
||||
bool Init( const MbCartPoint3D & p0, const MbCartPoint3D & p1, const MbCartPoint3D & p2, int n, bool closed );
|
||||
/// \ru Инициализация дуги окружности по начальной и конечной точкам и 1/2 угла раствора дуги. Возвращает true в случае удачи. \en Initialization of a circular arc by the starting and the end points and 1/2 of the arc opening angle. Return true if successful.
|
||||
@@ -550,7 +553,10 @@ public:
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS-copy of the curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of the trimmed curve
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину \en Calculate metric length
|
||||
double GetLengthEvaluation() const override;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <cur_polycurve.h>
|
||||
#include <templ_c_array.h>
|
||||
#include <mb_dim_accuracy.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbArc;
|
||||
@@ -309,7 +310,11 @@ public :
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve
|
||||
@@ -441,14 +446,16 @@ public :
|
||||
\en The new curve is created - a part of the Bezier curve between t1 and t2 parameters. \~
|
||||
\param[out] trimPart - \ru Созданная кривая.
|
||||
\en Created curve. \~
|
||||
\param[in] t1 - \ru Параметр начала выделенной части.
|
||||
\en A beginning parameter. \~
|
||||
\param[in] t2 - \ru Параметр конца выделенной части.
|
||||
\en An end parameter. \~
|
||||
\param[in] t1 - \ru Параметр начала выделенной части.
|
||||
\en A beginning parameter. \~
|
||||
\param[in] t2 - \ru Параметр конца выделенной части.
|
||||
\en An end parameter. \~
|
||||
\param[in] xyEps - \ru Компонента xyEps.x соответствует точности по оси x, xyEps.y - по оси y.
|
||||
\en The xyEps.x component corresponds to x-axis accuracy, xyEps.y corresponds to y-axis accuracy. \~
|
||||
\result \ru true - если построение прошло успешно.
|
||||
\en True - if construction has been successfully. \~
|
||||
*/
|
||||
bool Break( MbBezier & trimPart, double t1, double t2 ) const; // \ru Выделить часть \en Break a part
|
||||
bool Break( MbBezier & trimPart, double t1, double t2, const MbDimAccuracy & xyEps = MbDimAccuracy::twoDimAcc ) const; // \ru Выделить часть \en Break a part
|
||||
void SetBezierSplines(); ///< \ru Вычислить параметры кривой-Bezier. \en Calculate parameters of the Bezier curve.
|
||||
int GetFormType() const { return form; } ///< \ru Вернуть форму сплайна. \en Return the spline shape.
|
||||
void SetFormType( int newForm ); ///< \ru Установить форму сплайна. \en Set the spline shape.
|
||||
|
||||
@@ -143,8 +143,11 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую)
|
||||
// \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve)
|
||||
bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
|
||||
|
||||
@@ -51,9 +51,10 @@ private:
|
||||
bool closed; ///< \ru Признак замкнутости кривой. \en An attribute of curve closedness.
|
||||
MbeLocalSystemType coordinateType; ///< \ru Тип системы координат, в которой заданы координатные функции \en Type of coordinate system the functions of coordinates are specified in
|
||||
c3d::DoubleVector specialParams; ///< \ru Перечень параметров особых точек кривой \en List of parameters of curve's singular points
|
||||
|
||||
// \ru Буферные данные для ускорения вычислений. \en Buffer data to speed up computations.
|
||||
mutable double metricLength;
|
||||
mutable MbRect rect;
|
||||
mutable atomic_double metricLength;
|
||||
mutable MbRect rect;
|
||||
|
||||
public:
|
||||
MbCharacterCurve( MbFunction & x, MbFunction & y,
|
||||
@@ -108,7 +109,11 @@ public:
|
||||
size_t GetCount () const override; // \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations.
|
||||
MbNurbs * NurbsCurve ( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
|
||||
MbeState DeletePart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть кривой между параметрами t1 и t2 \en Remove a piece of curve between t1 and t2 parameters
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть кривой между параметрами t1 и t2 \en Keep a piece of curve between t1 and t2 parameters
|
||||
|
||||
|
||||
@@ -229,7 +229,9 @@ public:
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой. \en Creation of a trimmed curve.
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Inverse( MbRegTransform * = nullptr ) override; // \ru Изменить направление. \en Change the direction.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
+72
-12
@@ -78,9 +78,9 @@ protected :
|
||||
bool closed; ///< \ru Признак замкнутости кривой. \en An Attribute of curve closedness.
|
||||
double paramLength; ///< \ru Параметрическая длина контура. \en Parametric length of a contour.
|
||||
protected:
|
||||
mutable double metricLength; ///< \ru Метрическая длина контура. \en Metric length of a contour.
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding box.
|
||||
mutable c3d::DoublePair areaSign; ///< \ru Площадь контура со знаком. \en Contour area with a sign.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина контура. \en Metric length of a contour.
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding box.
|
||||
mutable c3d::AtomicDoublePair areaSign; ///< \ru Площадь контура со знаком. \en Contour area with a sign.
|
||||
|
||||
public :
|
||||
/// \ru Пустой контур. \en Empty contour.
|
||||
@@ -146,11 +146,11 @@ public:
|
||||
void CalculateGabarit ( MbRect & ) const override; // \ru Определить габариты кривой. \en Determine the bounding box of the curve.
|
||||
void CalculateLocalGabarit( const MbMatrix & into, MbRect & local ) const override; // \ru Добавь в прям-к свой габарит с учетом матрицы \en Add bounding box into a box with consideration of the matrix.
|
||||
|
||||
const MbRect & GetGabarit() const { if ( rect.IsEmpty() ) CalculateGabarit( rect ); return rect; }
|
||||
const MbRect & GetCube() const { if ( rect.IsEmpty() ) CalculateGabarit( rect ); return rect; }
|
||||
const MbRect & GetGabarit() const { if ( rect.IsEmpty() ) { MbRect tmp; CalculateGabarit( tmp ); } return rect; }
|
||||
const MbRect & GetCube() const { if ( rect.IsEmpty() ) { MbRect tmp; CalculateGabarit( tmp ); } return rect; }
|
||||
|
||||
/// \ru Сбросить рассчитанный габарит контура. \en Reset the calculated contour bounding box.
|
||||
void SetDirtyGabarit() const { rect.SetEmpty(); }
|
||||
void SetDirtyGabarit() const { ScopedRecursiveLock ll( GetLock() ); rect.SetEmpty(); }
|
||||
/// \ru Копировать габарит контура в контур (использовать только для передачи габарита в копию контура). \en Copy contour bounding box to contour copy (use only to transfer into contour copy).
|
||||
void CopyGabarit( const MbContour & c ) { rect = c.rect; }
|
||||
/// \ru Пуст ли габарит контура? \en Is the contour bounding box empty?
|
||||
@@ -167,7 +167,9 @@ public:
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть контура между параметрами t1 и t2 \en Save a part of the contour between t1 and t2 parameters.
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
/** \} */
|
||||
/** \ru \name Функции описания области определения кривой.
|
||||
@@ -309,8 +311,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.
|
||||
@@ -326,6 +382,7 @@ DEPRECATE_DECLARE_REPLACE( CheckClosed )
|
||||
double DistanceToBorder( const MbCartPoint & pnt, double eps = Math::paramRegion ) const;
|
||||
|
||||
void Trimm( double t1, double t2, bool saveParamLenAndLaw = false ); ///< \ru Выделить часть контура. \en Trim a part of the contour.
|
||||
void Trimm( double t1, double t2, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ); ///< \ru Выделить часть контура c учетом двумерной точности. \en Trim a part of the contour with the given two-dimensional accuracy.
|
||||
|
||||
// \ru Продлить кривую. \en Extend the curve. \~
|
||||
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
|
||||
@@ -597,7 +654,7 @@ DEPRECATE_DECLARE_REPLACE( CheckClosed )
|
||||
template <class CurvesVector>
|
||||
bool GetSegments( CurvesVector & segms ) const; ///< \ru Получить сегменты контура. \en Get contour segments.
|
||||
|
||||
void SetMetricLength( double len ) const { metricLength = len; }
|
||||
void SetMetricLength( double len ) const { ScopedRecursiveLock ll( GetLock() ); metricLength = len; }
|
||||
/// \ru Установить начальную (конечную) точку для замкнутого контура. \en Set the start (end) point for closed contour.
|
||||
bool SetBegEndPoint( double t );
|
||||
/// \ru Заменить сегменты контуры и сегменты полилинии. \en Replace segments of contour and segments of polyline.
|
||||
@@ -707,12 +764,14 @@ MbContour::MbContour( const Curves & initCurves, bool same )
|
||||
, paramLength ( 0.0 )
|
||||
, metricLength( -1.0 )
|
||||
, rect ( )
|
||||
, areaSign ( c3d::DoublePair( -1.0, 0.0 ) )
|
||||
, areaSign ( -1.0, 0.0 )
|
||||
{
|
||||
size_t count = initCurves.size();
|
||||
segments.reserve( count );
|
||||
SPtr<MbCurve> segment;
|
||||
for ( size_t i = 0; i < count; ++i ) {
|
||||
if ( initCurves[i] == nullptr )
|
||||
continue;
|
||||
segment = same ? &const_cast<MbCurve &>( *initCurves[i] ) : &static_cast<MbCurve &>( initCurves[i]->Duplicate() );
|
||||
SegmentsAdd( *segment, false );
|
||||
}
|
||||
@@ -763,16 +822,17 @@ bool MbContour::Init( Curves & curves, bool same )
|
||||
size_t count = curves.size();
|
||||
segments.reserve( count );
|
||||
for ( size_t i = 0; i < count; i++ ) {
|
||||
if ( curves[i] == nullptr )
|
||||
continue;
|
||||
MbCurve * segm = same ? &const_cast<MbCurve &>(*curves[i]) : static_cast<MbCurve *>( &curves[i]->Duplicate() );
|
||||
SegmentsAdd( *segm );
|
||||
}
|
||||
|
||||
CalculateGabarit( rect ); // посчитать габарит
|
||||
CalculateParamLength();
|
||||
CalculateMetricLength();
|
||||
#pragma warning( suppress : 4996 )
|
||||
SetClosed(); // установить признак замкнутости контура
|
||||
res = true;
|
||||
res = segments.size() > 0;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -181,7 +181,10 @@ public:
|
||||
double Curvature( double t ) const override;
|
||||
// \ru Преобразование в NURBS кривую \en Transform to NURBS-curve
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
// \ru Продлить кривую. \en Extend the curve. \~
|
||||
MbResultType Extend( const MbCurveExtensionParameters3D & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
|
||||
@@ -193,8 +196,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
|
||||
|
||||
@@ -92,7 +92,9 @@ public :
|
||||
double Step ( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
double DeviationStep( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
double GetMetricLength() const override; // \ru Вычислить метрическую длину кривой. \en Calculate the metric length of curve.
|
||||
double GetLengthEvaluation() const override; // \ru Оценить метрическую длину кривой. \en Evaluate the metric length of curve.
|
||||
|
||||
@@ -60,9 +60,10 @@ class MATH_CLASS MbContourOnSurface : public MbCurve3D {
|
||||
protected :
|
||||
MbSurface * surface; ///< \ru Указатель на базовую поверхность (всегда не nullptr). \en The pointer to the base surface (this value is never nullptr).
|
||||
MbContour * contour; ///< \ru Указатель на 2D-контур в плоскости параметров поверхности (всегда не nullptr). \en The pointer to 2D-contour in the plane of the surface parameters (this value is never nullptr).
|
||||
mutable double area; ///< \ru Площадь 2D-контура со знаком. \en The area of 2D-contour with sign.
|
||||
|
||||
mutable atomic_double area; ///< \ru Площадь 2D-контура со знаком. \en The area of 2D-contour with sign.
|
||||
mutable MbCube cube; ///< \ru Габаритный куб. \en Bounding box.
|
||||
mutable double metricLength; ///< \ru Метрическая длина. \en The metric length.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина. \en The metric length.
|
||||
mutable MbSegmentsSearchTree * searchTree; ///< \ru Дерево габаритов для ускорения поиска сегментов. \en A tree of bounding boxes for segment search acceleration.
|
||||
|
||||
private:
|
||||
@@ -158,7 +159,9 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override; // \ru Установить параметры NURBS. \en Set the NURBS parameters.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
double Step( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Определить шаг по заданному углу отклонения касательной. \en Determine the step by a given angle of tangent deviation.
|
||||
|
||||
@@ -61,8 +61,9 @@ private :
|
||||
double phase; ///< \ru Начальная фаза в радианах. \en Initial phase in radians.
|
||||
double amplitude; ///< \ru Амплитуда. \en Amplitude.
|
||||
double tmin, tmax; ///< \ru Область определения (по умолчанию - один период). \en Domain (one period by default).
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding box.
|
||||
mutable double metricLength; ///< \ru Метрическая длина. \en The metric length.
|
||||
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding box.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина. \en The metric length.
|
||||
|
||||
public :
|
||||
// \ru Конструктор по амплитуде, начальной фазе и круговой частоте \en Constructor by amplitude, initial phase and angular frequency
|
||||
@@ -131,7 +132,9 @@ public:
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть кривой между параметрами t1 и t2 \en Delete a part of a curve between parameters t1 and t2
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть кривой между параметрами t1 и t2 \en Save a curve part between t1 and t2 parameters
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
void IntersectHorizontal( double y, SArray<double> & cross ) const override; // \ru Пересечение кривой с горизонтальной прямой \en Intersection of curve with the horizontal line
|
||||
void IntersectVertical ( double x, SArray<double> & cross ) const override; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line
|
||||
|
||||
@@ -110,7 +110,10 @@ public :
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
double CalculateLength( double t1, double t2 ) const override;
|
||||
void GetBasisItems( RPArray<MbSpaceItem> & ) override;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
#include <cur_polycurve.h>
|
||||
#include <mb_dim_accuracy.h>
|
||||
|
||||
|
||||
class MbCurveIntoNurbsInfo;
|
||||
@@ -267,8 +268,11 @@ public :
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
*/
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Усечь кривую \en Trim a curve
|
||||
MbCurve * TrimmedBreak( double t1, double t2, int sense ) const; // \ru Усечь кривую с разрывом \en Trim a curve with a break
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
MbCurve * TrimmedBreak( double t1, double t2, int sense, const MbDimAccuracy & xyEps = MbDimAccuracy::twoDimAcc ) const; // \ru Усечь кривую с разрывом \en Trim a curve with a break
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
@@ -282,7 +282,11 @@ public:
|
||||
void Rebuild () override; // \ru Перестроить кривую \en Rebuild the curve
|
||||
void SetClosed( bool cls ) override; // \ru Установить признак замкнутости. \en Set attribute of closedness.
|
||||
bool IsDegenerate( double eps = METRIC_PRECISION ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую \en Create the trimmed curve
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
@@ -355,7 +359,7 @@ public:
|
||||
|
||||
private:
|
||||
// \ru Усечь кривую с разрывом \en Trim a curve with a break
|
||||
MbCurve3D * TrimmedBreak( double t1, double t2, int sense ) const;
|
||||
MbCurve3D * TrimmedBreak( double t1, double t2, int sense, double tRegion ) const;
|
||||
// \ru Найти узел в положительном направлении \en Find a knot in the positive direction
|
||||
void AddKnot( ptrdiff_t &, double &, ptrdiff_t &, double &, ptrdiff_t &, double & ) const;
|
||||
void CheckSpline() const; // \ru Проверить корректность расчета сплайна \en Check correctness of the spline calculation
|
||||
|
||||
@@ -114,7 +114,8 @@ public:
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
|
||||
// \ru Функции спирали \en Functions of spiral
|
||||
|
||||
|
||||
@@ -226,7 +226,9 @@ public :
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть кривой между параметрами t1 и t2 \en Save a curve part between t1 and t2 parameters
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
// \ru Создать NURBS представление кривой \en Create a NURBS representation of the curve
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
@@ -337,7 +339,7 @@ public :
|
||||
double & quota1, double & quota2 ) const;
|
||||
|
||||
private:
|
||||
bool Break( MbHermit & trimPart, double t1, double t2 ) const; // \ru Выделать часть \en Make a part
|
||||
bool Break( MbHermit & trimPart, double t1, double t2, double tRegion = Math::paramEpsilon ) const; // \ru Выделать часть \en Make a part
|
||||
void CheckClosed( double epsilon ); // \ru Проверить и установить признак замкнутости кривой. \en Check and set closedness attribute of curve.
|
||||
bool SetCorrection( size_t ind, double tDelta ); // \ru Скорректировать кривую по индексу. \en Curve correction by index.
|
||||
void CalculateValues( size_t i1, size_t i2 ); // \ru Скорректировать кривую на интервале i1-i2. \en Curve correction on the interval i1-i2.
|
||||
|
||||
@@ -243,7 +243,9 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
bool IsPlanar ( double accuracy = METRIC_EPSILON ) const override; // \ru Является ли кривая плоской \en Whether a curve is planar.
|
||||
bool IsStraight( bool ignoreParams = false ) const override; // \ru Признак прямолинейности кривой \en An attribute of curve straightness
|
||||
@@ -315,7 +317,7 @@ public :
|
||||
bool DerivativesCorrection( double accuracy );
|
||||
|
||||
private:
|
||||
bool Break( MbHermit3D & trimPart, double t1, double t2 ) const; // \ru Разбить на две части \en Split into two parts
|
||||
bool Break( MbHermit3D & trimPart, double t1, double t2, double tRegion ) const; // \ru Разбить на две части \en Split into two parts
|
||||
bool SetCorrection( size_t ind, double tDelta ); // \ru Скорректировать кривую по индексу. \en Curve correction by index.
|
||||
void CalculateValues( size_t i1, size_t i2 ); // \ru Скорректировать кривую на интервале i1-i2. \en Curve correction on the interval i1-i2.
|
||||
|
||||
|
||||
@@ -142,7 +142,9 @@ public :
|
||||
|
||||
// \ru Оставить часть прямой между параметрами t1 и t2 \en Save a part of the line between t1 and t2 parameters
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
bool HasLength( double & ) const override; // \ru Метрическая длина \en The metric length
|
||||
double GetMetricLength() const override; // \ru Метрическая длина кривой \en Metric length of a curve
|
||||
|
||||
@@ -93,7 +93,10 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
// \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
|
||||
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
|
||||
VERSION version = Math::DefaultMathVersion() ) const override;
|
||||
|
||||
@@ -158,7 +158,9 @@ public :
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление кривой \en Change direction of a curve
|
||||
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение отрезка \en Shift of a line segment
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
|
||||
@@ -99,7 +99,10 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
double CalculateMetricLength() const override; // \ru Метрическая длина кривой \en Metric length of a curve
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <mb_homogeneous.h>
|
||||
#include <mb_nurbs_function.h>
|
||||
#include <mb_point_mating.h>
|
||||
#include <cur_nurbs_vector.h> // BUG_22943, VASE2.SAT
|
||||
#include <cur_polycurve.h>
|
||||
#include <alg_base.h>
|
||||
#include <vector>
|
||||
@@ -764,7 +763,9 @@ public :
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & tParameters ) const override; // \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve.
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
void Refresh() override; // \ru Сбросить все временные данные. \en Reset all temporary data.
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменение направления кривой на противоположное. \en Set the opposite direction of curve.
|
||||
@@ -1025,7 +1026,7 @@ private: // \ru Системные методы. \en System methods.
|
||||
void SetClamped(); // \ru Делаем зажатый узловой вектор. \en Set clamped knots vector.
|
||||
|
||||
void ResetCache(); // \ru Очистить кэш главного потока, сбросить остальные кэши. \en Clear main thread cache, reset other caches.
|
||||
bool NurbsPlus( MbNurbs & nurbs, double tin, double tax ) const;
|
||||
bool NurbsPlus( MbNurbs & nurbs, double tin, double tax, double tRegion ) const;
|
||||
|
||||
// \ru Расчет весовых функций и их первых производных. \en Calculation of weight functions and its first derivatives.
|
||||
ptrdiff_t WeightFunctions( double & x, CcArray<double> & ) const;
|
||||
|
||||
@@ -526,8 +526,10 @@ public:
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
double GetRadius( double accuracy = METRIC_REGION ) const override; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible.
|
||||
bool GetCircleAxis ( MbAxis3D & ) const override; // \ru Дать ось кривой \en Get the axis of the curve
|
||||
// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую). \en Get a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve)
|
||||
|
||||
@@ -51,8 +51,8 @@ protected :
|
||||
double deltaTmax; ///< \ru Увеличение tmax параметра базовой кривой. \en Increase of tmax of base curve parameter.
|
||||
MbMatrix transform; ///< \ru Матрица преобразования (используется при разных масштабных коэффициентах трансформации). \en A transformation matrix (is used for different scale transformation).
|
||||
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник \en Bounding box
|
||||
mutable double metricLength; ///< \ru Метрическая длина \en The metric length
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник \en Bounding box
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина \en The metric length
|
||||
|
||||
public :
|
||||
MbOffsetCurve( const MbCurve & bc, double dist, double t1, double t2, bool same );
|
||||
@@ -205,7 +205,9 @@ public :
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть смещенной кривой между параметрами t1 и t2 \en Save a part of a offset curve between t1 and t2 parameters
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
|
||||
@@ -101,7 +101,9 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve
|
||||
|
||||
@@ -136,7 +136,9 @@ public :
|
||||
bool HasLength( double & length ) const override;
|
||||
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение отрезка \en Shift of a line segment
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
|
||||
@@ -36,8 +36,9 @@ protected :
|
||||
SArray<MbCartPoint> pointList; ///< \ru Множество контрольных точек. \en Set of control points.
|
||||
ptrdiff_t uppIndex; ///< \ru Количество участков кривой (равно количество контрольных точек минус единица). \en Count of curve pieces (is equal to count of control points minus one).
|
||||
bool closed; ///< \ru Признак замкнутости кривой. \en An attribute of curve closedness.
|
||||
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник. \en Bounding rectangle.
|
||||
mutable double metricLength; ///< \ru Метрическая длина сплайна. \en Metric length of a spline.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина сплайна. \en Metric length of a spline.
|
||||
|
||||
protected:
|
||||
MbPolyCurve(); ///< \ru Конструктор по умолчанию. \en Default constructor.
|
||||
|
||||
@@ -31,8 +31,9 @@ protected :
|
||||
ptrdiff_t uppIndex; ///< \ru Количество участков кривой (равно количество контрольных точек минус единица). \en Count of curve pieces (is equal to count of control points minus one).
|
||||
SArray<MbCartPoint3D> pointList; ///< \ru Множество контрольных точек. \en Set of control points.
|
||||
bool closed; ///< \ru Признак замкнутости кривой. \en An attribute of curve closedness.
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of curve.
|
||||
mutable double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of a curve.
|
||||
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of curve.
|
||||
mutable atomic_double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of a curve.
|
||||
mutable MbCube cube; ///< \ru Габаритный куб кривой. \en Bounding box of curve.
|
||||
|
||||
protected:
|
||||
|
||||
@@ -181,8 +181,9 @@ public :
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculation of step of approximation
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага аппроксимации по угловой толерантности \en Calculation of step of approximation by angular tolerance
|
||||
|
||||
@@ -127,7 +127,10 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Trimm( SArray<MbCartPoint3D> & points, double t1, double t2, double eps = METRIC_EPSILON ) const;
|
||||
|
||||
double GetTMin() const override; // \ru Вернуть минимальное значение параметра. \en Get the minimum value of the parameter.
|
||||
|
||||
@@ -66,9 +66,9 @@ private :
|
||||
///< \en Matrix for transrorming the surface curve (from spaceCurve) to the 'surface' coordinate system.
|
||||
uint8 projProp; ///< \ru Параметры кривой. \en Curves parameters.
|
||||
|
||||
mutable MbRect rect; ///< \ru Габарит проекционной кривой в параметрическом пространстве поверхности. \en Bounding box of projection curve in parametric space of surface.
|
||||
mutable double metricLength; ///< \ru Метрическая длина проекционной кривой. \en Metric length of the projection curve.
|
||||
mutable double tMiddle; ///< \ru Параметр на кривой, соответствующий метрической середине кривой. \en Parameter on the curve corresponding to the metric middle of the curve.
|
||||
mutable MbRect rect; ///< \ru Габарит проекционной кривой в параметрическом пространстве поверхности. \en Bounding box of projection curve in parametric space of surface.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина проекционной кривой. \en Metric length of the projection curve.
|
||||
mutable atomic_double tMiddle; ///< \ru Параметр на кривой, соответствующий метрической середине кривой. \en Parameter on the curve corresponding to the metric middle of the curve.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Вспомогательные данные.
|
||||
@@ -271,8 +271,10 @@ public :
|
||||
|
||||
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of step of approximation with consideration of curvature radius
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага аппроксимации с учетом угла отклонения \en Calculation of step of approximation with consideration of angle of deviation
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
// \ru Построить усеченную кривую. \en Construct a trimmed curve.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
const MbCurve3D & GetSpaceCurve() const { return *spaceCurve; }
|
||||
const MbSurface & GetSurface () const { return *surface; }
|
||||
|
||||
@@ -98,8 +98,11 @@ public :
|
||||
bool IsSame( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const override;
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение усеченной кривой \en Shift of a trimmed curve
|
||||
MbPlaneItem & Duplicate( MbRegDuplicate * = nullptr ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbContour * NurbsContour() const override; // \ru Построить контур \en Create a contour
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbContour * NurbsContour() const override; // \ru Построить контур \en Create a contour
|
||||
void AddYourGabaritTo( MbRect & ) const override; // \ru Добавь свой габарит в прямой прям-к \en Add your own gabarit into the given bounding rectangle
|
||||
void CalculateGabarit( MbRect & ) const override; // \ru Определить габариты кривой \en Determine the bounding box of a curve
|
||||
bool IsVisibleInRect( const MbRect &, bool exact = false ) const override; // \ru Виден ли объект в заданном прямоугольнике \en Whether the object is visible in the given rectangle
|
||||
|
||||
@@ -133,7 +133,10 @@ public :
|
||||
const MbFunction * GetFunction() const { return repFunction; } // \ru Получить функцию. \en Get function
|
||||
const MbCurve3D & GetBasisCurve() const override;
|
||||
MbCurve3D & SetBasisCurve() override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
|
||||
@@ -137,8 +137,10 @@ public:
|
||||
// \ru Тип проецирования. \en Projection type.
|
||||
bool IsPerspective() const { return perspective; }
|
||||
|
||||
// \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
// \ru Дать плоскую проекцию кривой(локальная система координат, шаг, параметрическая область). \en Get the planar projection of a curve (local coordinate system, step, parametric region).
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
@@ -36,7 +36,7 @@ protected:
|
||||
\details \ru Метрическая длина кривой, рассчитывается только при запросе длины объекта. Метрическая длина кривой в конструкторе кривой и после модификации кривой принимает отрицательное значение.
|
||||
\en Metric length of a curve is calculated only at the request. Metric length of a curve is undefined (negative) after object constructor and after object modifications. \n \~
|
||||
*/
|
||||
mutable double metricLength;
|
||||
mutable atomic_double metricLength;
|
||||
/** \brief \ru Габаритный куб кривой.
|
||||
\en Bounding box of a curve. \~
|
||||
\details \ru Габаритный куб кривой, рассчитывается только при запросе габарита объекта. Габаритный куб в конструкторе кривой и после модификации кривой принимает неопределенное значение.
|
||||
|
||||
@@ -75,11 +75,12 @@ 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 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.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of the curve. \~
|
||||
mutable atomic_double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of the curve.
|
||||
mutable MbCartPoint3D weightCenter; ///< \ru Центр тяжести кривой. \en Center of mass of the curve.
|
||||
mutable atomic_double curveRadius; ///< \ru Радиус кривой, если она является дугой окружности в пространстве. \en The radius of the curve, if the curve is a spatial arc.
|
||||
mutable c3d::AtomicDoublePair radiusAccuracy; ///< \ru Точности вычисления curveRadius. \en The precisions for the calculation of curveRadius.
|
||||
mutable atomic_enum_type<ThreeStates> isStraight; ///< \ru Флаг прямолинейности. \en A straightness flag.
|
||||
SPtr<MbCurveTessellation> tessellation; ///< \ru Разбивка кривой. \en Curve tessellation.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -182,7 +183,9 @@ public:
|
||||
// \ru Установить параметры NURBS. \en Set parameters of NURBS.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
// \ru Вычислить ближайшую проекцию точки на кривую. \en Calculate the nearest projection of a point onto the curve.
|
||||
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override;
|
||||
@@ -362,6 +365,10 @@ protected:
|
||||
*/
|
||||
void CacheReset();
|
||||
|
||||
double CalcMetricLength( bool force = false ) const; // \ru Вычислить метрическую длину кривой. \en Calculate the metric length of a curve.
|
||||
double CalcLengthEvaluation( bool force = false ) const; // \ru Оценить метрическую длину кривой. \en Estimate the metric length of a curve.
|
||||
void CalcWeightCentre( MbCartPoint3D & wc, bool force = false ) const; // \ru Выдать центр тяжести кривой. \en Get center of mass of curve.
|
||||
|
||||
private:
|
||||
// \ru Объявить оператор приравнивания по ссылке, \en Declare operator of assignment by reference
|
||||
// \ru чтобы не был вызван по умолчанию оператор приравнивания по значению \en To prevent default calling of the assignment operator by value
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <array>
|
||||
#include <tool_multithreading.h>
|
||||
#include <templ_sptr.h>
|
||||
#include <system_atomic.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbMatrix;
|
||||
@@ -141,16 +142,16 @@ private :
|
||||
MbSurfaceCurve curveTwo; ///< \ru Кривая на второй поверхности. \en Curve on the second surface.
|
||||
MbeCurveBuildType buildType; ///< \ru Тип кривой по построению. \en A curve type by construction.
|
||||
|
||||
mutable MbeCurveGlueType glueType; ///< \ru Тип кривой по топологии. \en A curve type by topology.
|
||||
mutable double tolerance; ///< \ru Погрешность построения кривой. \en The tolerance of curve construction. \~
|
||||
mutable atomic_enum_type<MbeCurveGlueType> glueType; ///< \ru Тип кривой по топологии. \en A curve type by topology.
|
||||
mutable atomic_double tolerance; ///< \ru Погрешность построения кривой. \en The tolerance of curve construction. \~
|
||||
mutable MbCube cube; ///< \ru Габаритный куб кривой. \en Bounding box of a curve. \~
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of a curve. \~
|
||||
mutable double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of a 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 atomic_double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of a curve. \~
|
||||
mutable atomic_double lengthEvaluation; ///< \ru Оценочная длина кривой. \en Estimated length of a curve. \~
|
||||
mutable atomic_double curveRadius; ///< \ru Радиус кривой, если она является дугой окружности в пространстве. \en The radius of the curve, if the curve is a spatial arc.
|
||||
mutable c3d::AtomicDoublePair radiusAccuracy; ///< \ru Точности вычисления curveRadius. \en The precisions for the calculation of curveRadius.
|
||||
|
||||
#ifdef C3D_SIGNAL_ENABLED
|
||||
mutable bool inChange; ///< \ru Указывает на нахождение в процессе изменений. \en Indicates to being in the process of changes.
|
||||
mutable atomic_bool inChange; ///< \ru Указывает на нахождение в процессе изменений. \en Indicates to being in the process of changes.
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -407,7 +408,9 @@ public:
|
||||
// \ru Преобразовать в NURBS кривую. \en Transform to a NURBS-curve.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
/// \ru Создать усеченную кривую на тех же поверхностях. \en Create a trimmed curve on the same surfaces.
|
||||
MbSurfaceIntersectionCurve * TrimmedIntersection( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const;
|
||||
@@ -479,7 +482,7 @@ public:
|
||||
bool IsSpaceSame( const MbSpaceItem & item, double eps = METRIC_REGION ) const override;
|
||||
|
||||
/// \ru Получить тип кривой по топологии. \en Get a curve type by topology.
|
||||
MbeCurveGlueType GetGlueType() const { return glueType; }
|
||||
MbeCurveGlueType GetGlueType() const { return glueType(); }
|
||||
/// \ru Установить тип кривой по топологии. \en Set a curve type by topology.
|
||||
void SetGlueType( MbeCurveGlueType type ) { glueType = type; }
|
||||
/// \ru Установить тип кривой по топологии. \en Set a curve type by topology.
|
||||
@@ -804,11 +807,11 @@ inline bool MbSurfaceIntersectionCurve::CopyReadyMutable( const MbSurfaceInterse
|
||||
bool changed = false;
|
||||
|
||||
if ( lengthEvaluation < 0.0 && s.lengthEvaluation >= 0.0 ) {
|
||||
lengthEvaluation = s.lengthEvaluation;
|
||||
lengthEvaluation = s.lengthEvaluation.load();
|
||||
changed = true;
|
||||
}
|
||||
if ( metricLength < 0.0 && s.metricLength >= 0.0 ) {
|
||||
metricLength = s.metricLength;
|
||||
metricLength = s.metricLength.load();
|
||||
changed = true;
|
||||
}
|
||||
if ( cube.IsEmpty() && !s.cube.IsEmpty() ) {
|
||||
|
||||
@@ -50,8 +50,8 @@ protected :
|
||||
///< \ru Если (sense < 0), то (trim2 < trim1) \en If (sense < 0), then (trim2 < trim1)
|
||||
///< \ru Равенство trim1 и trim2 не допускается \en Equality of 'trim1' and 'trim2' isn't allowed
|
||||
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник \en Bounding rectangle
|
||||
mutable double metricLength; ///< \ru Метрическая длина усеченной кривой \en Metric length of a trimmed curve
|
||||
mutable MbRect rect; ///< \ru Габаритный прямоугольник \en Bounding rectangle
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина усеченной кривой \en Metric length of a trimmed curve
|
||||
|
||||
protected :
|
||||
MbTrimmedCurve( const MbTrimmedCurve & initCurve );
|
||||
@@ -170,7 +170,10 @@ public :
|
||||
bool GetSpecificPoint( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const override;
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть усеченной кривой между параметрами t1 и t2 \en Delete a part of a trimmed curve between parameters t1 and t2
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть усеченной кривой между параметрами t1 и t2 \en Keep a part of the trimmed curve between parameters t1 and t2
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Построить усеченную кривую c учетом заданной двумерной точности. \en Construct a trimmed curve with the given two-dimensional accuracy.
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve::Trimmed; // \ru Метод базового класса MbCurve без учета двумерной точности. Точность по умолчанию - MbDimAccuracy::twoDimAcc. \en Method of MbCurve base class without two-dimensional accuracy. The default accuracy is MbDimAccuracy::twoDimAcc.
|
||||
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение усеченной кривой \en Shift of a trimmed curve
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
#include <curve3d.h>
|
||||
#include <mb_dim_accuracy.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -41,10 +42,10 @@ private :
|
||||
double trim2; ///< \ru Параметр конечной точки базовой кривой. \en Parameter of the end point of base curve.
|
||||
int sense; ///< \ru Флаг совпадения направления с направлением базовой кривой. \en Flag of coincidence of the direction with the direction of base curve.
|
||||
private:
|
||||
mutable double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of a curve.
|
||||
mutable atomic_double metricLength; ///< \ru Метрическая длина кривой. \en Metric length of a curve.
|
||||
|
||||
public :
|
||||
MbTrimmedCurve3D( const MbCurve3D & initCurve, double t1, double t2, int initSense, bool same );
|
||||
MbTrimmedCurve3D( const MbCurve3D & initCurve, double t1, double t2, int initSense, bool same, const MbDimAccuracy & xyzEps = MbDimAccuracy::threeDimAcc );
|
||||
MbTrimmedCurve3D( const MbCurve3D & initCurve, const MbCartPoint3D & p0, const MbCartPoint3D & p1 );
|
||||
protected :
|
||||
MbTrimmedCurve3D( const MbTrimmedCurve3D &, MbRegDuplicate * );
|
||||
@@ -102,7 +103,10 @@ public :
|
||||
|
||||
const MbCurve3D & GetBasisCurve() const override;
|
||||
MbCurve3D & SetBasisCurve() override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
|
||||
// \ru Построить усеченную кривую c учетом заданной трехмерной точности. \en Construct a trimmed curve with the given three-dimensional accuracy.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const override;
|
||||
using MbCurve3D::Trimmed; // \ru Метод базового класса MbCurve3D без учета трехмерной точности. Точность по умолчанию - MbDimAccuracy::threeDimAcc. \en Method of MbCurve3D base class without three-dimensional accuracy. The default accuracy is MbDimAccuracy::threeDimAcc.
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
double Curvature ( double ) const override; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve
|
||||
@@ -125,7 +129,7 @@ public :
|
||||
double GetMetricLength() const override; // \ru Метрическая длина \en Metric length
|
||||
|
||||
void SetBasisCurve( MbCurve3D & ); // \ru Заменить плоскую кривую \en Replace the planar curve
|
||||
void InitParam( double t1, double t2, int initSense );
|
||||
void InitParam( double t1, double t2, int initSense, const MbDimAccuracy & xyzEps = MbDimAccuracy::threeDimAcc );
|
||||
double GetTrim1() const { return trim1; }
|
||||
double GetTrim2() const { return trim2; }
|
||||
int GetSense() const { return sense; } // \ru Флаг совпадения направления с направлением базовой кривой \en Flag of coincidence of the direction with the direction of base curve
|
||||
|
||||
+66
-4
@@ -35,6 +35,7 @@ class MATH_CLASS MbContour;
|
||||
class MATH_CLASS MbPolygon;
|
||||
class MATH_CLASS MbCrossPoint;
|
||||
class MATH_CLASS MbCurveExtensionParameters;
|
||||
class MATH_CLASS MbDimAccuracy;
|
||||
class MbCurveIntoNurbsInfo;
|
||||
struct MbNurbsParameters;
|
||||
|
||||
@@ -698,7 +699,57 @@ public :
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
*/
|
||||
virtual MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const = 0;
|
||||
virtual MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const;
|
||||
|
||||
/** \brief \ru Построить усеченную кривую c учетом заданной двумерной точности.
|
||||
\en Construct a trimmed curve with the given two-dimensional accuracy. \~
|
||||
\details \ru Строит усеченную кривую c учетом заданной двумерной точности на плоскости,
|
||||
начало которой соответствует точке с параметром t1 и конец - точке с параметром t2.
|
||||
Можно изменить направление полученной кривой относительно исходной с помощью параметра sense.
|
||||
Если кривая замкнута, можно получить усеченную кривую, проходящую через
|
||||
начало кривой.\n
|
||||
В случае замкнутой кривой (или для дуги - исключение) три параметра sense, t1 и t2 однозначно
|
||||
определяют результат.
|
||||
В случае разомкнутой кривой параметр sense и параметрами усечения должны соответствовать друг другу:\n
|
||||
1) если sense == 1, то t1 < t2,\n
|
||||
2) если sense == -1, то t1 > t2.\n
|
||||
Если есть несоответствие между sense и параметрами усечения, то
|
||||
приоритетным параметром считается sense.
|
||||
Если параметры t1 и t2 равны и кривая замкнута, в результате должны получить замкнутую кривую.
|
||||
\en Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and
|
||||
an end point corresponds to a point with parameter t2.
|
||||
Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'.
|
||||
If the curve is closed, then there may be obtained a trimmed curve, passing through
|
||||
the start of a curve.\n
|
||||
In a case of closed curve (or for an arc - exception) three parameters 'sense', t1 and t2 clearly
|
||||
define the result.
|
||||
In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:\n
|
||||
1) if sense == 1, then t1 < t2,\n
|
||||
2) if sense == -1, then t1 > t2,\n
|
||||
If there is a discrepancy between 'sense' and parameters of trimming, then
|
||||
'sense' parameter has higher priority.
|
||||
If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained. \~
|
||||
\param[in] t1 - \ru Параметр, соответствующий началу усеченной кривой.
|
||||
\en Parameter corresponding to start of a trimmed curve. \~
|
||||
\param[in] t2 - \ru Параметр, соответствующий концу усеченной кривой.
|
||||
\en Parameter corresponding to end of a trimmed curve. \~
|
||||
\param[in] sense - \ru Направление усеченной кривой относительно исходной.\n
|
||||
sense = 1 - направление кривой сохраняется.
|
||||
sense = -1 - направление кривой меняется на обратное.
|
||||
\en Direction of a trimmed curve in relation to an initial curve.
|
||||
sense = 1 - direction does not change.
|
||||
sense = -1 - direction changes to the opposite value. \~
|
||||
\param[in] xyEps - \ru Двумерная точность.
|
||||
\en Two-dimensional accuracy. \~
|
||||
\param[in] saveParLenAndLaw - \ru Сохранять параметрическую длину и закон.
|
||||
\en Save parametric length and law. \~
|
||||
\internal \ru При изменении поведения или документации метода переделать юнит-тестирование.
|
||||
\en When changing of the behavior or the documentation of the method being performed, the unit-testing should be redone. \~ \endinternal
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
virtual MbCurve * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyEps, bool saveParamLenAndLaw ) const = 0;
|
||||
|
||||
/// \ru Аппроксимировать кривую контуром из NURBS-кривых. \en Approximate of a curve by the contour from NURBS curves.
|
||||
virtual MbContour * NurbsContour() const;
|
||||
@@ -809,8 +860,17 @@ public :
|
||||
/// \ru Положение точки относительно кривой. \en The point position relative to the curve.
|
||||
virtual MbeLocation PointLocation( const MbCartPoint & pnt, double eps = Math::LengthEps ) const;
|
||||
|
||||
|
||||
/// \ru Найти проекцию точки на кривую. \en Find the point projection to the curve.
|
||||
/** \brief \ru Вычислить проекцию точки на кривую.
|
||||
\en Calculate the point projection to the curve. \~
|
||||
\details \ru Вычислить параметр кривой, соответствующий проекции заданной точки на эту кривую. \n
|
||||
Эта функция не допускает выхода параметра за параметрическую область определения незамкнутой кривой в отличие от функции #NearPointProjection.
|
||||
\en Calculate the parameter of the curve corresponding to the projection of the given point on this curve. \n
|
||||
This function does not allow the parameter to go beyond the parametric domain of the definition of an unclosed curve, unlike the #NearPointProjection function. \~
|
||||
\param[in] pnt - \ru Заданная точка.
|
||||
\en A given point. \~
|
||||
\result \ru Найденный параметр проекции точки на кривую.
|
||||
\en The found parameter for the projection of a point onto the curve. \~
|
||||
*/
|
||||
virtual double PointProjection( const MbCartPoint & pnt ) const;
|
||||
|
||||
/** \brief \ru Найти проекцию точки на кривую.
|
||||
@@ -1281,7 +1341,9 @@ public :
|
||||
/// \ru Вернуть минимально различимую величину параметра с заданной точностью. \en Return the minimal discernible value of parameter with the given tolerance.
|
||||
virtual double GetTRegion ( double epsilon ) const;
|
||||
/// \ru Вернуть минимально различимую величину параметра с заданной точностью в зависимости от параметра. \en Return the minimal discernible value of parameter with the given tolerance according to parameter.
|
||||
virtual double GetTRegion ( double t, double epsilon ) const;
|
||||
virtual double GetTRegion ( double t, double epsilon ) const;
|
||||
/// \ru Вернуть минимально различимую величину параметра с заданной двумерной точностью в зависимости от параметра. Метод учитывает направление кривой в точке. \en Return the minimal discernible value of parameter with the given two-dimensinal accuracy according to parameter. The method takes into account the direction of the curve at a point.
|
||||
virtual double GetTRegion( double t, const MbDimAccuracy & xyEps ) const;
|
||||
|
||||
/// \ru Вернуть середину параметрического диапазона кривой. \en Return the middle of parametric range of a curve.
|
||||
double GetTMid() const { return ((GetTMin() + GetTMax()) * 0.5); }
|
||||
|
||||
+54
-1
@@ -37,6 +37,7 @@ class MATH_CLASS MbPolygon3D;
|
||||
class MATH_CLASS MbNurbs3D;
|
||||
class MATH_CLASS MbPlacement3D;
|
||||
class MATH_CLASS MbCurveExtensionParameters3D;
|
||||
class MATH_CLASS MbDimAccuracy;
|
||||
class MbCurveIntoNurbsInfo;
|
||||
struct MbNurbsParameters;
|
||||
|
||||
@@ -557,7 +558,56 @@ public :
|
||||
\en A constructed trimmed curve. \~
|
||||
\ingroup Curves_3D
|
||||
*/
|
||||
virtual MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const; // \ru Создание усеченной кривой. \en Creation of trimmed curve.
|
||||
virtual MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const;
|
||||
|
||||
/** \brief \ru Построить усеченную кривую c учетом заданной трехмерной точности.
|
||||
\en Construct a trimmed curve with the given two-dimensional accuracy. \~
|
||||
\details \ru Строит усеченную кривую c учетом заданной трехмерной точности,
|
||||
начало которой соответствует точке с параметром t1 и конец - точке с параметром t2.
|
||||
Можно изменить направление полученной кривой относительно исходной с помощью параметра sense.
|
||||
Если кривая замкнута, можно получить усеченную кривую, проходящую через
|
||||
начало кривой.\n
|
||||
В случае замкнутой или периодической кривой три параметра sense, t1 и t2 однозначно
|
||||
определяют результат.
|
||||
В случае разомкнутой кривой параметр sense и параметрами усечения должны соответствовать друг другу:\n
|
||||
1) если sense == 1, то t1 < t2,\n
|
||||
2) если sense == -1, то t1 > t2.\n
|
||||
Если есть несоответствие между sense и параметрами усечения, то
|
||||
приоритетным параметром считается sense.
|
||||
Если параметры t1 и t2 равны и кривая замкнута, в результате должны получить замкнутую кривую.
|
||||
\en Constructs a trimmed curve, a start point of which corresponds to a point with parameter t1 and
|
||||
an end point corresponds to a point with parameter t2.
|
||||
Direction of the constructed curve relative to the initial curve may be changed by the parameter 'sense'.
|
||||
If the curve is closed, then there may be obtained a trimmed curve, passing through
|
||||
the start of a curve.\n
|
||||
In a case of closed or periodic curve three parameters 'sense', t1 and t2 clearly
|
||||
define the result.
|
||||
In a case of unclosed curve the parameter 'sense' and parameter of trimming should correspond each other:\n
|
||||
1) if sense == 1, then t1 < t2,\n
|
||||
2) if sense == -1, then t1 > t2,\n
|
||||
If there is a discrepancy between 'sense' and parameters of trimming, then
|
||||
'sense' parameter has higher priority.
|
||||
If parameters t1 and t2 are equal and the curve is closed, then in result a closed curve should be obtained. \~
|
||||
\param[in] t1 - \ru Параметр, соответствующий началу усеченной кривой.
|
||||
\en Parameter corresponding to start of a trimmed curve. \~
|
||||
\param[in] t2 - \ru Параметр, соответствующий концу усеченной кривой.
|
||||
\en Parameter corresponding to end of a trimmed curve. \~
|
||||
\param[in] sense - \ru Направление усеченной кривой относительно исходной.\n
|
||||
sense = 1 - направление кривой сохраняется.
|
||||
sense = -1 - направление кривой меняется на обратное.
|
||||
\en Direction of a trimmed curve in relation to an initial curve.
|
||||
sense = 1 - direction does not change.
|
||||
sense = -1 - direction changes to the opposite value. \~
|
||||
\param[in] xyzEps - \ru Трехмерная точность.
|
||||
\en Three-dimensional accuracy. \~
|
||||
\param[in] saveParLenAndLaw - \ru Сохранять параметрическую длину и закон.
|
||||
\en Save parametric length and law. \~
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
\ingroup Curves_3D
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
virtual MbCurve3D * Trimmed( double t1, double t2, int sense, const MbDimAccuracy & xyzEps, bool saveParamLenAndLaw ) const;
|
||||
|
||||
/// \ru Вернуть параметрическую длину кривой. \en Return the parametric length of a curve.
|
||||
double GetParamLength () const { return GetTMax() - GetTMin(); }
|
||||
@@ -1046,6 +1096,9 @@ public :
|
||||
double GetTRegion() const;
|
||||
/// \ru Дать минимально различимую величину параметра. \en Get the minimum distinguishable value of parameter.
|
||||
double GetTRegion( double t ) const;
|
||||
/// \ru Дать минимально различимую величину параметра с заданной трехмерной точностью в зависимости от параметра. \en Get the minimum distinguishable value of parameter with the given three-dimensional accuracy according to parameter.
|
||||
double GetTRegion( double t, const MbDimAccuracy & xyzEps ) const;
|
||||
|
||||
|
||||
// \ru Геометрия подложки тождественна геометрии кривой, но отлична параметризация. \en The geometry of the a substrate is identical to the geometry of a curve, but parameterization differs.
|
||||
/// \ru Выдать подложку или себя. \en Get a substrate or itself.
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <function.h>
|
||||
#include <templ_s_array.h>
|
||||
#include <mb_nurbs_function.h>
|
||||
#include <cur_nurbs_vector.h>
|
||||
#include <tool_multithreading.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <templ_s_array.h>
|
||||
#include <math_define.h>
|
||||
#include <mb_operation_result.h>
|
||||
#include <tool_mutex.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbFunction;
|
||||
|
||||
+18
-5
@@ -2215,19 +2215,32 @@ GCE_FUNC(constraint_item) GCE_AddFixVariable( GCE_system, var_item );
|
||||
//---
|
||||
GCE_FUNC(constraint_item) GCE_AddIncidence( GCE_system, geom_item, geom_item );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// The data structure is deprecated.
|
||||
//---
|
||||
struct GCE_CLASS geom_point
|
||||
{
|
||||
geom_item geom;
|
||||
point_type pntName;
|
||||
geom_point() : geom( GCE_NULL ), pntName( GCE_IMPROPER_POINT ) {}
|
||||
geom_point( geom_item g, point_type pnt ) : geom( g ), pntName( pnt ) {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/**
|
||||
\attention
|
||||
\ru Устаревшая функция. Вызов будет удален в одной из следующих версий.
|
||||
\ru Устаревшая функция. Вызов будет удален в 2023.
|
||||
Используйте #GCE_PrepareMovingOfPoint( GCE_system gSys, const std::vector<GCE_dragging_point> & cPntArr, GCE_point curXY )
|
||||
взамен.
|
||||
\en An obsolete function. The call will be removed in one of the next versions.
|
||||
\en An obsolete function. The call will be removed in 2023.
|
||||
Use GCE_PrepareDraggingPoint( GCE_system gSys, const std::vector<GCE_dragging_point> & cPntArr, GCE_point curXY ) instead of this. \~
|
||||
*/
|
||||
//---
|
||||
GCE_FUNC(GCE_result) GCE_PrepareMovingOfPoint( GCE_system gSys
|
||||
, const std::vector<geom_point> & cPntArr
|
||||
, GCE_point curXY );
|
||||
DEPRECATE_DECLARE
|
||||
inline GCE_result GCE_PrepareMovingOfPoint( GCE_system, const std::vector<geom_point> &, GCE_point )
|
||||
{
|
||||
return GCE_RESULT_None;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
@@ -242,6 +242,86 @@ inline GCE_point IfGeomLineSeg2d::EndPoint( int nb )
|
||||
return val;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// Выдать обозначение контрольной точки, принадлежащей объекту
|
||||
//---
|
||||
inline coord_name IfGeomPoint2d::IdentCoord( const ItGeomCoord & crd ) const
|
||||
{
|
||||
IfGeomPoint2d * theObject = const_cast<IfGeomPoint2d*>( this );
|
||||
if ( theObject->GetXCoord() == &crd )
|
||||
{
|
||||
return GCE_X;
|
||||
}
|
||||
if ( theObject->GetYCoord() == &crd )
|
||||
{
|
||||
return GCE_Y;
|
||||
}
|
||||
return GCE_NULL_CRD;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// Выдать обозначение контрольной точки, принадлежащей объекту
|
||||
//---
|
||||
inline coord_name IfGeomLine2d::IdentCoord( const ItGeomCoord & crd ) const
|
||||
{
|
||||
IfGeomLine2d * theLine = const_cast<IfGeomLine2d*>( this );
|
||||
if ( theLine->GetACoord() == &crd )
|
||||
{
|
||||
return GCE_ACRD;
|
||||
}
|
||||
if ( theLine->GetDCoord() == &crd )
|
||||
{
|
||||
return GCE_DCRD;
|
||||
}
|
||||
return GCE_NULL_CRD;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// Выдать обозначение контрольной точки, принадлежащей объекту
|
||||
//---
|
||||
inline coord_name IfGeomCircle2d::IdentCoord( const ItGeomCoord & crd ) const
|
||||
{
|
||||
IfGeomCircle2d * theObject = const_cast<IfGeomCircle2d*>( this );
|
||||
if ( theObject->GetRadius() == &crd )
|
||||
{
|
||||
return GCE_RADIUS;
|
||||
}
|
||||
|
||||
if ( const IfGeomPoint2d * pnt = theObject->GetCentre() )
|
||||
{
|
||||
return pnt->IdentCoord( crd );
|
||||
}
|
||||
|
||||
return GCE_NULL_CRD;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// Выдать обозначение контрольной точки, принадлежащей объекту
|
||||
//---
|
||||
inline coord_name IfGeomEllipse2d::IdentCoord( const ItGeomCoord & crd ) const
|
||||
{
|
||||
IfGeomEllipse2d * theObject = const_cast<IfGeomEllipse2d*>( this );
|
||||
if ( theObject->GetACoord() == &crd )
|
||||
{
|
||||
return GCE_MAJOR_RADIUS;
|
||||
}
|
||||
if ( theObject->GetBCoord() == &crd )
|
||||
{
|
||||
return GCE_MINOR_RADIUS;
|
||||
}
|
||||
if ( theObject->GetPhiCoord() == &crd )
|
||||
{
|
||||
return GCE_ACRD;
|
||||
}
|
||||
|
||||
if ( const IfGeomPoint2d * pnt = theObject->GetCentre() )
|
||||
{
|
||||
return pnt->IdentCoord( crd );
|
||||
}
|
||||
|
||||
return GCE_NULL_CRD;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// \ru Аналог IfPtr без работы со счетчиком ссылок \en Analog of IfPtr without working with reference counter
|
||||
|
||||
+1
-14
@@ -722,20 +722,7 @@ struct GCT_CLASS GCT_diagnostic_pars
|
||||
Constraints2D_API
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// \ru Дескриптор контрольной точки объекта. \en Descriptor of the object control point.
|
||||
/*
|
||||
The data structure is deprecated.
|
||||
*/
|
||||
//---
|
||||
struct GCE_CLASS geom_point
|
||||
{
|
||||
geom_item geom; ///< \ru Дескриптор геометрического объекта \en Descriptor of the geometric object
|
||||
point_type pntName; ///< \ru Имя контрольной точки геометрического объекта \en Name of the geometric object control point
|
||||
geom_point() : geom( GCE_NULL ), pntName( GCE_IMPROPER_POINT ) {}
|
||||
geom_point( geom_item g, point_type pnt ) : geom( g ), pntName( pnt ) {}
|
||||
};
|
||||
|
||||
DEPRECATE_DECLARE
|
||||
const GCE_c_status GCE_STATUS_Solved = GCE_STATUS_Undefined; // Deprecated. It will be removed in 2023.
|
||||
|
||||
#endif // __GCE_TYPES_H
|
||||
|
||||
+46
-16
@@ -14,6 +14,7 @@
|
||||
#include <gcm_geom.h>
|
||||
#include <gcm_manager.h>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Чёрный ящик.
|
||||
\en Blackbox. \~
|
||||
@@ -21,9 +22,9 @@
|
||||
\ru Черный ящик реализует закон позиционирования геометрических объектов, зависящих
|
||||
от позиции других объектов. Интерфейс #ItGCBlackbox реализуется обычно на стороне
|
||||
клиентского приложения и передается геометрическому решателю для исполнения через метод
|
||||
#MtGeomSolver::AddBlackbox. например, в системе КОМПАС-3D черный ящик применяется для
|
||||
моделирования массивов тел (паттерны), которые родились путем тиражирования детали
|
||||
по закону определенному на стороне приложения.
|
||||
#MtGeomSolver::AddBlackbox. Например, в сапрах абстракция черного ящика применяется для
|
||||
моделирования массивов тел (паттерны), которые родились путем тиражирования экземпляров
|
||||
некоторой детали некоторому геометрическому закону паттерна.
|
||||
Черный ящик может применяться не только для организации паттернов, но и для задания на
|
||||
стороне клиентского приложения различных однонаправленных зависимостей, с определенным
|
||||
законом позиционирования тел. Объекты, которые рассматриваются, как входящие для черного
|
||||
@@ -31,35 +32,53 @@
|
||||
черного ящика, называются зависимыми.
|
||||
\en Blackbox implements a law of positioning of geometric objects which are
|
||||
dependent on positions of other objects. Interface #ItGCBlackbox is usually implemented
|
||||
on the side of application and it is transferred from the application to the solver
|
||||
by method #MtGeomSolver::AddBlackbox. The functionality of blackboxes can be used to
|
||||
the organization of patterns in assembly structures, when the elements of the pattern
|
||||
are copies of the same part replicated according to a law specified my the application. \~
|
||||
on the side of application and it is transferred from the application to C3D Solver
|
||||
by method #MtGeomSolver::AddBlackbox. The blackbox abstraction can be used to organize
|
||||
patterns in assembly structures, when the elements of the pattern are copies (instancies)
|
||||
of the same part (sample) replicated according to a geometric law specified by the application. \~
|
||||
\ingroup GCM_3D_ObjectAPI
|
||||
*/
|
||||
//---
|
||||
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.
|
||||
virtual void CollectMyOutGeoms( IFC_Array<ItGeom> & ) const = 0;
|
||||
|
||||
/** \brief \ru Рассчитать положение зависимого объекта.
|
||||
\en Calculate position of a dependent geometric object. \~
|
||||
\param[in] inPlaces - \ru Позиции независимых объектов, получаемых методом #ItGCBlackbox::CollectMyInGeoms.
|
||||
\en Positions of independed geoms, which are got by #ItGCBlackbox::CollectMyInGeoms.\~
|
||||
\param[in] depGeom - \ru Зависимый геометрический объект.
|
||||
\en Depended geometric object.\~
|
||||
\param[in] inGeomPlaces - \ru Позиции независимых объектов, получаемых методом #ItGCBlackbox::CollectMyInGeoms.
|
||||
\en Positions of independed geoms, which are got by #ItGCBlackbox::CollectMyInGeoms.\~
|
||||
\param[in] depPlace - \ru Зависимый геометрический объект.
|
||||
\en Depended geometric object.\~
|
||||
\param[out] depPlace - \ru Вычисленное положение для объекта outGeom.
|
||||
\en Calculated position for a dependent geom 'outGeom'\~
|
||||
\return \ru true, если функция корректно исполнена.
|
||||
\en true if the function performed succeeded. \~
|
||||
\return \ru GCM_DEP_RESULT_Ok, если функция корректно исполнена, иначе диагностический код ошибки.
|
||||
\en GCM_DEP_RESULT_Ok if the function performed succeeded otherwise one of diagnostic error codes. \~
|
||||
*/
|
||||
virtual bool Calculate( const SArray<MbPlacement3D> & inPlaces
|
||||
, const ItGeom & depGeom
|
||||
, MbPlacement3D & depPlace ) const = 0;
|
||||
virtual GCM_dependent_result CalculateDependent( const std::vector<GeomPlace> & inGeomPlaces
|
||||
, GeomPlace & depPlace ) const
|
||||
{
|
||||
/*
|
||||
This code will be removed tougether deprecated call ItGCBlackbox::Calculate.
|
||||
Данный код будет удален после того, как выйдет из применения устаревший вызов ItGCBlackbox::Calculate.
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
\brief \ru Сформулировать ограничения для зависимого геометрического объекта.
|
||||
\en Formulate constraints for the dependent geometric object. \~
|
||||
@@ -89,6 +108,7 @@ struct GCM_CLASS ItGCBlackbox
|
||||
the function should return false.
|
||||
*/
|
||||
virtual bool FormulateOutGeom( MtGeomSolver & solver, ItGeomPtr outGeom );
|
||||
|
||||
/**
|
||||
\brief \ru Завершить работу с черным ящиком. \en To finish work with the black box. \~
|
||||
\details \ru Функция предоставляет возможность пользователю данного интерфейса корректно завершить работу с черным
|
||||
@@ -98,6 +118,16 @@ struct GCM_CLASS ItGCBlackbox
|
||||
*/
|
||||
virtual void FinishBlackBox() {}
|
||||
|
||||
/** \brief \ru Рассчитать положение зависимого объекта.
|
||||
\en Calculate position of a dependent geometric object. \~
|
||||
\attention
|
||||
\ru Данная функция выбывает из API C3D Solver, ее поддержка будет прекращена.
|
||||
Поэтому приложению заказчика следует перегружать новую виртуальную функцию CalculateDependent вместо старой.
|
||||
\en This function is deprecated and supporting it will be stopped.
|
||||
So the customer application should be override new virtual function CalculateDependent instead.
|
||||
*/
|
||||
virtual bool Calculate( const SArray<MbPlacement3D> &, const ItGeom &, MbPlacement3D &) const { return false; }
|
||||
|
||||
public:
|
||||
virtual refcount_t AddRef() const = 0;
|
||||
virtual refcount_t Release() const = 0;
|
||||
|
||||
+21
-34
@@ -221,7 +221,8 @@ typedef enum
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Диагностические коды 3d-решателя. \en Diagnostic codes of 3D-solver. \~
|
||||
/** \brief \ru Диагностические коды 3d-решателя.
|
||||
\en Diagnostic codes of 3D-solver. \~
|
||||
\details \ru GCM_result перечисляет значения, возвращаемые вызовами API компонента GCM,
|
||||
включая диагностические коды решения геометрических ограничений. Значения данного типа
|
||||
возвращаются такими функциями, как GCM_Evaluate и GCM_EvaluationResult.
|
||||
@@ -274,8 +275,8 @@ typedef enum
|
||||
, GCM_RESULT_InconsistentPlanarAngle ///< \ru Не соблюдаются условия планарного угла (векторы сторон угла должны быть перпендикулярны оси). \en Planar angle conditions are not met (vectors from the sides of angle should be perpendicular to the axis).
|
||||
, GCM_RESULT_UnsupportedFollowerSurface ///< \ru Контактная поверхность толкателя, выбранная для кинематической пары "кулачек-толкатель", пока не поддерживается решателем. \en The follower contact surface selected for the cam-follower kinematic pair is not yet supported by the solver.
|
||||
|
||||
/*
|
||||
ATTENTION: New error messages should be added only before this line.
|
||||
/*
|
||||
(!) Attention: New error messages should be added only before this line.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -292,13 +293,15 @@ typedef enum
|
||||
} GCM_result;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Характер зависимости пары тел (geoms) \en Dependency character of solid pair (geoms)
|
||||
/** \brief \ru Код означивает, какая имеется зависимость между аргументами ограничения.
|
||||
\en Code denotes what kind of dependency there is between arguments of constraint.
|
||||
*/
|
||||
// ---
|
||||
typedef enum
|
||||
{
|
||||
GCM_NO_DEPENDENCY = 0 ///< \ru Нет односторонней зависимости. \en It means no one-directed dependency.
|
||||
, GCM_1ST_DEPENDENT = 2 ///< \ru Первый объект зависит от другого(других). \en The first object is dependent on the other(s).
|
||||
, GCM_2ND_DEPENDENT = 1 ///< \ru Второй объект зависит от другого(других). \en The second object is dependent on the other(s).
|
||||
, GCM_1ST_DEPENDENT = 2 ///< \ru Первый аргумент зависит от остальных. \en The first argument is dependent on the others.
|
||||
, GCM_2ND_DEPENDENT = 1 ///< \ru Второй аргумент зависит от остальных. \en The second argument is dependent on the others.
|
||||
} GCM_dependency;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -465,6 +468,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.
|
||||
/*
|
||||
@@ -646,25 +661,6 @@ typedef GCM_alignment MtAlignType;
|
||||
typedef GCM_g_type MtGeometryType;
|
||||
typedef GCM_result MtResultCode3D;
|
||||
|
||||
/*
|
||||
The constants below are deprecated (2015)
|
||||
*/
|
||||
|
||||
static const GCM_g_type GCM_FIRST_GTYPE = GCM_NULL_GTYPE;
|
||||
static const GCM_g_type mgt_Cylinder = GCM_CYLINDER;
|
||||
static const GCM_c_type mct_Coincidence = GCM_COINCIDENT;
|
||||
static const GCM_c_type mct_Parallel = GCM_PARALLEL;
|
||||
static const GCM_c_type mct_Perpendicular = GCM_PERPENDICULAR;
|
||||
static const GCM_c_type mct_Tangency = GCM_TANGENT;
|
||||
static const GCM_c_type mct_Concentric = GCM_CONCENTRIC;
|
||||
static const GCM_c_type mct_Distance = GCM_DISTANCE;
|
||||
static const GCM_c_type mct_Angle = GCM_ANGLE;
|
||||
static const GCM_c_type mct_Unknown = GCM_UNKNOWN;
|
||||
static const GCM_c_type mct_Symmetry = GCM_SYMMETRIC;
|
||||
static const GCM_c_type mct_Symmetric = GCM_SYMMETRIC;
|
||||
static const GCM_c_type mct_Parallelism = GCM_PARALLEL;
|
||||
|
||||
|
||||
static const GCM_result mtResCode_Ok = GCM_RESULT_Ok;
|
||||
static const GCM_result mtResCode_SystemError = GCM_RESULT_Error;
|
||||
static const GCM_result mtResCode_Error = GCM_RESULT_Error;
|
||||
@@ -682,15 +678,6 @@ static const GCM_result mtResCode_CyclicDependenceForTwoOrMoreCamGears = GCM_RES
|
||||
|
||||
const GCM_dependency GCM_2ST_DEPENDENT = GCM_2ND_DEPENDENT;
|
||||
|
||||
/*
|
||||
Deprecated names of a dynamic reposition modes (2019)
|
||||
*/
|
||||
const GCM_reposition rep_FreeRotation = GCM_REPOSITION_FreeRotation;
|
||||
const GCM_reposition rep_FreeMoving = GCM_REPOSITION_FreeMoving;
|
||||
const GCM_reposition rep_MovingToPoint = GCM_REPOSITION_Dragging;
|
||||
const GCM_reposition rep_RotationAboutAxis = GCM_REPOSITION_Rotation;
|
||||
const GCM_reposition rep_TransferOneGeomOnly = GCM_REPOSITION_Transfer;
|
||||
|
||||
#endif
|
||||
|
||||
// eof
|
||||
|
||||
@@ -1157,26 +1157,24 @@ struct range : public std::pair<Iterator, Iterator>
|
||||
// Get a range of the STL-container
|
||||
//---
|
||||
template<class _Cont>
|
||||
range<typename _Cont::const_iterator> range_of( const _Cont & list )
|
||||
inline range<typename _Cont::const_iterator> range_of( const _Cont & list )
|
||||
{
|
||||
range<typename _Cont::const_iterator> rng( list.begin(), list.end() );
|
||||
return rng;
|
||||
return {list.begin(), list.end()};
|
||||
}
|
||||
|
||||
template<class _Cont>
|
||||
range<typename _Cont::iterator> range_of( _Cont & list )
|
||||
inline range<typename _Cont::iterator> range_of( _Cont & list )
|
||||
{
|
||||
range<typename _Cont::iterator> rng( list.begin(), list.end() );
|
||||
return rng;
|
||||
return {list.begin(), list.end()};
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Get a range of iterators
|
||||
//---
|
||||
template<class _Iterator>
|
||||
range<_Iterator> make_range( _Iterator first, _Iterator last )
|
||||
inline range<_Iterator> make_range( _Iterator first, _Iterator last )
|
||||
{
|
||||
c3d::range<_Iterator> rng( first, last );
|
||||
return rng;
|
||||
return {first, last};
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +34,12 @@ struct MATH_CLASS MbCurvature
|
||||
MbVector3D cdir2; ///< \ru Направление минимальной кривизны. \en Minimum principal curvature direction.
|
||||
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbCurvature() : k_h( 0.0 ), k_g( 0.0 ), k1 ( 0.0 ), k2 ( 0.0 ) {}
|
||||
MbCurvature() : k_h( 0.0 ), k_g( 0.0 ), k1 ( 0.0 ), k2 ( 0.0 )
|
||||
{
|
||||
cdir1.Init( 0., 1., 0. );
|
||||
cdir2.Init( 0., 0., 1. );
|
||||
normal.Init( 1., 0., 0. );
|
||||
}
|
||||
/// \ru Конструктор копирования. \en Copy constructor.
|
||||
MbCurvature( const MbCurvature & that )
|
||||
: k_h ( that.k_h )
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
#define MATH_22_VERSION 0x16000001L ///< \ru Версия файла - 22.0. \en The file version - 22.0. \~ \ingroup Base_Tools
|
||||
#define MATH_22_HF1_VERSION 0x16000002L ///< \ru Версия файла - 22.0 HF1. \en The file version - 22.0 HF1. \~ \ingroup Base_Tools
|
||||
#define MATH_22_HF2_VERSION 0x16000003L ///< \ru Версия файла - 22.0 HF2. \en The file version - 22.0 HF2. \~ \ingroup Base_Tools
|
||||
#define MATH_22_HF3_VERSION 0x16000004L ///< \ru Версия файла - 22.0 HF3. \en The file version - 22.0 HF3. \~ \ingroup Base_Tools
|
||||
#define MATH_22_UHF_VERSION 0x16000011L ///< \ru Версия файла - 22.0 UHF (Upper Hot Fix). \en The file version - 22.0 UHF (Upper Hot Fix). \~ \ingroup Base_Tools
|
||||
#define C3D_2023_VERSION 0x16001001L ///< \ru Версия файла - C3D 2023. \en The file version - C3D 2023. \~ \ingroup Base_Tools
|
||||
|
||||
|
||||
@@ -417,6 +417,8 @@ public :
|
||||
\en Returns the distance to the boundary. \~
|
||||
*/
|
||||
double DistanceToPoint( const MbCartPoint3D & point ) const;
|
||||
/// \ru Вычислить квадрат расстояния до точки. \en Calculate the square of distance to a point.
|
||||
double DistanceToPoint2( const MbCartPoint3D & point ) const;
|
||||
|
||||
/** \brief \ru Вычислить расстояние до куба.
|
||||
\en Calculate the distance to the box. \~
|
||||
@@ -865,4 +867,17 @@ double MbCube::DistanceToPoint( const MbCartPoint3D & pnt ) const
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Квадрат расстояния до точки \en The square of distance to a point
|
||||
// ---
|
||||
inline
|
||||
double MbCube::DistanceToPoint2( const MbCartPoint3D & pnt ) const
|
||||
{
|
||||
double dx = std_min( 0., std_min( pnt.x - pmin.x, pmax.x - pnt.x ) );
|
||||
double dy = std_min( 0., std_min( pnt.y - pmin.y, pmax.y - pnt.y ) );
|
||||
double dz = std_min( 0., std_min( pnt.z - pmin.z, pmax.z - pnt.z ) );
|
||||
return dx * dx + dy * dy + dz * dz;
|
||||
}
|
||||
|
||||
|
||||
#endif // __MB_CUBE_H
|
||||
|
||||
+44
-11
@@ -199,6 +199,9 @@ public:
|
||||
/// \ru Количество объектов в дереве (не хранит, считает обходом дерева). \en Number of objects in the tree (does not store, tree calculates it by traversing tree nodes).
|
||||
size_t Count() const;
|
||||
|
||||
/// \ru Количество узлов в дереве. \en Number of branches in the tree.
|
||||
size_t NodeCount() const;
|
||||
|
||||
/// \ru Готово ли дерево. \en Whether tree is ready.
|
||||
bool IsReady() const;
|
||||
|
||||
@@ -1062,6 +1065,36 @@ inline size_t MbCubeTree<Type, Cube, Point, Vector>::Count() const
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// \ru Количество узлов в дереве. \en Number of branches in the tree.
|
||||
// ---
|
||||
template <class Type, class Cube, class Point, class Vector>
|
||||
inline size_t MbCubeTree<Type, Cube, Point, Vector>::NodeCount() const
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
std::vector<const TypeTree *> stack;
|
||||
stack.push_back( this );
|
||||
|
||||
while ( !stack.empty() ) {
|
||||
const TypeTree * ptr = stack.back();
|
||||
stack.pop_back();
|
||||
++count;
|
||||
|
||||
if ( ptr->lowerBranch != nullptr )
|
||||
stack.push_back( ptr->lowerBranch );
|
||||
|
||||
if ( ptr->upperBranch != nullptr )
|
||||
stack.push_back( ptr->upperBranch );
|
||||
|
||||
if ( ptr->midstBranch != nullptr )
|
||||
stack.push_back( ptr->midstBranch );
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// \ru Выдать содержащие точку объекты дерева. \en Get tree objects containing a point.
|
||||
// ---
|
||||
@@ -1747,29 +1780,25 @@ double MbCubeTree<Type, Cube, Point, Vector>::FindNearestObject( const Point &
|
||||
const NodeElem<TypeTree> node = queue.top(); // Первым рассматриваем узлы, наиболее близкие к точке.
|
||||
queue.pop();
|
||||
|
||||
double d2 = node._ptr->branchCube.DistanceToPoint( pnt );
|
||||
d2 = d2 < 0. ? 0. : d2 * d2;
|
||||
double d2 = node._ptr->branchCube.DistanceToPoint2( pnt );
|
||||
if ( d2 > dist2 )
|
||||
break; // Все оставшиеся узлы дальше уже найденного расстояния.
|
||||
|
||||
if ( ( node._ptr->lowerBranch != nullptr ) || ( node._ptr->upperBranch != nullptr ) || ( node._ptr->midstBranch != nullptr ) ) {
|
||||
if ( node._ptr->lowerBranch != nullptr ) {
|
||||
d2 = node._ptr->lowerBranch->branchCube.DistanceToPoint( pnt );
|
||||
d2 = d2 < 0. ? 0. : d2 * d2;
|
||||
d2 = node._ptr->lowerBranch->branchCube.DistanceToPoint2( pnt );
|
||||
if ( d2 < dist2 )
|
||||
queue.push( NodeElem<TypeTree>( node._ptr->lowerBranch, d2 ) );
|
||||
}
|
||||
|
||||
if ( node._ptr->upperBranch != nullptr ) {
|
||||
d2 = node._ptr->upperBranch->branchCube.DistanceToPoint( pnt );
|
||||
d2 = d2 < 0. ? 0. : d2 * d2;
|
||||
d2 = node._ptr->upperBranch->branchCube.DistanceToPoint2( pnt );
|
||||
if ( d2 < dist2 )
|
||||
queue.push( NodeElem<TypeTree>( node._ptr->upperBranch, d2 ) );
|
||||
}
|
||||
|
||||
if ( node._ptr->midstBranch != nullptr ) {
|
||||
d2 = node._ptr->midstBranch->branchCube.DistanceToPoint( pnt );
|
||||
d2 = d2 < 0. ? 0. : d2 * d2;
|
||||
d2 = node._ptr->midstBranch->branchCube.DistanceToPoint2( pnt );
|
||||
if ( d2 < dist2 )
|
||||
queue.push( NodeElem<TypeTree>( node._ptr->midstBranch, d2 ) );
|
||||
}
|
||||
@@ -1777,10 +1806,13 @@ double MbCubeTree<Type, Cube, Point, Vector>::FindNearestObject( const Point &
|
||||
else { // содержимое конечной ветви // terminal branch content
|
||||
for ( size_t i = 0, iCount = node._ptr->leafObjects.size(); i < iCount; ++i ) {
|
||||
const ItemIndex & obj = node._ptr->leafObjects[i];
|
||||
d2 = calc.DistanceToElement2( pnt, obj.second );
|
||||
d2 = obj.first->DistanceToPoint2( pnt );
|
||||
if ( d2 < dist2 ) {
|
||||
dist2 = d2;
|
||||
index = obj.second;
|
||||
d2 = calc.DistanceToElement2( pnt, obj.second );
|
||||
if ( d2 < dist2 ) {
|
||||
dist2 = d2;
|
||||
index = obj.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1788,4 +1820,5 @@ double MbCubeTree<Type, Cube, Point, Vector>::FindNearestObject( const Point &
|
||||
|
||||
return dist2;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru N-мерная точность.
|
||||
\en N-dimensional accuracy. \~
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MB_DIM_ACCURACY_H
|
||||
#define __MB_DIM_ACCURACY_H
|
||||
|
||||
#include <math_define.h>
|
||||
#include <mb_variables.h>
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru N-мерная точность.
|
||||
\en N-dimensional accuracy. \~
|
||||
\details \ru N-мерная точность задается N положительными числами.
|
||||
Наиболее востребованы двумерная и трехмерная точности.
|
||||
Компоненты точности в этих случаях соответствуют точностям вдоль осей x, y и z.
|
||||
Двумерная точность может использоваться, например, при выполнении операций над
|
||||
двумерными кривыми MbCurve. В этом случае компоненты точности будут расcчитываться
|
||||
с использованием методов GetUEpsilon() и GetVEpsilon(), вызванных для
|
||||
поверхности (MbSurface) на которой лежит данная кривая.
|
||||
\en N-dimensional accuracy is specified by N positive numbers.
|
||||
Two-dimensional and three-dimensional accuracies are the most demanded.
|
||||
Components of accuracy in these cases correspond to accuracies along x, y and z axes.
|
||||
Two-dimensional precision can be used, for example, when performing operations on two-dimensional MbCurve curves.
|
||||
In this case, the accuracy components will be calculated using
|
||||
the GetUEpsilon() and GetVEpsilon() methods called
|
||||
for the surface (MbSurface) on which the curve lies. \~
|
||||
\ingroup Legend
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
// ---
|
||||
|
||||
class MATH_CLASS MbDimAccuracy
|
||||
{
|
||||
private :
|
||||
c3d::DoubleVector _epsilon; ///< \ru Вектор N-мерной точности. \en N-dimensional accuracy vector.
|
||||
|
||||
public :
|
||||
/// \ru Двумерная точность по умолчанию - ( PARAM_EPSILON, PARAM_EPSILON ) \en Default two-dimensional accuracy - ( PARAM_EPSILON, PARAM_EPSILON )
|
||||
static const MbDimAccuracy twoDimAcc;
|
||||
/// \ru Двумерная точность по умолчанию - ( METRIC_REGION, METRIC_REGION ) \en Default two-dimensional accuracy - ( METRIC_REGION, METRIC_REGION )
|
||||
static const MbDimAccuracy twoDimRgn;
|
||||
/// \ru Трехмерная точность по умолчанию - ( METRIC_EPSILON, METRIC_EPSILON, METRIC_EPSILON ) \en Default three-dimensional accuracy - ( METRIC_EPSILON, METRIC_EPSILON, METRIC_EPSILON )
|
||||
static const MbDimAccuracy threeDimAcc;
|
||||
|
||||
|
||||
public :
|
||||
/** \brief \ru Конструктор для двумерной точности по двум значениям.
|
||||
\en Сonstructor for two-dimensional accuracy on the three values. \~
|
||||
\details \ru Конструктор для двумерной точности по двум значениям.
|
||||
Если передаваемые компоненты точности меньше, чем 'DOUBLE_EPSILON',
|
||||
то этим значениям присваивается 'DOUBLE_EPSILON'.
|
||||
\en Constructor for two-dimensional accuracy on two values.
|
||||
If the passed accuracy components are smaller than the 'DOUBLE_EPSILON',
|
||||
then the value of 'DOUBLE_EPSILON' is assigned to these components.
|
||||
\param[in] xEps - \ru Точность по оси x.
|
||||
\en x-axis accuracy. \~
|
||||
\param[in] yEps - \ru Точность по оси y.
|
||||
\en y-axis accuracy. \~
|
||||
*/
|
||||
MbDimAccuracy( double xEps, double yEps );
|
||||
|
||||
/** \brief \ru Конструктор для трехмерной точности по трем значениям.
|
||||
\en Сonstructor for two-dimensional accuracy on the three values. \~
|
||||
\details \ru Конструктор для трехмерной точности по трем значениям.
|
||||
Если передаваемые компоненты точности меньше, чем 'DOUBLE_EPSILON',
|
||||
то этим значениям присваивается 'DOUBLE_EPSILON'.
|
||||
\en Constructor for three-dimensional accuracy on three values.
|
||||
If the passed accuracy components are smaller than the 'DOUBLE_EPSILON',
|
||||
then the value of 'DOUBLE_EPSILON' is assigned to these components.
|
||||
\param[in] xEps - \ru Точность по оси x.
|
||||
\en x-axis accuracy. \~
|
||||
\param[in] yEps - \ru Точность по оси y.
|
||||
\en y-axis accuracy. \~
|
||||
\param[in] zEps - \ru Точность по оси z.
|
||||
\en z-axis accuracy. \~
|
||||
*/
|
||||
MbDimAccuracy( double xEps, double yEps, double zEps );
|
||||
|
||||
/** \brief \ru Конструктор N-мерной точности по вектору значений.
|
||||
\en Constructor of N-dimensional accuracy on a vector of values. \~
|
||||
\details \ru Конструктор N-мерной точности по вектору значений.
|
||||
Если вектор пустой, то создаётся одномерная точность c компонентой равной 'DOUBLE_EPSILON'.
|
||||
\en Constructor of N-dimensional accuracy on a vector of values.
|
||||
If the vector is empty, a one-dimensional accuracy with component equal to 'DOUBLE_EPSILON' is returned. \~
|
||||
\param[in] vector - \ru Вектор с компонентами N-мерной точности
|
||||
\en Vector with components of N-dimensional accuracy. \~
|
||||
*/
|
||||
template <class Vector>
|
||||
MbDimAccuracy( const Vector & vector );
|
||||
|
||||
/// \ru Конструктор копирования. \en The copy constructor.
|
||||
explicit MbDimAccuracy( const MbDimAccuracy & acc ) : _epsilon( acc.GetEpsilon() ) {}
|
||||
|
||||
/// \ru Конструктор по умолчанию удалён. \en Default constructor explicitly deleted.
|
||||
MbDimAccuracy() = delete;
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbDimAccuracy() {}
|
||||
|
||||
public: // Общие методы
|
||||
size_t GetDimension() const { return _epsilon.size(); } ///< \ru Дать размерность точности. \en Get the accuracy dimension.
|
||||
|
||||
/// \ru Дать вектор с компонентами точности. \en Get a vector with accuracy components.
|
||||
const c3d::DoubleVector & GetEpsilon() const { return _epsilon; }
|
||||
|
||||
/// \ru Вернуть значение минимальной компоненты точности. \en Return the value of the minimum accuracy component.
|
||||
double GetMin() const;
|
||||
|
||||
/// \ru Доступ к компонентe точности по индексу. \en Access to accuracy component by index.
|
||||
double & operator [] ( size_t i );
|
||||
/// \ru Значение компоненты точности по индексу. \en The value of accuracy component by index.
|
||||
double operator [] ( size_t i ) const;
|
||||
|
||||
/// \ru Присвоить точности значение другой точности. \en Assign the value of another accuracy to the accuracy.
|
||||
MbDimAccuracy & operator = ( const MbDimAccuracy & );
|
||||
};
|
||||
|
||||
#endif // __MB_DIM_ACCURACY_H
|
||||
+22
-17
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
#include <mb_cart_point.h>
|
||||
#include <system_atomic.h>
|
||||
#include <io_base.h>
|
||||
#include <mb_homogeneous.h>
|
||||
|
||||
@@ -24,9 +25,9 @@ class MATH_CLASS MbHomogeneous;
|
||||
|
||||
|
||||
template<class Transform>
|
||||
void CheckOrigin ( const Transform & trans, uint8 & flag, bool resetFlag );
|
||||
void CheckOrigin ( const Transform & trans, atomic_uint8 & flag, bool resetFlag );
|
||||
template<class Transform>
|
||||
void CheckRotation( const Transform & trans, uint8 & flag, bool resetFlag );
|
||||
void CheckRotation( const Transform & trans, atomic_uint8 & flag, bool resetFlag );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -106,7 +107,7 @@ private:
|
||||
DO NOT USE "Get..." METHODS TO MODIFY MATRIX ELEMENTS BY RENAMING const TO non-const,
|
||||
USE ONLY Get* AND Set* TO ACCESS AND MODIFY OF MATRIX DATA. \~
|
||||
*/
|
||||
mutable uint8 flag;
|
||||
mutable atomic_uint8 flag;
|
||||
|
||||
public:
|
||||
static const MbMatrix identity; ///< \ru Единичная матрица, I = diag(1,1,1); \en Identity matrix, I = diag(1,1,1);
|
||||
@@ -115,7 +116,7 @@ public :
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbMatrix() : flag( MB_UNSET ) { Init(); }
|
||||
/// \ru Конструктор копирования. \en Copy constructor.
|
||||
MbMatrix( const MbMatrix & init ) : flag( init.flag ) { ::memcpy( &el, init.el, sizeof(el) ); }
|
||||
MbMatrix( const MbMatrix & init ) : flag( init.flag.load() ) { ::memcpy( &el, init.el, sizeof(el) ); }
|
||||
/// \ru Конструктор по локальной системе координат. \en The constructor by placement.
|
||||
explicit MbMatrix( const MbPlacement & place ) : flag( MB_UNSET ) { Set( place ); }
|
||||
public:
|
||||
@@ -560,7 +561,7 @@ public:
|
||||
/// \ru Домножить на матрицу справа. \en Multiply by the matrix on the right.
|
||||
MbMatrix & operator *= ( const MbMatrix & m ) { return PostMultiply( m ); }
|
||||
/// \ru Присвоить значение. \en Assign a value.
|
||||
MbMatrix & operator = ( const MbMatrix & m ) { flag = m.flag; ::memcpy( &el, m.el, sizeof(el) ); return *this; }
|
||||
MbMatrix & operator = ( const MbMatrix & m ) { flag = m.flag.load(); ::memcpy( &el, m.el, sizeof(el) ); return *this; }
|
||||
/// \ru Сравнить с матрицей (точность - LENGTH_EPSILON). \en Compare with a matrix(tolerance- LENGTH_EPSILON).
|
||||
bool operator == ( const MbMatrix & ) const;
|
||||
|
||||
@@ -580,7 +581,7 @@ private:
|
||||
/// \ru Выставить флаги. \en Set flags.
|
||||
uint8 ResetFlag() const;
|
||||
// Оценить флаги, если оценки не было
|
||||
uint8 CheckFlag() const { return IsUnSet() ? ResetFlag() : flag; }
|
||||
uint8 CheckFlag() const { return IsUnSet() ? ResetFlag() : flag.load(); }
|
||||
// Проверить флаг смещения.
|
||||
void CheckOrigin() const { ::CheckOrigin( *this, flag, true ); }
|
||||
// \ru Проверить флаг вращения. \en Check rotation flag.
|
||||
@@ -601,19 +602,21 @@ public:
|
||||
*/
|
||||
// ---
|
||||
template<class Transform>
|
||||
void CheckOrigin( const Transform & trans, uint8 & flag, bool resetFlag )
|
||||
void CheckOrigin( const Transform & trans, atomic_uint8 & flag, bool resetFlag )
|
||||
{
|
||||
if ( !(flag & MB_UNSET) ) {
|
||||
uint8 val = flag.load();
|
||||
if ( !(val & MB_UNSET) ) {
|
||||
const MbCartPoint & pOrigin = trans.GetOrigin();
|
||||
const double lengthEpsilon = LENGTH_EPSILON;
|
||||
|
||||
if ( (::fabs(pOrigin.x) > lengthEpsilon) ||
|
||||
(::fabs(pOrigin.y) > lengthEpsilon) )
|
||||
flag |= MB_TRANSLATION;
|
||||
val |= MB_TRANSLATION;
|
||||
else if ( resetFlag ) {
|
||||
flag &= ~MB_TRANSLATION;
|
||||
val &= ~MB_TRANSLATION;
|
||||
}
|
||||
}
|
||||
flag = val;
|
||||
}
|
||||
|
||||
|
||||
@@ -626,9 +629,10 @@ void CheckOrigin( const Transform & trans, uint8 & flag, bool resetFlag )
|
||||
*/
|
||||
// ---
|
||||
template<class Transform>
|
||||
void CheckRotation( const Transform & trans, uint8 & flag, bool resetFlag )
|
||||
void CheckRotation( const Transform & trans, atomic_uint8 & flag, bool resetFlag )
|
||||
{
|
||||
if ( !(flag & MB_UNSET) ) {
|
||||
uint8 val = flag.load();
|
||||
if ( !(val & MB_UNSET) ) {
|
||||
const MbVector & axisX = trans.GetAxisX();
|
||||
const MbVector & axisY = trans.GetAxisY();
|
||||
|
||||
@@ -639,15 +643,16 @@ void CheckRotation( const Transform & trans, uint8 & flag, bool resetFlag )
|
||||
::fabs(axisX.x - 1.0) > eps ||
|
||||
::fabs(axisY.y - 1.0) > eps )
|
||||
{
|
||||
flag |= MB_ROTATION;
|
||||
val |= MB_ROTATION;
|
||||
}
|
||||
else if ( resetFlag ) {
|
||||
flag &= ~MB_ROTATION;
|
||||
flag &= ~MB_LEFT;
|
||||
flag &= ~MB_ORTOGONAL;
|
||||
flag &= ~MB_AFFINE;
|
||||
val &= ~MB_ROTATION;
|
||||
val &= ~MB_LEFT;
|
||||
val &= ~MB_ORTOGONAL;
|
||||
val &= ~MB_AFFINE;
|
||||
}
|
||||
}
|
||||
flag = val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <curve3d.h>
|
||||
#include <surface.h>
|
||||
#include <mb_rect1d.h>
|
||||
#include <cur_nurbs_vector.h>
|
||||
#include <mb_matrixnn.h>
|
||||
#include <mb_vector3d.h>
|
||||
#include <mb_cart_point3d.h>
|
||||
@@ -58,13 +57,14 @@ enum MbeSplineCreateType {
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
// ---
|
||||
class MbCurveIntoNurbsInfo {
|
||||
class MATH_CLASS MbCurveIntoNurbsInfo {
|
||||
private:
|
||||
double tbeg; ///< \ru Параметр начала участка кривой. \en A parameter of the curve piece start.
|
||||
double tend; ///< \ru Параметр конца участка кривой. \en A parameter of the curve piece end.
|
||||
int sense; ///< \ru Направление сплайн-кривой. \en Direction of spline-curve.
|
||||
bool matchParams; ///< \ru Сохранять ли при преобразовании однозначное соответствие параметрических областей. \en Whether to save correspondence of parametric regions while transforming or not.
|
||||
bool extendRange; ///< \ru Строится ли преобразование на продолжении для незамкнутой подложки. \en Whether transformation is constructed on the extension for a non-closed substrate.
|
||||
double tRegion; ///< \ru Параметрическая точность. \en Parametric accuracy.
|
||||
VERSION version; ///< \ru Версия исполнения. \en The version of execution.
|
||||
private:
|
||||
MbCurveIntoNurbsInfo();
|
||||
@@ -72,29 +72,42 @@ public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
template <class Curve>
|
||||
MbCurveIntoNurbsInfo( const Curve & c, bool match, bool ext, VERSION ver = Math::DefaultMathVersion() )
|
||||
: tbeg ( c.GetTMin() )
|
||||
, tend ( c.GetTMax() )
|
||||
, sense ( 1 )
|
||||
, matchParams( match )
|
||||
, extendRange( ext )
|
||||
, version ( ver )
|
||||
: tbeg ( c.GetTMin() )
|
||||
, tend ( c.GetTMax() )
|
||||
, sense ( 1 )
|
||||
, matchParams( match )
|
||||
, extendRange( ext )
|
||||
, tRegion ( PARAM_EPSILON )
|
||||
, version ( ver )
|
||||
{}
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbCurveIntoNurbsInfo( double t1, double t2, int s, bool match, bool ext, VERSION ver = Math::DefaultMathVersion() )
|
||||
: tbeg ( t1 )
|
||||
, tend ( t2 )
|
||||
, sense ( s )
|
||||
, matchParams( match )
|
||||
, extendRange( ext )
|
||||
, version ( ver )
|
||||
: tbeg ( t1 )
|
||||
, tend ( t2 )
|
||||
, sense ( s )
|
||||
, matchParams( match )
|
||||
, extendRange( ext )
|
||||
, tRegion ( PARAM_EPSILON )
|
||||
, version ( ver )
|
||||
{}
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbCurveIntoNurbsInfo( double t1, double t2, int s, bool match, bool ext, double tRegion, VERSION ver = Math::DefaultMathVersion() )
|
||||
: tbeg ( t1 )
|
||||
, tend ( t2 )
|
||||
, sense ( s )
|
||||
, matchParams( match )
|
||||
, extendRange( ext )
|
||||
, tRegion ( tRegion )
|
||||
, version ( ver )
|
||||
{}
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbCurveIntoNurbsInfo( const MbCurveIntoNurbsInfo & other, double t1, double t2, int s )
|
||||
: tbeg ( t1 )
|
||||
, tend ( t2 )
|
||||
, sense ( s )
|
||||
: tbeg ( t1 )
|
||||
, tend ( t2 )
|
||||
, sense ( s )
|
||||
, matchParams( other.matchParams )
|
||||
, extendRange( other.extendRange )
|
||||
, tRegion ( PARAM_EPSILON )
|
||||
, version ( other.version )
|
||||
{}
|
||||
/// \ru Функция присвоения. \en Assignment function.
|
||||
@@ -136,6 +149,8 @@ public:
|
||||
bool ExtendRange() const { return extendRange; }
|
||||
/// \ru Получить версию исполнения. \en Get the version of execution.
|
||||
VERSION GetMathVersion() const { return version; }
|
||||
/// \ru Получить парметрическую точность. \en Get the parametric accuracy.
|
||||
double GetTRegion() const { return tRegion; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbCurveIntoNurbsInfo )
|
||||
};
|
||||
@@ -149,7 +164,7 @@ OBVIOUS_PRIVATE_COPY( MbCurveIntoNurbsInfo )
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
// ---
|
||||
struct MbNurbsParameters: public MbPrecision {
|
||||
struct MATH_CLASS MbNurbsParameters: public MbPrecision {
|
||||
public:
|
||||
size_t degree; ///< \ru Порядок NURBS копии. \en Order of NURBS copy.
|
||||
size_t pointsCount; ///< \ru Количество контрольных точек (при 0 параметр игнорируется). \en The number of control points (if there is no control points, parameter is ignored).
|
||||
@@ -217,6 +232,7 @@ public:
|
||||
bool IsSame( const MbNurbsParameters & other, double accuracy ) const;
|
||||
/// \ru Оператор присваивания. \en The assignment operator.
|
||||
MbNurbsParameters & operator = ( const MbNurbsParameters & other ) {
|
||||
MbPrecision::operator=( other );
|
||||
degree = other.degree;
|
||||
pointsCount = other.pointsCount;
|
||||
region = other.region;
|
||||
@@ -311,7 +327,7 @@ public:
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
// ---
|
||||
struct MbNurbsPointInfo {
|
||||
struct MATH_CLASS MbNurbsPointInfo {
|
||||
public:
|
||||
MbCartPoint3D point; ///< \ru Узловая точка сплайновой поверхности. \en A knot point of a spline surface.
|
||||
bool visible; ///< \ru Флаг видимости точки. \en A point visibility flag.
|
||||
@@ -2640,7 +2656,7 @@ Nurbs * CreateLineOutRgn( const Curve & curve, double tn1, double tn2, double t1
|
||||
{
|
||||
Nurbs * nurbs = nullptr;
|
||||
|
||||
if ( !curve.IsClosed() && nci.ExtendRange() && ((tn2 - tn1) > Math::paramEpsilon) ) {
|
||||
if ( !curve.IsClosed() && nci.ExtendRange() && ((tn2 - tn1) > nci.GetTRegion()) ) {
|
||||
SArray<Point> points ( 2, 1 );
|
||||
SArray<double> weights( 2, 1 );
|
||||
SArray<double> knots ( 4, 1 ); //-V112
|
||||
@@ -2662,17 +2678,4 @@ Nurbs * CreateLineOutRgn( const Curve & curve, double tn1, double tn2, double t1
|
||||
return nurbs;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Преобразовать контур в нурбс \en Transform contour to NURBS
|
||||
// ---
|
||||
MbNurbs * ContourToNurbs( const MbContour & cntr, double t1, double t2, int sense, const MbCurveIntoNurbsInfo & nci, bool reparamByLength );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Преобразовать контур в нурбс \en Transform contour to NURBS
|
||||
// ---
|
||||
MbNurbs3D * ContourToNurbs( const MbContour3D & cntr, double t1, double t2, int sense, const MbCurveIntoNurbsInfo & nci, bool reparamByLength );
|
||||
|
||||
|
||||
#endif // __MB_NURBS_FUNCTION_H
|
||||
|
||||
@@ -282,6 +282,9 @@ enum MbResultType {
|
||||
|
||||
rt_LicenseError, ///< \ru Ошибка лицензии: неправильная или истекшая лицензия. \en License error: wrong or expired license.
|
||||
|
||||
rt_NoRayIntersection, ///< \ru В выбранном направлении нет пересечения луча со вторым объектом. \en There is no intersection of a ray and a second object in the selected direction.
|
||||
rt_ExtremesRequestExceeded, ///< \ru Количество экстремумов превышает количество измерений. \en The number of extremes exceeds the number of measurements.
|
||||
|
||||
// \ru !!! СТРОКИ ВСТАВЛЯТЬ СТРОГО ПЕРЕД ЭТОЙ СТРОКОЙ !!!! \en !!! INSERT LINES STRICTLY BEFORE THIS LINE !!!!
|
||||
rt_ErrorTotal // \ru НИЖЕ НЕ ДОБАВЛЯТЬ! \en DON'T ADD BELOW!
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <mb_cart_point.h>
|
||||
#include <mb_matrix.h>
|
||||
#include <system_atomic.h>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -71,7 +72,7 @@ private:
|
||||
'flag' has to be reset to unspecified MB_UNSET state while changing the coordinate system. \n
|
||||
if 'flag' == MB_UNSET then the state of coordinate system is specified while it is being used.\n \~
|
||||
*/
|
||||
mutable uint8 flag;
|
||||
mutable atomic_uint8 flag;
|
||||
|
||||
public :
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -239,7 +240,7 @@ private:
|
||||
/// \ru Выставить флаги. \en Set flags.
|
||||
uint8 ResetFlag() const;
|
||||
// Оценить флаги, если оценки не было
|
||||
uint8 CheckFlag() const { return IsUnSet() ? ResetFlag() : flag; }
|
||||
uint8 CheckFlag() const { return IsUnSet() ? ResetFlag() : flag.load(); }
|
||||
// Проверить флаг смещения.
|
||||
void CheckOrigin() const { ::CheckOrigin( *this, flag, true ); }
|
||||
// \ru Проверить флаг вращения. \en Check rotation flag.
|
||||
@@ -270,7 +271,7 @@ inline MbPlacement::MbPlacement( const MbPlacement & other )
|
||||
: origin( other.origin ) // начало координат
|
||||
, axisX ( other.axisX ) // направление оси 0X
|
||||
, axisY ( other.axisY ) // направление оси 0Y
|
||||
, flag ( other.flag )
|
||||
, flag ( other.flag.load() )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -385,7 +386,7 @@ inline void MbPlacement::operator = ( const MbPlacement & other )
|
||||
origin = other.origin; // \ru Начало координат \en The origin
|
||||
axisX = other.axisX; // \ru Направление оси 0X \en Direction of 0X-axis
|
||||
axisY = other.axisY; // \ru Направление оси 0Y \en Direction of 0Y-axis
|
||||
flag = other.flag;
|
||||
flag = other.flag.load();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+27
-2
@@ -20,6 +20,7 @@
|
||||
#include <model_item.h>
|
||||
#include <mb_placement.h>
|
||||
#include <curve.h>
|
||||
#include <curve3d.h>
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Элемент текста объекта аннотации.
|
||||
@@ -409,6 +410,9 @@ public:
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbTerminator & to, double accuracy ) const;
|
||||
|
||||
/// \ru Создать копию объекта. \en Create a copy of an object.
|
||||
SPtr<MbTerminator> Clone() const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbTerminator )
|
||||
};
|
||||
|
||||
@@ -471,6 +475,9 @@ public:
|
||||
\en Type of callout curve. \~
|
||||
*/
|
||||
MbeCalloutCurveType GetCurveType() const;
|
||||
|
||||
/// \ru Создать копию объекта. \en Create a copy of an object.
|
||||
SPtr<MbCalloutCurve> Clone( MbRegDuplicate * = nullptr ) const;
|
||||
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbCalloutCurve & to, double accuracy ) const;
|
||||
@@ -494,7 +501,8 @@ class MATH_CLASS MbNumericalCharacteristic final : public MbRefItem, public Tape
|
||||
MbValueRange m_valueWithRange; ///< \ru Численные значения. \en Numerical values.
|
||||
MbeNumericCharacteristicType m_CharacteristicType; ///< \ru Тип характеристики. \en Type of characteristics.
|
||||
std::vector<SPtr<MbCalloutCurve>> m_callouts; ///< \ru Линии выноски. \en Callout lines.
|
||||
|
||||
SPtr<MbCurve3D> path; ///< \ru Кривая, вдоль которой проводится измерение. Если не задана, то размер есть кратчайший. \en A curve along which the measurement is performed. If not specified, then the size is shortest.
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\param[in] type - \ru Тип характеристики,
|
||||
@@ -583,6 +591,15 @@ public:
|
||||
/// \ru Являются ли объекты равными. \en Are the objects equal.
|
||||
bool IsSame( const MbNumericalCharacteristic & to, double accuracy ) const;
|
||||
|
||||
/// \ru Задать кривую, вдоль которой проводится измерение. \en Set the curve the measurement is performed along.
|
||||
void SetPath( MbCurve3D * inPath );
|
||||
|
||||
/// \ru Получить кривую, вдоль которой проводится измерение. \en Get the curve the measurement is performed along.
|
||||
SPtr<MbCurve3D> GetPath() const;
|
||||
|
||||
/// \ru Создать копию объекта. \en Create a copy of an object.
|
||||
SPtr<MbNumericalCharacteristic> Clone( MbRegDuplicate * = nullptr ) const;
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbNumericalCharacteristic )
|
||||
};
|
||||
|
||||
@@ -739,6 +756,15 @@ protected:
|
||||
\en Text items ot the annotation element. \~
|
||||
*/
|
||||
MbPMI( MbePMIType pmiType, const MbPlacement3D & plane, const c3d::string_t & pmiName, SPtr<MbNumericalCharacteristic>, c3d::ItemsSPtrVector &&, std::vector<SPtr<MbTextItem>> && pmiText );
|
||||
|
||||
/** \brief \ru Конструктор глубокого копирования.
|
||||
\en Deepcoly constructor. \~
|
||||
\param[in] init - \ru Копируемый образец,
|
||||
\en Item to copy, \~
|
||||
\param[in] iReg - \ru Регистратор дублей.
|
||||
\en Replica registry. \~
|
||||
*/
|
||||
explicit MbPMI( const MbPMI & init, MbRegDuplicate * iReg = nullptr );
|
||||
public:
|
||||
|
||||
/// \ru Получить тип элемента аннотации. \en Get PMI type.
|
||||
@@ -798,7 +824,6 @@ public:
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbPMI )
|
||||
private:
|
||||
MbPMI( const MbPMI& );
|
||||
const MbPMI& operator=( const MbPMI & ) = delete;
|
||||
};
|
||||
|
||||
|
||||
@@ -170,6 +170,11 @@ 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.
|
||||
IDS_ITEM_0273, ///< \ru NURBS-копия каркаса. \en Nurbs-copy by wire frame.
|
||||
IDS_ITEM_0274, ///< \ru Усеченный каркас. \en Trimmed wire frame.
|
||||
IDS_ITEM_0275, ///< \ru Развернутая точка. \en Unwrapped point.
|
||||
IDS_ITEM_0276, ///< \ru Свёрнутая точка. \en Wrapped point.
|
||||
|
||||
|
||||
// \ru Типы параметрических поверхностей. \en Types of parametric surfaces.
|
||||
@@ -819,6 +824,9 @@ enum MbePrompt
|
||||
IDS_PROP_0469, ///< \ru Разделять оболочку на грани. \en Division the shell into faces.
|
||||
IDS_PROP_0470, ///< \ru Обрезать опору по касательной. \en Trim the support faces tangentially.
|
||||
|
||||
IDS_PROP_0471, ///< \ru Сохранять параметризацию. \en Save parameterization.
|
||||
IDS_PROP_0472, ///< \ru Строить на продолжении. \en Build on continuation.
|
||||
|
||||
IDS_PROP_0501, ///< \ru Число вершин. \en Number of vertices.
|
||||
IDS_PROP_0502, ///< \ru Число ребер. \en Number of edges.
|
||||
IDS_PROP_0503, ///< \ru Число граней. \en Number of faces.
|
||||
@@ -1012,7 +1020,6 @@ enum MbePrompt
|
||||
IDS_PROP_0719, ///< \ru Полюс при umax. \en Pole at umax.
|
||||
IDS_PROP_0720, ///< \ru Полюс при vmin. \en Pole at vmin.
|
||||
IDS_PROP_0721, ///< \ru Полюс при vmax. \en Pole at vmax.
|
||||
IDS_PROP_0722, ///< \ru Сохранение круговой обработки угла. \en Keeping circular reliefs.
|
||||
IDS_PROP_0724, ///< \ru Вершина. \en Vertex.
|
||||
IDS_PROP_0725, ///< \ru Ребро. \en Edge.
|
||||
IDS_PROP_0726, ///< \ru Цикл. \en Loop.
|
||||
@@ -1134,7 +1141,7 @@ enum MbePrompt
|
||||
IDS_PROP_0879, ///< \ru Видимость. \en Visibility.
|
||||
IDS_PROP_0880, ///< \ru Изменённость. \en Modified.
|
||||
IDS_PROP_0881, ///< \ru Общий фон. \en Background.
|
||||
IDS_PROP_0882, ///< \ru Диффузное отражение. \en Diffuse reflection.
|
||||
IDS_PROP_0882, ///< \ru Диффузное отражение (компонент red). \en Diffuse reflection (red component).
|
||||
IDS_PROP_0883, ///< \ru Зеркальное отражение. \en Specular reflection.
|
||||
IDS_PROP_0884, ///< \ru Блеск. \en Shininess.
|
||||
IDS_PROP_0885, ///< \ru Непрозрачность. \en Opacity.
|
||||
@@ -1144,6 +1151,9 @@ enum MbePrompt
|
||||
IDS_PROP_0889, ///< \ru Имя топологического объекта. \en Topological object name.
|
||||
IDS_PROP_0890, ///< \ru Имя объекта. \en Object name.
|
||||
IDS_PROP_0891, ///< \ru Хэш имени объекта. \en Object name hash.
|
||||
IDS_PROP_0892, ///< \ru Диффузное отражение (компонент green). \en Diffuse reflection (green component).
|
||||
IDS_PROP_0893, ///< \ru Диффузное отражение (компонент blue). \en Diffuse reflection (blue component).
|
||||
IDS_PROP_0894, ///< \ru Диффузное отражение (компонент alpha). \en Diffuse reflection (alpha component).
|
||||
|
||||
IDS_PROP_0900, ///< \ru Сопряжение в точке. \en Conjugation at point.
|
||||
IDS_PROP_0901, ///< \ru Тип сопряжения. \en Conjugation type.
|
||||
|
||||
@@ -214,6 +214,8 @@ public:
|
||||
/// \ru Вычислить расстояние до точки. \en Calculate the distance to a point.
|
||||
double DistanceToPoint( const MbCartPoint & to,
|
||||
uint & outcodes ) const;
|
||||
/// \ru Вычислить квадрат расстояния до точки. \en Calculate the square of distance to a point.
|
||||
double DistanceToPoint2( const MbCartPoint & pnt ) const;
|
||||
|
||||
/** \brief \ru Вычислить расстояние до куба.
|
||||
\en Calculate the distance to the cube. \~
|
||||
@@ -583,6 +585,18 @@ double MbRect::DistanceToPoint( const MbCartPoint & pnt ) const
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Квадрат расстояния до точки \en square of distance to a point
|
||||
// ---
|
||||
inline
|
||||
double MbRect::DistanceToPoint2( const MbCartPoint & pnt ) const
|
||||
{
|
||||
double dx = std_min( 0., std_min( pnt.x - left, right - pnt.x ) );
|
||||
double dy = std_min( 0., std_min( pnt.y - bottom, top - pnt.y ) );
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Расстояние до точки \en Distance to a point
|
||||
// ---
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
@@ -461,7 +461,7 @@ public:
|
||||
float & tRes );
|
||||
|
||||
/** \brief \ru Найти индекс треугольника или четырехугольника, ближайших к точке.
|
||||
\en Find index of triangle or quadrangle which is closect to a point. \~
|
||||
\en Find index of triangle or quadrangle which is closest to a point. \~
|
||||
\param[in] pnt - \ru Точка.
|
||||
\en Point. \~
|
||||
\param[out] pntProj - \ru Ближайшая точка на сетке.
|
||||
|
||||
@@ -1188,7 +1188,7 @@ public:
|
||||
/// \ru Готово ли дерево поиска элементов. \en Whether is elements search tree ready.
|
||||
bool IsSearchTreeReady() const;
|
||||
/// \ru Создать дерево поиска элементов. \en Create elements search tree.
|
||||
bool CreateSearchTree() const;
|
||||
bool CreateSearchTree( size_t leafElemCount = 100 ) const;
|
||||
/// \ru Удалить дерево поиска элементов. \en Delete elements search tree.
|
||||
void DeleteSearchTree() const;
|
||||
/** \brief \ru Найти индексы треугольников и четырехугольников, потенциально пересекающихся с лучом.
|
||||
@@ -1208,7 +1208,7 @@ public:
|
||||
*/
|
||||
bool FindIntersectingElementsByCubesTree( const MbAxis3D & ray, c3d::IndicesVector & triIndices, c3d::IndicesVector & quadIndices, double eps = METRIC_EPSILON ) const;
|
||||
/** \brief \ru Найти индекс треугольника или четырехугольника, ближайших к точке.
|
||||
\en Find index of triangle or quadrangle which is closect to a point. \~
|
||||
\en Find index of triangle or quadrangle which is closest to a point. \~
|
||||
\param[in] pnt - \ru Точка.
|
||||
\en Point. \~
|
||||
\param[out] pntProj - \ru Ближайшая точка на сетке.
|
||||
@@ -1243,7 +1243,7 @@ private :
|
||||
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
|
||||
void operator = ( const MbGrid & );
|
||||
/** \brief \ru Найти индекс треугольника или четырехугольника, ближайших к точке, простым перебором.
|
||||
\en Find index of triangle or quadrangle which is closect to a point by a brutforce method. \~
|
||||
\en Find index of triangle or quadrangle which is closest to a point by a brutforce method. \~
|
||||
\param[in] pnt - \ru Точка.
|
||||
\en Point. \~
|
||||
\param[out] pntProj - \ru Ближайшая точка на сетке.
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
#include <templ_rp_array.h>
|
||||
#include <mb_cart_point3d.h>
|
||||
#include <name_item.h>
|
||||
#include <topology.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbCurveEdge;
|
||||
class MATH_CLASS MbFaceShell;
|
||||
class MATH_CLASS MbItem;
|
||||
|
||||
@@ -81,7 +80,7 @@ int PointCompare3D ( const MbCartPoint3D & p1, const MbCartPoint3D & p2, double
|
||||
\ingroup Names
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (void) SetShellNames( RPArray<MbCurveEdge> & edges,
|
||||
MATH_FUNC (void) SetShellNames( const RPArray<MbCurveEdge> & edges,
|
||||
const RPArray<MbFace> & faces,
|
||||
const MbSNameMaker & nameMaker,
|
||||
bool processVertexes );
|
||||
@@ -106,6 +105,25 @@ MATH_FUNC (void) SetFacesNames( const RPArray<MbFace> & faces,
|
||||
bool processVertexes );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Установить имена элементам оболочки.
|
||||
\en Set names for elements of shell. \~
|
||||
\details \ru Установить имена граням оболочки.
|
||||
\en Set names for faces of shell. \~
|
||||
\param[in] faces - \ru Множество граней.
|
||||
\en An array of faces. \~
|
||||
\param[in] nameMaker - \ru Именователь.
|
||||
\en An object for naming the new objects. \~
|
||||
\param[in] processVertexes - \ru Устанавливать ли имена вершинам.
|
||||
\en Whether to set names to vertices. \~
|
||||
\ingroup Names
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (void) SetFacesNames( const c3d::FacesVector & faces,
|
||||
const MbSNameMaker & nameMaker,
|
||||
bool processVertexes );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Установить имена элементам оболочки.
|
||||
\en Set names for elements of shell. \~
|
||||
|
||||
@@ -534,10 +534,13 @@ public:
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbExtendedIndex( const MbItemIndex & fIndex, const std::vector<MbItemIndex> & eIndices )
|
||||
: faceIndex( fIndex )
|
||||
, edgeIndices( eIndices )
|
||||
{}
|
||||
template <class ItemIndexVector>
|
||||
MbExtendedIndex( const MbItemIndex & fIndex, const ItemIndexVector & eIndices )
|
||||
: faceIndex ( fIndex )
|
||||
, edgeIndices( )
|
||||
{
|
||||
edgeIndices.assign( eIndices.begin(), eIndices.end() );
|
||||
}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbExtendedIndex( const MbExtendedIndex & other )
|
||||
: faceIndex( other.faceIndex )
|
||||
|
||||
+497
-175
@@ -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 )
|
||||
};
|
||||
|
||||
@@ -700,7 +708,7 @@ OBVIOUS_PRIVATE_COPY( MbSurfaceOffsetCurveParams )
|
||||
\ingroup Data_Structures
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbCurveExtensionEnds : public MbPrecision
|
||||
class MATH_CLASS MbCurveExtensionEnds
|
||||
{
|
||||
private:
|
||||
MbeCurveExtensionWays _extensionWay; ///< \ru Способ продления. \en The way to extend. \~
|
||||
@@ -755,7 +763,7 @@ public:
|
||||
double GetExtensionLength() const { return _extensionLength; }
|
||||
|
||||
/// \ru Проверка на равенство. \en Check if *this == other. \~
|
||||
bool IsEqual( const MbCurveExtensionEnds & other ) const;
|
||||
bool IsEqual( const MbCurveExtensionEnds & other, double acuracy = Math::metricPrecision ) const;
|
||||
|
||||
/// \ru Оператор присваивания. \en Assignment operator. \~
|
||||
MbCurveExtensionEnds & operator=( const MbCurveExtensionEnds & other );
|
||||
@@ -773,6 +781,16 @@ KNOWN_OBJECTS_RW_REF_OPERATORS( MbCurveExtensionEnds ) // \ru Для работ
|
||||
// ---
|
||||
class MATH_CLASS MbCurveExtensionLinear : public MbCurveExtensionEnds
|
||||
{
|
||||
private:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор по умолчанию (не реализован).
|
||||
\en Default constructor (not implemented). \~
|
||||
*/
|
||||
// ---
|
||||
MbCurveExtensionLinear();
|
||||
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор.
|
||||
@@ -796,6 +814,16 @@ public:
|
||||
// ---
|
||||
class MATH_CLASS MbCurveExtensionCircular : public MbCurveExtensionEnds
|
||||
{
|
||||
private:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор по умолчанию (не реализован).
|
||||
\en Default constructor (not implemented). \~
|
||||
*/
|
||||
// ---
|
||||
MbCurveExtensionCircular();
|
||||
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор.
|
||||
@@ -819,6 +847,16 @@ public:
|
||||
// ---
|
||||
class MATH_CLASS MbCurveExtensionNatural : public MbCurveExtensionEnds
|
||||
{
|
||||
private:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор по умолчанию (не реализован).
|
||||
\en Default constructor (not implemented). \~
|
||||
*/
|
||||
// ---
|
||||
MbCurveExtensionNatural();
|
||||
|
||||
public:
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор.
|
||||
@@ -1023,9 +1061,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 {
|
||||
@@ -1152,95 +1190,89 @@ 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
|
||||
*/ // ---
|
||||
/** \brief \ru Параметры для переноса копий двумерных кривых и точек на другой носитель.
|
||||
\en Parameters for transferring copies of two-dimensional curves and points 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
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbCurvesWrappingParams : public MbPrecision {
|
||||
private:
|
||||
c3d::ConstPlaneCurvesSPtrVector curves; ///< \ru Двумерные кривые, копии которых будут перенесены на другой носитель. \en 2d curves, copies of which will be transferred to another medium. \~
|
||||
c3d::SurfaceSPtr surface; ///< \ru Поверхность. \en The surface. \~
|
||||
MbPlacement3D place; ///< \ru Локальная система координат (ЛСК). \en The local coordinate system (LCS) of the curves. \~
|
||||
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? \~
|
||||
bool equals; ///< \ru Должны ли длины кривых на другом носителе соответствовать оригиналам? \en Should the lengths of the curves on another medium match the originals? \~
|
||||
bool uSeamStitch; ///< \ru Нужно ли сдвинуть кривые, попавшие краем на шов umax. \en Whether to shift curves with one end on umax seam. \~
|
||||
VERSION version; ///< \ru Версия алгоритма. \en Algorithm version. \~
|
||||
c3d::ConstPlaneCurvesSPtrVector _curves; ///< \ru Двумерные кривые, копии которых будут перенесены на другой носитель. \en 2d curves, copies of which will be transferred to another medium. \~
|
||||
c3d::ParamPointsVector _points; ///< \ru Двумерные точки, копии которых будут перенесены на другой носитель. \en 2d points, copies of which will be transferred to another medium. \~
|
||||
c3d::SurfaceSPtr _surface; ///< \ru Поверхность. \en The surface. \~
|
||||
c3d::SNameMakerSPtr _snMaker; ///< \ru Именователь с версией операции. Всегда не nullptr. \en Names maker with operation version. It cannot be nullptr.
|
||||
MbPlacement3D _place; ///< \ru Локальная система координат (ЛСК). \en The local coordinate system (LCS) of the curves. \~
|
||||
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? \~
|
||||
bool _keepLength; ///< \ru Должны ли длины кривых на другом носителе соответствовать оригиналам? \en Should the lengths of the curves on another medium match the originals? \~
|
||||
bool _uSeamStitch; ///< \ru Нужно ли сдвинуть кривые, попавшие краем на шов umax. \en Whether to shift curves with one end on umax seam. \~
|
||||
|
||||
private:
|
||||
/** \brief \ru Закрытый конструктор по-умолчанию.
|
||||
\en Default private constructor. \~
|
||||
\details \ru Закрытый конструктор по-умолчанию.
|
||||
\en Default private constructor. \~
|
||||
/** \brief \ru Конструктор по-умолчанию. Не реализован.
|
||||
\en Default private constructor. Not implemented. \~
|
||||
\details \ru Конструктор по-умолчанию. Не реализован.
|
||||
\en Default private constructor. Not implemented. \~
|
||||
*/
|
||||
MbCurvesWrappingParams();
|
||||
/** \brief \ru Конструктор копирования, копирует кривые и поверхности.
|
||||
\en Copy constructor, copies curves and surfaces.\~
|
||||
\details \ru Конструктор копирования, копирует кривые и поверхности.
|
||||
\en Copy constructor, copies curves and surfaces.\~
|
||||
*/
|
||||
MbCurvesWrappingParams( const MbCurvesWrappingParams & other );
|
||||
|
||||
/** \brief \ru Конструктор без кривых.
|
||||
\en Constructor with no curves.\~
|
||||
\details \ru Конструктор без кривых.
|
||||
\en Constructor with no curves.\~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\param[in] place - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\en The local coordinate system (LCS) of the plane. \~
|
||||
\param[in] xy_ - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
|
||||
\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 Поверхность для сворачивания/разворачивания.
|
||||
\param[in] surface - \ru Поверхность для сворачивания/разворачивания.
|
||||
\en The surface to wrap to/unwrap from. \~
|
||||
\param[in] uv_ - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
|
||||
\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] angle_ - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
|
||||
\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" поверхности.
|
||||
\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] equals_ - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\param[in] keepLength - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\en Should the lengths of the curves on another medium match the originals?\~
|
||||
\param[in] accuracy_ - \ru Точность построения.
|
||||
\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 Сохранить ли в классе параметров копию поверхности.
|
||||
\param[in] copySurface - \ru Сохранить ли в классе параметров копию поверхности.
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
const MbCartPoint & uv_,
|
||||
double angle_,
|
||||
bool sense_,
|
||||
bool equals_,
|
||||
double accuracy_,
|
||||
bool ,
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
MbCurvesWrappingParams( const MbPlacement3D & place,
|
||||
const MbCartPoint & xy,
|
||||
const MbSurface & surface,
|
||||
const MbCartPoint & uv,
|
||||
const MbSNameMaker & operNames,
|
||||
double angle,
|
||||
bool sense,
|
||||
bool keepLength,
|
||||
double accuracy,
|
||||
bool copySurface );
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\details \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
/** \brief \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\details \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\param[in] curves_ - \ru Двумерные кривые, копии которых будут свёрнуты/развёрнуты.
|
||||
\en 2d curves, copies of which will be wrapped/unwrapped. \~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
@@ -1265,7 +1297,9 @@ public:
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams with MbSNameMaker )
|
||||
MbCurvesWrappingParams( const c3d::PlaneCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
@@ -1280,54 +1314,11 @@ public:
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\details \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\param[in] curves_ - \ru 3d кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности.
|
||||
\en 3d curves, copies of which will be wrapped/unwrapped. It is expected that there are 2d curves on surface 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] 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] equals_ - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\en Should the lengths of the curves on another medium 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. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const c3d::ConstPlaneCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
const MbCartPoint & uv_,
|
||||
double angle_,
|
||||
bool sense_,
|
||||
bool equals_,
|
||||
double accuracy_,
|
||||
bool copyCurves_,
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\details \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\param[in] curves_ - \ru 3д кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности.
|
||||
/** \brief \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\details \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\param[in] curves_ - \ru 2d кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности.
|
||||
\en 2d curves, copies of which will be wrapped/unwrapped. It is expected that there are 2d curves on surface inside.\~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\en The local coordinate system (LCS) of the plane. \~
|
||||
@@ -1351,8 +1342,10 @@ public:
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const c3d::ConstSpaceCurvesSPtrVector & curves_,
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams with MbSNameMaker )
|
||||
MbCurvesWrappingParams( const c3d::ConstPlaneCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
@@ -1365,13 +1358,12 @@ public:
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор по 1 кривой.
|
||||
\en Constructor by 1 curve.\~
|
||||
\details \ru Конструктор по 1 кривой.
|
||||
\en Constructor by 1 curve.\~
|
||||
\param[in] curves_ - \ru 2д кривая, копия которой будет свёрнута/развёрнута.
|
||||
\en 2d curve, which copy will be wrapped/unwrapped. \~
|
||||
/** \brief \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\details \ru Конструктор по кривым.
|
||||
\en Constructor by curves.\~
|
||||
\param[in] curves_ - \ru 3д кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности.
|
||||
\en 3d curves, copies of which will be wrapped/unwrapped. It is expected that there are 2d curves on surface inside.\~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\en The local coordinate system (LCS) of the plane. \~
|
||||
\param[in] xy_ - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
|
||||
@@ -1394,8 +1386,10 @@ public:
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const c3d::ConstPlaneCurveSPtr & curve_,
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams with MbSNameMaker )
|
||||
MbCurvesWrappingParams( const c3d::ConstSpaceCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
@@ -1408,6 +1402,49 @@ public:
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
/** \brief \ru Конструктор по 1 кривой.
|
||||
\en Constructor by 1 curve.\~
|
||||
\details \ru Конструктор по 1 кривой.
|
||||
\en Constructor by 1 curve.\~
|
||||
\param[in] curve_ - \ru 2д кривая, копия которой будет свёрнута/развёрнута.
|
||||
\en 2d curve, which copy 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] 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] equals_ - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\en Should the lengths of the curves on another medium match the originals?\~
|
||||
\param[in] accuracy_ - \ru Точность построения.
|
||||
\en The accuracy. \~
|
||||
\param[in] copyCurve_ - \ru Сохранить ли в этом классе параметров копию кривой.
|
||||
\en Whether to save the curve copy in this parameter class. \~
|
||||
\param[in] copySurface_ - \ru Сохранить ли в классе параметров копию поверхности.
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams with MbSNameMaker )
|
||||
MbCurvesWrappingParams( const c3d::ConstPlaneCurveSPtr & curve_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
const MbCartPoint & uv_,
|
||||
double angle_,
|
||||
bool sense_,
|
||||
bool equals_,
|
||||
double accuracy_,
|
||||
bool copyCurve_,
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
/** \brief \ru Конструктор по 1 кривой.
|
||||
\en Constructor by 1 curve.\~
|
||||
@@ -1437,7 +1474,9 @@ public:
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
*/
|
||||
DEPRECATE_DECLARE_REPLACE( MbCurvesWrappingParams with MbSNameMaker )
|
||||
MbCurvesWrappingParams( const c3d::ConstSpaceCurveSPtr & curve_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
@@ -1451,6 +1490,215 @@ public:
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
/** \brief \ru Конструктор по двумерным кривым.
|
||||
\en Constructor by two-dimension curves.\~
|
||||
\details \ru Конструктор по двумерным кривым.
|
||||
\en Constructor by two-dimension curves.\~
|
||||
\param[in] curves - \ru 2d кривые, копии которых будут свёрнуты/развёрнуты.
|
||||
\en 2d 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 medium 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. \~
|
||||
*/
|
||||
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 3д кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности или плоскости.
|
||||
\en 3d curves, copies of which will be wrapped/unwrapped. It is expected that there are 2d 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 medium 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. \~
|
||||
*/
|
||||
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 2d-points to be translated to a new medium. \~
|
||||
\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. \~
|
||||
*/
|
||||
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 2d кривые, копии которых будут свёрнуты/развёрнуты.
|
||||
\en 2d curves, copies of which will be wrapped/unwrapped. \~
|
||||
\param[in] points - \ru Двумерные точки, которые будут перенесены на новый носитель.
|
||||
\en 2d-points to be translated to a new medium. \~
|
||||
\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 medium 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. \~
|
||||
*/
|
||||
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 Конструктор по пространственным кривым и (2d) точкам.
|
||||
\en Constructor by spatial curves and (2d) points.\~
|
||||
\details \ru Конструктор по пространственным кривым и (2d) точкам.
|
||||
\en Constructor by spatial curves and (2d) points.\~
|
||||
\param[in] curves - \ru 3д кривые, копии которых будут свёрнуты/развёрнуты.
|
||||
\en 3d curves, copies of which will be wrapped/unwrapped.\~
|
||||
\param[in] points - \ru Двумерные точки, которые будут перенесены на новый носитель.
|
||||
\en 2d-points to be translated to a new medium. \~
|
||||
\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 medium 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. \~
|
||||
*/
|
||||
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 Copy constructor.\~
|
||||
@@ -1467,84 +1715,75 @@ public:
|
||||
/// \ru Деструктор. \ en Destructor.
|
||||
~MbCurvesWrappingParams() {}
|
||||
|
||||
// Закрытые методы добавления кривых.
|
||||
private:
|
||||
/// \ru Добавить 2d или 3d кривые с проверкой на нули. \en 2d or 3d curves with nullptr check. \~
|
||||
template<class CurveVector>
|
||||
void AddCurves( const CurveVector & curves, bool copyCurves, MbRegDuplicate * iReg );
|
||||
/// \ru Добавить кривую без копирования с проверкой на nullptr. \en Add curve without copy and with nullptr check. \~
|
||||
void AddCurve( const MbCurve3D * curve );
|
||||
///< \ru Добавить кривую без копирования с проверкой на nullptr. \en Add curve without copy and with nullptr check. \~
|
||||
void AddCurve( const MbCurve * curve );
|
||||
///< \ru Добавить кривую с проверкой на nullptr. \en Add curve with nullptr check. \~
|
||||
void AddCurve( const MbCurve3D * curve, bool copyCurve /*= false */, MbRegDuplicate * iReg );
|
||||
///< \ru Добавить кривую с проверкой на nullptr. \en Add curve with nullptr check. \~
|
||||
void AddCurve( const MbCurve * curve, bool copyCurve /*= false */, MbRegDuplicate * iReg );
|
||||
|
||||
|
||||
public:
|
||||
/// \ru Дать двумерную кривую. \en Get two-dimensional curve by index. \~
|
||||
const c3d::ConstPlaneCurveSPtr & GetCurve( size_t i ) const { return curves[i]; }
|
||||
|
||||
/// \ru Дать двумерные кривые. \en Get two-dimensional curves. \~
|
||||
const c3d::ConstPlaneCurvesSPtrVector & GetCurves() const { return curves; }
|
||||
|
||||
/// \ru Дать двумерные кривые. \en Get two-dimensional curves. \~
|
||||
void GetCurves( c3d::ConstPlaneCurvesSPtrVector & retCurves ) const;
|
||||
const c3d::ConstPlaneCurvesSPtrVector & GetCurves() const { return _curves; }
|
||||
/// \ru Дать количество кривых. \en Get two-dimensional curves count. \~
|
||||
size_t GetCurvesCount() const { return curves.size(); }
|
||||
size_t GetCurvesCount() const { return _curves.size(); }
|
||||
|
||||
/// \ru Дать двумерные точки. \en Get the two-dimensional points. \~
|
||||
const c3d::ParamPointsVector & GetPoints() const { return _points; }
|
||||
/// \ru Дать количество точек. \en Get points count. \~
|
||||
size_t GetPointsCount() const { return _points.size(); }
|
||||
|
||||
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
|
||||
void SetCurve( size_t i, const MbCurve & c ) { if ( i < curves.size() ) curves[i].assign( const_cast<MbCurve *>(&c)); }
|
||||
void SetCurve( size_t i, const MbCurve & c, bool copy );
|
||||
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
|
||||
void SetCurve( size_t i, MbCurve * c ) { if ( i < curves.size() && c != nullptr ) curves[i].assign(c); }
|
||||
void SetCurve( size_t i, MbCurve * c, bool copy );
|
||||
/// \ru Дать локальную систему координат. \en Get the local coordinate system. \~
|
||||
const MbPlacement3D & GetPlacement() const { return place; }
|
||||
const MbPlacement3D & GetPlacement() const { return _place; }
|
||||
/// \ru Установить локальную систему координат. \en Set the local coordinate system. \~
|
||||
void SetPlacement( const MbPlacement3D & p ) { place = p; }
|
||||
void SetPlacement( const MbPlacement3D & p ) { _place = p; }
|
||||
/// \ru Дать локальную систему координат. \en Get the local coordinate system. \~
|
||||
MbPlacement3D & SetPlacement() { return place; }
|
||||
MbPlacement3D & SetPlacement() { return _place; }
|
||||
/// \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. \~
|
||||
const MbCartPoint & GetPlacePoint() const { return xy; }
|
||||
const MbCartPoint & GetPlacePoint() const { return _xy; }
|
||||
/// \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. \~
|
||||
void SetPlacePoint( const MbCartPoint & p ) { xy = p; }
|
||||
void SetPlacePoint( const MbCartPoint & p ) { _xy = p; }
|
||||
|
||||
/// \ru Дать поверхность. \en Get the surface. \~
|
||||
const MbSurface & GetSurface() const;
|
||||
|
||||
/// \ru Установить поверхность. \en Set the surface. \~
|
||||
void SetSurface( MbSurface & surf ) { surface.assign( &surf ); }
|
||||
void SetSurface( MbSurface & surf, bool copy ) { _surface.assign( copy? &(static_cast<MbSurface &>(surf.Duplicate())) : &surf ); }
|
||||
/// \ru Дать поверхность. \en Get the surface. \~
|
||||
MbSurface & SetSurface() { return *surface; }
|
||||
MbSurface & SetSurface() { return *_surface; }
|
||||
/// \ru Установить поверхность. \en Set the surface. \~
|
||||
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. \~
|
||||
const MbCartPoint & GetSurfacePoint() const { return uv; }
|
||||
const MbCartPoint & GetSurfacePoint() const { return _uv; }
|
||||
/// \ru Установить точку в области параметров поверхности. \en Set a point on the parametric plane "UV" of the surface corresponding to the point xy on the plane. \~
|
||||
void SetSurfacePoint( const MbCartPoint & p ) { uv = p; }
|
||||
void SetSurfacePoint( const MbCartPoint & p ) { _uv = p; }
|
||||
|
||||
/// \ru Дать угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en Get the angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
|
||||
double GetAngle() const { return angle; }
|
||||
double GetAngle() const { return _angle; }
|
||||
/// \ru Установить угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности. \en Set the angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
|
||||
void SetAngle( double a ) { angle = a; }
|
||||
void SetAngle( double a ) { _angle = a; }
|
||||
/// \ru Совпадают ли ориентации осей "X-Y" ЛСК и осей "U-V" поверхности. \en Whether the orientations of LCS "X-Y" axes and the surface "U-V" axes are same. \~
|
||||
bool IsSense() const { return sense; }
|
||||
bool IsSense() const { return _sense; }
|
||||
/// \ru Установить флаг совпадения направления оси "X" ЛСК и оси "U" поверхности. \en Set the coincidence of the directions of the "X" axis of the LSC and the "U" axis of the surface. \~
|
||||
void SetSense( bool s ) { sense = s; }
|
||||
void SetSense( bool s ) { _sense = s; }
|
||||
/// \ru Должна ли совпадать длина итоговых кривых оригинальным. \en Should the result curve length be equal to the original curve length? \~
|
||||
bool IsEquals() const { return equals; }
|
||||
bool IsEquals() const { return _keepLength; }
|
||||
/// \ru Установить требование совпадения длины кривых в плоскости и на поверхности? \en Set the curves length correspondence to the originals on the surface? \~
|
||||
void SetEquals( bool e ) { equals = e; }
|
||||
void SetEquals( bool e ) { _keepLength = e; }
|
||||
/// \ru Дать точность построения. \en Get an accuracy. \~
|
||||
double GetAccuracy() const { return GetPrecision(); }
|
||||
/// \ru Установить точность построения. \en Set an accuracy. \~
|
||||
void SetAccuracy( double acc ) { SetPrecision( acc ); }
|
||||
/// \ru Версия алгоритма. \en The version. \~
|
||||
VERSION GetVersion() const { return version; }
|
||||
VERSION GetVersion() const { return _snMaker->GetMathVersion(); }
|
||||
/// \ru Установить версию алгоритма. \en Set the algorithm version. \~
|
||||
void SetVersion( VERSION ver ) { version = ver; }
|
||||
void SetVersion( VERSION ver ) { _snMaker->SetMathVersion( ver ); }
|
||||
|
||||
/// \ru Проверка на валидность: поверхность не null и часть кривых не null. \en The validity check: whether surface is not null and some of the curves are not null. \~
|
||||
/// \ru Получить именователь. \en Get names maker.
|
||||
const MbSNameMaker & GetNameMaker() const { return *_snMaker; }
|
||||
|
||||
/// \ru Задать именователь. \en Set names maker.
|
||||
void SetNameMaker( const MbSNameMaker & newOperName ) { _snMaker->SetNameMaker( newOperName ); }
|
||||
|
||||
/// \ru Проверка на валидность: например поверхность не null и часть кривых не null. \en The validity check: e.g. whether surface is not null and some of the curves are not null. \~
|
||||
bool IsValid () const;
|
||||
|
||||
/// \ru Сравнение параметров. \en The comparison with other parameters. \~
|
||||
@@ -1563,7 +1802,7 @@ public:
|
||||
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. \~
|
||||
*/
|
||||
bool GetUSeamStitch() const { return uSeamStitch; }
|
||||
bool GetUSeamStitch() const { return _uSeamStitch; }
|
||||
/** \brief \ru Нужно ли сдвинуть кривые, попавшие одним краем на шов Umax.
|
||||
\en Whether to shift curves with one end on Umax seam.\~
|
||||
\details \ru Нужно ли сдвинуть кривые, попавшие краем на шов Umax. Если кривая попадает одним краем на шов Umax,
|
||||
@@ -1575,7 +1814,7 @@ public:
|
||||
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. \~
|
||||
*/
|
||||
void SetUSeamStitch( bool s ) { uSeamStitch = s; }
|
||||
void SetUSeamStitch( bool s ) { _uSeamStitch = s; }
|
||||
|
||||
/** \brief \ru Создать копию текущих параметров.
|
||||
\en Make a copy of current parameters.\~
|
||||
@@ -1613,10 +1852,93 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
MbCurvesWrappingParams & operator = ( const MbCurvesWrappingParams & other ); // \ru Приравнивание. \en Equal operator. \~
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbCurvesWrappingParams ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class. \~
|
||||
/// \ru Добавить 2d или 3d кривые с проверкой на нули. \en 2d or 3d curves with nullptr check. \~
|
||||
template<class CurveVector>
|
||||
void AddCurves( const CurveVector & curves, bool copyCurves, MbRegDuplicate * iReg );
|
||||
/// \ru Добавить кривую без копирования с проверкой на nullptr. \en Add curve without copy and with nullptr check. \~
|
||||
void AddCurve( const MbCurve3D * curve );
|
||||
///< \ru Добавить кривую без копирования с проверкой на nullptr. \en Add curve without copy and with nullptr check. \~
|
||||
void AddCurve( const MbCurve * curve );
|
||||
///< \ru Добавить кривую с проверкой на nullptr. \en Add curve with nullptr check. \~
|
||||
void AddCurve( const MbCurve3D * curve, bool copyCurve /*= false */, MbRegDuplicate * iReg );
|
||||
///< \ru Добавить кривую с проверкой на nullptr. \en Add curve with nullptr check. \~
|
||||
void AddCurve( const MbCurve * curve, bool copyCurve /*= false */, MbRegDuplicate * iReg );
|
||||
|
||||
///< \ru Добавить точки. \en Add points. \~
|
||||
void AddPoints( const c3d::ParamPointsVector & points_ );
|
||||
|
||||
/// \ru Добавить точку. \en Add point. \~
|
||||
void AddPoint( const MbCartPoint & uv_ );
|
||||
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbCurvesWrappingParams ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class. \~
|
||||
OBVIOUS_PRIVATE_COPY( MbCurvesWrappingParams )
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результат операции переноса копий двумерных кривых и точек на другой носитель.
|
||||
\en Result of operation to transfer copies of two-dimensional curves and points on another medium. \~
|
||||
\details \ru Результат операции переноса копий двумерных кривых и точек на другой носитель.
|
||||
\en Result of operation to transfer copies of two-dimensional curves and points on another medium. \~
|
||||
\ingroup Curve3D_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbCurvesWrappingResults : public MbOperationResults {
|
||||
private:
|
||||
c3d::WireFrameSPtr _resWire; ///< \ru Каркас кривых. \en Wire-frame. \~
|
||||
c3d::WireFrameSPtr _resPoints; ///< \ru Каркас для хранения точек. \en Frame to store points. \~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
MbCurvesWrappingResults();
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbCurvesWrappingResults() {};
|
||||
|
||||
/// \ru Переинициализировать хранилище результирующих кривых. Для внутреннего использования. \en Reinitialize container of result curves. For internal use.
|
||||
void InitFrames( const c3d::WireFrameSPtr & curves, const c3d::WireFrameSPtr & points ) { _resWire = curves; _resPoints = points; };
|
||||
|
||||
/// \ru Выдать количество кривых. \en Get number of curves.
|
||||
size_t GetCurvesCount() const { return _resWire.is_null() ? 0 : _resWire->GetEdgesCount(); }
|
||||
|
||||
/// \ru Выдать количество точек. \en Get number of points.
|
||||
size_t GetPointsCount() const { return _resPoints.is_null() ? 0 : _resPoints->GetEdgesCount(); }
|
||||
|
||||
/// \ru Получить 3D-кривые. \en Get 3D-curves.
|
||||
bool GetCurves( c3d::SpaceCurvesSPtrVector & curves ) const;
|
||||
|
||||
/// \ru Получить 2D-кривые. \en Get 2D-curves.
|
||||
bool GetCurves( c3d::PlaneCurvesSPtrVector & curves ) const;
|
||||
|
||||
/// \ru Отцепить кривые из владеющего указателя. \en Detach curves from owning pointer.
|
||||
bool DetachCurves( c3d::SpaceCurvesSPtrVector & curves );
|
||||
|
||||
/// \ru Отцепить кривые из владеющего указателя. \en Detach curves from owning pointer.
|
||||
bool DetachCurves( c3d::PlaneCurvesSPtrVector & curves );
|
||||
|
||||
/// \ru Получить 3D-точки. \en Get points.
|
||||
bool GetPoints( c3d::SpacePointsVector & points ) const;
|
||||
|
||||
/// \ru Получить 2D-точки. \en Get points.
|
||||
bool GetPoints( c3d::ParamPointsVector & points ) const;
|
||||
|
||||
/// \ru Отцепить точки из владеющего указателя. \en Detach points from owning pointer.
|
||||
bool DetachPoints( c3d::SpacePointsVector & points );
|
||||
|
||||
/// \ru Отцепить точки из владеющего указателя. \en Detach points from owning pointer.
|
||||
bool DetachPoints( c3d::ParamPointsVector & points );
|
||||
|
||||
/// \ru Выдать результирующий проволочный каркас со строителем. \en Get result wireframe with creator.
|
||||
const c3d::WireFrameSPtr & GetWireFrameCurves() const { return _resWire; };
|
||||
|
||||
/// \ru Выдать результирующий точечный каркас со строителем. \en Get result pointframe with creator.
|
||||
const c3d::WireFrameSPtr & GetWireFramePoints() const { return _resPoints; };
|
||||
|
||||
/// \ru Отцепить каркас кривых из владеющего указателя. \en Detach wireframe of curves from owning pointer.
|
||||
MbWireFrame * DetachWireFrameCurves() { return ::DetachItem( _resWire ); }
|
||||
|
||||
/// \ru Отцепить каркас точек из владеющего указателя. \en Detach wireframe of points from owning pointer.
|
||||
MbWireFrame * DetachWireFramePoints() { return ::DetachItem( _resPoints ); }
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры создания клотоиды.
|
||||
|
||||
@@ -72,8 +72,9 @@ enum MbeModifyingMode {
|
||||
|
||||
dmm_UniteFaces = 100, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
|
||||
dmm_RotateFaces = 110, ///< \ru Поворот выбранных граней тела. \en Rotate the chosen faces.
|
||||
|
||||
dmm_RotateFaces = 110, ///< \ru Поворот выбранных граней тела с адаптацией прилегающих скруглений. \en Rotate the chosen faces with the adjacent fillets adaptation.
|
||||
dmm_RotateFacesNoFilletAdaptation = 111, ///< \ru Поворот выбранных граней тела без адаптации прилегающих скруглений. \en Rotate the chosen faces without the adjacent fillets adaptation.
|
||||
|
||||
dmm_FilletsRadiusChange = 120, ///< \ru Изменение радиусов выбранных граней скругления на заданную величину. \en Change of radii of the specified fillet faces for the set value.
|
||||
|
||||
dmm_FilletsRadiusSet = 130, ///< \ru В разработке. Установка радиусов выбранных граней скругления для цепочки гладко состыкованных скруглений. \en Under development. Set the radii for the specified smoothly joined fillet faces chain.
|
||||
@@ -403,7 +404,8 @@ public:
|
||||
Для удаления всех скруглений тела, меньших определённого радиуса _modificationType==dmm_PurifyFilletsBelowRadius.\n
|
||||
8. Слияние вершин ребёр и удаление рёбер dmm_DeleteEdges. \n
|
||||
9. Замена гладко стыкующихся граней одной гранью dmm_UniteFaces. \n
|
||||
10. Поворот выбранных граней dmm_RotateFaces. Угол поворота определяется параметром angle,
|
||||
10. Поворот выбранных граней dmm_RotateFaces с адаптацией прилегающих скруглений
|
||||
или dmm_RotateFacesNoFilletAdaptation без адаптации. Угол поворота определяется параметром angle,
|
||||
ось поворота определяется осью axis.\n
|
||||
11. Замена выбранных граней тела dmm_ReplaceFaces.\n
|
||||
|
||||
@@ -428,7 +430,8 @@ public:
|
||||
Remove all fillets below specified radius from a solid _modificationType==dmm_PurifyFilletsBelowRadius.\n
|
||||
8. Edge vertices merging and edges removal dmm_DeleteEdges. \n
|
||||
9. Replacement of the smoothly joined faces with a single face dmm_UniteFaces. \n
|
||||
10. Rotation of the chosen faces dmm_RotateFaces. The parameters are the rotation angle
|
||||
10. Rotation of the chosen faces dmm_RotateFaces with the adjacent fillets adaptation
|
||||
or dmm_RotateFacesNoFilletAdaptation without the adaptation. The parameters are the rotation angle
|
||||
and the rotation axis.\n
|
||||
11. Replacement of the specified faces of a solid dmm_ReplaceFaces.\n
|
||||
\~
|
||||
@@ -467,8 +470,8 @@ private:
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces, dmm_RotateFacesNoFilletAdaptation.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces, dmm_RotateFacesNoFilletAdaptation. \~
|
||||
\param[in] axis - \ru Ось вращения.
|
||||
\en Rotation axis. \~
|
||||
\param[in] angle - \ru Угол вращения.
|
||||
@@ -551,8 +554,8 @@ public:
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces. \~
|
||||
\param[in] type - \ru Тип модификации. Для данного конструктора доступны: dmm_RotateFaces, dmm_RotateFacesNoFilletAdaptation.
|
||||
\en Modification type. Available types for this constructor are: dmm_RotateFaces, dmm_RotateFacesNoFilletAdaptation. \~
|
||||
\param[in] names - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] faces - \ru Список граней для модификации.
|
||||
@@ -695,18 +698,31 @@ public:
|
||||
\en Get faces from values. \~
|
||||
\details \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\param[out] faces - \ru Массив указателей на грани тела, имеющиеся добавляются в конец.
|
||||
\en Array of faces pointers, existing values are added at the end.\~
|
||||
\param[out] faces - \ru Массив индексов граней в оболочке, имеющиеся добавляются в конец.
|
||||
\en Array of faces indices in shell, existing values are added at the end.\~
|
||||
*/
|
||||
void GetFaces( c3d::ItemIndices & faces ) const;
|
||||
/** \brief \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\details \ru Получить грани из параметров.
|
||||
\en Get faces from values. \~
|
||||
\param[out] faces - \ru Массив индексов граней в оболочке, имеющиеся добавляются в конец.
|
||||
\en Array of faces indices in shell, existing values are added at the end.\~
|
||||
*/
|
||||
void GetFaces( SArray<MbItemIndex> & faces ) const;
|
||||
|
||||
/** \brief \ru Получить грани из параметров для указанной оболочки.
|
||||
\en Get faces from values for the given shell. \~
|
||||
\details \ru Получить грани из параметров для указанной оболочки.
|
||||
\en Get faces from values for the given shell. \~
|
||||
\param[in] shell - \ru Оболочка, в которой ищем грани.
|
||||
\en Shell, where the faces are searched for.\~
|
||||
\param[out] faces - \ru Массив указателей на грани тела, имеющиеся добавляются в конец.
|
||||
\en Array of faces pointers, existing values are added at the end.\~
|
||||
*/
|
||||
void GetFaces( SArray<MbItemIndex> & faces ) const;
|
||||
template<class FacesArray>
|
||||
MATH_FUNC( void ) FindFaces( const MbFaceShell & shell, FacesArray & faces ) const;
|
||||
|
||||
|
||||
/** \ru \name Функции добавления рёбер.
|
||||
\en \name Functions to add edges.
|
||||
@@ -829,15 +845,21 @@ public:
|
||||
class MATH_CLASS MbModifiedSolidResults : public MbOperationResults
|
||||
{
|
||||
public:
|
||||
SPtr<MbSolid> _resSolid; ///< \ru Результирующее тело. \en The resulting body.
|
||||
double _maxDifUnited; ///< \ru Максимальное отклонение объединённой поверхности от присланных граней (оценочная величина). \en The maximum deviation of the united surfaces from the input surfaces (approximate value).
|
||||
c3d::SurfacesSPtrVector _surfaces; ///< \ru Список поверхностей (только для dmm_ConvertFacesToNurbs). \en The list of surfaces (only for dmm_ConvertFacesToNurbs).
|
||||
SPtr<MbSolid> _resSolid; ///< \ru Результирующее тело. \en The resulting body.
|
||||
double _maxDifUnited; ///< \ru Максимальное отклонение объединённой поверхности от присланных граней (оценочная величина). \en The maximum deviation of the united surfaces from the input surfaces (approximate value).
|
||||
c3d::SurfacesSPtrVector _surfaces; ///< \ru Список поверхностей (только для dmm_ConvertFacesToNurbs). \en The list of surfaces (only for dmm_ConvertFacesToNurbs).
|
||||
|
||||
private:
|
||||
c3d::IndicesVector _replacementOptionsNumbers; ///< \ru Количество возможных вариантов замены граней. \en Estimated numbers of options for replacing faces.
|
||||
|
||||
public:
|
||||
// \ru Конструктор. \en Constructor.
|
||||
MbModifiedSolidResults()
|
||||
: MbOperationResults()
|
||||
, _resSolid()
|
||||
, _maxDifUnited( -1. )
|
||||
, _surfaces()
|
||||
, _replacementOptionsNumbers()
|
||||
{}
|
||||
/** \brief \ru Получить нормаль и хот-точку на первой грани для операции по установке радиусов граням скругления.
|
||||
\en Get normal and hot point on first face for operation of setting radius of fillet faces . \~
|
||||
@@ -845,11 +867,95 @@ 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. \~
|
||||
*/
|
||||
//DEPRECATE_DECLARE_REPLACE(GetFilletRadiusSetHotPoint with a third argument of type double)
|
||||
bool GetFilletRadiusSetHotPoint( MbCartPoint3D & pointOnFilletFace,
|
||||
MbAxis3D & circleCenter ) const;
|
||||
/** \brief \ru Получить нормаль, хот-точку и угол раскрыва скругления на первой грани для операции по установке радиусов граням скругления.
|
||||
\en Get normal, hot point and opening angle of the fillet on first face for operation of setting radius of fillet faces . \~
|
||||
\details \ru В центре грани скругления берётся точка pointOnFilletFace. Через неё строится
|
||||
плоскость, перпендикулярная поверхности скругления или содержащая линию u(или v) = const.
|
||||
Эта линию является дугой окружности в этой плоскости. Ось circleCenter начинается
|
||||
из центра этой дуги и направлена перпендикулярно этой плоскости. Таким образом, расстояние
|
||||
между началом оси и точкой на грани равно радиусу скругления. Угол раскрыва alpha - угол между
|
||||
радиусами, проведёнными в рассматриваемой плоскости от центра дуги окружности до её граничных точек.
|
||||
\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. The opening angle alpha is the angle between the radii
|
||||
drawn in the considered plane from the center of the circular arc to its boundary points. \~
|
||||
\param[out] pointOnFilletFace - \ru Точка, лежащая на грани скругления нового радиуса.
|
||||
\en Point on the new radius fillet face. \~
|
||||
\param[out] circleCenter - \ru Ось вдоль оси грани скругления.
|
||||
\en Axis along the fillet axis.\~
|
||||
\param[out] alpha - \ru Угол раскрыва скругления.
|
||||
\en Opening angle of the fillet.\~
|
||||
\return \ru Возвращает "true", если хот-точка была рассчитана.
|
||||
\en Returns "true" if the hot-point is calculated. \~
|
||||
*/
|
||||
bool GetFilletRadiusSetHotPoint( MbCartPoint3D & pointOnFilletFace,
|
||||
MbAxis3D & circleCenter,
|
||||
double & alpha ) const;
|
||||
|
||||
/** \brief \ru Получить хот-точку и нормаль на грани для операции модифицирования граней.
|
||||
\en Get hot point and normal on a face for face modification operation. \~
|
||||
\details \ru Хот-точка размещается в центре первой замещающей грани.
|
||||
\en The hot point is placed at the center of the first replacement face.\~
|
||||
\param[out] pnt - \ru Точка, лежащая в центре первой замещающей грани.
|
||||
\en The point at the center of the first replacement face. \~
|
||||
\param[out] dir - \ru Вектор направления смещения хот-точки.
|
||||
\en Hot point displacement direction vector.\~
|
||||
\return \ru Возвращает "true", если хот-точка была рассчитана.
|
||||
\en Returns "true" if the hot-point is calculated. \~
|
||||
*/
|
||||
bool GetReplaceFacesHotPoint( MbCartPoint3D & pnt,
|
||||
MbVector3D & dir ) const;
|
||||
|
||||
/** \brief \ru Получить константную ссылку на массив вариантов замены граней.
|
||||
\en Get a constant reference to an array of face replacement options. \~
|
||||
\details \ru Получить константную ссылку на массив вариантов замены граней.
|
||||
\en Get a constant reference to an array of face replacement options.\~
|
||||
\return \ru Возвращает константную сылку.
|
||||
\en Returns a constant reference. \~
|
||||
*/
|
||||
const c3d::IndicesVector & GetReplacementOptionsNumbers() const { return _replacementOptionsNumbers; }
|
||||
|
||||
/** \brief \ru Получить ссылку на массив вариантов замены граней.
|
||||
\en Get a reference to an array of face replacement options. \~
|
||||
\details \ru Получить ссылку на массив вариантов замены граней.
|
||||
\en Get a reference to an array of face replacement options.\~
|
||||
\return \ru Возвращает сылку.
|
||||
\en Returns a reference. \~
|
||||
*/
|
||||
c3d::IndicesVector & SetReplacementOptionsNumbers() { return _replacementOptionsNumbers; }
|
||||
|
||||
// \ru Очистка. \en Reset.
|
||||
void Reset()
|
||||
{
|
||||
@@ -857,6 +963,7 @@ public:
|
||||
_surfaces.clear();
|
||||
_maxDifUnited = -1.;
|
||||
_hotPoint.reset();
|
||||
_replacementOptionsNumbers.clear();
|
||||
}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbModifiedSolidResults );
|
||||
|
||||
@@ -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. \~
|
||||
|
||||
+532
-111
@@ -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;
|
||||
@@ -596,6 +598,7 @@ public:
|
||||
private:
|
||||
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
|
||||
void operator = ( const BorerValues & other );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( BorerValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
|
||||
};
|
||||
@@ -660,9 +663,11 @@ public:
|
||||
virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = nullptr ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
|
||||
virtual bool IsSame( const HoleValues &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
virtual void operator = ( const HoleValues & other ); // \ru Оператор присваивания. \en Assignment operator.
|
||||
|
||||
private:
|
||||
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
|
||||
void operator = ( const PocketValues & other );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( PocketValues ) // \ru Для работы со ссылками и объектами класса \en For treatment of references and objects of the class
|
||||
};
|
||||
@@ -771,9 +776,11 @@ public:
|
||||
virtual void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = nullptr ); // \ru Преобразовать элемент согласно матрице. \en Transform element according to the matrix.
|
||||
virtual bool IsSame( const HoleValues &, double accuracy ) const; // \ru Являются ли объекты равными? \en Determine whether an object is equal?
|
||||
virtual void operator = ( const HoleValues & other ); // \ru Оператор присваивания. \en Assignment operator.
|
||||
|
||||
private:
|
||||
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
|
||||
void operator = ( const SlotValues & other );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( SlotValues ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
};
|
||||
@@ -905,6 +912,7 @@ private:
|
||||
/// \ru Конструктор по умолчанию - запрещен. \en Default constructor - forbidden.
|
||||
FastenersValues()
|
||||
{}
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( FastenersValues ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
};
|
||||
@@ -1789,6 +1797,7 @@ private:
|
||||
bool CreateWeights( double wt );
|
||||
void SetCloudPlane( MbPlane * );
|
||||
bool CreateOwnCloudPlane();
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS_EX_BASE( NurbsSurfaceValues, MATH_FUNC_EX )
|
||||
};
|
||||
@@ -1990,6 +1999,8 @@ private:
|
||||
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.
|
||||
bool useProport; ///< \ru Выравнивать параметризацию кривых по длине. \en Align the parametrization of curves along the length.
|
||||
std::map<size_t, bool> splitU;// Набор кривых U-разделителей.
|
||||
std::map<size_t, bool> splitV;// Набор кривых V-разделителей.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
@@ -2248,6 +2259,13 @@ public:
|
||||
/// \ru Найти цепочку. \en Find chain.
|
||||
size_t FindChainV( const MbPolyline3D * curve ) const { return chainsV.FindIt( curve ); }
|
||||
|
||||
/// \ru Установить деление оболочки по указанной кривой. \en Set the division of the shell along the specified curve.
|
||||
bool SetSplitingCurve ( const MbCurve3D * curve, bool onIndependentParts = false );
|
||||
/// \ru Получить тип деления оболочки для указанной кривой. \en Get the shell division type for the specified curve.
|
||||
bool GetSplitingProp ( const MbCurve3D * curve, bool & onIndependentParts );
|
||||
/// \ru Отменить деление оболочки по указанной кривой. \en Cancel division of the shell along the specified curve.
|
||||
bool UnsetSplitingCurve( const MbCurve3D * curve );
|
||||
|
||||
/// \ru Установить точку. \en Set point.
|
||||
void SetPoint( const MbPoint3D * pnt );
|
||||
/// \ru Получить точку. \en Get point.
|
||||
@@ -2325,6 +2343,7 @@ private:
|
||||
MbCurve3D *& resCurve,
|
||||
const double mPrec,
|
||||
VERSION vers );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS_EX_BASE( MeshSurfaceValues, MATH_FUNC_EX )
|
||||
OBVIOUS_PRIVATE_COPY( MeshSurfaceValues )
|
||||
@@ -2559,6 +2578,7 @@ public:
|
||||
et_same = 0, ///< \ru По той же поверхности. \en Along the same surface.
|
||||
et_tangent, ///< \ru По касательной к краю. \en Along tangent to the edge.
|
||||
et_direction, ///< \ru По направлению. \en Along the direction.
|
||||
et_total, ///< \ru Количество всех режимов. \en Number of all modes.
|
||||
};
|
||||
/** \brief \ru Способы удлинения.
|
||||
\en Ways of extension. \~
|
||||
@@ -2566,9 +2586,9 @@ public:
|
||||
\en Ways of shell extension. \~
|
||||
*/
|
||||
enum ExtensionWay {
|
||||
ew_distance = -2, ///< \ru Продолжить на расстояние. \en Prolong on the distance.
|
||||
ew_vertex = -1, ///< \ru Продолжить до вершины. \en Prolong to the vertex.
|
||||
ew_shell = 0, ///< \ru Продолжить до оболочки. \en Prolong to the shell.
|
||||
ew_distance = -2, ///< \ru Продолжить на расстояние. \en Prolong on the distance.
|
||||
ew_vertex = -1, ///< \ru Продолжить до вершины. \en Prolong to the vertex.
|
||||
ew_shell = 0, ///< \ru Продолжить до оболочки. \en Prolong to the shell.
|
||||
};
|
||||
/** \brief \ru Способы построения боковых рёбер.
|
||||
\en Methods of construction of the lateral edges. \~
|
||||
@@ -2578,32 +2598,63 @@ public:
|
||||
enum LateralKind {
|
||||
le_normal = 0, ///< \ru По нормали к кромке. \en Along the normal to boundary.
|
||||
le_prolong, ///< \ru Продлить исходные рёбра. \en Extend the initial edges.
|
||||
le_total, ///< \ru Количество всех режимов. \en Number of all modes.
|
||||
};
|
||||
/** \brief \ru Способы продления до оболочки.
|
||||
\en Ways to extend to shell. \~
|
||||
\details \ru Способы продления до оболочки.
|
||||
\en Ways to extend to shell. \~
|
||||
*/
|
||||
enum ShellObstacleType {
|
||||
sot_ToShell = 0, ///< \ru До оболочки. \en To shell.
|
||||
sot_ThroughShellLayer, ///< \ru Через первый слой оболочки (до первого выхода из оболочки). \en Through the first shell layer.
|
||||
sot_Total, ///< \ru Количество всех режимов. \en Number of all modes.
|
||||
};
|
||||
|
||||
public:
|
||||
ExtensionType type; ///< \ru Тип удлинения. \en Type of extension.
|
||||
ExtensionWay way; ///< \ru Способ удлинения. \en Way of extension.
|
||||
LateralKind kind; ///< \ru Способ построения боковых рёбер. \en Method of construction of the lateral edges.
|
||||
MbCartPoint3D point; ///< \ru Точка, до которой удлинить. \en The point to extend.up to which.
|
||||
MbVector3D direction; ///< \ru Направление удлинения. \en Direction of extension.
|
||||
double distance; ///< \ru Расстояние. \en Distance.
|
||||
bool prolong; ///< \ru Продолжить по гладко стыкующимся рёбрам. \en Prolong along smoothly mating edges.
|
||||
bool combine; ///< \ru Объединять грани при возможности. \en Combine faces if it is possible.
|
||||
ExtensionType type; ///< \ru Тип удлинения. \en Type of extension.
|
||||
ExtensionWay way; ///< \ru Способ удлинения. \en Way of extension.
|
||||
LateralKind kind; ///< \ru Способ построения боковых рёбер. \en Method of construction of the lateral edges.
|
||||
MbCartPoint3D point; ///< \ru Точка, до которой удлинить. \en The point to extend.up to which.
|
||||
MbVector3D direction; ///< \ru Направление удлинения. \en Direction of extension.
|
||||
double distance; ///< \ru Расстояние. \en Distance.
|
||||
bool prolong; ///< \ru Продолжить по гладко стыкующимся рёбрам. \en Prolong along smoothly mating edges.
|
||||
bool combine; ///< \ru Объединять грани при возможности. \en Combine faces if it is possible.
|
||||
/** \brief \ru Построить упрощенную эквидистанту.
|
||||
\en Create equidistant with simplification. \~
|
||||
\details \ru Флаг, отвечающий за построение эквидистанты по средствам сдвига кривой по нормали к отрезку, соединяющему ее концы на расстояние distance.
|
||||
При этом, сдвинутая эквидистанта заменяется отрезком, если последний не пересекает габарита исходной кривой.
|
||||
\en A flag responsible for constructing an equidistant by shifting the curve along the normal to the segment connecting its ends at a given distance.
|
||||
In this case, the shifted equidistant is replaced by a segment if the latter does not intersect the gabarit of the original curve. \~
|
||||
*/
|
||||
bool simplify;
|
||||
private:
|
||||
MbFaceShell * shell; ///< \ru Оболочка, до которой продляются грани. \en A shell to which the faces are extended.
|
||||
MbItemIndex faceIndex; ///< \ru Номер грани в оболочке. \en The index of face in the shell.
|
||||
MbFaceShell * shell; ///< \ru Оболочка, до которой продляются грани. \en A shell to which the faces are extended.
|
||||
MbItemIndex faceIndex; ///< \ru Номер грани в оболочке. \en The index of face in the shell.
|
||||
ShellObstacleType toShellType; ///< \ru Способ продления до оболочки. \en Way to extend up to shell.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
ExtensionValues();
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
ExtensionValues( const ExtensionValues & other );
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
/// \ru Конструктор по параметрам. \en Constructor.
|
||||
ExtensionValues( ExtensionType t, ExtensionWay w, LateralKind k, const MbCartPoint3D & p,
|
||||
const MbVector3D & dir, double d, bool pro, bool comb, const MbFaceShell * s, const MbItemIndex & fIndex );
|
||||
const MbVector3D & dir, double d, bool pro, bool comb,
|
||||
const MbFaceShell * s, const MbItemIndex & fIndex );
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~ExtensionValues();
|
||||
public:
|
||||
/** \brief \ru Функция инициализации.
|
||||
\en Initialization function. \~
|
||||
\details \ru Функция инициализации по параметрам.
|
||||
\en Initialization function by parameters. \~
|
||||
\param[in] other - \ru Тип удлинения.
|
||||
\en Type of extension. \~
|
||||
\param[in] copyShell - \ru Копировать режущую оболочку-препятствие
|
||||
\en Copy obstacle shell. \~
|
||||
*/
|
||||
void Init( const ExtensionValues & other, bool copyShell = true );
|
||||
/** \brief \ru Функция инициализации.
|
||||
\en Initialization function. \~
|
||||
\details \ru Функция инициализации удлинения на расстояние.
|
||||
@@ -2634,18 +2685,36 @@ public:
|
||||
|
||||
/** \brief \ru Функция инициализации.
|
||||
\en Initialization function. \~
|
||||
\details \ru Функция инициализации удлинения до поверхности.
|
||||
\en Initialization function of extension to the surface. \~
|
||||
\details \ru Функция инициализации удлинения до (грани) оболочки.
|
||||
\en Initialization function of extension to the face of a shell. \~
|
||||
\param[in] t - \ru Тип удлинения.
|
||||
\en Type of extension. \~
|
||||
\param[in] k - \ru Способ построения боковых рёбер.
|
||||
\en Method of construction of the lateral edges. \~
|
||||
\param[in] f - \ru Грань оболочки.
|
||||
\en Face of the shell. \~
|
||||
\param[in] s - \ru Тело для замены оболочки.
|
||||
\en Solid for replacement of shell. \~
|
||||
\param[in] f - \ru Грань оболочки для остановки удлинения.
|
||||
\en Shell face as stopper of elongation. \~
|
||||
\param[in] s - \ru Целевая оболочка до (грани) которой выполняется удлинение оболочки по ребрам.
|
||||
\en Target shell (to the face of which) the working shell will be extending by the edges. \~
|
||||
\return \ru Возвращает true, если инициализация была выполнена успешно.
|
||||
\en Returns true, if initialization was successful or false otherwise. \~
|
||||
*/
|
||||
void InitByShell ( ExtensionType t, LateralKind k, const MbFace * f, const MbSolid * s );
|
||||
bool InitByShell ( ExtensionType t, LateralKind k, const MbFace * f, const MbSolid * s );
|
||||
/** \brief \ru Функция инициализации.
|
||||
\en Initialization function. \~
|
||||
\details \ru Функция инициализации удлинения до оболочки или через оболочку.
|
||||
\en Initialization function of extension up to a shell or through a shell. \~
|
||||
\param[in] t - \ru Тип удлинения.
|
||||
\en Type of extension. \~
|
||||
\param[in] k - \ru Способ построения боковых рёбер.
|
||||
\en Method of construction of the lateral edges. \~
|
||||
\param[in] s - \ru Целевая оболочка до (грани) которой выполняется удлинение оболочки по ребрам.
|
||||
\en Target shell (to the face of which) the working shell will be extending by the edges. \~
|
||||
\param[in] sot - \ru Режим обрезки с помощью оболочки.
|
||||
\en Cutting mode using shell. \~
|
||||
\return \ru Возвращает true, если инициализация была выполнена успешно.
|
||||
\en Returns true, if initialization was successful or false otherwise. \~
|
||||
*/
|
||||
bool InitByShell( ExtensionType t, LateralKind k, const MbSolid * s, ShellObstacleType sot = sot_ToShell );
|
||||
|
||||
/// \ru Преобразовать объект согласно матрице. \en Transform an object according to the matrix.
|
||||
void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = nullptr );
|
||||
@@ -2658,8 +2727,21 @@ public:
|
||||
const MbFaceShell * GetShell() const { return shell; }
|
||||
/// \ru Номер грани в оболочке. \en The index of face in the shell.
|
||||
const MbItemIndex & GetFaceIndex() const { return faceIndex; }
|
||||
/// \ru Замена оболочки и ее выбранной грани. \en Replacement of shell and its selected face.
|
||||
void SetShell( const MbFace * f, const MbSolid * s );
|
||||
/// \ru Получить режим обработки оболочки-препятствия. \en Get obstacle shell processing mode.
|
||||
ShellObstacleType GetObstacleType() const { return toShellType; }
|
||||
|
||||
/** \brief \ru Замена оболочки (и ее выбранной грани).
|
||||
\en Replacement of shell (and its selected face). \~
|
||||
\details \ru Замена оболочки (и ее выбранной грани). Оболочка копируется.
|
||||
\en Replacement of shell (and its selected face). The shell is copied. \~
|
||||
\param[in] f - \ru Грань оболочки для остановки удлинения.
|
||||
\en Shell face as stopper of elongation. \~
|
||||
\param[in] s - \ru Целевая оболочка до (грани) которой выполняется удлинение оболочки по ребрам.
|
||||
\en Target shell (to the face of which) the working shell will be extending by the edges. \~
|
||||
\return \ru Возвращает true, если инициализация была выполнена успешно.
|
||||
\en Returns true, if initialization was successful or false otherwise. \~
|
||||
*/
|
||||
bool SetShell( const MbFace * f, const MbSolid * s );
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
void operator = ( const ExtensionValues & other );
|
||||
|
||||
@@ -4935,9 +5017,9 @@ inline void MbEvolutionShellParams::SetContoursNames( const NamesPointers & cont
|
||||
class MATH_CLASS MbExtensionShellParams
|
||||
{
|
||||
private:
|
||||
std::vector<c3d::EdgeSPtr> _edges; ///< \ru Контейнер рёбер. \en The edges container. \~
|
||||
MbSNameMaker _operNames; ///< \ru Именователь. \en An object for naming the new objects. \~
|
||||
ExtensionValues _params; ///< \ru Параметры операции. \en The operation parameters. \~
|
||||
c3d::EdgesSPtrVector _edges; ///< \ru Контейнер рёбер. \en The edges container. \~
|
||||
MbSNameMaker _operNames; ///< \ru Именователь. \en An object for naming the new objects. \~
|
||||
ExtensionValues _params; ///< \ru Параметры операции. \en The operation parameters. \~
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
@@ -4951,9 +5033,9 @@ public:
|
||||
\param[in] operNames - \ru Именователь.
|
||||
\en An object for naming the new objects. \~
|
||||
*/
|
||||
MbExtensionShellParams( const std::vector<c3d::EdgeSPtr> & edges,
|
||||
const ExtensionValues & params,
|
||||
const MbSNameMaker & operNames );
|
||||
MbExtensionShellParams( const c3d::EdgesSPtrVector & edges,
|
||||
const ExtensionValues & params,
|
||||
const MbSNameMaker & operNames );
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметров продолжения незамкнутого тела выдавливанием без контейнера рёбер.
|
||||
@@ -4968,7 +5050,7 @@ public:
|
||||
MbExtensionShellParams( const ExtensionValues & params,
|
||||
const MbSNameMaker & operNames );
|
||||
|
||||
/// \ru Конструктор копирования. \en Copy constructor. \~
|
||||
/// \ru Конструктор "копирования" (не копирует ребра!!!). \en "Copy" constructor (does not copy edges!!!). \~
|
||||
MbExtensionShellParams( const MbExtensionShellParams & other );
|
||||
|
||||
public:
|
||||
@@ -4976,9 +5058,9 @@ public:
|
||||
template<class EdgeVector>
|
||||
void Add( const EdgeVector & edges )
|
||||
{
|
||||
size_t size = edges.size();
|
||||
_edges.reserve( size + _edges.size() );
|
||||
for ( size_t i = 0; i < size; ++i )
|
||||
size_t addCnt = edges.size();
|
||||
_edges.reserve( _edges.size() + addCnt );
|
||||
for ( size_t i = 0; i < addCnt; ++i )
|
||||
Add( edges[i] );
|
||||
}
|
||||
/// \ru Добавление ребра в контейнер рёбер. \en Add an edge to the edges container. \~
|
||||
@@ -4986,12 +5068,12 @@ public:
|
||||
/// \ru Добавление ребра в контейнер рёбер. \en Add an edge to the edges container. \~
|
||||
void Add( const c3d::EdgeSPtr & edge );
|
||||
/// \ru Получить контейнер рёбер. \en Get the edges container. \~
|
||||
void GetEdges( std::vector<c3d::EdgeSPtr> & edges ) const { edges.insert( edges.end(), _edges.begin(), _edges.end() ); }
|
||||
void GetEdges( c3d::EdgesSPtrVector & edges ) const { edges.insert(edges.end(), _edges.begin(), _edges.end()); }
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation. \~
|
||||
const MbSNameMaker & GetNameMaker() const { return _operNames; }
|
||||
/// \ru Получить параметры операции. \en Get the operation parameters. \~
|
||||
const ExtensionValues & GetParams() const { return _params; }
|
||||
/// \ru Оператор копирования. \en Copy operator. \~
|
||||
/// \ru Оператор "копирования" (не копирует ребра!!!). \en "Copy" operator (does not copy edges!!!). \~
|
||||
void operator = ( const MbExtensionShellParams & other );
|
||||
};
|
||||
|
||||
@@ -5491,6 +5573,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.
|
||||
|
||||
@@ -5499,6 +5592,10 @@ protected:
|
||||
SPtr<const MbElementarySurface> _initSurface; ///< \ru Исходная поверхность. \en Initial surface.
|
||||
c3d::SNameMakerSPtr _operNames; ///< \ru Именователь операции. \en An object defining names generation in the operation.
|
||||
|
||||
private:
|
||||
double _offset; ///< \ru Параметр смещения. \en Offset parameter.
|
||||
bool _isInverted; ///< \ru Признак инвертированного тела. \en Sign of an inverted body.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор параметров элементарного тела.
|
||||
\en Elementary solid parameter constructor. \~
|
||||
@@ -5539,9 +5636,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 +5649,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 +5661,137 @@ 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; }
|
||||
|
||||
@@ -5573,10 +5801,72 @@ public:
|
||||
/// \ru Получить исходную поверхность. \en Get the initial surface.
|
||||
const SPtr<const MbElementarySurface> & GetInitSurface() const { return _initSurface; }
|
||||
|
||||
/// \ru Получить смeщение. \en Get offset.
|
||||
const double GetOffsetValue() const { return _offset; }
|
||||
|
||||
/// \ru Получить признак инвертировонности тела. \en Get sign of an inverted body.
|
||||
const bool GetIsInvertedValue() const { return _isInverted; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbElementarySolidParams )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результаты построения элементарного тела.
|
||||
\en Results of construction an elementary solid. \~
|
||||
\details \ru Результаты построения элементарного тела.
|
||||
\en Results of construction an elementary solid. \~
|
||||
\ingroup ingroup Shell_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbElementarySolidResults : public MbOperationResults {
|
||||
private:
|
||||
c3d::SolidSPtr _solid; /// \ru Результирующее тело. \en Resulting solid.
|
||||
public:
|
||||
MbElementarySolidResults()
|
||||
: MbOperationResults()
|
||||
, _solid ()
|
||||
{}
|
||||
/// \ru Конструктор копирования. \en Copy-constructor.
|
||||
MbElementarySolidResults( const MbElementarySolidResults & other )
|
||||
: MbOperationResults( other )
|
||||
, _solid ( other._solid )
|
||||
{}
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
MbElementarySolidResults & operator = ( const MbElementarySolidResults & other ) {
|
||||
MbOperationResults::operator =( static_cast<const MbOperationResults &>(other) );
|
||||
_solid = other._solid;
|
||||
return *this;
|
||||
}
|
||||
/// \ru Функция инициализации. \en Initialization function.
|
||||
void Init( MbSolid * resultSolid ) {
|
||||
_solid = resultSolid;
|
||||
}
|
||||
/// \ru Получить результирующее тело. \en Get resulting solid.
|
||||
const c3d::SolidSPtr & GetResultSolid() const { return _solid; }
|
||||
/// \ru Отцепить результирующее тело. \en Detach resulting solid.
|
||||
MbSolid * DetachSolid() { return _solid.detach(); }
|
||||
/** \brief \ru Выдать хот-точки элементарного тела.
|
||||
\en Get hot points of elementary solid. \~
|
||||
\details \ru Выдать хот-точки элементарных тел: сфера, цилиндр, конус, параллелепипед.\n
|
||||
\en Get hot points of elementary solids: sphere, cylinder, cone, block.\n
|
||||
\param[out] hotPoints - \ru Набор хот-точек в зависимости от типа элементарного тела: \n
|
||||
et_Sphere: хот-точка радиуса сферы; \n
|
||||
et_Cylinder: хот-точка радиуса, хот-точка высоты в первом направлении, хот-точка высоты во втором направлении; \n
|
||||
et_Cone: хот-точка радиуса нижнего основания, хот-точка радиуса верхнего основания, хот-точка радиуса высоты, хот-точка радиуса угла в вершине; \n
|
||||
et_Block: хот-точка длины, хот-точка ширины, хот-точка высоты в первом направлении, хот-точка высоты во втором направлении; \n
|
||||
\en Hot points set depending on the type of elementary solid:
|
||||
et_Sphere: sphere radius hot-point; \n
|
||||
et_Cylinder: radius hot-point, height hot-point in 1st direction, height hot-point in 2nd direction; \n
|
||||
et_Cone: bottom radius hot-point, top radius hot-point, height hot-point,angle hot-point; \n
|
||||
et_Block: length hot-point, width hot-point, height hot-point in 1st direction, height hot-point in 2nd direction; \n
|
||||
\~
|
||||
\return \ru true, в случае успеха.
|
||||
\en true if success. \~
|
||||
*/
|
||||
bool GetElementarySolidHotPoints( std::vector<c3d::SpacePointVector> & hotPoints ) const;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры выделения в отдельное тело указанной части тела.
|
||||
\en Parameters for extracting a specified part of a decomposing solid. \~
|
||||
@@ -5730,45 +6020,95 @@ 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 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( std::vector<MbFace *> & 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 );
|
||||
|
||||
private :
|
||||
/// \ru Конструктор копирования не реализован. \en Copy-constructor not realize.
|
||||
MbFilletBundle( const MbFilletBundle & other );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbFilletBundle ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
|
||||
}; // MbFilletBundle
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -5783,23 +6123,28 @@ 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.
|
||||
bool _check; ///< \ru Проверять самопересечение построенной поверхности. \en Check the self-intersection of the constructed surface (default false). \~
|
||||
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 +6172,82 @@ 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 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 surfaces.
|
||||
void GetFaces1( std::vector<MbFace *> & fas ) const { _faceSet1.GetFaces( fas ); }
|
||||
void GetFaces1( RPArray<MbFace> & fas ) const { _faceSet1.GetFaces( fas ); }
|
||||
/// \ru Выдать поверхности. \en Get surfaces.
|
||||
void GetFaces2( std::vector<MbFace *> & fas ) const { _faceSet2.GetFaces( fas ); }
|
||||
void GetFaces2( RPArray<MbFace> & fas ) const { _faceSet2.GetFaces( fas ); }
|
||||
/// \ru С каких сторон касаться поверхностей? \en On which sides to touch surfaces?
|
||||
void GetFaceSide1( std::vector<bool> & fSide ) const { _faceSet1.GetFaceSide( fSide ); }
|
||||
/// \ru С каких сторон касаться поверхностей? \en On which sides to touch surfaces?
|
||||
void GetFaceSide2( std::vector<bool> & fSide ) const { _faceSet2.GetFaceSide( fSide ); }
|
||||
/// \ru Выдать номера опорных граней. \en Get reference face numbers.
|
||||
void GetFaceIndex1( std::vector<MbItemIndex> & fas ) const { _faceSet1.GetFaceIndex( fas ); }
|
||||
void GetFaceIndex2( std::vector<MbItemIndex> & fas ) const { _faceSet2.GetFaceIndex( fas ); }
|
||||
|
||||
/// \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 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 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 GetFaceHandling() const { return _handling; }
|
||||
void SetFaceHandling( 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 +6255,63 @@ 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 Check the self-intersection of the constructed surface.
|
||||
bool GetCheck() const { return _check; }
|
||||
void SetCheck( bool c ) { _check = c; }
|
||||
/// \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 Выдать версию постьроения. \en Get the build version. \~
|
||||
VERSION GetVersion() const { return _nameMaker.GetMathVersion(); }
|
||||
// \ru Установить версию постьроения. \en Set the build version. \~
|
||||
void SetVersion( VERSION v );
|
||||
|
||||
/// \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 Assignment operator without copying topological objects.
|
||||
void operator = ( const MbFilletData & other );
|
||||
|
||||
private:
|
||||
/// \ru Конструктор копирования не реализован. \en Copy-constructor not realize.
|
||||
MbFilletData( const MbFilletData & other );
|
||||
|
||||
public:
|
||||
KNOWN_OBJECTS_RW_REF_OPERATORS( MbFilletData ) // \ru Для работы со ссылками и объектами класса. \en For working with references and objects of the class.
|
||||
|
||||
}; // MbFilletData
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -6768,7 +7189,7 @@ public:
|
||||
\en Results of construction of a shell on swept mutable section surface. \~
|
||||
\details \ru Результаты построения оболочки с переменным коническим сечением.
|
||||
\en Results of construction of a shell on swept mutable section surface. \~
|
||||
\ingroup ingroup Shell_Building_Parameters
|
||||
\ingroup ingroup Shell_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbSectionResults : public MbOperationResults {
|
||||
|
||||
@@ -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; }
|
||||
@@ -2623,4 +2628,30 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры создания скалярной функции.
|
||||
\en Parameters of creating a scalar function. \~
|
||||
\details \ru Параметры создания скалярной функции.
|
||||
\en Parameters of creating a scalar function. \~
|
||||
\ingroup Function_Building_Parameters
|
||||
*/ // ---
|
||||
class MATH_CLASS MbFunctionParameters {
|
||||
private:
|
||||
bool _bNormalizeDir; ///< \ru Флаг согласования направления изменения функции с возрастанием X-координаты кривой.\en Flag for matching the function change direction with increasing X-coordinate of the curve.\~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbFunctionParameters( VERSION version = Math::DefaultMathVersion() )
|
||||
: _bNormalizeDir( version > C3D_2023_VERSION )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbFunctionParameters() {}
|
||||
|
||||
/// \ru Выдать флаг согласования направления изменения функции с направлением возрастания X-координаты кривой. \en Get a matching flag of the function change direction with the increase direction of the X-coordinate of the curve. \~
|
||||
bool NormalizeDir() const { return _bNormalizeDir; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbFunctionParameters );
|
||||
};
|
||||
|
||||
|
||||
#endif // __OP_SWEPT_PARAMETERS_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user