- C3d aggiornamento delle librerie ( 117957).
This commit is contained in:
SaraP
2023-09-12 15:07:38 +02:00
parent 239bc2e632
commit 12eac5a4f2
31 changed files with 616 additions and 224 deletions
+37
View File
@@ -70,6 +70,40 @@ MATH_FUNC (MbResultType) TransformedSolid( MbSolid & solid,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Собрать грани оболочки для методов прямого моделирования.
\en Collect faces for direct modeling methods. \~
\details
\ru Основное назначение функции - подсветка модифицируемых граней.
Функция собирает грани оболочки для методов прямого моделирования: \n
dmm_RemoveBelowRadius, dmm_RemoveBelowRadiusWithAdjacentFillets, dmm_PurifyFilletsBelowRadius,
dmm_FilletsRadiusSet, dmm_FilletsRadiusSetSingle, dmm_FilletsRadiusChange. \n
Для типа dmm_RemoveBelowRadius собираются замкнутые цилиндрические, конические, тороидальные, сферические грани тела,
а также грани вращения, радиус которых не превосходит указанный радиус.
Для типа dmm_PurifyFilletsBelowRadius собираются незамкнутые цилиндрические, тороидальные, сферические грани,
а также грани скругления, радиус которых не превосходит указанный радиус. \n
\en The main purpose of this function is to highlight faces that will be modified.
The method collects the faces of the shell for direct modeling methods: \n
dmm_RemoveBelowRadius, dmm_RemoveBelowRadiusWithAdjacentFillets, dmm_PurifyFilletsBelowRadius,
dmm_FilletsRadiusSet, dmm_FilletsRadiusSetSingle, dmm_FilletsRadiusChange. \n
The cylindrical, conical, toroidal, spherical, and revolution periodic faces are collected for the dmm_RemoveBelowRadius type.
The cylindrical, toroidal, spherical non-periodic, and fillet faces are collected for the dmm_PurifyFilletsBelowRadius type. \n \~
\param[in] shell - \ru Исходная оболочка тела.
\en The initial shell. \~
\param[in] parameters - \ru Параметры операции.
\en The operation parameters. \~
\param[out] outputFaces - \ru Найденные грани для дальнейшей модификации.
\en Found faces to be modified. \~
\return \ru Возвращает код результата действий.
\en Returns action result code. \~
\ingroup Direct_Modeling
*/
// ---
MATH_FUNC( bool ) CollectFacesForModification( const MbFaceShell & shell,
const MbCollectFacesParams & parameters,
c3d::FacesVector & outputFaces );
//------------------------------------------------------------------------------
/** \brief \ru Собрать грани оболочки для методов прямого моделирования.
\en Modify a shell by the methods of direct modeling. \~
@@ -85,6 +119,8 @@ MATH_FUNC (MbResultType) TransformedSolid( MbSolid & solid,
removal of the fillet faces from a shell (way==dmt_Purify). \n
The cylindrical, conical, toroidal, spherical, and revolution periodic faces are collect to remove way.
The cylindrical, toroidal, spherical non-periodic, and fillet faces are collect to purify way. \n \~
\deprecated \ru Метод устарел. Взамен использовать #CollectFacesForModification с набором параметров #MbCollectFacesParams.
\en The method is deprecated. Use instead #CollectFacesForModification with the parameters #MbCollectFacesParams. \~
\param[in] shell - \ru Исходная оболочка тела.
\en The initial faces set. \~
\param[in] way - \ru Способ модификации.
@@ -98,6 +134,7 @@ MATH_FUNC (MbResultType) TransformedSolid( MbSolid & solid,
\ingroup Direct_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( CollectFacesForModification with 'MbCollectFacesParams' argument )
MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
MbeModifyingType way,
double radius,
+6 -39
View File
@@ -10,34 +10,17 @@
#ifndef __ACTION_GENERAL_H
#define __ACTION_GENERAL_H
#include <math_define.h>
#include <templ_s_array.h>
#include <templ_rp_array.h>
#include <mb_cart_point3d.h>
#include <space_item.h>
#include <model_item.h>
#include <op_shell_parameter.h>
#include <op_swept_parameter.h>
#include <mb_operation_result.h>
#include <check_geometry.h>
#include <action_direct.h>
#include <vector>
class MATH_CLASS MbCurve;
class MATH_CLASS MbCurve3D;
class MATH_CLASS MbSurface;
class MATH_CLASS MbCurveEdge;
class MATH_CLASS MbFace;
class MATH_CLASS MbSolid;
class MATH_CLASS MbPlacement3D;
class MATH_CLASS MbPlanarGrid;
class MATH_CLASS MbGrid;
class MATH_CLASS MbSNameMaker;
struct MATH_CLASS MbShellsIntersectionData;
class IProgressIndicator;
//------------------------------------------------------------------------------
/** \brief \ru Проверить оболочку на предмет разделения на отдельные части.
\en Check if the shell can be subdivided into separate parts. \~
@@ -1422,24 +1405,10 @@ MATH_FUNC(bool) IsFilletFace( const MbFace & face,
\ingroup Algorithms_3D
*/
// ---
inline
c3d::SolidSPtr GetTransformedSolid( c3d::SolidSPtr & solid, MbeCopyMode & copyMode, const MbMatrix3D & matr, SimpleName transformedMainName = ct_TransformedSolid )
{
c3d::SolidSPtr resSolid( solid );
if ( (resSolid != nullptr) && !matr.IsSingle() ) {
MbSNameMaker n( transformedMainName, MbSNameMaker::i_SideNone, 0 );
MbSolid * resSolidPtr = nullptr;
TransformValues tv( matr );
::TransformedSolid( *solid, cm_Copy, tv, n, resSolidPtr );
if ( resSolidPtr != nullptr ) {
resSolid = resSolidPtr;
copyMode = cm_Same;
}
}
return resSolid;
}
MATH_FUNC(c3d::SolidSPtr) GetTransformedSolid( c3d::SolidSPtr & solid,
MbeCopyMode & copyMode,
const MbMatrix3D & matr,
SimpleName transformedMainName = ct_TransformedSolid );
//------------------------------------------------------------------------------
@@ -1466,6 +1435,4 @@ SPtr<Item> GetTransformedItem( SPtr<Item> & item, const MbMatrix3D & matr, MbReg
}
return resItem;
}
#endif // __ACTION_GENERAL_H
#endif // __ACTION_GENERAL_H
+1 -1
View File
@@ -306,7 +306,7 @@ MATH_FUNC (bool) TruncatDirection( const MbCurveEdge & truncatingEdge,
\ingroup Algorithms_3D
*/
// ---
// DEPRECATE_DECLARE_REPLACE( SmoothPositionData with MbSmoothPositionDataParams )
DEPRECATE_DECLARE_REPLACE( SmoothPositionData with MbSmoothPositionDataParams )
MATH_FUNC (MbResultType) SmoothPositionData( const MbSolid & solid,
RPArray<MbCurveEdge> & edges,
const SmoothValues & params,
+1 -1
View File
@@ -1051,7 +1051,7 @@ MATH_FUNC (MbResultType) OctaLattice( const MbOctaLatticeParams & params,
\ingroup Shell_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( SectionShell with 'MbSectionResults' argument )
DEPRECATE_DECLARE_REPLACE( SectionShell with 'MbSectionResults' argument )
MATH_FUNC( MbResultType ) SectionShell( const c3d::SolidSPtr & solid,
MbeCopyMode sameShell,
const MbSectionData & data,
+5 -5
View File
@@ -613,7 +613,7 @@ MATH_FUNC( MbResultType ) LoftedSolid( const MbLoftedSolidParams & loftSolParams
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine,
@@ -654,7 +654,7 @@ MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine, // осевая линия может быть nullptr
@@ -696,7 +696,7 @@ MATH_FUNC( MbResultType ) LoftedSolid( SArray<MbPlacement3D> & places,
\ingroup Solid_Modeling
*/
// ---
//DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
DEPRECATE_DECLARE_REPLACE( LoftedSolid with 'MbLoftedSolidParams' argument )
MATH_FUNC( MbResultType ) LoftedSolid( RPArray<MbSurface> & surfaces,
RPArray<MbContour> & planeConours,
const MbCurve3D * spine, // осевая линия может быть nullptr
@@ -1212,7 +1212,7 @@ MATH_FUNC (MbResultType) SymmetrySolid( MbSolid & solid,
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/ // ---
// DEPRECATE_DECLARE_REPLACE( RibSolid with MbRibSolidParameters )
DEPRECATE_DECLARE_REPLACE( RibSolid with MbRibSolidParameters )
MATH_FUNC (MbResultType) RibSolid( MbSolid & solid,
MbeCopyMode sameShell,
const MbPlacement3D & place,
@@ -1275,7 +1275,7 @@ MATH_FUNC (MbResultType) RibSolid( MbSolid & solid,
\en Returns operation result code. \~
\ingroup Solid_Modeling
*/ // ---
// DEPRECATE_DECLARE_REPLACE( RibElement with MbRibSolidParameters )
DEPRECATE_DECLARE_REPLACE( RibElement with MbRibSolidParameters )
MATH_FUNC (MbResultType) RibElement( const MbSolid & solid,
const MbPlacement3D & place,
MbContour & contour,
+1 -1
View File
@@ -317,7 +317,7 @@ public :
/// \ru Дать отдельные свойства для OpenGL. \en Get some properties for OpenGL.
const MbRGBA & GetAmbient() const { return _ambient; } // \ru Дать коэффициент общего фона. \en Get a coefficient of ambient background.
const MbRGBA & GetDiffuse() const { return _diffuse; } // \ru Дать коэффициент диффузного отражения. \en Get a coefficient of diffuse reflection.
const MbRGBA & GetSpecularity() const { return _diffuse; } // \ru Дать коэффициент зеркального отражения света. \en Get a coefficient of specular reflection for light.
const MbRGBA & GetSpecularity() const { return _specularity; }// \ru Дать коэффициент зеркального отражения света. \en Get a coefficient of specular reflection for light.
const MbRGBA & GetEmission() const { return _emission; } // \ru Дать коэффициент излучения. \en Get a coefficient of emissivity.
const MbUuid & GetIdentifier() const { return _uuid; } // \ru Дать идентификатор. \en Get identifier.
uint8 GetShininess() const { return _shininess; } // \ru Дать блеск (показатель степени в законе зеркального отражения). \en Get shininess (index according to the law of specular reflection).
+4 -4
View File
@@ -44,10 +44,10 @@ public:
*/
//---
enum class MbeHotPointType : uint16 {
undefinedHP = 0, ///< \ru Неопределенный тип. \en Undefined type.
draftHP, ///< \ru Хот-точка операции уклона. \en The draft operation hot point.
conicSectionHP, ///< \ru Хот-точка операции построения переменного конического сечения. \en The conic section operation hot point.
undefinedHP = 0, ///< \ru Неопределенный тип. \en Undefined type.
draftHP, ///< \ru Хот-точка операции уклона. \en The draft operation hot point.
conicSectionHP, ///< \ru Хот-точка операции построения переменного конического сечения. \en The conic section operation hot point.
DMFilletRadiusSetHP, ///< \ru Хот-точка операции прямого моделирования по установке радиусов граням скругления. \en The direct modeling operation's hot point by set fillet face's radius.
// \ru Вставлять новые типы перед этим типом. \en Insert new types before this type.
endHP = SYS_MAX_INT16
};
+21
View File
@@ -988,6 +988,27 @@ MATH_FUNC (bool) CheckTopologyItemsMainNames( const MbFaceShell & s
*/ //---
MATH_FUNC (bool) AddEdgeSmoothnessAttributes( MbFaceShell & shell, bool skipExisting );
//------------------------------------------------------------------------------
/** \brief \ru Добавить в рёбра атрибуты гладкости ребра.
\en Add edges smoothness attributes. \~
\details \ru Добавить в рёбра атрибуты с информацией о гладкости стыковки граней в ребре.
\en Add attributes to edges with information about the smoothness of joining faces in the edge. \~
\param[in] shell - \ru Оболочка, которую обрабатываем.
\en Shell to processing. \~
\param[in] skipExisting - \ru Пропустить уже существующие (не обновлять в них данные).
\en Skip existing ones (do not update data in them). \~
\param[in] filledEdges - \ru Ребра с созданными или сохраненным атрибутами гладкости.
\en Edges with created or saved smoothness attributes. \~
\param[in] emptyEdges - \ru Ребра без атрибутов гладкости (нет второй поверхности или сбой создания).
\en Edges without smoothness attributes (no second surface or creation failure). \~
\return \ru Возвращает true, если новые атрибуты были добавлены.
\en Returns true if new attributes were added.\~
\ingroup Algorithms_3D
*/ //---
MATH_FUNC( bool ) AddEdgeSmoothnessAttributes( MbFaceShell & shell, bool skipExisting,
c3d::ConstEdgesVector & filledEdges,
c3d::ConstEdgesVector & emptyEdges );
//------------------------------------------------------------------------------
/** \brief \ru Обновить данные в атрибутах гладкости ребра.
\en Update edges smoothness attributes data. \~
+19
View File
@@ -12,6 +12,7 @@
#include <reference_item.h>
#include <mb_placement.h>
#include <mb_placement3d.h>
#include <mb_pmi.h>
#include <vector>
#include <set>
@@ -539,6 +540,24 @@ typedef std::map< SPtr<const MbItem>, AnnotationSptrVector > map_of_visual_items
typedef std::vector< SPtr<MaTextItem> > vector_of_text;
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MbPMI> ) ConvertPMI( const MaAnnotationItem& it );
//------------------------------------------------------------------------------
/** \brief \ru Преобразовать элемент аннотации.
\en Transform annotation item. \~
*/
// ---
CONV_FUNC( SPtr<MaAnnotationItem> ) ConvertPMI( const MbPMI& it );
//------------------------------------------------------------------------------
/** \brief \ru Размер - родоначальник классов для размеров различных типов.
\en Dimension is the parent of all classes for dimensions of different types. \~
+38 -4
View File
@@ -15,6 +15,8 @@
#include <mb_placement3d.h>
#include <mb_matrix3d.h>
#include <mb_cube.h>
#include <mb_axis3d.h>
#include <tool_multithreading.h>
#include <vector>
@@ -55,10 +57,34 @@ private:
MbeLocalSystemType3D coordinateType; ///< \ru Тип системы координат, в которой заданы координатные функции. \en Type of coordinate system the functions of coordinates are specified in.
c3d::DoubleVector specialParams; ///< \ru Множество параметров особых точек кривой. \en Set of parameters of curve's singular points.
// \ru Буферные данные для ускорения вычислений. \en Buffer data to speed up computations.
mutable double metricLength;
mutable MbCube cube;
//------------------------------------------------------------------------------
/** \brief \ru Вспомогательные данные для ускорения вычислений.
\en Auxiliary data to speed up computations. \~
\details \ru Вспомогательные данные служат для ускорения работы объекта.
\en Auxiliary data are used for fast calculations. \n \~
*/
// ---
class MbCharacterAuxiliaryData : public AuxiliaryData {
public:
double _metricLength; ///< \ru Метрическая длина кривой. \en Metric length of the curve.
MbCube _cube; ///< \ru Габарит кривой. \en Bounding box of a curve.
MbeSpaceType _type; ///< \ru Тип пространственно близкой кривой. \en Space-near curve type.
double _radius; ///< \ru Физический радиус кривой или ноль, если определить невозможно. \en physical radius of the curve or zero if impossible to get.
MbAxis3D _axis; ///< \ru Ось кривой. \en The axis of the curve.
MbCharacterAuxiliaryData();
MbCharacterAuxiliaryData( const MbCharacterAuxiliaryData & );
void Init( const MbCharacterAuxiliaryData & );
void Init( const MbeSpaceType &, double, const MbAxis3D & );
void Reset();
void Move( const MbVector3D & );
void Rotate( const MbAxis3D & axis, double angle );
virtual ~MbCharacterAuxiliaryData();
};
mutable CacheManager<MbCharacterAuxiliaryData> cache;
public:
/// \ru Конструктор (использует оригиналы функций). \en Constructor (uses functions originals).
MbCharacterCurve3D( MbFunction & x,
@@ -124,6 +150,12 @@ public:
size_t GetCount() const override;
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
// \ru Дать физический радиус кривой или ноль, если это невозможно. \en Get the physical radius of the curve or zero if it impossible.
double GetRadius( double accuracy = METRIC_REGION ) const override;
// \ru Дать ось окружности, геометрически совпадающей с данной кривой. \en Get an axis of a circle which is geometrically coincident to the given curve.
bool GetCircleAxis( MbAxis3D & axis ) const override;
void Refresh() override; // \ru Сбросить все временные данные. \en Reset all temporary data.
void CheckParam ( double & t ) const;
void CalculateParam( double t, MbCartPoint3D & point,
MbVector3D & firstDer, MbVector3D & secondDer, MbVector3D & thirdDer ) const;
@@ -148,6 +180,8 @@ protected:
private:
// \ru Проверить и установить признак замкнутости. \en Check and set the flag of closedness.
void CheckClosed();
// \ru Рассчитать вспомогательные данные. \en Calculate auxiliary data.
void CalculateAuxData( bool hardSave = true ) const;
private:
void operator = ( const MbCharacterCurve3D & ); // \ru Не реализовано. \en Not implemented.
+5 -1
View File
@@ -238,8 +238,9 @@ public:
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
MbContour * NurbsContour() const override;
DEPRECATE_DECLARE_REPLACE( CheckClosed )
void SetClosed(); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void CheckClosed( double closedEps ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void CheckClosed( double closedEps = Math::LengthEps ); ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
void InitClosed( bool c ) { closed = c; } ///< \ru Установить признак замкнутости контура. \en Set the closedness attribute of contour.
/** \brief \ru Проверить замкнутость и непрерывность точек контура.
@@ -703,6 +704,7 @@ MbContour::MbContour( const Curves & initCurves, bool same )
CalculateGabarit( rect ); // посчитать габарит
CalculateParamLength();
CalculateMetricLength();
#pragma warning(suppress : 4996)
SetClosed(); // установить признак замкнутости контура
}
@@ -752,6 +754,7 @@ bool MbContour::Init( Curves & curves, bool same )
CalculateGabarit( rect ); // посчитать габарит
CalculateParamLength();
CalculateMetricLength();
#pragma warning( suppress : 4996 )
SetClosed(); // установить признак замкнутости контура
res = true;
}
@@ -795,6 +798,7 @@ void MbContour::DetachSegments( CurvesVector & segms )
::DetachItem( segm );
}
segments.clear();
#pragma warning(suppress : 4996)
SetClosed(); // установить признак замкнутости контура
Clear(); // сбросить контур
}
+62 -12
View File
@@ -213,24 +213,40 @@ public :
/// \ru Получить минимальное значение параметра. \en Get the minimum value of parameter.
virtual double GetTMin () const = 0;
/** \brief \ru Определить, является ли кривая замкнутой.
\en Define whether the curve is closed. \~
\details \ru Определить, является ли кривая замкнутой.\n
Замкнутой считается кривая, если она циклична:\n
- начальная и конечная точка кривой совпадают,\n
/** \brief \ru Определить, является ли кривая периодической.
\en Define whether the curve is periodic. \~
\details \ru Определить, является ли кривая периодической.\n
Периодическая кривая является замкнутой.
Кривая считается периодической, если:\n
- начальная и конечная точка кривой совпадают;\n
- производные в начальной и конечной точке совпадают; \n
если по своей природе кривая допускает изломы (контур, ломаная),
то допускается не совпадение производных;
у кривой Безье производные должны совпадать по направлению,
но могут не совпадать по модулю.
\en Define whether the curve is closed.\n
A curve is considered as closed if it is cyclic:\n
- start point is coincident with end point,\n
- derivatives in start point and end point coincide, \n
но могут не совпадать по модулю.\n
Кривые:\n
- MbLine,\n
- MbLineSegment,\n
- MbCosinusoid,\n
- MbContour (если он содержит только один сегмент одного из указанных типов)\n
не считаются периодическими при совпадении начальной и конечной точек.
Метод IsClosed() для них всегда возвращает false.\~
\en Define whether the curve is periodic.\n
A periodic curve is closed.
A curve is considered as periodic if:\n
- start point is coincident with end point;\n
- derivatives in start point and end point coincide; \n
if there are breaks at curve (in cases when a curve is contour or polyline),
then derivatives may not coincide;
in Bezier curve derivatives should coincide by direction,
but they may differ by absolute value. \~
but they may differ by absolute value.\n
Curves:\n
- MbLine,\n
- MbLineSegment,\n
- MbCosinusoid,\n
- MbContour (if it contains only a single segment of one of the listed types)\n
are not considered periodic when the start and end points coincide.
The IsClosed() method always returns false for them.\~
\return \ru true, если кривая замкнута.
\en True if a curve is closed. \~
*/
@@ -245,7 +261,41 @@ public :
*/
virtual double GetPeriod() const;
/// \ru Определить, является ли замкнутая кривая периодической. \en Define whether the curve is periodic.
/** \brief \ru Определить, является ли кривая периодической.
\en Define whether the curve is periodic. \~
\details \ru Определить, является ли кривая периодической.\n
Кривая считается периодической, если:\n
- начальная и конечная точка кривой совпадают;\n
- производные в начальной и конечной точке совпадают; \n
если по своей природе кривая допускает изломы (контур, ломаная),
то допускается не совпадение производных;
у кривой Безье производные должны совпадать по направлению,
но могут не совпадать по модулю.\n
Кривые:\n
- MbLine,\n
- MbLineSegment,\n
- MbCosinusoid,\n
- MbContour (если он содержит только один сегмент одного из указанных типов)\n
при совпадении начальной и конечной точек не считаются периодическими.
Метод IsPeriodic() для них всегда возвращает false.\~
\en Define whether the curve is periodic.\n
A curve is considered as periodic if:\n
- start point is coincident with end point;\n
- derivatives in start point and end point coincide; \n
if there are breaks at curve (in cases when a curve is contour or polyline),
then derivatives may not coincide;
in Bezier curve derivatives should coincide by direction,
but they may differ by absolute value.\n
Curves:\n
- MbLine,\n
- MbLineSegment,\n
- MbCosinusoid,\n
- MbContour (if it contains only a single segment of one of the listed types)\n
are not considered periodic when the start and end points coincide.
The IsPeriodic() method always returns false for them.\~
\return \ru true, если кривая замкнута.
\en True if a curve is closed. \~
*/
virtual bool IsPeriodic() const;
/** \brief \ru Определить, замкнута ли кривая фактически независимо от гладкости замыкания.
+70 -14
View File
@@ -156,24 +156,42 @@ public :
/// \ru Вернуть минимальное значение параметра. \en Get the minimum value of parameter.
virtual double GetTMin() const = 0;
/** \brief \ru Определить, является ли кривая замкнутой.
\en Define whether the curve is closed. \~
\details \ru Определить, является ли кривая замкнутой.\n
Замкнутой считается кривая, если она циклична:\n
- начальная и конечная точка кривой совпадают,\n
/** \brief \ru Определить, является ли кривая периодической.
\en Define whether the curve is periodic. \~
\details \ru Определить, является ли кривая периодической.\n
Периодическая кривая является замкнутой.
Кривая считается периодической, если:\n
- начальная и конечная точка кривой совпадают;\n
- производные в начальной и конечной точке совпадают; \n
если по своей природе кривая допускает изломы (контур, ломаная),
если по своей природе кривая допускает изломы (контур, ломаная),
то допускается не совпадение производных;
у кривой Безье производные должны совпадать по направлению,
но могут не совпадать по модулю.
\en Define whether the curve is closed.\n
A curve is considered as closed if it is cyclic:\n
- start point is coincident with end point,\n
- derivatives in start point and end point coincide, \n
if there are breaks at curve (in cases when a curve is contour or polyline),
но могут не совпадать по модулю.\n
Кривые:\n
- MbLine3D,\n
- MbLineSegment3D,\n
- MbSpiral и производные классы,\n
- MbBridgeCurve3D,\n
- MbContour3D (если он содержит только один сегмент одного из указанных типов)\n
не считаются периодическими при совпадении начальной и конечной точек.
Метод IsClosed() для них всегда возвращает false.\~
\en Define whether the curve is periodic.\n
A periodic curve is closed.
A curve is considered as periodic if:\n
- start point is coincident with end point;\n
- derivatives in start point and end point coincide; \n
if there are breaks at curve (in cases when a curve is contour or polyline),
then derivatives may not coincide;
in Bezier curve derivatives should coincide by direction,
but they may differ by absolute value. \~
but they may differ by absolute value.\n
Curves:\n
- MbLine3D,\n
- MbLineSegment3D,\n
- MbSpiral and inherited classes,\n
- MbBridgeCurve3D,\n
- MbContour3D (if it contains only a single segment of one of the listed types)\n
are not considered periodic when the start and end points coincide.
The IsClosed() method always returns false for them.\~
\return \ru true, если кривая замкнута.
\en True if a curve is closed. \~
\ingroup Curves_3D
@@ -182,7 +200,45 @@ public :
/// \ru Вернуть период. Если кривая непериодическая, то 0. \en Return period. If a curve is not periodic then 0.
virtual double GetPeriod() const;
/// \ru Определить, является ли замкнутая кривая периодической. \en Define whether the curve is periodic.
/** \brief \ru Определить, является ли кривая периодической.
\en Define whether the curve is periodic. \~
\details \ru Определить, является ли кривая периодической.\n
Кривая считается периодической, если:\n
- начальная и конечная точка кривой совпадают;\n
- производные в начальной и конечной точке совпадают; \n
если по своей природе кривая допускает изломы (контур, ломаная),
то допускается не совпадение производных;
у кривой Безье производные должны совпадать по направлению,
но могут не совпадать по модулю.\n
Кривые:\n
- MbLine3D,\n
- MbLineSegment3D,\n
- MbSpiral и производные классы,\n
- MbBridgeCurve3D,\n
- MbContour3D (если он содержит только один сегмент одного из указанных типов)\n
при совпадении начальной и конечной точек не считаются периодическими.
Метод IsPeriodic() для них всегда возвращает false.\~
\en Define whether the curve is periodic.\n
A curve is considered as periodic if:\n
- start point is coincident with end point;\n
- derivatives in start point and end point coincide; \n
if there are breaks at curve (in cases when a curve is contour or polyline),
then derivatives may not coincide;
in Bezier curve derivatives should coincide by direction,
but they may differ by absolute value.\n
Curves:\n
- MbLine3D,\n
- MbLineSegment3D,\n
- MbSpiral and inherited classes,\n
- MbBridgeCurve3D,\n
- MbContour3D (if it contains only a single segment of one of the listed types)\n
are not considered periodic when the start and end points coincide.
The IsPeriodic() method always returns false for them.\~
\return \ru true, если кривая замкнута.
\en True if a curve is closed. \~
\ingroup Curves_3D
*/
virtual bool IsPeriodic() const;
/** \brief \ru Определить, замкнута ли кривая фактически независимо от гладкости замыкания.
+3
View File
@@ -163,6 +163,9 @@ public :
double FirstDer ( double & t ) const override; // \ru Первая производная по t \en The first derivative with respect to t
double SecondDer ( double & t ) const override; // \ru Вторая производная по t \en The second derivative with respect to t
double ThirdDer ( double & t ) const override; // \ru Третья производная по t \en The third derivative with respect to t
// \ru Вычислить значение и производные. \en Calculate value and derivatives of object for given parameter. \~
void Explore ( double & t, bool ext,
double & val, double & fir, double * sec, double * thr ) const override;
void Inverse ( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
double Step ( double t, double sag ) const override;
+9 -9
View File
@@ -1356,23 +1356,23 @@ GCE_FUNC(constraint_item) GCE_AddColinear( GCE_system gSys, geom_item g[2] );
GCE_FUNC(constraint_item) GCE_AddColinear3Points( GCE_system gcSys, geom_item pnt[3] );
//----------------------------------------------------------------------------------------
/** \brief \ru Задать ограничение "Равенство длин" для отрезков.
\en Set the constraint "Equality of lengths" for segments. \~
/** \brief \ru Задать ограничение "Равенство длин" кривых.
\en Set the constraint "Equality of lengths" for curves. \~
\param[in] gSys - \ru Система ограничений.
\en System of constraints. \~
\param[in] ls1 - \ru Дескриптор первого отрезка.
\en Descriptor of the first segment. \~
\param[in] ls2 - \ru Дескриптор второго отрезка.
\en Descriptor of the second segment. \~
\param[in] curve1 - \ru Дескриптор первой кривой.
\en Descriptor of the first curve. \~
\param[in] curve2 - \ru Дескриптор второй кривой.
\en Descriptor of the second curve. \~
\return \ru Дескриптор нового ограничения.
\en Descriptor of a new constraint. \~
\details \ru Ограничение применимо для отрезков или участков прямых, созданных с помощью
\details \ru Ограничение применимо для отрезков или участков прямых или сплайнов, созданных с помощью
функции #GCE_AddBoundedCurve или #GCE_AddLineSeg.
\en The constraint is applicable for segments or line pieces created by
\en The constraint is applicable for segments or line or spline pieces created by
the function #GCE_AddBoundedCurve or #GCE_AddLineSeg. \~
*/
//---
GCE_FUNC(constraint_item) GCE_AddEqualLength( GCE_system gSys, geom_item ls1, geom_item ls2 );
GCE_FUNC(constraint_item) GCE_AddEqualLength( GCE_system gSys, geom_item curve1, geom_item curve2 );
//----------------------------------------------------------------------------------------
/** \brief \ru Задать ограничение "Равенство радиусов" для двух окружностей (дуг)
+1 -1
View File
@@ -190,7 +190,7 @@ typedef enum
// \ru Бинарные геометрические ограничения: "constr( geom1, geom2 )" \en Binary geometric constraints: "constr( geom1, geom2 )"
, GCE_COINCIDENT ///< \ru Совпадение пары геометрических объектов. \en Coincidence of a pair of geometric objects.
, GCE_EQUAL_CURVATURE ///< \ru Равенство кривизны кривых в точках. \en Equality of curves curvature in given points.
, GCE_EQUAL_LENGTH ///< \ru Равенство длин пары отрезков. \en Equality of two segments lengths.
, GCE_EQUAL_LENGTH ///< \ru Равенство длин пары кривых. \en Equality of two curves lengths.
, GCE_EQUAL_RADIUS ///< \ru Равенство радиусов пары окружностей. \en Equality of two circles lengths.
, GCE_EQUAL_OFFSET ///< \ru Равенство смещений пары эквидистантных кривых. \en Equality of offset of two equidistant curves.
, GCE_PARALLEL ///< \ru Параллельность пары прямых или отрезков. \en Parallelism of two lines or segments.
+3 -1
View File
@@ -506,6 +506,7 @@ GCM_FUNC(GCM_constraint) GCM_AddDistance( GCM_system gSys, GCM_geom g1, GCM_geom
Если ось вращения axis задана (т.е. != GCM_NULL), то угол имеет планарный
способ измерения (0 ... 2пи). В этом случае направления 'g1' и 'g2' обязаны
лежать в плоскости с нормалью заданной осью axis (оба направления перпендикулярны оси).
Угол типа плоскость-прямая отмеряется от плоскости вне зависимости от порядка пришедших аргументов.
В случае неудавшегося вызова, функция вернет дескриптор пустого объекта GCM_NULL.
\en The function creates a dimensional constraint of type GCM_ANGLE, which
specifies angle between the directions of two geometric objects.
@@ -513,6 +514,7 @@ GCM_FUNC(GCM_constraint) GCM_AddDistance( GCM_system gSys, GCM_geom g1, GCM_geom
planar method of measurement (0 ... 2пи). In this case directions of
'g1' and 'g2' must lie on a plane which has a normal specified by
the 'axis' parameter (both directions perpendicular to the axis ).
A plane-line angle is measured from the plane regardless of the order of the arguments.
In a failed call, the function returns a handle to an empty object GCM_NULL. \~
*/
//---
@@ -1197,7 +1199,7 @@ struct GCT_diagnostic_pars;
It's used for testing purposes only.
*/
//---
GCM_FUNC(const GCT_diagnostic_pars &) GCM_DiagnosticPars( GCM_system gSys );
GCM_FUNC(const GCT_diagnostic_pars) GCM_DiagnosticPars( GCM_system gSys );
//----------------------------------------------------------------------------------------
// Use GCM_FreezeGeom instead this (2019).
+17 -15
View File
@@ -133,57 +133,60 @@ class GCM_CLASS MtGeomVariant
public:
MtGeomVariant() : m_value( nullptr ) {}
MtGeomVariant( const MbCartPoint3D & );
MtGeomVariant( const MtUnifiedGeom & );
MtGeomVariant( const MtGeomVariant & );
MtGeomVariant( MtGeomVariant && gVar ): m_value( nullptr ) { TakeOn( gVar.m_value ); gVar.m_value = nullptr; }
MtGeomVariant( const MtParGeom & g ) : m_value( nullptr ) { Assign(g); }
MtGeomVariant( const GCM_g_type );
MtGeomVariant( MtParGeom & g ) : m_value( nullptr ) { Share(g); }
MtGeomVariant( const GCM_g_type );
MtGeomVariant & operator = ( const MtGeomVariant & gVar ) { return Assign( gVar ); }
/// \ru Переносное присвоение. \en Moving assignment.
MtGeomVariant & operator = ( MtGeomVariant && gVar ) { TakeOn( gVar.m_value ); gVar.m_value = nullptr; return *this; }
~MtGeomVariant();
public:
/// \ru Тип геометрии, которому удовлетворяет объект. \en Type of geometry which is satisfied by the object.
/// \ru Тип геометрии. \en Type of geometry.
GCM_g_type GeomType() const;
/// \ru Выдать данные геометрии в унифицированной форме записи. \en Get the uniform geometry data record.
GCM_g_record GeomRecord() const;
/// \ru Выдать трансформацию объекта. \en Get transformation of the object.
MbMatrix3D & GetTransMatrix( MbMatrix3D & ) const;
/// \ru Определить, является ли объект пустым. \en Define whether the object is empty.
/// \ru Выдать трансформацию объекта из стандартного положения. \en Get transformation of the object from the standart position.
MbMatrix3D & GetTransMatrix( MbMatrix3D & ) const;
/// \ru Является ли объект пустым. \en Get logic value whether the object is empty.
bool IsNull() const;
public: /* Assigning methods
public: /* Assigning methods.
*/
MtGeomVariant & Assign( const MtGeomVariant & );
MtGeomVariant & Assign( MtParGeom & );
MtGeomVariant & Assign( const MtParGeom & );
MtGeomVariant & Assign( GCM_g_type, const MbCartPoint3D & org, const MbVector3D & zAxis
, const MbVector3D & xAxis, double r1 = 0.0, double r2 = 0.0 );
template<class GeomDS>
MtGeomVariant & Assign( GeomDS * );
MtGeomVariant & Assign( const GeomDS * );
MtGeomVariant & Reset(); ///< \ru Задать как тип GCM_NULL_GTYPE. \ru Set as GCM_NULL_GTYPE type. \~
MtGeomVariant & SetAsPoint( const MbCartPoint3D & );
MtGeomVariant & SetAsLine( const MbCartPoint3D & org, const MbVector3D & dir );
MtGeomVariant & SetAsPlane( const MbCartPoint3D & org, const MbVector3D & normal );
MtGeomVariant & SetAsPlane( const MbPlacement3D & );
MtGeomVariant & SetAsMarker( const MbCartPoint3D & org, const MbVector3D & zAxis, const MbVector3D & xAxis );
MtGeomVariant & Transform( const MbMatrix3D & );
public: /* Methods for internal use
public: /* Methods for internal use.
*/
const MtParGeom & ParGeom() const;
MtUnifiedGeom & GetTuple( MtUnifiedGeom & ) const;
private:
MtGeomVariant & Share( MtParGeom & );
// Take ownership of a geometric object.
MtGeomVariant & TakeOn( MtParGeom * );
private:
MtParGeom * m_value;
MtParGeom * m_value; // unique ownerhip of the geometric record value.
};
//----------------------------------------------------------------------------------------
//
//---
template<class GeomDS>
MtGeomVariant & MtGeomVariant::Assign( GeomDS * gDs )
MtGeomVariant & MtGeomVariant::Assign( const GeomDS * gDs )
{
if ( gDs )
{
@@ -192,7 +195,6 @@ MtGeomVariant & MtGeomVariant::Assign( GeomDS * gDs )
return Reset();
}
//----------------------------------------------------------------------------------------
/** \brief \ru Структура данных сопрягаемой геометрии.
\en Data structure for matched geometry. \~
+2 -2
View File
@@ -271,8 +271,8 @@ public:
inline bool operator == ( const ItGeom * ) const;
private:
SPtr<ItGeom> m_geom; // Geometric object of the constraint system (often, it is a rigid body)
MtGeomVariant m_refGeom; // Geometric object given in the vNode's LCS.
SPtr<ItGeom> m_geom; // Geometric object of the constraint system (often, it is a rigid body).
MtGeomVariant m_subGeom; // Geometric object given in the vNode's LCS.
};
//----------------------------------------------------------------------------------------
+2 -2
View File
@@ -67,9 +67,9 @@ inline GCM_FUNC(int) PriorityLevel( GCM_result resCode )
case GCM_RESULT_InappropriateAlignment: //
case GCM_RESULT_InvalidArguments: // \ru В ограничении не заданы аргументы (пустые аргументы). \en Constraint has invalid or undefined (void) arguments.
case GCM_RESULT_IncompatibleArguments: //
case mtResCode_UnsupportedTangencyChoice: // \ru Для сопряжения касание - опция выбора по окружности или по образующей не поддреживается \en For mate the option of tangency choice by circle or generating curve is unsupported
case GCM_RESULT_UnsupportedTangencyChoice: // \ru Для сопряжения касание - опция выбора по окружности или по образующей не поддреживается \en For mate the option of tangency choice by circle or generating curve is unsupported
case GCM_RESULT_UnsupportedFollowerSurface:
case mtResCode_IsNoPossibleForCircTanChoice: // \ru Для данной пары поверхностей касание по окружности геометрически не возможно \en For a given pair of surfaces the touching along the circle is geometrically impossible
case GCM_RESULT_InconsistentTangencyChoice: // \ru Для данной пары поверхностей касание по окружности геометрически не возможно \en For a given pair of surfaces the touching along the circle is geometrically impossible
case GCM_RESULT_InconsistentPlanarAngle: // \ru Не соблюдаются условия планарного угла (векторы от пары тел должны быть перпендикулярны оси) \en Planar angle conditions are not met (vectors from a pair of solids should be perpendicular to the axis)
case GCM_RESULT_InconsistentFollowerAxis:
case mtResCode_CoaxialMtGearTransmissionIsNotAvalable:
+18 -13
View File
@@ -258,22 +258,21 @@ typedef enum
*/
, GCM_RESULT_IncompatibleArguments = 3001 ///< \ru Несовместные типы аргументов ограничения. \en Inconsistent types of constraint arguments. \~
, GCM_RESULT_UndefinedAngleType
, GCM_RESULT_InconsistentAlignment ///< \ru Величина ориентации несовместна с другими сопряжениями. \en The orientation value is inconsistent with other mates. \~
, GCM_RESULT_InconsistentAlignment = 3003 ///< \ru Величина ориентации несовместна с другими сопряжениями. \en The orientation value is inconsistent with other mates. \~
, GCM_RESULT_Duplicated ///< \ru Ограничение дублирует другое. \en Constraint duplicates another.
, GCM_RESULT_CyclicDependence ///< \ru Неразрешимая циклическая зависимость. \en Unsolvable cyclic dependence.
, GCM_RESULT_MultiDependedGeom ///< \ru Объект является зависимым от двух и более ограничений 'GCM_DEPENDED'. \en A geometric object is dependent on two or more constraints of 'GCM_DEPENDED' type.
, GCM_RESULT_OverconstrainingDependedGeoms ///< \ru Избыточное ограничение между зависимыми объектами. \en A redundancy constraint between depended geoms. \~
, GCM_RESULT_DependedGeomCantBeFixed ///< \ru Зависимый аргумент ограничения 'GCM_DEPENDED' не может быть зафиксирован. \en The depended argument of 'GCM_DEPENDED' can't be fixed.
, GCM_RESULT_InvalidArguments ///< \ru В ограничении не заданы аргументы (пустые аргументы). \en Constraint has invalid or undefined (void) arguments.
, mtResCode_UnsupportedTangencyChoice ///< \ru Для сопряжения касание - опция выбора по окружности или по образующей не поддреживается \en For mate the option of tangency choice by circle or generating curve is unsupported.
, mtResCode_IsNoPossibleForCircTanChoice ///< \ru Для данной пары поверхностей касание по окружности геометрически не возможно \en For a given pair of surfaces the touching along the circle is geometrically impossible.
, mtResCode_CoaxialMtGearTransmissionIsNotAvalable ///< \ru Механическая передача вращения компонентов с совпадающими осями не поддерживается \en Mechanical transmission of components rotation with the same axis is not supported
, GCM_RESULT_OverconstrainedCamMechanism ///< \ru Имеются ограничения, создающие зависимость движения толкателя от движения кулачка, помимо самого кулачкового механизма. \en There are constraints creating dependence of the follower displacement from the cam in addition to the cam mechanism.
, mtResCode_CyclicDependenceForTwoOrMoreCamGears ///< \ru Задана циклическая зависимость для двух или более кулачковых механизмов \en Given the cyclic dependence for two or more cam gears
, GCM_RESULT_InconsistentFollowerAxis ///< \ru Заданные ограничения для толкателя не соответствую его оси движения. \en Given constraints for the follwer doesn't correspond to its motion axis.
, GCM_RESULT_InconsistentPlanarAngle ///< \ru Не соблюдаются условия планарного угла (векторы сторон угла должны быть перпендикулярны оси). \en Planar angle conditions are not met (vectors from the sides of angle should be perpendicular to the axis).
, GCM_RESULT_UnsupportedFollowerSurface ///< \ru Контактная поверхность толкателя, выбранная для кинематической пары "кулачек-толкатель", пока не поддерживается решателем. \en The follower contact surface selected for the cam-follower kinematic pair is not yet supported by the solver.
, GCM_RESULT_UnsupportedTangencyChoice ///< \ru Для сопряжения касание - опция выбора по окружности или по образующей не поддреживается \en For mate the option of tangency choice by circle or generating curve is unsupported.
, GCM_RESULT_InconsistentTangencyChoice ///< \ru Для данной пары поверхностей касание по окружности геометрически не возможно \en For a given pair of surfaces the touching along the circle is geometrically impossible.
, GCM_RESULT_CoaxialGearTransmissionUnsupported ///< \ru Механическая передача вращения компонентов с совпадающими осями не поддерживается. \en Mechanical transmission of components rotation with the same axis is not supported.
, GCM_RESULT_OverconstrainedCamMechanism ///< \ru Имеются ограничения, создающие зависимость движения толкателя от движения кулачка, помимо самого кулачкового механизма. \en There are constraints creating dependence of the follower displacement from the cam in addition to the cam mechanism.
, GCM_RESULT_CamMechanismsInCyclicDependency ///< \ru Задана циклическая зависимость для двух или более кулачковых механизмов. \en Given the cyclic dependence for two or more cam mechanisms.
, GCM_RESULT_InconsistentFollowerAxis ///< \ru Заданные ограничения для толкателя не соответствую его оси движения. \en Given constraints for the follwer doesn't correspond to its motion axis.
, GCM_RESULT_InconsistentPlanarAngle ///< \ru Не соблюдаются условия планарного угла (векторы сторон угла должны быть перпендикулярны оси). \en Planar angle conditions are not met (vectors from the sides of angle should be perpendicular to the axis).
, GCM_RESULT_UnsupportedFollowerSurface ///< \ru Контактная поверхность толкателя, выбранная для кинематической пары "кулачек-толкатель", пока не поддерживается решателем. \en The follower contact surface selected for the cam-follower kinematic pair is not yet supported by the solver.
/*
ATTENTION: New error messages should be added only before this line.
@@ -671,9 +670,15 @@ static const GCM_result mtResCode_SystemError = GCM_RESULT_Error;
static const GCM_result mtResCode_Error = GCM_RESULT_Error;
static const GCM_result mtResCode_MovingOfFixedGeom = GCM_RESULT_DraggingFailed;
static const GCM_result mtResCode_InvalidAxisOfPlanarAngle = GCM_RESULT_InconsistentPlanarAngle;
static const GCM_result mtResCode_InconsistentFollowerAxis = GCM_RESULT_InconsistentFollowerAxis; /* 2020 */
static const GCM_result mtResCode_NoSeparatedSolutionForCamGear = GCM_RESULT_OverconstrainedCamMechanism; /* 2020 */
static const GCM_result GCM_RESULT_InconsistentAngleType = GCM_RESULT_UndefinedAngleType;
static const GCM_result mtResCode_InconsistentFollowerAxis = GCM_RESULT_InconsistentFollowerAxis; // deprecated 2020.
static const GCM_result mtResCode_NoSeparatedSolutionForCamGear = GCM_RESULT_OverconstrainedCamMechanism; // deprecated 2020.
static const GCM_result GCM_RESULT_UndefinedAngleType = static_cast<GCM_result>(3002); // deprecated 2023.
static const GCM_result GCM_RESULT_InconsistentAngleType = GCM_RESULT_UndefinedAngleType; // deprecated 2020.
static const GCM_result mtResCode_UnsupportedTangencyChoice = GCM_RESULT_UnsupportedTangencyChoice; // deprecated 2023.
static const GCM_result mtResCode_IsNoPossibleForCircTanChoice = GCM_RESULT_InconsistentTangencyChoice; // deprecated 2023.
static const GCM_result mtResCode_CoaxialMtGearTransmissionIsNotAvalable = GCM_RESULT_CoaxialGearTransmissionUnsupported; // deprecated 2023.
static const GCM_result mtResCode_CyclicDependenceForTwoOrMoreCamGears = GCM_RESULT_CamMechanismsInCyclicDependency; // deprecated 2023.
const GCM_dependency GCM_2ST_DEPENDENT = GCM_2ND_DEPENDENT;
+12 -10
View File
@@ -11,9 +11,6 @@
#include <math_define.h>
#include <system_atomic.h>
#include <tool_memory_leaks_check.h>
#if defined (C3D_WINDOWS ) && !defined(ALL_WARNINGS) //_MSC_VER // Set warnings level
#pragma warning(disable: 4275) //AP non dll-interface class '1' used as base for dll-interface class '2' (deriving exported from non-exported)
#endif
@@ -25,22 +22,27 @@
\en Base class for objects with reference counting. \~
\ingroup Base_Items
\sa #MbRefItem, #SPtr
\note It is used as an ancestor class for ATS-interfaces.
\attention \ru Данный класс имеет консервативную реализацию подсчета ссылок,
т.е. требует особых мер для работы в многопоточном режиме.
Другой клас с аналогичными функциями #MbRefItem предусматривает
обращение из разных потоков.
\en This class has a conservative implementation of reference counting,
i.e. requires special tricks to work in multi-threaded mode.
Another class with similar functions, #MbRefItem provides calling
in different theads.
*/
//////////////////////////////////////////////////////////////////////////////////////////
class MtRefItem //: public c3d::MemoryLeaksVerifiable
class MtRefItem
{
//typedef use_count_type _use_count_type;
typedef refcount_t _use_count_type; // Эксперимент с потокобезопасным счетчиком ссылок (07/07/2021).
mutable _use_count_type useCount;
mutable refcount_t useCount;
protected:
MtRefItem() : useCount(0) {}
virtual ~MtRefItem() {} // Деструктор всех наследников должен быть закрыт. Экземпляры данного класса хранить в SPtr.
public:
/// \ru Добавить одну ссылку на объект. \en Adds a reference to this object.
/// \ru Добавить одну ссылку на объект. \en Adds a reference to this object.
refcount_t AddRef() const { return ++useCount; }
/// \ru Освободить одну ссылку на объект. \en Releases a reference to this object.
refcount_t Release() const;
+145 -76
View File
@@ -76,7 +76,8 @@ enum MbeModifyingMode {
dmm_FilletsRadiusChange = 120, ///< \ru Изменение радиусов выбранных граней скругления на заданную величину. \en Change of radii of the specified fillet faces for the set value.
dmm_FilletsRadiusSet = 130, ///< \ru В разработке. Установка радиусов выбранных граней скругления. \en Under development. Set the radii for the specified fillet faces.
dmm_FilletsRadiusSet = 130, ///< \ru В разработке. Установка радиусов выбранных граней скругления для цепочки гладко состыкованных скруглений. \en Under development. Set the radii for the specified smoothly joined fillet faces chain.
dmm_FilletsRadiusSetSingle = 131, ///< \ru В разработке. Установка радиусов выбранных граней скругления. \en Under development. Set the radii for the specified fillet faces.
dmm_ReplaceFaces = 140, ///< \ru В разработке. Замена граней тела. \en Under development. Replacement faces of a solid.
};
@@ -262,6 +263,121 @@ MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
MbSolid *& result );
//------------------------------------------------------------------------------
/** \brief \ru Параметры для подсветки граней для прямого редактирования тела.
\en Parameters for faces highlighting for solid direct modification. \~
\details
\ru Параметры содержат тип операции (#MbeModifyingMode) и параметры, необходимые для подсветки.
\en Parameters include the type of operation (#MbeModifyingMode) and parameters necessary for faces highligting. \~
\ingroup Direct_Building_Parameters
*/
// ---
class MATH_CLASS MbCollectFacesParams : public MbPrecision
{
protected:
MbeModifyingMode _modificationType; ///< \ru Тип модификации. \en Type of modification.
std::shared_ptr<DirectModValues> _modValues; ///< \ru Уникальные параметры в зависимости от типа операции. \en The unique values, depending on the operation.
VERSION _version; ///< \ru Версия операции. \en The operation version.
protected:
/** \brief \ru Внутренний конструктор.
\en Inner constructor. \~
\details \ru Внутренний конструктор по параметрам.
\en Inner constructor by parameters. \~
\param[in] type - \ru Тип модификации.
\en Modification type.\~
\param[in] version - \ru Версия операции.
\en The operation version. \~
*/
MbCollectFacesParams( MbeModifyingMode type, VERSION version = Math::DefaultMathVersion() );
public:
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\param[in] modType - \ru Тип модификации.
\en Modification type.\~
\param[in] faces - \ru Список граней для модификации.
\en Faces for the modification. \~
\param[in] version - \ru Версия операции.
\en The operation version. \~
*/
MbCollectFacesParams( MbeModifyingMode modType,
const c3d::ItemIndices & faces,
VERSION version = Math::DefaultMathVersion() );
/** \brief \ru Конструктор.
\en Constructor. \~
\details \ru Конструктор по параметрам.
\en Constructor by parameters. \~
\param[in] type - \ru Тип модификации.
\en Modification type.\~
\param[in] faces - \ru Список граней для модификации.
\en Faces for the modification. \~
\param[in] value - \ru Величина максимального радиуса для dmm_Remove* и dmm_Purify*.
\en Max value of a radius for dmm_Remove* and dmm_Purify*. \~
\param[in] version - \ru Версия операции.
\en The operation version. \~
*/
MbCollectFacesParams( MbeModifyingMode type,
const c3d::ItemIndices & faces,
double value,
VERSION version = Math::DefaultMathVersion() );
~MbCollectFacesParams(){} ///< \ru Деструктор. \en Destructor.
protected:
/// \ru Выдать значения запрошенного типа без проверок. \en Get the values of the requested type.
template<class DMValues>
std::shared_ptr<DMValues> _GetValues() const
{
return std::static_pointer_cast<DMValues>( _modValues );
};
public:
/** \brief \ru Добавить грань в параметры.
\en Add face to values. \~
\details \ru Добавить грань в параметры с проверкой на повторы.
\en Add face to values wihout repeats. \~
\param[in] face - \ru Индекс грани.
\en Face pointer.\~
*/
void AddFace( const MbItemIndex & face );
/** \brief \ru Добавить грани в параметры.
\en Add faces to values. \~
\details \ru Добавить грани в параметры с проверкой на повторы.
\en Add faces to values wihout repeats. \~
\param[in] faces - \ru Массив указателей на грани тела.
\en Array of faces pointers.\~
*/
void AddFaces( const c3d::ItemIndices & faces )
{
for ( const auto & face : faces )
AddFace ( face );
}
/// \ru Выдать значения запрошенного типа. \en Get the values of the requested type.
template<class DMValues>
std::shared_ptr<DMValues> GetValues() const;
/** \brief \ru Валидны ли созданные параметры.
\en Whether the created parameters are valid.\~
\details \ru Валидны ли созданные параметры для заданной оболочки. Проверяется массив присланных объектов (граней, рёбер, поверхностей),
установленные значения операции, соответствие типа и параметров.
\en Whether the created parameters are valid for the specified shell. Checks the input objects arrays (faces, edges, sufaces),
input operation values, consistency between type and parameters.\~
\param[in] shell - \ru Указатель на оболочку, на которой будет производиться операция.
\en Pointer to the to-be-modified shell .\~
*/
bool IsValid( const MbFaceShell * shell = nullptr ) const;
/// \ru Выдать тип модификации. \en Get the modification type.
MbeModifyingMode GetType() const { return _modificationType; }
OBVIOUS_PRIVATE_COPY( MbCollectFacesParams );
};
//------------------------------------------------------------------------------
/** \brief \ru Параметры прямого редактирования тела.
\en Parameters for a solid direct modification. \~
@@ -319,12 +435,10 @@ MATH_FUNC (MbResultType) FaceModifiedSolid( MbSolid & solid,
\ingroup Direct_Building_Parameters
*/
// ---
class MATH_CLASS MbModifiedSolidParams : public MbPrecision
class MATH_CLASS MbModifiedSolidParams : public MbCollectFacesParams
{
protected:
MbSNameMaker _names; ///< \ru Именователь. \en Name maker.
MbeModifyingMode _modificationType; ///< \ru Тип модификации. \en Type of modification.
std::shared_ptr<DirectModValues> _modValues; ///< \ru Уникальные параметры в зависимости от типа операции. \en The unique values, depending on the operation.
MbSNameMaker _names; ///< \ru Именователь. \en Name maker.
private:
MbModifiedSolidParams();
@@ -566,47 +680,17 @@ private:
void Init ( double value ); ///< \ru Инициализация. \en Initialization.
void Init ( const MbAxis3D & axis, double angle ); ///< \ru Инициализация. \en Initialization.
void Init ( const MbVector3D & direction ); ///< \ru Инициализация. \en Initialization.
void Init ( const ModifyValues & oldParams,
MbFaceShell * inputShell,
const SArray<MbItemIndex> *faces,
void Init ( const ModifyValues & oldParams,
MbFaceShell * inputShell,
const SArray<MbItemIndex> * faces,
const SArray<MbEdgeFacesIndexes> * edges,
RPArray<MbSurface> * surfaces ); ///< \ru Обратная совместимость. \en Backward compatability
RPArray<MbSurface> * surfaces ); ///< \ru Обратная совместимость. \en Backward compatability
/** \} */
// \ru Выдать значения запрошенного типа без проверок. \en Get the values of the requested type.
template<class DMValues>
inline
std::shared_ptr<DMValues> _GetValues() const
{
return std::static_pointer_cast<DMValues>( _modValues );
};
MbModifiedSolidParams & operator = ( const MbModifiedSolidParams & ); ///< \ru Оператор копирования. \en Copy operator.
public:
void Init ( const MbModifiedSolidParams & other, MbRegDuplicate * iReg = nullptr ); ///< \ru Инициализация. \en Initialization.
/** \ru \name Функции добавления граней.
\en \name Functions to add faces.
\{ */
/** \brief \ru Добавить грань в параметры.
\en Add face to values. \~
\details \ru Добавить грань в параметры с проверкой на повторы.
\en Add face to values wihout repeats. \~
\param[in] face - \ru Индекс грани.
\en Face pointer.\~
*/
void AddFace( const MbItemIndex & face );
/** \brief \ru Добавить грани в параметры.
\en Add faces to values. \~
\details \ru Добавить грани в параметры с проверкой на повторы.
\en Add faces to values wihout repeats. \~
\param[in] faces - \ru Массив указателей на грани тела.
\en Array of faces pointers.\~
*/
void AddFaces( const c3d::ItemIndices & faces )
{
for ( const auto & face : faces )
AddFace ( face );
}
/** \brief \ru Получить грани из параметров.
\en Get faces from values. \~
\details \ru Получить грани из параметров.
@@ -623,7 +707,6 @@ public:
\en Array of faces pointers, existing values are added at the end.\~
*/
void GetFaces( SArray<MbItemIndex> & faces ) const;
/** \} */
/** \ru \name Функции добавления рёбер.
\en \name Functions to add edges.
@@ -637,7 +720,7 @@ public:
\param[in] beginOrEnd - \ru Удалить начало или конец ребра.
\en Delete the beginning or the end of the edge.\~
*/
void AddEdge( const MbEdgeFacesIndexes & edge, bool beginOrEnd );
bool AddEdge( const MbEdgeFacesIndexes & edge, bool beginOrEnd );
/** \brief \ru Добавить рёбра в параметры.
\en Add edges to values. \~
\details \ru Добавить рёбра в параметры с проверкой на повторы.
@@ -647,17 +730,7 @@ public:
\param[in] beginOrEnds - \ru Массив флагов, удалять начало или конец ребра.
\en Array of flags showing whether to delete the beginning or the end of the edge.\~
*/
void AddEdges( const c3d::EdgeFacesIndices & edges, const c3d::BoolVector & beginOrEnds )
{
const size_t eSize = edges.size();
if ( eSize < beginOrEnds.size() ) {
C3D_ASSERT( eSize < beginOrEnds.size() );
}
else {
for ( size_t i = 0; i < eSize; ++i )
AddEdge( edges[i], beginOrEnds[i] );
}
}
bool AddEdges( const c3d::EdgeFacesIndices & edges, const c3d::BoolVector & beginOrEnds );
/** \brief \ru Получить рёбра из параметров.
\en Get edges from values. \~
\details \ru Получить рёбра из параметров.
@@ -686,7 +759,7 @@ public:
\param[in] surf - \ru Указатель на поверхность.
\en Surface pointer.\~
*/
void AddSurface( MbSurface * surf );
bool AddSurface( MbSurface * surf );
/** \brief \ru Добавить поверхности для замены граней.
\en Add surfaces to change faces. \~
\details \ru Добавить поверхности для замены граней.
@@ -695,7 +768,7 @@ public:
\en Surface pointers array.\~
*/
template <class SurfArray>
MATH_FUNC( void ) AddSurfaces( const SurfArray & surfs );
MATH_FUNC( bool ) AddSurfaces( const SurfArray & surfs );
/** \brief \ru Получить поверхности для замены граней.
\en Get surfaces to change faces. \~
\details \ru Получить поверхности для замены граней.
@@ -706,29 +779,12 @@ public:
void GetSurfaces( c3d::SurfacesVector & surfs );
/** \} */
/** \brief \ru Валидны ли созданные параметры.
\en Whether the created parameters are valid.\~
\details \ru Валидны ли созданные параметры для заданной оболочки. Проверяется массив присланных объектов (граней, рёбер, поверхностей),
установленные значения операции, соответствие типа и параметров.
\en Whether the created parameters are valid for the specified shell. Checks the input objects arrays (faces, edges, sufaces),
input operation values, consistency between type and parameters.\~
\param[in] shell - \ru Указатель на оболочку, на которой будет производиться операция.
\en Pointer to the to-be-modified shell .\~
*/
bool IsValid( const MbFaceShell * shell = nullptr ) const;
/// \ru Выдать тип модификации. \en Get the modification type.
MbeModifyingMode GetType() const { return _modificationType; }
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
const MbSNameMaker & GetNameMaker() const { return _names; }
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation.
MbSNameMaker & SetNameMaker() { return _names; }
/// \ru Установить именователь операции. \en Set the object defining names generation in the operation.
void SetNameMaker( const MbSNameMaker & other, bool setVersion = true ) { _names.SetNameMaker( other, setVersion ); }
/// \ru Выдать значения запрошенного типа. \en Get the values of the requested type.
template<class DMValues>
std::shared_ptr<DMValues> GetValues() const;
void SetNameMaker( const MbSNameMaker & other, bool setVersion = true );
void Transform( const MbMatrix3D & matr, MbRegTransform * ireg = nullptr ); ///< \ru Преобразовать по матрице. \en Transform by matrix.
void Move( const MbVector3D &to, MbRegTransform *ireg = nullptr ); ///< \ru Сдвиг. \en Move.
@@ -770,24 +826,37 @@ public:
\ingroup Direct_Building_Parameters
*/
// ---
class MATH_CLASS MbModifiedSolidResults
class MATH_CLASS MbModifiedSolidResults : public MbOperationResults
{
public:
SPtr<MbSolid> _resSolid; ///< \ru Результирующее тело. \en The resulting body.
double _maxDifUnited; ///< \ru Максимальное отклонение объединённой поверхности от присланных граней (оценочная величина). \en The maximum deviation of the united surfaces from the input surfaces (approximate value).
c3d::SurfacesSPtrVector _surfaces; ///< \ru Список поверхностей (только для dmm_ConvertFacesToNurbs). \en The list of surfaces (only for dmm_ConvertFacesToNurbs).
// \ru Конструктор. \en Constructor.
MbModifiedSolidResults()
: _maxDifUnited( -1. )
: MbOperationResults()
, _resSolid()
, _maxDifUnited( -1. )
{}
/** \brief \ru Получить нормаль и хот-точку на первой грани для операции по установке радиусов граням скругления.
\en Get normal and hot point on first face for operation of setting radius of fillet faces . \~
\param[in] pnt - \ru Хот-точка.
\en Hot point. \~
\param[in] dir - \ru Направление.
\en Direction. \~
\return \ru Возвращает "true" в случае успеха.
\en Returns "true" in case of success. \~
*/
bool GetFilletRadiusSetHotPoint( MbCartPoint3D & pnt,
MbVector3D & dir ) const;
// \ru Очистка. \en Reset.
void Reset()
{
_resSolid.reset();
_surfaces.clear();
_maxDifUnited = -1.;
_hotPoint.reset();
}
OBVIOUS_PRIVATE_COPY( MbModifiedSolidResults );
+7 -2
View File
@@ -6646,7 +6646,7 @@ public:
MbSectionResults & operator = ( const MbSectionResults & other ) {
_tolerance = other._tolerance;
_hotPoint = other._hotPoint;
_solid = _solid;
_solid = other._solid;
return *this;
}
/// \ru Получить результирующее тело. \en Get resulting solid.
@@ -6675,12 +6675,17 @@ public:
\en The intersection point of median from vertex the enclosing triangle and cross section curve. \~
\param[out] v3 - \ru Вектор направления медианы из вершины охватывающего треугольника.
\en The direction vector of median from vertex of the enclosing triangle. \~
\param[out] pl - \ru Плоскость охватывающего треугольника (XY) в сечении c центром в точке пересечения прямых, ортогональных векторам dir1 и dir2.
\en The plane of the enclosing triangle (XY) at the section with center at intersection of lines which are orthogonal to dir1 and dir2.\~
\param[out] a - \ru Точка пересечения вершинной кривой и плоскости XY - является вершиной охватывающего треугольника (может быть в бесконечности).
\en The intersection point of the apex curve ans XY plane is the vertex of the enclosing triangle (may be on infinity). \~
\return \ru true, в случае успеха.
\en true if success. \~
*/
bool GetHotPointsLayout( size_t id,
MbCartPoint3D & p1, MbVector3D & v1,
MbCartPoint3D & p2, MbVector3D & v2,
MbCartPoint3D & p3, MbVector3D & v3 ) const;
MbCartPoint3D & p3, MbVector3D & v3,
MbPlacement3D & pl, MbCartPoint3D & a ) const;
};
#endif // __OP_SHELL_PARAMETERS_H
+2 -2
View File
@@ -1280,8 +1280,8 @@ public:
\en Determine points of intersection between a surface and a curve. \n \~
\param[in] curv - \ru Заданная кривая.
\en A given curve. \~
\param[in] uv - \ru Множество точек пересечения на поверхности.
\en A set of intersection points on the surface. \~
\param[in,out] uv - \ru Множество точек пересечения на поверхности.
\en A set of intersection points on the surface. \~
\param[in,out] tt - \ru Множество точек пересечения на кривой.
\en A set of intersection points on the curve. \~
\param[in] ext0 - \ru Флаг, определяющий, искать ли пересечения на расширенной поверхности (если true, то искать).
+2 -2
View File
@@ -824,7 +824,7 @@ public :
template <class ItemIndices, class ConstFacesPointersVector> // ItemIndices - MbItemIndex vector
bool FindConstFacesByIndex( const ItemIndices &, ConstFacesPointersVector & ) const;
template <class ItemIndices, class FacesPointersVector> // ItemIndices - MbItemIndex vector
bool FindFacesByIndex( const ItemIndices &, FacesPointersVector & );
bool FindFacesByIndex( const ItemIndices &, FacesPointersVector & ) const;
bool FindItemIndexByIndex( const std::vector<c3d::IndicesPair> & indexes,
std::vector< std::pair<MbItemIndex,MbItemIndex> > & ind0 ) const;
@@ -1271,7 +1271,7 @@ bool MbFaceShell::FindConstFacesByIndex( const ItemIndices & indices, ConstFaces
// \ru Найти множество граней по множеству комбинированных индексов. \en Find a set of faces by a set of combined indices.
// ---
template <class ItemIndices, class FacesPointersVector>
bool MbFaceShell::FindFacesByIndex( const ItemIndices & indices, FacesPointersVector & initFaces )
bool MbFaceShell::FindFacesByIndex( const ItemIndices & indices, FacesPointersVector & initFaces ) const
{
c3d::FaceSPtr findFace;
initFaces.reserve( initFaces.size() + indices.size() );
+123 -7
View File
@@ -20,6 +20,9 @@
#include <vector>
class MATH_CLASS MbWireFrame;
class MATH_CLASS MbSpaceContourCreationParams;
template <class Item>
class MbSpaceContourCreationResults;
namespace c3d // namespace C3D
@@ -269,18 +272,18 @@ public :
\result \ru Возвращает количество каркасов в parts.
\en Returns a number of frames in 'parts'. \~
*/
size_t CreateParts( RPArray<MbWireFrame> & parts );
size_t CreateParts( RPArray<MbWireFrame> & parts );
/** \brief \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса.
\en Create connected contours according to vertex tolerances of the wire frame edges. \~
\details \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса
с сохранением исходного объекта. Если исходный каркас распадается на части,
то все части выдаются в качестве результата. Отличается от #MakeCurves тем, что
толерантности разные в вершинах рёбер.\n
толерантности разные в вершинах рёбер. \n
\en Create connected contours according to vertex tolerances of the wire frame edges.
The initial object is preserved. If the initial frame is decomposed, all parts
will be given as a result. Difference from #MakeCurves is that tolerances are
different in each edge vertex instead of the global one.\n \~
different in each edge vertex instead of the global one. \n \~
\param[in] onlySmoothConnected - \ru Сегменты контуров должны быть состыкованы гладко (по G1).
\en Contours segments must be smoothly connected (by G1). \~
\param[out] contours - \ru Каркасы, полученные из frame.
@@ -288,18 +291,18 @@ public :
\result \ru Возвращает true, если размер массива контуров увеличился.
\en Returns true if contours array size is increased. \~
*/
bool CreateContours ( c3d::SpaceCurvesSPtrVector & contours, bool onlySmoothConnected ) const;
bool CreateContours( c3d::SpaceCurvesSPtrVector & contours, bool onlySmoothConnected ) const;
/** \brief \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса.
\en Create connected contours according to vertex tolerances of the wire frame edges. \~
\details \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса
с сохранением исходного объекта. Если исходный каркас распадается на части,
то все части выдаются в качестве результата. Отличается от #MakeCurves тем, что
толерантности разные в вершинах рёбер.\n
толерантности разные в вершинах рёбер. \n
\en Create connected contours according to vertex tolerances of the wire frame edges.
The initial object is preserved. If the initial frame is decomposed, all parts
will be given as a result. Difference from #MakeCurves is that tolerances are
different in each edge vertex instead of the global one.\n \~
different in each edge vertex instead of the global one. \n \~
\param[in] onlySmoothConnected - \ru Сегменты контуров должны быть состыкованы гладко (по G1).
\en Contours segments must be smoothly connected (by G1). \~
\param[out] contours - \ru Каркасы, полученные из frame.
@@ -307,7 +310,45 @@ public :
\result \ru Возвращает true, если размер массива контуров увеличился.
\en Returns true if contours array size is increased. \~
*/
bool CreateContours ( c3d::WireFramesSPtrVector & contours, bool onlySmoothConnected ) const;
bool CreateContours( c3d::WireFramesSPtrVector & contours, bool onlySmoothConnected ) const;
/** \brief \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса.
\en Create connected contours according to vertex tolerances of the wire frame edges. \~
\details \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса
с сохранением исходного объекта. Если исходный каркас распадается на части,
то все части выдаются в качестве результата. Отличается от #MakeCurves тем, что
толерантности разные в вершинах рёбер. \n
\en Create connected contours according to vertex tolerances of the wire frame edges.
The initial object is preserved. If the initial frame is decomposed, all parts
will be given as a result. Difference from #MakeCurves is that tolerances are
different in each edge vertex instead of the global one. \n \~
\param[in] params - \ru Параметры операции построения контура.
\en Contour construction operation parameters. \~
\param[out] results - \ru Результат операции построения контура.
\en The result of the contour construction operation. \~
\result \ru Возвращает true, если размер массива контуров увеличился.
\en Returns true if contours array size is increased. \~
*/
bool CreateContours( const MbSpaceContourCreationParams & params, MbSpaceContourCreationResults<c3d::SpaceCurveSPtr> & results ) const;
/** \brief \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса.
\en Create connected contours according to vertex tolerances of the wire frame edges. \~
\details \ru Создать связные контуры с учётом толерантностей в вершинах рёбер каркаса
с сохранением исходного объекта. Если исходный каркас распадается на части,
то все части выдаются в качестве результата. Отличается от #MakeCurves тем, что
толерантности разные в вершинах рёбер. \n
\en Create connected contours according to vertex tolerances of the wire frame edges.
The initial object is preserved. If the initial frame is decomposed, all parts
will be given as a result. Difference from #MakeCurves is that tolerances are
different in each edge vertex instead of the global one. \n \~
\param[in] params - \ru Параметры операции построения контура.
\en Contour construction operation parameters. \~
\param[out] results - \ru Результат операции построения контура.
\en The result of the contour construction operation. \~
\result \ru Возвращает true, если размер массива контуров увеличился.
\en Returns true if contours array size is increased. \~
*/
bool CreateContours( const MbSpaceContourCreationParams & params, MbSpaceContourCreationResults<c3d::WireFrameSPtr> & results ) const;
/// \ru Установить заданный флаг измененности для всех рёбер и вершин. \en Set flag of changes for all edges and vertices.
void SetOwnChangedThrough( MbeChangedType );
@@ -602,4 +643,79 @@ MATH_FUNC( bool ) CreateWireFrame( const c3d::SpaceCurvesSPtrVector & curves,
c3d::WireFrameSPtr & result,
const c3d::CreatorSPtr & creator = nullptr );
//------------------------------------------------------------------------------
/** \brief \ru Параметры построения контура.
\en The parameters of creating a contour. \~
\details \ru Параметры построения контура из ребер каркаса. \n
\en The parameters of creating a contour from wire frame edges. \n \~
\ingroup Data_Structures
*/
// ---
class MATH_CLASS MbSpaceContourCreationParams : public MbPrecision
{
public:
/// \ru Гладкая стыковка контуров (по G1). \en Smooth connecting of contours (by G1).
bool _onlySmoothConnected;
/// \ru Установить соответствие исходных ребер каркаса и выходных контуров. \en Set the mapping of the initial wire frame edges and the output contours.
bool _enableCurvesMapping;
VERSION _version; /// \ru Версия. \en Version.
public:
/// \ru Конструктор. \en Constructor. \~
MbSpaceContourCreationParams( bool onlySmoothConnected, bool enableCurvesMapping, VERSION ver = Math::DefaultMathVersion() )
: MbPrecision()
, _onlySmoothConnected( onlySmoothConnected )
, _enableCurvesMapping( enableCurvesMapping )
, _version ( ver )
{}
/// \ru Деструктор. \en Destructor. \~
~MbSpaceContourCreationParams()
{}
OBVIOUS_PRIVATE_COPY( MbSpaceContourCreationParams )
}; // MbSpaceContourCreationParams
//------------------------------------------------------------------------------
/** \brief \ru Результат построения контура.
\en The result of creating a contour. \~
\details \ru Результат построения контура из ребер каркаса. \n
\en The result of creating a contour from wire frame edges. \n \~
\ingroup Data_Structures
*/
// ---
template <class Item>
class MbSpaceContourCreationResults
{
protected:
/// \ru Контейнер контуров, полученных из wire frame. \en Container of contours created from the wire frame.
std::vector<Item> _resultContours;
/** \brief \ru Контейнер индексов.
\en An index container. \~
\details \ru Контейнер индексов, указывающий номер контура, в который добавлено i-е ребро исходного MbWireFrame. Если i-е ребро MbWireFrame не вошло в построенный контур, то i-ы элемент контейнера _contourIndexes будет равен SYS_MAX_T. Заполняется по требованию.
\en An index container indicating the number of the contour to which the i-th MbWireFrame edge is added. If the i-th edge of MbWireFrame is not included in the constructed contour, then the i-th element of the _contourIndexes will be equal to SYS_MAX_T. Filled in on demand. \~
*/
c3d::IndicesVector _contourIndexes;
public:
/// \ru Конструктор. \en Constructor.
MbSpaceContourCreationResults()
: _resultContours()
, _contourIndexes()
{}
/// \ru Деструктор. \en Destructor.
~MbSpaceContourCreationResults() {}
public:
/// \ru Выдать построенные контура. \en Set the constructed contours.
std::vector<Item> & SetContours() { return _resultContours; }
/// \ru Выдать контейнер индексов. \en Set the container of indexes.
c3d::IndicesVector & SetIndexes() { return _contourIndexes; }
OBVIOUS_PRIVATE_COPY( MbSpaceContourCreationResults )
}; // MbSpaceContourCreationResults
#endif // __WIRE_FRAME_H
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.