- C3d aggiornamento delle librerie ( 117918).
This commit is contained in:
SaraP
2022-10-03 14:49:45 +02:00
parent 4be7d59035
commit 6fcb736b65
67 changed files with 1551 additions and 493 deletions
+14 -15
View File
@@ -1248,9 +1248,6 @@ MATH_FUNC(MbResultType) ElevateDegreeNurbzs( MbNurbs3D * curve,
MbCurve3D *& result );
//------------------------------------------------------------------------------
// Репараметризировать NURBS кривую.
// ---
//------------------------------------------------------------------------------
/** \brief \ru Репараметризировать NURBS кривую.
\en Reparametrize the NURBS curve. \~
@@ -1271,6 +1268,7 @@ MATH_FUNC( MbResultType ) ReparamNurbs( MbNurbs3D * curve,
MbFairCurveData & data,
MbCurve3D *& resCurve );
//------------------------------------------------------------------------------
/** \brief \ru Уплотнить NURBS кривую.
\en Subdivide the NURBS curve. \~
@@ -1296,7 +1294,7 @@ MATH_FUNC(MbResultType) SubdivideNurbs( MbNurbs3D * curve,
/** \brief \ru Выделить участок NURBS кривой / изменить формат NURBS кривой.
\en To extract part of NURBS curve / change the format of the NURBS curve. \~
\details \ru Выделить участок NURBS кривой / изменить формат NURBS кривой. \n
В data устанавливаются переменные преобразований. Выделямый участок определяется номером начального сегмента в переменной numSegment
В data устанавливаются переменные преобразований. Выделяемый участок определяется номером начального сегмента в переменной numSegment
и количеством сегментов в переменной numSegments. Выходной формат сплайна определяется в переменной outFormat.
При значении 2 - NURBS кривая с управляющим S-полигоном. При значении 3 - рациональная кривая Безье
с управляющим GB-полигоном.
@@ -1318,17 +1316,18 @@ MATH_FUNC(MbResultType) ExtractChangeNurbs( MbNurbs3D * curve,
MbFairCurveData & data,
MbCurve3D *& result );
//------------------------------------------------------------------------------
/** \brief \ru Выделить участок NURBS кривой / изменить формат NURBS кривой. Выдать параметры созданной кривой.
\en To extract part of NURBS curve / change the format of the NURBS curve. Return parameters of created curve.\~
\details \ru Выделить участок NURBS кривой / изменить формат NURBS кривой. Выдать параметры созданной кривой. \n
В data устанавливаются переменые преобразований. Выделямый участок определяется номером начального сегмента в переменной numSegment
В data устанавливаются переменные преобразований. Выделяемый участок определяется номером начального сегмента в переменной numSegment
и количеством сегментов в переменной numSegments. Выходной формат сплайна определяется в переменной outFormat.
При значении 2 - NURBS кривая с управляющим S-полигоном. При значении 3 - рациональная кривая Безье
с управляющим GB-полигоном.
\en To extract part of NURBS curve / change the format of the NURBS curve. Return parameters of created curve. \n
Transformation variables are set in data. The extracting part is determined by the number of the starting segment in the variable numSegment and the number of segments in the variable numSegments.
The output spline format is defined in the outFormat variable.    If the value is 2 - NURBS curve with control S-polygon. If the value is 3 - rational Bezier curve with GB-control polygon.\~
The output spline format is defined in the outFormat variable. If the value is 2 - NURBS curve with control S-polygon. If the value is 3 - rational Bezier curve with GB-control polygon.\~
\param[in] curve - \ru Исходная кривая. \en An initial curve. \~
\param[in] data - \ru Данные построения и преобразования кривой. \en Curve construction and transformation data. \~
\param[out] resWts - \ru Веса результирующей кривой. \en Weights of the result curve. \~
@@ -1349,9 +1348,9 @@ MATH_FUNC( MbResultType ) ExtractChangeNurbsParams( MbNurbs3D * curve,
/** \brief \ru Вставить узел в NURBS.
\en Insert node in NURBS. \~
\details \ru Вставить узел в NURBS. \n
В data устанавливаются переменые преобразований. Место вставки узла определяется переменными nSegment и tParam.
В data устанавливаются переменные преобразований. Место вставки узла определяется переменными nSegment и tParam.
В переменной nSegment устанавливается номер сегмента, в переменной tParam (0.1 < tParam < 0.9) задается значение внутреннего параметра на сегменте сплайна.
\en Insert node in NURBS. Transformation variables are set in data. The insertion positon of the node is determined by the variables nSegment and tParam.
\en Insert node in NURBS. Transformation variables are set in data. The insertion position of the node is determined by the variables nSegment and tParam.
             The nSegment variable sets the segment number, the tParam variable (0.1 <tParam <0.9) sets the value of the internal parameter on the spline segment.\~
\param[in] curve - \ru Исходная кривая.
\en An initial curve. \~
@@ -1369,7 +1368,7 @@ MATH_FUNC( MbResultType ) AddKnotNurbs( MbNurbs3D * curve,
MbCurve3D *& result );
//-----------------------------------------------------
//-----------------------------------------------------------------------------
/** \brief \ru Выполнить вставку узла в односегментную NURBS кривую произвольного формата.
\en Insert a knot into the onesegmented NURBS curve \~
\details \ru Выполнить вставку узла в односегментную NURBS кривую произвольного формата.\n
@@ -1395,8 +1394,8 @@ MATH_FUNC( MbResultType ) ExtractExtrapolFromSegment( MbNurbs3D * curve,
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать конический NURBzS в конический NURBS.
\en Convert a conical NURBzS into a conical NURBS. \~
\details \ru Преобразовать NURBzS кривую, геометрически точно представляющую коничекую кривую,
в коническую рациональную B-сплайновую кривую 6-ой степени, геометрически точно представляющую коничекую кривую. \n
\details \ru Преобразовать NURBzS кривую, геометрически точно представляющую коническую кривую,
в коническую рациональную B-сплайновую кривую 6-ой степени, геометрически точно представляющую коническую кривую. \n
\en Convert a NURBzS curve geometrically representing a conic curve
into a rational B-spline curve of degree 6 geometrically representing a conic curve \~
\param[in] curve - \ru Исходная кривая.
@@ -1456,7 +1455,7 @@ MATH_FUNC( MbResultType ) Cabling( const MbCartPoint3D & begPoint,
//------------------------------------------------------------------------------
/** \brief \ru Установить параметризацию кривой пропорционально длине кривой.
\en Set curve parametrization proportional to the curve length. \~
\details \ru Если параметризация кривой не пропорциональна длине кривой, то изменить параметризацию кривой, сделав её пропорциональной длдине кривой. \n
\details \ru Если параметризация кривой не пропорциональна длине кривой, то изменить параметризацию кривой, сделав её пропорциональной длине кривой. \n
В общем случае кривая будет заменена на репараметризованную кривую MbReparamCurve3D с пропорциональной длине параметризацией.
В частных случаях, когда исходная кривая имеет пропорциональную параметризацию с требуемыми границами, будет возвращена исходная кривая. \n
\en If the curve parameterization is not proportional to the length of the curve, then change the curve parameterization to make it proportional to the length of the curve. \n
@@ -1464,9 +1463,9 @@ MATH_FUNC( MbResultType ) Cabling( const MbCartPoint3D & begPoint,
In special cases, when the curve has a proportional parametrization with the required boundaries, the original curve will be returned. \~ \n
\param[in] curve - \ru Исходная кривая, подлежащая репараметризации.
\en The original curve to be reparametrized. \~
\param[in] tMin - \ru Новый минимальнай параметр кривой.
\param[in] tMin - \ru Новый минимальный параметр кривой.
\en New minimal parameter of the curve. \~
\param[in] tMax - \ru Новый максимальнай параметр кривой.
\param[in] tMax - \ru Новый максимальный параметр кривой.
\en New maximal parameter of the curve. \~
\return \ru Возвращает построенную кривую с пропорциональной длине параметризацией.
\en Returns created curve with proportional length parameterization.
@@ -1512,7 +1511,7 @@ MATH_FUNC( MbResultType ) ExtendCurve( const MbCurve3D & source
При прочих типах успешное создание фаски не гарантируется.\n
\en Set of input parameters: the source curve and the list of joints with parameters.
The source curve can be one of the following types: 3d contour, 3d polyline, contour on a surface, polyline on a surface.
For other types the successfull chamfer creation is not guaranteed.\~ \n
For other types the successful chamfer creation is not guaranteed.\~ \n
\return \ru Возвращает код результата операции. В случае успеха всегда вернется ненулевая кривая.
В случае неудачи результат может быть nullptr.
Возможные коды ошибок: rt_ParameterError, rt_PartlyChamfer. rt_ParameterError означает ошибку во входных параметрах.
+71
View File
@@ -30,6 +30,10 @@ class MATH_CLASS MbPlaneItem;
class MATH_CLASS MbSNameMaker;
class MATH_CLASS MbFace;
class MATH_CLASS MbCollection;
class MATH_CLASS MbMeshSimplificationParams;
class MATH_CLASS MbConvexHullParams;
struct MATH_CLASS MbConvexHullResults;
class MATH_CLASS MbConvexHullParams3D;
//------------------------------------------------------------------------------
@@ -340,6 +344,7 @@ MATH_FUNC (MbResultType) CreateSpherePolyhedron( const MbPlacement3D & place,
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
// DEPRECATE_DECLARE_REPLACE( CreateConvexPolyhedron with MbConvexHullParams )
MATH_FUNC (MbResultType) CreateConvexPolyhedron( const SArray<MbFloatPoint3D> & points,
MbMesh *& result );
@@ -357,6 +362,7 @@ MATH_FUNC (MbResultType) CreateConvexPolyhedron( const SArray<MbFloatPoint3D> &
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
// DEPRECATE_DECLARE_REPLACE( CreateConvexPolyhedron with MbConvexHullParams )
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbFloatPoint3D> & points,
MbMesh *& result );
@@ -374,6 +380,7 @@ MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbFloatPoint
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
// DEPRECATE_DECLARE_REPLACE( CreateConvexPolyhedron with MbConvexHullParams )
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const SArray<MbCartPoint3D> & points,
MbMesh *& result );
@@ -391,6 +398,7 @@ MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const SArray<MbCartPoint3D> &
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
// DEPRECATE_DECLARE_REPLACE( CreateConvexPolyhedron with MbConvexHullParams )
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const std::vector<MbCartPoint3D> & points,
MbMesh *& result );
@@ -422,6 +430,40 @@ MATH_FUNC (MbResultType) CreateConvexPolyhedron( const MbMesh & mesh,
MbMesh *& result );
//------------------------------------------------------------------------------
/** \brief \ru Построить выпуклую оболочку для набора двумерных точек.
\en Construct the convex hull of 2D points array. \~
\details \ru Построить выпуклую оболочку для набора двумерных точек. \n
\en Construct the convex hull of 2D points array. \n \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] result - \ru Результат операции.
\en Operation result. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) CreateConvexPolygon( const MbConvexHullParams & params,
MbConvexHullResults & result );
//------------------------------------------------------------------------------
/** \brief \ru Вычислить выпуклую оболочку для множества точек.
\en Calculate a convex hull of a point set. \~
\details \ru Вычислить сетку, представляющую выпуклой оболочку для множества точек.
\en Calculate mesh being a convex hull of a point set. \~
\param[in] params - \ru Параметры операции.
\en Operation parameters. \~
\param[out] result - \ru Результирующая выпуклая триангуляционная сетка.
\en The resulting triangulation convex grid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) CreateConvexPolyhedron( const MbConvexHullParams3D & params,
SPtr<MbMesh> & result );
//------------------------------------------------------------------------------
/** \brief \ru Определить, пересекаются ли данные выпуклые сетки.
\en Whether there is intersection of convex grids. \~
@@ -653,4 +695,33 @@ MATH_FUNC( bool ) CheckMeshClosure( const MbMesh & mesh, MeshInfo & info );
MATH_FUNC( bool ) InspectMeshClosure( const MbMesh & mesh, MeshInfo & info );
//------------------------------------------------------------------------------
/** \brief \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\detail \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\param[in] mesh - \ru Полигональный объект.
\en The polygonal object. \~
\param[in] params - \ru Параметры симплификации.
\en Simplifiation parameters. \~
\param[out] simplifiedMeshes - \ru Массив упрощенных триангуляций.
\en Vector of simplified triangulations. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMesh & mesh, const MbMeshSimplificationParams & params, c3d::MeshesSPtrVector & simplifiedMeshes );
//------------------------------------------------------------------------------
/** \brief \ru Упростить триангуляцию.
\en Simplify triangulation. \~
\detail \ru Упростить триангуляцию. Делает упрощение до первого уровня, указанного в параметрах.
\en Simplify triangulation up to the first level from parameters. \~
\param[in] params - \ru Параметры симплификации.
\en Simplifiation parameters. \~
\param[in-out] mesh - \ru Полигональный объект.
\en The polygonal object. \~
\ingroup Polygonal_Objects
*/ // ---
MATH_FUNC( MbResultType ) SimplifyTriangularMesh( const MbMeshSimplificationParams & params, MbMesh & mesh );
#endif // __ACTION_MESH_H
+104 -7
View File
@@ -127,7 +127,7 @@ MATH_FUNC (MbResultType) ElementarySolid( const MbElementarySolidParams & params
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( MeshSolid with MbGridShellParams )
DEPRECATE_DECLARE_REPLACE( MeshSolid with MbGridShellParams )
MATH_FUNC (MbResultType) MeshSolid( const MbMesh & mesh,
const GridsToShellValues & params,
const MbSNameMaker & names,
@@ -140,6 +140,8 @@ MATH_FUNC (MbResultType) MeshSolid( const MbMesh & mesh,
\en Create a solid on the basis of a polygonal geometric object. \~
\details \ru Создать тело #MbSolid на основе полигональной модели #MbMesh. \n
\en Create a solid #MbSolid on the basis of a polygonal geometric object #MbMesh. \n \~
\deprecated \ru Функция устарела, взамен использовать #MeshSolid с набором параметров #MbGridShellParams.
\en The function is deprecated, instead use #MeshSolid with the parameter list #MbGridShellParams. \~
\param[in] mesh - \ru Полигональная модель.
\en The polygonal geometric object. \~
\param[in] params - \ru Параметры операции.
@@ -153,10 +155,32 @@ MATH_FUNC (MbResultType) MeshSolid( const MbMesh & mesh,
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( MeshSolid with MbGridShellParams )
MATH_FUNC( MbResultType ) MeshSolid( const MbMesh & mesh,
const MbGridShellParams & params,
c3d::SolidSPtr & result,
IProgressIndicator * prog = nullptr );
IProgressIndicator * prog );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело на основе полигональной модели.
\en Create a solid on the basis of a polygonal geometric object. \~
\details \ru Создать тело #MbSolid на основе полигональной модели #MbMesh. \n
\en Create a solid #MbSolid on the basis of a polygonal geometric object #MbMesh. \n \~
\param[in] mesh - \ru Полигональная модель.
\en The polygonal geometric object. \~
\param[in] params - \ru Параметры операции (в том числе индикатор прогресса).
\en The operation parameters (including a progress indicator). \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC( MbResultType ) MeshSolid( const MbMesh & mesh,
const MbGridShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
@@ -164,6 +188,31 @@ MATH_FUNC( MbResultType ) MeshSolid( const MbMesh & mesh,
\en Create a solid on the basis of a triangulation. \~
\details \ru Создать тело #MbSolid на основе триангуляции #MbGrid. \n
\en Create a solid #MbSolid on the basis of a triangulation #MbGrid. \n \~
\param[in] grid - \ru Полигональная модель.
\en The polygonal geometric object. \~
\param[in] params - \ru Параметры операции (в том числе индикатор прогресса).
\en The operation parameters (including a progress indicator). \~
\param[in] names - \ru Именователь.
\en An object for naming the new objects. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC( MbResultType ) GridSolid( const MbGrid & grid,
const MbGridShellParams & params,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело на основе триангуляции.
\en Create a solid on the basis of a triangulation. \~
\details \ru Создать тело #MbSolid на основе триангуляции #MbGrid. \n
\en Create a solid #MbSolid on the basis of a triangulation #MbGrid. \n \~
\deprecated \ru Функция устарела, взамен использовать #GridSolid с набором параметров #MbGridShellParams.
\en The function is deprecated, instead use #GridSolid with the parameter list #MbGridShellParams. \~
\param[in] grid - \ru Полигональная модель.
\en The polygonal geometric object. \~
\param[in] params - \ru Параметры операции.
@@ -179,10 +228,36 @@ MATH_FUNC( MbResultType ) MeshSolid( const MbMesh & mesh,
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( GridSolid with MbGridShellParams )
MATH_FUNC( MbResultType ) GridSolid( const MbGrid & grid,
const MbGridShellParams & params,
c3d::SolidSPtr & result,
IProgressIndicator * prog = nullptr );
IProgressIndicator * prog );
//------------------------------------------------------------------------------
/** \brief \ru Создать тело на основе коллекции элементов.
\en Create a solid on the basis of collection of elements. \~
\details \ru Создать тело #MbSolid на основе коллекции элементов #MbCollection. \n
\en Create a solid #MbSolid on the basis of collection of elements #MbCollection. \n \~
\deprecated \ru Функция устарела, взамен использовать #CollectionSolid с набором параметров #MbGridShellParams.
\en The function is deprecated, instead use #CollectionSolid with the parameter list #MbGridShellParams. \~
\param[in] collection - \ru Коллекция элементов.
\en The elements collection. \~
\param[in] params - \ru Параметры операции (в том числе индикатор прогресса).
\en The operation parameters (including a progress indicator). \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
DEPRECATE_DECLARE_REPLACE( CollectionSolid with MbGridShellParams )
MATH_FUNC( MbResultType ) CollectionSolid( const MbCollection & collection,
const MbGridShellParams & params,
c3d::SolidSPtr & result,
IProgressIndicator * prog );
//------------------------------------------------------------------------------
@@ -196,8 +271,6 @@ MATH_FUNC( MbResultType ) GridSolid( const MbGrid & grid,
\en Operation parameters. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\param[in,out] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
@@ -205,8 +278,7 @@ MATH_FUNC( MbResultType ) GridSolid( const MbGrid & grid,
// ---
MATH_FUNC( MbResultType ) CollectionSolid( const MbCollection & collection,
const MbGridShellParams & params,
c3d::SolidSPtr & result,
IProgressIndicator * prog = nullptr );
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
@@ -1607,6 +1679,7 @@ MATH_FUNC (MbResultType) SplitSolid( MbSolid & solid,
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( DraftSolid with 'MbDraftSolidParams' argument )
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbPlacement3D & neutralPlace,
@@ -1618,6 +1691,30 @@ MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Уклонить указанные грани тела.
\en Slope the specified faces of the solid. \~
\details \ru Уклонить указанные грани тела от нейтральной изоплоскости или нейтральных ребер на заданный угол. \n
\en Slope the specified faces of the solid at the specified angle relative to the neutral isoplane or neutral edges. \n \~
\param[in] solid - \ru Исходное тело.
\en The source solid. \~
\param[in] sameShell - \ru Режим копирования входного тела.
\en Whether to copy the input solid. \~
\param[in] draftParams - \ru Параметры уклона.
\en Draft parameters. \~
\param[out] result - \ru Построенное тело.
\en The resultant solid. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/
// ---
MATH_FUNC (MbResultType) DraftSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbDraftSolidParams & draftParams,
c3d::SolidSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Выполнить объединение пересекающихся тел.
\en Perform the union of intersecting solids. \~
+43 -122
View File
@@ -1233,107 +1233,25 @@ MATH_FUNC (MbCurve3D *) MakeCurveOnSurface( const MbFace & face,
\en Construct a fair curve of the specified type according to the specified parameters. \~
\details \ru Создать плавную кривую заданного типа по заданным параметрам. \n
\en Construct a fair curve of the specified type according to the specified parameters. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] initParams - \ru Данные исходной кривой.
\en An initial curve data. \~
\param[in] method - \ru Метод построения кривой.
\en Method of a curve construction. \~
\param[in] parameters - \ru Параметры построения кривой.
\param[in] curveData - \ru Параметры построения кривой.
\en Parameters of a curve construction. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
\param[out] result - \ru Результирующая кривая с данными об ошибке аппроксимации.
\en The result curve with approximation error data. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
const MbFairCurveMethod & method,
const MbFairCreateData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную кривую заданного типа по заданным параметрам.
\en Construct a fair curve of the specified type according to the specified parameters. \~
\details \ru Создать плавную кривую заданного типа по заданным параметрам. \n
\en Construct a fair curve of the specified type according to the specified parameters. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] method - \ru Метод построения кривой.
\en Method of a curve construction. \~
\param[in] parameters - \ru Параметры построения.
\en Construction parameters. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::WireFrameSPtr & sourceCurve,
const MbFairCurveMethod & method,
const MbFairCreateData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Изменить плавную кривую.
\en Change a fair curve. \~
\details \ru Изменить плавную кривую заданным способом. \n
\en Change a fair curve by the specified method. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] method - \ru Метод изменения кривой.
\en Method of a curve change. \~
\param[in] parameters - \ru Параметры изменения.
\en Changing parameters. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
const MbFairCurveMethod & method,
const MbFairChangeData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
/** \brief \ru Изменить плавную кривую.
\en Change a fair curve. \~
\details \ru Изменить плавную кривую заданным способом. \n
\en Change a fair curve by the specified method. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] method - \ru Метод изменения кривой.
\en Method of a curve change. \~
\param[in] parameters - \ru Параметры изменения.
\en Changing parameters. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::WireFrameSPtr & sourceCurve,
const MbFairCurveMethod & method,
const MbFairChangeData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
MATH_FUNC( MbResultType ) FairCurve( const MbFairCurveParams & initParams,
const MbFairCurveMethod & method,
const MbFairCreateData & curveData,
MbFairCurveResult & result );
//------------------------------------------------------------------------------
@@ -1341,47 +1259,48 @@ MATH_FUNC( MbResultType ) FairCurve( const c3d::WireFrameSPtr & sourceCurve,
\en Construct a fair fillet curve. \~
\details \ru Создать плавную кривую сопряжения по заданным параметрам. \n
\en Construct a fair fillet curve according to the specified parameters. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] parameters - \ru Параметры построения кривой.
\param[in] initParams - \ru Данные исходной кривой.
\en An initial curve data. \~
\param[in] curveData - \ru Параметры построения кривой.
\en Parameters of a curve construction. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
\param[out] result - \ru Результирующая кривая с данными об ошибке аппроксимации.
\en The result curve with approximation error data. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
const MbFairFilletData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
MATH_FUNC( MbResultType ) FairCurve( const MbFairCurveParams & initParams,
const MbFairFilletData & curveData,
MbFairCurveResult & result );
//------------------------------------------------------------------------------
/** \brief \ru Создать плавную кривую сопряжения.
\en Construct a fair fillet curve. \~
\details \ru Создать плавную кривую сопряжения по заданным параметрам. \n
\en Construct a fair fillet curve according to the specified parameters. \n \~
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] parameters - \ru Параметры построения кривой.
\en Parameters of a curve construction. \~
\param[in] snMaker - \ru Именователь кривых каркаса.
\en An object defining the frame curves names. \~
\param[out] result - \ru Каркас с построенной кривой.
\en The frame with the constructed curve. \~
/** \brief \ru Изменить плавную кривую.
\en Change a fair curve. \~
\details \ru Изменить плавную кривую заданным способом. \n
\en Change a fair curve by the specified method. \n \~
\param[in] initParams - \ru Данные исходной кривой.
\en An initial curve data. \~
\param[in] method - \ru Метод изменения кривой.
\en Method of a curve change. \~
\param[in] changeData - \ru Параметры изменения.
\en Changing parameters. \~
\param[out] result - \ru Результирующая кривая.
\en The result curve with approximation error data. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\ingroup Curve3D_Modeling
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const c3d::WireFrameSPtr & sourceCurve,
const MbFairFilletData & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
MATH_FUNC( MbResultType ) FairCurve( const MbFairCurveParams & initParams,
const MbFairCurveMethod & method,
const MbFairChangeData & changeData,
c3d::WireFrameSPtr & result );
//------------------------------------------------------------------------------
@@ -1397,12 +1316,14 @@ MATH_FUNC( MbResultType ) FairCurve( const c3d::WireFrameSPtr & sourceCurve,
\en The frame with the constructed curve. \~
\return \ru Возвращает код результата операции.
\en Returns operation result code. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( MbResultType ) FairCurve( const MbClothoidParams & parameters,
const MbSNameMaker & snMaker,
c3d::WireFrameSPtr & result );
c3d::WireFrameSPtr & result );
#endif // __ACTION_SURFACE_CURVE_H
+8
View File
@@ -54,6 +54,14 @@ bool RemoveRedundantPoints( c3d::SpacePointsVector & points,
c3d::UintVector & indexes,
double epsilon );
//------------------------------------------------------------------------------
// Удалить дублирующие с заданной точностью друг друга точки с помощью кд-дерева.
// ---
void MergeCoincidentPoints( c3d::SpacePointsVector & points,
c3d::MeshTrianglesVector & triangles,
double epsilon );
//------------------------------------------------------------------------------
// Объединить ребра двух смежных плоских граней с полигональной границей
// (возвращает общее после сшивки ребро)
+1 -1
View File
@@ -16,7 +16,7 @@
#include <math_define.h>
#include <attr_registry.h>
#include <tool_cstring.h>
#include <tool_multithreading.h>
#include <tool_mutex.h>
#include <memory>
class MATH_CLASS MbExternalAttribute;
+6 -6
View File
@@ -61,7 +61,7 @@ const cdet_app_item CDET_APP_NULL = nullptr; ///< \ru "Нулевой" объе
*/
//---
struct cdet_query
struct MATH_CLASS cdet_query
{
enum cback_res ///< Result code of the callback function
{
@@ -118,7 +118,7 @@ private:
//----------------------------------------------------------------------------------------
//
//---
struct cdet_query_result: public cdet_query
struct MATH_CLASS cdet_query_result: public cdet_query
{
cdet_result result;
@@ -156,7 +156,7 @@ private:
//----------------------------------------------------------------------------------------
// The structure queries first founded collision faces
//---
struct cdet_first_collided: public cdet_query
struct MATH_CLASS cdet_first_collided: public cdet_query
{
SPtr<const MbRefItem> first, second; // collided faces
@@ -201,7 +201,7 @@ private:
\en The structure of the query to find collision faces.
*/
//---
struct cdet_collided_faces: public cdet_query
struct MATH_CLASS cdet_collided_faces: public cdet_query
{
typedef std::pair<cdet_app_item,const MbRefItem*> item_face; // represents a face of app item
typedef std::set<item_face> collided_faces;
@@ -335,7 +335,7 @@ typedef enum
//----------------------------------------------------------------------------------------
//
//---
struct CDET_item_data
struct MATH_CLASS CDET_item_data
{
cdet_item comp; // Descriptor of the component owning the inctance.
cdet_item inst; // Descriptor of the instance.
@@ -361,7 +361,7 @@ class MbFace;
/* \brief \ru Грань столкновения. \en A face of collision. \~
*/
// ---
class MbCollisionFace
class MATH_CLASS MbCollisionFace
{
cdet_item item; // The instance to witch the face belongs.
const MbFace * mathFace; // The topological face identified in the collision detection or proximity query.
+24
View File
@@ -942,4 +942,28 @@ MATH_FUNC (bool) CheckTopologyItemsMainNames( const MbFaceShell & s
c3d::ConstEdgesVector & edges,
c3d::ConstVerticesVector & vertices );
//------------------------------------------------------------------------------
/** \brief \ru Проверить, вырожденная ли поверхность.
\en Check whether the surface is degenerated. \~
\details \ru Проверить, вырожденная ли поверхность. В текущей реализации работает на элементарных поверхностях,
наследованных от #MbElemetarySurface и на ограниченных кривыми поверхностях типа #CurveBoundedSurface.
\en Check whether the surface is degenerated. Currently works on the elementary surfaces inherited from
#MbElemetarySurface and on the surfaces bounded by curves #CurveBoundedSurface.\~
\param[in] inputSurface - \ru Поверхность, которую проверяем.
\en Surface to check.\~
\param[in] accuracy - \ru Точность проверки.
\en Accuracy of the check.\~
\return \ru Возвращает:
rt_Success, если поверхность не вырожденная;
rt_DegenerateSurface, если поверхность вырожденная;
rt_ParameterError, если на вход дан не поддерживаемый тип поверхности.
\en Returns:
rt_Success, if the surface is not degenerated;
rt_DegenerateSurface, the surface is degenerated;
rt_ParameterError, if the input surface type is not supported.\~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC (MbResultType) IsDegeneratedElementary( const MbSurface & inputSurface, double accuracy = Math::metricPrecision );
#endif // __CHECK_GEOMETRY_H
+10 -4
View File
@@ -434,7 +434,7 @@ protected:
MbPlacement3D location; ///< \ru Локальная система координат (ЛСК), в плоскости XY которой расположены объекты аннотации. \en Local coordinate system (LCS) the annotation objects are located in XY plane of.
std::vector< const MbItem* > annotationGeometry; ///< \ru Геометрические объекты аннотации. \en Geometric objects of annotation.
std::vector< SPtr<const MaTextItem> > annotationText; ///< \ru Текстовые аннотационные объекты. \en Text annotation objects.
std::string name; ///< \ru Имя. \en Name.
c3d::string_t name; ///< \ru Имя. \en Name.
bool visible; ///< \ru Видим ли объект. \en If object is vivible.
// \ru Аналогичным образом реализовать и символьное представление \en Implement symbolic representation similarly.
public:
@@ -493,10 +493,16 @@ public:
MbPlacement3D GetLocation() const;
/// \ru Задать имя. \en Specify name.
void SetName( const std::string & nm );
DEPRECATE_DECLARE_REPLACE( SetC3dName ) void SetName( const std::string & nm );
/// \ru Задать имя. \en Specify name.
void GetName( std::string & nm ) const;
/// \ru Получить имя. \en Specify name.
DEPRECATE_DECLARE_REPLACE ( GetC3dName ) void GetName( std::string & nm ) const;
/// \ru Задать имя. \en Specify name.
void SetC3dName ( const c3d::string_t& nm );
/// \ru Получить имя. \en Specify name.
c3d::string_t GetC3dName ( ) const;
/// \ru Задать видимость. \en Set visibility.
void SetVisibility( bool v );
+1 -1
View File
@@ -14,10 +14,10 @@
#include <creator.h>
#include <attribute_item.h>
#include <name_item.h>
#include <topology_faceset.h>
class MATH_CLASS MbNamedAttributeContainer;
class MATH_CLASS MbFaceShell;
//------------------------------------------------------------------------------
+32 -1
View File
@@ -12,6 +12,7 @@
#include <creator.h>
class MATH_CLASS MbDraftSolidParams;
//------------------------------------------------------------------------------
/** \brief \ru Строитель оболочки с уклонёнными гранями.
@@ -142,6 +143,7 @@ IMPL_PERSISTENT_OPS( MbDraftSolid )
\ingroup Model_Creators
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CreateDraft with 'MbDraftSolidParams' argument )
MATH_FUNC (MbCreator *) CreateDraft( MbFaceShell * solid,
MbeCopyMode sameShell,
const MbPlacement3D & np,
@@ -151,7 +153,36 @@ MATH_FUNC (MbCreator *) CreateDraft( MbFaceShell * solid,
bool reverse,
const MbSNameMaker & names,
MbResultType & res,
MbFaceShell *& shell );
MbFaceShell *& resShell );
//------------------------------------------------------------------------------
/** \brief \ru Построить оболочку с уклоном граней.
\en Create a shell with drafted faces. \~
\details \ru Для исходной оболочки построить оболочку с уклоном граней от нейтральной изоплоскости или нейтральных ребер для создания литейных уклонов. \n
Одновременно с построением оболочки функция создаёт её строитель.\n
\en For the source shell create a shell with faces drafted from the neutral isoplane or neutral edges for pattern tapers creation. \n
The function simultaneously creates the shell and its constructor.\n \~
\param[in] solid - \ru Исходная оболочка.
\en The source shell. \~
\param[in] sameShell - \ru Режим копирования исходной оболочки.
\en Mode of copying the source shell. \~
\param[in] draftParams - \ru Параметры уклона.
\en Draft parameters. \~
\param[out] res - \ru Код результата операции выдавливания.
\en The extrusion operation result code. \~
\param[out] shell - \ru Построенная оболочка.
\en The resultant shell. \~
\result \ru Возвращает строитель оболочки.
\en Returns the shell constructor. \~
\ingroup Model_Creators
*/
// ---
MATH_FUNC (c3d::CreatorSPtr) CreateDraft( c3d::ShellSPtr & solid,
MbeCopyMode sameShell,
const MbDraftSolidParams & draftParams,
MbResultType & res,
c3d::ShellSPtr & resShell );
#endif // __CR_DRAFT_SOLID_H
+45 -23
View File
@@ -17,6 +17,22 @@
#include <op_curve_parameter.h>
//------------------------------------------------------------------------------
/** \brief \ru Результат построения строителя гладкой кривой.
\en The result of creating or a fair curve creator. \~
\details \ru Результат построения строителя гладкой кривой. \n
\en The result of creating or a fair curve creator. \n \~
\ingroup Data_Structures
*/
// ---
struct MATH_CLASS MbFairCreatorResult : public MbApproxError
{
c3d::SpaceCurveSPtr _resCurve;
MbResultType _error;
MbeFairWarning _warning;
MbFairCreatorResult() : MbApproxError(), _error( rt_Success ), _warning( fwarn_Success ) {}
};
//------------------------------------------------------------------------------
/** \brief \ru Базовый класс строителя плавной кривой.
\en Base class of a constructor of fair curve. \~
@@ -267,29 +283,32 @@ IMPL_PERSISTENT_OPS( MbFireChangeCreator )
\en Create a fair curve. \~
\details \ru Создание плавной кривой.\n
\en Create a fair curve.\n \~
\param[in] polyline - \ru Исходная кривая.
\param[in] sourceCurve - \ru Исходная кривая.
\en An initial curve. \~
\param[in] parameters - \ru Параметры построения.
\en Construction parameters. \~
\param[in] method - \ru Метод построения кривой.
\en Method of a curve construction. \~
\param[in] parameters - \ru Параметры построения.
\en Construction parameters. \~
\param[in] snMaker - \ru Именователь кривых.
\en An object defining curves names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Результирующая плавная кривая. Может быть nullptr.
\en The resulting fair curve. Can be nullptr. \~
\param[out] errInfo - \ru \ru Сведения об ошибке аппроксимации.
\en Approximation error information. \~
\param[out] resCurve - \ru Результат.
\en The result. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\ingroup Curve3D_Modeling
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const MbCurve3D & sourceCurve,
const MbFairCurveMethod & method,
const MbFairCreateData & parameters,
const MbSNameMaker & snMaker,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
MbFairCreatorResult & result );
//------------------------------------------------------------------------------
@@ -307,19 +326,20 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourc
\en An object defining curves names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Результирующая плавная кривая. Может быть nullptr.
\en The resulting fair curve. Can be nullptr. \~
\param[out] resCurve - \ru Результат.
\en The result. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const MbCurve3D & sourceCurve,
const MbFairCurveMethod & method,
const MbFairChangeData & parameters,
const MbSNameMaker & snMaker,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
MbFairCreatorResult & result );
//------------------------------------------------------------------------------
@@ -335,18 +355,19 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourc
\en An object defining curves names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Результирующая плавная кривая. Может быть nullptr.
\en The resulting fair curve. Can be nullptr. \~
\param[out] resCurve - \ru Результат.
\en The result. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourceCurve,
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const MbCurve3D & sourceCurve,
const MbFairFilletData & parameters,
const MbSNameMaker & snMaker,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
MbFairCreatorResult & result );
//------------------------------------------------------------------------------
@@ -360,17 +381,18 @@ MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const c3d::SpaceCurveSPtr & sourc
\en An object defining curves names. \~
\param[out] res - \ru Код результата операции.
\en Operation result code. \~
\param[out] resCurve - \ru Результирующая плавная кривая. Может быть nullptr.
\en The resulting fair curve. Can be nullptr. \~
\param[out] resCurve - \ru Результат.
\en The result. \~
\result \ru Возвращает строитель.
\en Returns the constructor. \~
\warning \ru В разработке.
\en Under development. \~
\ingroup Curve3D_Modeling
*/
// ---
MATH_FUNC( c3d::CreatorSPtr ) CreateFairCurve( const MbClothoidParams & parameters,
const MbSNameMaker & snMaker,
MbResultType & res,
c3d::SpaceCurveSPtr & resCurve );
MbFairCreatorResult & result );
#endif // __CR_FIRE_CURVE_H
-1
View File
@@ -18,7 +18,6 @@
class MATH_CLASS MbVertex;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbPointFrame;
class MATH_CLASS MbWireFrame;
class MATH_CLASS MbCreator;
+7
View File
@@ -219,6 +219,9 @@ public:
void Explore( double & t, bool ext,
MbCartPoint3D & pnt, MbVector3D & fir, MbVector3D * sec, MbVector3D * thir ) const override;
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::SpaceCurveSPtr & resCurve ) 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.
@@ -258,6 +261,10 @@ public:
private:
/// \ru Усеченное значение tmax для случая закручивающихся в точку плоской или конической спиралей. \en Trimmed value tmax for the case of planar or conical spirals trailing to the point.
void CalConeTMax();
/// \ru Вернуть значение параметра, при котором плоская или коническая спираль "закручивается в точку" (радиус равен 0). Вернуть DBL_MAX, если такого значения не существует. \en Returns the parameter value, which the planar or conical spiral trails to the point (the radius is equal to 0) for. Return DBL_MAX if such value does not exist.
double CalConeT() const;
/// \ru Текущий радиус. \en The current radius.
double GetR( double t ) const;
/// \ru Производная текущего радиуса. \en The derivative of the current radius.
+9 -7
View File
@@ -77,7 +77,7 @@ public :
MbContour3D(); ///< \ru Пустой контур. \en Empty contour.
/// \ru Конструктор по набору кривых. \en Constructor by curves.
template <class CurvesVector>
MbContour3D( const CurvesVector & initSegments, bool sameCurves ); // \ru sameCurves - кривые или их копии \en SameCurves - curves or their copies
MbContour3D( const CurvesVector & initSegments, bool sameCurves/*, VERSION version = Math::DefaultMathVersion()*/ ); // \ru sameCurves - кривые или их копии \en SameCurves - curves or their copies
protected:
MbContour3D( const MbContour3D &, MbRegDuplicate * ); ///< \ru Конструктор копирования. \en Copy constructor.
public :
@@ -262,7 +262,7 @@ public:
/// \ru Инициализация по набору кривых (sameCurves - кривые или их копии). \en Initialize by curves (sameCurves - curves or their copies).
template <class CurvesVector>
bool Init( const CurvesVector & initSegments, bool sameCurves, bool cls );
bool Init( const CurvesVector & initSegments, bool sameCurves, bool cls/*, VERSION version = Math::DefaultMathVersion()*/ );
/// \ru Инициализация по набору точек. \en Initialize by points.
template <class PointsVector>
bool Init( const PointsVector & points, bool doClosed = true );
@@ -294,7 +294,7 @@ public:
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 AddSegment ( MbCurve3D & newSegment, bool same/*, VERSION version = Math::DefaultMathVersion()*/ ); ///< \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.
@@ -404,7 +404,7 @@ IMPL_PERSISTENT_OPS( MbContour3D )
// \ru Конструктор по набору кривых. \en Constructor by curves.
// ---
template <class CurvesVector>
MbContour3D::MbContour3D( const CurvesVector & initSegments, bool sameCurves )
MbContour3D::MbContour3D( const CurvesVector & initSegments, bool sameCurves/*, VERSION version*/ )
: MbCurve3D ( )
, segments ( initSegments.size(), 1 )
, closed ( false )
@@ -419,7 +419,8 @@ MbContour3D::MbContour3D( const CurvesVector & initSegments, bool sameCurves )
const MbCurve3D * initSegment = initSegments[i];
if ( initSegment != nullptr ) {
C3D_ASSERT( initSegment->GetSubstrate().Type() != st_Contour3D ); // \ru Использование контура не по назначению. \en Wrong contour use as contours container.
//if ( initSegment->Type() == st_Contour3D ) { // \ru Присланный контур удаляет владелец. \en contour should be deleted by owner.
//if ( version >= 0x15001008L && // \ru Контур в контуре возможен в ранних версиях. \ en A contour within a contour is possible in early versions.
// initSegment->Type() == st_Contour3D ) { // \ru Присланный контур удаляет владелец. \en contour should be deleted by owner.
// const MbContour3D * cntr = static_cast<const MbContour3D *>( initSegment );
// MbContour3D * contour = const_cast<MbContour3D *>( cntr );
// size_t cnt = contour->segments.size();
@@ -448,7 +449,7 @@ MbContour3D::MbContour3D( const CurvesVector & initSegments, bool sameCurves )
// \ru Инициализация по набору кривых. \en Initialize by curves.
// ---
template <class CurvesVector>
bool MbContour3D::Init( const CurvesVector & initSegments, bool sameCurves, bool cls )
bool MbContour3D::Init( const CurvesVector & initSegments, bool sameCurves, bool cls/*, VERSION version*/ )
{
size_t count = initSegments.size();
@@ -462,7 +463,8 @@ bool MbContour3D::Init( const CurvesVector & initSegments, bool sameCurves, bool
const MbCurve3D * initSegment = initSegments[i];
if ( initSegment != nullptr ) {
C3D_ASSERT( initSegment->GetSubstrate().Type() != st_Contour3D ); // \ru Использование контура не по назначению. \en Wrong contour use as contours container.
//if ( initSegment->Type() == st_Contour3D ) { // \ru Присланный контур удаляет владелец. \en contour should be deleted by owner.
//if ( version >= 0x15001008L && // \ru Контур в контуре возможен в ранних версиях. \ en A contour within a contour is possible in early versions.
// initSegment->Type() == st_Contour3D ) { // \ru Присланный контур удаляет владелец. \en contour should be deleted by owner.
// const MbContour3D * cntr = static_cast<const MbContour3D *>( initSegment );
// MbContour3D * contour = const_cast<MbContour3D *>( cntr );
// size_t cnt = contour->segments.size();
+4
View File
@@ -132,6 +132,10 @@ public:
bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place3d, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
// \ru Дать поверхностную кривую, если пространственная кривая поверхностная (после использования вызывать DeleteItem на аргументы). \en Get a surface curve if a spatial curve is on a surface (call DeleteItem for arguments after use).
bool GetSurfaceCurve( MbCurve *& curve2d, MbSurface *& surface, VERSION version = Math::DefaultMathVersion() ) const override;
// \ru Получить вектор взгляда \en Get the eye vector.
const MbVector3D & GetEye() const { return eye; }
// \ru Тип проецирования. \en Projection type.
bool IsPerspective() const { return perspective; }
// \ru Создать усеченную кривую. \en Create a trimmed curve
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
+3 -3
View File
@@ -679,11 +679,11 @@ public:
// \ru Функции аппроксимации неявной кривой пересечения. \en Functions for approximation of implicit intersection curve.
/// \ru Дать пространственную аппроксимацию кривой пересечения. \en Get an approximate spatial curve for interpretation of the intersection.
const MbCurve3D * GetSpaceCurve() const;
const MbCurve3D * GetSpaceCurve( VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Дать пространственную аппроксимацию кривой пересечения. \en Get an approximate spatial curve for interpretation of the intersection.
MbCurve3D * SetSpaceCurve();
MbCurve3D * SetSpaceCurve( VERSION version = Math::DefaultMathVersion() );
/// \ru Дать точную пространственную копию или себя. \en Get exact spatial copy or itself.
const MbCurve3D & GetExactCurve( bool saveParams = true ) const;
const MbCurve3D & GetExactCurve( bool saveParams = true, VERSION version = Math::DefaultMathVersion() ) const;
/// \ru Удалить пространственную кривую. \en Remove a spatial curve.
void ReleaseSpaceCurve() const;
+3
View File
@@ -206,6 +206,9 @@ 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.
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
/** \} */
void SetBasisCurve( MbCurve & newCurve );
+3
View File
@@ -163,6 +163,9 @@ 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
// \ru Продлить кривую. \en Extend the curve. \~
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
private:
void operator = ( const MbTrimmedCurve3D & ); // \ru Не реализовано. \en Not implemented.
+15 -1
View File
@@ -20,7 +20,8 @@
class MbMathematicalNode; // \ru Математический узел \en The mathematical node
class MbListVars; // \ru Список переменных \en The list of variables
class MbUserFunc; // \ru Пользовательская функция \en Th user function
class MbUserFunc; // \ru Пользовательская функция \en The user function
class DefRange; // \ru Область определения функции \en The function domain
//------------------------------------------------------------------------------
@@ -188,6 +189,19 @@ public :
virtual bool IsCos ( double & a, double & b ) const; ///< \ru Имеет ли функция вид a * cos() + b. \en Function looks like a * cos() + b.
/** \brief \ru Получить область определения функции. \en Get function domain. \~
\details \ru Получить область определения функции для параметра с индексом ind. Метод вырезает из заданной области определения участки, где функция не определена. \n
\en Get the function domain for the parameter with index ind. The method cuts from the initial domain some parts where the function is not defined. \n \~
\param[in, out] dr - \ru Инициализируется некоторым начальным диапазоном. На выходе - пересечение этого диапазона с реальной областью определения функции.
\en It is initialized by some start range. The output value will be the intersection between this range and the true function domain. \~
\param[in] ind - \ru Индекс переменной, для которой ищется область определения.
\en An index of the variable, which the domain is searched for. \~
\param[in] stopOnBreak - \ru Остановить поиск если найден разрыв.
\en Searching will be stopped if the first break is found. \~
\return \ru Возвращает false если область определения найти не удалось.
\en Returns false if domain cannot be found. \~
*/
bool GetDefRange( DefRange & dr, size_t ind, bool stopOnBreak ) const;
private:
/// \ru Производные по параметру: параметр, значение, первая, вторая и третья производные \en Derivatives with respect to the parameter: parameter, value, first, second and third derivatives
+1
View File
@@ -94,6 +94,7 @@ public:
bool SetLimitParam( double newTMin, double newTMax ) override; // \ru Установить область изменения параметра \en Set range of parameter
void SetLimitValue( size_t n, double newValue ) override; // \ru Установить значение на конце ( 1 - в начале, 2 - в конце) \en Set the value at the end (1 - at beginning, 2 - at ending)
double GetLimitValue( size_t n ) const override; // \ru Дать значение на конце ( 1 - в начале, 2 - в конце) \en Get the value at the end (1 - at beginning, 2 - at ending)
void BreakPoints( std::vector<double> & vBreaks, double precision = ANGLE_REGION ) const override; // \ ru Определение точек излома функции. \en The determination of function smoothness break points.
private:
void SetOriginAndDerive();
+2
View File
@@ -205,6 +205,8 @@ public:
virtual bool InsertValue( double t, double newValue );
/// \ru Получить параметры особого поведения в интервале от t1 до t2 (для cos это Pi*n). \en Get the parameters of special behaviour on the interval from t1 to t2 (for cos it is Pi*n).
virtual void GetCharacteristicParams( std::vector<double> & tSpecific, double t1, double t2 );
/// \ ru Определение точек излома функции. \en The determination of function smoothness break points.
virtual void BreakPoints( std::vector<double> & vBreaks, double precision = ANGLE_REGION ) const;
/** \} */
+19 -3
View File
@@ -43,15 +43,31 @@ public:
MbResultType Status() const; ///< \ru Получить статус создания. \en Get the state of creation.
public:
/// \ru Создать символьную функцию. \en Create a symbolic function.
/// \deprecated \ru Метод устарел. \en The method is deprecated.
DEPRECATE_DECLARE_REPLACE( MbFunctionFactory::CreateAnalyticalFunction(const c3d::string_t &, const c3d::string_t &, double, double, bool) )
MbFunction * CreateAnalyticalFunction ( const c3d::string_t & data, MbListVars & vars,
const MbMathematicalNode & root,
const c3d::string_t & argument,
double tmin, double tmax ) const;
/// \ru Создать символьную функцию. \en Create a symbolic function.
/** \brief \ru Создать символьную функцию.
\en Create a symbolic function. \~
\details \ru Создать символьную функцию из ее строкового представления.\n
\en Create symbolic function from its string representation.\n \~
\param[in] data - \ru Строковое представление функции.
\en String representation of a function. \~
\param[in] argument - \ru Признак замкнутости.
\en String representation of a function argument. \~
\param[in] tmin - \ru Минимальное значение функции.
\en Minimum function value. \~
\param[in] tmax - \ru Максимальное значение функции.
\en Maximum function value. \~
\param[in] useFirstVar - \ru Флаг выбора используемой аналитической функции: при useFirstVar = true используется MdAnalyticalFunction; при useFirstVar = false используется MdCharacterFunction.
\en Flag for selecting the analytical function to use: if useFirstVar = true, MdAnalyticalFunction is used; when useFirstVar = false, MdCharacterFunction is used. \~
*/
MbFunction * CreateAnalyticalFunction ( const c3d::string_t & data,
const c3d::string_t & argument,
double tmin, double tmax ) const;
double tmin, double tmax, bool useFirstVar = false ) const;
/// \ru Создать постоянную функцию. \en Create a constant function.
MbFunction * CreateConstFunction ( double value ) const;
/// \ru Создать линейную функцию. \en Create a linear function.
+1 -1
View File
@@ -39,7 +39,7 @@ typedef bool ( *GCE_abort )(); ///< Query to interrupt calculations
\en Table of user-defined callbacks tuning the 2D-solver. \~
*/
//---
typedef struct
typedef struct GCE_CLASS
{
/*
General system callbacks;
+1 -1
View File
@@ -41,7 +41,7 @@ template <class Type> class RPArray;
*/
//////////////////////////////////////////////////////////////////////////////////////////
struct ItAlgebraicConstraint
struct GCE_CLASS ItAlgebraicConstraint
{
/// \ru Выдать координату с индексом crdIdx. \en Get coordinate with crdIdx index.
virtual ItGeomCoord * GetCoord( ptrdiff_t crdIdx ) const = 0;
+6 -6
View File
@@ -6,8 +6,8 @@
*/
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __GC_PRECISION_H
#define __GC_PRECISION_H
#ifndef __GCE_PRECISION_H
#define __GCE_PRECISION_H
#include <math_define.h>
#include <tool_cstring.h>
@@ -28,8 +28,8 @@ c3d_constexpr double GC_GOLDEN_SECTION = 0.381966011250105; // \ru Золото
//---
struct MbGeomTol
{
double lenTol; /// \ru Абсолютная погрешность в единицах длины. \en Linear resolution (in length units).
double angTol; /// \ru Абсолютная погрешность в радианах. \en Angular resolution (radians).
double lenTol; ///< \ru Абсолютная погрешность в единицах длины. \en Linear resolution (in length units).
double angTol; ///< \ru Абсолютная погрешность в радианах. \en Angular resolution (radians).
MbGeomTol( double lenEps, double angEps ) : lenTol(lenEps), angTol(angEps) {}
MbGeomTol( double tol ) : lenTol(tol), angTol(tol) {}
@@ -114,12 +114,12 @@ struct GCE_CLASS GcPrecision
};
//----------------------------------------------------------------------------------------
/// \ru Число из дисткретного множества {-1,0,1}. \en A number from discrete set {-1,0,1}.
/// \ru Число из дискретного множества {-1,0,1}. \en A number from discrete set {-1,0,1}.
//---
typedef int8 sign_t;
/*! @} */
#endif
#endif __GCE_PRECISION_H
// eof
+23 -24
View File
@@ -86,7 +86,7 @@ typedef enum
GCE_SPLINE, ///< \ru Сплайн на плоскости. \en Spline on plane.
GCE_PARAMETRIC_CURVE, ///< \ru Параметрическая кривая на плоскости. \en Parametric curve on plane.
GCE_BOUNDED_CURVE, ///< \ru Ограниченная двумя точками, кривая. \en Curve bounded by two points.
GCE_OFFSET_CURVE, ///< \ru Эквидистантная кривая. \en Equidistant curve.
GCE_OFFSET_CURVE, ///< \ru Эквидистантная кривая. \en Equidistant curve.
// \ru Дополнительные типы. \en Additional types.
GCE_LINE_SEGMENT, ///< \ru Отрезок прямой. \en Line segment.
@@ -302,7 +302,7 @@ typedef enum
//----------------------------------------------------------------------------------------
/// \ru Вернет 'true' в случае успешного результата. \en Return true, if the result code is successful.
// ---
inline bool OK( GCE_result resCode )
inline GCE_FUNC(bool) OK( GCE_result resCode )
{
return resCode == GCE_RESULT_Ok;
}
@@ -317,15 +317,15 @@ inline bool OK( GCE_result resCode )
typedef enum
{
GCE_BISEC_CLOSEST = 0 ///< \ru Неопределенное направление (ближайшее решение). \en Undefined direction (nearest solution).
, GCE_BISEC_MINUS = 1 ///< \ru Биссектриса вдоль суммы направлений прямых/отрезков. \en Bisector along the difference of directions of lines/segments.
, GCE_BISEC_PLUS = 2 ///< \ru Биссектриса вдоль разности нормалей прямых/отрезков. \en Bisector along sum of directions of lines/segments.
, GCE_BISEC_MINUS = 1 ///< \ru Биссектриса вдоль разности направлений векторов прямых/отрезков. \en Bisector along vector difference of the line directions.
, GCE_BISEC_PLUS = 2 ///< \ru Биссектриса вдоль суммы направляющих векторов прямых/отрезков. \en Bisector along vector sum of the line directions.
} GCE_bisec_variant;
//----------------------------------------------------------------------------------------
/// \ru Координаты вектора. \en Vector coordinates.
//---
struct GCE_vec2d
struct GCE_CLASS GCE_vec2d
{
double x, y;
GCE_vec2d() { x = y = 0; }
@@ -334,7 +334,7 @@ struct GCE_vec2d
//----------------------------------------------------------------------------------------
/// \ru Координаты вектора n-й размерности. \en Coordinates of n-dimensional vector.
//---
struct GCE_vecNd
struct GCE_CLASS GCE_vecNd
{
size_t size;
double * arg;
@@ -344,16 +344,16 @@ struct GCE_vecNd
//----------------------------------------------------------------------------------------
/// \ru Координаты точки на плоскости. \en Coordinates of a point on plane.
//---
struct GCE_point
struct GCE_CLASS GCE_point
{
double x, y; ///< \ru Декартовы координаты на плоскости \en Cartesian coordinates on the plane
double x, y;
GCE_point() { x = y = 0; }
};
//----------------------------------------------------------------------------------------
/// \ru Степень свободы точки. \en Degree of freedom of a point.
//---
struct GCE_point_dof
struct GCE_CLASS GCE_point_dof
{
int dof; ///< Degree of freedom of the point.
GCE_vec2d dir; ///< Direction of point moving freedom.
@@ -363,7 +363,7 @@ struct GCE_point_dof
//----------------------------------------------------------------------------------------
/// \ru Координаты прямой на плоскости. \en Coordinate of a line on the plane.
//---
struct GCE_line
struct GCE_CLASS GCE_line
{
GCE_point p;
GCE_vec2d norm;
@@ -373,7 +373,7 @@ struct GCE_line
//----------------------------------------------------------------------------------------
/// \ru Координаты окружности. \en Coordinates of a circle.
//---
struct GCE_circle
struct GCE_CLASS GCE_circle
{
GCE_point centre; ///< \ru Центр окружности. \en Circle center.
double radius; ///< \ru Радиус окружности. \en Circle radius.
@@ -383,7 +383,7 @@ struct GCE_circle
//----------------------------------------------------------------------------------------
/// \ru Координаты эллипса. \en Coordinates of an ellipse.
//---
struct GCE_ellipse
struct GCE_CLASS GCE_ellipse
{
GCE_point centre; ///< \ru Центр эллипса. \en Ellipse center.
GCE_vec2d direct; ///< \ru Направляющий вектор главной полуоси. \en Vector of the major semiaxis direction.
@@ -478,10 +478,9 @@ struct GCE_CLASS GCE_spline
on the base of dimensions. All 'dimensional constraints' associate geometric
objects with a number called a value of dimension. If the constraint is satisfied,
then its numerical parameter is equal to the value of dimension. Numerical parameter of the dimension
is specified by a fixed number (a constant) or by a numerical variable.\n
is specified by a fixed number (independent parameter) or by a numerical variable.\n
The solver of constraints treats two types of dimensions: Driving and variational.\n \~
\par \ru Виды размеров
"Управляющий" размер - это размерное ограничение, задающее положение
@@ -518,13 +517,13 @@ struct GCE_CLASS GCE_spline
If var != GCE_NULL_V, it means that the dimension is "variational"
If var == GCE_NULL_V, then the value of dimension equals dimValue, else the value of dimension
is identically equal to a numerical variable 'var', i.e. the dimension is driving; \~
is identically equal to a numerical variable 'var', i.e. the dimension is driving. \~
*/
//---
struct GCE_dim_pars
struct GCE_CLASS GCE_dim_pars
{
var_item var; ///< \ru Значение размера, заданное переменной. \en Value of dimension specified by the variable.
double dimValue; ///< \ru Значение размера. \en Value of dimension.
double dimValue; ///< \ru Значение размера, когда var == GCE_NULL_V. \en Value of dimension when var == GCE_NULL_V.
GCE_dim_pars()
: dimValue( 0.0 )
@@ -570,7 +569,7 @@ struct GCE_dim_pars
Angular dimension can be specified for any combination of linear objects. \~
*/
//---
struct GCE_adim_pars
struct GCE_CLASS GCE_adim_pars
{
GCE_dim_pars dPars; ///< \ru Общие настройки размера. \en General settings of dimension.
double factor; ///< \ru Множитель для пересчета из угла в переменную. \en Factor for converting from angle to variable.
@@ -594,7 +593,7 @@ struct GCE_adim_pars
Now it is used only for #GCE_AddDirectedDistance2P. \n \~
*/
//---
struct GCE_ldim_pars
struct GCE_CLASS GCE_ldim_pars
{
GCE_dim_pars dPars; ///< \ru Числовое значение размера, заданное переменной или числом double. \en Numeric value of dimension specified as a variable or simple double.
double dirAngle; ///< \ru Направление измерения (Используется только для ориентируемых размеров) \en Direction of dimension (It is used for oriented dimensions only)
@@ -613,7 +612,7 @@ struct GCE_ldim_pars
\en The lower bound lBnd must be no more than the upper bound rBnd.
*/
//---
struct GCE_interval
struct GCE_CLASS GCE_interval
{
double lBnd; ///< \ru Минимальное значение переменной. \en Minimum value of a variable.
double rBnd; ///< \ru Максимальное значение переменной. \en Maximum value of a variable.
@@ -635,7 +634,7 @@ struct GCE_interval
\see #GCE_PrepareDraggingPoint, #GCE_MovePoint.
*/
//---
struct GCE_dragging_point
struct GCE_CLASS GCE_dragging_point
{
geom_item geom; ///< \ru Дескриптор геометрического объекта. \en Descriptor of the geometric object.
geom_item point; ///< \ru Дескриптор контрольной точки геометрического объекта. \en Descriptor of the geometric object control point.
@@ -649,7 +648,7 @@ struct GCE_dragging_point
\note Used only for testing
*/
//---
struct GCE_diagnostic_pars
struct GCE_CLASS GCE_diagnostic_pars
{
size_t consCount; // A number of registered constraints.
size_t inConsCount; // A number of internal constraints.
@@ -663,7 +662,7 @@ struct GCE_diagnostic_pars
\note Used only for testing
*/
//---
struct GCT_diagnostic_pars
struct GCT_CLASS GCT_diagnostic_pars
{
size_t consCount; // A number of registered constraints.
size_t inConsCount; // A number of internal constraints.
@@ -688,7 +687,7 @@ struct GCT_diagnostic_pars
The data structure is deprecated.
*/
//---
struct geom_point
struct GCE_CLASS geom_point
{
geom_item geom; ///< \ru Дескриптор геометрического объекта \en Descriptor of the geometric object
point_type pntName; ///< \ru Имя контрольной точки геометрического объекта \en Name of the geometric object control point
+1 -1
View File
@@ -38,7 +38,7 @@
\ingroup GCM_3D_ObjectAPI
*/
//---
struct ItGCBlackbox
struct GCM_CLASS ItGCBlackbox
{
/// \ru Выдать независимые геометрические объекты. \en The function collects in the array independent geoms of a blackbox.
virtual void CollectMyInGeoms( IFC_Array<ItGeom> & ) const = 0;
+4 -4
View File
@@ -24,7 +24,7 @@ class MtConstraintNode;
//----------------------------------------------------------------------------------------
/// \ru Ось планарного угла. \en Axis of a planar angle.
//---
struct GCM_geom_axis
struct GCM_CLASS GCM_geom_axis
{
MbVector3D axis; ///< \ru Направляющий вектор оси планарного угла (задана в ЛСК тела geomPtr). \en Vector of planar angle axis direction (specified in LCS of geomPtr solid).
const ItGeom * geomPtr; ///< \ru Тело, которому принадлежит ось планарного угла. \en solid the axis of a planar angle belongs to.
@@ -37,7 +37,7 @@ struct GCM_geom_axis
//----------------------------------------------------------------------------------------
/// \ru Структура параметров ограничения. \en Structure of constraint parameters.
//---
struct GCM_c_params
struct GCM_CLASS GCM_c_params
{
VERSION m_Version; ///< \ru Версия создания ограничения. \en Version of the constraint creation.
GCM_c_type m_Type; ///< \ru Тип сопряжения. \en Type of mating.
@@ -335,7 +335,7 @@ inline ItGeomPtr ItConstraintItem::DependentGeom() const
\ingroup GCM_3D_ObjectAPI
*/
//---
struct ItMateTransmission
struct GCM_CLASS ItMateTransmission
{
enum Motion ///< \ru Тип движения. \en Type of motion.
{
@@ -381,7 +381,7 @@ struct ItMateTransmission
\ingroup GCM_3D_ObjectAPI
*/
//---
struct ItCamMechanism
struct GCM_CLASS ItCamMechanism
{
enum Geom { // \ru Нумерация должна быть согласована с нумерацией участников кинематической пары ItMateTransmission \en Numeration should be compatible with the numeration of components of the kinematic pair ItMateTransmission
Cam = 1, ///< \ru Кулачок(1-е тело); \en Cam (1st solid);
+1 -1
View File
@@ -211,7 +211,7 @@ MtGeomVariant & MtGeomVariant::Assign( GeomDS * gDs )
\ingroup GCM_3D_ObjectAPI
*/
//---
class MtMatingGeometry
class GCM_CLASS MtMatingGeometry
{
public:
enum Orient ///< \ru Трехзначное свойство ориентации \en Three-valued property of orientation
+1 -1
View File
@@ -301,7 +301,7 @@ inline bool MtArgument::operator == ( const ItGeom * geom ) const
//----------------------------------------------------------------------------------------
//
// ---
struct ItConstraintsEnum : public MtRefItem
struct GCM_CLASS ItConstraintsEnum : public MtRefItem
{
virtual const ItConstraintItem * GetDataAndGo() = 0;
virtual void Restart() = 0;
+11 -14
View File
@@ -23,7 +23,7 @@ class MtGeomSolver;
//----------------------------------------------------------------------------------------
// Параметры сопряжений.
// ---
struct TMParameters
struct GCM_CLASS TMParameters
{
typedef GCM_alignment AlignCondition;
@@ -46,7 +46,7 @@ struct TMParameters
//----------------------------------------------------------------------------------------
/// \ru Размеры кирпича. \en Box sizes.
// ---
struct TMBoxSize
struct GCM_CLASS TMBoxSize
{
public:
double length; ///< \ru Длина (вдоль OX). \en Length (along OX).
@@ -73,7 +73,7 @@ public:
//----------------------------------------------------------------------------------------
// \ru Элементарный кирпич для наложения сопряжений. \en Elementary box for the overlay of mates.
// ---
class MATH_CLASS TMBox : public ItGeom
class GCM_CLASS TMBox : public ItGeom
, public MtRefItem
{
public:
@@ -127,8 +127,8 @@ private:
//----------------------------------------------------------------------------------------
// \ru Наложение сопряжения на 2 кирпича. \en Overlaying mate onto two boxes.
// ---
class MATH_CLASS MtBoxConstraint : public MtRefItem
, public ItConstraintItem
class GCM_CLASS MtBoxConstraint : public MtRefItem
, public ItConstraintItem
{
SPtr<TMBox> box1; // \ru Кирпич 1. \en Box 1.
SPtr<TMBox> box2; // \ru Кирпич 2. \en Box 2.
@@ -172,7 +172,6 @@ private:
virtual MtGeomVariant _LinkageItem( int geomNb ) const;
private:
MtBoxConstraint();
MtBoxConstraint( const MtBoxConstraint & );
MtBoxConstraint & operator = ( const MtBoxConstraint & );
};
@@ -180,8 +179,8 @@ private:
//----------------------------------------------------------------------------------------
// \ru Земля. \en Ground.
// ---
class MATH_CLASS TMGround : public ItGeom
, public MtRefItem
class GCM_CLASS TMGround : public ItGeom
, public MtRefItem
{
private:
MbPlacement3D place;
@@ -208,8 +207,8 @@ private:
//----------------------------------------------------------------------------------------
// \ru Управление положением в сборке. \en Position control in the assembly.
// ---
struct MATH_CLASS TMBoxPositioner : public MtRefItem
, public ItPositionManager
struct GCM_CLASS TMBoxPositioner : public MtRefItem
, public ItPositionManager
{
private:
TMGround & ground;
@@ -229,7 +228,6 @@ public:
virtual refcount_t Release() const { return MtRefItem::Release(); }
private:
TMBoxPositioner();
TMBoxPositioner & operator = ( const TMBoxPositioner & );
};
@@ -239,7 +237,7 @@ typedef std::vector<MtBoxVector> MtBlocksVector;
//----------------------------------------------------------------------------------------
/// \ru Генератор сборок. \en Assembly generator.
// ---
class MATH_CLASS AssemblyGenerator
class GCM_CLASS AssemblyGenerator
{
public:
enum TMMateType ///< \ru Тип связи между блоками в сборке. \en Type of connection between the bricks in the assembly.
@@ -267,10 +265,9 @@ private:
MtGeomSolver & manager; ///< \ru Решатель сборки. \en Solver of the assembly.
public:
AssemblyGenerator( MtGeomSolver & m ) : manager( m ), dimConstrs() {}
explicit AssemblyGenerator( MtGeomSolver & m ) : manager( m ), dimConstrs() {}
private:
AssemblyGenerator();
AssemblyGenerator( const AssemblyGenerator & );
AssemblyGenerator & operator = ( const AssemblyGenerator & );
+1 -1
View File
@@ -20,7 +20,7 @@ typedef GCM_dependency MtJointStatus;
//----------------------------------------------------------------------------------------
//
// ---
inline MtJointStatus InversionOf( MtJointStatus jointDir )
inline GCM_FUNC(MtJointStatus) InversionOf( MtJointStatus jointDir )
{
if ( jointDir == GCM_2ND_DEPENDENT )
return GCM_1ST_DEPENDENT;
+5 -5
View File
@@ -28,7 +28,7 @@
\en The integer value of the priority of the error code to the user \~
*/
//---
inline int PriorityLevel( GCM_result resCode )
inline GCM_FUNC(int) PriorityLevel( GCM_result resCode )
{
switch ( resCode )
{
@@ -101,7 +101,7 @@ inline int PriorityLevel( GCM_result resCode )
//----------------------------------------------------------------------------------------
//
// ---
inline bool OK( GCM_result res )
inline GCM_FUNC(bool) OK( GCM_result res )
{
return res == GCM_RESULT_Ok;
}
@@ -109,7 +109,7 @@ inline bool OK( GCM_result res )
//----------------------------------------------------------------------------------------
//
// ---
inline GCM_result ResCode( bool ok )
inline GCM_FUNC(GCM_result) ResCode( bool ok )
{
return ok ? GCM_RESULT_Ok : GCM_RESULT_None;
}
@@ -123,7 +123,7 @@ inline GCM_result ResCode( bool ok )
attention before another error.
*/
//---
inline GCM_result WorseResult( GCM_result res1, GCM_result res2 )
inline GCM_FUNC(GCM_result) WorseResult( GCM_result res1, GCM_result res2 )
{
return PriorityLevel( res1 ) > PriorityLevel( res2 ) ? res1 : res2;
}
@@ -137,7 +137,7 @@ inline GCM_result WorseResult( GCM_result res1, GCM_result res2 )
*/
//---
inline GCM_result & operator << ( GCM_result & sumRes, const GCM_result r )
inline GCM_FUNC(GCM_result &) operator << ( GCM_result & sumRes, const GCM_result r )
{
if ( r == GCM_RESULT_None )
{
+4 -4
View File
@@ -42,7 +42,7 @@ struct CNodeIterator;
If dof = 3, then the point has a complete freedom of movement, a value of MtTransDof::vector is not significant.\n \~
*/
//---
struct MtTransDof
struct GCM_CLASS MtTransDof
{
int dof; ///< \ru Степень свободы. \en Degree of freedom.
MbVector3D vector; ///< \ru Направление прямой или нормаль плоскости, в зависимости от значения dof. \en Direction of line or normal of plane depending on the value of dof.
@@ -68,7 +68,7 @@ public:
of the function #GetClosestParameters. \~
*/
//---
struct MtMateParameters
struct GCM_CLASS MtMateParameters
{
double myDimVal; ///< \ru Числовой параметр размерного сопряжения. \en The numerical parameter of dimensional mate.
GCM_alignment myAlignVal; ///< \ru Условие выравнивания сопрягаемой геометрии. \en The alignment condition of mating geometry.
@@ -107,7 +107,7 @@ public:
4) The dimension value is equal to the distance between points. \n \~
*/
//---
struct MtLDimensionTraits
struct GCM_CLASS MtLDimensionTraits
{
MbCartPoint3D firstPoint; ///< \ru Первая точка линейного размера. \en The first point of linear dimension.
MbCartPoint3D secondPoint; ///< \ru Вторая точка линейного размера. \en The second point of linear dimension.
@@ -146,7 +146,7 @@ struct MtLDimensionTraits
around axis axisZ to coincide it with the second vector.\n \~
*/
//---
struct MtADimensionTraits
struct GCM_CLASS MtADimensionTraits
{
MbVector3D firstVector; ///< \ru Первый вектор. \en The first vector.
MbVector3D secondVector; ///< \ru Второй вектор. \en The second vector.
+9 -8
View File
@@ -10,6 +10,7 @@
#define __GCM_TYPES_H
#include <system_types.h>
#include <math_define.h>
class MtGeomSolver;
class MbPlacement3D;
@@ -18,7 +19,7 @@ class MbPlacement3D;
#if ( GCM_ID_TYPE == 1 )
typedef struct { uint32 id; } MtObjectId;
struct GCM_CLASS MtObjectId { uint32 id; };
const MtObjectId _GCM_NULL = { SYS_MAX_UINT32 };
const MtObjectId _GCM_GROUND = { 0 };
@@ -349,17 +350,17 @@ typedef enum
//----------------------------------------------------------------------------------------
/// \ru Координаты 3D-вектора. \en Coordinates of 3D-vector.
//---
struct GCM_vec3d { double x, y, z; };
struct GCM_CLASS GCM_vec3d { double x, y, z; };
//----------------------------------------------------------------------------------------
/// \ru Координаты точки 3D пространства. \en Coordinates of point in three-dimensional space.
//---
struct GCM_point { double x, y, z; };
struct GCM_CLASS GCM_point { double x, y, z; };
//----------------------------------------------------------------------------------------
/// \ru Интервал допустимых значений линейного или углового интервального размера. \en The range of allowable values for a linear or angular interval dimension.
//---
struct GCM_interval { double lBnd, rBnd; };
struct GCM_CLASS GCM_interval { double lBnd, rBnd; };
//----------------------------------------------------------------------------------------
/** \brief \ru Структура полей данных, представляющих геометрический объект.
@@ -384,7 +385,7 @@ struct GCM_interval { double lBnd, rBnd; };
{ GCM_LCS origin axisZ axisX axisY } - local coordinate system that specify a solid position.\n
*/
//---
struct GCM_g_record
struct GCM_CLASS GCM_g_record
{
GCM_g_type type; ///< \ru Тип геометрии. \en Type of geometric object.
GCM_point origin; ///< \ru Точка позиционирования геометрического объекта. \en Location of a geometric object.
@@ -401,7 +402,7 @@ struct GCM_g_record
\sa #GCM_dependent_geom_func, #GCM_dependent_func
*/
//---
struct GCM_extra_param
struct GCM_CLASS GCM_extra_param
{
size_t funcId; // integral identifier of a user-defined callback
void * funcData; // pointer to an application data structure
@@ -430,7 +431,7 @@ typedef GCM_dependent_func GCM_dependent_geom_func;
//----------------------------------------------------------------------------------------
/// \~ Argument of constraint to record in 'GCM_c_record' data.
//--
struct GCM_c_arg
struct GCM_CLASS GCM_c_arg
{
union
{
@@ -512,7 +513,7 @@ struct GCM_c_arg
{ GCM_UNKNOWN }
Sample of the journal line: (GCM_AddConstraint (GCM_COINCIDENT #1 #2 GCM_CLOSEST) #3)
*/
struct GCM_c_record
struct GCM_CLASS GCM_c_record
{
static const size_t argsN = 5;
GCM_c_type type; // \ru Тип ограничения. \en Type of constraint.
+51 -60
View File
@@ -1,10 +1,10 @@
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Хэш.
\en Hash. \~
\brief \ru Хэш-функция с вероятностью совпадения значений 1/(2^32).
\en Hash-function with probability of collisions 1/(2^32). \~
*/
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
#ifndef __HASH32_H
#define __HASH32_H
@@ -17,18 +17,14 @@ class writer;
class reader;
////////////////////////////////////////////////////////////////////////////////
//
//----------------------------------------------------------------------------------------
// \ru Определение простого имени \en Definition of simple name
//
////////////////////////////////////////////////////////////////////////////////
// Activate to check compilation
// #define SIMPLENAME_AS_CLASS
#ifndef SIMPLENAME_AS_CLASS
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Определение простого имени.
\en Definition of simple name. \~
\details \ru Определение простого имени. \n
@@ -38,7 +34,7 @@ class reader;
// ---
typedef uint32 SimpleName;
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Сравнить простые имена.
\en Compare simple names. \~
\ingroup Base_Tools
@@ -50,7 +46,7 @@ int SimpleNameCompare( const SimpleName & h1, const SimpleName & h2 ) {
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Проверить валидность простого имени.
\en Check the simple name correctness. \~
\ingroup Base_Tools
@@ -130,21 +126,21 @@ namespace c3d // namespace C3D
\{
*/
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Максимально допустимое простое имя.
\en Maximum allowable simple name. \~
*/
//---
const SimpleName SIMPLENAME_MAX = size_t(SYS_MAX_UINT32);
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Значение используемое, в качестве "неопределенного", еще не назначенного имени.
\en A value is used as "undefined", not yet assigned name. \~
*/
//---
const SimpleName UNDEFINED_SNAME = size_t(SYS_MAX_UINT32);
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Начальное число для хэш-функции.
\en The initial value for the hash-function. \~
*/
@@ -152,30 +148,23 @@ const SimpleName UNDEFINED_SNAME = size_t(SYS_MAX_UINT32);
const SimpleName INIT_HASH32_VAL = size_t( 31415926 );
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Золотое сечение - произвольное число для хэш-функции.
\en Golden section - an arbitrary number for hash-function. \~
*/
// ---
c3d_constexpr uint GOLDENRATIO = 0x9e3779b9;
c3d_constexpr uint32 GOLDENRATIO = 0x9e3779b9;
/**
\}
*/
////////////////////////////////////////////////////////////////////////////////
//
// \ru hash-функция с вероятностью совпадения значений 1/(2^^32) \en hash-function with probability of values coincidence 1/(2^32)
//
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
// \ru Обратимая 32-битная смесь для любых трёх 32-битных чисел a, b, c. \en Invertible 32-bit mixture for any three 32-bit numbers a, b, c.
// \ru Вероятность изменения значений в любом случае равна как минимум одной четвёртой. \en In any case the probability of values modification is equal to 1/4 at least.
//----------------------------------------------------------------------------------------
// \ru Обратимая 32-битная смесь для любых трёх 32-битных чисел a, b, c. \en Reversible 32-bit mixture for any three 32-bit numbers a, b, c.
// \ru Вероятность изменения значений в любом случае равна как минимум одной четвёртой. \en In any case the probability of values modification is equal to 1/4 at least.
// ---
inline
void mix( uint & a, uint & b, uint & c )
void mix( uint32 & a, uint32 & b, uint32 & c )
{
a -= b; a -= c; a ^= (c >> 13);
b -= c; b -= a; b ^= (a << 8 );
@@ -189,7 +178,7 @@ void mix( uint & a, uint & b, uint & c )
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш-функция.
\en Hash-function. \~
\details \ru Хэш по последовательности байт и предыдущему хэшу. \n
@@ -204,6 +193,8 @@ void mix( uint & a, uint & b, uint & c )
k - A pointer to the beginning of the bytes sequence. \n
length - Number of bytes in the sequence. \n
_c - The previous hash or an arbitrary value. \n \~
\note \ru Алгоритм основан на хэш-функций Дженкинса.
\en The algorithm is based on Bob Jenkins hash function. \~
\return \ru Возвращает 32-битное число.
\en Returns 32-bit number. \~
\ingroup Base_Tools
@@ -218,19 +209,19 @@ SimpleName Hash32( uint8 * k, size_t length, SimpleName _c = INIT_HASH32_VAL )
size_t len = length;
#ifndef SIMPLENAME_AS_CLASS
uint c = _c;
uint32 c = _c;
#else // SIMPLENAME_AS_CLASS
uint c = LoUint32( (size_t)_c );
uint32 c = LoUint32( (size_t)_c );
#endif // SIMPLENAME_AS_CLASS
uint b = GOLDENRATIO; // \ru Золотое сечение (произвольное значение) \en Golden ratio (an arbitrary value)
uint a = GOLDENRATIO; // \ru Золотое сечение (произвольное значение) \en Golden ratio (an arbitrary value)
uint32 b = GOLDENRATIO; // \ru Золотое сечение (произвольное значение).
uint32 a = GOLDENRATIO; // \en Golden ratio (an arbitrary value).
// handle most of the key
while ( len >= 12 )
{
a += ((uint)k[0] + ((uint)k[1]<<8) + ((uint)k[2] <<16) + ((uint)k[3] <<24)); // SKIP_SA
b += ((uint)k[4] + ((uint)k[5]<<8) + ((uint)k[6] <<16) + ((uint)k[7] <<24)); // SKIP_SA
c += ((uint)k[8] + ((uint)k[9]<<8) + ((uint)k[10]<<16) + ((uint)k[11]<<24)); // SKIP_SA
a += ((uint32)k[0] + ((uint32)k[1]<<8) + ((uint32)k[2] <<16) + ((uint32)k[3] <<24)); // SKIP_SA
b += ((uint32)k[4] + ((uint32)k[5]<<8) + ((uint32)k[6] <<16) + ((uint32)k[7] <<24)); // SKIP_SA
c += ((uint32)k[8] + ((uint32)k[9]<<8) + ((uint32)k[10]<<16) + ((uint32)k[11]<<24)); // SKIP_SA
mix ( a, b, c );
k += 12;
len -= 12;
@@ -238,31 +229,31 @@ SimpleName Hash32( uint8 * k, size_t length, SimpleName _c = INIT_HASH32_VAL )
// \ru Значение последних одиннадцати байт. \en The values of the last eleven bytes.
c += LoUint32( length ); // \ru Первый байт с резервируется для length \en The first byte c is reserved for 'length'
switch ( len ) // \ru Случаи \en Cases
switch ( len )
{
case 11: c += ((uint)k[10]<<24); // SKIP_SA
case 10: c += ((uint)k[9] <<16); // SKIP_SA
case 9 : c += ((uint)k[8] <<8 ); // SKIP_SA
case 11: c += ((uint32)k[10]<<24); // SKIP_SA
case 10: c += ((uint32)k[9] <<16); // SKIP_SA
case 9 : c += ((uint32)k[8] <<8 ); // SKIP_SA
// \ru Первый байт с резервируется для length \en The first byte c is reserved for 'length'
case 8 : b += ((uint)k[7] <<24); // SKIP_SA
case 7 : b += ((uint)k[6] <<16); // SKIP_SA
case 6 : b += ((uint)k[5] <<8 ); // SKIP_SA
case 5 : b += ((uint)k[4]); // SKIP_SA
case 4 : a += ((uint)k[3] <<24); // SKIP_SA
case 3 : a += ((uint)k[2] <<16); // SKIP_SA
case 2 : a += ((uint)k[1] <<8 ); // SKIP_SA
case 1 : a += ((uint)k[0]); // SKIP_SA
case 8 : b += ((uint32)k[7] <<24); // SKIP_SA
case 7 : b += ((uint32)k[6] <<16); // SKIP_SA
case 6 : b += ((uint32)k[5] <<8 ); // SKIP_SA
case 5 : b += ((uint32)k[4]); // SKIP_SA
case 4 : a += ((uint32)k[3] <<24); // SKIP_SA
case 3 : a += ((uint32)k[2] <<16); // SKIP_SA
case 2 : a += ((uint32)k[1] <<8 ); // SKIP_SA
case 1 : a += ((uint32)k[0]); // SKIP_SA
// \ru case 0: Ничего не добавляем. \en case 0: Add nothing.
}
mix( a, b, c );
_c = (uint)c;
_c = static_cast<SimpleName>( c );
return _c;
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш указателя.
\en Hash of the pointer. \~
\details \ru Хэш указателя. \n
@@ -274,7 +265,7 @@ template<typename T>
SimpleName Hash32Ptr( T * k ) { return c3d::Hash32( reinterpret_cast<uint8 *>(&k), sizeof(T*) ); }
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш строки.
\en Hash of the string. \~
\details \ru Хэш строки. \n
@@ -288,7 +279,7 @@ SimpleName HashStr( const c3d::string_t & str ) {
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш строки.
\en Hash of the string. \~
\details \ru Хэш строки. \n
@@ -304,7 +295,7 @@ SimpleName HashStr( const char * c_str )
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш строки.
\en Hash of the string. \~
\details \ru Хэш строки. \n
@@ -328,7 +319,7 @@ SimpleName HashStr( const wchar_t * w_str )
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш с типом строки.
\en Hash with a string type. \~
\details \ru Хэш с типом строки-источника. \n
@@ -380,7 +371,7 @@ public:
};
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш пустой строки.
\en Hash of the empty string. \~
\details \ru Хэш пустой строки. \n
@@ -391,7 +382,7 @@ public:
const StrHash NullStrHash( 0, StrHash::htp_undef );
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш при отсутствии строки.
\en Hash for the string absence. \~
\details \ru Хэш при отсутствии строки. \n
@@ -402,7 +393,7 @@ const StrHash NullStrHash( 0, StrHash::htp_undef );
const StrHash UndefStrHash( SimpleName(-1), StrHash::htp_undef );
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
/** \brief \ru Хэш двух простых имен.
\en Hash of two simple names. \~
\details \ru Хэш двух простых имен. \n
@@ -428,7 +419,7 @@ SimpleName Hash32SN( SimpleName k1, SimpleName k2 )
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// \ru Проверка на равенство \en The check for equality
//---
inline int StrHash::operator == ( const StrHash & with ) const
@@ -438,7 +429,7 @@ inline int StrHash::operator == ( const StrHash & with ) const
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// \ru Проверка на равенство char строкой \en Check for equality of char by string
//---
inline int StrHash::operator == ( const char * with ) const
@@ -454,7 +445,7 @@ inline int StrHash::operator == ( const char * with ) const
}
//------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// \ru Проверка на равенство с wchar_t строкой \en Check for equality with wchar_t by string
//---
inline int StrHash::operator == ( const wchar_t * with ) const
+1 -5
View File
@@ -939,15 +939,11 @@ inline void MbSymbolVestige::SetMatrix( const MbMatrix & initMatrix )
с селектированием на видимые и невидимые.\n
\en The set of arrays which are given after getting off all solid(s) lines
with the separation to visible and invisible.\n \~
\warning \ru Доступ к полям структуры будет ограничен начиная с версии C3D_2022_VERSION.
Необходимо использовать соответствующие методы доступа к данным.
\en Direct access to structure fields will be limited starting from C3D_2022_VERSION.
Use corresponding methods to data access.
\ingroup Mapping
*/
// ---
struct MATH_CLASS MbVEFVestiges {
//protected:
protected:
PArray<MbVertexVestige> vertexVestiges; ///< \ru Следы вершин. \en Vestiges of vertices.
PArray<MbEdgeVestige> edgeVestiges; ///< \ru Следы ребер. \en Vestiges of edges.
PArray<MbFaceVestige> faceVestiges; ///< \ru Следы граней. \en Vestiges of faces.
+17
View File
@@ -294,6 +294,13 @@ public :
*/
bool Contains( const MbCube & ) const;
/// \ru Проверить, содержит ли один параллелепипед другой. \en Check whether a box is inside another box or not.
/**
\return \ru true, если данный габаритный параллелепипед содержит другой.
\en Returns true if a box contains another. \~
*/
bool Contains( const MbCube &, double eps ) const;
/// \ru Пересекается ли габаритный параллелепипед с другим параллелепипедом. \en Whether the box intersects another box or not.
/**
\param[in] other - \ru Другой параллелепипед.
@@ -771,6 +778,16 @@ bool MbCube::Contains( const MbCube & box ) const
}
//------------------------------------------------------------------------------
/// \ru Проверить, содержит ли один параллелепипед другой. \en Check whether a box is inside another box or not.
//---
inline
bool MbCube::Contains( const MbCube & box, double eps ) const
{
return Contains( box.pmin, eps ) && Contains( box.pmax, eps );
}
//------------------------------------------------------------------------------
// \ru Нормализовать себя \en Normalize itself
// ---
+16 -3
View File
@@ -12,6 +12,7 @@
#include <mb_enum.h>
#include <mb_smooth_nurbs_fit_curve.h>
#include <io_define.h>
#include <mb_cart_point3d.h>
#include <mb_cart_point.h>
@@ -575,8 +576,10 @@ public:
size_t clearanceNoisyIteration; ///< \ru Количество итераций сглаживания зашумленных точек. \en Number of iterations of smoothing noisy points.
double scaleParam; ///< \ru Параметр масштабирования. \en Scaling parameter.
MbeFairWarning warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType error; ///< \ru Ошибка о работе. \en The operation error. \~
/// \ru Выходные параметры. \en Output parameters.
MbeFairWarning warning; ///< \ru Предупреждение о работе. \en The operation warning. \~
MbResultType error; ///< \ru Ошибка о работе. \en The operation error. \~
MbApproxError errInfo; ///< \ru Сведения об ошибке аппроксимации. \en Approximation error information.
#ifdef C3D_DEBUG_FAIR_CURVES
/*DEBUG*/ FILE *prt;
@@ -602,7 +605,7 @@ public:
switchEndTangents( false ), switchEndCurvature( false ),
firstCurvature( 0.0 ), lastCurvature( 0.0 ), smoothTorsion( false ),
clearanceNoisy( 0.002 ), clearanceNoisyIteration( 200 ), scaleParam( 1.0 ),
warning( fwarn_Success ), error( rt_Success ){}
warning( fwarn_Success ), error( rt_Success ), errInfo() {}
~MbFairCurveData() {}
@@ -655,6 +658,16 @@ public:
return *this;
}
/// \ru Инициализация создания плавной кривой. \en Initializing a creation of a fair curve.
void Init( const MbeFairCurveType & ct, const MbeFairDataType & dt = fairData_None ) {
_curveType = ct; _dataType = dt; _changeType = fairChange_None;
}
/// \ru Инициализация изменения плавной кривой. \en Initializing a modification of a fair curve.
void Init( const MbeFairChangeType & ct ) {
_curveType = fairCrvType_None; _dataType = fairData_None; _changeType = ct;
}
/// \ru Получить тип создаваемой плавной кривой. \en Get the type of a fair curve to be created.
const MbeFairCurveType & CurveType() const { return _curveType; }
+3 -3
View File
@@ -901,10 +901,10 @@ enum MbePairObjectsSelection
// ---
enum class MbeCurveExtensionWays : unsigned int
{
cew_Linear = 0, ///< \ru Кривая продлевается по касательной в крайней точке. \en The curve is extended by tangent to the boundary point. \~
cew_Circular = 1, ///< \ru Кривая продлевается по дуге, радиус которой равен радиусу кривизны кривой в крайней точке. \en The curve is extended by an arc with radius equal to its curvature radius in the boundary point. \~
cew_Linear = 0, ///< \ru Кривая продлевается по касательной в крайней точке. \en The curve is extended by tangent at the boundary point. \~
cew_Circular = 1, ///< \ru Кривая продлевается по соприкасающейся окружности в крайней точке. \en The curve is extended by an osculating circle at the boundary point. \~
cew_CommonNatural = 2, ///< \ru Если существует уравнение кривой, то расширяется диапазон изменения параметра в уравнении. В противном случае, результатом будет гладко стыкующийся контур, распрямляющийся в бесконечности. \en If there exist the curve equation then the range of a parameter change will be extended. Otherwise, the result will be a smoothly connected contour straightening at the end. ~
cew_CommonNatural = 2, ///< \ru Удлинение производится с сохранением параметрической зависимости самой кривой (для кусочно заданной кривой подразумевается зависимость в окрестности удлиняемого конца). Для кривых, не имеющих аналитической зависимости (например, точки которых уточняются методом Ньютона), удлиняющий участок подбирается таким образом, чтобы в месте стыковки обеспечивалась гладкость не хуже C3. \en The curve is extended with keeping its parametric equation (if the curve is piecewise-defined then the definition in the neighborhood at the boundary point is meant). If the curve does not have an analytical representation (e.g. its points are specified by the Newton method) then the extending segment will be computed in order to provide a smoothness at the joining point not worse C3. ~
cew_BaseNatural = 3, ///< \ru Пока не используется. \en Currently, it is not implemented. \~
// \ru !!! СТРОКИ ВСТАВЛЯТЬ СТРОГО ПЕРЕД ЭТОЙ СТРОКОЙ !!!! \en !!! INSERT LINES STRICTLY BEFORE THIS LINE !!!!
+20 -20
View File
@@ -30,8 +30,8 @@ private: // \ru данные \en data
Vector * tangentDer2; ///< \ru Вторая производная касательного вектора. \en Second derivative of tangent vector.
SArray<ptrdiff_t> * changedPnts; ///< \ru Индексы измененных точек. \en Indices of changed points.
MbeMatingType type; ///< \ru Тип сопряжения. \en Conjugation type.
bool movePnts; ///< \ru Двигать исходные точки или добавлять. \en Move or add source points.
bool attach; ///< \ru Данные служат для стыковки сплайна с кривой. \en Data for a spline and a curve connection.
bool movePnts; ///< \ru Флаг разрешения смещения исходных контрольных точек (иначе будут добавлены новые контрольные точки). \en Source control points offset allow flag (otherwise new control points will be added).
bool attach; ///< \ru Флаг может использоваться для начальной стыковки сплайна с кривой. \en Flag can be used for an initial mating of spline and a curve.
public:
/// \ru Конструктор по умолчанию. \en Default constructor.
@@ -90,7 +90,7 @@ public:
/// \ru Нормализовать касательную в случае стыковки. \en Normalize tangent in case of connection.
void NormalizeAttachTangent();
/// \ru Дать фактическую степень гладкости визуального перехода. \en Get the actual smoothness degree of visual transition.
size_t GetSmoothDegree() const;
size_t GetSmoothDegree() const;
/// \ru Выдать свойства объекта. \en Get properties of the object.
void GetProperties( MbProperties & );
@@ -108,10 +108,10 @@ private: // \ru не реализовано \en not implemented
template <class Vector>
MbPntMatingData<Vector>::MbPntMatingData()
: MbRefItem ( )
, tangent ( nullptr )
, tangentDer1 ( nullptr )
, tangentDer2 ( nullptr )
, changedPnts ( nullptr )
, tangent ( nullptr )
, tangentDer1 ( nullptr )
, tangentDer2 ( nullptr )
, changedPnts ( nullptr )
, type ( trt_Position )
, movePnts ( false )
, attach ( false )
@@ -130,14 +130,14 @@ MbPntMatingData<Vector>::MbPntMatingData( const MbeMatingType nType,
SArray<ptrdiff_t> *& nChangedPnts,
bool nMovePnts,
bool nAttach )
: MbRefItem ( )
, type ( nType )
: MbRefItem ( )
, type ( nType )
, tangent ( (nTang != nullptr) ? new Vector( *nTang ) : nullptr )
, tangentDer1 ( (nTangDer1 != nullptr) ? new Vector( *nTangDer1 ) : nullptr )
, tangentDer2 ( (nTangDer2 != nullptr) ? new Vector( *nTangDer2 ) : nullptr )
, movePnts ( nMovePnts )
, changedPnts ( nChangedPnts )
, attach ( nAttach )
, movePnts ( nMovePnts )
, changedPnts ( nChangedPnts )
, attach ( nAttach )
{
if ( type <= trt_Position ) { // BUG_52162
::DeleteMatItem( tangent );
@@ -152,14 +152,14 @@ MbPntMatingData<Vector>::MbPntMatingData( const MbeMatingType nType,
//---
template <class Vector>
MbPntMatingData<Vector>::MbPntMatingData( const MbPntMatingData<Vector> & d )
: MbRefItem ( )
, type ( d.type )
: MbRefItem ( )
, type ( d.type )
, tangent ( (d.tangent != nullptr) ? new Vector( *d.tangent ) : nullptr )
, tangentDer1 ( (d.tangentDer1 != nullptr) ? new Vector( *d.tangentDer1 ) : nullptr )
, tangentDer2 ( (d.tangentDer2 != nullptr) ? new Vector( *d.tangentDer2 ) : nullptr )
, movePnts ( d.movePnts )
, changedPnts ( d.changedPnts )
, attach ( d.attach )
, movePnts ( d.movePnts )
, changedPnts ( d.changedPnts )
, attach ( d.attach )
{
}
@@ -341,17 +341,17 @@ void MbPntMatingData<Vector>::SetVector( ptrdiff_t i, const Vector & vect )
switch ( i ) {
case 0 : {
if ( tangent != nullptr ) tangent->Init( vect );
else tangent = new Vector( vect );
else tangent = new Vector( vect );
break;
}
case 1 : {
if ( tangentDer1 != nullptr ) tangentDer1->Init( vect );
else tangentDer1 = new Vector( vect );
else tangentDer1 = new Vector( vect );
break;
}
case 2 : {
if ( tangentDer2 != nullptr ) tangentDer2->Init( vect );
else tangentDer2 = new Vector( vect );
else tangentDer2 = new Vector( vect );
break;
}
}
+1
View File
@@ -798,6 +798,7 @@ enum MbePrompt
IDS_PROP_0463, ///< \ru Количество двумерных точек. \en Number of two-dimension points.
IDS_PROP_0464, ///< \ru Количество точек полигонов. \en Number of points of polygons.
IDS_PROP_0466, ///< \ru Форма поверхности сопряжения. \en Shape of blend surface.
IDS_PROP_0467, ///< \ru Форма обрезки боков поверхности. \en Shape of cropping the surface sides.
IDS_PROP_0468, ///< \ru Обработка опорных граней. \en Initial faces processing.
IDS_PROP_0469, ///< \ru Разделять оболочку на грани. \en Division the shell into faces.
+64 -16
View File
@@ -228,6 +228,8 @@ public:
\en Derivative order for smoothing. \~
\param[in] tolerance - \ru Точность аппроксимации.
\en Approximation tolerance. \~
\param[in] bClosed - \ru Флаг замкнутости.
\en Closure flag. \~
\param[in] extendBeg - \ru Величина расширения параметрической длины в начале кривой в процентах относительно
разности начального и конечного параметра точек (опционально).
\en Parametric length extention value for the curve beginning as percent w.r.t. difference
@@ -243,19 +245,25 @@ public:
double smooth,
MbeSmoothingMethod typeSmoothing,
double tolerance,
bool bClosed,
double extendBeg = 0.,
double extendEnd = 0. )
{
_bClosed = false;
_bClosed = bClosed;
_order = order;
_methodSmoothing = typeSmoothing;
_coefSmoothing = smooth;
_tolerance = tolerance;
_approxPoints = aPt;
if ( bClosed )
{
if ( aPt.back().DistanceToPoint( aPt.front() ) > PARAM_EPSILON )
_approxPoints.push_back( aPt.front() );
}
ParameterizeByLength( aPt, _approxParams );
GetUniformKnots( -extendBeg, 1. + extendEnd, nSpan, order, _approxKnots );
_approxWeights.resize( aPt.size() );
ParameterizeByLength( _approxPoints, _approxParams );
GetUniformKnots( bClosed ? 0. : -extendBeg, bClosed ? 1. : 1. + extendEnd, nSpan, order, bClosed, _approxKnots );
_approxWeights.resize( _approxPoints.size() );
}
/** \brief \ru Инициализировать по точкам.
@@ -313,6 +321,8 @@ public:
\en Approximation tolerance. \~
\param[in] bFixBeginEnd - \ru Флаги закрепления начала и конца кривой на первой и последней аппроксимационной точке.
\en Whether curve should coincide with first and last point. \~
\param[in] bClosed - \ru Флаг замкнутости.
\en Closure flag. \~
\param[in] pDerBeg - \ru Констрейн на производную в начале кривой (если нулевой указатель - значит констрейн отсутствует).
\en Curve beginnig derivative constraint (optional). \~
\param[in] pDerEnd - \ru Констрейн на производную в конце кривой (если нулевой указатель - значит констрейн отсутствует).
@@ -322,19 +332,43 @@ public:
size_t order,
double tolerance,
c3d::BoolPair bFixBeginEnd,
bool bClosed,
Vector * pDerBeg = nullptr,
Vector * pDerEnd = nullptr )
{
_bClosed = false;
_bClosed = bClosed;
_order = order;
_methodSmoothing = MbeSmoothingMethod::sm_CurvatureVariance;
_coefSmoothing = 0.;
_tolerance = tolerance;
_approxPoints = aPt;
if ( bClosed )
{
if ( aPt.back().DistanceToPoint( aPt.front() ) > PARAM_EPSILON )
_approxPoints.push_back( aPt.front() );
}
ParameterizeByLength( aPt, _approxParams );
ParameterizeByLength( _approxPoints, _approxParams );
if ( bFixBeginEnd.first && _approxPoints.size() > 2 )
{
// Дублируем первую точку еще и как аппроксимационную для устойчивости наименьших квадратов.
const Point ptNew( _approxPoints[0] );
const auto prmNew( _approxParams[0] );
_approxPoints.insert( _approxPoints.begin() + 1, ptNew );
_approxParams.insert( _approxParams.begin() + 1, prmNew );
}
_approxWeights.resize( aPt.size() );
if ( bFixBeginEnd.second && _approxPoints.size() > 2 )
{
// Дублируем последнюю точку еще и как аппроксимационную для устойчивости наименьших квадратов.
const Point ptNew( _approxPoints.back() );
const auto prmNew( _approxParams.back() );
_approxPoints.insert( _approxPoints.begin() + _approxPoints.size() - 1, ptNew );
_approxParams.insert( _approxParams.begin() + _approxParams.size() - 1, prmNew );
}
_approxWeights.resize( _approxPoints.size() );
if ( bFixBeginEnd.first )
_approxWeights[0].SetWeightPoint( -1. );
@@ -382,25 +416,39 @@ public:
\en Number of segments. \~
\param[in] order - \ru Порядок кривой.
\en NURBS order. \~
\param[in] bClosed - \ru Признак замкнутости кривой.
\en Closure flag. \~
\param[out] aKt - \ru Равномерный узловой вектор.
\en Uniform knot vector. \~
*/
void GetUniformKnots( double beg, double end, size_t nSpan, size_t order, c3d::DoubleVector & aKt )
void GetUniformKnots( double beg, double end, size_t nSpan, size_t order, bool bClosed, c3d::DoubleVector & aKt )
{
aKt.clear();
for ( size_t i = 0; i < order; ++i )
aKt.push_back( beg );
if ( nSpan > 1 )
if ( bClosed )
{
const size_t count = order * 2 + nSpan - 1;
const double step = ( end - beg ) / nSpan;
for ( size_t i = 1; i < nSpan; ++i )
aKt.push_back( beg + step * i );
aKt.resize( count );
const double val0 = beg - step * ( order - 1 );
for ( size_t i = 0; i < count; ++i )
aKt[i] = val0 + step * i;
}
else
{
for ( size_t i = 0; i < order; ++i )
aKt.push_back( beg );
for ( size_t i = 0; i < order; ++i )
aKt.push_back( end );
if ( nSpan > 1 )
{
const double step = ( end - beg ) / nSpan;
for ( size_t i = 1; i < nSpan; ++i )
aKt.push_back( beg + step * i );
}
for ( size_t i = 0; i < order; ++i )
aKt.push_back( end );
}
}
}; // MbApproxNurbsParameters
+1 -1
View File
@@ -12,7 +12,7 @@
#include <math_define.h>
#include <tool_uuid.h>
#include <tool_multithreading.h>
#include <tool_mutex.h>
#include <iostream>
+5 -3
View File
@@ -1,4 +1,4 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Tриангуляция.
@@ -58,7 +58,8 @@ public:
// \ru \name Общие функции примитива. \en \name Common functions of primitive.
MbePrimitiveType IsA() const override; // \ru Тип объекта. \en A type of an object.
MbExactGrid & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) MbExactGrid & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix.
void Move ( const MbVector3D & ) override; // \ru Сдвиг сетки. \en Move mesh.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis.
@@ -323,7 +324,8 @@ public:
// \ru \name Общие функции примитива. \en \name Common functions of primitive.
MbePrimitiveType IsA() const override; // \ru Тип объекта. \en A type of an object.
MbFloatGrid & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) MbFloatGrid & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix.
void Move ( const MbVector3D & ) override; // \ru Сдвиг сетки. \en Move mesh.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis.
+1 -1
View File
@@ -107,7 +107,7 @@ public :
\ingroup Algorithms_2D
*/
// ---
class MATH_CLASS MbPlanarGrid {
class MATH_CLASS MbPlanarGrid : public MbRefItem {
private:
SArray<MbCartPoint> points; ///< \ru Вершины триангуляции. \en Vertices of triangulation.
SArray<MbTri> triangles; ///< \ru Множество треугольников. \en Array of triangles.
+5 -3
View File
@@ -1,4 +1,4 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Полигоны.
@@ -51,7 +51,8 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType IsA() const override; // \ru Вернуть тип объекта \en Get the object type.
MbExactPolygon3D & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
DEPRECATE_DECLARE_REPLACE(Clone) MbExactPolygon3D & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix
void Move ( const MbVector3D & ) override; // \ru Сдвиг полигона \en Translation of the polygon.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis
@@ -178,7 +179,8 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType IsA() const override; // \ru Вернуть тип объекта \en Get the object type.
MbFloatPolygon3D & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
DEPRECATE_DECLARE_REPLACE(Clone) MbFloatPolygon3D & Duplicate( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix
void Move ( const MbVector3D & ) override; // \ru Сдвиг полигона \en Translation of the polygon.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis
+34 -7
View File
@@ -1,4 +1,4 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Базовый класс для структур данных сетки (#MbMesh). Вершина. Полигон.
@@ -153,7 +153,32 @@ public:
\return \ru Копия объекта.
\en The object copy. \~
*/
virtual MbPrimitive & Duplicate( MbRegDuplicate * iReg = nullptr ) const = 0;
DEPRECATE_DECLARE_REPLACE(Clone) virtual MbPrimitive & Duplicate( MbRegDuplicate * iReg = nullptr ) const = 0;
/** \brief \ru Создать копию примитива.
\en Create a copy of primitive. \~
\details \ru Создать копию примитива с использованием регистратора.
Регистратор используется для предотвращения многократного копирования примитива,
входящего в состав нескольких объектов копируемых одновременно.
При копировании одиночного объекта или набора не связанных между собой объектов допустимо не использовать регистратор.
Регистратор необходимо использовать, если надо последовательно копировать несколько взаимосвязанных объектов.
Взаимосвязь представляет собой наличие в объектах ссылок на общие примитивы.
Тогда, при копировании без использования регистратора, можно получить набор копий,
содержащих ссылки на разные копии одного и того же вложенного примитива, что ведет к потере связи между копиями.
\en Create a copy of primitive using the registrator.
Registrator is used for preventing multiple copying of primitive
contained in several simultaneously copied objects.
It is allowed not to use the registrator while copying a single object or a set of disconnected objects.
The registrator must be used to copy several correlated objects successively.
Correlation is an existence of references to common primitives in objects.
Then, while copying without using the registrator, one can get a set of copies
which contains references to the different copies of a single included primitive, what leads to loss of connection between the copies. \~
\param[in] iReg - \ru Регистратор.
\en Registrator. \~
\return \ru Копия объекта.
\en The object copy. \~
*/
virtual SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const = 0;
/** \brief \ru Преобразовать примитив согласно матрице.
\en Transform primitive according to the matrix. \~
@@ -295,7 +320,7 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType Type() const override; // \ru Тип объекта. \en A type of an object.
virtual MbePrimitiveType IsA() const = 0; // \ru Тип объекта. \en A type of an object.
virtual MbApex3D & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) virtual MbApex3D & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object.
//virtual void Transform( const MbMatrix3D & ) = 0; // \ru Преобразовать согласно матрице. \en Transform according to the matrix.
//virtual void Move ( const MbVector3D & ) = 0; // \ru Сдвинуть вдоль вектора. \en Translate along a vector.
//virtual void Rotate ( const MbAxis3D &, double angle ) = 0; // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle.
@@ -360,7 +385,8 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType IsA() const override; // \ru Тип объекта. \en A type of an object.
MbExactApex3D & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) MbExactApex3D & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать согласно матрице. \en Transform according to the matrix.
void Move ( const MbVector3D & ) override; // \ru Сдвинуть вдоль вектора. \en Translate along a vector.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle.
@@ -426,7 +452,8 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType IsA() const override; // \ru Тип объекта. \en A type of an object.
MbFloatApex3D & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) MbFloatApex3D & Duplicate( MbRegDuplicate * = nullptr ) const override; // \ru Создать копию объекта. \en Create a copy of the object.
SPtr<MbPrimitive> Clone( MbRegDuplicate * iReg = nullptr ) const override; // \ru Создать копию объекта \en Create a copy of the object
void Transform( const MbMatrix3D & ) override; // \ru Преобразовать согласно матрице. \en Transform according to the matrix.
void Move ( const MbVector3D & ) override; // \ru Сдвинуть вдоль вектора. \en Translate along a vector.
void Rotate ( const MbAxis3D &, double angle ) override; // \ru Повернуть вокруг оси на угол. \en Rotate about an axis by an angle.
@@ -497,7 +524,7 @@ public:
// \ru Общие функции примитива. \en Common functions of the primitive.
MbePrimitiveType Type() const override; // \ru Вернуть тип объекта \en Get the object type.
virtual MbePrimitiveType IsA() const = 0; // \ru Вернуть тип объекта \en Get the object type.
virtual MbPolygon3D & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта \en Create a copy of the object
DEPRECATE_DECLARE_REPLACE(Clone) virtual MbPolygon3D & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта \en Create a copy of the objec
//virtual void Transform( const MbMatrix3D & ) = 0; // \ru Преобразовать полигон согласно матрице \en Transform polygon according to the matrix
//virtual void Move ( const MbVector3D & ) = 0; // \ru Сдвиг полигона \en Translation of the polygon.
//virtual void Rotate ( const MbAxis3D &, double angle ) = 0; // \ru Поворот полигона вокруг оси \en Rotation of the polygon around an axis
@@ -680,7 +707,7 @@ public:
\{ */
MbePrimitiveType Type() const override; // \ru Тип объекта. \en A type of an object.
virtual MbePrimitiveType IsA() const = 0; // \ru Тип объекта. \en A type of an object.
virtual MbGrid & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object.
DEPRECATE_DECLARE_REPLACE(Clone) virtual MbGrid & Duplicate( MbRegDuplicate * = nullptr ) const = 0; // \ru Создать копию объекта. \en Create a copy of the object.
//virtual void Transform( const MbMatrix3D & ) = 0; // \ru Преобразовать сетку согласно матрице. \en Transform mesh according to the matrix.
//virtual void Move ( const MbVector3D & ) = 0; // \ru Сдвиг сетки. \en Move mesh.
//virtual void Rotate ( const MbAxis3D &, double angle ) = 0; // \ru Поворот сетки вокруг оси. \en Rotation of mesh about an axis.
+89 -1
View File
@@ -21,6 +21,7 @@
#include <topology.h>
#include <wire_frame.h>
#include <op_binding_data.h>
#include <mb_smooth_nurbs_fit_curve.h>
class MATH_CLASS MbSurfaceCurve;
class MATH_CLASS MbCurveExtensionParameters;
@@ -610,7 +611,10 @@ public:
~MbCurveExtensionEnds();
/// \ru Минимально допустимая величина продления. \en Minimal extension length supported. \~
static double MinLengthAllowed() { return Math::metricNear; }
static double MinLengthAllowed() { return Math::minLength; }
/// \ru Максимально допустимая величина продления. \en Maximal extension length supported. \~
static double MaxLengthAllowed() { return Math::maxLength; }
/// \ru Текущий способ продления кривой. \en The Current way to extend the curve. \~
MbeCurveExtensionWays GetWayToExtend() const { return _extensionWay; }
@@ -1252,4 +1256,88 @@ public:
}; // MbFairChangeData
//------------------------------------------------------------------------------
/** \brief \ru Параметры построения или изменения гладкой кривой.
\en The parameters of creating or changing a fair curve. \~
\details \ru Параметры построения или изменения гладкой кривой. \n
\en The parameters of creating or changing a fair curve. \n \~
\ingroup Data_Structures
*/
// ---
struct MATH_CLASS MbFairCurveParams
{
c3d::WireFrameSPtr _initCurve; ///< \ru Исходная кривая. \en An initial curve.
const MbSNameMaker & _snMaker; ///< \ru Именователь кривых каркаса. \en An object defining the frame curves names.
public:
/// \ru Конструктор по кривой. \en Constructor by a curve.
MbFairCurveParams( const MbCurve3D & crv, const MbSNameMaker & maker );
/// \ru Конструктор по каркасу. \en Constructor by a frame.
MbFairCurveParams( const MbWireFrame & crv, const MbSNameMaker & maker );
/// \ru Конструктор по каркасу. \en Constructor by a frame.
MbFairCurveParams( const c3d::WireFrameSPtr & crv, const MbSNameMaker & maker );
/// \ru Деструктор. \en Destructor.
~MbFairCurveParams();
/// \ru Получить исходную кривую. \en Get the initial curve.
c3d::WireFrameSPtr & GetCurve() { return _initCurve; }
/// \ru Получить исходную кривую. \en Get the initial curve.
const c3d::WireFrameSPtr & GetCurve() const { return _initCurve; }
/// \ru Получить именователь. \en Get names maker.
const MbSNameMaker & GetNameMaker() const { return _snMaker; }
OBVIOUS_PRIVATE_COPY( MbFairCurveParams )
}; // MbFairCurveParams
//------------------------------------------------------------------------------
/** \brief \ru Результат построения или изменения гладкой кривой.
\en The result of creating or changing a fair curve. \~
\details \ru Результат построения или изменения гладкой кривой. \n
\en The result of creating or changing a fair curve. \n \~
\ingroup Data_Structures
*/
// ---
struct MATH_CLASS MbFairCurveResult : public MbApproxError
{
public:
c3d::WireFrameSPtr _resultCurve;
MbeFairWarning _warning;
public:
/// \ru Пустой конструктор. \en Empty constructor.
MbFairCurveResult() : MbApproxError(), _warning( fwarn_Success ) {}
~MbFairCurveResult() {}
/// \ru Получить результирующую кривую. \en Get the result curve.
const c3d::WireFrameSPtr & GetCurve() const { return _resultCurve; }
/// \ru Получить результирующую кривую. \en Get the result curve.
c3d::WireFrameSPtr & SetCurve() { return _resultCurve; }
/// \ru Сведения об ошибке аппроксимации. \en Approximation error information.
const MbApproxError & GetApproxError() const { return *this; }
/// \ru Сведения об ошибке аппроксимации. \en Approximation error information.
MbApproxError & SetApproxError() { return *this; }
/// \ru Сведения о предупреждении. \en Warning information.
MbeFairWarning GetWarning() { return _warning; }
/// \ru Сбросить данные. \en Reset data.
void Reset() {
MbApproxError::Reset();
_resultCurve.reset();
}
OBVIOUS_PRIVATE_COPY( MbFairCurveResult )
}; // MbFairCurveResult
#endif // __OP_CURVE_PARAMETERS_H
+23 -9
View File
@@ -20,6 +20,7 @@
class MATH_CLASS MbAxis3D;
class MbRegTransform;
class MbRegDuplicate;
class MATH_CLASS IProgressIndicator;
//------------------------------------------------------------------------------
@@ -427,14 +428,19 @@ class MATH_CLASS MbDuplicationSolidParams
private:
DPtr<DuplicationValues> _duplicationValues; ///< \ru Параметры копирования. \en Copy parameters.
MbSNameMaker _names; ///< \ru Именователь операции. \en An object defining names generation in the operation.
public:
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
private:
/// \ru Конструктор по-умолчанию запрещён. \en The default constructor is forbidden.
MbDuplicationSolidParams();
public:
/// \ru Конструктор. \en Constructor.
MbDuplicationSolidParams ( const DPtr<DuplicationValues> & values )
MbDuplicationSolidParams ( const DPtr<DuplicationValues> & values, IProgressIndicator * prog = nullptr )
: _duplicationValues ( values ) // May be nullptr
, _names ( )
, _names ( )
, _progress ( prog )
{
if ( _duplicationValues == nullptr )
{
@@ -444,9 +450,12 @@ public:
}
/// \ru Конструктор. \en Constructor.
MbDuplicationSolidParams ( const DPtr<DuplicationValues> & values, const MbSNameMaker & names )
MbDuplicationSolidParams ( const DPtr<DuplicationValues> & values,
const MbSNameMaker & names,
IProgressIndicator * prog = nullptr )
: _duplicationValues ( values ) // May be nullptr
, _names ( )
, _names ( )
, _progress ( prog )
{
if ( _duplicationValues == nullptr )
{
@@ -457,30 +466,35 @@ public:
}
/// \ru Конструктор на основе #DuplicationMeshValues для копирования по сетке. \en Constructor based on #DuplicationMeshValues to copy by grid.
MbDuplicationSolidParams( bool isPolar,
MbDuplicationSolidParams( bool isPolar,
const MbVector3D & dir1, const double step1, const uint num1,
const MbVector3D & dir2, const double step2, const uint num2,
const MbCartPoint3D * center, bool isAlongAxis )
const MbCartPoint3D * center, bool isAlongAxis,
IProgressIndicator * prog = nullptr )
: _duplicationValues ( new DuplicationMeshValues(isPolar, dir1, step1, num1, dir2, step2, num2, center, isAlongAxis) )
, _names ()
, _progress ( prog )
{ }
/// \ru Конструктор на основе #DuplicationMatrixValues для копирования по матрицам. \en Constructor based on #DuplicationMatrixValues to copy by grid.
MbDuplicationSolidParams( const MbMatrix3D & matr )
MbDuplicationSolidParams( const MbMatrix3D & matr, IProgressIndicator * prog = nullptr )
: _duplicationValues ( new DuplicationMatrixValues(matr) )
, _names ()
, _progress ( prog )
{ }
/// \ru Конструктор на основе #DuplicationMatrixValues для копирования по матрицам. \en Constructor based on #DuplicationMatrixValues to copy by grid.
MbDuplicationSolidParams( const SArray<MbMatrix3D> & matr )
MbDuplicationSolidParams( const SArray<MbMatrix3D> & matr, IProgressIndicator * prog = nullptr )
: _duplicationValues ( new DuplicationMatrixValues(matr) )
, _names ()
, _progress ( prog )
{ }
/// \ru Конструктор на основе #DuplicationMatrixValues для копирования по матрицам. \en Constructor based on #DuplicationMatrixValues to copy by grid.
MbDuplicationSolidParams( const std::vector<MbMatrix3D> & matr )
MbDuplicationSolidParams( const std::vector<MbMatrix3D> & matr, IProgressIndicator * prog = nullptr )
: _duplicationValues ( new DuplicationMatrixValues(matr) )
, _names ()
, _progress ( prog )
{ }
/// \ru Получить параметры копирования. \en Get the copy parameters.
+281
View File
@@ -0,0 +1,281 @@
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Параметры операций над полигональными сетками.
\en Parameters of operations on the polygonal meshes. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __OP_MESH_PARAMETERS_H
#define __OP_MESH_PARAMETERS_H
#include <math_define.h>
#include <mesh_plane_grid.h>
#include <mesh_float_point.h>
#include <templ_sptr.h>
#include <cur_contour.h>
//------------------------------------------------------------------------------
/** \brief \ru Параметры операции упрощения триангуляции.
\en Triangulation simplification parameters. \~
\details \ru Параметры операции упрощения триангуляции.
Упрощение может производиться до достижения заданного количества треугольников,
либо до превышения заданной точности.
\en Triangulation simplification parameters.
Simplification can be carried out until target triangles count reaching or until
exceeding of specified tolerance. \~
\ingroup Shell_Building_Parameters
*/
// ---
class MATH_CLASS MbMeshSimplificationParams
{
private:
c3d::DoubleVector _toleranceLevels; ///< \ru Уровни точностей для упрощения. \en Tolerance levels for simplification. \~
c3d::IndicesVector _triangleCountLevels; ///< \ru Уровни количества треугольников для упрощения. \en Triangle count levels for simplification. \~
public:
/// \ru Конструктор для задания целевй точности. \en Constructor for tolerance target. \~
MbMeshSimplificationParams( const c3d::DoubleVector & toleranceLevels )
: _toleranceLevels( toleranceLevels )
, _triangleCountLevels()
{}
/// \ru Конструктор для задания целевого количества треугольников. \en Constructor for triangles count target. \~
MbMeshSimplificationParams( const c3d::IndicesVector & triangleCountLevels )
: _toleranceLevels()
, _triangleCountLevels( triangleCountLevels )
{}
/// \ru Деструктор. \en Destructor. \~
~MbMeshSimplificationParams() {}
///< \ru Делать ли упрощение до достижения целевого количества треугольников. \en Is target triangles count. \~
bool IsTriangleCountTarget() const { return !_triangleCountLevels.empty(); }
///< \ru Делать ли упрощение до достижения целевой точности. \en Is target tolerance. \~
bool IsToleranceTarget() const { return !_toleranceLevels.empty(); }
///< \ru Получить уровни упрощения для точности. \en Get simplification levels for tolerance. \~
const c3d::DoubleVector & ToleranceLevels() const { return _toleranceLevels; }
///< \ru Получить уровни упрощения для количества треугольников. \en Get simplification levels for triangles count. \~
const c3d::IndicesVector & TrianglesCountLevels() const { return _triangleCountLevels; }
///< \ru Валидны ли параметры? \en Is parameters valid? \~
bool IsValid() const
{
bool isValid = true;
if ( IsTriangleCountTarget() )
{
if ( _triangleCountLevels.size() > 1 )
{
auto valPrev = _triangleCountLevels.front();
for ( size_t i = 1, n = _triangleCountLevels.size(); i < n; ++i )
{
const auto val = _triangleCountLevels[i];
if ( val >= valPrev )
{
isValid = false;
break;
}
valPrev = val;
}
}
}
else if ( IsToleranceTarget() )
{
if ( _toleranceLevels.size() > 1 )
{
auto valPrev = _toleranceLevels.front();
for ( size_t i = 1, n = _toleranceLevels.size(); i < n; ++i )
{
const auto val = _toleranceLevels[i];
if ( val <= valPrev )
{
isValid = false;
break;
}
valPrev = val;
}
}
}
return isValid;
}
OBVIOUS_PRIVATE_COPY( MbMeshSimplificationParams )
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры операции создания выпуклого многоугольника в 2D.
\en Parameters for convex hull 2D creation. \~
\details \ru Параметры операции создания выпуклого многоугольника в 2D.
\en Parameters for convex hull 2D creation. \~
\ingroup Shell_Building_Parameters
*/
// ---
class MATH_CLASS MbConvexHullParams
{
private:
bool _makeGrid; ///< \ru Создавать ли двумерную триангуляцию. \en Should planar grid be created. \~
bool _makeDelaunay; ///< \ru Создавать ли Делоне триангуляцию. \en Should planar grid be Delaunay triangulation. \~
bool _makeContour; ///< \ru Создавать ли двумерный контур. \en Should planar contour be created. \~
double _tolerance; ///< \ru Точность. \en Tolerance. \~
c3d::ParamPointsVector _points; ///< \ru Точки. \en Points. \~
public:
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams( const c3d::ParamPointsVector & points, double tolerance, bool makeContour, bool makeGrid, bool makeDelaunay )
: _points ( points )
, _tolerance ( tolerance )
, _makeContour ( makeContour )
, _makeGrid ( makeGrid )
, _makeDelaunay( makeDelaunay )
{}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams( const std::vector<MbFloatPoint> & points, double tolerance, bool makeContour, bool makeGrid, bool makeDelaunay )
: _tolerance ( tolerance )
, _makeContour ( makeContour )
, _makeGrid ( makeGrid )
, _makeDelaunay( makeDelaunay )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( MbCartPoint( pt ) );
}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams( const SArray<MbFloatPoint> & points, double tolerance, bool makeContour, bool makeGrid, bool makeDelaunay )
: _tolerance ( tolerance )
, _makeContour ( makeContour )
, _makeGrid ( makeGrid )
, _makeDelaunay( makeDelaunay )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( MbCartPoint( pt ) );
}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams( const SArray<MbCartPoint> & points, double tolerance, bool makeContour, bool makeGrid, bool makeDelaunay )
: _tolerance ( tolerance )
, _makeContour ( makeContour )
, _makeGrid ( makeGrid )
, _makeDelaunay( makeDelaunay )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( pt );
}
/// \ru Деструктор. \en Destructor. \~
~MbConvexHullParams() {}
///< \ru Создавать ли двумерную триангуляцию. \en Should planar grid be created. \~
bool ShouldMakeGrid() const { return _makeGrid; }
///< \ru Создавать ли Делоне триангуляцию. \en Should planar grid be Delaunay triangulation. \~
bool ShouldMakeDelaunay() const { return _makeDelaunay; }
///< \ru Создавать ли двумерный контур. \en Should planar contour be created. \~
bool ShouldMakeContour() const { return _makeContour; }
///< \ru Получить точность. \en Get tolerance. \~
double GetTolerance() const { return _tolerance; }
///< \ru Получить точки. \en Get points. \~
const c3d::ParamPointsVector & GetPoints() const { return _points; }
OBVIOUS_PRIVATE_COPY( MbConvexHullParams )
};
//------------------------------------------------------------------------------
/** \brief \ru Результаты создания выпуклого многоугольника в 2D.
\en Results of convex hull 2D creating. \~
\details \ru Результаты создания выпуклого многоугольника в 2D.
\en Results of convex hull 2D creating. \~
\ingroup Shell_Building_Parameters
*/
// ---
struct MATH_CLASS MbConvexHullResults
{
public:
c3d::IndicesVector _hullIndices; ///< \ru Индексы точек выпуклого многоугольника. \en Indices of convex hull points. \~
c3d::ParamPointsVector _hull; ///< \ru Выпуклый многоугольник. \en Convex hull. \~
SPtr<MbPlanarGrid> _grid; ///< \ru Точки. \en Points. \~
SPtr<MbContour> _contour; ///< \ru Контур. \en Contour. \~
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullResults()
: _hullIndices()
, _hull()
, _grid()
, _contour()
{}
/// \ru Деструктор. \en Destructor. \~
~MbConvexHullResults() {}
OBVIOUS_PRIVATE_COPY( MbConvexHullResults )
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры операции создания выпуклой оболочки в 3D.
\en Parameters for convex hull 3D creation. \~
\details \ru Параметры операции создания выпуклой оболочки в 3D.
\en Parameters for convex hull 3D creation. \~
\ingroup Shell_Building_Parameters
*/
// ---
class MATH_CLASS MbConvexHullParams3D
{
private:
double _tolerance; ///< \ru Точность. \en Tolerance. \~
c3d::SpacePointsVector _points; ///< \ru Точки. \en Points. \~
public:
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams3D( const c3d::SpacePointsVector & points, double tolerance )
: _points ( points )
, _tolerance( tolerance )
{}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams3D( const std::vector<MbFloatPoint3D> & points, double tolerance )
: _tolerance( tolerance )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( MbCartPoint3D( pt ) );
}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams3D( const SArray<MbFloatPoint3D> & points, double tolerance )
: _tolerance( tolerance )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( MbCartPoint3D( pt ) );
}
/// \ru Конструктор.. \en Constructor. \~
MbConvexHullParams3D( const SArray<MbCartPoint3D> & points, double tolerance )
: _tolerance( tolerance )
{
_points.clear();
_points.reserve( points.size() );
for ( const auto & pt : points )
_points.push_back( pt );
}
/// \ru Деструктор. \en Destructor. \~
~MbConvexHullParams3D() {}
///< \ru Получить точность. \en Get tolerance. \~
double GetTolerance() const { return _tolerance; }
///< \ru Получить точки. \en Get points. \~
const c3d::SpacePointsVector & GetPoints() const { return _points; }
OBVIOUS_PRIVATE_COPY( MbConvexHullParams3D )
};
#endif // __OP_MESH_PARAMETERS_H
+272 -28
View File
@@ -144,6 +144,52 @@ public:
}
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\param[in] d1, d2 - \ru Радиусы кривизны/катеты.
\en Radii of curvature/catheti. \~
\param[in] smoothForm - \ru Способ построения поверхности сопряжения.
\en Method of construction of mating surface. \~
\param[in] conicValue - \ru Коэффициент формы, изменяется от 0.05 до 0.95 (при 0 - дуга окружности).
\en Coefficient of shape is changed from 0.05 to 0.95 (if 0 - circular arc). \~
\param[in] bProlong - \ru Продолжить по касательной.
\en Prolong along the tangent. \~
\param[in] cornerForm - \ru Способ скругления "чемоданных" углов.
\en Method for bending corner of three surfaces. \~
\param[in] keepForm - \ru Автоопределение сохранения кромки (ts_neutral), сохранение поверхности (ts_negative), сохранение кромки (ts_positive).
\en Auto detection of boundary saving (ts_neutral), surface saving (ts_negative), boundary saving (ts_positive). \~
\param[in] isStrict - \ru Строгое скругление. Если false, скруглить хотя бы то, что возможно.
\en Strict fillet. If false - round at least what is possible. \~
\param[in] isEquable - \ru В углах сочленения вставлять тороидальную поверхность.
\en In corners of the joint insert toroidal surface. \~
*/
SmoothValues( double d1,
double d2,
MbeSmoothForm smoothForm,
double conicValue,
bool bProlong,
CornerForm cornerForm,
ThreeStates keepForm,
bool isStrict,
bool isEquable )
: distance1 ( d1 )
, distance2 ( d2 )
, conic ( conicValue )
, begLength ( UNDEFINED_DBL )
, endLength ( UNDEFINED_DBL )
, form ( smoothForm )
, smoothCorner ( cornerForm )
, prolong ( bProlong )
, keepCant ( keepForm )
, strict ( isStrict )
, equable ( isEquable )
, vector1 ( )
, vector2 ( )
{ }
/// \ru Конструктор копирования. \en Copy-constructor.
SmoothValues( const SmoothValues & other, MbRegDuplicate * iReg = nullptr );
/// \ru Деструктор. \en Destructor.
@@ -1145,6 +1191,27 @@ public:
/// \ru Установить сопряжение сегмента. \en Set the conjugation of segment.
void SetMating( size_t segInd, MbePatchMatingType type, const MbSurface * surface ) { curve->SetMating( segInd, type, surface ); }
/** \brief \ru Максимальный тип сопряжения, который может быть задан.
\en The maximum mating type that can be set. \~
\details \ru Максимальный тип сопряжения, который может быть задан для данной границы и данной поверхности. \n
\en The maximum mating type that can be specified for the given curve and given surface. \n \~
\param[in] prevCurve - \ru Предыдущая граница заплатки.
\en The previous patch boundary. \~
\param[in] nextCurve - \ru Следующая граница заплатки.
\en The next patch boundary. \~
\param[in] matingSurface - \ru Поверхность для сопряжения.
\en Mating surface. \~
\return \ru pmt_None - Если нельзя задать сопряжение к данной поверхности для данной границы.
pmt_Tangent - Если можно задать сопряжение типа pmt_Tangent.
pmt_SmoothG2 - Если можно задать сопряжения типов pmt_Tangent и pmt_SmoothG2.
\en pmt_None - If it is impossible to set a mating to a given surface for a given boundary.
pmt_Tangent - If you can specify a pairing of type pmt_Tangent.
pmt_SmoothG2 - If you can specify a pairings of types pmt_Tangent and pmt_SmoothG2. \~
*/
MbePatchMatingType GetMaximumMatingType( const MbPatchCurve & prevCurve,
const MbPatchCurve & nextCurve,
const MbSurface & matingSurface ) const;
/// \ru Разбить контур на сегменты. \en Divide the path into segments.
void Decompose( std::vector<SPtr<MbPatchCurve>> & patchCurves ) const;
private:
@@ -1217,7 +1284,7 @@ public:
\en Patch parameters. \~
\param[in] names - \ru Именователь.
\en An object defining names generation in the operation. \~
*/
*/
MbPatchShellParams( const RPArray<MbCurve3D> & initCurves,
const PatchValues & patchValues,
const MbSNameMaker & names );
@@ -2979,21 +3046,26 @@ private:
bool _copyAttributes; ///< \ru Копировать атрибуты. \en Copy attributes.
SPtr<MbSNameMaker> _operNames; ///< \ru Именователь операции. \en An object defining names generation in the operation.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbGridShellParams( const MbSNameMaker & operNames )
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbGridShellParams( const MbSNameMaker & operNames, IProgressIndicator * prog = nullptr )
: _sewGrids ( true )
, _mergeFaces ( false )
, _useGridSurface( false )
, _copyAttributes( false )
, _operNames ( &operNames.Duplicate() )
, _progress ( prog )
{}
/// \ru Конструктор по параметрам. \en Constructor by parameters.
MbGridShellParams( bool sg, bool mf, bool ugs, bool ca, const MbSNameMaker & operNames )
MbGridShellParams( bool sg, bool mf, bool ugs, bool ca, const MbSNameMaker & operNames, IProgressIndicator * prog = nullptr )
: _sewGrids ( sg )
, _mergeFaces ( mf )
, _useGridSurface( ugs )
, _copyAttributes( ca )
, _operNames ( &operNames.Duplicate() )
, _progress ( prog )
{}
/// \ru Сшивать ли наборы граней от разных триангуляций. \en Sew together faces of grids or not.
bool IsSewGrids() const { return _sewGrids; }
@@ -3398,6 +3470,8 @@ private:
SPtr<MbSNameMaker> nameMaker; ///< \ru Именователь операции. \en An object defining names generation in the operation.
ThreeStates retainedPart; ///< \ru Направление отсечения (сохраняемая часть исходной оболочки). \en The direction of cutting off (a part of the source shell to be kept).
ProlongState prolongState; ///< \ru Тип продления режущей поверхности. \en Prolongation type of cutter surface.
public:
mutable IProgressIndicator * progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/** \brief \ru Конструктор.
@@ -3414,12 +3488,13 @@ public:
\en An object defining names generation in the operation. \~
*/
MbShellCuttingParams( int part, const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3448,12 +3523,13 @@ public:
*/
MbShellCuttingParams( const MbPlacement3D & place, const MbContour & contour, bool sameContour, const MbVector3D & dir, int part,
const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( place, dir, contour, sameContour )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3482,12 +3558,13 @@ public:
*/
MbShellCuttingParams( const MbPlacement3D & place, const MbContour & contour, bool sameContour, const MbVector3D & dir,
const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( place, dir, contour, sameContour )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3511,12 +3588,13 @@ public:
*/
MbShellCuttingParams( const MbSurface & surface, bool sameSurface, int part,
const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( surface, sameSurface )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3541,12 +3619,13 @@ public:
*/
MbShellCuttingParams( const MbSurface & surface, bool sameSurface,
const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( surface, sameSurface )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3570,12 +3649,13 @@ public:
*/
MbShellCuttingParams( const MbSolid & solid, bool sameSolid,
int part, const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
: cutterData ( solid, sameSolid, true )
, booleanFlags( )
, nameMaker ( &snMaker.Duplicate() )
, retainedPart( ts_neutral )
, prolongState( )
, progress ( prog )
{
booleanFlags.InitCutting( cutAsClosed );
booleanFlags.SetMerging( mergingFlags );
@@ -3588,6 +3668,7 @@ public:
, nameMaker ( other.nameMaker )
, retainedPart( other.retainedPart )
, prolongState( other.prolongState )
, progress ( other.progress )
{
}
~MbShellCuttingParams()
@@ -3616,7 +3697,7 @@ public:
*/
bool InitPlaneContour( const MbPlacement3D & place, const MbContour & contour, bool sameContour, const MbVector3D & dir,
int part, const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitPlaneContour( place, dir, contour, sameContour ) ) {
nameMaker->SetNameMaker( snMaker, true );
@@ -3624,6 +3705,7 @@ public:
booleanFlags.SetMerging( mergingFlags );
SetRetainedPart( part );
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -3641,10 +3723,11 @@ public:
\param[in] dir - \ru Направление выдавливания контура.
\en Extrusion direction of the contour. \~
*/
bool InitPlaneContour( const MbPlacement3D & place, const MbContour & contour, bool sameContour, const MbVector3D & dir )
bool InitPlaneContour( const MbPlacement3D & place, const MbContour & contour, bool sameContour, const MbVector3D & dir, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitPlaneContour( place, dir, contour, sameContour ) ) {
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -3668,7 +3751,7 @@ public:
*/
bool InitSurface( const MbSurface & surface, bool sameSurface,
int part, const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitSurfaces( surface, sameSurface ) ) {
nameMaker->SetNameMaker( snMaker, true );
@@ -3676,6 +3759,7 @@ public:
booleanFlags.SetMerging( mergingFlags );
SetRetainedPart( part );
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -3691,10 +3775,11 @@ public:
\param[in] prType - \ru Тип продления режущей поверхности.
\en Cutter surface prolong type. \~
*/
bool InitSurface( const MbSurface & surface, bool sameSurface, ProlongState prState )
bool InitSurface( const MbSurface & surface, bool sameSurface, ProlongState prState, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitSurfaces( surface, sameSurface ) ) {
prolongState.Init( prState );
progress = prog;
return true;
}
return false;
@@ -3718,7 +3803,7 @@ public:
*/
bool InitSolid( const MbSolid & solid, bool sameSolid,
int part, const MbMergingFlags & mergingFlags, bool cutAsClosed,
const MbSNameMaker & snMaker )
const MbSNameMaker & snMaker, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitSolid( solid, sameSolid, true ) ) {
nameMaker->SetNameMaker( snMaker, true );
@@ -3726,6 +3811,7 @@ public:
booleanFlags.SetMerging( mergingFlags );
SetRetainedPart( part );
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -3739,10 +3825,11 @@ public:
\param[in] sameSolid - \ru Использовать исходную поверхность (true) или её копию (false).
\en Use the source surface (true) or its copy (false). \~
*/
bool InitSolid( const MbSolid & solid, bool sameSolid )
bool InitSolid( const MbSolid & solid, bool sameSolid, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitSolid( solid, sameSolid, true ) ) {
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -3757,10 +3844,11 @@ public:
\en Use original creators (true) or its copies (false). \~
*/
template <class CreatorsVector>
bool InitSolid( const CreatorsVector & creators, bool sameCreators )
bool InitSolid( const CreatorsVector & creators, bool sameCreators, IProgressIndicator * prog = nullptr )
{
if ( cutterData.InitSolid( creators, sameCreators ) ) {
prolongState.Reset();
progress = prog;
return true;
}
return false;
@@ -4420,6 +4508,8 @@ protected:
c3d::SNameMakerSPtr _operName; ///< \ru Именователь операции. \en An object defining names generation in the operation. \~
LoftedValues _loftParams; ///< \ru Параметры операции. \en The operation parameters. \~
OperationType _operType; ///< \ru Тип Булевой операции. \en A boolean operation type. \~
public:
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/** \brief \ru Конструктор по параметрам операции.
@@ -4450,7 +4540,8 @@ public:
const c3d::SpaceCurvesSPtrVector * guideCurves,
const c3d::SpacePointsVector * guidePoints,
const MbSNameMaker & operName,
const c3d::SNamesMakerSPtrVector & contourNames );
const c3d::SNamesMakerSPtrVector & contourNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4480,7 +4571,8 @@ public:
const c3d::SpaceCurvesSPtrVector * guideCurves,
const c3d::SpacePointsVector * guidePoints,
const MbSNameMaker & operName,
const c3d::SNamesMakerSPtrVector & contourNames );
const c3d::SNamesMakerSPtrVector & contourNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4514,7 +4606,8 @@ public:
const c3d::SpaceCurvesSPtrVector * guideCurves,
const c3d::SpacePointsVector * guidePoints,
const MbSNameMaker & operName,
const c3d::SNamesMakerSPtrVector & contourNames );
const c3d::SNamesMakerSPtrVector & contourNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4547,7 +4640,8 @@ public:
const c3d::SpaceCurvesSPtrVector * guideCurves,
const c3d::SpacePointsVector * guidePoints,
const MbSNameMaker & operName,
const c3d::SNamesMakerSPtrVector & contourNames );
const c3d::SNamesMakerSPtrVector & contourNames,
IProgressIndicator * prog = nullptr );
/// \ru Деструктор. \en Destructor. \~
~MbLoftedSolidParams();
@@ -4852,6 +4946,8 @@ class MATH_CLASS MbIngotSolidParams : public MbPrecision
private:
c3d::SolidsSPtrVector _solids; ///< \ru Контейнер тел. \en The bodies container. \~
MbSNameMaker _operNames; ///< \ru Именователь. \en An object for naming the new objects. \~
public:
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en A progress indicator of the operation.
public:
/** \brief \ru Конструктор по параметрам операции.
@@ -4862,9 +4958,12 @@ public:
\en A solid. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbIngotSolidParams( const c3d::SolidSPtr & solid,
const MbSNameMaker & operNames );
MbIngotSolidParams( const c3d::SolidSPtr & solid,
const MbSNameMaker & operNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4874,9 +4973,12 @@ public:
\en A solid, may be #MbAssembly, #MbInstance or #MbSolid. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbIngotSolidParams( const c3d::ItemSPtr & item,
const MbSNameMaker & operNames );
MbIngotSolidParams( const c3d::ItemSPtr & item,
const MbSNameMaker & operNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4886,9 +4988,12 @@ public:
\en The bodies container. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbIngotSolidParams( const c3d::SolidsSPtrVector & solids,
const MbSNameMaker & operNames );
const MbSNameMaker & operNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции.
\en Constructor by the operation parameters. \~
@@ -4898,9 +5003,12 @@ public:
\en The bodies container, may consist of #MbAssembly, #MbInstance and #MbSolid. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbIngotSolidParams( const c3d::ItemsSPtrVector & items,
const MbSNameMaker & operNames );
const MbSNameMaker & operNames,
IProgressIndicator * prog = nullptr );
/** \brief \ru Конструктор по параметрам операции без контейнера тел.
\en Constructor by the operation parameters without an bodies container. \~
@@ -4908,8 +5016,11 @@ public:
\en Constructor of parameters to divide a shell into parts without an bodies container. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] prog - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbIngotSolidParams( const MbSNameMaker & operNames );
MbIngotSolidParams( const MbSNameMaker & operNames,
IProgressIndicator * prog = nullptr );
/// \ru Добавление тел в контейнер. \en Add the solids to the container. \~
void Add( const c3d::SolidsSPtrVector & solids );
@@ -5183,6 +5294,8 @@ public:
\en Control flags of the Boolean operation \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] progress - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbBooleanOperationParams( OperationType oType, const MbBooleanFlags & flags, const MbSNameMaker & operNames,
IProgressIndicator * progress = nullptr )
@@ -5201,6 +5314,8 @@ public:
\en Closedness of operands' shells. \~
\param[in] operNames - \ru Именователь.
\en An object for naming the new objects. \~
\param[in] progress - \ru Индикатор прогресса выполнения операции.
\en A progress indicator of the operation.
*/
MbBooleanOperationParams( OperationType oType, bool closed, const MbSNameMaker & operNames,
IProgressIndicator * progress = nullptr )
@@ -6103,4 +6218,133 @@ public:
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры операции "Уклон".
\en Draft operation parameters. \~
\details \ru Параметры операции "Уклон". \n
Содержат информацию об уклоняемых гранях, нейтральных ребрах, нейтральной плоскости, угле уклона, базовом направлении, именователе операции. \n
\en Draft operation parameters. \n
Contains information about drafts faces, neutral edges, neutral plane, drafts angle, basic direction, object defining names generation in the operation. \n \~
\ingroup Shell_Building_Parameters
*/
// ---
class MATH_CLASS MbDraftSolidParams: public MbPrecision
{
private:
c3d::FacesSPtrVector _faces; ///< \ru Уклоняемые грани. \en Drafts faces.
c3d::EdgesSPtrVector _edges; ///< \ru Нейтральные ребра. \en Neutral edges.
MbPlacement3D _neutralPlane; ///< \ru Нейтральная плоскость. \en Neutral plane.
MbVector3D _dir; ///< \ru Базовое направление. \en Basic direction.
SPtr<MbSNameMaker> _names; ///< \ru Именователь. \en An object for naming the new objects.
double _angle; ///< \ru Угол уклона. \en Drafts angle.
MbeFacePropagation _faceProp; ///< \ru Признак захвата граней. \en Face propagation.
bool _reverse; ///< \ru Обратить базовое направление. \en Inverse basic direction.
private:
MbDraftSolidParams(); ///< \ru Конструктор по умолчанию. Запрещён. \en Default constructor. Forbidden.
public:
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по нейтральной плоскости и именователю операции. \n
\en Constructor by neutral plane and object defining names generation in the operation. \n \~
\param[in] faces - \ru Уклоняемые грани.
\en Drafts faces. \~
\param[in] neutralPlane - \ru Нейтральная плоскость.
\en A neutral plane. \~
\param[in] names - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] angle - \ru Угол уклона.
\en Draft angle. \~
\param[in] faceProp - \ru Признак захвата граней.
\en Face propagation. \~
\param[in] reverse - \ru Обратить базовое направление.
\en Inverse basic direction. \~
*/
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const MbPlacement3D & neutralPlane,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по нейтральной плоскости и именователю. \n
\en Constructor by neutral plane and object defining names generation in the operation. \n \~
\param[in] faces - \ru Уклоняемые грани.
\en Drafts faces. \~
\param[in] neutralPlane - \ru Нейтральная плоскость.
\en A neutral plane. \~
\param[in] names - \ru Именователь операции.
\en An object defining names generation in the operation. \~
\param[in] angle - \ru Угол уклона.
\en Draft angle. \~
\param[in] faceProp - \ru Признак захвата граней.
\en Face propagation. \~
\param[in] reverse - \ru Обратить базовое направление.
\en Inverse basic direction. \~
*/
MbDraftSolidParams( const RPArray<MbFace> & faces,
const MbPlacement3D & neutralPlane,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по набору ребер и именователю. \n
\en Constructor by edges and object defining names generation in the operation. \n \~
\param[in] faces - \ru Уклоняемые грани.
\en Drafts faces. \~
\param[in] edges - \ru Нейтральные ребра.
\en A neutral edges. \~
\param[in] dir - \ru Базовое направление.
\en A basic direction. \~
\param[in] names - \ru Именователь.
\en An object defining names generation in the operation. \~
\param[in] angle - \ru Угол уклона.
\en Draft angle. \~
\param[in] faceProp - \ru Признак захвата граней.
\en Face propagation. \~
\param[in] reverse - \ru Обратить базовое направление.
\en Inverse basic direction. \~
*/
MbDraftSolidParams( const c3d::FacesSPtrVector & faces,
const c3d::EdgesSPtrVector & edges,
const MbVector3D & dir,
const MbSNameMaker & names,
double angle,
MbeFacePropagation faceProp,
bool reverse );
/// \ru Конструктор копирования. \en Copy constructor.
MbDraftSolidParams( const MbDraftSolidParams & other );
/// \ru Получить набор граней. \en Get the faces.
void GetFaces( c3d::FacesVector & faces ) const;
/// \ru Получить набор ребер. \en Get the edges.
void GetEdges( c3d::EdgesSPtrVector & edges ) const;
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
const MbSNameMaker & GetNameMaker() const { return *_names; }
/// \ru Получить базовое направление. \en Get basic direction.
const MbVector3D & GetDir() const { return _dir; }
/// \ru Получить нейтральную плоскость. \enGet neutral plane.
const MbPlacement3D & GetPlace() const { return _neutralPlane; }
/// \ru Получить угол уклона. \en Drafts angle.
double GetAngle() const { return _angle; }
/// \ru Получить признак захвата граней. \en Get face propagation.
MbeFacePropagation GetFacePropagetion() const { return _faceProp; }
/// \ru Получить обратитное базовое направление. \en Get inverse basic direction.
bool GetReverse() const {return _reverse;}
/// \ru Оператор присваивания. \en Assignment operator.
const MbDraftSolidParams & operator = ( const MbDraftSolidParams & );
private:
/// \ru Поменять на противоположный угол уклона и флаг обращения базового направления. \en Invert drafts angle and basic directions flag.
void Invert();
};
#endif // __OP_SHELL_PARAMETERS_H
+9 -9
View File
@@ -1692,7 +1692,7 @@ public:
c3d::SpaceCurveSPtr track; ///< \ru Кривая, через которую должно пройти сечение. \en The curve that the section should pass through. \~
c3d::SurfaceSPtr touch; ///< \ru Поверхность, которой должно касаться сечение. \en The surface that the section should touch. \~
c3d::ShellSPtr shell; ///< \ru Оболочка, которой должно касаться сечение. \en The shell that the section should touch. \~
MbeSectionShape shape; ///< \ru Форма сечения поверхности. \en The surface cross-section shape. \~
MbeSmoothForm sform; ///< \ru Форма поверхности сопряжения (скругления или фаски). \en The blend surface cross-section form (fillet or chamfer). \~
double ratio; ///< \ru Или натяжение, или скос, или соотношение. \en Or tension, or bevel, or ratio. \~
public:
@@ -1732,10 +1732,10 @@ public:
const MbFaceShell * GetShell() const { return shell.get(); }
/// \ru Установить оболочку управления сечением. \en Set section control shell. \~
void SetShell( MbFaceShell & s );
/// \ru Выдать форму сечения поверхности. \en Get cross-section shape. \~
MbeSectionShape GetShape() const { return shape; }
/// \ru Установить форму сечения поверхности. \en Set cross-section shape. \~
void SetShape( MbeSectionShape f ) { shape = f; }
/// \ru Выдать форму поверхности сопряжения (скругления или фаски). \en Get a blend surface cross-section form (fillet or chamfer). \~
MbeSmoothForm GetSubForm() const { return sform; }
/// \ru Установить форму поверхности сопряжения (скругления или фаски). \en Set a blend surface cross-section form (fillet or chamfer). \~
void SetSubForm( MbeSmoothForm f ) { sform = f; }
/// \ru Выдать соотношение. \en Get the ratio. \~
double GetRatio() const { return ratio; }
/// \ru Установить соотношение. \en Set the ratio. \~
@@ -2012,10 +2012,10 @@ public:
const MbSurface * GetDescriptSurface() const { return descript.GetSurface(); }
/// \ru Выдать оболочку управления сечением. \en Get section control shell.
const MbFaceShell * GetDescriptShell() const { return descript.GetShell(); }
/// \ru Выдать форму сечения поверхности. \en Get cross-section shape.
MbeSectionShape GetDescriptShape() const { return descript.GetShape(); }
/// \ru Установить форму сечения поверхности. \en Set cross-section shape.
void SetDescriptShape( MbeSectionShape f ) { descript.SetShape( f ); }
/// \ru Выдать форму поверхности сопряжения (скругления или фаски). \en Get a blend surface cross-section form (fillet or chamfer). \~
MbeSmoothForm GetSubForm() const { return descript.GetSubForm(); }
/// \ru Установить форму поверхности сопряжения (скругления или фаски). \en Set a blend surface cross-section form (fillet or chamfer). \~
void SetSubForm( MbeSmoothForm f ) { descript.SetSubForm( f ); }
/// \ru Выдать соотношение. \en Get the ratio. \~
double GetRatio() const { return descript.GetRatio(); }
/// \ru Установить соотношение. \en Set the ratio. \~
+13 -2
View File
@@ -51,8 +51,19 @@ public:
/// \ru Получить область определения функции. \en Get function domain.
bool GetDefRange( DefRange &, ItTreeVariable & var,
const std::vector<BTreeNode *> & ) const override;
/// \ru Получить область определения функции. \en Get function domain.
bool GetDefRange( DefRange &, size_t ind, bool stopOnBreak ) const;
/** \brief \ru Получить область определения функции. \en Get function domain. \~
\details \ru Получить область определения функции для параметра с индексом ind. Метод вырезает из заданной области определения участки, где функция не определена. \n
\en Get the function domain for the parameter with index ind. The method cuts from the initial domain some parts where the function is not defined. \n \~
\param[in, out] dr - \ru Инициализируется некоторым начальным диапазоном. На выходе - пересечение этого диапазона с реальной областью определения функции.
\en It is initialized by some start range. The output value will be the intersection between this range and the true function domain. \~
\param[in] ind - \ru Индекс переменной, для которой ищется область определения.
\en An index of the variable, which the domain is searched for. \~
\param[in] stopOnBreak - \ru Остановить поиск если найден разрыв.
\en Searching will be stopped if the first break is found. \~
\return \ru Возвращает false если область определения найти не удалось.
\en Returns false if domain cannot be found. \~
*/
bool GetDefRange( DefRange &, size_t ind, bool stopOnBreak ) const;
/// \ru Количество аргументов (параметров). \en Parameters (arguments) count.
size_t GetParsCount() const override { return m_vars.Count(); }
+1
View File
@@ -327,6 +327,7 @@ public:
private:
friend class CompositeMeshShellCreator;
friend class CompositeMeshShellCreatorV19;
friend class MbPatchBuilder;
/** \brief \ru Конструктор поверхности с дополнительными задающими кривыми.
\en Surface constructor with additional defining curves. \~
\details \ru Конструктор вызывается из генератора CompositeMeshShellCreator для создания
+6 -4
View File
@@ -90,10 +90,12 @@ protected:
double wPar; ///< \ru Параметр v, для которого вычислена плоскость wPlace. \en The parameter v for which was calculated the plane wPlace.
MbVector3D wOrig1; ///< \ru Первая производная по v начала координат плоскости. \en The first derivative of the v origin of the wPlace.
MbVector3D wOrig2; ///< \ru Вторая производная по v начала координат плоскости. \en The second derivative of the v origin of the wPlace.
MbVector3D wDerv1; ///< \ru Первая производная по v оси axisX плоскости. \en The first derivative of the v axisX of wPlace.
MbVector3D wDerv2; ///< \ru Первая производная по v оси axisY плоскости. \en The first derivative of the v axisY of wPlace.
MbVector3D wSecn1; ///< \ru Вторая производная по v оси axisX плоскости. \en The second derivative of the v axisX of wPlace.
MbVector3D wSecn2; ///< \ru Вторая производная по v оси axisY плоскости. \en The second derivative of the v axisY of wPlace.
MbVector3D wDerv1; ///< \ru Первая производная по v оси axisX плоскости. \en The first derivative of axisX of wPlace with respect to v.
MbVector3D wDerv2; ///< \ru Первая производная по v оси axisY плоскости. \en The first derivative of axisY of wPlace with respect to v.
MbVector3D wDerv3; ///< \ru Первая производная по v оси axisZ плоскости. \en The first derivative of axisZ of wPlace with respect to v.
MbVector3D wSecn1; ///< \ru Вторая производная по v оси axisX плоскости. \en The second derivative of axisX of wPlace with respect to v.
MbVector3D wSecn2; ///< \ru Вторая производная по v оси axisY плоскости. \en The second derivative of axisY of wPlace with respect to v.
MbVector3D wSecn3; ///< \ru Вторая производная по v оси axisZ плоскости. \en The second derivative of axisZ of wPlace with respect to v.
std::vector<double> wSplns; ///< \ru Рабочее множество В-сплайнов. \en The work set of B-splines.
std::vector<MbCartPoint> wxy; ///< \ru Рабочее множество точек. \en The work set of the points.
std::vector<MbVector> wxyV; ///< \ru Рабочее множество первых производных по V. \en The work set of the firsf derivatives.
+67
View File
@@ -172,6 +172,21 @@ public:
\en Queue with k-nearest neighbors (kNN) query results, where the topmost element [0] is NOT the nearest but the farthest \~
*/
void GetKNearestNeighbors( const MbCartPoint3D & queryPoint, size_t neighborCount, ScalarPriorityQueue & neighborQueue );
/**
\brief \ru Найти ближайших соседей внутри сферы заданного радиуса для данной точки.
\en Performs the query for neighbors inside given sphere. \~
\details \ru Найти ближайших соседей внутри сферы заданного радиуса для данной точки.
\en Performs the query for neighbors inside given sphere. \~
\param[in] queryPoint - \ru Точка, для которой ищутся соседи.
\en The point for which the neighbors are being searched for . \~
\param[in] radius - \ru Радиус сферы.
\en Sphere radius. \~
\param[in] used - \ru Фильтр для точек. Значение true подразумевает, что точка исключается из рассмотрения.
\en Points filter. Value true implies that point is excluded from consideration. \~
\param[out] neighbors - \ru Массив найденных соседей.
\en Neigbors array. \~
*/
void GetRadiusNeighbors( const MbCartPoint3D & queryPoint, double radius, const c3d::BoolVector & used, c3d::IndicesVector & neighbors );
/// \ru Получить узлы дерева. \en Get tree nodes.
inline const NodeList & GetNodes() { return nodes; }
/// \ru Получить множество точек. \en Get points set.
@@ -401,6 +416,58 @@ void KdTree<Scalar>::GetKNearestNeighbors( const MbCartPoint3D & queryPoint, siz
}
//-------------------------------------------------------------------------------
// \ru Найти ближайших соседей внутри сферы заданного радиуса для данной точки.
// в виде неупорядоченного массива neighbors
// \en Performs the query for neighbors inside given sphere.
// The result of the query is an unsorted array neighbors.
// ---
template<class Scalar>
void KdTree<Scalar>::GetRadiusNeighbors( const MbCartPoint3D & queryPoint, double radius, const c3d::BoolVector & used, c3d::IndicesVector & neighbors )
{
neighbors.clear();
const auto r2 = radius * radius;
c3d::IndicesVector nodeStack;
nodeStack.reserve( numLevel + 1 );
nodeStack.push_back( 0 );
while ( !nodeStack.empty() ) {
Node & node = nodes[nodeStack.back()];
nodeStack.pop_back();
if ( node.type ) { // Достигли листа дерева.
// Индекс последнего элемента листа в points.
size_t end = node.start + node.size;
// Добавление элемента листа в очередь.
for ( size_t i = node.start; i < end; ++i ) {
if ( !used[indices[i]] ) {
const auto d2 = ( queryPoint - points[i] ).Length2();
if ( d2 < r2 )
neighbors.push_back( indices[i] );
}
}
}
else { // Не лист дерева.
// Расстояние между найденной точкой и фактической координатой деления.
const double new_off = queryPoint[node.dim] - node.splitValue;
const double new_off2 = new_off * new_off;
// Левое поддерево.
if ( new_off < 0. ) {
nodeStack.push_back( node.firstChildId );
if( new_off2 <= r2 )
nodeStack.push_back( node.firstChildId + 1);
}
// Правое поддерево.
else {
nodeStack.push_back( node.firstChildId + 1 );
if ( new_off2 <= r2 )
nodeStack.push_back( node.firstChildId );
}
}
}
}
//-------------------------------------------------------------------------------
// \ru Разделить часть массива между индексами start и end на две части, одна из которых меньше
// чем splitValue, другое с элементами больше или равными чем splitValue. Сравнение элементов
-6
View File
@@ -146,12 +146,6 @@ public:
};
//------------------------------------------------------------------------------
// \ru Функция присваивания указателем \en A function of assignment by pointer.
// ---
//------------------------------------------------------------------------------
/** \brief \ru Автоматическая ссылка на объекты с подсчетом ссылок.
\en Smart reference to objects with reference counter. \~
+1 -28
View File
@@ -14,33 +14,6 @@
#include <tool_mutex.h>
#include <tool_err_handling.h>
//------------------------------------------------------------------------------
/**
\brief \ru Режимы многопоточных вычислений.
\en Multithreading modes. \~
\details \ru Режимы многопоточных вычислений. Режим многопоточности ядра управляет механизмом потокобезопасности объектов ядра и определяет, какие операции ядра будут распараллеливаться. \n
\en Multithreading modes. Multithreading mode of the kernel manages the mechanism of thread-safity of the kernel objects and defines which \n \~
\ingroup Data_Structures
*/
//---
enum MbeMultithreadedMode {
///< \ru Многопоточность ядра полностью отключена. Использовать интерфейсы ядра в многопоточном приложении нельзя.
///< \en Kernel multithreading is completely off. The kernel interfaces can't be used in a multithreaded application.
mtm_Off = 0,
///< \ru Включена внутренняя многопоточность ядра при обработке независимых объектов (без общих данных). Можно использовать интерфейсы ядра для параллельной обработки независимых объектов.
///< \en Internal kernel multithreading is ON for independent objects (without common data). The kernel interfaces can be used to process independent objects in parallel.
mtm_Standard = 1,
///< \ru Обеспечивается потокобезопасность объектов ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Но внутренняя многопоточность ядра при обработке объектов с общими данными отключена.
///< \en Ensured thread-safety of the kernel objects. The kernel interfaces can be used to process objects in parallel. But internal multithreading is OFF for objects with shared data.
mtm_SafeItems = 2,
///< \ru Обеспечивается потокобезопасность объектов ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Включена многопоточность ядра при обработке любых объектов.
///< \en Ensured thread-safety of kernel objects. The kernel interfaces can be used to process objects in parallel. Kernel multithreading is ON for any objects.
mtm_Items = 3,
///< \ru Включена максимальная многопоточность ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Включена многопоточность ядра при обработке любых объектов.
///< \en Maximal kernel multithreading is ON. The kernel interfaces can be used to process objects in parallel. Kernel multithreading is ON for any objects.
mtm_Max = 31
};
//------------------------------------------------------------------------------
/**
\brief \ru Базовый класс для объектов, требующих сборки мусора.
@@ -163,7 +136,7 @@ MATH_FUNC( void ) ReleaseMemory();
\ingroup Base_Tools
*/
// ---
class AuxiliaryData {
class MATH_CLASS AuxiliaryData {
public:
AuxiliaryData() {}
AuxiliaryData( const AuxiliaryData & ) {}
+29
View File
@@ -17,6 +17,35 @@
#include <math_define.h>
//------------------------------------------------------------------------------
/**
\brief \ru Режимы многопоточных вычислений.
\en Multithreading modes. \~
\details \ru Режимы многопоточных вычислений. Режим многопоточности ядра управляет механизмом потокобезопасности объектов ядра и определяет, какие операции ядра будут распараллеливаться. \n
\en Multithreading modes. Multithreading mode of the kernel manages the mechanism of thread-safity of the kernel objects and defines which \n \~
\ingroup Data_Structures
*/
//---
enum MbeMultithreadedMode
{
///< \ru Многопоточность ядра полностью отключена. Использовать интерфейсы ядра в многопоточном приложении нельзя.
///< \en Kernel multithreading is completely off. The kernel interfaces can't be used in a multithreaded application.
mtm_Off = 0,
///< \ru Включена внутренняя многопоточность ядра при обработке независимых объектов (без общих данных). Можно использовать интерфейсы ядра для параллельной обработки независимых объектов.
///< \en Internal kernel multithreading is ON for independent objects (without common data). The kernel interfaces can be used to process independent objects in parallel.
mtm_Standard = 1,
///< \ru Обеспечивается потокобезопасность объектов ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Но внутренняя многопоточность ядра при обработке объектов с общими данными отключена.
///< \en Ensured thread-safety of the kernel objects. The kernel interfaces can be used to process objects in parallel. But internal multithreading is OFF for objects with shared data.
mtm_SafeItems = 2,
///< \ru Обеспечивается потокобезопасность объектов ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Включена многопоточность ядра при обработке любых объектов.
///< \en Ensured thread-safety of kernel objects. The kernel interfaces can be used to process objects in parallel. Kernel multithreading is ON for any objects.
mtm_Items = 3,
///< \ru Включена максимальная многопоточность ядра. Можно использовать интерфейсы ядра для параллельной обработки объектов. Включена многопоточность ядра при обработке любых объектов.
///< \en Maximal kernel multithreading is ON. The kernel interfaces can be used to process objects in parallel. Kernel multithreading is ON for any objects.
mtm_Max = 31
};
////////////////////////////////////////////////////////////////////////////////
//
// \ru Управление блокировками.
+23 -10
View File
@@ -15,6 +15,7 @@
#include <templ_css_array.h>
#include <templ_three_states.h>
#include <templ_sptr.h>
#include <tool_multithreading.h>
#include <mb_rect.h>
#include <mb_placement3d.h>
#include <mb_rect1d.h>
@@ -43,8 +44,8 @@ class MATH_CLASS MbOrientedEdge;
class MATH_CLASS MbLoop;
class MATH_CLASS MbFace;
class MATH_CLASS MbFunction;
class MATH_CLASS MbFaceTemp;
struct MATH_CLASS MbItemIndex;
class MbFaceTemp;
namespace c3d // namespace C3D
@@ -1448,8 +1449,22 @@ protected:
MbSurface * surface; ///< \ru Поверхность грани (всегда не nullptr). \en Face surface (always not nullptr).
bool sameSense; ///< \ru Признак совпадения направления нормали грани с нормалью поверхности. \en An attribute of coincidence between the face normal direction and the surface normal direction.
RPArray<MbLoop> loops; ///< \ru Границы грани (первая граница должна быть внешней). \en Face boundaries (the first boundary should be external).
private:
mutable MbFaceTemp * temporal; ///< \ru Объект сопровождения грани (для скорости) \en An object for maintenance of a face (to improve speed)
//------------------------------------------------------------------------------
/** \brief \ru Вспомогательные данные.
\en Auxiliary data. \~
\details \ru Вспомогательные данные служат для ускорения работы объекта.
\en Auxiliary data are used for fast calculations. \n \~
*/
// ---
struct MATH_CLASS MbFaceAuxiliaryData : public AuxiliaryData
{
MbFaceTemp * _temporal; ///< \ru Объект сопровождения грани (для скорости). \en An object for maintenance of a face (to improve speed).
MbFaceAuxiliaryData() : AuxiliaryData(), _temporal( nullptr ) {}
virtual ~MbFaceAuxiliaryData();
MbFaceAuxiliaryData( const MbFaceAuxiliaryData & ) : _temporal( nullptr ) {}
};
mutable CacheManager<MbFaceAuxiliaryData> * cache;
public:
/// \ru Конструктор по поверхности и ориентации нормали грани относительно нормали поверхности. \en Constructor by surface and orientation of face normal in relation to surface normal.
@@ -1462,10 +1477,10 @@ public:
template <class Loops>
MbFace( const Loops & bnds, const MbSurface & surf, bool sense )
: MbTopologyItem()
, loops( bnds.size(), 1 )
, surface( const_cast<MbSurface *>(&surf) )
, sameSense( sense ) // признак совпадения нормали
, temporal( nullptr )
, loops ( bnds.size(), 1 )
, surface ( const_cast<MbSurface *>(&surf) )
, sameSense ( sense ) // признак совпадения нормали
, cache ( nullptr )
{
surface->AddRef();
for ( size_t i = 0, cnt = bnds.size(); i < cnt; ++i ) {
@@ -1665,8 +1680,6 @@ public:
bool ChangeCarrierBorneSpecial( const MbFace & face );
/// \ru Подобны ли поверхности для замены с преобразованием по матрице двумерных кривых? \en Are surfaces similar for replacement with transformation of two-dimensional curves by the matrix?
bool IsSimilarExactly( const MbFace & face, MbMatrix & matr, VERSION version, double precision = METRIC_PRECISION ) const;
bool IsSimilarExactly( const MbFace & face, MbMatrix & matr, const c3d::ConstFacesVectorPair * similarPairs,
VERSION version, double precision = METRIC_PRECISION ) const;
/// \ru Подобны ли поверхности граней для замены с преобразованием двумерных кривых? \en Are surfaces similar for replacement with transformation of two-dimensional curves?
bool IsSpecialSimilarExactly( const MbFace & face, bool doSwap, double precision = METRIC_PRECISION ) const;
@@ -1912,7 +1925,7 @@ public:
public:
/// \ru Создан ли временный объект сопровождения грани? \en Is a temporary object for the maintenance of a face created?
bool IsTemporal() const { return (temporal != nullptr); }
bool IsTemporal() const { return cache != nullptr ? (*cache)()->_temporal != nullptr : false; }
/// \ru Удалить временный объект сопровождения. \en Delete a temporary maintenance object.
void RemoveTemporal() const;
/// \ru Создать новый временный объект сопровождения. \en Create new temporary maintenance object.
+25 -8
View File
@@ -15,6 +15,7 @@
#include <mb_operation_result.h>
#include <mb_data.h>
#include <name_item.h>
#include <tool_multithreading.h>
#include <topology.h>
#include <op_binding_data.h>
#include <vector>
@@ -26,12 +27,12 @@ class MATH_CLASS MbFunction;
struct MATH_CLASS MbEdgeFacesIndexes;
class MATH_CLASS MbShellHistory;
class MATH_CLASS MbPntLoc;
class MATH_CLASS MbFaceSetTemp;
struct MATH_CLASS MbEdgeFunction;
class MATH_CLASS MbCheckTopologyParams;
class MATH_CLASS MbFaceShell;
class MATH_CLASS MbShellsDistanceData;
struct MATH_CLASS MbUnitInfo;
class MbFaceSetTemp;
namespace c3d // namespace C3D
{
@@ -114,19 +115,35 @@ void GetEdges( const FacesVector & faceSet, EdgesVector & edges );
\ingroup Topology_Items
*/
// ---
class MATH_CLASS MbFaceShell : public MbTopItem, public MbSyncItem {
class MATH_CLASS MbFaceShell : public MbTopItem, public MbSyncItem
{
protected:
RPArray<MbFace> faceSet; ///< \ru Множество граней. \en A set of faces.
bool closed; ///< \ru Признак замкнутости указывает на отсутствие края. \en An attribute of closedness indicates the absence of boundary.
private:
mutable MbFaceSetTemp * temporal; ///< \ru Объект сопровождения множества граней (для скорости) \en An object for maintenance of a set of faces (to improve speed)
//------------------------------------------------------------------------------
/** \brief \ru Вспомогательные данные.
\en Auxiliary data. \~
\details \ru Вспомогательные данные служат для ускорения работы объекта.
\en Auxiliary data are used for fast calculations. \n \~
*/
// ---
struct MbFaceShellAuxiliaryData : public AuxiliaryData
{
MbFaceSetTemp * _temporal; ///< \ru Объект сопровождения множества граней (для скорости). \en An object for maintenance of a set of faces (to improve speed).
MbFaceShellAuxiliaryData();
MbFaceShellAuxiliaryData( const MbFaceShellAuxiliaryData & );
virtual ~MbFaceShellAuxiliaryData();
};
mutable CacheManager<MbFaceShellAuxiliaryData> * cache;
public :
/// \ru Конструктор без параметров. \en Constructor without parameters.
MbFaceShell();
/// \ru Конструктор по набору граней. \en Constructor by a set of faces.
template <class Faces>
MbFaceShell( const Faces & initFaces );
template <class FacesVector>
MbFaceShell( const FacesVector & initFaces );
/// \ru Конструктор по грани. \en Constructor by face.
explicit MbFaceShell( const MbFace & face );
/// \ru Конструктор по граням другой оболочки. \en Constructor by faces of other shell.
@@ -856,7 +873,7 @@ public :
bool MergeSimilarFaces( SimpleName simMainName = c3d::SIMPLENAME_MAX );
/// \ru Создан ли временный объект сопровождения? \en Is a temporary object for the maintenance created?
bool IsTemporal() const { return (temporal != nullptr); }
bool IsTemporal() const { return cache != nullptr ? (*cache)()->_temporal != nullptr : false; }
/// \ru Удалить временный объект сопровождения. \en Delete a temporary maintenance object.
void RemoveTemporal( bool removeFacesTemporal = false ) const;
/// \ru Создать новый временный объект сопровождения. \en Create new temporary maintenance object.
@@ -900,7 +917,7 @@ MbFaceShell::MbFaceShell( const FacesVector & initFaces )
: MbTopItem()
, faceSet ( initFaces.size(), 1 )
, closed ( true )
, temporal ( nullptr )
, cache ( nullptr )
{
for ( size_t i = 0, cnt = initFaces.size(); i < cnt; ++i ) {
if ( initFaces[i] != nullptr )
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.