- C3d aggiornamento delle librerie ( 117910).
This commit is contained in:
SaraP
2022-08-09 08:56:28 +02:00
parent f29512578a
commit 4be7d59035
191 changed files with 6923 additions and 6366 deletions
+2 -1
View File
@@ -26,7 +26,8 @@
enum MbeExtremsSearchingMethod
{
esm_GradientDescent = 1, ///< \ru Mетод градиентного спуска. \en Gradient Descent Method.
esm_LineSegregation = 2 ///< \ru Mетод выделения линий смены убывания / возрастания функции по u и по v. \en The method of segregation of lines of change of decrease / increase of the function in u and v directions.
esm_LineSegregation = 2, ///< \ru Mетод выделения линий смены убывания / возрастания функции по u и по v. \en The method of segregation of lines of change of decrease / increase of the function in u and v directions.
esm_AdaptiveCells = 3, ///< \ru Mетод адаптивного дробления ячеек. \en Adaptive cell splitting method.
};
+122 -30
View File
@@ -130,6 +130,73 @@ public:
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры вписывания поверхности.
\en Parameters of surface fitting. \~
\ingroup Polygonal_Objects
*/
// ---
class MATH_CLASS MbSurfaceFitToGridParameters {
private:
MbeSpaceType _surfaceType; ///< \ru Тип поверхности. \en A surface type.
double _tolerance; ///< \ru Точность распознавания. \en A fitting tolerance.
const c3d::IndicesVector & _indicies; ///< \ru Индексы полигонов сетки. \en Indicies of polygons.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
double tolerance,
const c3d::IndicesVector & indicies )
: _surfaceType( surfaceType )
, _tolerance( tolerance )
, _indicies( indicies )
{}
/// \ru Выдать тип поверхности. \en Get surface type.
MbeSpaceType GetSurfaceType() const { return _surfaceType; }
/// \ru Выдать точность распознавания. \en Get fitting tolerance.
double GetTolerance() const { return _tolerance; }
/// \ru Выдать индексы полигонов. \en Get indicies of polygons.
const c3d::IndicesVector & GetIndicies() const { return _indicies; }
OBVIOUS_PRIVATE_COPY( MbSurfaceFitToGridParameters )
};
//------------------------------------------------------------------------------
/** \brief \ru Результат вписывания поверхности.
\en Parameters of surface fitting. \~
\ingroup Polygonal_Objects
*/
// ---
class MATH_CLASS MbSurfaceFitToGridResults {
private:
c3d::SurfaceSPtr _surface; ///< \ru Поверхность. \en A surface.
double _tolerance; ///< \ru Достигнутая точность распознавания. \en Obtained tolerance.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
MbSurfaceFitToGridResults()
: _surface ( nullptr )
, _tolerance( 0.0 )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbSurfaceFitToGridResults( MbSurface * surface, double tolerance )
: _surface( surface )
, _tolerance( tolerance )
{}
void Init( MbSurface * surface, double tolerance ) {
_surface = surface;
_tolerance = tolerance;
}
/// \ru Выдать поверхность. \en Get surface.
c3d::SurfaceSPtr GetSurface() const { return _surface; }
/// \ru Выдать достигнутую точность распознавания. \en Get obtained tolerance.
double GetTolerance() const { return _tolerance; }
OBVIOUS_PRIVATE_COPY( MbSurfaceFitToGridResults )
};
//------------------------------------------------------------------------------
/** \brief \ru Класс для создания оболочки в граничном представлении по полигональной сетке.
\en Class for creating a BRep shell by polygonal mesh. \~
@@ -292,7 +359,7 @@ public:
Если сегментация не была вычислена, то вычисляется автоматическая сегментация (с параметрами по умолчанию). \n
\en Create BRep shell that represents input mesh model.
Current segmentation is used.
If segmentation is not computed yet, then automatic segmentation is performed (with default paramters). \n \~
If segmentation is not computed yet, then automatic segmentation is performed (with default parameters). \n \~
\param[out] pShell - \ru Указатель на созданную оболочку.
\en The pointer to created shell. \~
\param[in] smoothBoundaryEdges - \ru Флаг сглаживания краевых ребер.
@@ -419,7 +486,7 @@ private: // UNDER DEVELOPMENT
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
virtual MbResultType SegmentMeshBySeparators( const std::vector<std::vector<uint>> & separators ) = 0;
virtual MbResultType SegmentMeshBySeparators( const std::vector<c3d::UintVector> & separators ) = 0;
OBVIOUS_PRIVATE_COPY( MbMeshProcessor )
};
@@ -428,20 +495,20 @@ private: // UNDER DEVELOPMENT
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку по полигональной сетке c автоматическим распознаванием поверхностей.
\en Create shell from mesh with automatic surface reconstruction. \~
\details \ru Создать оболочку в граничном представлении, соответствующее модели, заданной полигональной сеткой.
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
\en Create BRep shell that represents input mesh model.
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
\param[in] mesh - \ru Входная сетка.
\en The input mesh. \~
\param[out] shell - \ru Указатель на созданную оболочку.
\en The pointer to created shell. \~
\param[in] params - \ru Параметры построения оболочки тела.
\en Parameters of BRep shell construction. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
\details \ru Создать оболочку в граничном представлении, соответствующее модели, заданной полигональной сеткой.
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
\en Create BRep shell that represents input mesh model.
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
\param[in] mesh - \ru Входная сетка.
\en The input mesh. \~
\param[out] shell - \ru Указатель на созданную оболочку.
\en The pointer to created shell. \~
\param[in] params - \ru Параметры построения оболочки тела.
\en Parameters of BRep shell construction. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC( MbResultType ) ConvertMeshToShell( MbMesh & mesh, MbFaceShell *& shell, const MbMeshProcessorValues & params = MbMeshProcessorValues() );
@@ -450,22 +517,47 @@ MATH_FUNC( MbResultType ) ConvertMeshToShell( MbMesh & mesh, MbFaceShell *& shel
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку по коллекции, содержащей полигональную сетку c автоматическим распознаванием поверхностей.
\en Create shell from collection with automatic surface reconstruction. \~
\details \ru Создать оболочку в граничном представлении, соответствующую модели, заданной полигональной сеткой.
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
\en Create BRep shell that represents input mesh model from collection.
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
\param[in] collection - \ru Коллекция, содержащая входную сетку.
\en The input collection. \~
\param[out] shell - \ru Указатель на созданную оболочку.
\en The pointer to created shell. \~
\param[in] params - \ru Параметры построения оболочки тела.
\en Parameters of BRep shell construction. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
\details \ru Создать оболочку в граничном представлении, соответствующую модели, заданной полигональной сеткой.
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
\en Create BRep shell that represents input mesh model from collection.
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
\param[in] collection - \ru Коллекция, содержащая входную сетку.
\en The input collection. \~
\param[out] shell - \ru Указатель на созданную оболочку.
\en The pointer to created shell. \~
\param[in] params - \ru Параметры построения оболочки тела.
\en Parameters of BRep shell construction. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, MbFaceShell *& shell, const MbMeshProcessorValues & params = MbMeshProcessorValues() );
//------------------------------------------------------------------------------
/** \brief \ru Вписать поверхность в множество полигонов сетки.
\en Fit the surface into polygon set. \~
\details \ru Создать оболочку в граничном представлении, соответствующую модели, заданной полигональной сеткой.
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
\en Create BRep shell that represents input mesh model from collection.
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
\param[in] grid - \ru Исходная триангуляция.
\en The initial triangulation. \~
\param[in] params - \ru Параметры вписывания поверхности.
\en The fitting parameters. \~
\param[out] results - \ru Результаты вписывания поверхности.
\en Results of surface fitting. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC( MbResultType ) FitSurfaceToGrid( const MbGrid & grid, const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results );
#endif // __ACTION_B_SHAPER_H
+35
View File
@@ -1110,6 +1110,41 @@ MATH_FUNC (MbResultType) CreateFairBSplineCurveOnBasePolylineOfHermiteGD( MbCurv
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную и сглаживающую B-сплайновую кривую на опорной ломаной ГО Эрмита.
\en Create a fair B-spline curve on base polyline of Hermite GD. \~
\details \ru Создать плавную V-кривую на опорной ломаной и аппроксимировать B-сплайновой кривой. \n
Степень сплайна m, (m = 3, 4, ... , 9, 10) устанавливается в переменной degreeBSpline.
Для гармоничного перераспределения точек значение переменной arrange == true. В противном случае == false.
Для уплотнения кривой значение переменной subdivision > 0 (1 - для однократного уплотнения, 2 - для двукратного).
Направление вектора в точках перегиба учитывается по значению переменной accountInflexVector (0 - как направление звена S-полигона,
1 - как направление касательного вектора). \n
Кривизна в концевых точках учитывается по значению accountCurvature (0 - не учитывается, 1 - в начальной точке, 2 - в конечной точке, 3 - учитываются на обоих концах).
\en Create a fair V-curve on the base polyline and approximate by a B-spline curve. \ n
The degree of spline m, (m = 3, 4, ... , 9, 10) is set by variable degreeBSpline.
For harmonious redistribution of points, the value of the variable arrange == true. Otherwise, == false.
To subdivide a curve, the value of the variable subdivision > 0 (1 for a single subdivision, 2 for a double subdivision).
The directions of the tangent vectors of the Hermite GD determine the directions of the S-polygon segmentss. \n
The direction of the vector at the inflection points is taken into account by the value of the variable InflexVector (0 - as the direction of the S-polygon segment, \ n
1 - as the direction of the tangent vector). \n
The curvature at the end points is taken into account by the value of accountCurvature (0 - not taken into account, 1 - at the start point, 2 - at the end point, 3 - are taken into account at both ends). \~
\attention \ru Экспериментальный класс. \en Experimental class. \~
\param[in] polyline - \ru Исходная ломаная.
\en An initial polyline. \~
\param[in] data - \ru Данные построения кривой.
\en The curve construction data. \~
\param[out] result - \ru Сплайновая кривая.
\en The spline curve. \~
\return \ru Возвращает значение результата операции. 0 - при успешном построении кривой. При > 0 значение равно номеру сообщения об ошибке из списка сообщений метода MessageError.
\en Returns operation result value. 0 - upon successful creation of the curve. If > 0, the value is equal to the error message number from the message list of the MessageError method.\~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnBasePolylineOfHermiteGDInflex( MbCurve3D * pllne,
MbFairCurveData & data,
MbCurve3D *& resCurve );
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную B-сплайновую кривую на касательных прямых ГО Эрмита.
\en Create a fair B-spline curve on tangent lines of Hermite GD. \~
+72 -75
View File
@@ -18,12 +18,12 @@
#include <mesh.h>
#include <mb_enum.h>
#include <mb_operation_result.h>
#include <curve3d.h>
#include <vector>
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbMesh;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbSolid;
class MATH_CLASS MbPlaneItem;
@@ -112,12 +112,11 @@ private:
\param[out] polygon - \ru Рассчитанный полигон.
\en Calculated polygon. \~
\ingroup Algorithms_3D
*/
// ---
MATH_FUNC (void) CalculatePolygon( const MbCurve & curve,
*/ // ---
MATH_FUNC (void) CalculatePolygon( const MbCurve & curve,
const MbPlacement3D & plane,
double sag,
MbPolygon3D & polygon );
double sag,
MbPolygon3D & polygon );
//------------------------------------------------------------------------------
@@ -136,12 +135,11 @@ MATH_FUNC (void) CalculatePolygon( const MbCurve & curve,
\param[out] mesh - \ru Полигональный объект.
\en Polygonal object. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC (void) CalculateWire( const MbPlaneItem & obj,
*/ // ---
MATH_FUNC (void) CalculateWire( const MbPlaneItem & obj,
const MbPlacement3D & plane,
double sag,
MbMesh & mesh );
double sag,
MbMesh & mesh );
//------------------------------------------------------------------------------
@@ -160,12 +158,11 @@ MATH_FUNC (void) CalculateWire( const MbPlaneItem & obj,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) CreateIcosahedron( const MbPlacement3D & place,
double radius,
const MbFormNote & fn,
MbMesh *& result );
double radius,
const MbFormNote & fn,
MbMesh *& result );
//------------------------------------------------------------------------------
@@ -194,9 +191,8 @@ MATH_FUNC (MbResultType) CreateIcosahedron( const MbPlacement3D & place,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans,
*/ // ---
MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans,
SPtr<MbMesh> & result );
@@ -206,9 +202,8 @@ MATH_FUNC (MbResultType) CreateBoxMesh( const MbMatrix3D & trans,
\details \ru Функция конструирует проволочный каркас параллелепипеда по тем же правилам, что и #CreateBoxMesh.
\en The function makes the wireframe of the oriented box by the same rules as #CreateBoxMesh.
\ingroup Polygonal_Objects
*/
//---
MATH_FUNC (MbResultType) CreateBoxWire( const MbMatrix3D & trans,
*/ //---
MATH_FUNC (MbResultType) CreateBoxWire( const MbMatrix3D & trans,
SPtr<MbMesh> & result );
@@ -224,8 +219,7 @@ MATH_FUNC (MbResultType) CreateBoxWire( const MbMatrix3D & trans,
\param[in] isVisibleOnly - \ru В случае если флаг true, то обрабатываются только видимые полигоны сетки.
\en If true only visible mesh polygons are processed. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( void ) MakeSpaceWireFrame( const MbItem & item,
RPArray<MbCurve3D> & wire,
bool isVisibleOnly = false );
@@ -243,8 +237,7 @@ MATH_FUNC( void ) MakeSpaceWireFrame( const MbItem & item,
\param[out] wire - \ru Набор пространственных кривых, характеризующих полигональных объект.
\en A spatial wireframe by a mesh. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( void ) MakePlaneWireFrame( const MbItem & item,
const MbPlacement3D & place,
RPArray<MbCurve3D> & wire );
@@ -264,8 +257,7 @@ MATH_FUNC( void ) MakePlaneWireFrame( const MbItem & item,
\param[out] wire - \ru Набор пространственных кривых, характеризующих полигональных объект.
\en A spatial wireframe by a mesh. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( void ) MakePlaneVistaWireFrame( const MbItem & item,
const MbPlacement3D & place,
const MbCartPoint3D & vista,
@@ -284,8 +276,7 @@ MATH_FUNC( void ) MakePlaneVistaWireFrame( const MbItem & item,
\param[out] wire - \ru Набор двумерных кривых, характеризующих полигональных объект.
\en A spatial wireframe by a mesh. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( void ) MakePlaneWireFrame( const MbItem & item,
const MbPlacement3D & place,
RPArray<MbCurve> & wire );
@@ -305,8 +296,7 @@ MATH_FUNC( void ) MakePlaneWireFrame( const MbItem & item,
\param[out] wire - \ru Набор двумерных кривых, характеризующих полигональных объект.
\en A spatial wireframe by a mesh. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( void ) MakePlaneVistaWireFrame( const MbItem & item,
const MbPlacement3D & place,
const MbCartPoint3D & vista,
@@ -330,12 +320,11 @@ MATH_FUNC( void ) MakePlaneVistaWireFrame( const MbItem & item,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) CreateSpherePolyhedron( const MbPlacement3D & place,
double radius,
double & epsilon,
MbMesh *& result );
double radius,
double & epsilon,
MbMesh *& result );
//------------------------------------------------------------------------------
@@ -350,8 +339,7 @@ MATH_FUNC (MbResultType) CreateSpherePolyhedron( const MbPlacement3D & place,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) CreateConvexPolyhedron( const SArray<MbFloatPoint3D> & points,
MbMesh *& result );
@@ -368,8 +356,7 @@ MATH_FUNC (MbResultType) CreateConvexPolyhedron( const SArray<MbFloatPoint3D> &
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbFloatPoint3D> & points,
MbMesh *& result );
@@ -386,11 +373,11 @@ MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbFloatPoint
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const SArray<MbCartPoint3D> & points,
MbMesh *& result );
//------------------------------------------------------------------------------
/** \brief \ru Вычислить выпуклую оболочку для множества точек.
\en Calculate a convex hull of a point set. \~
@@ -403,8 +390,7 @@ MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const SArray<MbCartPoint3D> &
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbCartPoint3D> & points,
MbMesh *& result );
@@ -430,8 +416,7 @@ MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbCartPoint3
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) CreateConvexPolyhedron( const MbMesh & mesh,
double offset,
MbMesh *& result );
@@ -455,8 +440,7 @@ MATH_FUNC (MbResultType) CreateConvexPolyhedron( const MbMesh & mesh,
\en true - true - there is an intersection,
false - there are no intersections. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (bool) AreIntersectConvexPolyhedrons( const MbMesh & mesh1,
const MbMesh & mesh2 );
@@ -487,8 +471,7 @@ MATH_FUNC (bool) AreIntersectConvexPolyhedrons( const MbMesh & mesh1,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) MeshCutting( MbMesh & mesh,
MbeCopyMode sameShell,
const MbPlacement3D & place,
@@ -512,12 +495,30 @@ MATH_FUNC (MbResultType) MeshCutting( MbMesh & mesh,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC (MbResultType) MeshSection( const MbMesh & mesh,
const MbPlacement3D & place,
*/ // ---
//DEPRECATE_DECLARE
MATH_FUNC (MbResultType) MeshSection( const MbMesh & mesh,
const MbPlacement3D & place,
RPArray<MbCurve3D> & polylines );
//------------------------------------------------------------------------------
/** \brief \ru Построить контур сечения полигонального объекта плоскостью.
\en Create a section contour of a polygon figure. \~
\details \ru Построить контур сечения присланного объекта плоскостью XY локальной системы координат. \n
\en Construct curves of the section of the mesh object lying on the XY plane of the local coordinate system. \n
\param[in] mesh - \ru Исходный полигональный объект.
\en The source polygonal object. \~
\param[in] place - \ru Секущая плоскость.
\en A cutting plane. \~
\param[out] polylines - \ru Построенные ломаные контура сечения объекта.
\en The resultant contours. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) MeshSection( const MbMesh & mesh,
const MbPlacement3D & place,
c3d::SpaceCurvesSPtrVector & polylines );
//------------------------------------------------------------------------------
@@ -534,11 +535,11 @@ MATH_FUNC (MbResultType) MeshSection( const MbMesh & mesh,
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
MATH_FUNC( MbResultType ) MeshMeshIntersection( const MbMesh & mesh1,
const MbMesh & mesh2,
std::vector< SPtr<MbCurve3D> > & polylines );
*/ // ---
MATH_FUNC( MbResultType ) MeshMeshIntersection( const MbMesh & mesh1,
const MbMesh & mesh2,
c3d::SpaceCurvesSPtrVector & polylines );
//------------------------------------------------------------------------------
/** \brief \ru Создать полигональный объект булевой операции.
@@ -556,11 +557,12 @@ MATH_FUNC( MbResultType ) MeshMeshIntersection( const MbMesh & mesh1,
\result \ru Возвращает код результата операции.
\en Returns the operation result code. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC( MbResultType ) CreateBoolean( const MbMesh & mesh1, const MbMesh & mesh2,
OperationType operation,
SPtr<MbMesh> & newMesh );
*/ // ---
MATH_FUNC( MbResultType ) CreateBoolean( const MbMesh & mesh1,
const MbMesh & mesh2,
OperationType operation,
c3d::MeshSPtr & newMesh );
//------------------------------------------------------------------------------
/** \brief \ru Построить триангуляцию по облаку точек на основе алгоритма поворотного шара.
@@ -578,8 +580,7 @@ MATH_FUNC( MbResultType ) CreateBoolean( const MbMesh & mesh1, const MbMesh & me
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) CalculateBallPivotingGrid( const MbCollection & collection,
double radius,
double radiusMin,
@@ -597,8 +598,7 @@ MATH_FUNC (MbResultType) CalculateBallPivotingGrid( const MbCollection & collect
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
*/ // ---
MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
@@ -614,8 +614,7 @@ MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/
// ---
*/ // ---
MATH_FUNC ( MbResultType ) ConvertMeshToInstance( std::vector<SPtr<MbItem>> & meshContainer,
double accuracy = Math::metricRegion );
@@ -632,8 +631,7 @@ MATH_FUNC ( MbResultType ) ConvertMeshToInstance( std::vector<SPtr<MbItem>> & me
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
*/ // ---
MATH_FUNC( bool ) CheckMeshClosure( const MbMesh & mesh, MeshInfo & info );
@@ -651,8 +649,7 @@ MATH_FUNC( bool ) CheckMeshClosure( const MbMesh & mesh, MeshInfo & info );
\ingroup Polygonal_Objects
\warning \ru В разработке.
\en Under development. \~
*/
// ---
*/ // ---
MATH_FUNC( bool ) InspectMeshClosure( const MbMesh & mesh, MeshInfo & info );
+30
View File
@@ -14,6 +14,7 @@
#include <templ_sptr.h>
#include <math_define.h>
#include <mesh.h>
#include <cur_contour.h>
#define TRGB_BLACK 0, 0, 0 ///< \ru Черный цвет. \en Black color. \~ \ingroup Drawing
@@ -1072,6 +1073,35 @@ void DrawVertexEdges( const Vertex * vertex, int vR, int vG, int vB,
MATH_FUNC (void) SetDrawGI( const IfDrawGI * iDrawGIImpl );
//------------------------------------------------------------------------------
// отрисовка контуров прямоугольной области
//---
//------------------------------------------------------------------------------
/** \brief \ru Функция отрисовки контуров прямоугольной области.
\en Rectangular area contour drawing function. \~
\details \ru Отрисовка прямоугольной области на поверхности по четырем точкам.
\en Drawing a rectangular area on the surface by four points. \~
\ingroup Drawing
*/
// ---
template <class Rect>
static void DrawRectangle( const Rect & rect, const MbSurface & surf, int r, int g, int b )
{
SArray<MbCartPoint> corners( 4, 1 );
MbCartPoint corner;
rect.GetVertex( 0, corner );
corners.Add( corner );
rect.GetVertex( 1, corner );
corners.Add( corner );
rect.GetVertex( 2, corner );
corners.Add( corner );
rect.GetVertex( 3, corner );
corners.Add( corner );
MbContour contour;
contour.InitByPoints( corners );
DrawGI::DrawItem( &contour, &surf, r, g, b );
}
#endif // defined(_DRAWGI)
+1 -1
View File
@@ -126,7 +126,7 @@ public:
// \ru Добавить полигональную сетку объекта. \en Add a polygonal mesh of the object.
bool AddYourMesh( const MbStepData & stepData, const MbFormNote & note, MbMesh & mesh ) const override;
// \ru Разрезать полигональный объект одной или двумя параллельными плоскостями. \en Cut the polygonal object by one or two parallel planes.
MbItem * CutMesh( const MbPlacement3D & cutPlace, double distance ) const override;
MbItem * CutMesh( const MbPlacement3D & cutPlace, double distance, const MbSNameMaker * = nullptr ) const override;
// \ru Найти ближайший объект или имя ближайшего объекта. \en Find the closest object or its name.
bool NearestMesh( MbeSpaceType sType, MbeTopologyType tType, MbePlaneType pType,
const MbAxis3D & axis, double maxDistance, bool gridPriority, double & t, double & dMin,
+40
View File
@@ -379,4 +379,44 @@ OBVIOUS_PRIVATE_COPY( MbInt64VectorAttribute )
IMPL_PERSISTENT_OPS( MbInt64VectorAttribute )
//------------------------------------------------------------------------------
/** \brief \ru Атрибут массив действительных чисел типа double.
\en Array of real (double) values attribute. \~
\details \ru Атрибут массив действительных чисел типа double. \n
\en Array of real (double) values attribute. \n \~
\ingroup Model_Attributes
*/
class MATH_CLASS MbDoubleVectorAttribute : public MbCommonAttribute {
private:
std::vector<double> value_; ///< \ru Значение. \en The value.
public:
/// \ru Конструктор. \en Constructor.
explicit MbDoubleVectorAttribute( const c3d::string_t & prompt, const bool change, const std::vector<double> & value );
/// \ru Деструктор. \en Destructor.
virtual ~MbDoubleVectorAttribute();
public:
MbeAttributeType AttributeType() const override; // \ru Выдать подтип атрибута. \en Get subtype of an attribute.
void GetCharValue( TCHAR * v ) const override; // \ru Выдать строковое значение свойства. \en Get a string value of the property.
MbAttribute & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию элемента. \en Create a copy of the element.
bool IsSame( const MbAttribute &, double accuracy ) const override; // \ru Определить, являются ли объекты равными. \en Determine whether objects are equal.
bool Init( const MbAttribute & ) override; // \ru Инициализировать данные по присланным. \en Initialize data.
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.
const std::vector<double> & GetValue() const; // \ru Выдать значение свойства. \en Get a value of the property.
bool SetValue( const std::vector<double> & val ); // \ru Установить новое значение свойства. \en Set new value of the property.
size_t Count() const; // \ru Выдать число элементов в массиве. \en Get a number of elements in the array.
double operator [] ( size_t ind ) const; /// \ru Доступ к элементу массива по индексу (без проверки на выход за границы). \en Access to array element by index (without bounds checking).
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbDoubleVectorAttribute )
OBVIOUS_PRIVATE_COPY( MbDoubleVectorAttribute )
};
IMPL_PERSISTENT_OPS( MbDoubleVectorAttribute )
#endif // __ATTR_COMMON_ATTRIBUE_H
+2
View File
@@ -112,6 +112,8 @@ public :
size_t GetParentNamesCount() const { return parentNames.size(); }
/// \ru Удалить имена родительских объектов. \en Delete names of parent objects.
void DeleteParentNames();
/// \ru Удалить имя родительского объекта. \en Delete the name of a parent object.
bool DeleteParentName( const MbName & );
/// \ru Добавить имя родительского объекта. \en Add a name of parent object.
bool AddParentName( const MbName &, bool isTemporal = false );
/// \ru Добавить имена родительских объектов. \en Add names of parent objects.
+1
View File
@@ -86,6 +86,7 @@ enum MbeAttributeType
at_SweptFlangeAttribute = 210, ///< \ru Атрибут отбортовки листового тела. \en Swept flange attribute of a sheet solid. \n
at_Int32VectorAttribute = 211, ///< \ru Атрибут массив целочисленных значений типа int32. \en Array of integer (int32) values attribute.
at_Int64VectorAttribute = 212, ///< \ru Атрибут массив целочисленных значений типа int64. \en Array of integer (int64) values attribute.
at_DoubleVectorAttribute = 213, ///< \ru Атрибут массив действительных чисел типа double. \en Array of real (double) values attribute.
at_CommonLast = 300, ///< \ru Обобщенные атрибуты вставлять перед этим значением. \en Common attributes should be inserted before this value. \n
// \ru Типы связующих атрибутов. \en Types of linking attributes.
+2 -1
View File
@@ -68,6 +68,7 @@ struct cdet_query
CBACK_VOID
, CBACK_SUFFICIENT ///< This code means that an app stops collision query for given pair of lumps
, CBACK_SKIP ///< Skip testing a given pair of the lumps
, CBACK_NEED ///< Enable testing a given pair of the lumps
, CBACK_BREAK ///< Break search of all collisions of the set
, CBACK_SEARCH_MORE = CBACK_VOID ///< This code notifies a collision detector to continue working at cases CDET_INTERSECTED, CDET_TOUCHED.
};
@@ -418,7 +419,7 @@ class MATH_CLASS MbProximityParameters
public:
MbCartPoint3D fstPnt, sndPnt; // \ru Пара точек близости, принадлежащие триангуляционным сеткам. \en The points of the proximity belonging to the triangulation grids.
MbCartPoint thePar1, thePar2; // \ru Пара точек близости, заданная в поверхностных координатах граненй. \en The points of the proximity specified in the surface coordinates of the faces.
MbCartPoint thePar1, thePar2; // \ru Пара точек близости, заданная в поверхностных координатах граней. \en The points of the proximity specified in the surface coordinates of the faces.
double theDistance; // \ru Расстояние. \en Distance.
double upperDist; // \ru Верхняя оценка для поиска минимальной дистанции. \en The upper bound of the minimal distance estimation.
+29
View File
@@ -271,6 +271,35 @@ void MbShellsIntersectionData::GetFaceNumbersPairs( OutputIndicesPairsVector & o
MATH_FUNC (bool) IsDegeneratedCurve( const MbCurve3D & curve, double eps );
//------------------------------------------------------------------------------
/** \brief \ru Проверка вырожденности поверхности в точке.
\en Checking the degeneracy of a surface at a point.\~
\details \ru Проверка вырожденности поверхности в точке.
\en Checking the degeneracy of a surface at a point.\~
\param[in] surf - \ru Поверхность.
\en Surface. \~
\param[in] u, v - \ru Координаты точки на поверхности.
\en The coordinates of a point on a surface.\~
\param[in] eps - \ru Точность оценки. \n
Для линейной оценивается отношение минимальной к максимальной длин первых производных.\n
Для угловой оценивается угол между первыми производными. \~
\en Estimation accuracy. \n
For a linear one, the ratio of the minimum to the maximum lengths of the first derivatives is estimated.\n
For a angular one, the angle between the first derivatives is estimated.\~
\param[in] degRu - \ru Оценивает вырожденность поверхности по длине производной Ru.
\en Estimates the degeneracy of a surface by the length of the derivative Ru.\~
\param[in] degRv - \ru Оценивает вырожденность поверхности по длине производной Rv.
\en Estimates the degeneracy of a surface by the length of the derivative Rv.\~
\param[in] degRuv- \ru Оценивает вырожденность поверхности по углу между Ru и Rv.
\en Estimates the degeneracy of a surface by the angle between Ru and Rv.\~
\return \ru Возвращает статус вырожденности.
\en Returns the degeneracy status. \~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC (bool) CheckSurfaceDegeneracy( const MbSurface & surf, double u, double v, double eps,
bool & degRu, bool & degRv, bool & colUV );
//------------------------------------------------------------------------------
/** \brief \ru Проверка оболочки тела на замкнутость.
\en Check of solid's shell for closedness. \~
+8 -1
View File
@@ -1,4 +1,4 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief Преобразователь сетки к форме, сохраняющей связи граней и полигонов.
@@ -16,6 +16,7 @@
#include <vector>
#include <list>
class MbGrid;
class MbMesh;
class MbTriangle;
@@ -107,4 +108,10 @@ namespace JTC {
};
//------------------------------------------------------------------------------
// Построить сетку по полигонам
// ---
CONV_FUNC( MbGrid* ) CreateGridByPolyonPoints( const std::vector<std::vector<MbCartPoint3D>>& polygonsAsPoints );
#endif // !__CONV_TOPO_MESH_H
+20 -17
View File
@@ -101,35 +101,36 @@ public :
// \ru Общие функции твердого тела. \en Common functions of solid.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
void SetYourVersion( VERSION version, bool forAll ) override;
public:
/// \ru Тип булевой операции над телами. \en Type of Boolean operation on solids.
OperationType GetOperationType() const { return operation; }
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double GetBuildSag() const { return buildSag; }
/// \ru Тип булевой операции над телами. \en Type of Boolean operation on solids.
OperationType GetOperationType() const { return operation; }
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double GetBuildSag() const { return buildSag; }
/// \ru Количество общих строителей тел. \en The number of common creators.
size_t GetSharedCount() const { return sharedCount; }
/// \ru Количество строителей первого тела. \en The number of first-solid creators.
size_t GetFirstCount() const { return firstCount; }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.size(); }
/// \ru Дать строитель. \en Get the creator.
/// \ru Количество общих строителей тел. \en The number of common creators.
size_t GetSharedCount() const { return sharedCount; }
/// \ru Количество строителей первого тела. \en The number of first-solid creators.
size_t GetFirstCount() const { return firstCount; }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.size(); }
/// \ru Дать строитель. \en Get the creator.
const MbCreator * GetCreator( size_t k ) const { return ( (k < creators.size()) ? creators[k] : nullptr ); }
/// \ru Удалить из журнала строители первого тела. \en Delete first-solid creators from the history tree.
bool DeleteFirstCreators();
/// \ru Удалить из журнала строители первого тела. \en Delete first-solid creators from the history tree.
bool DeleteFirstCreators();
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbBooleanSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbBooleanSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBooleanSolid )
};
}; // MbBooleanSolid
IMPL_PERSISTENT_OPS( MbBooleanSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
@@ -182,6 +183,7 @@ MATH_FUNC (MbCreator *) CreateBoolean( MbFaceShell * shell1,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции.
\en Create the shell of Boolean operation. \~
@@ -225,4 +227,5 @@ MATH_FUNC (MbCreator *) CreateBoolean( c3d::ShellSPtr & shell1,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_BOOLEAN_SOLID_H
+4 -3
View File
@@ -51,18 +51,19 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private :
void ReadDistances ( reader &in ) override;
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbChamferSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbChamferSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbChamferSolid )
}; // MbChamferSolid
IMPL_PERSISTENT_OPS( MbChamferSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с фасками ребeр.
\en Create a shell with edges' chamfers. \~
+3 -3
View File
@@ -80,13 +80,13 @@ public :
void SetBasisPoints( const MbControlData3D & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
// \ru Построить кривую по журналу построения \en Create a curve from the history tree
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * items = nullptr ) override;
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbConnectingCurveCreator & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbConnectingCurveCreator & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbConnectingCurveCreator )
};
+10 -10
View File
@@ -85,19 +85,19 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
// \ru Оставляемая часть (если part больше 0, то оставляем часть тела со стороны нормали поверхности). \en A part to be kept (if part is bigger than 0, then keep a part of solid from the side of surface normal).
ThreeStates GetPart() const { return part; }
void SetPart( ThreeStates p ) { part = p; }
void SetOppositePart() { if ( part == ts_negative )
part = ts_positive;
else if ( part == ts_positive )
part = ts_negative; }
// \ru Оставляемая часть (если part больше 0, то оставляем часть тела со стороны нормали поверхности). \en A part to be kept (if part is bigger than 0, then keep a part of solid from the side of surface normal).
ThreeStates GetPart() const { return part; }
void SetPart( ThreeStates p ) { part = p; }
void SetOppositePart() { if ( part == ts_negative )
part = ts_positive;
else if ( part == ts_positive )
part = ts_negative; }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCuttingSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCuttingSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCuttingSolid )
}; // MbCuttingSolid
+9 -9
View File
@@ -56,21 +56,21 @@ public :
bool SetEqual ( const MbCreator & ) override; // \ru Сделать равным. \en Make equal.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
/** \} */
/** \ru \name Функции строителя, разделяющие отдельные части оболочки.
\en \name Functions of the creator subdividing separate parts of the shell.
\{ */
/// \ru Дать номер части, выделенной из общей оболочки. \en Get number of the part extracted from the common shell.
ptrdiff_t GetPartNumber() const { return part; }
/// \ru Установить номер части, выделенной из общей оболочки. \en Set number of the part extracted from the common shell.
void SetPartNumber( ptrdiff_t p ) { part = p; }
/// \ru Сортированы ли части по габаритам (диагоналям). \en Whether the parts are sorted by bounding boxes (diagonals).
bool IsSort() const { return sort; }
/// \ru Дать номер части, выделенной из общей оболочки. \en Get number of the part extracted from the common shell.
ptrdiff_t GetPartNumber() const { return part; }
/// \ru Установить номер части, выделенной из общей оболочки. \en Set number of the part extracted from the common shell.
void SetPartNumber( ptrdiff_t p ) { part = p; }
/// \ru Сортированы ли части по габаритам (диагоналям). \en Whether the parts are sorted by bounding boxes (diagonals).
bool IsSort() const { return sort; }
/** \} */
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbDetachSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbDetachSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbDetachSolid )
}; // MbDetachSolid
+40 -40
View File
@@ -55,32 +55,32 @@ public: // \ru Общие функции математического объе
/// \ru Построение оболочки \en Creation of a shell.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса кривых. \en Creation of a wire-frame.
bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса точек. \en Creation of a point-frame.
bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Создать полигональный объект. \en Create a polygonal object.
bool CreateMesh( MbMesh *& mesh, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Переместить строитель. \en Displace the creator.
bool Perform( MbCreator * ) const override;
// \ru Добавить перемещение объекта вдоль вектора. \en Add a displacement vector.
void AddVector( const MbVector3D & );
// \ru Дать параметры. \en Get the parameters.
void GetVector( MbVector3D & m ) const { m = vector; }
// \ru Установить параметры. \en Set the parameters.
void SetVector( const MbVector3D & m ) { vector = m; }
// \ru Добавить перемещение объекта вдоль вектора. \en Add a displacement vector.
void AddVector( const MbVector3D & );
// \ru Дать параметры. \en Get the parameters.
void GetVector( MbVector3D & m ) const { m = vector; }
// \ru Установить параметры. \en Set the parameters.
void SetVector( const MbVector3D & m ) { vector = m; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbMotionMaker & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbMotionMaker & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMotionMaker )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMotionMaker )
}; // MbMotionMaker
IMPL_PERSISTENT_OPS( MbMotionMaker )
@@ -126,32 +126,32 @@ public: // \ru Общие функции математического объе
/// \ru Построение оболочки \en Creation of a shell.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса кривых. \en Creation of a wire-frame.
bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса точек. \en Creation of a point-frame.
bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Создать полигональный объект. \en Create a polygonal object.
bool CreateMesh( MbMesh *& mesh, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Переместить строитель. \en Displace the creator.
bool Perform( MbCreator * ) const override;
// \ru Добавить поворот вокруг оси. \en Add an angle of rotatation.
bool AddAngle( const MbAxis3D & ax, double an );
// \ru Дать параметры. \en Get the parameters.
void GetAxis3D( MbAxis3D & m ) const { m = axis; }
// \ru Установить параметры. \en Set the parameters.
void SetAxis3D( const MbAxis3D & m ) { axis = m; }
// \ru Добавить поворот вокруг оси. \en Add an angle of rotatation.
bool AddAngle( const MbAxis3D & ax, double an );
// \ru Дать параметры. \en Get the parameters.
void GetAxis3D( MbAxis3D & m ) const { m = axis; }
// \ru Установить параметры. \en Set the parameters.
void SetAxis3D( const MbAxis3D & m ) { axis = m; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbRotationMaker & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbRotationMaker & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRotationMaker )
};
}; // MbRotationMaker
IMPL_PERSISTENT_OPS( MbRotationMaker )
@@ -196,32 +196,32 @@ public: // \ru Общие функции математического объе
/// \ru Построение оболочки \en Creation of a shell.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса кривых. \en Creation of a wire-frame.
bool CreateWireFrame( MbWireFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Построение каркаса точек. \en Creation of a point-frame.
bool CreatePointFrame( MbPointFrame *& frame, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Создать полигональный объект. \en Create a polygonal object.
bool CreateMesh( MbMesh *& mesh, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Переместить строитель. \en Displace the creator.
bool Perform( MbCreator * ) const override;
// \ru Добавить модификацию по матрице \en Add a modification by a matrix
void AddMatrix( const MbMatrix3D & );
// \ru Дать параметры. \en Get the parameters.
void GetMatrix( MbMatrix3D & m ) const { m = matrix; }
// \ru Установить параметры. \en Set the parameters.
void SetMatrix( const MbMatrix3D & m ) { matrix = m; }
// \ru Добавить модификацию по матрице \en Add a modification by a matrix
void AddMatrix( const MbMatrix3D & );
// \ru Дать параметры. \en Get the parameters.
void GetMatrix( MbMatrix3D & m ) const { m = matrix; }
// \ru Установить параметры. \en Set the parameters.
void SetMatrix( const MbMatrix3D & m ) { matrix = m; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbTransformationMaker & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbTransformationMaker & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTransformationMaker )
};
}; // MbTransformationMaker
IMPL_PERSISTENT_OPS( MbTransformationMaker )
+5 -4
View File
@@ -98,17 +98,18 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbDraftSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbDraftSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbDraftSolid )
};
}; // MbDraftSolid
IMPL_PERSISTENT_OPS( MbDraftSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с уклоном граней.
\en Create a shell with drafted faces. \~
+3 -1
View File
@@ -60,7 +60,7 @@ public:
bool SetEqual ( const MbCreator & ) override; // \ru сделать равным \en make equal
bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
@@ -126,4 +126,6 @@ MATH_FUNC (MbCreator *) CreateDuplication( const MbFaceShell & soli
const MbDuplicationSolidParams & params,
MbResultType & res,
c3d::ShellSPtr & resShell );
#endif // CR_DUPLICATION_SOLID_H
+5 -5
View File
@@ -129,15 +129,15 @@ public :
bool SetEqual( const MbCreator & ) override; // \ru Сделать равным \en Make equal
bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
/** \} */
private:
/// \ru Установить параметры по типу и набору точек. \en Set parameters by type and points.
bool SetParameters();
/// \ru Установить параметры по типу и набору точек. \en Set parameters by type and points.
bool SetParameters();
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbElementarySolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbElementarySolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbElementarySolid )
}; // MbElementarySolid
+7 -6
View File
@@ -156,21 +156,22 @@ public :
/** \ru \name Функции строителя оболочки кинематического тела.
\en \name Functions of creator of evolution solid shell.
\{ */
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( EvolutionValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const EvolutionValues & params ) { parameters = params; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( EvolutionValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const EvolutionValues & params ) { parameters = params; }
/** \} */
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveEvolutionSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveEvolutionSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveEvolutionSolid )
}; // MbCurveEvolutionSolid
IMPL_PERSISTENT_OPS( MbCurveEvolutionSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку кинематического тела.
\en Create a shell of evolution solid. \~
+15 -13
View File
@@ -47,35 +47,36 @@ public:
// \ru Общие функции строителя. \en The common functions of the creator.
MbeCreatorType IsA() const override { return ct_ExtensionCurveCreator; }; // \ru Тип элемента. \en A type of element.
MbCreator & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Сделать копию. \en Create a copy.
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.
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 the axis.
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 the 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.
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.
/** \} */
//DEPRECATE_DECLARE_REPLACE( CreateWireFrame with 'c3d::WireFrameSPtr' argument )
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbExtendCurveCreator & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbExtendCurveCreator )
};
}; // MbExtendCurveCreator
IMPL_PERSISTENT_OPS( MbExtendCurveCreator )
//------------------------------------------------------------------------------
/** \brief \ru Создание строителя продления кривой.
\en Create a constructor of extending curve. \~
@@ -101,4 +102,5 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateExtendedCurve( const MbCurve3D &
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
#endif // __CR_EXTENDING_CURVE_H
+8 -8
View File
@@ -62,18 +62,17 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( ExtensionValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ExtensionValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( ExtensionValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ExtensionValues & params ) { parameters = params; }
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbExtensionShell )
OBVIOUS_PRIVATE_COPY( MbExtensionShell )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbExtensionShell )
OBVIOUS_PRIVATE_COPY( MbExtensionShell )
}; // MbExtensionShell
IMPL_PERSISTENT_OPS( MbExtensionShell )
@@ -155,4 +154,5 @@ MATH_FUNC (MbCreator *) CreateExtensionShell( c3d::ShellSPtr & sol
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_EXTENSION_SHELL_H
+10 -10
View File
@@ -94,7 +94,7 @@ public :
\en \name Common functions of the rigid solid (forming operations).
\{ */
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение. \en Construction.
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение. \en Construction.
MbFaceShell * InitShell( bool in ) override;
void InitBasis( RPArray<MbSpaceItem> & items ) override;
@@ -108,20 +108,20 @@ public :
/// \ru Направление выдавливания. \en An extrusion direction.
const MbVector3D & GetDirection() const { return direction; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( ExtrusionValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ExtrusionValues & params ) { parameters = params; }
/// \ru Дать габарит контуров на плейсменте. \en Get bounding boxes of contours in the placement.
void AddPlacementRect( MbRect & r ) const;
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( ExtrusionValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ExtrusionValues & params ) { parameters = params; }
/// \ru Дать габарит контуров на плейсменте. \en Get bounding boxes of contours in the placement.
void AddPlacementRect( MbRect & r ) const;
/** \} */
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveExtrusionSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveExtrusionSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveExtrusionSolid )
};
}; // MbCurveExtrusionSolid
IMPL_PERSISTENT_OPS( MbCurveExtrusionSolid )
+20 -17
View File
@@ -30,31 +30,31 @@ class MATH_CLASS MbFireCreator : public MbCreator
protected:
c3d::SpaceCurveSPtr _initCurve; ///< \ru Исходная кривая. \en An initial curve.
MbFairCurveMethod _method; ///< \ru Метод построения кривой. \en Method of a curve construction.
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbFireCreator( const MbFireCreator &, MbRegDuplicate * );
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbFireCreator( const MbCurve3D & curve, const MbFairCurveMethod & method,
const MbSNameMaker & nm );
const MbSNameMaker & nm );
private:
MbFireCreator(); // \ru Не реализовано. \en Not implemented.
public:
/// \ru Деструктор. \en Destructor.
~MbFireCreator() override;
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 the axis.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта. \en Set properties of the object.
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 the axis.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта. \en Set properties of the object.
private:
MbFireCreator(); // \ru Не реализовано. \en Not implemented.
OBVIOUS_PRIVATE_COPY( MbFireCreator )
DECLARE_PERSISTENT_CLASS( MbFireCreator )
DECLARE_PERSISTENT_CLASS( MbFireCreator )
};
IMPL_PERSISTENT_OPS( MbFireCreator )
@@ -75,11 +75,12 @@ private:
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbFireCurveCreator( const MbFireCurveCreator &, MbRegDuplicate * iReg );
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbFireCurveCreator( const MbCurve3D & curve, const MbFairCurveMethod & method,
const MbFairCreateData & params, const MbSNameMaker & nm );
private:
MbFireCurveCreator(); // \ru Не реализовано. \en Not implemented.
/// \ru Деструктор. \en Destructor.
~MbFireCurveCreator() override;
@@ -101,7 +102,6 @@ public:
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
MbFireCurveCreator(); // \ru Не реализовано. \en Not implemented.
OBVIOUS_PRIVATE_COPY( MbFireCurveCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFireCurveCreator )
@@ -125,6 +125,8 @@ private:
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbFireFilletCreator( const MbFireFilletCreator &, MbRegDuplicate * iReg );
private:
MbFireFilletCreator(); // \ru Не реализовано. \en Not implemented.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbFireFilletCreator( const MbCurve3D & curve, const MbFairCurveMethod & method,
@@ -150,7 +152,6 @@ public:
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
MbFireFilletCreator(); // \ru Не реализовано. \en Not implemented.
OBVIOUS_PRIVATE_COPY( MbFireFilletCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFireFilletCreator )
@@ -174,6 +175,8 @@ private:
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbFireClothoidCreator( const MbFireClothoidCreator &, MbRegDuplicate * iReg );
private:
MbFireClothoidCreator(); // \ru Не реализовано. \en Not implemented.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbFireClothoidCreator( const MbClothoidParams & params, const MbSNameMaker & nm );
@@ -202,7 +205,6 @@ public:
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
MbFireClothoidCreator(); // \ru Не реализовано. \en Not implemented.
OBVIOUS_PRIVATE_COPY( MbFireClothoidCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFireClothoidCreator )
@@ -226,7 +228,8 @@ private:
protected:
/// \ru Конструктор копирования. \en Copy-constructor.
MbFireChangeCreator( const MbFireChangeCreator &, MbRegDuplicate * iReg );
private:
MbFireChangeCreator(); // \ru Не реализовано. \en Not implemented.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbFireChangeCreator( const MbCurve3D & curve, const MbFairCurveMethod & method,
@@ -247,12 +250,10 @@ public:
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта. \en Get properties of the object.
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта. \en Set properties of the object.
bool CreateWireFrame( MbWireFrame *&, MbeCopyMode, RPArray<MbSpaceItem> * ) override; // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
bool CreateWireFrame( c3d::WireFrameSPtr & result ); // \ru Построить кривую по журналу построения. \en Create a curve from the history tree. \~
private:
MbFireChangeCreator(); // \ru Не реализовано. \en Not implemented.
OBVIOUS_PRIVATE_COPY( MbFireChangeCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFireChangeCreator )
@@ -290,6 +291,7 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourc
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
//------------------------------------------------------------------------------
/** \brief \ru Изменение плавной кривой.
\en Changing a fair curve. \~
@@ -370,4 +372,5 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const MbClothoidParams & paramete
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
#endif // __CR_FIRE_CURVE_H
+3 -3
View File
@@ -76,12 +76,12 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private :
void ReadDistances ( reader &in ) override;
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbFilletSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbFilletSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFilletSolid )
}; // MbFilletSolid
+6 -4
View File
@@ -88,18 +88,18 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbFaceShell * InitShell( bool in ) override;
void InitBasis( RPArray<MbSpaceItem> & items ) override;
bool GetPlacement( MbPlacement3D & p ) const override;
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbHoleSolid & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbHoleSolid & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbHoleSolid )
};
}; // MbHoleSolid
IMPL_PERSISTENT_OPS( MbHoleSolid )
@@ -141,6 +141,7 @@ MATH_FUNC (MbCreator *) CreateHole( MbFaceShell * solid,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с отверстием, карманом, или фигурным пазом.
\en Create a shell with a hole, a pocket or a groove. \~
@@ -169,6 +170,7 @@ MATH_FUNC (MbCreator *) CreateHole( const c3d::ShellSPtr & solid,
MbResultType & res,
c3d::ShellSPtr & shell );
//------------------------------------------------------------------------------
/** \brief \ru Определить глубину отверстия "до указанной поверхности" при построении оболочки с отверстием.
\en Determine the hole depth "to the specified surface" while creating a shell with a hole. \~
+5 -4
View File
@@ -68,12 +68,13 @@ public:
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbIntCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbIntCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbIntCurveCreator )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbIntCurveCreator )
}; // MbIntCurveCreator
IMPL_PERSISTENT_OPS( MbIntCurveCreator )
#endif // __CR_INTERSECTION_CURVE_H
+9 -9
View File
@@ -58,22 +58,22 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; ///< \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; ///< \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( JoinSurfaceValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const JoinSurfaceValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( JoinSurfaceValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const JoinSurfaceValues & params ) { parameters = params; }
const MbCurve3D & GetCurve( ptrdiff_t num ) const;
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbJoinShell )
OBVIOUS_PRIVATE_COPY( MbJoinShell )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbJoinShell )
OBVIOUS_PRIVATE_COPY( MbJoinShell )
}; // MbJoinShell
IMPL_PERSISTENT_OPS( MbJoinShell )
//------------------------------------------------------------------------------
/* \brief \ru Проверить необходимость модификации второй кривой.
\en Check if a modification of the second curve is necessary. \~
+11 -9
View File
@@ -87,22 +87,23 @@ public :
void InitBasis( RPArray<MbSpaceItem> & items ) override;
bool GetPlacement( MbPlacement3D & ) const override;
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( LoftedValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const LoftedValues & params ) { parameters = params; }
/// \ru Направляющая кривая. \en The spine curve.
const MbCurve3D * GetSpine() const { return spine.get(); }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( LoftedValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const LoftedValues & params ) { parameters = params; }
/// \ru Направляющая кривая. \en The spine curve.
const MbCurve3D * GetSpine() const { return spine.get(); }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveLoftedSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveLoftedSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveLoftedSolid )
};
}; // MbCurveLoftedSolid
IMPL_PERSISTENT_OPS( MbCurveLoftedSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
@@ -133,6 +134,7 @@ MATH_FUNC (c3d::CreatorSPtr) CreateCurveLofted( c3d::ShellSPtr & srcS
MbResultType & res,
c3d::ShellSPtr & resShell );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело по плоским сечениям.
\en Create a solid from a planar sections. \~
+8 -9
View File
@@ -62,17 +62,16 @@ public:
// \ru Построение оболочки по исходным данным \en Construction of a shell from the given data
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( MedianShellValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MedianShellValues & params ) { parameters = params; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( MedianShellValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MedianShellValues & params ) { parameters = params; }
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMedianShell )
OBVIOUS_PRIVATE_COPY( MbMedianShell )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMedianShell )
OBVIOUS_PRIVATE_COPY( MbMedianShell )
}; // MbMedianShell
IMPL_PERSISTENT_OPS( MbMedianShell )
+12 -8
View File
@@ -59,18 +59,20 @@ public: // \ru Общие функции математического объе
public:
/// \ru Построение оболочки \en Creation of a shell
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MeshSurfaceValues & params ) const;
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MeshSurfaceValues & params );
RPArray<MbSpaceItem> * items = nullptr ) override;
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMeshShell )
OBVIOUS_PRIVATE_COPY( MbMeshShell )
}; // MbMeshShell
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MeshSurfaceValues & params ) const;
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MeshSurfaceValues & params );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbMeshShell )
OBVIOUS_PRIVATE_COPY( MbMeshShell )
}; // MbMeshShell
IMPL_PERSISTENT_OPS( MbMeshShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на сетке кривых.
\en Construct a shell from a mesh of curves. \~
@@ -102,6 +104,7 @@ MATH_FUNC (MbCreator *) CreateMeshShell( MeshSurfaceValues & parameters,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку на сетке кривых.
\en Construct a shell from a mesh of curves. \~
@@ -124,4 +127,5 @@ MATH_FUNC (MbCreator *) CreateMeshShell( const MbMeshShellParameters & parameter
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_MESH_SHELL_H
+13 -12
View File
@@ -77,28 +77,29 @@ public:
/// \ru Построение оболочки \en Creation of a shell
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
void Refresh( MbFaceShell & outer ) override; ///< \ru Обновить форму оболочки \en Update shape of the shell
// \ru Дать параметры. \en Get the parameters.
void GetParameters( ModifyValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ModifyValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( ModifyValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const ModifyValues & params ) { parameters = params; }
void GetFaceIndices( SArray<MbItemIndex> & faces ) const { faces = faceIndices; } // \ru Идентификаторы модифицированных граней. \en Identifiers of the modified faces.
void GetEdgeIndices( SArray<MbEdgeFacesIndexes> & edges ) const { edges = edgeIndices; } // \ru Идентификаторы модифицированных рёбер. \en Identifiers of the modified edges.
void GetFaceIndices( SArray<MbItemIndex> & faces ) const { faces = faceIndices; } // \ru Идентификаторы модифицированных граней. \en Identifiers of the modified faces.
void GetEdgeIndices( SArray<MbEdgeFacesIndexes> & edges ) const { edges = edgeIndices; } // \ru Идентификаторы модифицированных рёбер. \en Identifiers of the modified edges.
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbFaceModifiedSolid & );
void SurfacesFree(); // \ru Удалить поверхности \en Delete the surfaces
void SurfacesAddRef(); // \ru Учесть поверхности \en Consider the surfaces
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbFaceModifiedSolid & );
void SurfacesFree(); // \ru Удалить поверхности \en Delete the surfaces
void SurfacesAddRef(); // \ru Учесть поверхности \en Consider the surfaces
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbFaceModifiedSolid )
};
}; // MbFaceModifiedSolid
IMPL_PERSISTENT_OPS( MbFaceModifiedSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить модифицированную оболочку.
\en Construct the modified shell. \~
+3 -3
View File
@@ -76,10 +76,10 @@ public:
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbNurbs3DCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbNurbs3DCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbs3DCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbs3DCreator )
};
IMPL_PERSISTENT_OPS( MbNurbs3DCreator )
+5 -4
View File
@@ -57,18 +57,19 @@ public: // \ru Общие функции математического объе
public:
/// \ru Построение оболочки \en Creation of a shell
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
void Refresh( MbFaceShell & outer ) override; ///< \ru Обновить форму оболочки \en Update shape of the shell
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbNurbsBlockSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbNurbsBlockSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbsBlockSolid )
};
}; // MbNurbsBlockSolid
IMPL_PERSISTENT_OPS( MbNurbsBlockSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить модифицированную оболочку.
\en Construct the modified shell. \~
+10 -8
View File
@@ -67,20 +67,21 @@ public: // \ru Общие функции математического объе
public:
/// \ru построение оболочки \en creation of a shell
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
void Refresh( MbFaceShell & outer ) override; ///< \ru обновить форму оболочки \en update shape of the shell
// \ru Дать параметры. \en Get the parameters.
void GetParameters( NurbsSurfaceValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const NurbsSurfaceValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( NurbsSurfaceValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const NurbsSurfaceValues & params ) { parameters = params; }
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbsSurfacesSolid )
OBVIOUS_PRIVATE_COPY( MbNurbsSurfacesSolid )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNurbsSurfacesSolid )
OBVIOUS_PRIVATE_COPY( MbNurbsSurfacesSolid )
}; // MbNurbsSurfacesSolid
IMPL_PERSISTENT_OPS( MbNurbsSurfacesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из NURBS-поверхностей.
\en Construct a shell from NURBS-surfaces. \~
@@ -141,4 +142,5 @@ MATH_FUNC (c3d::CreatorSPtr) CreateNurbsShell( const MbNurbsSurfacesShellParams
c3d::ShellSPtr & shell,
IProgressIndicator * indicator = nullptr );
#endif // __CR_NURBS_SURFACES_SOLID_H
+4 -3
View File
@@ -118,14 +118,15 @@ public :
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbOffsetCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbOffsetCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbOffsetCurveCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbOffsetCurveCreator )
};
IMPL_PERSISTENT_OPS( MbOffsetCurveCreator )
//------------------------------------------------------------------------------
/** \brief \ru Создать офсетную кривую по трехмерной кривой и вектору направления.
\en Create an offset curve from three-dimensional curve and direction. \~
+9 -8
View File
@@ -72,19 +72,20 @@ public :
// \ru Построение оболочки по исходным данным \en Construction of a shell from the given data
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
// \ru Дать параметры. \en Get the parameters.
void GetParameters( PatchValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const PatchValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( PatchValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const PatchValues & params ) { parameters = params; }
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbPatchCreator )
OBVIOUS_PRIVATE_COPY( MbPatchCreator )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbPatchCreator )
OBVIOUS_PRIVATE_COPY( MbPatchCreator )
}; // MbPatchCreator
IMPL_PERSISTENT_OPS( MbPatchCreator )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку в форме заплатки.
\en Construct a patch-shaped shell. \~
+3 -2
View File
@@ -78,12 +78,13 @@ public:
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbProjCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbProjCurveCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbProjCurveCreator )
};
IMPL_PERSISTENT_OPS( MbProjCurveCreator )
#endif // __CR_PROJECTION_CURVE_H
+7 -7
View File
@@ -95,18 +95,18 @@ public :
const MbSurface * GetSurface() const { return sweptData.GetSurface(); } ///< \ru Поверхность двумерных контуров. \en Surface of two-dimensional contours.
const MbAxis3D & GetAxis() const { return axis; } ///< \ru Ось вращения. \en Rotation axis.
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( RevolutionValues & p ) const { p = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RevolutionValues & p ) { parameters = p; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( RevolutionValues & p ) const { p = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RevolutionValues & p ) { parameters = p; }
/** \} */
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveRevolutionSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveRevolutionSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveRevolutionSolid )
};
}; // MbCurveRevolutionSolid
IMPL_PERSISTENT_OPS( MbCurveRevolutionSolid )
+12 -7
View File
@@ -14,7 +14,10 @@
#include <creator.h>
#include <op_swept_parameter.h>
class MbRibSolidParameters;
//------------------------------------------------------------------------------
/** \brief \ru Строитель тела с ребром жёсткости.
\en Constructor of a solid with a rib. \~
@@ -60,16 +63,16 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( RibValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RibValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( RibValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RibValues & params ) { parameters = params; }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbRibSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbRibSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRibSolid )
}; // MbRibSolid
@@ -190,6 +193,7 @@ MATH_FUNC (MbCreator *) CreateRibElement( MbFaceShell * solid,
MbResultType & res,
MbFaceShell *& shell );
//------------------------------------------------------------------------------
/** \brief \ru Создать отдельное ребро жёсткости.
\en Create a separate rib. \~
@@ -223,4 +227,5 @@ MATH_FUNC (MbCreator *) CreateRibElement( c3d::ShellSPtr & solid,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_RIB_SOLID_H
+9 -7
View File
@@ -63,14 +63,15 @@ public: // \ru Общие функции математического объе
public:
/// \ru Построение оболочки \en Creation of a shell
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
// \ru Дать параметры. \en Get the parameters.
void GetParameters( RuledSurfaceValues & params ) const;
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RuledSurfaceValues & params );
RPArray<MbSpaceItem> * items = nullptr ) override;
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRuledShell )
OBVIOUS_PRIVATE_COPY( MbRuledShell )
// \ru Дать параметры. \en Get the parameters.
void GetParameters( RuledSurfaceValues & params ) const;
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const RuledSurfaceValues & params );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRuledShell )
OBVIOUS_PRIVATE_COPY( MbRuledShell )
}; // MbRuledShell
IMPL_PERSISTENT_OPS( MbRuledShell )
@@ -137,4 +138,5 @@ MATH_FUNC (MbCreator *) CreateRuledShell( const MbRuledShellParams & ruledParams
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_RULED_SHELL_H
+6 -6
View File
@@ -72,7 +72,7 @@ public :
\en \name Common functions of the rigid solid (forming operations).
\{ */
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
virtual void SetYourVersion( VERSION version );
/** \} */
@@ -81,9 +81,9 @@ public :
\en \name Functions of creator of evolution solid shell.
\{ */
/// \ru Дать параметры. \en Get the parameters.
const MbSectionData & GetSectionData() { return sectionData; }
/// \ru Установить параметры. \en Set the parameters.
void SetSectionData( const MbSectionData & data ) { sectionData = data; }
const MbSectionData & GetSectionData() { return sectionData; }
/// \ru Установить параметры. \en Set the parameters.
void SetSectionData( const MbSectionData & data ) { sectionData = data; }
/** \} */
/** \brief \ru Создать оболочку на поверхности переменного сечения.
@@ -117,8 +117,8 @@ public :
c3d::ShellSPtr & shell );
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSectionShell & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSectionShell & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSectionShell )
+5 -4
View File
@@ -64,18 +64,19 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbBendAnySolid & operator = ( const MbBendAnySolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBendAnySolid )
};
}; // MbBendAnySolid
IMPL_PERSISTENT_OPS( MbBendAnySolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с выполнеными сгибами.
\en Construct a shell with bends. \~
+10 -9
View File
@@ -74,24 +74,25 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendByEdgeValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendByEdgeValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendByEdgeValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendByEdgeValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbBendsByEdgesSolid & operator = ( const MbBendsByEdgesSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBendsByEdgesSolid )
};
}; // MbBendsByEdgesSolid
IMPL_PERSISTENT_OPS( MbBendsByEdgesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить сгибы вдоль рёбер оболочки.
\en Construct bends along edges of a shell. \~
+8 -7
View File
@@ -69,22 +69,23 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendOverSegValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendOverSegValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendOverSegValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendOverSegValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbBendOverSegSolid & operator = ( const MbBendOverSegSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBendOverSegSolid )
};
}; // MbBendOverSegSolid
IMPL_PERSISTENT_OPS( MbBendOverSegSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала, согнутую вдоль отрезка.
\en Create a shell from sheet material bent along a segment. \~
+5 -5
View File
@@ -67,18 +67,19 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbBendUnbendSolid & operator = ( const MbBendUnbendSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBendUnbendSolid )
};
}; // MbBendUnbendSolid
IMPL_PERSISTENT_OPS( MbBendUnbendSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с выполненым сгибом/разгибом.
\en Construct a shell with bend/unbend. \~
@@ -125,5 +126,4 @@ MATH_FUNC (MbCreator *) CreateBendUnbend( SPtr<MbFaceShell> & init
RPArray<MbContour3D> * ribContours = nullptr );
#endif // __CR_SHEET_BEND_UNBEND_SOLID_H
+7 -6
View File
@@ -60,17 +60,17 @@ public:
// \ru Общие функции твердого тела. \en Common functions of solid.
// \ru Построение оболочки листового тела. \en Construction of a sheet metal shell.
// \ru Построение оболочки листового тела. \en Construction of a sheet metal shell.
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell, RPArray <MbSpaceItem> *items = nullptr ) override;
// \ru Получить параметры. \en Get the parameters.
void GetParameters( MbSolidToSheetMetalValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbSolidToSheetMetalValues & params ) { parameters = params; }
// \ru Получить параметры. \en Get the parameters.
void GetParameters( MbSolidToSheetMetalValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbSolidToSheetMetalValues & params ) { parameters = params; }
private:
OBVIOUS_PRIVATE_COPY( MbBuildSheetMetalSolid )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBuildSheetMetalSolid )
};
}; // MbBuildSheetMetalSolid
IMPL_PERSISTENT_OPS( MbBuildSheetMetalSolid )
@@ -144,4 +144,5 @@ MATH_FUNC (c3d::CreatorSPtr) ConvertShellToSheetMetall( const c3d::ShellSPtr &
MbResultType & res,
c3d::ShellSPtr & resultShell );
#endif // __CR_SHEET_BUILDER_SOLID_H
+10 -9
View File
@@ -66,24 +66,25 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbClosedCornerValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbClosedCornerValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbClosedCornerValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbClosedCornerValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbClosedCornerSolid & operator = ( const MbClosedCornerSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbClosedCornerSolid )
};
}; // MbClosedCornerSolid
IMPL_PERSISTENT_OPS( MbClosedCornerSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала с замыканием угла.
\en Construct a shell form sheet material with corner closure. \~
+10 -9
View File
@@ -72,24 +72,25 @@ public:
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта \en Get a name of object property
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJointBendValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJointBendValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJointBendValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJointBendValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbJointBendSolid & operator = ( const MbJointBendSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbJointBendSolid )
};
}; // MbJointBendSolid
IMPL_PERSISTENT_OPS( MbJointBendSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить комбинированные сгибы.
\en Construct composite bends. \~
+10 -9
View File
@@ -101,26 +101,27 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
virtual MbFaceShell * InitShell( bool in );
const MbPlacement3D & GetPlacement() const;
const MbPlacement3D & GetPlacement() const;
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbSheetMetalValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbSheetMetalValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbSheetMetalValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbSheetMetalValues & params ) { parameters = params; }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSheetMetalSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSheetMetalSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSheetMetalSolid )
};
}; // MbSheetMetalSolid
IMPL_PERSISTENT_OPS( MbSheetMetalSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала.
\en Construct a shell from sheet material. \~
+7 -4
View File
@@ -55,21 +55,22 @@ public:
void SetProperties( const MbProperties & properties ) override; // \ru Записать свойства объекта \en Set properties of the object
MbePrompt GetPropertyName() override; // \ru Выдать заголовок свойства объекта \en Get a name of object property
// \ru Общие функции твердого тела \en Common functions of solid solid
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbNormalizeHolesSolid & operator = ( const MbNormalizeHolesSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbNormalizeHolesSolid )
};
}; // MbNormalizeHolesSolid
IMPL_PERSISTENT_OPS( MbNormalizeHolesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Нормализовать вырезы листового тела.
\en Normalize of the holes of sheet solid. \~
@@ -124,4 +125,6 @@ MATH_FUNC (MbCreator *) NormalizeHolesSides ( c3d::ShellSPtr &
const MbNormalizeCutSidesParams & normParam,
MbResultType & res,
c3d::ShellSPtr & shell );
#endif // __CR_SHEET_NORMALIZE_HOLES_SOLID_H
+6 -5
View File
@@ -61,19 +61,20 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbRestoredEdgesSolid & operator = ( const MbRestoredEdgesSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRestoredEdgesSolid )
};
}; // MbRestoredEdgesSolid
IMPL_PERSISTENT_OPS( MbRestoredEdgesSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить боковых рёбер сгибов.
\en Construct side edges of bends. \~
+5 -4
View File
@@ -59,18 +59,19 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbSimplifyFlatSolid & operator = ( const MbSimplifyFlatSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSimplifyFlatSolid )
};
}; // MbSimplifyFlatSolid
IMPL_PERSISTENT_OPS( MbSimplifyFlatSolid )
//------------------------------------------------------------------------------
/** \brief \ru Упростить развёртку листового тела.
\en Simplify flattened sheet solid. \~
+16 -15
View File
@@ -36,6 +36,8 @@ public :
MbSheetUnionSolid( const RPArray<MbCreator> & solid2, const bool same2, const MbSNameMaker & n );
private :
MbSheetUnionSolid( const MbSheetUnionSolid & init, MbRegDuplicate *ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
MbSheetUnionSolid( const MbSheetUnionSolid & init );
public :
virtual ~MbSheetUnionSolid();
@@ -62,31 +64,30 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
void SetYourVersion( VERSION version, bool forAll ) override;
/// \ru Количество строителей первого тела. \en Count of creators of the first solid.
size_t GetCountOne() const { return countOne; }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.Count(); }
/// \ru Добавить в журнал. \en Add to the history tree.
void AddCreator ( MbCreator & creator );
/// \ru Дать строитель. \en Get the constructor.
MbCreator * GetCreator ( const size_t ind ) const;
void DeleteCreator( const size_t ind );
/// \ru Количество строителей первого тела. \en Count of creators of the first solid.
size_t GetCountOne() const { return countOne; }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.Count(); }
/// \ru Добавить в журнал. \en Add to the history tree.
void AddCreator ( MbCreator & creator );
/// \ru Дать строитель. \en Get the constructor.
MbCreator * GetCreator ( const size_t ind ) const;
void DeleteCreator( const size_t ind );
private :
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
MbSheetUnionSolid( const MbSheetUnionSolid & init );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbSheetUnionSolid & operator = ( const MbSheetUnionSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbSheetUnionSolid & operator = ( const MbSheetUnionSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSheetUnionSolid )
};
}; // MbSheetUnionSolid
IMPL_PERSISTENT_OPS( MbSheetUnionSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку объединённых по торцу листовых тел.
\en Create a shell of sheet solids united by a butt. \~
+17 -14
View File
@@ -85,25 +85,25 @@ public :
bool SetEqual( const MbCreator & ) override; // \ru Сделать равным \en Make equal
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
/** \} */
const MbFaceShell * GetShell() const { return outer; } /// \ru Дать оболочку. \en Get a shell.
void SetShell( const MbFaceShell & ); /// \ru Заменить оболочку. \en Replace a shell.
OperationType GetOperationType() { return operation; } /// \ru Дать оболочку. \en Get a shell.
void SetOperationType( OperationType t ) { operation = t; } /// \ru Заменить оболочку. \en Replace a shell.
const MbFaceShell * GetShell() const { return outer; } /// \ru Дать оболочку. \en Get a shell.
void SetShell( const MbFaceShell & ); /// \ru Заменить оболочку. \en Replace a shell.
OperationType GetOperationType() { return operation; } /// \ru Дать оболочку. \en Get a shell.
void SetOperationType( OperationType t ) { operation = t; } /// \ru Заменить оболочку. \en Replace a shell.
/// \ru Удалить копии оболочек в простых построителях (MbSimpleCreator). \en Delete shell copies in simple creators (MbSimpleCreator).
template <class CreatorsVector>
/// \ru Удалить копии оболочек в простых построителях (MbSimpleCreator). \en Delete shell copies in simple creators (MbSimpleCreator).
template <class CreatorsVector>
static bool DeleteShellCopies( const CreatorsVector & );
/// \ru Есть ли в каком-то простом построителе (MbSimpleCreator) заданная оболочка. \en Is there a simple builder (MbSimpleCreator) that contains a given shell?.
template <class CreatorsVector>
/// \ru Есть ли в каком-то простом построителе (MbSimpleCreator) заданная оболочка. \en Is there a simple builder (MbSimpleCreator) that contains a given shell?.
template <class CreatorsVector>
static bool IsThisShell( const MbFaceShell &, const CreatorsVector & );
/// \ru Есть ли в каком-то простом построителе (MbSimpleCreator) заданная оболочка. \en Is there a simple builder (MbSimpleCreator) that contains a given shell?.
static bool IsThisShell( const MbSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSimpleCreator )
OBVIOUS_PRIVATE_COPY( MbSimpleCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSimpleCreator )
OBVIOUS_PRIVATE_COPY( MbSimpleCreator )
}; // MbSimpleCreator
IMPL_PERSISTENT_OPS( MbSimpleCreator )
@@ -131,6 +131,7 @@ bool AreEqualShellPointers( const c3d::IndexConstShell & is1, const c3d::IndexCo
return false;
}
//------------------------------------------------------------------------------
// Sort by index (ascending)
// ---
@@ -204,6 +205,7 @@ bool MbSimpleCreator::DeleteShellCopies( const CreatorsVector & creators )
return res;
}
//------------------------------------------------------------------------------
// \ru Есть ли в каком-то простом построителе (MbSimpleCreator) заданная оболочка. \en Is there a simple builder (MbSimpleCreator) that contains a given shell?.
// ---
@@ -267,13 +269,14 @@ public :
bool IsSimilar ( const MbCreator & ) const override; // \ru Являются ли объекты подобными \en Whether the objects are similar
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
/** \} */
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbReverseCreator )
OBVIOUS_PRIVATE_COPY( MbReverseCreator )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbReverseCreator )
OBVIOUS_PRIVATE_COPY( MbReverseCreator )
}; // MbReverseCreator
IMPL_PERSISTENT_OPS( MbReverseCreator )
#endif // __CR_SIMPLE_CREATOR_H
+7 -6
View File
@@ -59,19 +59,20 @@ public :
//virtual bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
// RPArray<MbSpaceItem> * items = nullptr ) = 0; // \ru Построение \en Construction
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( SmoothValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SmoothValues & params ) { parameters = params; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( SmoothValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SmoothValues & params ) { parameters = params; }
private :
virtual void ReadDistances ( reader &in ) = 0;
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSmoothSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSmoothSolid & );
DECLARE_PERSISTENT_CLASS( MbSmoothSolid )
}; // MbSmoothSolid
IMPL_PERSISTENT_OPS( MbSmoothSolid )
#endif // __CR_SMOOTH_SOLID_H
+5 -4
View File
@@ -58,19 +58,20 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private: // \ru Не реализовано \en Not implemented
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
MbSplitShell( const MbSplitShell & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSplitShell & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSplitShell & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSplitShell )
};
}; // MbSplitShell
IMPL_PERSISTENT_OPS( MbSplitShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с разбиением граней выдавливанием.
\en Create a shell with faces splitting by extrusion. \~
+8 -7
View File
@@ -87,22 +87,23 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBeadValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBeadValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBeadValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBeadValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbBeadSolid & operator = ( const MbBeadSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBeadSolid )
};
}; // MbBeadSolid
IMPL_PERSISTENT_OPS( MbBeadSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала с буртиком.
\en Construct a shell from sheet material with a bead. \~
+8 -7
View File
@@ -84,22 +84,23 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJalousieValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJalousieValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJalousieValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJalousieValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbJalousieSolid & operator = ( const MbJalousieSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbJalousieSolid )
};
}; // MbJalousieSolid
IMPL_PERSISTENT_OPS( MbJalousieSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала с жалюзи.
\en Construct a shell from a sheet material with jalousie. \~
+15 -14
View File
@@ -80,28 +80,29 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJogValues & params ) const { params = jogParameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJogValues & params ) { jogParameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendValues & params ) const { params = secondBendParameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendValues & params ) { secondBendParameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbJogValues & params ) const { params = jogParameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbJogValues & params ) { jogParameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbBendValues & params ) const { params = secondBendParameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbBendValues & params ) { secondBendParameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbJogSolid & operator = ( const MbJogSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbJogSolid & operator = ( const MbJogSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbJogSolid )
};
}; // MbJogSolid
IMPL_PERSISTENT_OPS( MbJogSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочки из листового материала с подсечкой.
\en Construct shells from the sheet material with a jog. \~
+4 -4
View File
@@ -85,15 +85,15 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbRemoveOperationSolid & operator = ( const MbRemoveOperationSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRemoveOperationSolid )
};
}; // MbRemoveOperationSolid
IMPL_PERSISTENT_OPS( MbRemoveOperationSolid )
+10 -8
View File
@@ -65,22 +65,23 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( SheetRibValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SheetRibValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( SheetRibValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SheetRibValues & params ) { parameters = params; }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbStampRibSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbStampRibSolid & ); // \ru НЕЛЬЗЯ!!! \en NOT ALLOWED!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbStampRibSolid )
}; // MbRibSolid
}; // MbStampRibSolid
IMPL_PERSISTENT_OPS( MbStampRibSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку с ребром жёсткости.
\en Create a shell with a rib. \~
@@ -197,4 +198,5 @@ MATH_FUNC (MbResultType) CreateSheetRibParts( const c3d::ShellSPtr & soli
c3d::ShellSPtr & shellToAdd,
c3d::ShellSPtr & shellToSubtract );
#endif // __CR_STAMP_RIB_SOLID_H
+12 -11
View File
@@ -67,26 +67,27 @@ public:
// \ru Общие функции твердого тела. \en Common functions of solid.
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать базовые объекты. \en Get the base objects.
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать базовые объекты. \en Get the base objects.
void GetBasisItems( RPArray<MbSpaceItem> & s ) override;
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbRuledSolidValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbRuledSolidValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbRuledSolidValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbRuledSolidValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbRuledSolid & operator = ( const MbRuledSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbRuledSolid & operator = ( const MbRuledSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbRuledSolid )
};
}; // MbRuledSolid
IMPL_PERSISTENT_OPS( MbRuledSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить линейчатую оболочку по контуру.
\en Create a ruled shell from the contour. \~
+9 -8
View File
@@ -85,22 +85,23 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbStampingValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbStampingValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbStampSolid & operator = ( const MbStampSolid & ); // \ru Не реализовано \en Not implemented
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbStampSolid & operator = ( const MbStampSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbStampSolid )
};
}; // MbStampSolid
IMPL_PERSISTENT_OPS( MbStampSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала штамповкой.
\en Construct a shell form sheet material by stamping. \~
+9 -8
View File
@@ -80,22 +80,23 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbStampingValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( MbStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbStampingValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbSphericalStampSolid & operator = ( const MbSphericalStampSolid & ); // \ru Не реализовано \en Not implemented
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbSphericalStampSolid & operator = ( const MbSphericalStampSolid & ); // \ru Не реализовано \en Not implemented
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSphericalStampSolid )
};
}; // MbSphericalStampSolid
IMPL_PERSISTENT_OPS( MbSphericalStampSolid )
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку из листового материала со сферической штамповкой.
\en Construct a shell form sheet material by spherical stamping. \~
+10 -9
View File
@@ -6,8 +6,8 @@
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __CR_USERSTAMP_SOLID_H
#define __CR_USERSTAMP_SOLID_H
#ifndef __CR_STAMP_USER_SOLID_H
#define __CR_STAMP_USER_SOLID_H
#include <creator.h>
@@ -77,17 +77,17 @@ public:
// \ru Общие функции твердого тела. \en Common functions of solid.
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение оболочки штамповки. \en Construction of a stamping shell.
RPArray <MbSpaceItem> *items = nullptr ) override; // \ru Построение оболочки штамповки. \en Construction of a stamping shell.
// \ru Получить параметры. \en Get the parameters.
void GetParameters( MbToolStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbToolStampingValues & params ) { parameters = params; }
// \ru Получить параметры. \en Get the parameters.
void GetParameters( MbToolStampingValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const MbToolStampingValues & params ) { parameters = params; }
private:
OBVIOUS_PRIVATE_COPY( MbUserStampSolid )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbUserStampSolid )
};
}; // MbUserStampSolid
IMPL_PERSISTENT_OPS( MbUserStampSolid )
@@ -251,4 +251,5 @@ MbFaceShell * MakeUserStampShellForStampParts ( c3d::ShellSPtr &
const MbeCopyMode sameShellTool,
const MbStampWithToolPartsParams & params );
#endif // __CR_USERSTAMP_SOLID_H
#endif // __CR_STAMP_USER_SOLID_H
+5 -5
View File
@@ -197,6 +197,8 @@ public :
private:
MbStitchedSolid( const MbStitchedSolid & init,
MbRegDuplicate * ireg );
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
MbStitchedSolid( const MbStitchedSolid & );
public:
virtual ~MbStitchedSolid();
@@ -224,19 +226,17 @@ public:
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell,
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
void SetYourVersion( VERSION version, bool forAll ) override;
private:
// \ru Объявление конструктора копирования без реализации, чтобы не было копирования по умолчанию. \en Declaration without implementation of the copy-constructor to prevent copying by default.
MbStitchedSolid( const MbStitchedSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
MbStitchedSolid & operator = ( const MbStitchedSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbStitchedSolid )
};
}; // MbStitchedSolid
IMPL_PERSISTENT_OPS( MbStitchedSolid )
+3 -2
View File
@@ -83,14 +83,15 @@ public :
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbSurfaceSplineCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation, to prevent an assignment by default.
void operator = ( const MbSurfaceSplineCreator & ); // \ru Не реализовано!!! \en Not implemented!!!
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSurfaceSplineCreator )
};
IMPL_PERSISTENT_OPS( MbSurfaceSplineCreator )
//------------------------------------------------------------------------------
/** \brief \ru Создать кривую на поверхности.
\en Create a curve on a surface. \~
+6 -5
View File
@@ -99,7 +99,7 @@ public :
\en \name Common functions of the rigid solid (forming operations).
\{ */
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
virtual MbFaceShell * InitShell( bool in ) = 0;
virtual void InitBasis( RPArray<MbSpaceItem> & ) = 0;
@@ -108,15 +108,16 @@ public :
void SetOperation( OperationType op ) { operation = op; }
/** \} */
protected :
/// \ru Удалить строители ближайшего тела. \en Delete internal creators.
void DeleteCreators();
/// \ru Удалить строители ближайшего тела. \en Delete internal creators.
void DeleteCreators();
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveSweptSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCurveSweptSolid & );
DECLARE_PERSISTENT_CLASS( MbCurveSweptSolid )
}; // MbCurveSweptSolid
IMPL_PERSISTENT_OPS( MbCurveSweptSolid )
#endif // __CR_SWEPT_SOLID_H
+4 -3
View File
@@ -63,17 +63,18 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSymmetrySolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbSymmetrySolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbSymmetrySolid )
}; // MbSymmetrySolid
IMPL_PERSISTENT_OPS( MbSymmetrySolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать симметричную оболочку.
\en Create a symmetric shell. \~
+8 -7
View File
@@ -63,16 +63,16 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid solid
bool CreateShell( MbFaceShell *&shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
// \ru Дать параметры. \en Get the parameters.
void GetParameters( SweptValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SweptValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( SweptValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SweptValues & params ) { parameters = params; }
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbThinShellCreator & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbThinShellCreator & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbThinShellCreator )
}; // MbThinShellCreator
@@ -171,4 +171,5 @@ MATH_FUNC (MbCreator *) CreateLoftedShell( const MbLoftedCurvesShellParams & par
MbResultType & res,
MbFaceShell *& shell );
#endif // __CR_THIN_SHEET_H
+6 -5
View File
@@ -79,12 +79,12 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( SweptValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SweptValues & params ) { parameters = params; }
/// \ru Дать параметры. \en Get the parameters.
void GetParameters( SweptValues & params ) const { params = parameters; }
/// \ru Установить параметры. \en Set the parameters.
void SetParameters( const SweptValues & params ) { parameters = params; }
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbShellSolid )
OBVIOUS_PRIVATE_COPY( MbShellSolid )
@@ -92,6 +92,7 @@ OBVIOUS_PRIVATE_COPY( MbShellSolid )
IMPL_PERSISTENT_OPS( MbShellSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать эквидистантную оболочку с общим эквидистантным смещением.
\en Create an offset shell with the common offset distance. \~
+11 -10
View File
@@ -58,25 +58,26 @@ public: // \ru Общие функции математического объе
/// \ru Построение оболочки \en Creation of a shell
bool CreateShell( MbFaceShell *&, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
void Refresh( MbFaceShell & ) override; ///< \ru Обновить форму оболочки \en Update shape of the shell
// \ru Добавить модификацию по матрице \en Add a modification by a matrix
void AddMatrix( MbFaceShell &, const MbMatrix3D & );
// \ru Добавить модификацию по матрице \en Add a modification by a matrix
void AddMatrix( MbFaceShell &, const MbMatrix3D & );
// \ru Дать параметры. \en Get the parameters.
void GetParameters( TransformValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const TransformValues & params ) { parameters = params; }
// \ru Дать параметры. \en Get the parameters.
void GetParameters( TransformValues & params ) const { params = parameters; }
// \ru Установить параметры. \en Set the parameters.
void SetParameters( const TransformValues & params ) { parameters = params; }
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbTransformedSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbTransformedSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTransformedSolid )
};
}; // MbTransformedSolid
IMPL_PERSISTENT_OPS( MbTransformedSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создание строителя масштабированной оболочки.
\en Creation of constructor of a scaled shell. \~
+7 -6
View File
@@ -90,17 +90,18 @@ public:
// \ru Построение оболочки по исходным данным \en Construction of a shell from the given data
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override;
RPArray<MbSpaceItem> * items = nullptr ) override;
// \ru Установить номера выбраных граней усекаемого тела \en Set indices of selected faces of the solid being truncated.
void SetSelIndices( const std::vector<MbItemIndex> & selInds );
// \ru Установить номера выбраных граней усекаемого тела \en Set indices of selected faces of the solid being truncated.
void SetSelIndices( const std::vector<MbItemIndex> & selInds );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTruncatedShell )
OBVIOUS_PRIVATE_COPY( MbTruncatedShell )
};
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbTruncatedShell )
OBVIOUS_PRIVATE_COPY( MbTruncatedShell )
}; // MbTruncatedShell
IMPL_PERSISTENT_OPS( MbTruncatedShell )
//------------------------------------------------------------------------------
/** \brief \ru Построить усечённую оболочку.
\en Build a truncated shell. \~
+17 -17
View File
@@ -102,35 +102,35 @@ public :
// \ru Общие функции твердого тела \en Common functions of solid
bool CreateShell( MbFaceShell *& shell, MbeCopyMode sameShell,
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
RPArray<MbSpaceItem> * items = nullptr ) override; // \ru Построение \en Construction
void SetYourVersion( VERSION version, bool forAll ) override;
public:
/// \ru Тип булевой операции над телами. \en Type of Boolean operation on solids.
OperationType GetOperationType() const { return operation; }
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double GetBuildSag() const { return buildSag; }
/// \ru Тип булевой операции над телами. \en Type of Boolean operation on solids.
OperationType GetOperationType() const { return operation; }
/// \ru Угловое отклонение при движении по кривым и поверхностям. \en Angular deviation while moving along curves and surfaces.
double GetBuildSag() const { return buildSag; }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.size(); }
/// \ru Дать строитель. \en Get the creator.
const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? &(*creators[k]) : nullptr); }
/// \ru Дать строитель. \en Get the creator.
MbCreator * SetCreator( size_t k ) { return ((k < creators.size()) ? &(*creators[k]) : nullptr); }
/// \ru Общее количество строителей. \en Total count of creators.
size_t GetCreatorsCount() const { return creators.size(); }
/// \ru Дать строитель. \en Get the creator.
const MbCreator * GetCreator( size_t k ) const { return ((k < creators.size()) ? &(*creators[k]) : nullptr); }
/// \ru Дать строитель. \en Get the creator.
MbCreator * SetCreator( size_t k ) { return ((k < creators.size()) ? &(*creators[k]) : nullptr); }
/// \ru Собрать группы общих строителей тел. \en Collect groups of shared creators.
static size_t CollectSharedCreators( c3d::CreatorsSPtrVector & creators, c3d::IndicesVector & countNumbers, c3d::IndicesVector & sharedLinks );
public:
/// \ru Собрать группы общих строителей тел. \en Collect groups of shared creators.
static size_t CollectSharedCreators( c3d::CreatorsSPtrVector & creators, c3d::IndicesVector & countNumbers, c3d::IndicesVector & sharedLinks );
private :
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbUnionSolid & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbUnionSolid & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbUnionSolid )
}; // MbUnionSolid
IMPL_PERSISTENT_OPS( MbUnionSolid )
//------------------------------------------------------------------------------
/** \brief \ru Создать оболочку булевой операции множества оболочек.
\en Create a shell of Boolean operation of shell set. \~
+35 -34
View File
@@ -424,7 +424,7 @@ public :
\return \ru Выполнено ли построение.
\en Whether the construction is performed. \~
*/
bool CreateWireFrame( SPtr<MbWireFrame> & frame, MbeCopyMode sameShell );
bool CreateWireFrame( SPtr<MbWireFrame> & frame, MbeCopyMode sameShell );
/** \brief \ru Построить точечный каркас по исходным данным.
\en Create a point-frame from the source data. \~
@@ -453,7 +453,7 @@ public :
\return \ru Выполнено ли построение.
\en Whether the construction is performed. \~
*/
bool CreatePointFrame( SPtr<MbPointFrame> & frame, MbeCopyMode sameShell );
bool CreatePointFrame( SPtr<MbPointFrame> & frame, MbeCopyMode sameShell );
/** \brief \ru Создать полигональный объект по исходным данным.
\en Create a polygonal object from the source data. \~
@@ -482,7 +482,7 @@ public :
\return \ru Выполнено ли построение.
\en Whether the construction is performed. \~
*/
bool CreateMesh( SPtr<MbMesh> & mesh, MbeCopyMode sameShell );
bool CreateMesh( SPtr<MbMesh> & mesh, MbeCopyMode sameShell );
/// \ru Выдать свойства объекта. \en Get properties of the object.
virtual void GetProperties( MbProperties & );
@@ -509,44 +509,45 @@ public :
/// \ru Переместить/Изменить строитель. \en Displace/Change the creator.
virtual bool Perform( MbCreator * ) const;
/// \ru Установить версию объектов. \en Set the objects version.
/// \ru Установить версию объектов. \en Set the objects version.
virtual void SetYourVersion( VERSION version, bool forAll );
/// \ru Выдать версию объекта. \en Get the object version.
VERSION GetYourVersion() const { return names->GetMathVersion(); }
/// \ru Выдать версию объекта. \en Get the object version.
VERSION GetYourVersion() const { return names->GetMathVersion(); }
/// \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; }
/// \ru Установить именователь объекта. \en Set the object's name-maker.
void SetNameMaker( const MbSNameMaker & n ) { names->SetNameMaker( n ); }
/// \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; }
/// \ru Установить именователь объекта. \en Set the object's name-maker.
void SetNameMaker( const MbSNameMaker & n ) { names->SetNameMaker( n ); }
/// \ru Выдать главное имя объекта. \en Get the main name of the object.
SimpleName GetMainName() const { return names->GetMainName(); }
/// \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; }
/// \ru Установить флаг состояния. \en Set the flag of state.
void SetStatus( MbeProcessState l ) { status = l; }
/// \ru Выдать главное имя объекта. \en Get the main name of the object.
SimpleName GetMainName() const { return names->GetMainName(); }
/// \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; }
/// \ru Установить флаг состояния. \en Set the flag of state.
void SetStatus( MbeProcessState l ) { status = l; }
/** \brief \ru Регистрировать объект.
\en Register the object. \~
\details \ru Регистрация объекта для предотвращения его многократной записи.
Другие объекты могут содержать указатель на данный объект.
Функция взводит флаг, который позволяет записывать объект один раз, а в остальных записях ссылаться на записанный экземпляр.
Чтение так же выполняется один раз, а в остальных случаях чтения подставляется адрес уже прочитанного объекта.
\en Object registration for preventing its multiple writing.
Other objects may contain a pointer to the given object.
The function sets a flag that allow to write the object once and to use the references to the recorded instance in the other records.
Reading is performed once too, in other cases of reading the address of the already read object is used. \~
*/
void PrepareWrite() const { SetRegistrable( (GetUseCount() > 1) ? registrable : noRegistrable ); }
/** \brief \ru Регистрировать объект.
\en Register the object. \~
\details \ru Регистрация объекта для предотвращения его многократной записи.
Другие объекты могут содержать указатель на данный объект.
Функция взводит флаг, который позволяет записывать объект один раз, а в остальных записях ссылаться на записанный экземпляр.
Чтение так же выполняется один раз, а в остальных случаях чтения подставляется адрес уже прочитанного объекта.
\en Object registration for preventing its multiple writing.
Other objects may contain a pointer to the given object.
The function sets a flag that allow to write the object once and to use the references to the recorded instance in the other records.
Reading is performed once too, in other cases of reading the address of the already read object is used. \~
*/
void PrepareWrite() const { SetRegistrable( (GetUseCount() > 1) ? registrable : noRegistrable ); }
/** \} */
private:
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию \en Declaration without implementation of the assignment operator to prevent an assignment by default
MbCreator & operator = ( const MbCreator & );
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию \en Declaration without implementation of the assignment operator to prevent an assignment by default
MbCreator & operator = ( const MbCreator & );
DECLARE_PERSISTENT_CLASS( MbCreator )
}; // MbCreator
+157 -155
View File
@@ -392,7 +392,7 @@ public :
void Refresh() override; // \ru Сбросить все временные данные \en Flush all the temporary data
void PrepareIntegralData( const bool forced ) const override; // \ru Рассчитать временные (mutable) данные объекта. \en Calculate temporary (mutable) data of an object.
bool IsVisibleInRect( const MbRect & r, bool exact = false ) const override; // \ru Виден ли объект в заданном прямоугольнике \en Whether the object is visible in the given rectangle
using MbCurve::IsVisibleInRect;
using MbCurve::IsVisibleInRect;
bool IsCompleteInRect( const MbRect & r ) const override; // \ru Виден ли объект полностью в в заданном прямоугольнике \en Whether the object is completely visible in the given rectangle
/** \} */
/** \ru \name Функции описания области определения кривой.
@@ -434,7 +434,7 @@ public :
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
/** \} */
/** \ru \name Функции движения по кривой
\en \name Functions of moving along the curve
@@ -454,8 +454,8 @@ public :
// \ru Посчитать метрическую длину дуги от параметра t1 до t2. \en Calculate the metric length of the arc from parameter 't1' to 't2'.
double CalculateLength( double t1, double t2 ) const override;
// \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
double PointProjection( const MbCartPoint & pnt ) const override; // \ru Проекция точки на кривую \en Projection of a point onto the curve
bool NearPointProjection( const MbCartPoint & pnt, double xEpsilon, double yEpsilon,
@@ -517,7 +517,7 @@ public :
\return \ru true - если операция прошла успешно. Иначе возвращает false.
\en True - if the operation succeeded. Otherwise returns false. \~
*/
bool ModifyByPoint( size_t ind, const MbCartPoint & pnt ); // \ru Модификация по характерным точкам \en Modification by the characteristic points
bool ModifyByPoint( size_t ind, const MbCartPoint & pnt ); // \ru Модификация по характерным точкам \en Modification by the characteristic points
bool GetSpecificPoint( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const override;
void Isoclinal( const MbVector & angle, SArray <double> & tFind ) const override; // \ru Прямые, проходящие под углом к оси 0X и касательные к кривой \en Lines passing angularly to the 0X axis and tangent to the curve
@@ -527,21 +527,21 @@ public :
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
/// \ru Проверить с заданной точностью, является ли эллипс окружностью. \en Check whether the ellipse is a circle with a given tolerance.
bool IsCircle( double eps = PARAM_EPSILON ) const;
bool IsCircle( double eps = PARAM_EPSILON ) const;
/** \} */
/** \ru \name Функции в локальной системе координат плейсмента объекта.
\en \name Functions in the local coordinate system of object placement.
\{ */
/// \ru Выдать локальную систему координат объекта. \en Get the local coordinate system of an object.
/// \ru Выдать локальную систему координат объекта. \en Get the local coordinate system of an object.
const MbPlacement & GetPlacement() const { return position; }
/// \ru Изменить локальную систему координат объекта. \en Modify the local coordinate system of the object.
void SetPlacement( const MbPlacement & pl ) { position = pl; Refresh(); }
/// \ru Определить, является ли локальная система координат ортонормированной. \en Determine whether the local coordinate system is orthonormalized.
bool IsPositionNormal() const { return ( position.IsNormal() ); }
/// \ru Определить, является ли локальная система координат ортогональной с равными по длине осями X,Y. \en Determine whether the local coordinate system is orthogonal with X and Y axes equal by length.
bool IsPositionCircular() const { return ( position.IsCircular() ); }
/// \ru Определить, является ли локальная система координат ортогональной и изотропной по осям. \en Determine whether the local coordinate system is orthogonal and isotropic by the axes.
bool IsPositionIsotropic() const { return ( position.IsIsotropic()); }
/// \ru Изменить локальную систему координат объекта. \en Modify the local coordinate system of the object.
void SetPlacement( const MbPlacement & pl ) { position = pl; Refresh(); }
/// \ru Определить, является ли локальная система координат ортонормированной. \en Determine whether the local coordinate system is orthonormalized.
bool IsPositionNormal() const { return ( position.IsNormal() ); }
/// \ru Определить, является ли локальная система координат ортогональной с равными по длине осями X,Y. \en Determine whether the local coordinate system is orthogonal with X and Y axes equal by length.
bool IsPositionCircular() const { return ( position.IsCircular() ); }
/// \ru Определить, является ли локальная система координат ортогональной и изотропной по осям. \en Determine whether the local coordinate system is orthogonal and isotropic by the axes.
bool IsPositionIsotropic() const { return ( position.IsIsotropic()); }
/** \brief \ru Вычислить угол в локальной системе координат.
\en Calculate the angle in the local coordinate system. \~
@@ -554,7 +554,7 @@ public :
\return \ru Значение угла.
\en Value of angle. \~
*/
double GetPositionAngle( const MbCartPoint & p ) const; // \ru Вычисление угла в локальной системе \en Calculation of angle in the local system
double GetPositionAngle( const MbCartPoint & p ) const; // \ru Вычисление угла в локальной системе \en Calculation of angle in the local system
/** \brief \ru Инициализация параметров эллипса.
\en Initialization of the ellipse parameters. \~
@@ -573,53 +573,53 @@ public :
\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 ); // \ru Инициализация параметров по значениям углов в локальной системе \en Initialization of the parameters by values of angles in the local system
/** \} */
/** \ru \name Функции для работы с данными.
\en \name Functions for working with data.
\{ */
double GetR() const { return a; } ///< \ru Вернуть радиус или длину полуоси вдоль X для эллипса. \en Return the radius and the length of semiaxis along X for the ellipse
double GetRadiusA() const { return a; } ///< \ru Вернуть длину полуоси вдоль X. \en Return the length of semiaxis along X.
double GetRadiusB() const { return b; } ///< \ru Вернуть длину полуоси вдоль Y. \en Return the length of semiaxis along Y.
void SetRadiusA( double aa ) { a = aa; Refresh(); } ///< \ru Установить длину полуоси вдоль X. \en Set the length of semiaxis along X.
void SetRadiusB( double bb ) { b = bb; Refresh(); } ///< \ru Установить длину полуоси вдоль Y. \en Set the length of semiaxis along Y.
double GetAngle() const { return (trim2 - trim1); } ///< \ru Вернуть угол раствора дуги. \en Return the arc opening angle.
/// \ru Установить угол раствора дуги. Начальная точка дуги остается неизменной. \en Set the arc opening angle. The start point of the arc remains unchanged.
void SetAngle ( double ang ) { InitByPositionAngles( trim1, sense ? (trim1+ang) : (trim1-ang), sense ); }
double GetR() const { return a; } ///< \ru Вернуть радиус или длину полуоси вдоль X для эллипса. \en Return the radius and the length of semiaxis along X for the ellipse
double GetRadiusA() const { return a; } ///< \ru Вернуть длину полуоси вдоль X. \en Return the length of semiaxis along X.
double GetRadiusB() const { return b; } ///< \ru Вернуть длину полуоси вдоль Y. \en Return the length of semiaxis along Y.
void SetRadiusA( double aa ) { a = aa; Refresh(); } ///< \ru Установить длину полуоси вдоль X. \en Set the length of semiaxis along X.
void SetRadiusB( double bb ) { b = bb; Refresh(); } ///< \ru Установить длину полуоси вдоль Y. \en Set the length of semiaxis along Y.
double GetAngle() const { return (trim2 - trim1); } ///< \ru Вернуть угол раствора дуги. \en Return the arc opening angle.
/// \ru Установить угол раствора дуги. Начальная точка дуги остается неизменной. \en Set the arc opening angle. The start point of the arc remains unchanged.
void SetAngle ( double ang ) { InitByPositionAngles( trim1, sense ? (trim1+ang) : (trim1-ang), sense ); }
/// \ru Вычислить угол между осями OX локальной и глобальной системой координат. \en Calculate the angle between OX axes of the local and the global coordinate systems.
double GetMajorAxisAngle() const { return position.GetAxisX().DirectionAngle(); }
/// \ru Вычислить угол между осями OX локальной и глобальной системой координат. \en Calculate the angle between OX axes of the local and the global coordinate systems.
double GetMajorAxisAngle() const { return position.GetAxisX().DirectionAngle(); }
double GetTrim1() const { return trim1; } ///< \ru Вернуть параметр начальной точки. \en Return the parameter of the start point.
double GetTrim2() const { return trim2; } ///< \ru Вернуть параметр конечной точки. \en Return the parameter of the end point.
int GetSense() const { return trim2 > trim1 ? 1 : -1; } ///< \ru Определить флаг совпадения направления с направлением базовой кривой. \en Determine the flag of coincidence of the direction with the base curve direction.
void SetTrim1( double t ) { trim1 = t; InitByPositionAngles( trim1, trim2, sense ); } ///< \ru Установить параметр начальной точки. \en Set the parameter of the start point.
void SetTrim2( double t ) { trim2 = t; InitByPositionAngles( trim1, trim2, sense ); } ///< \ru Установить параметр конечной точки. \en Set the parameter of the end point.
double GetTrim1() const { return trim1; } ///< \ru Вернуть параметр начальной точки. \en Return the parameter of the start point.
double GetTrim2() const { return trim2; } ///< \ru Вернуть параметр конечной точки. \en Return the parameter of the end point.
int GetSense() const { return trim2 > trim1 ? 1 : -1; } ///< \ru Определить флаг совпадения направления с направлением базовой кривой. \en Determine the flag of coincidence of the direction with the base curve direction.
void SetTrim1( double t ) { trim1 = t; InitByPositionAngles( trim1, trim2, sense ); } ///< \ru Установить параметр начальной точки. \en Set the parameter of the start point.
void SetTrim2( double t ) { trim2 = t; InitByPositionAngles( trim1, trim2, sense ); } ///< \ru Установить параметр конечной точки. \en Set the parameter of the end point.
/// \ru Установить радиус дуги окружности. \en Set the radius of the circular arc.
void SetRadius( double rad ) {
a = rad;
b = rad;
Refresh();
}
/// \ru Установить центр. \en Set the center.
void SetCentre( const MbCartPoint & c ) {
position.SetOrigin( c ); // \ru Установить центр \en Set the center
Refresh();
}
/// \ru Установить направление дуги. \en Set the arc orientation.
void SetDirection( bool clockwise ) {
int newSense = clockwise ? - 1 : + 1;
if ( newSense != GetSense() ) {
InitByPositionAngles( trim1, trim2, newSense );
}
}
/// \ru Инициализировать дуги эллипса заданной дугой. \en Initialize elliptical arcs with the given arc.
void Init( const MbArc & );
/// \ru Инициализировать окружность по центру и радиусу \en Initialize a circle by the center and the radius
void Init( const MbCartPoint & pc, double rad );
/// \ru Инициализировать дугу по начальному и конечному параметрам. \en Initialize arc by parameters for begin point and end point.
void Init( double t1, double t2 );
/// \ru Установить радиус дуги окружности. \en Set the radius of the circular arc.
void SetRadius( double rad ) {
a = rad;
b = rad;
Refresh();
}
/// \ru Установить центр. \en Set the center.
void SetCentre( const MbCartPoint & c ) {
position.SetOrigin( c ); // \ru Установить центр \en Set the center
Refresh();
}
/// \ru Установить направление дуги. \en Set the arc orientation.
void SetDirection( bool clockwise ) {
int newSense = clockwise ? - 1 : + 1;
if ( newSense != GetSense() ) {
InitByPositionAngles( trim1, trim2, newSense );
}
}
/// \ru Инициализировать дуги эллипса заданной дугой. \en Initialize elliptical arcs with the given arc.
void Init( const MbArc & );
/// \ru Инициализировать окружность по центру и радиусу \en Initialize a circle by the center and the radius
void Init( const MbCartPoint & pc, double rad );
/// \ru Инициализировать дугу по начальному и конечному параметрам. \en Initialize arc by parameters for begin point and end point.
void Init( double t1, double t2 );
/** \brief \ru Инициализировать дугу окружности.
\en Initialize a circular arc. \~
@@ -638,7 +638,7 @@ public :
\param[in] cl - \ru Признак замкнутости.
\en Closedness attribute. \~
*/
void Init3Points( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3, bool cl );
void Init3Points( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3, bool cl );
/** \brief \ru Инициализировать дугу окружности.
\en Initialize a circular arc. \~
@@ -655,7 +655,7 @@ public :
\param[in] p3 - \ru Конец дуги.
\en End of the arc. \~
*/
void InitCircle( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3 );
void InitCircle( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3 );
/** \brief \ru Инициализировать дугу окружности.
\en Initialize a circular arc. \~
@@ -668,7 +668,7 @@ public :
\param[in] p2 - \ru Конец дуги.
\en End of the arc. \~
*/
void InitArc( MbCartPoint & pc, const MbCartPoint & p1, const MbCartPoint & p2 );
void InitArc( MbCartPoint & pc, const MbCartPoint & p1, const MbCartPoint & p2 );
/** \brief \ru Инициализировать дугу окружности.
\en Initialize a circular arc. \~
@@ -695,7 +695,7 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( const MbCartPoint & pc, double rad,
void Init( const MbCartPoint & pc, double rad,
const MbCartPoint & p1, const MbCartPoint & p2, bool clockwise );
// \ru Инициализация по центру и точке на дуге ( 360 градусов ) \en Initialization by the center and a point on the arc (360 degrees)
@@ -710,7 +710,7 @@ public :
\param[in] p - \ru Точка на окружности.
\en Point on circle. \~
*/
void Init( const MbCartPoint & pc, const MbCartPoint & p );
void Init( const MbCartPoint & pc, const MbCartPoint & p );
// \ru Первая точка, угол, радиус ( 360 градусов ) \en The first point, angle and radius (360 degrees)
/** \brief \ru Инициализировать окружность.
@@ -728,7 +728,7 @@ public :
\param[in] rad - \ru Радиус.
\en Radius. \~
*/
void Init( const MbCartPoint & p1, double angle, double rad );
void Init( const MbCartPoint & p1, double angle, double rad );
// \ru центр, точка на окружности, начальный угол ( 360 градусов ) \en Center, a point on the circle, initial angle (360 degrees)
/** \brief \ru Инициализировать окружность.
@@ -744,7 +744,7 @@ public :
\param[in] angle - \ru Начальный параметр.
\en Get the start parameter. \~
*/
void Init( const MbCartPoint & pc, const MbCartPoint & pnt, double angle );
void Init( const MbCartPoint & pc, const MbCartPoint & pnt, double angle );
// \ru Центр, угол первой точки, угол второй точки, радиус, направление \en Centre, angle of the first point, angle of the second point, radius, direction
/** \brief \ru Инициализировать дугу окружность.
@@ -770,7 +770,7 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( const MbCartPoint & pc, double angle1, double angle2, double rad, bool clockwise );
void Init( const MbCartPoint & pc, double angle1, double angle2, double rad, bool clockwise );
// \ru центр, точка, номер точки, угол другой точки, направление \en Center, point, index of point, angle of another point, direction
/** \brief \ru Инициализировать дугу окружность.
@@ -794,7 +794,7 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( const MbCartPoint & pc, const MbCartPoint & pnt, bool firstPoint, double angle, bool clockwise );
void Init( const MbCartPoint & pc, const MbCartPoint & pnt, bool firstPoint, double angle, bool clockwise );
// \ru центр, угол первой точки, вторая точка, радиус, направление \en Center, angle of the first point, the second point, radius, direction
/** \brief \ru Инициализировать дугу окружность.
@@ -818,7 +818,7 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
initSense can't be equal to zero. \~
*/
void Init( const MbCartPoint & pc, double angle1, const MbCartPoint & p2, double rad, bool clockwise );
void Init( const MbCartPoint & pc, double angle1, const MbCartPoint & p2, double rad, bool clockwise );
// \ru Окружность, первая точка, вторая точка, направление \en Circle, the first point, the second point, direction
/** \brief \ru Инициализировать дугу окружность.
@@ -842,7 +842,7 @@ public :
\en Direction. initSense > 0 - counterclockwise, initSense < 0 - clockwise.
initSense can't be equal to zero. \~
*/
void Init( MbArc * obj, const MbCartPoint & p1, const MbCartPoint & p2, int initSense );
void Init( MbArc * obj, const MbCartPoint & p1, const MbCartPoint & p2, int initSense );
// \ru Первая точка, вторая точка, угол, номер угла, направление \en The first point, the second point, angle, index of angle, direction
/** \brief \ru Инициализировать дугу окружность.
@@ -868,9 +868,9 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( const MbCartPoint & p1, const MbCartPoint & p2, double angle, bool firstAngle, bool clockwise );
void Init( const MbCartPoint & p1, const MbCartPoint & p2, double angle, bool firstAngle, bool clockwise );
// \ru Плавающий центр, угол первой точки, угол второй точки, точка, номер точки, направление \en Variable center, angle of the first point, angle of the second point, index of the point, direction
// \ru Плавающий центр, угол первой точки, угол второй точки, точка, номер точки, направление \en Variable center, angle of the first point, angle of the second point, index of the point, direction
/** \brief \ru Инициализировать дугу окружность.
\en Initialize a circular arc. \~
\details \ru В результате операции получаем дугу окружности, одним из концов которой является точка pnt.
@@ -898,10 +898,10 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( MbCartPoint & pc, double angle1, double angle2,
const MbCartPoint & pnt, bool firstPoint, bool clockwise );
void Init( MbCartPoint & pc, double angle1, double angle2,
const MbCartPoint & pnt, bool firstPoint, bool clockwise );
// \ru Плавающий центр, точка, номер точки, угол противоположной точки, радиус, направление \en Variable center, point, index of the point, angle of the opposite point, radius, direction
// \ru Плавающий центр, точка, номер точки, угол противоположной точки, радиус, направление \en Variable center, point, index of the point, angle of the opposite point, radius, direction
/** \brief \ru Инициализировать дугу окружность.
\en Initialize a circular arc. \~
\details \ru Исходный объект изменяется на дугу окружности с заданным радиусом и проходящую через точку p.
@@ -925,8 +925,8 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( MbCartPoint & pc, const MbCartPoint & p, bool firstPoint,
double angle, double rad, bool clockwise );
void Init( MbCartPoint & pc, const MbCartPoint & p, bool firstPoint,
double angle, double rad, bool clockwise );
/** \brief \ru Инициализировать дугу окружность.
\en Initialize a circular arc. \~
@@ -949,11 +949,11 @@ public :
\en Direction. initSense > 0 - counterclockwise, initSense < 0 - clockwise.
initSense can't be equal to zero. \~
*/
void Init( const MbCartPoint & pc, const MbCartPoint & p1, const MbCartPoint & p2, int initSense );
void Init( const MbCartPoint & pc, const MbCartPoint & p1, const MbCartPoint & p2, int initSense );
// \ru Инициализация по начальной и конечной точкам и 1/2 угла раствора дуги \en Initialization by the starting and end points and 1/2 of the arc opening angle
// \ru Если diskrData != nullptr, то округлить радиус и скорректировать первую \en If diskrData != nullptr, then round the radius and correct the first
// \ru Или вторую точку (зависит от correctFirstPnt) \en Or the second point (depends on correctFirstPnt)
// \ru Инициализация по начальной и конечной точкам и 1/2 угла раствора дуги \en Initialization by the starting and end points and 1/2 of the arc opening angle
// \ru Если diskrData != nullptr, то округлить радиус и скорректировать первую \en If diskrData != nullptr, then round the radius and correct the first
// \ru Или вторую точку (зависит от correctFirstPnt) \en Or the second point (depends on correctFirstPnt)
/** \brief \ru Инициализировать дугу окружность.
\en Initialize a circular arc. \~
\details \ru Инициализация происходит по начальной и конечной точкам и 1/2 угла раствора дуги.
@@ -975,10 +975,11 @@ public :
\en Determines which point to be corrected after the rounding.
correctFirstPnt == true - the first point is to be corrected. \~
*/
void Init( double a2, MbCartPoint & p1, MbCartPoint & p2,
const DiskreteLengthData * diskrData = nullptr,
bool correctFirstPnt = true );
// \ru Инициализация эллипса \en Ellipse initialization
void Init( double a2, MbCartPoint & p1, MbCartPoint & p2,
const DiskreteLengthData * diskrData = nullptr,
bool correctFirstPnt = true );
// \ru Инициализация эллипса \en Ellipse initialization
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
\details \ru В результате операции получаем эллипс с заданными локальной системой координат и полуосями.
@@ -990,7 +991,7 @@ public :
\param[in] place - \ru Локальная система координат эллипса.
\en The local coordinate system of the ellipse. \~
*/
void Init( double aa, double bb, const MbPlacement & place );
void Init( double aa, double bb, const MbPlacement & place );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1011,7 +1012,7 @@ public :
\param[in] ang - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init( double aa, double bb, const MbCartPoint & pc, double ang );
void Init( double aa, double bb, const MbCartPoint & pc, double ang );
// \ru Различные варианты построения эллипса \en Different variants of ellipse construction
/** \brief \ru Инициализировать эллипс.
@@ -1033,8 +1034,8 @@ public :
\param[out] angle - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init1( const MbCartPoint & c, const MbCartPoint & p1,
double & len, double & angle );
void Init1( const MbCartPoint & c, const MbCartPoint & p1,
double & len, double & angle );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1055,8 +1056,8 @@ public :
\param[out] lenB - \ru Длина полуоси вдоль Y.
\en The length of semiaxis along Y. \~
*/
void Init2( const MbCartPoint & c, const MbCartPoint & p1,
MbCartPoint & p2, double & lenB );
void Init2( const MbCartPoint & c, const MbCartPoint & p1,
MbCartPoint & p2, double & lenB );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
\details \ru В результате операции получаем эллипс, вписанный в повернутый прямоугольник,
@@ -1076,8 +1077,8 @@ public :
\param[out] bb - \ru Длина полуоси вдоль Y.
\en The length of semiaxis along Y. \~
*/
void Init3( const MbCartPoint & c0, const MbCartPoint & p1,
double angle, double & aa, double & bb );
void Init3( const MbCartPoint & c0, const MbCartPoint & p1,
double angle, double & aa, double & bb );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1098,8 +1099,8 @@ public :
\param[out] bb - \ru Длина полуоси вдоль Y.
\en The length of semiaxis along Y. \~
*/
void Init4( const MbCartPoint & p1, const MbCartPoint & p2,
double angle, double & aa, double & bb );
void Init4( const MbCartPoint & p1, const MbCartPoint & p2,
double angle, double & aa, double & bb );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1124,8 +1125,8 @@ public :
\param[out] angle - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init5( const MbCartPoint & c, const MbCartPoint & p1, const MbCartPoint & p2,
double & aa, double & bb, double & angle );
void Init5( const MbCartPoint & c, const MbCartPoint & p1, const MbCartPoint & p2,
double & aa, double & bb, double & angle );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1148,8 +1149,8 @@ public :
\param[out] angle - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init6( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3,
double & aa, double & bb, double & angle );
void Init6( const MbCartPoint & p1, const MbCartPoint & p2, const MbCartPoint & p3,
double & aa, double & bb, double & angle );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1172,9 +1173,9 @@ public :
\param[out] angle - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init7( const MbCartPoint & pc,
MbCartPoint p1, MbCartPoint p2, MbCartPoint p3,
double & aa, double & bb, double & angle );
void Init7( const MbCartPoint & pc,
MbCartPoint p1, MbCartPoint p2, MbCartPoint p3,
double & aa, double & bb, double & angle );
/** \brief \ru Инициализировать эллипс.
\en Initialize an ellipse. \~
@@ -1199,10 +1200,10 @@ public :
\param[out] angle - \ru Угол между осями OX локальной и текущей системами координат.
\en An angle between OX axes of the local and the current coordinate systems. \~
*/
void Init8( const MbCartPoint & p1, const MbDirection & dir1,
const MbCartPoint & p2, const MbDirection & dir2,
const MbCartPoint & p3,
double & aa, double & bb, double & angle );
void Init8( const MbCartPoint & p1, const MbDirection & dir1,
const MbCartPoint & p2, const MbDirection & dir2,
const MbCartPoint & p3,
double & aa, double & bb, double & angle );
// \ru Различные варианты построения дуги эллипса \en Different variants of elliptical arc construction
/** \brief \ru Инициализировать дугу эллипса.
\en Initialize an elliptical arc. \~
@@ -1229,8 +1230,8 @@ public :
\en Direction. initSense > 0 - counterclockwise, initSense < 0 - clockwise.
initSense can't be equal to zero. \~
*/
void Init( double aa, double bb, const MbPlacement & place,
double t1, double t2, int initSense );
void Init( double aa, double bb, const MbPlacement & place,
double t1, double t2, int initSense );
/** \brief \ru Инициализировать дугу эллипса.
\en Initialize an elliptical arc. \~
@@ -1259,12 +1260,12 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init( double aa, double bb, const MbPlacement & place,
const MbCartPoint & p1, const MbCartPoint & p2, bool clockwise );
void Init( double aa, double bb, const MbPlacement & place,
const MbCartPoint & p1, const MbCartPoint & p2, bool clockwise );
// \ru Эллипс вписан в прямоугольник, заданный двумя диагональными точками p1, p2, \en Ellipse is inscribed into the rectangle given by two diagonal points p1, p2,
// \ru проекции точек pB и pE на эллипс определяют начало и конец дуги, \en The projections of points pB and pE onto ellipse determine the start and the end of the arc,
// \ru clockwise определяет движение от начальноц точки к конечной по часовой стрелке или против \en 'clockwise' determines moving from the starting point to the end point clockwise or counterclockwise
// \ru Эллипс вписан в прямоугольник, заданный двумя диагональными точками p1, p2, \en Ellipse is inscribed into the rectangle given by two diagonal points p1, p2,
// \ru проекции точек pB и pE на эллипс определяют начало и конец дуги, \en The projections of points pB and pE onto ellipse determine the start and the end of the arc,
// \ru clockwise определяет движение от начальноц точки к конечной по часовой стрелке или против \en 'clockwise' determines moving from the starting point to the end point clockwise or counterclockwise
/** \brief \ru Инициализировать дугу эллипса.
\en Initialize an elliptical arc. \~
\details \ru Эллипс вписан в прямоугольник, заданный двумя диагональными точками p1, p2.
@@ -1288,10 +1289,10 @@ public :
\en Direction. clockwise > 0 - moving counterclockwise, clockwise < 0 - clockwise.
'clockwise' can't be equal to zero. \~
*/
void Init4( const MbCartPoint & p1, const MbCartPoint & p2,
const MbCartPoint & pB, const MbCartPoint & pE, bool clockwise = false );
void Init4( const MbCartPoint & p1, const MbCartPoint & p2,
const MbCartPoint & pB, const MbCartPoint & pE, bool clockwise = false );
bool OnSector( const MbCartPoint & pnt ) const; ///< \ru Определить, находится ли луч от центра до точки в секторе дуги. \en Determine whether the ray from the center to the point is in the arc's sector.
bool OnSector( const MbCartPoint & pnt ) const; ///< \ru Определить, находится ли луч от центра до точки в секторе дуги. \en Determine whether the ray from the center to the point is in the arc's sector.
/** \brief \ru Определить попадание в сектор дуги.
\en Determine whether the ray hits the arc's sector. \~
@@ -1304,7 +1305,7 @@ public :
\result \ru true, если направление попадает в сектор дуги.
\en True if the direction hits the arc's sector. \~
*/
bool OnSector( double angle ) const; // \ru Находится угол в секторе дуги ? \en Is the angle in the arc's sector?
bool OnSector( double angle ) const; // \ru Находится угол в секторе дуги ? \en Is the angle in the arc's sector?
/** \brief \ru Заменить точку дуги.
\en Replace the arc's point. \~
@@ -1315,9 +1316,10 @@ public :
\param[in] pnt - \ru Новая точка.
\en A new point. \~
*/
void SetLimitPoint( ptrdiff_t number, const MbCartPoint & pnt ); // \ru Заменить точку дуги \en Replace the arc point
/// \ru Вернуть направление дуги: true - по часовой стрелке; false - против часовой стрелки. \en Return the arc direction: true - clockwise, false - counterclockwise.
bool IsClockwise() const { return ( position.IsLeft() == (GetSense() > 0) ); }
void SetLimitPoint( ptrdiff_t number, const MbCartPoint & pnt ); // \ru Заменить точку дуги \en Replace the arc point
/// \ru Вернуть направление дуги: true - по часовой стрелке; false - против часовой стрелки. \en Return the arc direction: true - clockwise, false - counterclockwise.
bool IsClockwise() const { return ( position.IsLeft() == (GetSense() > 0) ); }
/** \brief \ru Вернуть угол крайней точки дуги.
\en Return the angle of the end point. \~
@@ -1328,14 +1330,14 @@ public :
\result \ru Угол между направлением от центра к крайней точке и осью OX текущей системы координат.
\en The angle between the direction from the center to the end point and OX-axis of the current coordinate system. \~
*/
double GetLimitAngle( ptrdiff_t number ) const {
double ang = ( number == 1 ) ? trim1 : trim2;
if ( position.IsLeft() )
ang = -ang;
ang += GetMajorAxisAngle(); // \ru Угол с осью X \en Angle with X axis
c3d::NormalizeAngle( ang);
return ang;
}
double GetLimitAngle( ptrdiff_t number ) const {
double ang = ( number == 1 ) ? trim1 : trim2;
if ( position.IsLeft() )
ang = -ang;
ang += GetMajorAxisAngle(); // \ru Угол с осью X \en Angle with X axis
c3d::NormalizeAngle( ang);
return ang;
}
/** \brief \ru Изменить граничный угол дуги.
\en Modify the end angle of the arc. \~
@@ -1346,22 +1348,22 @@ public :
\result \ru Угол между направлением от центра к крайней точке и осью OX текущей системы координат.
\en The angle between the direction from the center to the end point and OX-axis of the current coordinate system. \~
*/
void SetLimitAngle( ptrdiff_t number, const MbCartPoint & pnt ) {
if ( number == 1 )
InitByPositionAngles( GetPositionAngle(pnt), trim2, GetSense() );
else
InitByPositionAngles( trim1, GetPositionAngle(pnt), GetSense() );
Refresh();
}
void SetLimitAngle( ptrdiff_t number, const MbCartPoint & pnt ) {
if ( number == 1 )
InitByPositionAngles( GetPositionAngle(pnt), trim2, GetSense() );
else
InitByPositionAngles( trim1, GetPositionAngle(pnt), GetSense() );
Refresh();
}
inline double CheckParam( double & t ) const; ///< \ru Установить параметр в область допустимых значений. \en Set the parameter to the range of the allowable values.
inline void ParamToAngle( double & t ) const; ///< \ru Перевести параметр кривой в угол. \en Convert the parameter of the curve to the angle.
inline void AngleToParam( double & t ) const; ///< \ru Перевести угол кривой в параметр кривой. \en Convert the curve angle to the curve parameter.
void ParameterInto( double &t ) const { AngleToParam( t ); } ///< \ru Перевести параметр базовой кривой в локальный параметр. \en Convert parameter of the base curve to the local parameter.
void ParameterFrom( double &t ) const { ParamToAngle( t ); } ///< \ru Перевести локальный параметр в параметр базовой кривой. \en Convert the local parameter to the parameter of the base curve.
bool IsBaseParamOn( double t, double eps = Math::paramEpsilon ) const; ///< \ru Определить, находится ли параметр базовой кривой в диапазоне усеченной кривой. \en Determine whether the parameter of the base curve is in range of the trimmed curve.
void ParameterInto( double &t ) const { AngleToParam( t ); } ///< \ru Перевести параметр базовой кривой в локальный параметр. \en Convert parameter of the base curve to the local parameter.
void ParameterFrom( double &t ) const { ParamToAngle( t ); } ///< \ru Перевести локальный параметр в параметр базовой кривой. \en Convert the local parameter to the parameter of the base curve.
bool IsBaseParamOn( double t, double eps = Math::paramEpsilon ) const; ///< \ru Определить, находится ли параметр базовой кривой в диапазоне усеченной кривой. \en Determine whether the parameter of the base curve is in range of the trimmed curve.
// \ru Работа с базовым эллипсом \en Work with the basic ellipse
/** \brief \ru Вычислить точку на эллипсе.
@@ -1373,7 +1375,7 @@ public :
\param[out] pnt - \ru Искомая точка.
\en The required point. \~
*/
void PointOnBaseEllipse( double & t, MbCartPoint & pnt ) const; // \ru Точка на базовом эллипсе \en A point on the base ellipse
void PointOnBaseEllipse( double & t, MbCartPoint & pnt ) const; // \ru Точка на базовом эллипсе \en A point on the base ellipse
/** \brief \ru Найти проекцию точки на эллипс.
\en Find the projection of a point onto the ellipse. \~
@@ -1384,10 +1386,10 @@ public :
\result \ru Параметр, соответствующий точке проекции.
\en Parameter corresponding to the projected point. \~
*/
double PointProjectionOnBaseEllipse( const MbCartPoint & pnt ) const; // \ru Проекция на базовом эллипсе \en Projection onto the base ellipse
double PointProjectionOnBaseEllipse( const MbCartPoint & pnt ) const; // \ru Проекция на базовом эллипсе \en Projection onto the base ellipse
void MakeAsBaseEllipse(); ///< \ru Инициализировать как полный эллипс. \en Initialize as complete ellipse.
void CopyBaseEllipse( const MbArc & init ); ///< \ru Cкопировать базовый эллипс. \en Copy the base ellipse.
void MakeAsBaseEllipse(); ///< \ru Инициализировать как полный эллипс. \en Initialize as complete ellipse.
void CopyBaseEllipse( const MbArc & init ); ///< \ru Cкопировать базовый эллипс. \en Copy the base ellipse.
/** \brief \ru Определить, самопересекается ли эквидистанта от эллипса.
\en Determine whether the ellipse offset has self-intersections. \~
@@ -1396,14 +1398,15 @@ public :
\result \ru true, если самопересекается.
\en True if it has self-intersections. \~
*/
bool IsSelfIntersectOffset( double d ) const; // \ru Есть ли самопересечения \en Whether there are self-intersections
// \ru Рассчитать коэффициенты неявного представления эллипса для IGES: Ax2 + Bxy + Cy2 + Dx + Ey + F = 0 \en Calculate coefficients of ellipse's implicit representation for IGES: Ax2 + Bxy + Cy2 + Dx + Ey + F = 0
bool ParametricToCanonicConic( double & A, double & B, double & C,
double & D, double & E, double & F,
double & X1, double & Y1, double & X2, double & Y2 ) const;
bool Normalize(); ///< \ru Ортонормировать локальную систему координат. \en Orthonormalize the local coordinate system.
void GetControlPoints( SArray<MbCartPoint> & points ); ///< \ru Заполнить массив контрольными точками. \en Fill the array with the control points.
void NormalizeTransform( const MbMatrix & mt ); ///< \ru Ортонормировать плейсмент при трансформировании. \en Orthonormalize the placement when transforming.
bool IsSelfIntersectOffset( double d ) const; // \ru Есть ли самопересечения \en Whether there are self-intersections
// \ru Рассчитать коэффициенты неявного представления эллипса для IGES: Ax2 + Bxy + Cy2 + Dx + Ey + F = 0 \en Calculate coefficients of ellipse's implicit representation for IGES: Ax2 + Bxy + Cy2 + Dx + Ey + F = 0
bool ParametricToCanonicConic( double & A, double & B, double & C,
double & D, double & E, double & F,
double & X1, double & Y1, double & X2, double & Y2 ) const;
bool Normalize(); ///< \ru Ортонормировать локальную систему координат. \en Orthonormalize the local coordinate system.
void GetControlPoints( SArray<MbCartPoint> & points ); ///< \ru Заполнить массив контрольными точками. \en Fill the array with the control points.
void NormalizeTransform( const MbMatrix & mt ); ///< \ru Ортонормировать плейсмент при трансформировании. \en Orthonormalize the placement when transforming.
/** \brief \ru Определить параметры пересечения прямой с эллипсом.
\en Determine the parameters of intersection of a line with an ellipse. \~
@@ -1414,7 +1417,7 @@ public :
\result \ru Количество точек пересечения.
\en Count of intersection points. \~
*/
ptrdiff_t EllipticIntersect( const MbLine & pLine, double cross[2], double eps0 = PARAM_PRECISION ) const;
ptrdiff_t EllipticIntersect( const MbLine & pLine, double cross[2], double eps0 = PARAM_PRECISION ) const;
const MbArc & operator = ( const MbArc & init ) { Init( init ); return *this; } ///< \ru Переопределяет оператор присваивания. \en Overrides the assignment operator.
void GetProperties( MbProperties & properties ) override; // \ru Выдать свойства объекта \en Get properties of the object
@@ -1423,12 +1426,12 @@ public :
void SetBasisPoints( const MbControlData & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
/** \} */
void ReadAsCircle( reader & in ); // \ru Чтение.
void ReadAsEllipse( reader & in ); // \ru Чтение.
void ReadAsEllipseArc( reader & in ); // \ru Чтение.
void WriteAsCircle( writer & out ) const; // \ru Запись.
void WriteAsEllipse( writer & out ) const; // \ru Запись.
void WriteAsEllipseArc( writer & out ) const; // \ru Запись.
void ReadAsCircle( reader & in ); // \ru Чтение.
void ReadAsEllipse( reader & in ); // \ru Чтение.
void ReadAsEllipseArc( reader & in ); // \ru Чтение.
void WriteAsCircle( writer & out ) const; // \ru Запись.
void WriteAsEllipse( writer & out ) const; // \ru Запись.
void WriteAsEllipseArc( writer & out ) const; // \ru Запись.
protected :
// \ru Инициализация параметров по значениям углов эллипса \en Initialization of parameters by values of ellipse angles.
@@ -1556,4 +1559,3 @@ MATH_FUNC (void) TrimmedWrite( writer & out, const MbTrimmedCurve * curve );
#endif // __CUR_ARC_H
+27 -26
View File
@@ -288,15 +288,15 @@ public :
VISITING_CLASS( MbArc3D );
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 & );
void Init( const MbPlacement3D &, double aa, double bb, double angle );
void Init( const MbArc3D & init, double t1, double t2, int initSense );
/// \ru Инициализация окружности или дуги окружности по трем точкам, (n == 0) - окружность или дуга по центру и двум точкам, (n == 1) - окружность или дуга по трем точкам \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.
void Init( const MbCartPoint3D & p0, const MbCartPoint3D & p1, const MbCartPoint3D & p2, int n, bool closed );
void Init( const MbCartPoint3D & p0, const MbCartPoint3D & p1, const MbCartPoint3D & p2, int n, bool closed );
/// \ru Инициализация дуги окружности по начальной и конечной точкам и 1/2 угла раствора дуги. \en Initialization of a circular arc by the starting and the end points and 1/2 of the arc opening angle.
void Init( double a_2, const MbCartPoint3D & p1, const MbCartPoint3D & p2, MbVector3D & vZ );
void Init( double a_2, const MbCartPoint3D & p1, const MbCartPoint3D & p2, MbVector3D & vZ );
/// \ru Инициализация дуги окружности по 2D-дуге и локальной системе координат. \en Initialization of an arc by 2D-arc and local coordinate system.
void Init( const MbArc & ellipse, const MbPlacement3D & pos );
void Init( const MbArc & ellipse, const MbPlacement3D & pos );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
/** \ru \name Общие функции геометрического объекта.
@@ -357,7 +357,7 @@ public :
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
/** \} */
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step ( double t, double sag ) const override; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag.
@@ -381,9 +381,9 @@ public :
void GetPointsByEvenLengthDelta( size_t n, std::vector<MbCartPoint3D> & pnts ) const override; // \ru Выдать n точек кривой с равными интервалами по длине дуги \en Get n points of curves equally spaced by the arc length
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of a curve
MbCurve * GetMapPsp( const MbMatrix3D &, double zNear,
MbRect1D * pRgn = nullptr ) const override;
MbRect1D * pRgn = nullptr ) const override;
double GetRadius() 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
@@ -397,25 +397,25 @@ public :
bool IsShift ( const MbSpaceItem &, MbVector3D &, bool & isSame, double accuracy = LENGTH_EPSILON ) const override;
bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const override; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves for union (joining) are similar
void SetRadiusA( double aa ) { a = aa; Refresh(); } ///< \ru Установить большую полуось. \en Set the major semiaxis.
void SetRadiusB( double bb ) { b = bb; Refresh(); } ///< \ru Установить малую полуось. \en Set the minor semiaxis.
void SetRadius( double r ) { a = r; b = r; Refresh(); } ///< \ru Установить радиус окружности. \en Set circle radius.
double GetRadiusA() const { return a; } ///< \ru Получить большую полуось. \en Get the major semiaxis.
double GetRadiusB() const { return b; } ///< \ru Получить малую полуось. \en Get the minor semiaxis.
void SetRadiusA( double aa ) { a = aa; Refresh(); } ///< \ru Установить большую полуось. \en Set the major semiaxis.
void SetRadiusB( double bb ) { b = bb; Refresh(); } ///< \ru Установить малую полуось. \en Set the minor semiaxis.
void SetRadius( double r ) { a = r; b = r; Refresh(); } ///< \ru Установить радиус окружности. \en Set circle radius.
double GetRadiusA() const { return a; } ///< \ru Получить большую полуось. \en Get the major semiaxis.
double GetRadiusB() const { return b; } ///< \ru Получить малую полуось. \en Get the minor semiaxis.
void SetLimitPoint( ptrdiff_t number, const MbCartPoint3D & ); ///< \ru Заменить начальную (1) или конечную (2) точку дуги. \en Replace a start (1) or end (2) point of the arc.
double GetAngle() const { return (trim2 - trim1); } ///< \ru Выдать граничный угол дуги \en Get the end angle of the arc.
void SetAngle ( double ang ) { trim2 = trim1 + ang; CheckClosed(); Refresh(); } ///< \ru Изменить граничный угол дуги. \en Change the end angle of the arc.
void SetLimitPoint( ptrdiff_t number, const MbCartPoint3D & ); ///< \ru Заменить начальную (1) или конечную (2) точку дуги. \en Replace a start (1) or end (2) point of the arc.
double GetAngle() const { return (trim2 - trim1); } ///< \ru Выдать граничный угол дуги \en Get the end angle of the arc.
void SetAngle ( double ang ) { trim2 = trim1 + ang; CheckClosed(); Refresh(); } ///< \ru Изменить граничный угол дуги. \en Change the end angle of the arc.
bool IsCircle( double eps = Math::metricRegion ) const; ///< \ru Является ли дуга эллипса дугой окружности. \en Whether the arc of an ellipse is an arc of a circle.
bool IsCircle( double eps = Math::metricRegion ) const; ///< \ru Является ли дуга эллипса дугой окружности. \en Whether the arc of an ellipse is an arc of a circle.
inline double CheckParam( double & t ) const; ///< \ru Установить параметр в область допустимых значений \en Set the parameter into the region of the legal values
inline void ParamToAngle( double & t ) const; ///< \ru Перевод параметра кривой в угол. \en Convert parameter of curve to the angle.
inline void AngleToParam( double & t ) const; ///< \ru Перевод угла кривой в параметр кривой. \en Convert an angle of curve to a parameter of curve.
inline double GetTrim1() const { return trim1; } ///< \ru Параметры начальной точки. \en Parameters of start point.
inline double GetTrim2() const { return trim2; } ///< \ru Параметры конечной точки. \en Parameters of end point.
bool MakeTrimmed( double t1, double t2 ); ///< \ru Установка параметров усечения с сохранением направления кривой. \en Setting of the parameters of trimming with keeping the curve direction.
void AlignXAxis(); ///< \ru Повернуть плейсмент круговой дуги так, чтобы ось ox указывала в начальную точку дуги. \en Rotate the placement of a circular arc so as the ox-axis points to the start point of the arc.
bool MakeTrimmed( double t1, double t2 ); ///< \ru Установка параметров усечения с сохранением направления кривой. \en Setting of the parameters of trimming with keeping the curve direction.
void AlignXAxis(); ///< \ru Повернуть плейсмент круговой дуги так, чтобы ось ox указывала в начальную точку дуги. \en Rotate the placement of a circular arc so as the ox-axis points to the start point of the arc.
/// \ru Является ли кривая плоской? \en Whether the curve is planar?
bool IsPlanar( double accuracy = METRIC_EPSILON ) const override;
@@ -432,24 +432,25 @@ public :
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
bool Normalize(); ///< \ru Ортонормировать локальную систему координат. \en Orthonormalize the local coordinate system.
bool IsPositionNormal() const { return ( !position.IsAffine() ); }
bool IsPositionCircular() const { return ( position.IsCircular() ); }
bool IsPositionIsotropic() const { return ( position.IsIsotropic()); }
bool Normalize(); ///< \ru Ортонормировать локальную систему координат. \en Orthonormalize the local coordinate system.
bool IsPositionNormal() const { return ( !position.IsAffine() ); }
bool IsPositionCircular() const { return ( position.IsCircular() ); }
bool IsPositionIsotropic() const { return ( position.IsIsotropic()); }
const MbCartPoint3D & GetCentre() const { return position.GetOrigin(); }
private:
void CheckClosed(); ///< \ru Проверить и установить признак замкнутости кривой. \en Check and set attribute of curve closedness.
void CheckClosed(); ///< \ru Проверить и установить признак замкнутости кривой. \en Check and set attribute of curve closedness.
private:
void operator = ( const MbArc3D & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbArc3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbArc3D )
};
IMPL_PERSISTENT_OPS( MbArc3D )
//------------------------------------------------------------------------------
// \ru Установить параметр в область допустимых значений \en Set the parameter into the region of the legal values
// ---
+11 -9
View File
@@ -81,7 +81,7 @@ public:
void ThirdDer ( double &t, MbVector3D &td ) const override; // \ru Третья производная по t \en Third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculate step of approximation
@@ -89,20 +89,22 @@ public:
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
void CalculateOnePolygon( size_t i, const MbStepData & stepData, MbPolygon3D * polygon ) const; // \ru Pассчитать полигон по параметру T \en Calculate polygon of the parameter T
// \ru Расчет весовых функций и их первых, вторых и третьих производных \en Calculation of the weight functions and their first, second and third derivatives
ptrdiff_t CalculateFunctions( double x, double * m,
double * mm0, double * mm1, double * mm2, double * mm3 ) const;
ptrdiff_t CalculateParam( double & t, double & x ) const; // \ru Расчет параметра и номера сплайна \en Calculation of the parameter and spline number
void GetWeightFunctions( double t, double * m,
double * mm0, double * mm1, double * mm2, double * mm3 ) const; // \ru Определение В-сплайнов \en Definition of B-splines
void CalculateOnePolygon( size_t i, const MbStepData & stepData, MbPolygon3D * polygon ) const; // \ru Pассчитать полигон по параметру T \en Calculate polygon of the parameter T
// \ru Расчет весовых функций и их первых, вторых и третьих производных \en Calculation of the weight functions and their first, second and third derivatives
ptrdiff_t CalculateFunctions( double x, double * m,
double * mm0, double * mm1, double * mm2, double * mm3 ) const;
ptrdiff_t CalculateParam( double & t, double & x ) const; // \ru Расчет параметра и номера сплайна \en Calculation of the parameter and spline number
void GetWeightFunctions( double t, double * m,
double * mm0, double * mm1, double * mm2, double * mm3 ) const; // \ru Определение В-сплайнов \en Definition of B-splines
private:
void operator = ( const MbBSpline & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbBSpline & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBSpline )
}; // MbBSpline
IMPL_PERSISTENT_OPS( MbBSpline )
#endif // __CUR_B_SPLINE_H
+35 -35
View File
@@ -240,7 +240,7 @@ public :
\param[in] cls - \ru Замкнутость кривой.
\en A curve closedness. \~
*/
void Init( const SArray<MbCartPoint> & initList, bool cls );
void Init( const SArray<MbCartPoint> & initList, bool cls );
/** \brief \ru Инициировать кривую по заданной кривой Безье.
\en Initialize a curve by a given Bezier curve. \~
@@ -249,7 +249,7 @@ public :
\param[in] initCurve - \ru Заданная кривая.
\en A given curve. \~
*/
void Init( const MbBezier & initCurve );
void Init( const MbBezier & initCurve );
/** \brief \ru Инициировать кривую по дуге окружности.
\en Initialize a curve by a circle arc. \~
@@ -258,7 +258,7 @@ public :
\param[in] arc - \ru Дуга окружности.
\en Circle arc. \~
*/
void Init( const MbArc & arc ); // \ru Инициализация по дуге окружности \en Initialization by a circle arc
void Init( const MbArc & arc ); // \ru Инициализация по дуге окружности \en Initialization by a circle arc
/** \brief \ru Инициировать кривую по контрольным точкам.
\en Initialize a curve by control points. \~
@@ -269,7 +269,7 @@ public :
\param[in] initList - \ru Массив контрольных точек кривой.
\en An array of control points of curve. \~
*/
void InitCtrlPoints( const SArray<MbCartPoint> & initList );
void InitCtrlPoints( const SArray<MbCartPoint> & initList );
/** \} */
/** \ru \name Функции описания области определения кривой.
\en \name Functions for curve domain description.
@@ -316,8 +316,7 @@ public :
void GetProperties( MbProperties & properties ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & properties ) override; // \ru Записать свойства объекта \en Set properties of the object
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией. \en Get the boundaries of the curve sections that are described by one analytical function. \~
void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const override;
@@ -335,9 +334,9 @@ public :
void Rebuild() override; // \ru Пересчитать Безье кривую \en Recalculate Bezier curve
void SetClosed( bool cls ) override;
// \ru BEG: для библиотеки (хорошо бы избавиться) \en BEG: for the library (it would be good to get rid of this)
void LtSetClosed( bool cls ); // \ru Установить признак замкнутости. \en Set the closedness attribute.
// \ru END: для библиотеки (хорошо бы избавиться) \en END: for the library (it would be good to get rid of this)
// \ru BEG: для библиотеки (хорошо бы избавиться) \en BEG: for the library (it would be good to get rid of this)
void LtSetClosed( bool cls ); // \ru Установить признак замкнутости. \en Set the closedness attribute.
// \ru END: для библиотеки (хорошо бы избавиться) \en END: for the library (it would be good to get rid of this)
void RemovePoint( ptrdiff_t index ) override; // \ru Удалить точку \en Remove the point.
void RemovePoints() override; // \ru Удалить все точки \en Remove all points
@@ -367,7 +366,7 @@ public :
\param[in] rightPnt- \ru Точка справа от характерной точки.
\en Point to the right of the characteristic point. \~
*/
void InsertPolePoints( size_t index, const MbCartPoint & leftPnt, const MbCartPoint & basePnt, const MbCartPoint & rightPnt );
void InsertPolePoints( size_t index, const MbCartPoint & leftPnt, const MbCartPoint & basePnt, const MbCartPoint & rightPnt );
/** \brief \ru Заменить полюс.
\en Replace the pole. \~
@@ -411,7 +410,7 @@ public :
\param[in] angle - \ru Угол между направлением касательной и осью OX текущей системы координат.
\en The angle between the direction of the tangent and the OX-axis of the current coordinate system. \~
*/
void AddPoint( MbCartPoint & pnt, double dl, double dr, double angle );
void AddPoint( MbCartPoint & pnt, double dl, double dr, double angle );
/** \brief \ru Определить выпуклую оболочку сегмента кривой.
\en Determine the convex hull of the curve segment. \~
@@ -422,17 +421,17 @@ public :
\param[out] poly - \ru Массив точек, составляющих выпуклую оболочку сегмента.
\en Array of points which constitute the convex hull of the segment. \~
*/
void ConvexHull( ptrdiff_t seg, SArray<MbCartPoint> & poly ) const;
// \ru Определение особых точек офсетной кривой \en Determination of singular points of the offset curve
void ConvexHull( ptrdiff_t seg, SArray<MbCartPoint> & poly ) const;
/// \ru Определение особых точек офсетной кривой \en Determination of singular points of the offset curve
void OffsetCuspPoint( SArray<double> & tCusps, double dist ) const override;
/// \ru Вернуть массив отдельных сегментов Bezier-кривой. \en Return an array of separate segments of the Bezier-curve.
void GetSegments( RPArray<MbBezier> & segments ) const;
/// \ru Удалить совпадающие точки. \en Delete coincident points.
void ExeptEqualPoints();
/// \ru Вернуть массив отдельных сегментов Bezier-кривой. \en Return an array of separate segments of the Bezier-curve.
void GetSegments( RPArray<MbBezier> & segments ) const;
/// \ru Удалить совпадающие точки. \en Delete coincident points.
void ExeptEqualPoints();
bool IsDegenerate( double eps = Math::LengthEps ) const override; // \ru Проверка вырожденности кривой \en Check for curve degeneracy
/// \ru Сделать контур из NURBS-кривой. \en Create a contour from the NURBS curve.
MbContour * CreateContour() const;
/// \ru Сделать контур из NURBS-кривой. \en Create a contour from the NURBS curve.
MbContour * CreateContour() const;
// \ru Функции только Bezier кривой \en Functions for Bezier curve
@@ -449,11 +448,11 @@ public :
\result \ru true - если построение прошло успешно.
\en True - if construction has been successfully. \~
*/
bool Break( MbBezier & trimPart, double t1, double t2 ) 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.
ptrdiff_t GetSplinesCount() const { return splinesCount; } ///< \ru Количество сплайнов \en The number of splines
bool Break( MbBezier & trimPart, double t1, double t2 ) 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.
ptrdiff_t GetSplinesCount() const { return splinesCount; } ///< \ru Количество сплайнов \en The number of splines
/** \brief \ru Выделить часть кривой Безье.
\en Break a part of the Bezier curve. \~
@@ -468,7 +467,7 @@ public :
\param[in] sense - \ru Совпадает ли направление полученной кривой с направлением исходной кривой.
\en Whether the direction of the resulting curve coincides with the direction of the original curve. \~
*/
void Trimm( MbBezier & trimm, double t1, double t2, int sense ) const;
void Trimm( MbBezier & trimm, double t1, double t2, int sense ) const;
bool DistanceToPointIfLess( const MbCartPoint & to, double &d ) const override; // \ru Расстояние до точки, если оно меньше d \en Distance to the point if it is less than d
@@ -489,13 +488,13 @@ public :
\result \ru true - если операция прошла успешно.
\en True - if operation has been successfully. \~
*/
bool BasicFunctions( double & t, CcArray<double> & values, ptrdiff_t & left ) const;
bool BasicFunctions( double & t, CcArray<double> & values, ptrdiff_t & left ) const;
// \ru Посчитать метрическую длину \en Calculate the metric length
double CalculateMetricLength() const override;
// \ru Сдвинуть параметр t на расстояние len. \en Move parameter t on the metric distance len.
virtual bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = nullptr, double epsilon = EPSILON ) const override; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous?
// \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length.
@@ -506,18 +505,19 @@ public :
protected:
bool CanChangeClosed() const override; // \ru Можно ли поменять признак замкнутости \en Whether it is possible to change the attribute of closedness
private :
void CheckData( double & t ) const;
void EvaluateSlope ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index \en Calculate derivatives at the pole "index"
void EvaluateSlope0 ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 0-ой формы \en Calculate derivatives at the pole "index" for 0-th form
void EvaluateSlope1 ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 1-ой формы \en Calculate derivatives at the pole "index" for 1-th form
void SetDerives(); // \ru Рассчитать все производные \en Calculate all derivatives
void SetDerives ( ptrdiff_t index ); // \ru Рассчитать производные в полюсах при изменении полюса index. \en Calculate derivatives at poles when changing the pole "index".
void CheckData( double & t ) const;
void EvaluateSlope ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index \en Calculate derivatives at the pole "index"
void EvaluateSlope0 ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 0-ой формы \en Calculate derivatives at the pole "index" for 0-th form
void EvaluateSlope1 ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 1-ой формы \en Calculate derivatives at the pole "index" for 1-th form
void SetDerives(); // \ru Рассчитать все производные \en Calculate all derivatives
void SetDerives ( ptrdiff_t index ); // \ru Рассчитать производные в полюсах при изменении полюса index. \en Calculate derivatives at poles when changing the pole "index".
void operator = ( const MbBezier & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbBezier & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBezier )
};
IMPL_PERSISTENT_OPS( MbBezier )
#endif // __CUR_BEZIER_H
+61 -60
View File
@@ -104,40 +104,40 @@ public :
public :
VISITING_CLASS( MbBezier3D );
void Init( const SArray<MbCartPoint3D> & initList, bool cls );
void Init( const MbBezier3D & );
void Init( const MbBezier &, const MbPlacement3D & );
void Init( MbArc3D & );
void Init( const SArray<MbCartPoint3D> & initList, bool cls );
void Init( const MbBezier3D & );
void Init( const MbBezier &, const MbPlacement3D & );
void Init( MbArc3D & );
// \ru Общие функции математического объекта \en The common functions of the mathematical object
MbeSpaceType IsA() const override; // \ru Тип элемента \en A type of element
MbSpaceItem & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию элемента \en Create a copy of the element
bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const override;
bool SetEqual ( const MbSpaceItem & ) 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 Rotation
bool IsSame ( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const override;
bool SetEqual ( const MbSpaceItem & ) 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 Rotation
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
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 Common functions of curve
double GetTMax() const override; // \ru Вернуть максимальное значение параметра \en Get the maximum value of parameter
double GetTMin() const override; // \ru Вернуть минимальное значение параметра \en Get the minimum value of parameter
double GetTMax() const override; // \ru Вернуть максимальное значение параметра \en Get the maximum value of parameter
double GetTMin() const override; // \ru Вернуть минимальное значение параметра \en Get the minimum value of parameter
// \ru Функции для работы внутри области определения кривой. \en Functions for working inside of the curve domain. \~
void PointOn ( double & t, MbCartPoint3D & ) const override; // \ru Точка на кривой \en The point on the curve
void FirstDer ( double & t, MbVector3D & ) const override; // \ru Первая производная \en First derivative
void SecondDer( double & t, MbVector3D & ) const override; // \ru Вторая производная \en Second derivative
void ThirdDer ( double & t, MbVector3D & ) const override; // \ru Третья производная \en Third derivative
void PointOn ( double & t, MbCartPoint3D & ) const override; // \ru Точка на кривой \en The point on the curve
void FirstDer ( double & t, MbVector3D & ) const override; // \ru Первая производная \en First derivative
void SecondDer( double & t, MbVector3D & ) const override; // \ru Вторая производная \en Second derivative
void ThirdDer ( double & t, MbVector3D & ) const override; // \ru Третья производная \en Third derivative
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculate step of approximation
double DeviationStep( double t, double angle ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculate step of approximation
double DeviationStep( double t, double angle ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
virtual bool Break( MbBezier3D &, double t1, double t2 ) const; // \ru Разбить на две части \en Split into two parts
@@ -147,68 +147,69 @@ public :
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
// \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;
bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const override;
void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const override;
// \ru Общие функции полигональной кривой \en Common functions of a polygonal curve
void Rebuild() override; // \ru Пересчитать Безье кривую \en Recalculate Bezier curve
void SetClosed ( bool cls ) override; // \ru Установить признак замкнутости \en Set the closedness attribute.
void AddPoint ( const MbCartPoint3D & ) override; // \ru Добавить точку в конец массива \en Add a point to the end of array
void InsertPoint( ptrdiff_t index, const MbCartPoint3D & ) override; // \ru Добавить точку \en Add a point
void InsertPoint( double t, const MbCartPoint3D &, double ) override; // \ru Добавить точку \en Add a point
void RemovePoint( ptrdiff_t index ) override; // \ru Удалить точку \en Remove a point
bool ChangePoint( ptrdiff_t index, const MbCartPoint3D & ) override; // \ru Заменить точку \en Replace a point
void ChangePole ( ptrdiff_t index, const MbCartPoint3D & override); // \ru Заменить полюс \en Replace a pole
bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const override; // \ru Загнать параметр получить локальный индексы и параметры \en Move parameter, get local indices and parameters
double GetParam( ptrdiff_t i ) const override; // \ru Выдать параметр для точки с номером \en Get a parameter for point with number
size_t GetPointsCount() const override; // \ru Выдать количество точек \en Get the number of points
void GetPoint ( ptrdiff_t index, MbCartPoint3D & ) const override; // \ru Выдать точку \en Get a point
ptrdiff_t GetNearPointIndex ( const MbCartPoint3D & ) const override; // \ru Выдать индекс точки, ближайшей к заданной \en Get the point index which is nearest to the given
void GetRuleInterval ( ptrdiff_t index, double & t1, double & t2 ) const override; // \ru Выдать интервал влияния точки \en Get the interval of point influence
void Rebuild() override; // \ru Пересчитать Безье кривую \en Recalculate Bezier curve
void SetClosed ( bool cls ) override; // \ru Установить признак замкнутости \en Set the closedness attribute.
void AddPoint ( const MbCartPoint3D & ) override; // \ru Добавить точку в конец массива \en Add a point to the end of array
void InsertPoint( ptrdiff_t index, const MbCartPoint3D & ) override; // \ru Добавить точку \en Add a point
void InsertPoint( double t, const MbCartPoint3D &, double ) override; // \ru Добавить точку \en Add a point
void RemovePoint( ptrdiff_t index ) override; // \ru Удалить точку \en Remove a point
bool ChangePoint( ptrdiff_t index, const MbCartPoint3D & ) override; // \ru Заменить точку \en Replace a point
void ChangePole ( ptrdiff_t index, const MbCartPoint3D & override); // \ru Заменить полюс \en Replace a pole
bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const override; // \ru Загнать параметр получить локальный индексы и параметры \en Move parameter, get local indices and parameters
double GetParam( ptrdiff_t i ) const override; // \ru Выдать параметр для точки с номером \en Get a parameter for point with number
size_t GetPointsCount() const override; // \ru Выдать количество точек \en Get the number of points
void GetPoint ( ptrdiff_t index, MbCartPoint3D & ) const override; // \ru Выдать точку \en Get a point
ptrdiff_t GetNearPointIndex ( const MbCartPoint3D & ) const override; // \ru Выдать индекс точки, ближайшей к заданной \en Get the point index which is nearest to the given
void GetRuleInterval ( ptrdiff_t index, double & t1, double & t2 ) const override; // \ru Выдать интервал влияния точки \en Get the interval of point influence
MbNurbs3D * Trimm( double t1, double t2, int sense ) const;
void Trimm( MbBezier3D &, double t1, double t2, int sense ) const;
MbNurbs3D * Trimm( double t1, double t2, int sense ) const;
void Trimm( MbBezier3D &, double t1, double t2, int sense ) const;
void InitCtrlPoints( const SArray<MbCartPoint3D> & );
void SetBezierSplines(); // \ru Вычислить параметры кривой-Bezier \en Calculate parameters of the Bezier curve
int GetFormType() const { return form; } // \ru Форма сплайна \en The spline form
void SetFormType( int newForm );
ptrdiff_t GetSplinesCount() const { return splinesCount; } // \ru Количество сплайнов \en The number of splines
void InitCtrlPoints( const SArray<MbCartPoint3D> & );
void SetBezierSplines(); // \ru Вычислить параметры кривой-Bezier \en Calculate parameters of the Bezier curve
int GetFormType() const { return form; } // \ru Форма сплайна \en The spline form
void SetFormType( int newForm );
ptrdiff_t GetSplinesCount() const { return splinesCount; } // \ru Количество сплайнов \en The number of splines
// \ru Функции только 3D кривой \en Function for 3D-curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
size_t GetCount() const override;
size_t GetCount() const override;
// \ru Посчитать метрическую длину \en Calculate the metric length
double CalculateMetricLength() const override;
double CalculateMetricLength() const override;
// \ru Сдвинуть параметр t на расстояние len. \en Move parameter t on the metric distance len.
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const override;
bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = nullptr, double epsilon = EPSILON ) const override; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous?
bool IsContinuousDerivative( bool & contLength, bool & contDirect, c3d::DoubleVector * params = nullptr, double epsilon = EPSILON ) const override; // \ru Непрерывна ли первая производная? \en Have the first derivative the continuous?
// \ru Устранить разрывы первых производных по длине. \en Eliminate the discontinuities of the first derivative at length.
bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ) override;
bool SetContinuousDerivativeLength( VERSION version, double epsilon = EPSILON ) override;
private :
void CheckBezierClosed(); // \ru Проверка признака замкнутости. \en Check closed.
void EvaluateSlope ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index \en Calculate derivatives at the pole "index"
void EvaluateSlope0( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 0-ой формы \en Calculate derivatives at the pole "index" for 0-th form
void EvaluateSlope1( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 1-ой формы \en Calculate derivatives at the pole "index" for 1-th form
void SetDerives (); // \ru Рассчитать все производные \en Calculate all derivatives
void SetDerives ( ptrdiff_t index ); // \ru Рассчитать производные в полюсах при изменении полюса index \en Calculate derivatives at poles when changing the pole "index"
void CheckBezierClosed(); // \ru Проверка признака замкнутости. \en Check closed.
void EvaluateSlope ( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index \en Calculate derivatives at the pole "index"
void EvaluateSlope0( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 0-ой формы \en Calculate derivatives at the pole "index" for 0-th form
void EvaluateSlope1( ptrdiff_t index ); // \ru Рассчитать производные в полюсе index для 1-ой формы \en Calculate derivatives at the pole "index" for 1-th form
void SetDerives (); // \ru Рассчитать все производные \en Calculate all derivatives
void SetDerives ( ptrdiff_t index ); // \ru Рассчитать производные в полюсах при изменении полюса index \en Calculate derivatives at poles when changing the pole "index"
private:
void operator = ( const MbBezier3D & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbBezier3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBezier3D )
};
IMPL_PERSISTENT_OPS( MbBezier3D )
#endif // __CUR_BEZIER3D_H
+5 -5
View File
@@ -60,7 +60,7 @@ public:
public:
VISITING_CLASS( MbBridgeCurve3D );
void Init( MbCurve3D & c1, double t1, bool s1,
void Init( MbCurve3D & c1, double t1, bool s1,
MbCurve3D & c2, double t2, bool s2,
double _tmin, double _tmax );
@@ -95,7 +95,7 @@ public:
void ThirdDer ( double & t, MbVector3D & ) const override; // \ru Третья производная по t \en The third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void Inverse ( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step ( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculation of the approximation step
@@ -109,9 +109,9 @@ public:
private:
inline void CheckParam ( double & t ) const; // \ru Проверка параметра \en Check parameter
inline void LocalParams ( const double & t, double & quota1, double & quota2 ) const; // \ru Вычисление локальных данных по параметру \en Calculation of local data by the parameter
void LocalData (); // \ru Определение значений точек и производных на концах \en Determination of values of points and derivatives at the ends
void ChangeCurves( MbCurve3D & c1, MbCurve3D & c2 );
void operator = ( const MbBridgeCurve3D & ); // \ru Не реализовано. \en Not implemented.
void LocalData (); // \ru Определение значений точек и производных на концах \en Determination of values of points and derivatives at the ends
void ChangeCurves( MbCurve3D & c1, MbCurve3D & c2 );
void operator = ( const MbBridgeCurve3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbBridgeCurve3D )
};
+17 -15
View File
@@ -92,7 +92,7 @@ public:
void ThirdDer( double & t, MbVector & ) const override; // \ru Третья производная по t \en The third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
double Step ( double t, double sag ) const override; // \ru Вычисление шага параметра по величине прогиба кривой \en Calculation of parameter step by value of sag of the curve
double DeviationStep ( double t, double ang ) const override; // \ru Вычисление шага параметра по углу отклонения касательной \en Calculation of parameter by the angle of tangent deviation
@@ -117,36 +117,38 @@ public:
void GetProperties ( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties ( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
void CheckParam ( double & t ) const;
void CalculateParam( double t, MbCartPoint & point,
MbVector & firstDer, MbVector & secondDer, MbVector & thirdDer ) const;
void CheckParam ( double & t ) const;
void CalculateParam( double t, MbCartPoint & point,
MbVector & firstDer, MbVector & secondDer, MbVector & thirdDer ) const;
const MbFunction * GetX() const { return xFunction; }
const MbFunction * GetY() const { return yFunction; }
const MbMatrix & GetMatrix() const { return transform; }
const MbPlacement & GetPlacement() const { return position; }
MbeLocalSystemType GetCoordinateType() const { return coordinateType; }
void GetSpecialParams( std::vector<double> & params ) const;
void GetSpecialParams( std::vector<double> & params ) const;
protected:
double ApproximationStep( double t, bool isAngle, double sag ) const;
void ConvertParamsInd( size_t componentIndex,
const std::vector<double> & tComponent,
std::vector<double> & tCrv ) const;
void ConvertParams( const double tCrv,
double (&tComponents) [2],
double (&proportionFactors)[2]) const;
double ApproximationStep( double t, bool isAngle, double sag ) const;
void ConvertParamsInd( size_t componentIndex,
const std::vector<double> & tComponent,
std::vector<double> & tCrv ) const;
void ConvertParams( const double tCrv,
double (&tComponents) [2],
double (&proportionFactors)[2]) const;
private:
// \ru Проверить и установить признак замкнутости. \en Check and set the flag of closedness.
void CheckClosed();
// \ru Проверить и установить признак замкнутости. \en Check and set the flag of closedness.
void CheckClosed();
private:
void operator = ( const MbCharacterCurve & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbCharacterCurve & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCharacterCurve )
};
IMPL_PERSISTENT_OPS( MbCharacterCurve )
#endif // __CUR_CHARACTER_CURVE_H
+17 -16
View File
@@ -105,7 +105,7 @@ public:
void ThirdDer ( double & t, MbVector3D & ) const override; // \ru Третья производная по t \en The third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore ( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
double Step ( double t, double sag ) const override; ///< \ru Вычисление шага параметра по величине прогиба кривой \en Calculation of parameter step by value of sag of the curve
double DeviationStep( double t, double ang ) const override; ///< \ru Вычисление шага параметра по углу отклонения касательной \en Calculation of parameter by the angle of tangent deviation
@@ -119,14 +119,14 @@ public:
// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую) \en Get a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called on a three-dimensional curve)
bool GetPlaneCurve ( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
MbCurve * GetMap( const MbMatrix3D & into, MbRect1D * pRegion = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
// \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations.
size_t GetCount() const override;
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
void CheckParam ( double & t ) const;
void CalculateParam( double t, MbCartPoint3D & point,
MbVector3D & firstDer, MbVector3D & secondDer, MbVector3D & thirdDer ) const;
void CheckParam ( double & t ) const;
void CalculateParam( double t, MbCartPoint3D & point,
MbVector3D & firstDer, MbVector3D & secondDer, MbVector3D & thirdDer ) const;
const MbFunction * GetX() const { return xFunction; }
const MbFunction * GetY() const { return yFunction; }
@@ -136,25 +136,26 @@ public:
MbeLocalSystemType3D GetCoordinateType() const { return coordinateType; }
protected:
// void GetSpecialParams( std::vector<double> & params ) const;
double ApproximationStep( double t, bool isAngle, double constraint ) const;
void ConvertParamsInd( size_t componentIndex,
const std::vector<double> & tComponent,
std::vector<double> & tCrv ) const;
void ConvertParams( const double tCrv,
double (&tComponents)[3],
double (&proportionFactors)[3]) const;
// void GetSpecialParams( std::vector<double> & params ) const;
double ApproximationStep( double t, bool isAngle, double constraint ) const;
void ConvertParamsInd( size_t componentIndex,
const std::vector<double> & tComponent,
std::vector<double> & tCrv ) const;
void ConvertParams( const double tCrv,
double (&tComponents)[3],
double (&proportionFactors)[3]) const;
private:
// \ru Проверить и установить признак замкнутости. \en Check and set the flag of closedness.
void CheckClosed();
// \ru Проверить и установить признак замкнутости. \en Check and set the flag of closedness.
void CheckClosed();
private:
void operator = ( const MbCharacterCurve3D & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbCharacterCurve3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCharacterCurve3D )
};
IMPL_PERSISTENT_OPS( MbCharacterCurve3D )
#endif // __CUR_CHARCTER_CURVE3D_H
+31 -30
View File
@@ -185,14 +185,14 @@ public:
public:
VISITING_CLASS( MbConeSpiral );
/// \ru Инициализация конической спирали по конической спирали. \en Initialization of conical spiral by conical spiral.
void Init( const MbConeSpiral & );
/// \ru Инициализация цилиндрической спирали по основанию. \en Initialization of cylindrical spiral by base.
bool Init( const MbPlacement3D &, bool resetToCylindrical );
/// \ru Инициализация конической спирали по радиусам оснований, высоте и шагу. \en Initialization of conical spiral by bottom radii, height and step.
bool Init( double radius1, double radius2, double height, double st );
/// \ru Инициализация конической спирали по основанию, радиусам оснований, и высоте с шагом. \en Initialization of conical spiral by the base, radii of bases and height with step.
bool Init( const MbPlacement3D & place, double radius1, double radius2, double height, double st );
/// \ru Инициализация конической спирали по конической спирали. \en Initialization of conical spiral by conical spiral.
void Init( const MbConeSpiral & );
/// \ru Инициализация цилиндрической спирали по основанию. \en Initialization of cylindrical spiral by base.
bool Init( const MbPlacement3D &, bool resetToCylindrical );
/// \ru Инициализация конической спирали по радиусам оснований, высоте и шагу. \en Initialization of conical spiral by bottom radii, height and step.
bool Init( double radius1, double radius2, double height, double st );
/// \ru Инициализация конической спирали по основанию, радиусам оснований, и высоте с шагом. \en Initialization of conical spiral by the base, radii of bases and height with step.
bool Init( const MbPlacement3D & place, double radius1, double radius2, double height, double st );
public:
// \ru Общие функции математического объекта. \en The common functions of the mathematical object.
@@ -217,14 +217,14 @@ public:
void _ThirdDer ( double t, MbVector3D & td ) const override; // \ru Третья производная по t. \en The third derivative with respect to t.
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
double Step ( double t, double sag ) const override; // \ru Вычисление шага по стрелке прогиба. \en Calculation of parameter step by the sag.
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага по углу отклонения нормали. \en Calculation of parameter step by the deviation angle.
double MetricStep ( double t, double length ) const override; // \ru Вычисление шага параметра по длине. \en Calculation of parameter step by the given length.
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой. \en Creation of a trimmed curve.
@@ -244,34 +244,35 @@ public:
// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы) \en Get a surface curve if spatial curve is lying on the surface (after the using call DeleteItem for arguments)
bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const override;
double GetAlpha() const { return ::atan( tgAlpha ); }
double GetTgAlpha() const { return tgAlpha; }
void SetAlpha( double a ) { tgAlpha = ::tan( a ); Refresh(); }
double GetAlpha() const { return ::atan( tgAlpha ); }
double GetTgAlpha() const { return tgAlpha; }
void SetAlpha( double a ) { tgAlpha = ::tan( a ); Refresh(); }
double GetR() const { return radius; }
void FastInverse();
double GetStepD2PI() const { return stepd2pi; }
void GetSpiralDir( MbVector3D & dir ) const;
double GetR() const { return radius; }
void FastInverse();
double GetStepD2PI() const { return stepd2pi; }
void GetSpiralDir( MbVector3D & dir ) const;
/// \ru Узнать тип конической спирали \en Learn the type of conical spiral.
ConeSpiralType GetType() const { return type; }
/// \ru Узнать тип конической спирали \en Learn the type of conical spiral.
ConeSpiralType GetType() const { return type; }
private:
/// \ru Усеченное значение tmax для случая закручивающихся в точку плоской или конической спиралей. \en Trimmed value tmax for the case of planar or conical spirals trailing to the point.
void CalConeTMax();
/// \ru Текущий радиус. \en The current radius.
double GetR( double t ) const;
/// \ru Производная текущего радиуса. \en The derivative of the current radius.
double GetRDerive( double t ) const;
/// \ru Ближайшая проекция точки на плоскую спираль. \en The nearest point projection on the planar spiral.
bool PlaneProjection( const MbCartPoint3D & pSpace, double & tProj, bool ext, MbRect1D * tRange ) const;
/// \ru Ближайшая проекция точки на цилиндрическую спираль. \en The nearest point projection on the cylindrical spiral.
bool CylindricalProjection( const MbCartPoint3D & pSpace, double & tProj, bool ext, MbRect1D * tRange ) const;
/// \ru Усеченное значение tmax для случая закручивающихся в точку плоской или конической спиралей. \en Trimmed value tmax for the case of planar or conical spirals trailing to the point.
void CalConeTMax();
/// \ru Текущий радиус. \en The current radius.
double GetR( double t ) const;
/// \ru Производная текущего радиуса. \en The derivative of the current radius.
double GetRDerive( double t ) const;
/// \ru Ближайшая проекция точки на плоскую спираль. \en The nearest point projection on the planar spiral.
bool PlaneProjection( const MbCartPoint3D & pSpace, double & tProj, bool ext, MbRect1D * tRange ) const;
/// \ru Ближайшая проекция точки на цилиндрическую спираль. \en The nearest point projection on the cylindrical spiral.
bool CylindricalProjection( const MbCartPoint3D & pSpace, double & tProj, bool ext, MbRect1D * tRange ) const;
private:
// \ru Объявление (перегрузка) оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en Declaration (overload) of the assignment operator without its implementation, to prevent the default assignment.
MbConeSpiral & operator = ( const MbConeSpiral & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbConeSpiral )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbConeSpiral )
};
IMPL_PERSISTENT_OPS( MbConeSpiral )
+323 -315
View File
@@ -137,15 +137,15 @@ 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() ) CalculateGabarit( rect ); return rect; }
const MbRect & GetCube() const { if ( rect.IsEmpty() ) CalculateGabarit( rect ); return rect; }
/// \ru Сбросить рассчитанный габарит контура. \en Reset the calculated contour bounding box.
void SetDirtyGabarit() const { 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?
bool IsGabaritEmpty() const { return rect.IsEmpty(); }
/// \ru Сбросить рассчитанный габарит контура. \en Reset the calculated contour bounding box.
void SetDirtyGabarit() const { 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?
bool IsGabaritEmpty() const { return rect.IsEmpty(); }
double DistanceToPoint( const MbCartPoint & ) const override; // \ru Расстояние до точки \en Distance to a point.
@@ -205,7 +205,7 @@ public:
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
/** \} */
/** \ru \name Функции движения по кривой
@@ -223,103 +223,106 @@ public:
double GetLengthEvaluation() const override; // \ru Оценка метрической длины кривой \en Evaluation of the metric length of the curve.
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину \en Calculate the metric length
double GetParamLength() const { return paramLength; }
double CalculateParamLength(); // \ru Посчитать параметрическую длину \en Calculate the parametric length
double GetParamLength() const { return paramLength; }
double CalculateParamLength(); // \ru Посчитать параметрическую длину \en Calculate the parametric length
/// \ru Вычисление площади контура, если контур замкнут. \en Calculation of contour area if contour is closed.
double GetArea( double sag = Math::deviateSag ) const
{
sag = ::fabs(sag);
if ( ::fabs( areaSign.first - sag ) > EXTENT_EPSILON )
return CalculateArea( sag );
return areaSign.second;
}
/// \ru Вычисление площади контура, если контур замкнут. \en Calculation of contour area if contour is closed.
double GetArea( double sag = Math::deviateSag ) const
{
sag = ::fabs(sag);
if ( ::fabs( areaSign.first - sag ) > EXTENT_EPSILON )
return CalculateArea( sag );
return areaSign.second;
}
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
MbContour * NurbsContour() const override;
void SetClosed(); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void CheckClosed( double closedEps ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void InitClosed( bool c ) { closed = c; } ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void SetClosed(); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void CheckClosed( double closedEps ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void InitClosed( bool c ) { closed = c; } ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
/** \brief \ru Проверить замкнутость и непрерывность точек контура.
\en Check for closedness and continuity of contour points. \~
\details \ru Проверить замкнутость и непрерывность точек контура.
Проверяется совпадение первой и последней точки контура,
совпадение последней точки каждого сегмента с первой точкой следующего сегмента.
Равенство точек проверяется по умолчанию грубо - с точностью, равной 5 * PARAM_NEAR.
\en Check for closedness and continuity of contour points.
Checking for coincidence of first and last points of the contour,
coincidence of the last point of each segment with the first point of the next segment.
Equality of points is checked roughly by default - with tolerance is equal to 5* PARAM_NEAR. \~
\return \ru true, если контур замкнутый и непрерывный.
\en true, if contour is closed and continuous. \~
*/
bool IsClosedContinuousC0( double eps = 5.0 * PARAM_NEAR ) const;
/** \brief \ru Проверить замкнутость и непрерывность точек контура.
\en Check for closedness and continuity of contour points. \~
\details \ru Проверить замкнутость и непрерывность точек контура.
Проверяется совпадение первой и последней точки контура,
совпадение последней точки каждого сегмента с первой точкой следующего сегмента.
Равенство точек проверяется по умолчанию грубо - с точностью, равной 5 * PARAM_NEAR.
\en Check for closedness and continuity of contour points.
Checking for coincidence of first and last points of the contour,
coincidence of the last point of each segment with the first point of the next segment.
Equality of points is checked roughly by default - with tolerance is equal to 5* PARAM_NEAR. \~
\return \ru true, если контур замкнутый и непрерывный.
\en true, if contour is closed and continuous. \~
*/
bool IsClosedContinuousC0( double eps = 5.0 * PARAM_NEAR ) const;
void CloseByLineSeg( bool calcInternalData ); ///< \ru Замкнуть контур отрезком. \en Close the contour by segment.
void CloseByLineSeg( bool calcInternalData ); ///< \ru Замкнуть контур отрезком. \en Close the contour by segment.
// \ru Посчитать метрическую длину разомкнутой кривой с заданной точностью \en Calculate the metric length of unclosed curve within the given tolerance
double CalculateLength( double t1, double t2 ) const override;
// \ru Сдвинуть параметр t на расстояние len \en Move parameter t on the distance len
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
/// \ru Cбросить переменные кэширования. \en Reset variables caching.
void Clear( bool calculateParamLength = true )
{
if ( calculateParamLength )
CalculateParamLength(); // \ru Параметрическая длина контура \en Parametric length of a contour
metricLength = -1; // \ru Метрическая длина кривой \en Metric length of a curve
rect.SetEmpty();
areaSign.first = -1.0;
}
/** \brief \ru Найти сегмент контура.
\en Find a contour segment. \~
\details \ru Найти сегмент контура по параметру контура. \n
\en Find a contour segment by parameter on contour. \n \~
\param[in,out] t - \ru Параметр контура.
\en Contour parameter. \~
\param[out] tSeg - \ru Параметр сегмента контура.
\en Contour segment parameter. \~
\return \ru Возвращает номер сегмента в случае успешного выполнения или -1.
\en Returns the segment number in case of successful execution or -1. \~
*/
ptrdiff_t FindSegment( double & t, double & tSeg ) const;
VERSION version = Math::DefaultMathVersion() ) const override;
/// \ru Cбросить переменные кэширования. \en Reset variables caching.
void Clear( bool calculateParamLength = true )
{
if ( calculateParamLength )
CalculateParamLength(); // \ru Параметрическая длина контура \en Parametric length of a contour
metricLength = -1; // \ru Метрическая длина кривой \en Metric length of a curve
rect.SetEmpty();
areaSign.first = -1.0;
}
/** \brief \ru Найти сегмент контура.
\en Find a contour segment. \~
\details \ru Найти сегмент контура по параметру контура. \n
\en Find a contour segment by parameter on contour. \n \~
\param[in,out] t - \ru Параметр контура.
\en Contour parameter. \~
\param[out] tSeg - \ru Параметр сегмента контура.
\en Contour segment parameter. \~
\return \ru Возвращает номер сегмента в случае успешного выполнения или -1.
\en Returns the segment number in case of successful execution or -1. \~
*/
ptrdiff_t FindSegment( double & t, double & tSeg ) const;
size_t GetSegmentsCount() const { return segments.size(); } ///< \ru Выдать количество сегментов контура. \en Get the number of contour segments.
size_t GetSegmentsCount() const { return segments.size(); } ///< \ru Выдать количество сегментов контура. \en Get the number of contour segments.
const MbCurve * GetSegment( size_t ind ) const { return segments[ind]; } ///< \ru Выдать сегмент контура по индексу. \en Get contour segment by the index.
MbCurve * SetSegment( size_t ind ) { return segments[ind]; } ///< \ru Выдать сегмент контура по индексу. \en Get contour segment by the index.
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
// \ru iloc_InItem = 1 - точка находится слева от контура, \en Iloc_InItem = 1 - point is located to the left of the contour,
// \ru iloc_OnItem = 0 - точка находится на контуре, \en Iloc_OnItem = 0 - point is located on the contour,
// \ru iloc_OutOfItem = -1 - точка находится справа от контура. \en Iloc_OutOfItem = -1 - point is located to the right of the contour.
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
// \ru iloc_InItem = 1 - точка находится слева от контура, \en Iloc_InItem = 1 - point is located to the left of the contour,
// \ru iloc_OnItem = 0 - точка находится на контуре, \en Iloc_OnItem = 0 - point is located on the contour,
// \ru iloc_OutOfItem = -1 - точка находится справа от контура. \en Iloc_OutOfItem = -1 - point is located to the right of the contour.
MbeItemLocation PointRelative( const MbCartPoint & pnt, double eps = Math::LengthEps ) const override;
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
MbeLocation PointLocation( const MbCartPoint & pnt, double eps = Math::LengthEps ) const override;
double PointProjection( const MbCartPoint & ) const override; // \ru Проекция точки на кривую \en Point projection on the curve
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; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
/** \brief \ru Параметрическое расстояние до ближайшей границы.
\en Parametric distance to the nearest boundary.
\details \ru Параметрическое расстояние до ближайшей границы. \n
\en Parametric distance to the nearest boundary. \n \~
\param[in] pnt - \ru Тестируемая точка.
\en A testing point. \~
\param[in] eps - \ru Точность.
\en Accuracy. \~
\return \ru Расстояние до ближайшей границы.
\en Distance to the nearest boundary. \~
*/
double DistanceToBorder( const MbCartPoint & pnt, double eps = Math::paramRegion ) const;
/** \brief \ru Параметрическое расстояние до ближайшей границы.
\en Parametric distance to the nearest boundary.
\details \ru Параметрическое расстояние до ближайшей границы. \n
\en Parametric distance to the nearest boundary. \n \~
\param[in] pnt - \ru Тестируемая точка.
\en A testing point. \~
\param[in] eps - \ru Точность.
\en Accuracy. \~
\return \ru Расстояние до ближайшей границы.
\en Distance to the nearest boundary. \~
*/
double DistanceToBorder( const MbCartPoint & pnt, double eps = Math::paramRegion ) const;
void Trimm( double t1, double t2 ); ///< \ru Выделить часть контура. \en Trim a part of the contour.
void Trimm( double t1, double t2 ); ///< \ru Выделить часть контура. \en Trim a part of the contour.
// \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
// \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point
void PerpendicularPoint( const MbCartPoint &, SArray<double> & tFind ) const override;
// \ru Вычисление всех касательных к кривой из данной точки \en Calculation of all tangents to the curve from a given point
// \ru Вычисление всех касательных к кривой из данной точки \en Calculation of all tangents to the curve from a given point
void TangentPoint( const MbCartPoint &, SArray<double> & tFind ) const override;
@@ -327,126 +330,126 @@ public:
void IntersectVertical ( double x, SArray<double> & ) const override; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line
void SelfIntersect( SArray<MbCrossPoint> &, double metricEps = Math::LengthEps ) const override; // \ru Самопересечение контура \en Self-intersection of the contour
/** \brief \ru Есть ли самопересечения контура?
\en Is it a contour with self-intersections? \~
\details \ru Есть ли самопересечения контура?
\en Is it a contour with self-intersections? \~
\param[in] metricEps - \ru Точность (по умолчанию рекомендуется использовать Math::LengthEps).
\en Accuracy (it's recommended to use Math::LengthEps). \~
\param[in] considerPartialCoincidence - \ru Считать частичное совпадение соседних сегментов самопересечением (true - по умолчанию).
\en Consider partial coincidence of neighboring segments as self-intersection (true - by default). \~
*/
bool IsSelfIntersect( double metricEps, bool considerPartialCoincidence ) const;
/** \brief \ru Есть ли самопересечения контура?
\en Is it a contour with self-intersections? \~
\details \ru Есть ли самопересечения контура?
\en Is it a contour with self-intersections? \~
\param[in] metricEps - \ru Точность (по умолчанию рекомендуется использовать Math::LengthEps).
\en Accuracy (it's recommended to use Math::LengthEps). \~
\param[in] considerPartialCoincidence - \ru Считать частичное совпадение соседних сегментов самопересечением (true - по умолчанию).
\en Consider partial coincidence of neighboring segments as self-intersection (true - by default). \~
*/
bool IsSelfIntersect( double metricEps, bool considerPartialCoincidence ) const;
// \ru Функции находятся в файле equcntr.cpp \en Functions are in the file equcntr.cpp
// \ru Функции находятся в файле equcntr.cpp \en Functions are in the file equcntr.cpp
/// \ru Скругление двух соседних элементов с информацией об удалении \en Fillet of two neighboring elements with information about removal
bool FilletTwoSegments( ptrdiff_t & index, double rad, bool & del1, bool & del2 );
/// \ru Скругление двух соседних элементов \en Fillet of two neighboring elements
bool FilletTwoSegments( ptrdiff_t & index, double rad );
/// \ru Вставка фаски между двумя соседними элементами с информацией об удалении \en Insertion of chamfer between two neighboring elements with information about removal
bool ChamferTwoSegments( ptrdiff_t & index, double len, double angle,
bool type, bool firstSeg, bool & del1, bool & del2 );
/// \ru Вставка фаски между двумя соседними элементами \en Insertion of chamfer between two neighboring elements
bool ChamferTwoSegments( ptrdiff_t & index, double len, double angle,
bool type, bool firstSeg = true );
bool Fillet( double rad ); ///< \ru Скругление контура \en Fillet of contour
bool Chamfer( double len, double angle, bool type ); ///< \ru Вставка фаски \en Insertion of the chamfer
MbeState RemoveFilletOrChamfer( const MbCartPoint & pnt ); ///< \ru Удалить скругление или фаску контура \en Remove fillet or contour chamfer
/// \ru Разбить контур на непересекающиеся сегменты. \en Split contour into non-overlapping segments.
bool InsertCrossPoints();
/// \ru Разбиение сегментов контура в точках пересечения. \en Splitting of contour segments at the points of intersection.
void BreakSegment( ptrdiff_t & index, ptrdiff_t firtsIdx,
SArray<MbCrossPoint> & cross, bool firstCurve = true );
/// \ru Скругление двух соседних элементов с информацией об удалении \en Fillet of two neighboring elements with information about removal
bool FilletTwoSegments( ptrdiff_t & index, double rad, bool & del1, bool & del2 );
/// \ru Скругление двух соседних элементов \en Fillet of two neighboring elements
bool FilletTwoSegments( ptrdiff_t & index, double rad );
/// \ru Вставка фаски между двумя соседними элементами с информацией об удалении \en Insertion of chamfer between two neighboring elements with information about removal
bool ChamferTwoSegments( ptrdiff_t & index, double len, double angle,
bool type, bool firstSeg, bool & del1, bool & del2 );
/// \ru Вставка фаски между двумя соседними элементами \en Insertion of chamfer between two neighboring elements
bool ChamferTwoSegments( ptrdiff_t & index, double len, double angle,
bool type, bool firstSeg = true );
bool Fillet( double rad ); ///< \ru Скругление контура \en Fillet of contour
bool Chamfer( double len, double angle, bool type ); ///< \ru Вставка фаски \en Insertion of the chamfer
MbeState RemoveFilletOrChamfer( const MbCartPoint & pnt ); ///< \ru Удалить скругление или фаску контура \en Remove fillet or contour chamfer
/// \ru Разбить контур на непересекающиеся сегменты. \en Split contour into non-overlapping segments.
bool InsertCrossPoints();
/// \ru Разбиение сегментов контура в точках пересечения. \en Splitting of contour segments at the points of intersection.
void BreakSegment( ptrdiff_t & index, ptrdiff_t firtsIdx,
SArray<MbCrossPoint> & cross, bool firstCurve = true );
bool CheckConnection( double eps = Math::LengthEps ) const; ///< \ru Проверка непрерывности контура \en Check for contour continuity.
bool CheckConnection( double xEps, double yEps ) const; ///< \ru Проверка непрерывности контура \en Check for contour continuity.
bool CheckConnection( double eps = Math::LengthEps ) const; ///< \ru Проверка непрерывности контура \en Check for contour continuity.
bool CheckConnection( double xEps, double yEps ) const; ///< \ru Проверка непрерывности контура \en Check for contour continuity.
/// \ru Скругление двух соседних элементов дугой нулевого радиуса. \en Rounding two neighboring elements by arc of zero radius.
void FilletTwoSegmentsZero( ptrdiff_t & index, int defaultSense, bool fullInsert );
/// \ru Скругление контура дугой нулевого радиуса. \en Rounding contour by arc of zero radius.
void FilletZero( int defaultSense, bool fullInsert = false );
/// \ru Вставка фаски между двумя соседними элементами для построения эквидистанты. \en Insertion of chamfer between two neighboring elements for construction of the offset.
void ChamferTwoSegmentsZero( ptrdiff_t & index, double rad );
/// \ru Вставка фаски для построения эквидистанты. \en Insertion of chamfer for construction of the offset.
void ChamferZero( double rad );
/// \ru Удаление вырожденных сегментов контура. \en Removal of degenerate contour segments.
void DeleteDegenerateSegments( double radius, MbCurve * curve, bool mode );
/// \ru Скругление двух соседних элементов дугой нулевого радиуса. \en Rounding two neighboring elements by arc of zero radius.
void FilletTwoSegmentsZero( ptrdiff_t & index, int defaultSense, bool fullInsert );
/// \ru Скругление контура дугой нулевого радиуса. \en Rounding contour by arc of zero radius.
void FilletZero( int defaultSense, bool fullInsert = false );
/// \ru Вставка фаски между двумя соседними элементами для построения эквидистанты. \en Insertion of chamfer between two neighboring elements for construction of the offset.
void ChamferTwoSegmentsZero( ptrdiff_t & index, double rad );
/// \ru Вставка фаски для построения эквидистанты. \en Insertion of chamfer for construction of the offset.
void ChamferZero( double rad );
/// \ru Удаление вырожденных сегментов контура. \en Removal of degenerate contour segments.
void DeleteDegenerateSegments( double radius, MbCurve * curve, bool mode );
/** \brief \ru Построение эквидистанты к контуру.
\en Construction of offset to contour. \~
\details \ru Построение эквидистанты к контуру справа и слева.
Имя каждого эквидистантного контура совпадает с именем исходного.
\en Construction of offset to contour of the left and right.
A name of every offset contour matches with the name of the initial one. \~
\param[in] radLeft - \ru Радиус эквидистанты слева по направлению.
\en The equidistance radius on the left by direction. \~
\param[in] radRight - \ru Радиус эквидистанты справа по направлению.
\en The equidistance radius on the right by direction. \~
\param[in] side - \ru Признак, с какой стороны строить:\n
0 - слева по направлению,\n
1 - справа по направлению,\n
2 - с двух сторон.
\en Attribute defining the side to construct:\n
0 - on the left by direction,\n
1 - on the right by direction,\n
2 - on the both sides. \~
\param[in] mode - \ru Cпособ обхода углов:\n
true - дугой,
false - срезом.
\en The way of traverse of angles:\n
true - by arc,
false - by section. \~
\param[out] equLeft - \ru Массив контуров слева.
\en The array of contours on the left side. \~
\param[out] equRight - \ru Массив контуров справа.
\en The array of contours on the right side. \~
*/
void Equid( double radLeft, double radRight, int side, bool mode,
PArray<MbCurve> & equLeft, PArray<MbCurve> & equRight );
/** \brief \ru Построение эквидистанты к контуру.
\en Construction of offset to contour. \~
\details \ru Построение эквидистанты к контуру справа и слева.
Имя каждого эквидистантного контура совпадает с именем исходного.
\en Construction of offset to contour of the left and right.
A name of every offset contour matches with the name of the initial one. \~
\param[in] radLeft - \ru Радиус эквидистанты слева по направлению.
\en The equidistance radius on the left by direction. \~
\param[in] radRight - \ru Радиус эквидистанты справа по направлению.
\en The equidistance radius on the right by direction. \~
\param[in] side - \ru Признак, с какой стороны строить:\n
0 - слева по направлению,\n
1 - справа по направлению,\n
2 - с двух сторон.
\en Attribute defining the side to construct:\n
0 - on the left by direction,\n
1 - on the right by direction,\n
2 - on the both sides. \~
\param[in] mode - \ru Cпособ обхода углов:\n
true - дугой,
false - срезом.
\en The way of traverse of angles:\n
true - by arc,
false - by section. \~
\param[out] equLeft - \ru Массив контуров слева.
\en The array of contours on the left side. \~
\param[out] equRight - \ru Массив контуров справа.
\en The array of contours on the right side. \~
*/
void Equid( double radLeft, double radRight, int side, bool mode,
PArray<MbCurve> & equLeft, PArray<MbCurve> & equRight );
/// \ru Построение новых контуров из эквидистанты. \en Construction of new contours from equidistance.
void CreateNewContours( RPArray<MbCurve> & );
/// \ru Построение новых контуров из эквидистанты. \en Construction of new contours from equidistance.
void CreateNewContours( RPArray<MbCurve> & );
/// \ru Вычисление площади контура, если контур замкнут. \en Calculation of contour area if contour is closed.
double CalculateArea( double sag = Math::deviateSag ) const;
/// \ru Определение направления обхода контура, если контур замкнут. \en Determination of traverse direction if contour is closed.
int GetSense() const;
/// \ru Установить направление обхода контура. \en Set the traverse direction of the contour.
void SetSense( int sense );
/// \ru Вычисление площади контура, если контур замкнут. \en Calculation of contour area if contour is closed.
double CalculateArea( double sag = Math::deviateSag ) const;
/// \ru Определение направления обхода контура, если контур замкнут. \en Determination of traverse direction if contour is closed.
int GetSense() const;
/// \ru Установить направление обхода контура. \en Set the traverse direction of the contour.
void SetSense( int sense );
// \ru Изменить направление обхода контура \en Change the traverse direction of the contour
void Inverse( MbRegTransform * = nullptr ) override;
// \ru Согласовать параметризацию сегментов, если до инвертации она была согласованной. \en Agree on segment parameterization, if it was consistent before inversion.
bool NormalizeReparametrization();
// \ru Согласовать параметризацию сегментов, если до инвертации она была согласованной. \en Agree on segment parameterization, if it was consistent before inversion.
bool NormalizeReparametrization();
size_t GetCount() const override; // \ru Количество разбиений для прохода в операциях \en The number of partitions for passage in the operations
// \ru Выдать характерную точку ограниченной кривой если она ближе чем dmax \en Get characteristic point of bounded curve if it is closer than dmax
// \ru Выдать характерную точку ограниченной кривой если она ближе чем dmax \en Get characteristic point of bounded curve if it is closer than dmax
bool DistanceToPointIfLess( const MbCartPoint & toP, double & d ) const override; // \ru Расстояние до точки, если оно меньше d \en Distance to the point if it is less than d
bool GetSpecificPoint( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const override;
/// \ru Выдать среднюю точку сегмента контура. \en Get a mid-point of the contour segment.
bool GetSegmentMiddlePoint( const MbCartPoint & from, MbCartPoint & midPoint ) const;
/// \ru Выдать линейный сегмент контура. \en Get the linear segment of contour.
bool GetLinearSegment( const MbCartPoint & from, double maxDist, MbCartPoint & p1, MbCartPoint & p2, double & d ) const;
/// \ru Выдать дуговой сегмент контура. \en Get the arc segment of contour.
MbArc * GetArcSegment( const MbCartPoint & from, double maxDist, double & d ) const;
/// \ru Выдать длину сегмента контура. \en Get the contour segment length.
bool GetSegmentLength( const MbCartPoint & from, double & length ) const;
/// \ru Выдать среднюю точку сегмента контура. \en Get a mid-point of the contour segment.
bool GetSegmentMiddlePoint( const MbCartPoint & from, MbCartPoint & midPoint ) const;
/// \ru Выдать линейный сегмент контура. \en Get the linear segment of contour.
bool GetLinearSegment( const MbCartPoint & from, double maxDist, MbCartPoint & p1, MbCartPoint & p2, double & d ) const;
/// \ru Выдать дуговой сегмент контура. \en Get the arc segment of contour.
MbArc * GetArcSegment( const MbCartPoint & from, double maxDist, double & d ) const;
/// \ru Выдать длину сегмента контура. \en Get the contour segment length.
bool GetSegmentLength( const MbCartPoint & from, double & length ) const;
bool GetWeightCentre( MbCartPoint & ) const override; // \ru Выдать центр тяжести контура \en Get gravity center of contour
bool GetCentre ( MbCartPoint & ) const override; // \ru Выдать центр кривой \en Get the center of curve
/// \ru Найти ближайший к точке узел контура. \en Find the nearest node of contour to point.
ptrdiff_t FindNearestNode( const MbCartPoint & to ) const;
/// \ru Найти ближайший к точке сегмент контура. \en Find the nearest segment of contour to point.
ptrdiff_t FindNearestSegment( const MbCartPoint & to ) const;
/// \ru Найти ближайший к точке узел контура. \en Find the nearest node of contour to point.
ptrdiff_t FindNearestNode( const MbCartPoint & to ) const;
/// \ru Найти ближайший к точке сегмент контура. \en Find the nearest segment of contour to point.
ptrdiff_t FindNearestSegment( const MbCartPoint & to ) const;
// \ru Определение особых точек офсетной кривой \en Determination of singular points of the offset curve
// \ru Определение особых точек офсетной кривой \en Determination of singular points of the offset curve
void OffsetCuspPoint( SArray<double> & tCusps, double dist ) const override;
double GetRadius() const override; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible.
bool GetAxisPoint( MbCartPoint & ) const override; // \ru Выдать центр оси кривой. \en Give the curve axis center.
void CombineNurbsSegments(); ///< \ru Объединить NURBS кривые в контуре. \en Unite NURBS curves into the contour.
void CombineNurbsSegments(); ///< \ru Объединить NURBS кривые в контуре. \en Unite NURBS curves into the contour.
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
@@ -487,157 +490,158 @@ public:
\en \name Function for working with segments of contour
\{ */
bool Init( List<MbCurve> & ); ///< \ru Инициализация по списку кривых. \en Initialization by list of curves.
void Init( const MbContour & ); ///< \ru Инициализация по контуру. \en Initialization by a contour.
bool Init( List<MbCurve> & ); ///< \ru Инициализация по списку кривых. \en Initialization by list of curves.
void Init( const MbContour & ); ///< \ru Инициализация по контуру. \en Initialization by a contour.
/** \brief \ru Инициализация по массиву кривых.
\en Initialization by array of curves. \~
\details \ru Инициализация по массиву кривых. \n
\en Initialization by array of curves. \n \~
\param[in] curves - \ru Кривые.
\en Curves. \~
\param[in] sameCurves - \ru Использовать оригиналы кривых (true) или их копии (false).
\en Use original curves (true) or copies thereof (false). \~
\return \ru Возвращает true, если кривые были добавлена.
\en Returns true if curves were added. \~
*/
template <class Curves>
bool Init( Curves & curves, bool sameCurves );
/// \ru Инициализация по массиву точек (замкнутый контур). \en Initialization by array of points (closed contour).
template <class Points>
bool InitByPoints( const Points & );
/** \brief \ru Инициализация по массиву кривых.
\en Initialization by array of curves. \~
\details \ru Инициализация по массиву кривых. \n
\en Initialization by array of curves. \n \~
\param[in] curves - \ru Кривые.
\en Curves. \~
\param[in] sameCurves - \ru Использовать оригиналы кривых (true) или их копии (false).
\en Use original curves (true) or copies thereof (false). \~
\return \ru Возвращает true, если кривые были добавлена.
\en Returns true if curves were added. \~
*/
template <class Curves>
bool Init( Curves & curves, bool sameCurves );
/// \ru Инициализация по массиву точек (замкнутый контур). \en Initialization by array of points (closed contour).
template <class Points>
bool InitByPoints( const Points & );
bool InitAsRectangle( const MbCartPoint * ); ///< \ru Инициализация как прямоугольника ( приходит 4 точки ) \en Initialization as rectangle (4 points are given).
bool InitByRectangle( const MbRect & ); ///< \ru Инициализация по прямоугольнику габарита. \en Initialization by rectangle of bounding box.
bool InitAsRectangle( const MbCartPoint * ); ///< \ru Инициализация как прямоугольника ( приходит 4 точки ) \en Initialization as rectangle (4 points are given).
bool InitByRectangle( const MbRect & ); ///< \ru Инициализация по прямоугольнику габарита. \en Initialization by rectangle of bounding box.
bool AddSegment ( MbCurve * ); ///< \ru Добавить сегмент в контур. \en Add a segment to the contour.
bool AddSegmentOrDeleteCurve( MbCurve * ); ///< \ru Добавить кривую как сегмент или удалить ее. \en Add a curve as segment or remove its.
bool AddSegment ( MbCurve * ); ///< \ru Добавить сегмент в контур. \en Add a segment to the contour.
bool AddSegmentOrDeleteCurve( MbCurve * ); ///< \ru Добавить кривую как сегмент или удалить ее. \en Add a curve as segment or remove its.
/** \brief \ru Добавить (усеченную) копию сегмента в конец контура.
\en Add a (truncated) segment copy to the end of the contour. \~
\details \ru Добавить (усеченную) копию сегмента в конец контура. \n
\en Add a (truncated) segment copy to the end of the contour. \n \~
\param[in] pBasis- \ru Исходная кривая.
\en Initial curve. \~
\param[in] t1 - \ru Начальный параметр усечения.
\en Truncation starting parameter. \~
\param[in] t2 - \ru Конечный параметр усечения.
\en Truncation ending parameter. \~
\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. \~
\return \ru Возвращает в случае успешного выполнения ненулевой указатель на добавленную кривую.
\en Returns, if successful, a non-zero pointer to the added curve. \~
*/
MbCurve * AddSegment( const MbCurve * pBasis, double t1, double t2, int sense = 1 );
/** \brief \ru Добавить (усеченную) копию сегмента в конец контура.
\en Add a (truncated) segment copy to the end of the contour. \~
\details \ru Добавить (усеченную) копию сегмента в конец контура. \n
\en Add a (truncated) segment copy to the end of the contour. \n \~
\param[in] pBasis- \ru Исходная кривая.
\en Initial curve. \~
\param[in] t1 - \ru Начальный параметр усечения.
\en Truncation starting parameter. \~
\param[in] t2 - \ru Конечный параметр усечения.
\en Truncation ending parameter. \~
\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. \~
\return \ru Возвращает в случае успешного выполнения ненулевой указатель на добавленную кривую.
\en Returns, if successful, a non-zero pointer to the added curve. \~
*/
MbCurve * AddSegment( const MbCurve * pBasis, double t1, double t2, int sense = 1 );
bool AddAtSegment ( MbCurve * newSegment, size_t index ); ///< \ru Вставить сегмент перед сегментом контура с индексом index. \en Insert a segment before the contour segment with the index "index".
bool AddAfterSegment( MbCurve * newSegment, size_t index ); ///< \ru Вставить сегмент после сегмента контура с индексом index. \en Insert a segment after the contour segment with the index "index".
bool AddAtSegment ( MbCurve * newSegment, size_t index ); ///< \ru Вставить сегмент перед сегментом контура с индексом index. \en Insert a segment before the contour segment with the index "index".
bool AddAfterSegment( MbCurve * newSegment, size_t index ); ///< \ru Вставить сегмент после сегмента контура с индексом index. \en Insert a segment after the contour segment with the index "index".
/** \brief \ru Добавить новый элемент в начало или конец контура.
\en Add the new element to the beginning or end of contour. \~
\details \ru Добавить новый элемент в начало или конец контура. \n
\en Add the new element to the beginning or end of contour. \n \~
\param[in] curve - \ru Добавляемая кривая.
\en Added curve. \~
\param[in] absEps - \ru Точность проверки совпадения концов кривых (1e-8 - 1e-4).
\en Accuracy of verification of curve end coincidence (1e-8 - 1e-4). \~
\param[in] toEndOnly - \ru Добавлять кривую только в конец контура.
\en Add the curve only at the end of the contour. \~
\param[in] checkSame - \ru Проверять наличие такой же (добавляемой) кривой в контуре.
\en Check a presence of the same curve in the contour. \~
\param[in] version - \ru Версия.
\en Version. \~
\return \ru Возвращает true, если кривая была добавлена.
\en Returns true if the curve was added. \~
*/
bool AddCurveWithRuledCheck( MbCurve & newCur, double absEps, bool toEndOnly = false, bool checkSame = true,
VERSION version = Math::DefaultMathVersion() );
/** \brief \ru Добавить новый элемент в начало или конец контура.
\en Add the new element to the beginning or end of contour. \~
\details \ru Добавить новый элемент в начало или конец контура. \n
\en Add the new element to the beginning or end of contour. \n \~
\param[in] curve - \ru Добавляемая кривая.
\en Added curve. \~
\param[in] absEps - \ru Точность проверки совпадения концов кривых (1e-8 - 1e-4).
\en Accuracy of verification of curve end coincidence (1e-8 - 1e-4). \~
\param[in] toEndOnly - \ru Добавлять кривую только в конец контура.
\en Add the curve only at the end of the contour. \~
\param[in] checkSame - \ru Проверять наличие такой же (добавляемой) кривой в контуре.
\en Check a presence of the same curve in the contour. \~
\param[in] version - \ru Версия.
\en Version. \~
\return \ru Возвращает true, если кривая была добавлена.
\en Returns true if the curve was added. \~
*/
bool AddCurveWithRuledCheck( MbCurve & newCur, double absEps, bool toEndOnly = false, bool checkSame = true,
VERSION version = Math::DefaultMathVersion() );
void DeleteSegments(); ///< \ru Удалить все сегменты в контуре. \en Remove all segments from contour.
void DeleteSegment( size_t ind ); ///< \ru Удалить сегмент в контуре. \en Remove a segment from contour.
void DetachSegments(); ///< \ru Отцепить все сегменты от контура без удаления. \en Detach all segments from the contour without removing.
MbCurve * DetachSegment( size_t ind ); ///< \ru Отцепить сегмент от контура и вернуть его. \en Detach a segment from contour return it.
template <class CurvesVector>
void DetachSegments( CurvesVector & segms ); ///< \ru Отцепить все сегменты от контура без удаления. \en Detach all segments from the contour without removing.
void DeleteSegments(); ///< \ru Удалить все сегменты в контуре. \en Remove all segments from contour.
void DeleteSegment( size_t ind ); ///< \ru Удалить сегмент в контуре. \en Remove a segment from contour.
void DetachSegments(); ///< \ru Отцепить все сегменты от контура без удаления. \en Detach all segments from the contour without removing.
MbCurve * DetachSegment( size_t ind ); ///< \ru Отцепить сегмент от контура и вернуть его. \en Detach a segment from contour return it.
void SetSegment( MbCurve & newSegment, size_t ind ); ///< \ru Заменить сегмент в контуре. \en Replace a segment in the contour.
void SegmentsAdd( MbCurve & newSegment, bool calculateParamLength = true ); ///< \ru Добавить сегмент в контур без проверки. \en Add a segment to the contour without checking.
void SegmentsInsert( size_t ind, MbCurve & newSegment ); ///< \ru Вставить сегмент в контур перед индексом без проверки. \en Insert a segment into contour before an index without checking.
void SegmentsRemove( size_t ind ); ///< \ru Удалить сегмент без проверки. \en Remove a segment without checking.
void SegmentsDetach( size_t ind ); ///< \ru Отцепить сегмент без проверки. \en Detach a segment without checking.
template <class CurvesVector>
void DetachSegments( CurvesVector & segms ); ///< \ru Отцепить все сегменты от контура без удаления. \en Detach all segments from the contour without removing.
void Calculate( bool calcArea = false ); ///< \ru Рассчитать параметры: rect, paramLength, metricLength, closed. \en Calculate parameters: rect, paramLength, metricLength, closed.
void SetSegment( MbCurve & newSegment, size_t ind ); ///< \ru Заменить сегмент в контуре. \en Replace a segment in the contour.
void SegmentsAdd( MbCurve & newSegment, bool calculateParamLength = true ); ///< \ru Добавить сегмент в контур без проверки. \en Add a segment to the contour without checking.
void SegmentsInsert( size_t ind, MbCurve & newSegment ); ///< \ru Вставить сегмент в контур перед индексом без проверки. \en Insert a segment into contour before an index without checking.
void SegmentsRemove( size_t ind ); ///< \ru Удалить сегмент без проверки. \en Remove a segment without checking.
void SegmentsDetach( size_t ind ); ///< \ru Отцепить сегмент без проверки. \en Detach a segment without checking.
// \ru Управление распределением памяти в массиве segments \en Control of memory allocation in the array "segments"
void SegmentsReserve( size_t additionalSpace ) { segments.Reserve( additionalSpace ); } ///< \ru Зарезервировать место под столько элементов. \en Reserve memory for this number of elements.
void SegmentsAdjust () { segments.Adjust(); } ///< \ru Удалить лишнюю память. \en Free the unnecessary memory.
void Calculate( bool calcArea = false ); ///< \ru Рассчитать параметры: rect, paramLength, metricLength, closed. \en Calculate parameters: rect, paramLength, metricLength, closed.
// \ru Управление распределением памяти в массиве segments \en Control of memory allocation in the array "segments"
void SegmentsReserve( size_t additionalSpace ) { segments.Reserve( additionalSpace ); } ///< \ru Зарезервировать место под столько элементов. \en Reserve memory for this number of elements.
void SegmentsAdjust () { segments.Adjust(); } ///< \ru Удалить лишнюю память. \en Free the unnecessary memory.
template <class CurvesVector>
bool GetSegments( CurvesVector & segms ) const; ///< \ru Получить сегменты контура. \en Get contour segments.
bool GetSegments( CurvesVector & segms ) const; ///< \ru Получить сегменты контура. \en Get contour segments.
void SetMetricLength( double len ) const { 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.
void ReplaceContoursAndPolylines();
void GetPolygon( double sag, SArray<MbCartPoint> & poly, double eps ) const; ///< \ru Дать точки полигона. \en Get points of polygon.
void SetMetricLength( double len ) const { 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.
void ReplaceContoursAndPolylines();
void GetPolygon( double sag, SArray<MbCartPoint> & poly, double eps ) const; ///< \ru Дать точки полигона. \en Get points of polygon.
bool IsAnyCurvilinear() const; ///< \ru Есть ли в контуре криволинейный сегмент. \en Whether the contour has a curved segment.
bool IsSameSegments( const MbContour &, double accuracy = PARAM_PRECISION ) const; ///< \ru Содержат ли контура идентичные сегменты. \en Whether contours contains identical segments.
bool GetBegSegmentPoint( size_t i, MbCartPoint & ) const; ///< \ru Дать начальную точку i-го сегмента. \en Get the start point of i-th segment.
bool GetEndSegmentPoint( size_t i, MbCartPoint & ) const; ///< \ru Дать конечную точку i-го сегмента. \en Get the end point of i-th segment.
bool IsAnyCurvilinear() const; ///< \ru Есть ли в контуре криволинейный сегмент. \en Whether the contour has a curved segment.
bool IsSameSegments( const MbContour &, double accuracy = PARAM_PRECISION ) const; ///< \ru Содержат ли контура идентичные сегменты. \en Whether contours contains identical segments.
bool GetBegSegmentPoint( size_t i, MbCartPoint & ) const; ///< \ru Дать начальную точку i-го сегмента. \en Get the start point of i-th segment.
bool GetEndSegmentPoint( size_t i, MbCartPoint & ) const; ///< \ru Дать конечную точку i-го сегмента. \en Get the end point of i-th segment.
/** \brief \ru Нормаль по параметру, учитывая стыки сегментов.
\en Normal by parameter with consideration of segments joints \~
\details \ru Нормаль по параметру, учитывая стыки сегментов.\n
\en Normal by parameter with consideration of segments joints \n \~
\param[in] t - \ru Параметр на контуре
\en Parameter on the contour \~
\param[out] norm - \ru Единичный вектор нормали, если не попали на стык сегментов\n
если попали на стык сегментов - вектор, направленный,
как сумма двух нормалей на сегментах в точке стыка,
с длиной, равной 1, деленной на синус половинного угла между сегментами
\en Unit vector of normal if not hit on the joint of segments \n
if we got on the joint of segments then the vector is directed,
as the sum of two normals on segments in joint,
with length which is equal to 1 divided by the sine of half angle between the segments \~
\return \ru true, если попали на стык сегментов
\en true, if got on the joint of segments \~
*/
bool CornerNormal( double t, MbVector & norm ) const;
/** \brief \ru Нормаль по параметру, учитывая стыки сегментов.
\en Normal by parameter with consideration of segments joints \~
\details \ru Нормаль по параметру, учитывая стыки сегментов.\n
\en Normal by parameter with consideration of segments joints \n \~
\param[in] t - \ru Параметр на контуре
\en Parameter on the contour \~
\param[out] norm - \ru Единичный вектор нормали, если не попали на стык сегментов\n
если попали на стык сегментов - вектор, направленный,
как сумма двух нормалей на сегментах в точке стыка,
с длиной, равной 1, деленной на синус половинного угла между сегментами
\en Unit vector of normal if not hit on the joint of segments \n
if we got on the joint of segments then the vector is directed,
as the sum of two normals on segments in joint,
with length which is equal to 1 divided by the sine of half angle between the segments \~
\return \ru true, если попали на стык сегментов
\en true, if got on the joint of segments \~
*/
bool CornerNormal( double t, MbVector & norm ) const;
/** \brief \ru Параметры стыков сегментов.
\en Parameters of segments joints. \~
\details \ru Параметры стыков сегментов кроме минимального
и максимального параметров контура.
\en Parameters of segments joints without minimal
and maximal contour parameter. \~
\param[out] params - \ru Набор параметров.
\en Set of parameters. \~
*/
template <class Params>
void GetCornerParams( Params & params ) const;
// \ru Вычисление всех касательных к кривой из данной точки \en Calculation of all tangents to the curve from a given point
/** \brief \ru Параметры стыков сегментов.
\en Parameters of segments joints. \~
\details \ru Параметры стыков сегментов кроме минимального
и максимального параметров контура.
\en Parameters of segments joints without minimal
and maximal contour parameter. \~
\param[out] params - \ru Набор параметров.
\en Set of parameters. \~
*/
template <class Params>
void GetCornerParams( Params & params ) const;
// \ru Вычисление всех касательных к кривой из данной точки \en Calculation of all tangents to the curve from a given point
/** \brief \ru Вычисление двух касательных (для параметров стыков).
\en Calculation of two tangents (for parameters of joints). \~
\details \ru Вычисление двух касательных для параметра стыка по соответствующим сегментам.
Если параметр не стыковой, то касательные равны.
\en Calculation of two tangents for parameter of segments joint corresponding to the segments.
If parameter is not one of parameters of segments joints tangents are equal.
and maximal contour parameter. \~
\param[in] t - \ru Параметр.
\en A parameter. \~
\param[out] tan1 - \ru Первая касательная.
\en First tangent. \~
\param[out] tan2 - \ru Вторая касательная.
\en Second tangent. \~
*/
bool GetTwoTangents( double t, MbVector & tan1, MbVector & tan2 ) const;
/** \brief \ru Вычисление двух касательных (для параметров стыков).
\en Calculation of two tangents (for parameters of joints). \~
\details \ru Вычисление двух касательных для параметра стыка по соответствующим сегментам.
Если параметр не стыковой, то касательные равны.
\en Calculation of two tangents for parameter of segments joint corresponding to the segments.
If parameter is not one of parameters of segments joints tangents are equal.
and maximal contour parameter. \~
\param[in] t - \ru Параметр.
\en A parameter. \~
\param[out] tan1 - \ru Первая касательная.
\en First tangent. \~
\param[out] tan2 - \ru Вторая касательная.
\en Second tangent. \~
*/
bool GetTwoTangents( double t, MbVector & tan1, MbVector & tan2 ) const;
/** \} */
/** \ru \name Функции работы с именами контура.
@@ -651,7 +655,7 @@ public:
\param[out] names - \ru Имена сегментов.
\en Names of segments \~
*/
void GetSegmentsNames( SimpleNameArray & names ) const;
void GetSegmentsNames( SimpleNameArray & names ) const;
/** \brief \ru Установить имена сегментов.
\en Set names of segments. \~
@@ -660,12 +664,12 @@ public:
\param[in] names - \ru Набор имен.
\en A set of names. \~
*/
void SetSegmentsNames( const SimpleNameArray & names );
void SetSegmentsNames( const SimpleNameArray & names );
/** \} */
private:
ptrdiff_t _FindSegment( double & t, double & tSeg ) const; // \ru Нахождение сегмента контура \en Finding of a contour segment
ptrdiff_t _FindSegment( double & t, double & tSeg ) const; // \ru Нахождение сегмента контура \en Finding of a contour segment
MbContour & operator = ( const MbContour & initContour );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbContour )
@@ -702,6 +706,7 @@ MbContour::MbContour( const Curves & initCurves, bool same )
SetClosed(); // установить признак замкнутости контура
}
//------------------------------------------------------------------------------
// \ru Инициализация по массиву точек (замкнутый контур). \en Initialization by array of points (closed contour).
// ---
@@ -725,6 +730,7 @@ bool MbContour::InitByPoints( const Points & points )
return false;
}
//------------------------------------------------------------------------------
// \ru Инициализация по массиву кривых. \en Initialization by array of curves.
// ---
@@ -753,6 +759,7 @@ bool MbContour::Init( Curves & curves, bool same )
return res;
}
//------------------------------------------------------------------------------
// \ru Получить сегменты контура. \en Get contour segments.
// ---
@@ -771,6 +778,7 @@ bool MbContour::GetSegments( CurvesVector & segms ) const
return res;
}
//------------------------------------------------------------------------------
// \ru Отцепить все сегменты от контура без удаления. \en Detach all segments from the contour without removing.
// ---
+105 -101
View File
@@ -152,7 +152,7 @@ public:
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
/** \} */
/** \ru \name Функции движения по кривой
@@ -171,10 +171,14 @@ public:
// \ru Преобразование в NURBS кривую \en Transform to NURBS-curve
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
// \ru Изменить направление \en Change direction
void Inverse( MbRegTransform * iReg = nullptr ) override;
// \ru Согласовать параметризацию сегментов, если до инвертации она была согласованной. \en Agree on segment parameterization, if it was consistent before inversion.
bool NormalizeReparametrization();
bool NormalizeReparametrization();
/// \ru Подобные ли кривые для объединения (слива). \en Whether the curves to union (joining) are similar.
bool IsSimilarToCurve( const MbCurve3D & other, double precision = METRIC_PRECISION ) const override;
@@ -185,13 +189,13 @@ public:
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину \en Calculate the metric length
double CalculateLength( double t1, double t2 ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const override;
VERSION version = Math::DefaultMathVersion() ) const override;
void CalculateLocalGabarit( const MbMatrix3D &, MbCube & ) const override; // \ru Рассчитать габарит относительно л.с.к. \en Calculate bounding box relative to the local coordinate system.
void CalculateGabarit( MbCube & ) const override; // \ru Вычислить габарит кривой \en Calculate the bounding box of curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
MbCurve * GetProjection( const MbPlacement3D & place, VERSION version ) const override; // \ru Дать проекцию ребра на плоскость. \en Get the edge projection onto plane.
size_t GetCount() const override;
@@ -256,107 +260,107 @@ public:
\en \name Function for working with segments of contour
\{ */
/// \ru Инициализация по набору кривых (sameCurves - кривые или их копии). \en Initialize by curves (sameCurves - curves or their copies).
template <class CurvesVector>
bool Init( const CurvesVector & initSegments, bool sameCurves, bool cls );
/// \ru Инициализация по набору точек. \en Initialize by points.
template <class PointsVector>
bool Init( const PointsVector & points, bool doClosed = true );
/// \ru Инициализация по набору кривых (sameCurves - кривые или их копии). \en Initialize by curves (sameCurves - curves or their copies).
template <class CurvesVector>
bool Init( const CurvesVector & initSegments, bool sameCurves, bool cls );
/// \ru Инициализация по набору точек. \en Initialize by points.
template <class PointsVector>
bool Init( const PointsVector & points, bool doClosed = true );
/** \brief \ru Найти сегмент контура.
\en Find a contour segment. \~
\details \ru Найти сегмент контура по параметру контура. \n
\en Find a contour segment by parameter on contour. \n \~
\param[in,out] t - \ru Параметр контура.
\en Contour parameter. \~
\param[out] tSeg - \ru Параметр сегмента контура.
\en Contour segment parameter. \~
\return \ru Возвращает номер сегмента в случае успешного выполнения или -1.
\en Returns the segment number in case of successful execution or -1. \~
*/
ptrdiff_t FindSegment( double & t, double & tSeg ) const;
/** \brief \ru Найти сегмент контура.
\en Find a contour segment. \~
\details \ru Найти сегмент контура по параметру контура. \n
\en Find a contour segment by parameter on contour. \n \~
\param[in,out] t - \ru Параметр контура.
\en Contour parameter. \~
\param[out] tSeg - \ru Параметр сегмента контура.
\en Contour segment parameter. \~
\return \ru Возвращает номер сегмента в случае успешного выполнения или -1.
\en Returns the segment number in case of successful execution or -1. \~
*/
ptrdiff_t FindSegment( double & t, double & tSeg ) const;
size_t GetSegmentsCount() const { return segments.size(); } ///< \ru Выдать количество сегментов контура. \en Get the number of contour segments.
template <class CurvesVector>
void GetSegments( CurvesVector & curves ) const; ///< \ru Получить кривые контура. \en Get contour segments.
size_t GetSegmentsCount() const { return segments.size(); } ///< \ru Выдать количество сегментов контура. \en Get the number of contour segments.
template <class CurvesVector>
void GetSegments( CurvesVector & curves ) const; ///< \ru Получить кривые контура. \en Get contour segments.
void DetachSegments(); ///< \ru Отцепить все сегменты контура. \en Detach all segments of contour.
void DeleteSegments(); ///< \ru Отсоединить используемые сегменты и удалить остальные. \en Delete used segments and remove other segments.
void DetachSegments(); ///< \ru Отцепить все сегменты контура. \en Detach all segments of contour.
void DeleteSegments(); ///< \ru Отсоединить используемые сегменты и удалить остальные. \en Delete used segments and remove other segments.
void DeleteSegment( size_t ind ); ///< \ru Удалить сегмент контура. \en Delete the segment of contour.
MbCurve3D * DetachSegment( size_t ind ); ///< \ru Отцепить сегмент контура. \en Detach the segment of contour.
void DeleteSegment( size_t ind ); ///< \ru Удалить сегмент контура. \en Delete the segment of contour.
MbCurve3D * DetachSegment( size_t ind ); ///< \ru Отцепить сегмент контура. \en Detach the segment of contour.
const MbCurve3D * GetSegment( size_t ind ) const { return segments[ind]; } ///< \ru Выдать сегмент контура по индексу. \en Get contour segment by the index.
MbCurve3D * SetSegment( size_t ind ) { return segments[ind]; } ///< \ru Выдать сегмент контура по индексу. \en Get contour segment by the index.
void SetSegment ( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Заменить сегмент в контуре. \en Replace a segment in the contour.
void AddSegment ( MbCurve3D & newSegment, bool same ); ///< \ru Добавить сегмент в контур. \en Add a segment to the contour.
void AddAtSegment ( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Добавить сегмент в контур перед сегментом с индексом ind. \en Add a segment to the contour before the segment with index ind.
void AddAfterSegment( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Добавить сегмент в контур после сегмента с индексом ind. \en Add a segment to the contour after the segment with index ind.
void SetSegment ( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Заменить сегмент в контуре. \en Replace a segment in the contour.
void AddSegment ( MbCurve3D & newSegment, bool same ); ///< \ru Добавить сегмент в контур. \en Add a segment to the contour.
void AddAtSegment ( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Добавить сегмент в контур перед сегментом с индексом ind. \en Add a segment to the contour before the segment with index ind.
void AddAfterSegment( MbCurve3D & newSegment, size_t ind, bool same ); ///< \ru Добавить сегмент в контур после сегмента с индексом ind. \en Add a segment to the contour after the segment with index ind.
/** \brief \ru Добавить (усеченную) копию сегмента в конец контура.
\en Add a (truncated) segment copy to the end of the contour. \~
\details \ru Добавить (усеченную) копию сегмента в конец контура. \n
\en Add a (truncated) segment copy to the end of the contour. \n \~
\param[in] pBasis- \ru Исходная кривая.
\en Initial curve. \~
\param[in] t1 - \ru Начальный параметр усечения.
\en Truncation starting parameter. \~
\param[in] t2 - \ru Конечный параметр усечения.
\en Truncation ending parameter. \~
\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. \~
\return \ru Возвращает в случае успешного выполнения ненулевой указатель на добавленную кривую.
\en Returns, if successful, a non-zero pointer to the added curve. \~
*/
MbCurve3D * AddSegment( MbCurve3D & pBasis, double t1, double t2, int sense );
/** \brief \ru Добавить (усеченную) копию сегмента в конец контура.
\en Add a (truncated) segment copy to the end of the contour. \~
\details \ru Добавить (усеченную) копию сегмента в конец контура. \n
\en Add a (truncated) segment copy to the end of the contour. \n \~
\param[in] pBasis- \ru Исходная кривая.
\en Initial curve. \~
\param[in] t1 - \ru Начальный параметр усечения.
\en Truncation starting parameter. \~
\param[in] t2 - \ru Конечный параметр усечения.
\en Truncation ending parameter. \~
\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. \~
\return \ru Возвращает в случае успешного выполнения ненулевой указатель на добавленную кривую.
\en Returns, if successful, a non-zero pointer to the added curve. \~
*/
MbCurve3D * AddSegment( MbCurve3D & pBasis, double t1, double t2, int sense );
void SegmentsAdd( MbCurve3D & newSegment, bool calculateParamLength = true ); ///< \ru Добавить сегмент в контур без проверки. \en Add a segment to the contour without checking.
bool GetCornerAngle( size_t index, MbCartPoint3D & origin, MbVector3D & axis, MbVector3D & tau, double & angle,
double angleEps ) const;
/// \ru Cбросить переменные кэширования. \en Reset variables caching.
void Clear() {
CalculateParamLengthAndClosed(); // \ru Параметрическая длина контура. \en Parametric length of a contour.
}
bool IsSimple() const; ///< \ru Состоит ли контур из отрезков и дуг? \en Whether the contour consists of the segments and arcs?
/// \ru Управление распределением памяти в массиве segments. \en Control of memory allocation in the array "segments".
void SegmentsReserve( size_t additionalSpace ) { segments.Reserve( additionalSpace ); } ///< \ru Зарезервировать место. \en Reserve space.
void SegmentsAdjust () { segments.Adjust(); } ///< \ru Удалить лишнюю память. \en Free the unnecessary memory.
void SegmentsAdd( MbCurve3D & newSegment, bool calculateParamLength = true ); ///< \ru Добавить сегмент в контур без проверки. \en Add a segment to the contour without checking.
bool GetCornerAngle( size_t index, MbCartPoint3D & origin, MbVector3D & axis, MbVector3D & tau, double & angle,
double angleEps ) const;
/// \ru Cбросить переменные кэширования. \en Reset variables caching.
void Clear() {
CalculateParamLengthAndClosed(); // \ru Параметрическая длина контура. \en Parametric length of a contour.
}
bool IsSimple() const; ///< \ru Состоит ли контур из отрезков и дуг? \en Whether the contour consists of the segments and arcs?
/// \ru Управление распределением памяти в массиве segments. \en Control of memory allocation in the array "segments".
void SegmentsReserve( size_t additionalSpace ) { segments.Reserve( additionalSpace ); } ///< \ru Зарезервировать место. \en Reserve space.
void SegmentsAdjust () { segments.Adjust(); } ///< \ru Удалить лишнюю память. \en Free the unnecessary memory.
/** \brief \ru Добавить новый элемент в начало или конец контура.
\en Add the new element to the beginning or end of contour. \~
\details \ru Добавить новый элемент в начало или конец контура. \n
\en Add the new element to the beginning or end of contour. \n \~
\param[in] curve - \ru Добавляемая кривая.
\en Added curve. \~
\param[in] absEps - \ru Точность проверки совпадения концов кривых (1e-8 - 1e-4).
\en Accuracy of verification of curve end coincidence (1e-8 - 1e-4). \~
\param[in] toEndOnly - \ru Добавлять кривую только в конец контура.
\en Add the curve only at the end of the contour. \~
\param[in] checkSame - \ru Проверять наличие такой же (добавляемой) кривой в контуре.
\en Check a presence of the same curve in the contour. \~
\param[in] checkSame - \ru Версия.
\en Version. \~
\return \ru Возвращает true, если кривая была добавлена.
\en Returns true if the curve was added. \~
*/
bool AddCurveWithRuledCheck( MbCurve3D & curve, double absEps, bool toEndOnly = false, bool checkSame = true,
VERSION version = Math::DefaultMathVersion() );
/** \brief \ru Добавить новый элемент в начало или конец контура.
\en Add the new element to the beginning or end of contour. \~
\details \ru Добавить новый элемент в начало или конец контура. \n
\en Add the new element to the beginning or end of contour. \n \~
\param[in] curve - \ru Добавляемая кривая.
\en Added curve. \~
\param[in] absEps - \ru Точность проверки совпадения концов кривых (1e-8 - 1e-4).
\en Accuracy of verification of curve end coincidence (1e-8 - 1e-4). \~
\param[in] toEndOnly - \ru Добавлять кривую только в конец контура.
\en Add the curve only at the end of the contour. \~
\param[in] checkSame - \ru Проверять наличие такой же (добавляемой) кривой в контуре.
\en Check a presence of the same curve in the contour. \~
\param[in] checkSame - \ru Версия.
\en Version. \~
\return \ru Возвращает true, если кривая была добавлена.
\en Returns true if the curve was added. \~
*/
bool AddCurveWithRuledCheck( MbCurve3D & curve, double absEps, bool toEndOnly = false, bool checkSame = true,
VERSION version = Math::DefaultMathVersion() );
/// \ru Проверка непрерывности контура. \en Check for contour continuity.
bool CheckConnection( double eps = METRIC_PRECISION ) const;
void CalculateParamLength(); ///< \ru Рассчитать параметрическую длину. \en Calculate parametric length.
void CheckClosed( double /*closedEps*/ ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
/// \ru Содержат ли контура идентичные сегменты. \en Whether contours contains identical segments.
bool IsSameSegments( const MbContour3D &, double accuracy = METRIC_PRECISION ) const;
/// \ru Нахождение точки сегмента контура по индексу сегмента. \en Finding the point of a contour segment by segment index.
void FindCorner( size_t index, MbCartPoint3D & ) const;
/// \ru Установить начальную (конечную) точку для замкнутого контура. \en Set the start (end) point for closed contour.
bool SetBegEndPoint( double t );
/// \ru Проверка непрерывности контура. \en Check for contour continuity.
bool CheckConnection( double eps = METRIC_PRECISION ) const;
void CalculateParamLength(); ///< \ru Рассчитать параметрическую длину. \en Calculate parametric length.
void CheckClosed( double /*closedEps*/ ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
/// \ru Содержат ли контура идентичные сегменты. \en Whether contours contains identical segments.
bool IsSameSegments( const MbContour3D &, double accuracy = METRIC_PRECISION ) const;
/// \ru Нахождение точки сегмента контура по индексу сегмента. \en Finding the point of a contour segment by segment index.
void FindCorner( size_t index, MbCartPoint3D & ) const;
/// \ru Установить начальную (конечную) точку для замкнутого контура. \en Set the start (end) point for closed contour.
bool SetBegEndPoint( double t );
/** \} */
/** \ru \name Функции работы с именами контура.
@@ -370,7 +374,7 @@ public:
\param[out] names - \ru Имена сегментов.
\en Names of segments \~
*/
void GetSegmentsNames( SimpleNameArray & names ) const;
void GetSegmentsNames( SimpleNameArray & names ) const;
/** \brief \ru Установить имена сегментов.
\en Set names of segments. \~
@@ -379,20 +383,20 @@ public:
\param[in] names - \ru Набор имен.
\en A set of names. \~
*/
void SetSegmentsNames( const SimpleNameArray & names );
void SetSegmentsNames( const SimpleNameArray & names );
/** \} */
private:
void SetClosed(); // \ru Проверить и установить признак замкнутости контура. \en Check and set closedness attribute of contour.
void CalculateParamLengthAndClosed(); // \ru Посчитать параметрическую длину и признак замкнутости \en Calculate parametric length and closedness attribute
ptrdiff_t _FindSegment( double & t, double & tSeg ) const; // \ru Нахождение сегмента контура \en Finding of a contour segment
void SetClosed(); // \ru Проверить и установить признак замкнутости контура. \en Check and set closedness attribute of contour.
void CalculateParamLengthAndClosed(); // \ru Посчитать параметрическую длину и признак замкнутости \en Calculate parametric length and closedness attribute
ptrdiff_t _FindSegment( double & t, double & tSeg ) const; // \ru Нахождение сегмента контура \en Finding of a contour segment
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbContour3D )
OBVIOUS_PRIVATE_COPY( MbContour3D )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbContour3D )
OBVIOUS_PRIVATE_COPY( MbContour3D )
}; // MbContour3D
IMPL_PERSISTENT_OPS( MbContour3D )
+4
View File
@@ -131,6 +131,10 @@ public :
/// \ru Инвертировать нормаль плоскости. \en Invert the normal of plane.
void InvertNormal( MbRegTransform * = nullptr );
/// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
private:
void operator = ( const MbContourOnPlane & ); // \ru Не реализовано !!! \en Not implemented !!!
+32 -31
View File
@@ -120,7 +120,7 @@ public:
void _ThirdDer ( double t, MbVector & v ) const override;
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
bool HasLength ( double & length ) const override;
double GetMetricLength() const override; // \ru Метрическая длина \en The metric length
@@ -140,7 +140,7 @@ public:
double PointProjection( const MbCartPoint & pnt ) const override; // \ru Проекция точки на кривую \en Point projection on the curve
bool NearPointProjection( const MbCartPoint & pnt, 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; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
void GetProperties( MbProperties & properties ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & properties ) override; // \ru Записать свойства объекта \en Set properties of the object
@@ -151,46 +151,47 @@ public:
const MbPlacement & GetPlacement() const { return position; }
MbPlacement & SetPlacement() { return position; }
double GetFrequency() const { return frequency; }
double GetPhase() const { return phase; }
double GetAmplitude() const { return amplitude; }
double GetOwnTMin() const { return tmin; }
double GetOwnTMax() const { return tmax; }
void SetPlacement( const MbPlacement &pos );
void SetFrequency( double f );
void SetPhase ( double p );
void SetAmplitude( double a );
void SetOwnTMin ( double t );
void SetOwnTMax ( double t );
double GetFrequency() const { return frequency; }
double GetPhase() const { return phase; }
double GetAmplitude() const { return amplitude; }
double GetOwnTMin() const { return tmin; }
double GetOwnTMax() const { return tmax; }
void SetPlacement( const MbPlacement &pos );
void SetFrequency( double f );
void SetPhase ( double p );
void SetAmplitude( double a );
void SetOwnTMin ( double t );
void SetOwnTMax ( double t );
inline void CheckParam( double & t ) const;
bool IsHorizontal( double eps = Math::AngleEps ) const; // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::AngleEps ) const; // \ru Проверка вертикальности \en Check for verticality
bool IsHorizontal( double eps = Math::AngleEps ) const; // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::AngleEps ) const; // \ru Проверка вертикальности \en Check for verticality
void Init ( const MbCosinusoid & );
void Init ( double t1, double t2 );
void Init ( const MbPlacement & pos, double am, double ph, double af );
void Init1( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle );
void Init2( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, double & angle );
void Init3( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, double & len, const double & angle,
const DiskreteLengthData * = nullptr );
void Init4( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, double & angle );
void Init5( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, double & len, const double & angle,
const DiskreteLengthData * = nullptr );
void Init6( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, const double & angle );
void Init7( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, const double & angle );
void Init8( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle,
const DiskreteLengthData & diskrData, bool correctP1 );
void SpecInit( const CosinusoidPar &, const MbCartPoint & p1, double angle, double len );
void Init ( const MbCosinusoid & );
void Init ( double t1, double t2 );
void Init ( const MbPlacement & pos, double am, double ph, double af );
void Init1( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle );
void Init2( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, double & angle );
void Init3( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, double & len, const double & angle,
const DiskreteLengthData * = nullptr );
void Init4( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, double & angle );
void Init5( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, double & len, const double & angle,
const DiskreteLengthData * = nullptr );
void Init6( CosinusoidPar & par, const MbCartPoint & p1, MbCartPoint & p2, const double & len, const double & angle );
void Init7( CosinusoidPar & par, MbCartPoint & p1, const MbCartPoint & p2, const double & len, const double & angle );
void Init8( CosinusoidPar & par, MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle,
const DiskreteLengthData & diskrData, bool correctP1 );
void SpecInit( const CosinusoidPar &, const MbCartPoint & p1, double angle, double len );
private:
void operator = ( const MbCosinusoid & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbCosinusoid & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCosinusoid )
}; // MbCosinusoid
IMPL_PERSISTENT_OPS( MbCosinusoid )
//-------------------------------------------------------------------------------
// \ru Проверка параметра \en Check parameter
// ---
+29 -27
View File
@@ -76,16 +76,16 @@ public:
public :
VISITING_CLASS( MbCrookedSpiral );
/// \ru Инициализация спирали по спирали. \en Spiral initialization by spiral.
void Init( const MbCrookedSpiral & );
/// \ru Инициализация спирали по основанию (локальной системе координат). \en Spiral initialization by base (local coordinate system).
void Init( const MbPlacement3D & );
/// \ru Инициализация спирали по спирали. \en Spiral initialization by spiral.
void Init( const MbCrookedSpiral & );
/// \ru Инициализация спирали по основанию (локальной системе координат). \en Spiral initialization by base (local coordinate system).
void Init( const MbPlacement3D & );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
MbeSpaceType IsA() const override; // \ru Тип элемента \en Type of element
MbSpaceItem & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию элемента \en Create a copy of the element
bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const override;
bool IsSame( const MbSpaceItem & other, double accuracy = LENGTH_EPSILON ) const override;
bool SetEqual( const MbSpaceItem & init ) override; // \ru Сделать равным \en Make equal
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
@@ -106,7 +106,7 @@ public :
void _ThirdDer ( double t, MbVector3D & td ) const override; // \ru Третья производная по t \en Third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
@@ -120,32 +120,34 @@ public :
double GetSpiralRadius( double t ) const override; // \ru Выдать физический радиус спирали \en Get physical radius of spiral
const MbCurve & GetAxisCurve() const { return *curve; } ///< \ru Выдать осевую кривую. \en Get axial curve.
double GetSpiralRadius() const { return radius; } ///< \ru Выдать радиус. \en Get radius.
void SetSpiralRadius( double r ) { radius = r; }; ///< \ru Изменить радиус. \en Change radius.
bool GetCurveSense () const { return curveSense; } ///< \ru Выдать признак совпадения направления на спирали и оси (кривой). \en Get attribute of coincidence of the direction on the spiral and axis (curve).
double GetSpiralRadius() const { return radius; } ///< \ru Выдать радиус. \en Get radius.
void SetSpiralRadius( double r ) { radius = r; }; ///< \ru Изменить радиус. \en Change radius.
bool GetCurveSense () const { return curveSense; } ///< \ru Выдать признак совпадения направления на спирали и оси (кривой). \en Get attribute of coincidence of the direction on the spiral and axis (curve).
private:
void GetFirstDerNormW ( const MbVector & fDerW, const MbVector & sDerW, MbVector & fdNormW ) const; // \ru Выдать первую производную нормали по параметру кривой оси \en Get the first derivative of normal vector with respect to parameter of axis curve
void GetSecondDerNormW ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & sdNormW ) const; // \ru Выдать вторую производную нормали по параметру кривой оси \en Get the second derivative of normal vector with respect to parameter of axis curve
void GetThirdDerNormW ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & tdNormW ) const; // \ru Выдать третью производную нормали по параметру кривой оси \en Get the third derivative of normal vector with respect to parameter of axis curve
void GetFirstDerNormT ( const MbVector & fDerW, const MbVector & sDerW, MbVector & fdNorm ) const; // \ru Выдать первую производную нормали по параметру спирали \en Get the first derivative of normal vector with respect to parameter of the spiral
void GetSecondDerNormT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & sdNorm ) const; // \ru Выдать вторую производную нормали по параметру спирали \en Get the second derivative of normal vector with respect to parameter of the spiral
void GetThirdDerNormT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & tdNorm ) const; // \ru Выдать третью производную нормали по параметру спирали \en Get the third derivative of normal vector with respect to parameter of the spiral
void GetFirstDerT ( const MbVector & fDerW, MbVector & fd ) const; // \ru Выдать первую производную кривой оси по параметру спирали \en Get the first derivative of axis curve with respect to parameter of the spiral
void GetSecondDerT ( const MbVector & fDerW, const MbVector & sDerW, MbVector & sd ) const; // \ru Выдать вторую производную кривой оси по параметру спирали \en Get the second derivative of axis curve with respect to parameter of the spiral
void GetThirdDerT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & td ) const; // \ru Выдать третью производную кривой оси по параметру спирали \en Get the third derivative of axis curve with respect to parameter of the spiral
double GetFirstDerParamT ( const MbVector & fDerW ) const; // \ru Выдать первую производную параметра кривой оси по параметру спирали \en Get the first derivative of axis curve parameter with respect to parameter of the spiral
double GetSecondDerParamT( const MbVector & fDerW, const MbVector & sDerW ) const; // \ru Выдать вторую производную параметра кривой оси по параметру спирали \en Get the second derivative of axis curve parameter with respect to parameter of the spiral
double GetThirdDerParamT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW ) const; // \ru Выдать третью производную параметра кривой оси по параметру спирали \en Get the third derivative of axis curve parameter with respect to parameter of the spiral
void GetCurveParams ( double tSense, MbCartPoint & point, MbDirection & normal,
MbVector & fDerW, MbVector & sDerW, MbVector & tDerW ) const; // \ru Параметры кривой оси, соответствующие параметру спирали t \en Parameters of axis curve corresponding to the parameter t of the spiral
void CalculateParams (); // \ru Посчитать параметры спирали (параметрические сдвиги от начала кривой) и параметры кривой. \en Calculate parameters of spiral (parametric shifts from the beginning of the curve) and parameters of "curve".
bool NearestLeftParams ( double tSense, c3d::DoublePair & paramPair ) const; // \ru Ближайшая слева пара параметров спирали и кривой. \en Nearest left parameters pair of spiral and "curve".
void GetFirstDerNormW ( const MbVector & fDerW, const MbVector & sDerW, MbVector & fdNormW ) const; // \ru Выдать первую производную нормали по параметру кривой оси \en Get the first derivative of normal vector with respect to parameter of axis curve
void GetSecondDerNormW ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & sdNormW ) const; // \ru Выдать вторую производную нормали по параметру кривой оси \en Get the second derivative of normal vector with respect to parameter of axis curve
void GetThirdDerNormW ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & tdNormW ) const; // \ru Выдать третью производную нормали по параметру кривой оси \en Get the third derivative of normal vector with respect to parameter of axis curve
void GetFirstDerNormT ( const MbVector & fDerW, const MbVector & sDerW, MbVector & fdNorm ) const; // \ru Выдать первую производную нормали по параметру спирали \en Get the first derivative of normal vector with respect to parameter of the spiral
void GetSecondDerNormT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & sdNorm ) const; // \ru Выдать вторую производную нормали по параметру спирали \en Get the second derivative of normal vector with respect to parameter of the spiral
void GetThirdDerNormT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & tdNorm ) const; // \ru Выдать третью производную нормали по параметру спирали \en Get the third derivative of normal vector with respect to parameter of the spiral
void GetFirstDerT ( const MbVector & fDerW, MbVector & fd ) const; // \ru Выдать первую производную кривой оси по параметру спирали \en Get the first derivative of axis curve with respect to parameter of the spiral
void GetSecondDerT ( const MbVector & fDerW, const MbVector & sDerW, MbVector & sd ) const; // \ru Выдать вторую производную кривой оси по параметру спирали \en Get the second derivative of axis curve with respect to parameter of the spiral
void GetThirdDerT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW, MbVector & td ) const; // \ru Выдать третью производную кривой оси по параметру спирали \en Get the third derivative of axis curve with respect to parameter of the spiral
double GetFirstDerParamT ( const MbVector & fDerW ) const; // \ru Выдать первую производную параметра кривой оси по параметру спирали \en Get the first derivative of axis curve parameter with respect to parameter of the spiral
double GetSecondDerParamT( const MbVector & fDerW, const MbVector & sDerW ) const; // \ru Выдать вторую производную параметра кривой оси по параметру спирали \en Get the second derivative of axis curve parameter with respect to parameter of the spiral
double GetThirdDerParamT ( const MbVector & fDerW, const MbVector & sDerW, const MbVector & tDerW ) const; // \ru Выдать третью производную параметра кривой оси по параметру спирали \en Get the third derivative of axis curve parameter with respect to parameter of the spiral
void GetCurveParams ( double tSense, MbCartPoint & point, MbDirection & normal,
MbVector & fDerW, MbVector & sDerW, MbVector & tDerW ) const; // \ru Параметры кривой оси, соответствующие параметру спирали t \en Parameters of axis curve corresponding to the parameter t of the spiral
void CalculateParams (); // \ru Посчитать параметры спирали (параметрические сдвиги от начала кривой) и параметры кривой. \en Calculate parameters of spiral (parametric shifts from the beginning of the curve) and parameters of "curve".
bool NearestLeftParams ( double tSense, c3d::DoublePair & paramPair ) const; // \ru Ближайшая слева пара параметров спирали и кривой. \en Nearest left parameters pair of spiral and "curve".
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCrookedSpiral )
OBVIOUS_PRIVATE_COPY( MbCrookedSpiral )
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCrookedSpiral )
OBVIOUS_PRIVATE_COPY( MbCrookedSpiral )
}; // MbCrookedSpiral
IMPL_PERSISTENT_OPS( MbCrookedSpiral )
#endif // __CUR_CROOKET_SPIRAL_H
+57 -56
View File
@@ -171,22 +171,22 @@ public :
/** \ru \name Функции инициализации сплайна.
\en \name Spline initialization functions.
\{ */
/// \ru Инициализатор по заданной кривой. \en Initializer by a given curve.
bool Init( const MbCurve &, VERSION version );
/// \ru Инициализатор по точкам и признаку замкнутости. \en Initializer by points and an attribute of closedness.
bool Init( const SArray<MbCartPoint> &, bool );
/// \ru Инициализатор по точкам, вторым производным и признаку замкнутости. \en Initializer by points, second derivatives and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<MbVector > &, bool );
/// \ru Инициализатор по точкам, параметрам и признаку замкнутости. \en Initializer by points, parameters and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<double > &, bool );
/// \ru Инициализатор по точкам, вторым производным, параметрам и признаку замкнутости. \en Initializer by points, second derivatives, parameters and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<MbVector > &,
const SArray<double > &, bool );
/// \ru Дублирующий инициализатор. \en Duplicating initializer.
void InitC( const MbCubicSpline & );
/// \ru Инициализатор по заданной кривой. \en Initializer by a given curve.
bool Init( const MbCurve &, VERSION version );
/// \ru Инициализатор по точкам и признаку замкнутости. \en Initializer by points and an attribute of closedness.
bool Init( const SArray<MbCartPoint> &, bool );
/// \ru Инициализатор по точкам, вторым производным и признаку замкнутости. \en Initializer by points, second derivatives and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<MbVector > &, bool );
/// \ru Инициализатор по точкам, параметрам и признаку замкнутости. \en Initializer by points, parameters and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<double > &, bool );
/// \ru Инициализатор по точкам, вторым производным, параметрам и признаку замкнутости. \en Initializer by points, second derivatives, parameters and closedness attribute.
bool Init( const SArray<MbCartPoint> &,
const SArray<MbVector > &,
const SArray<double > &, bool );
/// \ru Дублирующий инициализатор. \en Duplicating initializer.
void InitC( const MbCubicSpline & );
/** \} */
/** \ru \name Общие функции геометрического объекта.
@@ -228,10 +228,10 @@ public :
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
void FourDer ( double &, MbVector & ) const; ///< \ru Оценить четвертую производную. \en Estimate the fourth derivative.
void PointOnLine( double &, MbCartPoint & ) const; ///< \ru Вычислить точку на кривой при линейной аппроксимации. \en Calculate a point on the curve with a linear approximation.
void FourDer ( double &, MbVector & ) const; ///< \ru Оценить четвертую производную. \en Estimate the fourth derivative.
void PointOnLine( double &, MbCartPoint & ) const; ///< \ru Вычислить точку на кривой при линейной аппроксимации. \en Calculate a point on the curve with a linear approximation.
/** \} */
/** \ru \name Функции движения по кривой
@@ -268,7 +268,7 @@ public :
\en A constructed trimmed curve. \~
*/
MbCurve * Trimmed ( double t1, double t2, int sense ) const override; // \ru Усечь кривую \en Trim a curve
MbCurve * TrimmedBreak( double t1, double t2, int sense ) const; // \ru Усечь кривую с разрывом \en Trim a curve with a break
MbCurve * TrimmedBreak( double t1, double t2, int sense ) const; // \ru Усечь кривую с разрывом \en Trim a curve with a break
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override;
@@ -287,7 +287,7 @@ public :
double CalculateMetricLength() const override;
// \ru Сдвинуть параметр t на расстояние len. \en Move parameter t on the metric distance len.
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
VERSION version = Math::DefaultMathVersion() ) const override;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const override;
@@ -336,56 +336,57 @@ public :
If a curve is not closed and "black" is true then the system has a solution
when knot is absent. \~
*/
void InitCreate ( MbVector &, MbVector &, SArray<MbVector> &, double &,
double &, double &, double &, bool black = false );
/// \ru Решить систему методом исключения Гаусса. \en Solve the system by Gaussian elimination method.
void Create ( MbVector &, MbVector &, bool black = false );
/// \ru Вычислить производные на концах в случае незамкнутости сплайна. \en Calculate derivatives at the ends if the spline is not closed.
void CreateEndS ( MbVector &, MbVector & );
/// \ru Построить сплайн если необходимо. \en Create a spline if necessary.
void Create ();
/// \ru Очистить кривую. \en Clear the curve.
void Delete ();
/// \ru Установить область изменения параметра: первый - минимальный, второй - максимальный. \en Set the range of parameter: the first is minimum, the second is maximum.
bool SetLimitParam( double newTMin, double newTMax );
/// \ru Преобразовать в замкнутую кривую, если кривая разомкнута но концы кривой гладко стыкуются. \en Convert to a closed curve if the curve is unclosed but the ends of the curve are connected smoothly.
bool ConvertToClosed();
void InitCreate ( MbVector &, MbVector &, SArray<MbVector> &, double &,
double &, double &, double &, bool black = false );
/// \ru Решить систему методом исключения Гаусса. \en Solve the system by Gaussian elimination method.
void Create ( MbVector &, MbVector &, bool black = false );
/// \ru Вычислить производные на концах в случае незамкнутости сплайна. \en Calculate derivatives at the ends if the spline is not closed.
void CreateEndS ( MbVector &, MbVector & );
/// \ru Построить сплайн если необходимо. \en Create a spline if necessary.
void Create ();
/// \ru Очистить кривую. \en Clear the curve.
void Delete ();
/// \ru Установить область изменения параметра: первый - минимальный, второй - максимальный. \en Set the range of parameter: the first is minimum, the second is maximum.
bool SetLimitParam( double newTMin, double newTMax );
/// \ru Преобразовать в замкнутую кривую, если кривая разомкнута но концы кривой гладко стыкуются. \en Convert to a closed curve if the curve is unclosed but the ends of the curve are connected smoothly.
bool ConvertToClosed();
void SetBegEndDerivesEqual() override; // \ru Установить равные производные на краях \en Set equal derivatives at the edges
void ClosedBreak() override; // \ru Сделать незамкнутой, оставив совпадающими начало и конец \en Make unclosed, leave coinciding start and end
/// \ru Вычисление шага аппроксимации. \en Calculation of a step of approximation.
double StepD( double &t, double sag, bool bfirst, double ang = 0.35 ) const;
/// \ru Вычисление шага аппроксимации. \en Calculation of a step of approximation.
double StepD( double &t, double sag, bool bfirst, double ang = 0.35 ) const;
/// \ru Вернуть количество элементов в массиве векторов производных. \en Get the number of elements in array of derivative vectors.
ptrdiff_t GetVectorListCount() const { return (ptrdiff_t)/*OV_x64 (int)*/vectorList.Count(); }
/// \ru Вернуть массив вторых призводных в контрольных точках. \en Get the array of second derivatives at the control points.
void GetVectorList( SArray<MbVector> & vectors ) const { vectors = vectorList; }
/// \ru Выдать вектор второй производной с индексов i. \en Get the vector of the second derivative with index i.
/// \ru Вернуть количество элементов в массиве векторов производных. \en Get the number of elements in array of derivative vectors.
ptrdiff_t GetVectorListCount() const { return (ptrdiff_t)/*OV_x64 (int)*/vectorList.Count(); }
/// \ru Вернуть массив вторых призводных в контрольных точках. \en Get the array of second derivatives at the control points.
void GetVectorList( SArray<MbVector> & vectors ) const { vectors = vectorList; }
/// \ru Выдать вектор второй производной с индексов i. \en Get the vector of the second derivative with index i.
const MbVector & GetVectorList( size_t i ) const { return vectorList[i]; }
/// \ru Выдать вектор второй производной с индексов i. \en Get the vector of the second derivative with index i.
MbVector & SetVectorList( size_t i ) { return vectorList[i]; }
/// \ru Выдать вектор второй производной с индексов i. \en Get the vector of the second derivative with index i.
MbVector & SetVectorList( size_t i ) { return vectorList[i]; }
/// \ru Вернуть количество параметров в узлах. \en Get the number of parameters in knots.
ptrdiff_t GetTListCount() const { return tList.Count(); }
/// \ru Вернуть массив параметров в узлах. \en Get the array of parameters in knots.
/// \ru Вернуть количество параметров в узлах. \en Get the number of parameters in knots.
ptrdiff_t GetTListCount() const { return tList.Count(); }
/// \ru Вернуть массив параметров в узлах. \en Get the array of parameters in knots.
void GetTList( SArray<double> & params ) const override { params = tList; }
/// \ru Вернуть значение параметра для точки с индексом i. \en Get the value of parameter for the point with index i.
/// \ru Вернуть значение параметра для точки с индексом i. \en Get the value of parameter for the point with index i.
const double & GetTList( size_t i ) const { return tList[i]; }
/// \ru Вернуть число сегментов сплайна. \en Get the number of spline segments.
ptrdiff_t GetUppParam() const { return splinesCount; }
/// \ru Определение максимального индекса массива параметров слева. \en Determination of the maximum index of parameter array on the left.
ptrdiff_t GetIndex( double t ) const;
/// \ru Вернуть число сегментов сплайна. \en Get the number of spline segments.
ptrdiff_t GetUppParam() const { return splinesCount; }
/// \ru Определение максимального индекса массива параметров слева. \en Determination of the maximum index of parameter array on the left.
ptrdiff_t GetIndex( double t ) const;
/** \} */
private:
// \ru Найти узел в положительном направлении \en Find a knot in the positive direction
void AddKnot( ptrdiff_t &, double &, ptrdiff_t &, double &, ptrdiff_t &, double & ) const;
void CheckSpline(); // \ru Проверить корректность расчета сплайна \en Check correctness of the spline calculation
void operator = ( const MbCubicSpline & ); // \ru Не реализовано. \en Not implemented.
// \ru Найти узел в положительном направлении \en Find a knot in the positive direction
void AddKnot( ptrdiff_t &, double &, ptrdiff_t &, double &, ptrdiff_t &, double & ) const;
void CheckSpline(); // \ru Проверить корректность расчета сплайна \en Check correctness of the spline calculation
void operator = ( const MbCubicSpline & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCubicSpline )
};
IMPL_PERSISTENT_OPS( MbCubicSpline )
//------------------------------------------------------------------------------
/// \ru Используется в трехмерном кубическом сплайне \en It is used in the three-dimensional cubic spline
// ---
+38 -38
View File
@@ -228,23 +228,23 @@ public:
VISITING_CLASS( MbCubicSpline3D );
// \ru Инициализатор по точкам и признаку замкнутости \en Initializer by points and an attribute of closedness
bool Init( const SArray<MbCartPoint3D> &, bool cls, VERSION version = Math::DefaultMathVersion() );
bool Init( const SArray<MbCartPoint3D> &, bool cls, VERSION version = Math::DefaultMathVersion() );
// \ru Инициализатор по точкам вторым производным и признаку замкнутости \en Initializer by points, second derivatives and closedness attribute
bool Init( const SArray<MbCartPoint3D> &, const SArray<MbVector3D> &, bool cls, VERSION version = Math::DefaultMathVersion() );
bool Init( const SArray<MbCartPoint3D> &, const SArray<MbVector3D> &, bool cls, VERSION version = Math::DefaultMathVersion() );
// \ru Инициализатор по точкам параметрам и признаку замкнутости \en Initializer by points, parameters and an attribute of closedness
bool Init( const SArray<MbCartPoint3D> &, const SArray<double> &, bool );
bool Init( const SArray<MbCartPoint3D> &, const SArray<double> &, bool );
// \ru Инициализатор по точкам вторым производным параметрам и признаку замкнутости \en Initializer by points, second derivatives, parameters and an attribute of closedness
bool Init( const SArray<MbCartPoint3D> &, const SArray<MbVector3D> &,
bool Init( const SArray<MbCartPoint3D> &, const SArray<MbVector3D> &,
const SArray<double > &, bool );
// \ru Инициализация по точкам и краевым производным \en Initialization by points and boundary derivatives
bool Init( const SArray<MbCartPoint3D> &, const MbVector3D &, const MbVector3D &, bool, bool );
bool Init( const SArray<MbCartPoint3D> &, const MbVector3D &, const MbVector3D &, bool, bool );
// \ru Инициализация по точкам, параметрам и краевым производным \en Initialization by points, parameters and boundary derivatives
bool Init( const SArray<MbCartPoint3D> &, const SArray<double> &,
bool Init( const SArray<MbCartPoint3D> &, const SArray<double> &,
const MbVector3D &, const MbVector3D &, bool, bool );
bool Init( const MbCurve3D &, VERSION version ); // \ru Инициализатор по другой кривой \en Initializer by another curve
void InitC( const MbCubicSpline3D & ); // \ru Дублирующий инициализатор \en Duplicating initializer
bool Init( const MbCurve3D &, VERSION version ); // \ru Инициализатор по другой кривой \en Initializer by another curve
void InitC( const MbCubicSpline3D & ); // \ru Дублирующий инициализатор \en Duplicating initializer
// \ru Инициализатор по двумерному сплайну на плоскости \en Initializer by a two-dimensional spline on the plane
void Init( const MbCubicSpline &, const MbPlacement3D & );
void Init( const MbCubicSpline &, const MbPlacement3D & );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
MbSpaceItem & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Сделать копию элемента \en Create a copy of the element
@@ -269,9 +269,9 @@ public:
void ThirdDer ( double &, MbVector3D & ) const override; // \ru Третья производная \en Third derivative
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void FourDer( double &, MbVector3D & ) const; ///< \ru Оценить четвертую производную. \en Estimate the fourth derivative.
void FourDer( double &, MbVector3D & ) const; ///< \ru Оценить четвертую производную. \en Estimate the fourth derivative.
// \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
@@ -284,7 +284,7 @@ public:
bool IsDegenerate( double eps = METRIC_PRECISION ) const override;
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую \en Create the trimmed curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
bool IsPlanar ( double accuracy = METRIC_EPSILON ) const override; // \ru Является ли кривая плоской \en Whether a curve is planar
bool GetPlacement( MbPlacement3D & place, PlanarCheckParams params = PlanarCheckParams() ) const override; // \ru Заполнить плейсемент, ести кривая плоская \en Fill the placement if curve is planar
@@ -295,7 +295,7 @@ public:
double CalculateMetricLength() const override;
// \ru Сдвинуть параметр t на расстояние len. \en Move parameter t on the metric distance len.
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const override;
VERSION version = Math::DefaultMathVersion() ) const override;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
@@ -316,56 +316,56 @@ public:
double DeviationStep( double t, double angle ) const override;
// \ru Периодичность \en Periodicity
bool IsPointsPeriodic( ptrdiff_t & begPointNumber, // \ru Номер первой точки \en Number of the first point
ptrdiff_t & endPointNumber, // \ru Номер последней точки \en Number of the last point
ptrdiff_t & period ) const override; // \ru Количество точек в периоде \en The number of points in the period
ptrdiff_t & endPointNumber, // \ru Номер последней точки \en Number of the last point
ptrdiff_t & period ) const override; // \ru Количество точек в периоде \en The number of points in the period
void Delete(); // \ru Очистить данные \en Clear data
void Delete(); // \ru Очистить данные \en Clear data
// \ru Подготовить вычисление сплайна \en Prepare the calculation of the spline
void InitCreate( MbVector3D &, MbVector3D &, SArray <MbVector3D> &,
void InitCreate( MbVector3D &, MbVector3D &, SArray <MbVector3D> &,
double &, double &, double &, double &, bool black = false );
// \ru Решить систему методом исключения гауса \en Solve the system by Gaussian elimination method
// \ru Если кривая не замкнута и black = true система решается \en If a curve is non-closed and black is true then the system is solved
// \ru При условии отсутствия узла Де Бор К. "Практическое руководство по сплайнам" \en If knot is not (Carl de Boor - "A Practical Guide to Splines")
// \ru 1985, М.: Радио и связь, стр. 52. \en 2001, Springer 52.
void Create ( MbVector3D &, MbVector3D &, bool black = false );
void CreateEndS( MbVector3D &, MbVector3D & ) const;
void Create (); // \ru Построить сплайн \en Create a spline
void Create ( MbVector3D &, MbVector3D &, bool black = false );
void CreateEndS( MbVector3D &, MbVector3D & ) const;
void Create (); // \ru Построить сплайн \en Create a spline
void Create ( const MbVector3D &, const MbVector3D &, bool , bool );
void Create ( const MbVector3D &, const MbVector3D &, bool , bool );
// \ru Вычислить параметры сплайна \en Calculate parameters of the spline
void CreateVects( const MbVector3D & startS, bool startFirst,
void CreateVects( const MbVector3D & startS, bool startFirst,
const MbVector3D & endS, bool endFirst );
// \ru Установить область изменения параметра первый минимальный второй максимальный \en Set the range of the parameter: first minimum and second maximum
bool SetLimitParam( double, double );
bool ConvertToClosed(); // \ru Преобразовать в замкнутую кривую если кривая разомкнута \en Convert to a closed curve if the curve is open
bool SetLimitParam( double, double );
bool ConvertToClosed(); // \ru Преобразовать в замкнутую кривую если кривая разомкнута \en Convert to a closed curve if the curve is open
// \ru Но концы кривой гладко стыкуются \en But the ends of the curve are connected smoothly
double StepD( double t, double sag, bool bfirst, double angle = Math::lowRenderAng ) const; // \ru Вычисление шага аппроксимации \en Calculation of approximation step
double StepD( double t, double sag, bool bfirst, double angle = Math::lowRenderAng ) const; // \ru Вычисление шага аппроксимации \en Calculation of approximation step
ptrdiff_t GetVectorListCount() const { return (ptrdiff_t)vectorList.Count(); }
void GetVectorList( SArray<MbVector3D> & vectors ) const { vectors = vectorList; } ///< \ru Вторые призводные в хар. точках \en Second derivatives at control points.
ptrdiff_t GetVectorListCount() const { return (ptrdiff_t)vectorList.Count(); }
void GetVectorList( SArray<MbVector3D> & vectors ) const { vectors = vectorList; } ///< \ru Вторые призводные в хар. точках \en Second derivatives at control points.
const MbVector3D & GetVectorList( size_t i ) const { return vectorList[i]; } // \ru Вторые призводные в характеристических точках \en Second derivatives at control points.
MbVector3D & SetVectorList( size_t i ) { return vectorList[i]; } // \ru Вторые призводные в характеристических точках \en Second derivatives at control points.
ptrdiff_t GetTListCount() const { return tList.Count(); } ///< \ru Количество параметров в узлах \en The number of parameters in knots.
void GetTList( SArray<double> & params ) const { params = tList; } ///< \ru Параметры в узлах \en Parameters in knots
ptrdiff_t GetTListCount() const { return tList.Count(); } ///< \ru Количество параметров в узлах \en The number of parameters in knots.
void GetTList( SArray<double> & params ) const { params = tList; } ///< \ru Параметры в узлах \en Parameters in knots
const double & GetTList( size_t i ) const { return tList[i]; }
ptrdiff_t GetUppParam() const { return splinesCount; } ///< \ru число сегментов \en The number of segments
ptrdiff_t GetUppParam() const { return splinesCount; } ///< \ru число сегментов \en The number of segments
private:
// \ru Усечь кривую с разрывом \en Trim a curve with a break
MbCurve3D * TrimmedBreak( double t1, double t2, int sense ) 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
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCubicSpline3D & );
// \ru Усечь кривую с разрывом \en Trim a curve with a break
MbCurve3D * TrimmedBreak( double t1, double t2, int sense ) 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
// \ru Объявление оператора присваивания без реализации, чтобы не было присваивания по умолчанию. \en The declaration of the assignment operator without implementation to prevent an assignment by default.
void operator = ( const MbCubicSpline3D & );
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCubicSpline3D )
};
IMPL_PERSISTENT_OPS( MbCubicSpline3D )
#endif // __CUR_CUBIC_SPLINE3D_H
+9 -8
View File
@@ -81,9 +81,9 @@ public:
VISITING_CLASS( MbCurveSpiral );
/// \ru Инициализация спирали по спирали. \en Spiral initialization by spiral.
void Init( const MbCurveSpiral & );
void Init( const MbCurveSpiral & );
/// \ru Инициализация спирали по основанию (локальной системе координат). \en Spiral initialization by base (local coordinate system).
void Init( const MbPlacement3D & );
void Init( const MbPlacement3D & );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
@@ -110,7 +110,7 @@ public:
void _ThirdDer ( double t, MbVector3D & td ) const override; // \ru Третья производная по t \en Third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
@@ -122,17 +122,18 @@ public:
double GetSpiralRadius ( double t ) const override; // \ru Выдать физический радиус спирали \en Get physical radius of spiral
protected:
void Init( bool setLimits );
double GetRadiusValue( double t, double & r0, MbVector & derive ) const; // \ru Выдать радиус спирали \en Get the spiral radius
void GetRadiusDerivative( MbVector & derive, double & r1 ) const; // \ru Выдать первую производную радиуса \en Get the first derivative of the radius
void GetRadiusDerivatives( double wPar, MbVector & derive, double & r1, double & r2, double & r3 ) const; // \ru Выдать первую, вторую и третью производные радиуса \en Get the first, second and third derivatives of the radius
void Init( bool setLimits );
double GetRadiusValue( double t, double & r0, MbVector & derive ) const; // \ru Выдать радиус спирали \en Get the spiral radius
void GetRadiusDerivative( MbVector & derive, double & r1 ) const; // \ru Выдать первую производную радиуса \en Get the first derivative of the radius
void GetRadiusDerivatives( double wPar, MbVector & derive, double & r1, double & r2, double & r3 ) const; // \ru Выдать первую, вторую и третью производные радиуса \en Get the first, second and third derivatives of the radius
private:
void operator = ( const MbCurveSpiral & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbCurveSpiral & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbCurveSpiral )
}; // MbCurveSpiral
IMPL_PERSISTENT_OPS( MbCurveSpiral )
#endif // __CUC_CURVE_SPIRAL_H
+59 -61
View File
@@ -190,26 +190,26 @@ public :
public :
VISITING_CLASS( MbHermit );
// \ru Установить параметры сплайна \en Set parameters of spline
bool Init( const SArray<MbCartPoint> & initPoints, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints,
const SArray<MbVector> & initVectors, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints,
const SArray<ptrdiff_t> & vLabels, bool cls );
void Init( const MbHermit & init );
void Init( double t1, const MbCartPoint & p1, const MbVector & v1,
double t2, const MbCartPoint & p2, const MbVector & v2 );
bool Init( double t1, double t2 );
// \ru Установить параметры сплайна \en Set parameters of spline
bool Init( const SArray<MbCartPoint> & initPoints, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints,
const SArray<MbVector> & initVectors, bool cls );
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint> & initPoints,
const SArray<ptrdiff_t> & vLabels, bool cls );
void Init( const MbHermit & init );
void Init( double t1, const MbCartPoint & p1, const MbVector & v1,
double t2, const MbCartPoint & p2, const MbVector & v2 );
bool Init( double t1, double t2 );
/** \ru \name Общие функции геометрического объекта.
\en \name Common functions of geometric object.
\{ */
MbePlaneType IsA() const override; // \ru Тип элемента \en Type of element
MbePlaneType IsA() const override; // \ru Тип элемента \en Type of element
bool SetEqual( const MbPlaneItem & ) override; // \ru Сделать элементы равными \en Make the elements equal
void Transform( const MbMatrix & matr, MbRegTransform * ireg = nullptr, const MbSurface * newSurface = nullptr ) override; // \ru Преобразовать элемент согласно матрице \en Transform element according to the matrix
void Move( const MbVector & to, MbRegTransform * = nullptr, const MbSurface * newSurface = nullptr ) override; // \ru Сдвиг \en Translation
@@ -244,7 +244,7 @@ public :
void _PointOn ( double t, MbCartPoint & p ) const override;
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of approximation step with consideration of curvature radius
@@ -254,17 +254,16 @@ public :
double PointProjection( const MbCartPoint & pnt ) const override; // \ru Проекция точки на кривую \en Point projection on the curve
bool NearPointProjection( const MbCartPoint & pnt, 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; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину разомкнутой \en Calculate the open metric length
bool GetWeightCentre( MbCartPoint & wc ) const override; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve
void CalculateGabarit( MbRect & r ) const override; // \ru Определить габариты \en Calculate bounding box
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
VERSION version = Math::DefaultMathVersion() ) const override;
/// \ru Получить границы участков кривой, которые описываются одной аналитической функцией.
/// \en Get the boundaries of the curve sections that are described by one analytical function. \~
void GetAnalyticalFunctionsBounds( std::vector<double> & params ) const override;
bool IsStraight( bool ignoreParams = false ) const override; // \ru Признак прямолинейности кривой \en An attribute of curve straightness
size_t GetCount() const override;
@@ -281,10 +280,10 @@ public :
virtual void SetCurveValue( double t, const MbCartPoint & pnt, double tDelta, const MbVector & v, double xEps, double yEps ); // \ru Установить точку и производную на участке. \en Set a point and derivetive at region.
void ChangePoint( ptrdiff_t index, const MbCartPoint & pnt ) override; // \ru Заменить точку \en Replace a point
void RemovePoint( ptrdiff_t index ) override; // \ru Удалить точку \en Remove a point
void GetVector( ptrdiff_t index, MbVector & vec ) const;
MbCartPoint & SetPoint( ptrdiff_t index );
MbVector & SetVector ( ptrdiff_t index );
bool SetTangentVectors( const SArray<MbVector> & tauVectors ); // \ru vectorList[i] сделать параллельными tauVectors[i] \en Make vectorList[i] parallel to tauVectors[i]
void GetVector( ptrdiff_t index, MbVector & vec ) const;
MbCartPoint & SetPoint( ptrdiff_t index );
MbVector & SetVector ( ptrdiff_t index );
bool SetTangentVectors( const SArray<MbVector> & tauVectors ); // \ru vectorList[i] сделать параллельными tauVectors[i] \en Make vectorList[i] parallel to tauVectors[i]
size_t GetPointsCount() const override; // \ru Выдать количество точек \en Get the number of points
size_t GetParamsCount() const override; // \ru Выдать количество параметров \en Get the number of parameters.
bool CheckParam ( double & t, ptrdiff_t & i0, ptrdiff_t & i1, double & t0, double & t1 ) const override; // \ru Установить параметр \en Set parameter
@@ -297,56 +296,55 @@ public :
void SetBegEndDerivesEqual() override; // \ru Установить равные производные на краях \en Set equal derivatives at the edges
void ClosedBreak() override; // \ru Сделать незамкнутой, оставив совпадающими начало и конец \en Make unclosed, leave coinciding start and end
bool SetLimitParam( double newTMin, double newTMax ); // \ru Установить область изменения параметра \en Set range of parameter
void CalculateDerivatives();
void SetLimitVector( int n, const MbVector & v );
/// \ru Создать кривую путём сращивания части данной кривой с частью кривой init. \en Create a curve by joining a part of this curve with a part of "init" curve.
MbHermit * CurvesCombine( double t0, double w0, bool add,
const MbHermit & init, double t1, double w1, double koef, bool checkClosed ) const;
bool SetLimitParam( double newTMin, double newTMax ); // \ru Установить область изменения параметра \en Set range of parameter
void CalculateDerivatives();
void SetLimitVector( int n, const MbVector & v );
/// \ru Создать кривую путём сращивания части данной кривой с частью кривой init. \en Create a curve by joining a part of this curve with a part of "init" curve.
MbHermit * CurvesCombine( double t0, double w0, bool add,
const MbHermit & init, double t1, double w1, double koef, bool checkClosed ) const;
size_t GetVectorListCount() const { return vectorList.Count(); }
size_t GetVectorListCount() const { return vectorList.Count(); }
template <class VectorsVector>
void GetVectorList( VectorsVector & vectors ) const { vectors.assign( vectorList.begin(), vectorList.end() ); }
template <class VectorsVector>
void GetVectorList( VectorsVector & vectors ) const { vectors.assign( vectorList.begin(), vectorList.end() ); }
const MbVector & _GetVectorList( size_t i ) const { return vectorList[i]; }
MbVector & _SetVectorList( size_t i ) { MbPolyCurve::Refresh(); return vectorList[i]; }
const MbVector & _GetVectorList( size_t i ) const { return vectorList[i]; }
MbVector & _SetVectorList( size_t i ) { MbPolyCurve::Refresh(); return vectorList[i]; }
size_t GetTListCount() const { return tList.Count(); }
size_t GetTListCount() const { return tList.Count(); }
void GetTList( SArray<double> & params ) const override { params = tList; }
double _GetTList( size_t i ) const { return tList[i]; }
double _GetTList( size_t i ) const { return tList[i]; }
// \ru Добавить точки и параметры в конец кривой в заданной последовательности. \en Parameters and points add to end successively.
bool AddPoints( SArray<double> & params, SArray<MbCartPoint> & points );
// \ru Вставить точки и параметры в перед кривой в заданной последовательности. \en Parameters and points insetr to beg successively.
bool InsertPoints( SArray<double> & params, SArray<MbCartPoint> & points );
// \ru Добавить точки и параметры в конец кривой в заданной последовательности. \en Parameters and points add to end successively.
bool AddPoints( SArray<double> & params, SArray<MbCartPoint> & points );
// \ru Вставить точки и параметры в перед кривой в заданной последовательности. \en Parameters and points insetr to beg successively.
bool InsertPoints( SArray<double> & params, SArray<MbCartPoint> & points );
// \ru При линейном расположении нескольких точек согласовать производные на краях участка. \en Aligning the derivatives on the group if several points are located linearly.
bool DerivativesCorrection( double accuracy );
// \ru При линейном расположении нескольких точек согласовать производные на краях участка. \en Aligning the derivatives on the group if several points are located linearly.
bool DerivativesCorrection( double accuracy );
/// \ru Определение максимального индекса массива параметров слева. \en Determination of the maximum index of parameter array on the left.
ptrdiff_t GetIndex( double t ) const;
/// \ru Определение максимального индекса массива параметров слева. \en Determination of the maximum index of parameter array on the left.
ptrdiff_t GetIndex( double t ) const;
void GetProperties( MbProperties & properties ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & properties ) override; // \ru Записать свойства объекта \en Set properties of the object
/** \} */
void LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const;
void LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const;
private:
bool Break( MbHermit & trimPart, double t1, double t2 ) 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.
/// \ru Найти параметры пересечение сплайна с прямой x = val или y=val.
/// \ ru Find the parameters of the intersection of the spline with the line x = val or y = val.
void HorVertRoots( bool isVert, double val, SArray<double> & params ) const;
bool Break( MbHermit & trimPart, double t1, double t2 ) 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.
// \ru Найти параметры пересечение сплайна с прямой x = val или y=val. \ ru Find the parameters of the intersection of the spline with the line x = val or y = val.
void HorVertRoots( bool isVert, double val, SArray<double> & params ) const;
void operator = ( const MbHermit & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbHermit & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbHermit )
};
@@ -358,10 +356,10 @@ IMPL_PERSISTENT_OPS( MbHermit )
/// \ru Определение местных координат области поверхности \en Definition of local coordinates in a surface region
// ---
inline void MbHermit::LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const
{
#define EPS_NULL(a,epsilon) ((a) < epsilon && (a) > -epsilon) // проверка значения в epsilon-окрестности нуля без вызова функции ::fabs
+47 -47
View File
@@ -187,26 +187,26 @@ public:
public :
VISITING_CLASS( MbHermit3D );
/// \ru Установить параметры сплайна по точкам и флагу замкнутости. \en Set parameters of spline by points and closeness flag.
bool Init( const SArray<MbCartPoint3D> & initPoints, bool cls );
/// \ru Установить параметры сплайна по параметрам, точкам и флагу замкнутости. \en Set parameters of spline by parameters, points and closeness flag.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints, bool cls );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints,
const SArray<MbVector3D> & initVectors, bool cls );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints,
const SArray<int> & vLabels, bool cls );
/// \ru Установить параметры сплайна по другому сплайну Эрмита. \en Set parameters of spline by another spline of Hermit.
void Init( const MbHermit3D & );
/// \ru Установить параметры сплайна по двумерному сплайну Эрмита. \en Set parameters of spline by two-dimensional spline of Hermit.
void Init( const MbHermit &, const MbPlacement3D & );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
void Init( double t1, const MbCartPoint3D & p1, const MbVector3D & v1,
double t2, const MbCartPoint3D & p2, const MbVector3D & v2 );
/// \ru Установить параметры сплайна по точкам и флагу замкнутости. \en Set parameters of spline by points and closeness flag.
bool Init( const SArray<MbCartPoint3D> & initPoints, bool cls );
/// \ru Установить параметры сплайна по параметрам, точкам и флагу замкнутости. \en Set parameters of spline by parameters, points and closeness flag.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints, bool cls );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints,
const SArray<MbVector3D> & initVectors, bool cls );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
bool Init( const SArray<double> & initParams,
const SArray<MbCartPoint3D> & initPoints,
const SArray<int> & vLabels, bool cls );
/// \ru Установить параметры сплайна по другому сплайну Эрмита. \en Set parameters of spline by another spline of Hermit.
void Init( const MbHermit3D & );
/// \ru Установить параметры сплайна по двумерному сплайну Эрмита. \en Set parameters of spline by two-dimensional spline of Hermit.
void Init( const MbHermit &, const MbPlacement3D & );
/// \ru Установить параметры сплайна. \en Set parameters of spline.
void Init( double t1, const MbCartPoint3D & p1, const MbVector3D & v1,
double t2, const MbCartPoint3D & p2, const MbVector3D & v2 );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
@@ -234,7 +234,7 @@ public :
void _PointOn ( double t, MbCartPoint3D &p ) const override;
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step ( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculation of approximation step
@@ -267,8 +267,8 @@ public :
virtual void SetCurveValue( double t, const MbCartPoint3D & pnt, double tDelta, const MbVector3D & der, double metrEps ); // \ru Установить точку и производную на участке. \en Set a point and derivetive at region.
void RemovePoint( ptrdiff_t index ) override; // \ru Удалить точку \en Remove a point
bool ChangePoint( ptrdiff_t index, const MbCartPoint3D & pnt ) override; // \ru Заменить точку \en Replace a point
void GetVector ( ptrdiff_t index, MbVector3D & vec ) const;
bool SetTangentVectors( const SArray<MbVector3D> & tauVectors ); // \ru vectorList[i] сделать параллельными tauVectors[i] \en Make vectorList[i] parallel to tauVectors[i]
void GetVector ( ptrdiff_t index, MbVector3D & vec ) const;
bool SetTangentVectors( const SArray<MbVector3D> & tauVectors ); // \ru vectorList[i] сделать параллельными tauVectors[i] \en Make vectorList[i] parallel to tauVectors[i]
size_t GetPointsCount() const override; // \ru Выдать количество точек \en Get the number of points
void GetRuleInterval( ptrdiff_t index, double & t1, double & t2 ) const override; // \ru Выдать интервал влияния точки \en Get the interval of point influence
ptrdiff_t GetNearPointIndex( const MbCartPoint3D & pnt ) const override; // \ru Выдать индекс точки, ближайшей к заданной \en Get the point index which is nearest to the given
@@ -280,46 +280,46 @@ public :
void GetWeightCentre( MbCartPoint3D &wc ) const override; // \ru Посчитать центр тяжести кривой \en Calculate the gravity center of the curve
void CalculateGabarit( MbCube & gab ) const override; // \ru Вычислить габарит кривой \en Calculate the bounding box of curve
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
VERSION version = Math::DefaultMathVersion() ) const override; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
VERSION version = Math::DefaultMathVersion() ) const override; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
// \ru Функции только 3D кривой \en Function for 3D-curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override; // \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
size_t GetCount() const override;
// \ru Установить область изменения параметра. \en Set range of parameter.
bool SetLimitParam( double newTMin, double newTMax );
void CalculateDerivatives();
void SetLimitVector( ptrdiff_t n, const MbVector3D & v );
bool SetLimitParam( double newTMin, double newTMax );
void CalculateDerivatives();
void SetLimitVector( ptrdiff_t n, const MbVector3D & v );
size_t GetVectorListCount() const { return vectorList.size(); }
size_t GetVectorListCount() const { return vectorList.size(); }
template <class VectorsVector>
void GetVectorList( VectorsVector & vectors ) const { vectors.assign( vectorList.begin(), vectorList.end() ); }
void GetVectorList( VectorsVector & vectors ) const { vectors.assign( vectorList.begin(), vectorList.end() ); }
const MbVector3D & _GetVectorList( size_t i ) const { return vectorList[i]; }
MbVector3D & _SetVectorList( size_t i ) { MbPolyCurve3D::Refresh(); return vectorList[i]; }
size_t GetTListCount() const { return tList.size(); }
void GetTList( SArray<double> & params ) const { params = tList; }
size_t GetTListCount() const { return tList.size(); }
void GetTList( SArray<double> & params ) const { params = tList; }
double _GetTList( size_t i ) const { return tList[i]; }
void LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const;
ptrdiff_t GetIndex( double t ) const;
void LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const;
ptrdiff_t GetIndex( double t ) const;
// \ru При линейном расположении нескольких точек согласовать производные на краях участка. \en Aligning the derivatives on the group if several points are located linearly.
bool DerivativesCorrection( double accuracy );
bool DerivativesCorrection( double accuracy );
private:
bool Break( MbHermit3D & trimPart, double t1, double t2 ) 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.
bool Break( MbHermit3D & trimPart, double t1, double t2 ) 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.
void operator = ( const MbHermit3D & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbHermit3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbHermit3D )
};
@@ -331,10 +331,10 @@ IMPL_PERSISTENT_OPS( MbHermit3D )
// \ru Определение местных координат области поверхности \en Definition of local coordinates in a surface region
// ---
inline void MbHermit3D::LocalCoordinate( double & t,
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const
ptrdiff_t & index1, ptrdiff_t & index2,
double & param1, double & param2,
double & paramD, double & paramW,
double & quota1, double & quota2 ) const
{
double tmin = tList[0];
double tmax = tList[splinesCount];
+45 -37
View File
@@ -56,12 +56,12 @@ public :
\en \name Line initialization functions.
\{ */
// \ru Различные варианты инициализации прямой \en Different variants for the initialization of line
void Init( const MbLine & other ) { origin = other.origin; direction = other.direction; }
void Init( const MbCartPoint & pnt, double angle ) { origin = pnt; direction = angle; }
void Init( const MbCartPoint & pnt, const MbDirection & dir ) { origin = pnt; direction = dir; }
void Init( const MbCartPoint & pnt, const MbVector & dir ) { origin = pnt; direction = dir; }
void Init( const MbCartPoint & p1, const MbCartPoint & p2 ) { origin = p1; direction.Calculate( p1, p2 ); }
void Init( double a, double b, double c ); // \ru Инициализация прямой по коэффициентам \en Initialization of a line by coefficients
void Init( const MbLine & other ) { origin = other.origin; direction = other.direction; }
void Init( const MbCartPoint & pnt, double angle ) { origin = pnt; direction = angle; }
void Init( const MbCartPoint & pnt, const MbDirection & dir ) { origin = pnt; direction = dir; }
void Init( const MbCartPoint & pnt, const MbVector & dir ) { origin = pnt; direction = dir; }
void Init( const MbCartPoint & p1, const MbCartPoint & p2 ) { origin = p1; direction.Calculate( p1, p2 ); }
void Init( double a, double b, double c ); // \ru Инициализация прямой по коэффициентам \en Initialization of a line by coefficients
/** \} */
/** \ru \name Общие функции геометрического объекта.
@@ -129,7 +129,7 @@ public :
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
/** \} */
/** \ru \name Общие функции кривой
@@ -152,36 +152,36 @@ public :
MbCartPoint * pc = nullptr ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
VERSION version = Math::DefaultMathVersion() ) const override; // \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculation of approximation step
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага аппроксимации с учетом угла отклонения \en Calculation of approximation step with consideration of deviation angle
double DistanceToPointSign( const MbCartPoint & to ) const; // \ru Расстояние от прямой до точки со знаком \en Signed distance from the line to the point
double DistanceToPointSign( const MbCartPoint & to ) const; // \ru Расстояние от прямой до точки со знаком \en Signed distance from the line to the point
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
// \ru iloc_InItem = 1 - точка находится слева от прямой, \en Iloc_InItem = 1 - point is located to the left of the line,
// \ru iloc_OnItem = 0 - точка находится на прямой, \en Iloc_OnItem = 0 - point is located on the line,
// \ru iloc_OutOfItem = -1 - точка находится справа от прямой. \en Iloc_OutOfItem = -1 - point is located to the right of the line.
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
// \ru iloc_InItem = 1 - точка находится слева от прямой, \en Iloc_InItem = 1 - point is located to the left of the line,
// \ru iloc_OnItem = 0 - точка находится на прямой, \en Iloc_OnItem = 0 - point is located on the line,
// \ru iloc_OutOfItem = -1 - точка находится справа от прямой. \en Iloc_OutOfItem = -1 - point is located to the right of the line.
MbeItemLocation PointRelative ( const MbCartPoint & p, double eps = Math::LengthEps ) const override;
double PointProjection ( const MbCartPoint & ) const override; // \ru Проекция точки на кривую \en Point projection on the curve
bool NearPointProjection( const MbCartPoint & pnt, 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
// \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point
double & t, bool ext, MbRect1D * tRange = nullptr ) const override; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
// \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point
void PerpendicularPoint( const MbCartPoint & pnt, SArray<double> & tFind ) const override;
bool GetMiddlePoint ( MbCartPoint & ) const override; // \ru Выдать среднюю точку кривой \en Calculate a middle point on a curve
bool GetWeightCentre( MbCartPoint & ) const override; // \ru Выдать центр прямой \en Get the center of line
bool operator == ( const MbLine & ) const; // \ru Проверка на равенство \en Check for equality
bool operator != ( const MbLine & ) const; // \ru Проверка на неравенство \en Check for inequality
bool operator == ( const MbLine & ) const; // \ru Проверка на равенство \en Check for equality
bool operator != ( const MbLine & ) const; // \ru Проверка на неравенство \en Check for inequality
bool IsHorizontal( double eps = Math::AngleEps ) const { return ::fabs( direction.ay ) < eps; } // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::AngleEps ) const { return ::fabs( direction.ax ) < eps; } // \ru Проверка вертикальности \en Check for verticality
bool IsHorizontal( double eps = Math::AngleEps ) const { return ::fabs( direction.ay ) < eps; } // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::AngleEps ) const { return ::fabs( direction.ax ) < eps; } // \ru Проверка вертикальности \en Check for verticality
bool IsSimilar ( const MbLine & ) const; // \ru Проверка одинаковости двух прямых \en Check for sameness of two lines
bool IsParallel( const MbLine & other, double epsilon = Math::AngleEps ) const; // \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
double DistanceToParallel( const MbLine & ) const; // \ru Расстояние до параллельной прямой \en The distance to the parallel line
bool IsSimilar ( const MbLine & ) const; // \ru Проверка одинаковости двух прямых \en Check for sameness of two lines
bool IsParallel( const MbLine & other, double epsilon = Math::AngleEps ) const; // \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
double DistanceToParallel( const MbLine & ) const; // \ru Расстояние до параллельной прямой \en The distance to the parallel line
void IntersectHorizontal( double y, SArray<double> & cross ) const override; // \ru Пересечение с горизонтальной прямой \en Intersection with the horizontal line
void IntersectVertical ( double x, SArray<double> & cross ) const override; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line
@@ -195,31 +195,31 @@ public :
double GetParamToUnit() const override;
double GetParamToUnit( double t ) const override;
void SetPoint( const MbCartPoint & pnt ) { origin = pnt; } // \ru Установить новую базовую точку \en Set the new base point
void GetPoint( MbCartPoint & pnt ) const { pnt = origin; } // \ru Выдать базовую точку \en Get the base point
void GetDirection( MbDirection & dir ) const { dir = direction; } // \ru Выдать вектор наклона прямой \en Get the vector of a line inclination
void SetDirection( const MbDirection & dir ) { direction = dir; } // \ru Установить вектор наклона прямой \en Set the vector of a line inclination
void SetDirection( const MbVector & v ) { direction = v; }
void SetPoint( const MbCartPoint & pnt ) { origin = pnt; } // \ru Установить новую базовую точку \en Set the new base point
void GetPoint( MbCartPoint & pnt ) const { pnt = origin; } // \ru Выдать базовую точку \en Get the base point
void GetDirection( MbDirection & dir ) const { dir = direction; } // \ru Выдать вектор наклона прямой \en Get the vector of a line inclination
void SetDirection( const MbDirection & dir ) { direction = dir; } // \ru Установить вектор наклона прямой \en Set the vector of a line inclination
void SetDirection( const MbVector & v ) { direction = v; }
void SetAngle( double angle ) { direction = angle; } // \ru Установить новый угол \en Set the new angle
double GetAngle() const { return direction.DirectionAngle(); } // \ru Выдать значение угла наклона \en Get the value of an angle inclination
void SetAngle( double angle ) { direction = angle; } // \ru Установить новый угол \en Set the new angle
double GetAngle() const { return direction.DirectionAngle(); } // \ru Выдать значение угла наклона \en Get the value of an angle inclination
// \ru Создать NURBS представление кривой \en Create a NURBS representation of the curve
// \ru Создать NURBS представление кривой \en Create a NURBS representation of the curve
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
MbContour * NurbsContour() const override;
size_t GetCount() const override; // \ru Количество разбиений для прохода в операциях \en The number of partitions for passage in the operations
ptrdiff_t IntersectRect( MbRect & rect, MbCartPoint * cross ) const; // \ru Пересечение прямой с прямоугольником \en Intersection of a line with rectangle
void Implicit( double & A, double & B, double & C ) const; // \ru Выдать коэффициенты неявного представления \en Get coefficients of implicit representation
ptrdiff_t IntersectRect( MbRect & rect, MbCartPoint * cross ) const; // \ru Пересечение прямой с прямоугольником \en Intersection of a line with rectangle
void Implicit( double & A, double & B, double & C ) const; // \ru Выдать коэффициенты неявного представления \en Get coefficients of implicit representation
const MbCartPoint & GetOrigin() const { return origin; }
const MbDirection & GetDirection() const { return direction; }
MbCartPoint & SetOrigin() { return origin; }
MbDirection & SetDirection() { return direction; }
MbCartPoint & SetOrigin() { return origin; }
MbDirection & SetDirection() { return direction; }
MbCartPoint Origin() const { MbCartPoint p( origin ); return p; }
MbVector Derive() const { MbVector v( direction.ax, direction.ay ); return v; }
MbCartPoint Origin() const { MbCartPoint p( origin ); return p; }
MbVector Derive() const { MbVector v( direction.ax, direction.ay ); return v; }
void GetProperties( MbProperties & ) override; // \ru Выдать свойства объекта \en Get properties of the object
void SetProperties( const MbProperties & ) override; // \ru Записать свойства объекта \en Set properties of the object
@@ -229,13 +229,15 @@ public :
/** \} */
private:
void operator = ( const MbLine & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbLine & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbLine )
}; // MbLine
IMPL_PERSISTENT_OPS( MbLine )
//------------------------------------------------------------------------------
// \ru Расстояние от прямой до точки со знаком \en Signed distance from the line to the point
// ---
@@ -243,6 +245,7 @@ inline double MbLine::DistanceToPointSign( const MbCartPoint & to ) const {
return direction.ax * ( to.y - origin.y ) - direction.ay * ( to.x - origin.x );
}
//------------------------------------------------------------------------------
// \ru Проверка на равенство \en Check for equality
// ---
@@ -250,6 +253,7 @@ inline bool MbLine::operator == ( const MbLine & with ) const {
return (origin == with.origin) && ( direction.Colinear( with.direction ) );
}
//------------------------------------------------------------------------------
// \ru Проверка на неравенство \en Check for inequality
// ---
@@ -257,6 +261,7 @@ inline bool MbLine::operator != ( const MbLine & with ) const {
return !(*this == with);
}
//------------------------------------------------------------------------------
// \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
// ---
@@ -265,6 +270,7 @@ inline bool MbLine::IsParallel( const MbLine & other, double epsilon ) const {
direction.ax * other.direction.ay ) < epsilon;
}
//------------------------------------------------------------------------------
// \ru Проверка одинаковости двух прямых \en Check for sameness of two lines
// ---
@@ -272,6 +278,7 @@ inline bool MbLine::IsSimilar( const MbLine & other ) const {
return IsParallel( other ) && fabs( DistanceToPointSign( other.origin ) ) < Math::LengthEps;
}
//------------------------------------------------------------------------------
// \ru Расстояние до параллельной прямой \en The distance to the parallel line
// ---
@@ -279,6 +286,7 @@ inline double MbLine::DistanceToParallel( const MbLine & to ) const {
return DistanceToPoint( to.origin );
}
//------------------------------------------------------------------------------
// \ru Выдать коеффициенты неявного представления \en Get coefficients of implicit representation
// ---
+16 -15
View File
@@ -48,10 +48,10 @@ public :
public :
VISITING_CLASS( MbLine3D );
void Init( const MbLine3D & init );
void Init( const MbCartPoint3D & p0, const MbVector3D & dir );
void Init( const MbCartPoint3D & p1, const MbCartPoint3D & p2 );
void Init( const MbPlacement3D & pos, const MbLine & line );
void Init( const MbLine3D & init );
void Init( const MbCartPoint3D & p0, const MbVector3D & dir );
void Init( const MbCartPoint3D & p1, const MbCartPoint3D & p2 );
void Init( const MbPlacement3D & pos, const MbLine & line );
// \ru Общие функции математического объекта \en Common functions of the mathematical object
@@ -87,7 +87,7 @@ public :
void _ThirdDer ( double t, MbVector3D & ) const override; // \ru Третья производная по t \en Third derivative with respect to t
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
// \ru Построить NURBS копию кривой \en Create a NURBS copy of the curve
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
@@ -112,8 +112,8 @@ public :
// \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override;
bool operator == ( const MbLine3D & with ) const; // \ru Проверка на равенство \en Check for equality
bool operator != ( const MbLine3D & with ) const; // \ru Проверка на неравенство \en Check for inequality
bool operator == ( const MbLine3D & with ) const; // \ru Проверка на равенство \en Check for equality
bool operator != ( const MbLine3D & with ) const; // \ru Проверка на неравенство \en Check for inequality
void GetCentre ( MbCartPoint3D & c ) const override; // \ru Выдать центр кривой \en Get the center of curve
void GetWeightCentre( MbCartPoint3D & wc ) const override; // \ru Выдать центр тяжести кривой \en Get the center of gravity of the curve
@@ -125,9 +125,9 @@ public :
// \ru Дать плоскую проекцию кривой \en Get a planar projection of curve
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
MbCurve * GetMapPsp( const MbMatrix3D &, double zNear,
MbRect1D * pRgn = nullptr ) const override;
MbRect1D * pRgn = nullptr ) const override;
void CalculatePolygon( const MbStepData & stepData, MbPolygon3D & ) const override; // \ru pассчитать полигон \en Calculate a polygon
bool IsSimilarToCurve( const MbCurve3D & curve, double precision = METRIC_PRECISION ) const override; // \ru Подобные ли кривые для объединения (слива) \en Whether the curves for union (joining) are similar
@@ -135,20 +135,21 @@ public :
const MbVector3D & GetDirection() const { return direction;}
MbCartPoint3D & SetOrigin() { return origin; }
MbVector3D & SetDirection() { return direction;}
void SetOrigin( const MbCartPoint3D & p ) { origin = p; }
void SetDirection( const MbVector3D & v ) { direction = v; }
bool RoundColinear ( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Грубая коллинеарность \en Rough collinearity
bool Colinear ( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Коллинеарность \en Collinearity
bool Orthogonal( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Ортогональность \en Orthogonality
void SetOrigin( const MbCartPoint3D & p ) { origin = p; }
void SetDirection( const MbVector3D & v ) { direction = v; }
bool RoundColinear ( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Грубая коллинеарность \en Rough collinearity
bool Colinear ( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Коллинеарность \en Collinearity
bool Orthogonal( const MbLine3D & with, double eps = Math::angleRegion ) const; // \ru Ортогональность \en Orthogonality
private:
void operator = ( const MbLine3D & ); // \ru Не реализовано. \en Not implemented.
void operator = ( const MbLine3D & ); // \ru Не реализовано. \en Not implemented.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbLine3D )
};
IMPL_PERSISTENT_OPS( MbLine3D )
//------------------------------------------------------------------------------
// \ru Проверка на равенство \en Check for equality
// ---
+61 -51
View File
@@ -57,27 +57,27 @@ public :
public :
VISITING_CLASS( MbLineSegment );
/** \ru \name Функции инициализации отрезка.
\en \name Line segment initialization functions.
/** \ru \name Функции инициализации отрезка.
\en \name Line segment initialization functions.
\{ */
// \ru Установить параметры отрезка \en Set the parameters of line segment
void Init( const MbLineSegment & );
void Init( const MbCartPoint &p1, const MbCartPoint &p2 );
void Init( const MbCartPoint &pnt, double x1, double x2 );
void Init( double t1, double t2 );
void Init1( const MbCartPoint &p1, const MbCartPoint &p2, double &len, double &angle );
void Init2( const MbCartPoint &p1, MbCartPoint &p2, const double &len, double &angle );
void Init3( const MbCartPoint &p1, MbCartPoint &p2, double &len, const double &angle,
const DiskreteLengthData * diskrData = nullptr );
void Init4( MbCartPoint &p1, const MbCartPoint &p2, const double &len, double &angle );
void Init5( MbCartPoint &p1, const MbCartPoint &p2, double &len, const double &angle,
const DiskreteLengthData * diskrData = nullptr );
void Init6( const MbCartPoint &p1, MbCartPoint &p2, const double &len, const double &angle );
void Init7( MbCartPoint &p1, const MbCartPoint &p2, const double &len, const double &angle );
void Init8( MbCartPoint &p1, MbCartPoint &p2, double &len, double &angle,
const DiskreteLengthData & diskrData, bool correctP1 );
void Init9( const MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle,
const DiskreteLengthData & diskrData, bool keepX );
// \ru Установить параметры отрезка \en Set the parameters of line segment
void Init( const MbLineSegment & );
void Init( const MbCartPoint &p1, const MbCartPoint &p2 );
void Init( const MbCartPoint &pnt, double x1, double x2 );
void Init( double t1, double t2 );
void Init1( const MbCartPoint &p1, const MbCartPoint &p2, double &len, double &angle );
void Init2( const MbCartPoint &p1, MbCartPoint &p2, const double &len, double &angle );
void Init3( const MbCartPoint &p1, MbCartPoint &p2, double &len, const double &angle,
const DiskreteLengthData * diskrData = nullptr );
void Init4( MbCartPoint &p1, const MbCartPoint &p2, const double &len, double &angle );
void Init5( MbCartPoint &p1, const MbCartPoint &p2, double &len, const double &angle,
const DiskreteLengthData * diskrData = nullptr );
void Init6( const MbCartPoint &p1, MbCartPoint &p2, const double &len, const double &angle );
void Init7( MbCartPoint &p1, const MbCartPoint &p2, const double &len, const double &angle );
void Init8( MbCartPoint &p1, MbCartPoint &p2, double &len, double &angle,
const DiskreteLengthData & diskrData, bool correctP1 );
void Init9( const MbCartPoint & p1, MbCartPoint & p2, double & len, double & angle,
const DiskreteLengthData & diskrData, bool keepX );
/** \} */
/** \ru \name Общие функции геометрического объекта.
@@ -141,7 +141,7 @@ public :
\{ */
// \ru Вычислить значения точки и производных для заданного параметра. \en Calculate point and derivatives of object for given parameter. \~
void Explore( double & t, bool ext,
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
MbCartPoint & pnt, MbVector & fir, MbVector * sec, MbVector * thir ) const override;
/** \} */
/** \ru \name Функции движения по кривой
@@ -179,7 +179,7 @@ public :
MbeItemLocation PointRelative( const MbCartPoint & pnt, double eps = Math::LengthEps ) const override;
double PointProjection( const MbCartPoint & pnt ) const override; // \ru Проекция точки на отрезок \en Point projection on the line segment
bool NearPointProjection( const MbCartPoint & pnt, 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; // \ru Проекция точки на кривую или её продолжение в области поиска проекции \en Point projection on the curve or its extension in the projection search area
void PerpendicularPoint( const MbCartPoint & pnt, SArray<double> & tFind ) const override; // \ru Вычисление всех перпендикуляров к кривой из данной точки \en Calculation of all perpendiculars to the curve from a given point
void IntersectHorizontal( double y, SArray<double> & cross ) const override; // \ru Пересечение с горизонтальной прямой \en Intersection with the horizontal line
void IntersectVertical ( double x, SArray<double> & cross ) const override; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line
@@ -191,7 +191,7 @@ public :
double LengthBetween2Points( MbCartPoint & p1, MbCartPoint & p2, MbCartPoint * pc = nullptr ) const override;
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::LengthEps,
VERSION version = Math::DefaultMathVersion() ) const override;
VERSION version = Math::DefaultMathVersion() ) const override;
double CalculateLength( double t1, double t2 ) const override; // \ru Посчитать метрическую длину отрезка от параметра t1 до t2 с заданной точностью \en Coclculate the metric length of the line segment from parameter 't1' to 't2' with the given tolerance
bool GetMiddlePoint ( MbCartPoint & ) const override; // \ru Выдать среднюю точку отрезка \en Get the middle point on a line segment
bool GetCentre ( MbCartPoint & ) const override; // \ru Выдать центр отрезка \en Get the center of a line segment
@@ -205,34 +205,35 @@ public :
void GetBasisPoints( MbControlData & ) const override; // \ru Выдать контрольные точки объекта. \en Get control points of object.
void SetBasisPoints( const MbControlData & ) override; // \ru Изменить объект по контрольным точкам. \en Change the object by control points.
void ThroughPoint( double t, const MbCartPoint & pnt ); // \ru Пройти через точку при данном параметре \en Pass through the point in the given parameter
void InsertPoint( double t, const MbCartPoint & pnt ); // \ru Вставить точку \en Insert a point
double GetAngle() const; // \ru Выдать значение угла наклона отрезка \en Get the value of an angle inclination of a line segment
MbDirection GetDirection() const; // \ru Выдать вектор наклона отрезка \en Get the vector of a line segment inclination
bool IsParallel( const MbLineSegment & seg, double eps = Math::AngleEps ) const; // \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
const MbCartPoint & GetPoint1() const { return point1; }
const MbCartPoint & GetPoint2() const { return point2; }
MbCartPoint & SetPoint1() { return point1; }
MbCartPoint & SetPoint2() { return point2; }
void GetPoint1( MbCartPoint & p ) const { p = point1; }
void GetPoint2( MbCartPoint & p ) const { p = point2; }
void SetPoint1( const MbCartPoint & p ) { point1 = p; }
void SetPoint2( const MbCartPoint & p ) { point2 = p; }
void SetLimitPoint( ptrdiff_t number, const MbCartPoint & pnt ); // \ru Заменить точку отрезка \en Replace the point of a line segment
void CheckParameter( double & t ) const; // \ru Проверка и коррекция параметра \en Check and correction of parameter
void ThroughPoint( double t, const MbCartPoint & pnt ); // \ru Пройти через точку при данном параметре \en Pass through the point in the given parameter
void InsertPoint( double t, const MbCartPoint & pnt ); // \ru Вставить точку \en Insert a point
double GetAngle() const; // \ru Выдать значение угла наклона отрезка \en Get the value of an angle inclination of a line segment
MbDirection GetDirection() const; // \ru Выдать вектор наклона отрезка \en Get the vector of a line segment inclination
bool IsParallel( const MbLineSegment & seg, double eps = Math::AngleEps ) const; // \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
const MbCartPoint & GetPoint1() const { return point1; }
const MbCartPoint & GetPoint2() const { return point2; }
MbCartPoint & SetPoint1() { return point1; }
MbCartPoint & SetPoint2() { return point2; }
void GetPoint1( MbCartPoint & p ) const { p = point1; }
void GetPoint2( MbCartPoint & p ) const { p = point2; }
void SetPoint1( const MbCartPoint & p ) { point1 = p; }
void SetPoint2( const MbCartPoint & p ) { point2 = p; }
void SetLimitPoint( ptrdiff_t number, const MbCartPoint & pnt ); // \ru Заменить точку отрезка \en Replace the point of a line segment
void CheckParameter( double & t ) const; // \ru Проверка и коррекция параметра \en Check and correction of parameter
// \ru Работа с базовой прямой \en Work with the base line
MbCartPoint Origin() const { MbCartPoint p( point1 ); return p; }
MbVector Derive() const { MbVector v( point1, point2 ); return v; }
MbDirection Direction() const { MbDirection v( point1, point2 ); return v; }
bool Extend( const MbCartPoint & point ); // \ru Удлинить отрезок до проекции точки point \en Extend line segment to projection of point "point"
double PointProjectionOnBaseLine( const MbCartPoint & pnt ) const; // \ru Проекция на прямую \en Projection on the line
double PointProjectionOnBaseLine( const MbCartPoint & pnt, MbCartPoint & proj ) const; // \ru Проекция на прямую \en Projection on the line
double DistanceToPointOnBaseLine( const MbCartPoint & pnt ) const; // \ru Расстояние от точки до проекции на прямую \en Distance from a point to a projection on the line
bool IsHorizontal( double eps = Math::paramEpsilon ) const { return ::fabs(point1.y - point2.y) < eps; } // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::paramEpsilon ) const { return ::fabs(point1.x - point2.x) < eps; } // \ru Проверка вертикальности \en Check for verticality
// \ru Работа с базовой прямой \en Work with the base line
MbCartPoint Origin() const { MbCartPoint p( point1 ); return p; }
MbVector Derive() const { MbVector v( point1, point2 ); return v; }
MbDirection Direction() const { MbDirection v( point1, point2 ); return v; }
bool Extend( const MbCartPoint & point ); // \ru Удлинить отрезок до проекции точки point \en Extend line segment to projection of point "point"
double PointProjectionOnBaseLine( const MbCartPoint & pnt ) const; // \ru Проекция на прямую \en Projection on the line
double PointProjectionOnBaseLine( const MbCartPoint & pnt, MbCartPoint & proj ) const; // \ru Проекция на прямую \en Projection on the line
double DistanceToPointOnBaseLine( const MbCartPoint & pnt ) const; // \ru Расстояние от точки до проекции на прямую \en Distance from a point to a projection on the line
bool IsHorizontal( double eps = Math::paramEpsilon ) const { return ::fabs(point1.y - point2.y) < eps; } // \ru Проверка горизонтальности \en Check for horizontality
bool IsVertical ( double eps = Math::paramEpsilon ) const { return ::fabs(point1.x - point2.x) < eps; } // \ru Проверка вертикальности \en Check for verticality
// \ru Продлить кривую. \en Extend the curve. \~
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
//private:
@@ -240,14 +241,15 @@ public :
/** \} */
void ReadAsLineSeg( reader & in ); // \ru Чтение.
void WriteAsLineSeg( writer & out ) const; // \ru Запись.
void ReadAsLineSeg( reader & in ); // \ru Чтение.
void WriteAsLineSeg( writer & out ) const; // \ru Запись.
DECLARE_PERSISTENT_CLASS_NEW_DEL( MbLineSegment )
}; // MbLineSegment
IMPL_PERSISTENT_OPS( MbLineSegment )
//------------------------------------------------------------------------------
// \ru Инициализировать по отрезку \en Initialize by a line segment
// ---
@@ -256,6 +258,7 @@ inline void MbLineSegment::Init( const MbLineSegment & ls ) {
point2 = ls.point2;
}
//------------------------------------------------------------------------------
// \ru Пересчитать параметры отрезка \en Recalculate the parameters of the line segment
// ---
@@ -264,6 +267,7 @@ inline void MbLineSegment::Init( const MbCartPoint & p1, const MbCartPoint & p2
point2 = p2;
}
//------------------------------------------------------------------------------
// \ru Инициализация горизонтального отрезка для штриховки \en Initialization of a horizontal segment for hatching
// ---
@@ -274,6 +278,7 @@ inline void MbLineSegment::Init( const MbCartPoint & pnt, double x1, double x2 )
point2.x += x2;
}
//------------------------------------------------------------------------------
// \ru Заменить точку отрезка \en Replace the point of a line segment
// ---
@@ -285,6 +290,7 @@ inline void MbLineSegment::SetLimitPoint( ptrdiff_t number, const MbCartPoint &
point2 = pnt;
}
//------------------------------------------------------------------------------
// \ru Выдать значение угла наклона отрезка \en Get the value of an angle inclination of a line segment
// ---
@@ -293,6 +299,7 @@ inline double MbLineSegment::GetAngle() const {
return d0.DirectionAngle();
}
//------------------------------------------------------------------------------
// \ru Выдать вектор наклона отрезка \en Get the vector of a line segment inclination
// ---
@@ -301,6 +308,7 @@ inline MbDirection MbLineSegment::GetDirection() const {
return d0;
}
//------------------------------------------------------------------------------
// \ru Проверка параллельности двух прямых \en Check for parallelism of two lines
// ---
@@ -312,6 +320,7 @@ inline bool MbLineSegment::IsParallel( const MbLineSegment & seg, double eps ) c
return ( ::fabs( d0.ay * d1.ax - d0.ax * d1.ay ) < eps );
}
//------------------------------------------------------------------------------
// \ru Проверка и коррекция параметра \en Check and correction of parameter
// ---
@@ -320,6 +329,7 @@ inline void MbLineSegment::CheckParameter( double & t ) const {
if ( t > 1 ) t = 1;
}
//------------------------------------------------------------------------------
// \ru Инициализация по другому отрезку \en Initialization by another segment
// ---

Some files were not shown because too many files have changed in this diff Show More