Extern :
- C3d aggiornamento delle librerie ( 117937).
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <mesh.h>
|
||||
#include <mb_enum.h>
|
||||
#include <mb_operation_result.h>
|
||||
#include <m2b_mesh_curvature.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -29,6 +28,7 @@ class MATH_CLASS MbSurface;
|
||||
class MATH_CLASS MbSNameMaker;
|
||||
class MATH_CLASS MbFace;
|
||||
class MATH_CLASS MbCollection;
|
||||
struct MATH_CLASS MbCurvature;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -138,18 +138,17 @@ public:
|
||||
// ---
|
||||
class MATH_CLASS MbSurfaceFitToGridParameters {
|
||||
private:
|
||||
|
||||
MbeSpaceType _surfaceType; ///< \ru Тип поверхности. \en A surface type.
|
||||
double _tolerance; ///< \ru Точность распознавания. \en A fitting tolerance.
|
||||
const c3d::IndicesVector & _indicies; ///< \ru Индексы полигонов сетки. \en Indicies of polygons.
|
||||
MbeSpaceType _surfaceType; ///< \ru Тип поверхности. \en A surface type.
|
||||
double _tolerance; ///< \ru Точность распознавания. \en A fitting tolerance.
|
||||
c3d::IndicesVector _indicies; ///< \ru Индексы полигонов сетки. \en Indicies of polygons.
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
|
||||
double tolerance,
|
||||
explicit MbSurfaceFitToGridParameters( MbeSpaceType surfaceType,
|
||||
double tolerance,
|
||||
const c3d::IndicesVector & indicies )
|
||||
: _surfaceType( surfaceType )
|
||||
, _tolerance( tolerance )
|
||||
, _indicies( indicies )
|
||||
, _tolerance ( tolerance )
|
||||
, _indicies ( indicies )
|
||||
{}
|
||||
/// \ru Выдать тип поверхности. \en Get surface type.
|
||||
MbeSpaceType GetSurfaceType() const { return _surfaceType; }
|
||||
@@ -539,11 +538,11 @@ MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, M
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Вписать поверхность в множество полигонов сетки.
|
||||
\en Fit the surface into polygon set. \~
|
||||
\details \ru Создать оболочку в граничном представлении, соответствующую модели, заданной полигональной сеткой.
|
||||
Алгоритм в автоматическом режиме распознает и реконструирует грани, соответствующие элементарным
|
||||
поверхностям (плоскость, цилиндр, сфера, конус, тор). \n
|
||||
\en Create BRep shell that represents input mesh model from collection.
|
||||
Algorithm automatically detect and reconstruct faces based on elementary surfaces (plane, cylinder, sphere, cone, torus). \n \~
|
||||
\details \ru Вписать поверхность заданного типа в множество полигонов триангуляции. \n
|
||||
В случае если множество полигонов не задано, используются
|
||||
все полигоны триангуляции.
|
||||
\en Fit a surface of a given type into the polygon set. \n
|
||||
If the set of polygons is not specified, all triangulation polygons are used. \~
|
||||
\param[in] grid - \ru Исходная триангуляция.
|
||||
\en The initial triangulation. \~
|
||||
\param[in] params - \ru Параметры вписывания поверхности.
|
||||
@@ -558,6 +557,4 @@ MATH_FUNC( MbResultType ) ConvertCollectionToShell( MbCollection & collection, M
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) FitSurfaceToGrid( const MbGrid & grid, const MbSurfaceFitToGridParameters & params, MbSurfaceFitToGridResults & results );
|
||||
|
||||
|
||||
#endif // __ACTION_B_SHAPER_H
|
||||
|
||||
@@ -930,8 +930,9 @@ MATH_FUNC (MbResultType) CreateFairBezierCurveOnTangentPolyline( MbCurve3D *
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать ГО Эрмита на кривой Безье.
|
||||
\en Create Hermite GD on a Bezier curve. \~
|
||||
\details \ru Создать геометрический определитель Эрмита в виде ломаной линии на рациональной сплайновой кривой Безье. \n
|
||||
На кривой определяется опорная ломаная, вершины которой принадлежат узловым точкам сплайна.
|
||||
\details \ru Создать геометрический определитель (ГО) Эрмита в виде ломаной линии на рациональной сплайновой кривой Безье. \n
|
||||
Параметр type определяет тип создаваемой кривой: ломаная, касательная ломаная или ГО Эрмита.
|
||||
Если задан тип "ГО Эрмита", то на кривой определяется опорная ломаная, вершины которой принадлежат узловым точкам сплайна.
|
||||
Определяются векторы касательных и векторы кривизны. Вектор касательной может иметь произвольную длину.
|
||||
Вектор кривизны должет иметь длину, равную значению кривизны в данной вершине опорной ломаной.
|
||||
Если значение кривизны равно нулю в точке перегиба, то вектор кривизны откладывается по направлению касательного вектора в данной вершине
|
||||
@@ -941,8 +942,9 @@ MATH_FUNC (MbResultType) CreateFairBezierCurveOnTangentPolyline( MbCurve3D *
|
||||
переход к концу вектора кривизны, возврат к вершине опорной ломаной, затем переход к следующей вершине опорной ломаной и т.д.
|
||||
Вершина с номером 1 и вершины с номерами через 5 (1, 6, 11, ... ) принадлежат концам касательных векторов.
|
||||
Вершина с номером 3 и вершины с номерами через 5 (3, 8, 13, ... ) принадлежат концам векторов кривизны.
|
||||
\en Create a Hermite geometric determinant in the form of a polyline on a rational Bezier spline curve. \n
|
||||
A base polyline is defined on the curve, the vertices of which belong to the nodal points of the spline.
|
||||
\en Create a Hermite geometric determinant (GD) in the form of a polyline on a rational Bezier spline curve. \n
|
||||
The type parameter defines a type of created curve: polyline, tangent polyline, or Hermite GD.
|
||||
If the Hermite GD type is defined, then a base polyline is defined on the curve, the vertices of which belong to the nodal points of the spline.
|
||||
The tangent vectors and the curvature vectors are determined. The tangent vector can be of arbitrary length.
|
||||
The curvature vector must have a length equal to the value of curvature at a given vertex of the base polyline.
|
||||
If the curvature value is zero at the inflection point, then the curvature vector is set in the direction of the tangent vector at the given vertex
|
||||
@@ -954,6 +956,8 @@ MATH_FUNC (MbResultType) CreateFairBezierCurveOnTangentPolyline( MbCurve3D *
|
||||
The vertex with number 3 and the vertices with numbers in 5 (3, 8, 13, ...) belong to the ends of the curvature vectors. \~
|
||||
\param[in] curve - \ru Исходная кривая.
|
||||
\en An initial curve. \~
|
||||
\param[in] type - \ru Тип создаваемой кривой. Допустимые значения: fairCrvType_Poly, fairCrvType_PolyTangent, fairCrvType_HermiteGD.
|
||||
\en A type of a constructed curve. The allowed values: fairCrvType_Poly, fairCrvType_PolyTangent, fairCrvType_HermiteGD. \~
|
||||
\param[in] data - \ru Данные построения кривой.
|
||||
\en The curve construction data. \~
|
||||
\param[out] polyline - \ru 3D ломаная ГО Эрмита.
|
||||
@@ -963,9 +967,10 @@ MATH_FUNC (MbResultType) CreateFairBezierCurveOnTangentPolyline( MbCurve3D *
|
||||
\ingroup Curve3D_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC(MbResultType) KernelCreateHermiteGDOnBezierCurve( MbNurbs3D * curve,
|
||||
MbFairCurveData & data,
|
||||
MbCurve3D *& polyline );
|
||||
MATH_FUNC(MbResultType) KernelCreateHermiteGDOnBezierCurve( const MbNurbs3D * curve,
|
||||
MbeFairCurveType type,
|
||||
MbFairCurveData & data,
|
||||
MbCurve3D *& polyline );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -1139,9 +1144,9 @@ MATH_FUNC (MbResultType) CreateFairBSplineCurveOnBasePolylineOfHermiteGD( MbCurv
|
||||
\ingroup Curve3D_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnBasePolylineOfHermiteGDInflex( const MbCurve3D * pllne,
|
||||
MbFairCurveData & data,
|
||||
MbCurve3D *& resCurve );
|
||||
MATH_FUNC( MbResultType ) CreateFairBSplineCurveOnBasePolylineOfHermiteGDInflex( const MbCurve3D * pllne,
|
||||
MbFairCurveData & data,
|
||||
MbCurve3D *& resCurve );
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
@@ -101,22 +101,26 @@ MATH_FUNC (MbResultType) CollectFacesForModification( MbFaceShell * shell,
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Модифицировать или построить тело методами прямого моделирования.
|
||||
\en Modify a solid by the methods of direct modeling. \~
|
||||
\details \ru В зависимости от параметров модификации метод выполняет одно из следующих действий: \n
|
||||
\details \ru В зависимости от параметров модификации #ModifyValues метод выполняет одно из следующих действий: \n
|
||||
1. Удаление из тела выбранных граней с окружением (param.way==dmt_Remove). \n
|
||||
2. Создание тела из выбранных граней с окружением (param.way==dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (param.way==dmt_Action). \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (param.way==dmt_Offset). \n
|
||||
5. Изменение радиуса выбранных граней скругления (param.way==dmt_Fillet). \n
|
||||
6. Замена выбранных граней тела деформируемыми гранями для редактирования (param.way==dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (param.way==dmt_Purify).
|
||||
\en The method is for one of listed actions below depends of parameters: \n
|
||||
7. Удаление выбранных граней скругления тела (param.way==dmt_Purify). \n
|
||||
8. Замена гладко стыкующихся граней одной гранью (param.way==dmt_United). \n
|
||||
9. Поворот выбранных граней (param.way==dmt_Rotate).
|
||||
\en The method performs one of the following actions depending on the parameter #ModifyValues: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (param.way==dmt_Remove). \n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (param.way==dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (param.way==dmt_Action). \n
|
||||
4. Replacement of the specified faces of a solid with the offset faces (param.way==dmt_Offset). \n
|
||||
5. Changing of the radius of the specified fillet faces (param.way==dmt_Fillet). \n
|
||||
4. Replacement of the specified faces by offset faces (param.way==dmt_Offset). \n
|
||||
5. Radius change of the specified fillet faces (param.way==dmt_Fillet). \n
|
||||
6. Replacement of the specified faces of a solid with a deformable faces for editing (param.way==dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (param.way==dmt_Purify). \n \~
|
||||
7. Removal of the specified fillet faces from a solid (param.way==dmt_Purify). \n
|
||||
8. Replacement of the smoothly joined faces with a single face (param.way==dmt_United). \n\~
|
||||
9. Rotation of the chosen faces (param.way==dmt_Rotate). \n \~
|
||||
\param[in] solid - \ru Исходное тело.
|
||||
\en The initial solid. \~
|
||||
\param[in] sameShell - \ru Режим копирования исходного тела.
|
||||
|
||||
@@ -34,6 +34,8 @@ class MATH_CLASS MbMeshSimplificationParams;
|
||||
class MATH_CLASS MbConvexHullParams;
|
||||
struct MATH_CLASS MbConvexHullResults;
|
||||
class MATH_CLASS MbConvexHullParams3D;
|
||||
class MATH_CLASS MbMeshToInstanceParams;
|
||||
class MATH_CLASS MbMeshToInstanceResults;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -649,6 +651,7 @@ MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
|
||||
на #MbInstance, которые ссылаются на первый из набора одинаковых.
|
||||
\en Search an array of objects to replace repeating polygonal objects (#MbMesh)
|
||||
with #MbInstance, which are linked to the first in the set. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
\param[in] meshContainer - \ru Набор объектов.
|
||||
\en The array of objects . \~
|
||||
\param[in] accuracy - \ru Точность сравнения.
|
||||
@@ -657,8 +660,31 @@ MATH_FUNC (MbResultType) RepairInconsistentMesh( MbMesh & mesh );
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Polygonal_Objects
|
||||
*/ // ---
|
||||
MATH_FUNC ( MbResultType ) ConvertMeshToInstance( std::vector<SPtr<MbItem>> & meshContainer,
|
||||
double accuracy = Math::metricRegion );
|
||||
DEPRECATE_DECLARE_REPLACE( ConvertMeshToInstance with MbMeshToInstanceParams )
|
||||
MATH_FUNC ( MbResultType ) ConvertMeshToInstance( c3d::ItemsSPtrVector & meshContainer,
|
||||
double accuracy = Math::metricRegion );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Провести поиск по набору объектов и заменить повторяющиеся полигональные объекты (#MbMesh)
|
||||
на #MbInstance, которые ссылаются на первый из набора одинаковых.
|
||||
Для больших объектов размером более ~1e6 рекомендуется использовать относительную точность.
|
||||
\en Search an array of objects to replace repeating polygonal objects (#MbMesh)
|
||||
with #MbInstance, which are linked to the first in the set.
|
||||
It is recommended to use relative accuracy for large objects which size exceeds ~1e6. \~
|
||||
\param[in] meshContainer - \ru Набор объектов.
|
||||
\en The array of objects. \~
|
||||
\param[in] params - \ru Параметры операции.
|
||||
\en Parameters of the operation \~
|
||||
\param[out] results - \ru Результаты операции. Содержат присланный массив, где на месте повторяющихся полигональных объектов расположены вставки.
|
||||
\en Results of the operation. Contain the initial array, where instances instances replace repeatative meshes.\~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Polygonal_Objects
|
||||
*/ // ---
|
||||
MATH_FUNC ( MbResultType ) ConvertMeshToInstance( const c3d::ItemsSPtrVector & meshContainer,
|
||||
const MbMeshToInstanceParams & params,
|
||||
MbMeshToInstanceResults & results );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -614,6 +614,7 @@ MATH_FUNC (MbResultType) RevolutionSolid( const MbSweptData & sweptDat
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( EvolutionSolid with 'MbEvolutionSolidParams' argument )
|
||||
MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData,
|
||||
const MbCurve3D & spine,
|
||||
const EvolutionValues & params,
|
||||
@@ -647,6 +648,7 @@ MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( EvolutionSolid with 'MbEvolutionSolidParams' argument )
|
||||
MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData,
|
||||
const MbSpine & spine,
|
||||
const EvolutionValues & params,
|
||||
@@ -656,6 +658,24 @@ MATH_FUNC (MbResultType) EvolutionSolid( const MbSweptData & sweptData
|
||||
MbSolid *& result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать кинематическое тело.
|
||||
\en Create a sweeping solid. \~
|
||||
\details \ru Создать кинематическое тело путем движения образующей кривой вдоль направляющей кривой c дополнительной информацией. \n
|
||||
\en Create a sweeping solid by moving the generating curve along the guide curve with additional data. \n \~
|
||||
\param[in] evolSolidParams - \ru Исходные данные для выполнения операции.
|
||||
\en The source data to make the operation. \~
|
||||
\param[out] result - \ru Построенная оболочка (тело).
|
||||
\en The resultant shell (solid). \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbResultType) EvolutionSolid( const MbEvolutionSolidParams & evolSolidParams,
|
||||
c3d::SolidSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать тело по пространственным сечениям.
|
||||
\en Create a solid from a space sections. \~
|
||||
@@ -990,6 +1010,7 @@ MATH_FUNC (MbCurve3D *) TrimClosedSpine( const MbCurve3D & curve,
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( EvolutionResult with 'MbEvolutionSolidParams' argument )
|
||||
MATH_FUNC(MbResultType) EvolutionResult( MbSolid & solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbSweptData & sweptData,
|
||||
@@ -1002,6 +1023,39 @@ MATH_FUNC(MbResultType) EvolutionResult( MbSolid & solid,
|
||||
MbSolid *& result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать кинематическое тело и выполнить булеву операцию.
|
||||
\en Create an evolution solid and perform a boolean operation. \~
|
||||
\details \ru Создать кинематическое тело и выполнить булеву операцию с телом srcSolid.
|
||||
Поддерживаемые типы булевой операции: \n
|
||||
- bo_Union - объединение, \n
|
||||
- bo_Intersect - пересечение, \n
|
||||
- bo_Difference - вычитание.
|
||||
\en Create an evolution solid and perform a boolean operation with "srcSolid" solid.
|
||||
Following types of Boolean operation are supported: \n
|
||||
- bo_Union - union, \n
|
||||
- bo_Intersect - intersection, \n
|
||||
- bo_Difference - subtraction. \~
|
||||
\param[in] srcSolid - \ru Первое тело для булевой операции.
|
||||
\en The first solid for a boolean operation. \~
|
||||
\param[in] copyMode - \ru Режим копирования тела.
|
||||
\en Whether to copy the solid. \~
|
||||
\param[in] evolSolParams - \ru Исходные данные для создания кинематического тела.
|
||||
\en The source data for making evolution solid. \~
|
||||
\param[out] result - \ru Построенное тело.
|
||||
\en The resultant solid. \~
|
||||
\return \ru Возвращает код результата операции.
|
||||
\en Returns operation result code. \~
|
||||
\ingroup Solid_Modeling
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC( MbResultType ) EvolutionResult( const c3d::SolidSPtr & srcSolid,
|
||||
const MbeCopyMode copyMode,
|
||||
OperationType oType,
|
||||
const MbEvolutionSolidParams & evolSolParams,
|
||||
c3d::SolidSPtr & result );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать тело по плоским сечениям и выполнить булеву операцию.
|
||||
\en Create a solid from the planar sections and perform a boolean operation. \~
|
||||
|
||||
@@ -222,6 +222,8 @@ public:
|
||||
bool HaveGeometricDifferences() const; ///< \ru Есть геометрические различия? \en Is there any geometric difference?
|
||||
|
||||
const PArray<PrimitiveDifference> & GetPrimitiveDifferences() const; ///< \ru Дать результаты сравнения. \en Get comparison results.
|
||||
private:
|
||||
CompareItemsResult( const CompareItemsResult & );
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru Атрибут хот-точки.
|
||||
\en Attribute of hot-point. \~
|
||||
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ATTR_HOTPOINT_ATTRIBUTE_H
|
||||
#define __ATTR_HOTPOINT_ATTRIBUTE_H
|
||||
|
||||
|
||||
#include <attr_common_attribute.h>
|
||||
#include <topology.h>
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Атрибут хот-точки.
|
||||
\en Attribute of hot-point. \~
|
||||
\details \ru Атрибут параметров хот-точки содержит трехмерную точку
|
||||
и трехмерную локальную систему координат.
|
||||
\en Attribute of parameters of hot-point contains three-dimensional point and
|
||||
three-dimensional coordinate system. \n \~
|
||||
\ingroup Model_Attributes
|
||||
\warning \ru В разработке.
|
||||
\en Under development. \~
|
||||
*/
|
||||
class MATH_CLASS MbHotPointAttribute : public MbCommonAttribute
|
||||
{
|
||||
protected:
|
||||
MbPlacement3D _place; ///< \ru Трехмерная локальная система координат. \en Three-dimensional coordinate system.
|
||||
MbCartPoint3D _hotPoint; ///< \ru Хот-точка. \en Hot-point.
|
||||
public:
|
||||
/** \brief \ru Конструктор атрибута хот-точки.
|
||||
\en Constructor of аttribute of hot-point. \~
|
||||
\details \ru Создается атрибут хот-точки содержащий трехмерную точку и трехмерную локальную систему координат.
|
||||
\en Created attribute of hot-point contains three-dimensional point and three-dimensional coordinate system. \~
|
||||
\param[in] place - \ru Локальная система координат хот-точки.
|
||||
\en The local coordinate system of hot-point. \~
|
||||
\param[in] hotPoint - \ru Хот-точка.
|
||||
\en The hot-point. \~
|
||||
*/
|
||||
MbHotPointAttribute( const MbPlacement3D & place,
|
||||
const MbCartPoint3D & hotPoint,
|
||||
const c3d::string_t & itemPrompt,
|
||||
bool changeable );
|
||||
// \ru Выдать подтип атрибута. \en Get subtype of an attribute.
|
||||
MbeAttributeType AttributeType() const override;
|
||||
// \ru Сделать копию элемента. \en Create a copy of the element.
|
||||
MbAttribute & Duplicate( MbRegDuplicate * = nullptr ) const override;
|
||||
// \ru Инициализировать данные по присланным. \en Initialize data.
|
||||
bool Init( const MbAttribute & ) override;
|
||||
// \ru Выполнить действия при трансформировании владельца. \en Perform actions when transforming the owner.
|
||||
void OnTransformOwner( const MbAttributeContainer & owner,
|
||||
const MbMatrix3D &,
|
||||
MbRegTransform * = nullptr ) override;
|
||||
// \ru Выполнить действия при перемещении владельца. \en Perform actions when moving the owner.
|
||||
void OnMoveOwner( const MbAttributeContainer & owner,
|
||||
const MbVector3D &,
|
||||
MbRegTransform * = nullptr) override;
|
||||
// \ru Выполнить действия при вращении владельца. \en Perform actions when rotating the owner.
|
||||
void OnRotateOwner( const MbAttributeContainer & owner,
|
||||
const MbAxis3D &,
|
||||
double angle,
|
||||
MbRegTransform * = nullptr) override;
|
||||
// \ru Выполнить действия при копировании владельца. \en Perform actions when copying the owner.
|
||||
void OnCopyOwner( const MbAttributeContainer & owner,
|
||||
MbAttributeContainer & other,
|
||||
MbRegDuplicate * = nullptr ) override;
|
||||
// \ru Выполнить действия при объединении владельца. \en Perform actions when merging the owner.
|
||||
void OnMergeOwner( const MbAttributeContainer & owner,
|
||||
MbAttributeContainer & other ) override;
|
||||
// \ru Определить, являются ли объекты равными. \en Determine whether objects are equal.
|
||||
bool IsSame( const MbAttribute &,
|
||||
double accuracy ) const override;
|
||||
// \ru Выдать строковое значение свойства. \en Get a string value of the property.
|
||||
void GetCharValue( TCHAR * v ) const override;
|
||||
// \ru Выдать свойства объекта. \en Get properties of the object.
|
||||
void GetProperties( MbProperties & ) override;
|
||||
// \ru Установить свойства объекта. \en Set properties of object.
|
||||
size_t SetProperties( const MbProperties & ) override;
|
||||
// \ru Выдать заголовок свойства объекта. \en Get a name of object property.
|
||||
MbePrompt GetPropertyName() override;
|
||||
/// \ru Дать систему координат. \en Get placement.
|
||||
const MbPlacement3D & GetPlacement() const { return _place; }
|
||||
/// \ru Дать хот точку. \en Get hot - point.
|
||||
const MbCartPoint3D & GetHotPoint() const { return _hotPoint; }
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~MbHotPointAttribute();
|
||||
|
||||
private:
|
||||
// \ru Конструктор копирования. \en Copy constructor.
|
||||
MbHotPointAttribute( const MbHotPointAttribute & init,
|
||||
MbRegDuplicate * iReg );
|
||||
|
||||
DECLARE_PERSISTENT_CLASS( MbHotPointAttribute )
|
||||
OBVIOUS_PRIVATE_COPY( MbHotPointAttribute )
|
||||
};
|
||||
|
||||
IMPL_PERSISTENT_OPS( MbHotPointAttribute )
|
||||
|
||||
#endif // __ATTR_HOTPOINT_ATTRIBUTE_H
|
||||
|
||||
@@ -88,6 +88,7 @@ enum MbeAttributeType
|
||||
at_Int64VectorAttribute = 212, ///< \ru Атрибут массив целочисленных значений типа int64. \en Array of integer (int64) values attribute.
|
||||
at_DoubleVectorAttribute = 213, ///< \ru Атрибут массив действительных чисел типа double. \en Array of real (double) values attribute.
|
||||
at_UuidInstanceAttribute = 214, ///< \ru Атрибут Uuid для вставок. \en Uuid attribute for instances.
|
||||
at_HotPointAttribute = 215, ///< \ru Атрибут хот-точки. \en Attribute of hot-point. \n
|
||||
at_CommonLast = 300, ///< \ru Обобщенные атрибуты вставлять перед этим значением. \en Common attributes should be inserted before this value. \n
|
||||
|
||||
// \ru Типы связующих атрибутов. \en Types of linking attributes.
|
||||
@@ -555,6 +556,8 @@ namespace c3d // namespace C3D
|
||||
c3d_constexpr TCHAR c3dStr_ItemIdentifierExchange[] = _T( "c3d_ItemIdentifierExchange" );
|
||||
/// \ru Подсказка для URL текстуры при обмене данными. \en Prompt for the URL of texture in model exchange operations.
|
||||
c3d_constexpr TCHAR c3dStr_TextureUrl[] = _T("C3D_Texture_URL");
|
||||
/// \ru Подсказка для атрибута хот-точки в уклоне. \en Prompt for attribute of hot point in draft operations.
|
||||
c3d_constexpr TCHAR c3d_DraftOperationHotPoint[] = _T("c3d_DraftOperationHotPoint");
|
||||
} // namespace C3D
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#define __CONV_ANNOTATION_ITEM_H
|
||||
|
||||
#include <reference_item.h>
|
||||
#include <templ_dptr.h>
|
||||
#include <mb_placement.h>
|
||||
#include <mb_placement3d.h>
|
||||
|
||||
|
||||
@@ -272,6 +272,19 @@ enum eMsgDetail {
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Режим логирования.
|
||||
\en Logging mode.\~
|
||||
\ingroup Exchange_Interface
|
||||
*/
|
||||
// ---
|
||||
enum eLoggingMode {
|
||||
elm_LoggingOff, ///< \ru Логирование отключено. \en Logging disabled.
|
||||
elm_LoggingAll, ///< \ru Логирование включено для всех объектов. \en Logging enabled for all objects.
|
||||
elm_LoggingForId ///< \ru Логирование включено для объекта с заданным id. \en Logging enabled for an object with the specified id.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Настройки отладочного функционала C3D Converter.
|
||||
\en Settings of the debug features of the C3D Converter. \~
|
||||
@@ -309,6 +322,12 @@ struct C3DConverterDebugSettings {
|
||||
/// \ru Путь для сохранения информации для тонкой отладки. \en Fine for saving data for fine debugging.
|
||||
c3d::string_t pathFineDebug;
|
||||
|
||||
/// \ru Режим логирования. \en Logging mode.
|
||||
eLoggingMode loggingMode;
|
||||
|
||||
/// \ru Идентификатор для логирования. \en Id for logging.
|
||||
ptrdiff_t idForLogging;
|
||||
|
||||
/// \ru Конструктор. \en Conctuctor.
|
||||
C3DConverterDebugSettings()
|
||||
: enableCERRout( false )
|
||||
@@ -319,6 +338,8 @@ struct C3DConverterDebugSettings {
|
||||
, attachThisIdAttribute( false )
|
||||
, elementIdFineDebug( -1 )
|
||||
, pathFineDebug()
|
||||
, loggingMode( elm_LoggingOff )
|
||||
, idForLogging( -1 )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <cr_swept_solid.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbEvolutionSolidParams;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Строитель оболочки кинематического тела.
|
||||
\en Constructor of shell of evolution solid. \~
|
||||
@@ -172,6 +175,40 @@ private :
|
||||
IMPL_PERSISTENT_OPS( MbCurveEvolutionSolid )
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать оболочку кинематического тела.
|
||||
\en Create a shell of evolution solid. \~
|
||||
\details \ru Построить оболочку путём движения образующей кривой по направляющей кривой
|
||||
и выполнить булуву операцию с оболочкой, если последняя задана. \n
|
||||
Одновременно с построением оболочки функция создаёт её строитель.\n
|
||||
\en Create a shell by moving the generating curve along the spine curve
|
||||
and perform the Boolean operation with the shell if it is specified. \n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
\param[in] srcSolid - \ru Набор граней, к которым дополняется построение.
|
||||
\en Face set the construction is complemented with respect to. \~
|
||||
\param[in] copyMode - \ru Способ копирования граней.
|
||||
\en The method of copying faces. \~
|
||||
\param[in] oType - \ru Тип операции дополнения построения.
|
||||
\en Type of operation of construction complement. \~
|
||||
\param[in] evolSolParams - \ru Исходные данные для создания оболочки кинематического тела.
|
||||
\en The source data for making a shell of evolution solid. \~
|
||||
\param[out] res - \ru Код результата операции.
|
||||
\en Operation result code. \~
|
||||
\param[out] resShell - \ru Построенный набор граней.
|
||||
\en Constructed set of faces. \~
|
||||
\result \ru Возвращает строитель.
|
||||
\en Returns the constructor. \~
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (c3d::CreatorSPtr) CreateCurveEvolution( c3d::ShellSPtr & srcSolid,
|
||||
MbeCopyMode copyMode,
|
||||
OperationType oType,
|
||||
const MbEvolutionSolidParams & evolSolParams,
|
||||
MbResultType & res,
|
||||
c3d::ShellSPtr & resShell );
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Создать оболочку кинематического тела.
|
||||
\en Create a shell of evolution solid. \~
|
||||
@@ -208,6 +245,7 @@ IMPL_PERSISTENT_OPS( MbCurveEvolutionSolid )
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateCurveEvolution with 'MbEvolutionSolidParams' argument )
|
||||
MATH_FUNC (MbCreator *) CreateCurveEvolution( MbFaceShell * solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbSweptData & sweptData,
|
||||
@@ -256,6 +294,7 @@ MATH_FUNC (MbCreator *) CreateCurveEvolution( MbFaceShell * soli
|
||||
\ingroup Model_Creators
|
||||
*/
|
||||
// ---
|
||||
//DEPRECATE_DECLARE_REPLACE( CreateCurveEvolution with 'MbEvolutionSolidParams' argument )
|
||||
MATH_FUNC (MbCreator *) CreateCurveEvolution( MbFaceShell * solid,
|
||||
MbeCopyMode sameShell,
|
||||
const MbSweptData & sweptData,
|
||||
|
||||
@@ -104,21 +104,31 @@ IMPL_PERSISTENT_OPS( MbFaceModifiedSolid )
|
||||
/** \brief \ru Построить модифицированную оболочку.
|
||||
\en Construct the modified shell. \~
|
||||
\details \ru Построить оболочку тела путём модификации исходной оболочки.
|
||||
В зависимости от параметров возможны следующие модификации исходной оболочки: \n
|
||||
удаление из тела выбранных граней с окружением, \n
|
||||
создание тела из выбранных граней с окружением, \n
|
||||
перемещение выбранных граней с окружением относительно оставшихся граней тела, \n
|
||||
замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса), \n
|
||||
замена выбранных граней тела деформируемыми гранями (превращение в NURBS для редактирования).\n
|
||||
В зависимости от параметров модификации #ModifyValues метод выполняет одно из следующих действий: \n
|
||||
1. Удаление из тела выбранных граней с окружением (param.way==dmt_Remove). \n
|
||||
2. Создание тела из выбранных граней с окружением (param.way==dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (param.way==dmt_Action). \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса) (param.way==dmt_Offset). \n
|
||||
5. Изменение радиуса выбранных граней скругления (param.way==dmt_Fillet). \n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования (param.way==dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (param.way==dmt_Purify). \n
|
||||
8. Слияние вершин ребёр и удаление рёбер (param.way==dmt_Merger). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (param.way==dmt_United). \n
|
||||
10. Поворот выбранных граней (param.way==dmt_Rotate). \n
|
||||
Одновременно с построением оболочки функция создаёт её строитель.\n
|
||||
\en Construct the solid's shell by modification the source shell.
|
||||
The following modifications of the source shell are possible depend on the parameters: \n
|
||||
deletion the selected faces with neighborhood from the solid, \n
|
||||
creation of the solid from the selected faces with the neighborhood, \n
|
||||
translation of the selected faces with the neighborhood relative to the remained faces of the solid, \n
|
||||
replacement of the selected faces of the solid with the offset faces (translation along the normal, changing the radius), \n
|
||||
replacement of the specified faces of the solid with the deformable faces (conversion to the NURBS for editing).\n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
The method performs one of the following actions depending on the parameter #ModifyValues: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (param.way==dmt_Remove). \n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (param.way==dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (param.way==dmt_Action). \n
|
||||
4. Replacement of the specified faces by offset faces (param.way==dmt_Offset). \n
|
||||
5. Radius change of the specified fillet faces (param.way==dmt_Fillet). \n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (param.way==dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (param.way==dmt_Purify). \n
|
||||
8. Edge vertices merging and edges removal (param.way==dmt_Merger). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (param.way==dmt_United). \n
|
||||
10. Rotation of the chosen faces (param.way==dmt_Rotate). \n
|
||||
The function simultaneously creates the shell and its constructor.\n \~
|
||||
\param[in] outer - \ru Исходная оболочка.
|
||||
\en The source shell. \~
|
||||
\param[in] sameShell - \ru Режим копирования исходной оболочки.
|
||||
|
||||
@@ -486,7 +486,7 @@ public :
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS-copy of the curve
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbCurve * Offset ( double rad ) const override; // \ru Смещение дуги эллипса \en Elliptical arc offset
|
||||
// \ru Положение точки относительно кривой. \en The point position relative to the curve.
|
||||
// \ru Возвращает результат: \en Returning result:
|
||||
|
||||
@@ -369,7 +369,7 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS-copy of the curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of the trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of the trimmed curve
|
||||
|
||||
double CalculateMetricLength() const override; // \ru Посчитать метрическую длину \en Calculate metric length
|
||||
double GetLengthEvaluation() const override;
|
||||
|
||||
@@ -309,7 +309,7 @@ public :
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменение направления кривой на противоположное \en Change to the opposite direction of a curve
|
||||
|
||||
@@ -144,7 +144,7 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Дать плоскую кривую и плейсмент, если пространственная кривая плоская (после использования вызывать DeleteItem на двумерную кривую)
|
||||
// \en Give a planar curve and placement, if the spatial curve is planar (after using the DeleteItem must be called for a two-dimensional curve)
|
||||
bool GetPlaneCurve( MbCurve *& curve2d, MbPlacement3D & place, bool saveParams, PlanarCheckParams params = PlanarCheckParams() ) const override;
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
size_t GetCount () const override; // \ru Определить количество разбиений для прохода в операциях. \en Define the number of splittings for one passage in operations.
|
||||
MbNurbs * NurbsCurve ( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbeState DeletePart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть кривой между параметрами t1 и t2 \en Remove a piece of curve between t1 and t2 parameters
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть кривой между параметрами t1 и t2 \en Keep a piece of curve between t1 and t2 parameters
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой. \en Creation of a trimmed curve.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой. \en Creation of a trimmed curve.
|
||||
|
||||
void Inverse( MbRegTransform * = nullptr ) override; // \ru Изменить направление. \en Change the direction.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть контура между параметрами t1 и t2 \en Save a part of the contour between t1 and t2 parameters.
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
/** \} */
|
||||
/** \ru \name Функции описания области определения кривой.
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
*/
|
||||
double DistanceToBorder( const MbCartPoint & pnt, double eps = Math::paramRegion ) const;
|
||||
|
||||
void Trimm( double t1, double t2 ); ///< \ru Выделить часть контура. \en Trim a part of the contour.
|
||||
void Trimm( double t1, double t2, bool saveParamLenAndLaw = false ); ///< \ru Выделить часть контура. \en Trim a part of the contour.
|
||||
|
||||
// \ru Продлить кривую. \en Extend the curve. \~
|
||||
MbResultType Extend( const MbCurveExtensionParameters & parameters, c3d::PlaneCurveSPtr & resCurve ) const override;
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
double Curvature( double t ) const override;
|
||||
// \ru Преобразование в NURBS кривую \en Transform to NURBS-curve
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
// \ru Продлить кривую. \en Extend the curve. \~
|
||||
MbResultType Extend( const MbCurveExtensionParameters3D & parameters, c3d::SpaceCurveSPtr & resCurve ) const override;
|
||||
@@ -592,7 +592,7 @@ void MbContour3D::GetSegments( CurvesVector & curves ) const
|
||||
*/
|
||||
// ---
|
||||
MATH_FUNC (MbCurve3D *) TrimContour( const MbContour3D & cntr, double t1, double t2, int sense,
|
||||
bool useTrimmedOnly );
|
||||
bool useTrimmedOnly, bool saveParamLenAndLaw = false );
|
||||
|
||||
|
||||
#endif // __CUR_CONTOUR3D_H
|
||||
|
||||
@@ -90,7 +90,7 @@ public :
|
||||
double Step ( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
double DeviationStep( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
|
||||
double GetMetricLength() const override; // \ru Вычислить метрическую длину кривой. \en Calculate the metric length of curve.
|
||||
double GetLengthEvaluation() const override; // \ru Оценить метрическую длину кривой. \en Evaluate the metric length of curve.
|
||||
|
||||
@@ -158,7 +158,7 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override; // \ru Установить параметры NURBS. \en Set the NURBS parameters.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create the trimmed curve.
|
||||
|
||||
double Step( double t, double sag ) const override; // \ru Вычислить шаг аппроксимации. \en Calculate the approximation step.
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Определить шаг по заданному углу отклонения касательной. \en Determine the step by a given angle of tangent deviation.
|
||||
@@ -248,9 +248,11 @@ public :
|
||||
*/
|
||||
ptrdiff_t FindSegment ( double & t, double & tSeg ) const;
|
||||
/// \ru Найти точку сегмента контура по индексу. \en Find a point of the contour segment by the index.
|
||||
void FindCorner ( ptrdiff_t index, MbCartPoint & ) const;
|
||||
void FindCorner ( ptrdiff_t index, MbCartPoint & ) const;
|
||||
/// \ru Найти точку сегмента контура по индексу. \en Find a point of the contour segment by the index.
|
||||
void FindCorner ( ptrdiff_t index, MbCartPoint3D & ) const;
|
||||
/// \ru Найти точку сегмента контура по индексу с учетом толерантности стыковки сегментов. \en Find a point of the contour segment by the index taking into account the tolerance of docking segments.
|
||||
void FindCorner ( ptrdiff_t index, MbCartPoint3D &, double & ) const;
|
||||
/// \ru Добавить сегмент в контур. \en Add a segment to the contour.
|
||||
void AddSegment( MbCurve & newSegment );
|
||||
/// \ru Добавить сегмент в контур. \en Add a segment to the contour.
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть кривой между параметрами t1 и t2 \en Delete a part of a curve between parameters t1 and t2
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть кривой между параметрами t1 и t2 \en Save a curve part between t1 and t2 parameters
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
void IntersectHorizontal( double y, SArray<double> & cross ) const override; // \ru Пересечение кривой с горизонтальной прямой \en Intersection of curve with the horizontal line
|
||||
void IntersectVertical ( double x, SArray<double> & cross ) const override; // \ru Пересечение с вертикальной прямой \en Intersection with the vertical line
|
||||
|
||||
@@ -110,7 +110,7 @@ public :
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
double CalculateLength( double t1, double t2 ) const override;
|
||||
void GetBasisItems( RPArray<MbSpaceItem> & ) override;
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ public :
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
*/
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense ) const override; // \ru Усечь кривую \en Trim a curve
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Усечь кривую \en Trim a curve
|
||||
MbCurve * TrimmedBreak( double t1, double t2, int sense ) const; // \ru Усечь кривую с разрывом \en Trim a curve with a break
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
void Rebuild () override; // \ru Перестроить кривую \en Rebuild the curve
|
||||
void SetClosed( bool cls ) override; // \ru Установить признак замкнутости. \en Set attribute of closedness.
|
||||
bool IsDegenerate( double eps = METRIC_PRECISION ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую \en Create the trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую \en Create the trimmed curve
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
// \ru Функции спирали \en Functions of spiral
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ public :
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть кривой между параметрами t1 и t2 \en Save a curve part between t1 and t2 parameters
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
// \ru Создать NURBS представление кривой \en Create a NURBS representation of the curve
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
@@ -243,7 +243,7 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
bool IsPlanar ( double accuracy = METRIC_EPSILON ) const override; // \ru Является ли кривая плоской \en Whether a curve is planar.
|
||||
bool IsStraight( bool ignoreParams = false ) const override; // \ru Признак прямолинейности кривой \en An attribute of curve straightness
|
||||
|
||||
@@ -142,7 +142,7 @@ public :
|
||||
|
||||
// \ru Оставить часть прямой между параметрами t1 и t2 \en Save a part of the line between t1 and t2 parameters
|
||||
MbeState TrimmPart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
bool HasLength( double & ) const override; // \ru Метрическая длина \en The metric length
|
||||
double GetMetricLength() const override; // \ru Метрическая длина кривой \en Metric length of a curve
|
||||
|
||||
@@ -93,7 +93,7 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
// \ru Сдвинуть параметр t на расстояние len по направлению \en Shift the parameter t by the distance 'len' in the direction
|
||||
bool DistanceAlong( double & t, double len, int curveDir, double eps = Math::metricPrecision,
|
||||
VERSION version = Math::DefaultMathVersion() ) const override;
|
||||
|
||||
@@ -158,7 +158,7 @@ public :
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление кривой \en Change direction of a curve
|
||||
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение отрезка \en Shift of a line segment
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
|
||||
@@ -99,7 +99,7 @@ public :
|
||||
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить Nurbs-копию кривой \en Construct NURBS copy of the curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
double CalculateMetricLength() const override; // \ru Метрическая длина кривой \en Metric length of a curve
|
||||
|
||||
@@ -764,7 +764,7 @@ public :
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & tParameters ) const override; // \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve.
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
void Refresh() override; // \ru Сбросить все временные данные. \en Reset all temporary data.
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменение направления кривой на противоположное. \en Set the opposite direction of curve.
|
||||
|
||||
@@ -520,7 +520,7 @@ public:
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS копию кривой. \en Construct a NURBS copy of a curve.
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
double GetRadius() const override; // \ru Дать физический радиус объекта или ноль, если это невозможно. \en Get the physical radius of the object or null if it impossible.
|
||||
bool GetCircleAxis ( MbAxis3D & ) const override; // \ru Дать ось кривой \en Get the axis of the curve
|
||||
|
||||
@@ -205,7 +205,7 @@ public :
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override;
|
||||
// \ru Оставить часть смещенной кривой между параметрами t1 и t2 \en Save a part of a offset curve between t1 and t2 parameters
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed ( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Creation of a trimmed curve
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override; // \ru Ближайшая проекция точки на кривую \en The nearest point projection to the curve
|
||||
|
||||
@@ -136,7 +136,7 @@ public :
|
||||
bool HasLength( double & length ) const override;
|
||||
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение отрезка \en Shift of a line segment
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override; // \ru Построить NURBS-копию кривой \en Create a NURBS-copy of the curve
|
||||
|
||||
@@ -182,7 +182,7 @@ public :
|
||||
MbCurve * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
MbContour * NurbsContour() const override;
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации \en Calculation of step of approximation
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага аппроксимации по угловой толерантности \en Calculation of step of approximation by angular tolerance
|
||||
|
||||
@@ -127,7 +127,7 @@ public :
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
MbCurve3D * NurbsCurve( const MbNurbsParameters & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
void Trimm( SArray<MbCartPoint3D> & points, double t1, double t2, double eps = METRIC_EPSILON ) const;
|
||||
|
||||
double GetTMin() const override; // \ru Вернуть минимальное значение параметра. \en Get the minimum value of the parameter.
|
||||
|
||||
@@ -272,7 +272,7 @@ public :
|
||||
double Step( double t, double sag ) const override; // \ru Вычисление шага аппроксимации с учетом радиуса кривизны \en Calculation of step of approximation with consideration of curvature radius
|
||||
double DeviationStep( double t, double angle ) const override; // \ru Вычисление шага аппроксимации с учетом угла отклонения \en Calculation of step of approximation with consideration of angle of deviation
|
||||
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
|
||||
const MbCurve3D & GetSpaceCurve() const { return *spaceCurve; }
|
||||
const MbSurface & GetSurface () const { return *surface; }
|
||||
|
||||
@@ -98,7 +98,7 @@ public :
|
||||
bool IsSame( const MbPlaneItem &, double accuracy = LENGTH_EPSILON ) const override;
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение усеченной кривой \en Shift of a trimmed curve
|
||||
MbPlaneItem & Duplicate( MbRegDuplicate * = nullptr ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbContour * NurbsContour() const override; // \ru Построить контур \en Create a contour
|
||||
void AddYourGabaritTo( MbRect & ) const override; // \ru Добавь свой габарит в прямой прям-к \en Add your own gabarit into the given bounding rectangle
|
||||
void CalculateGabarit( MbRect & ) const override; // \ru Определить габариты кривой \en Determine the bounding box of a curve
|
||||
|
||||
@@ -133,7 +133,7 @@ public :
|
||||
const MbFunction * GetFunction() const { return repFunction; } // \ru Получить функцию. \en Get function
|
||||
const MbCurve3D & GetBasisCurve() const override;
|
||||
MbCurve3D & SetBasisCurve() override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
|
||||
@@ -194,6 +194,8 @@ public :
|
||||
void SetTmax( double t );
|
||||
void SetDt ( double d );
|
||||
|
||||
MbeReparamType GetReparamType() const { return reparamType; } // \ru Тип параметризации. \en Parameterization type.
|
||||
|
||||
// \ru !!! геометрия подложки тождественна геометрии кривой, отлична параметризация !!! \en !!! geometry of substrate is identical to geometry of curve, parameterization is different !!!
|
||||
const MbCurve3D & GetSubstrate() const override; // \ru Выдать подложку или себя \en Get substrate or itself
|
||||
MbCurve3D & SetSubstrate() override; // \ru Выдать подложку или себя \en Get substrate or itself
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
bool IsPerspective() const { return perspective; }
|
||||
|
||||
// \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
// \ru Дать плоскую проекцию кривой(локальная система координат, шаг, параметрическая область). \en Get the planar projection of a curve (local coordinate system, step, parametric region).
|
||||
MbCurve * GetMap( const MbMatrix3D &, MbRect1D * pRgn = nullptr,
|
||||
VERSION version = Math::DefaultMathVersion(), bool * coincParams = nullptr ) const override;
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
// \ru Установить параметры NURBS. \en Set parameters of NURBS.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
|
||||
// \ru Вычислить ближайшую проекцию точки на кривую. \en Calculate the nearest projection of a point onto the curve.
|
||||
bool NearPointProjection( const MbCartPoint3D &, double & t, bool ext, MbRect1D * tRange = nullptr ) const override;
|
||||
|
||||
@@ -207,6 +207,33 @@ public :
|
||||
const MbSurface & surf2, const MbCurve & curve2,
|
||||
MbeCurveBuildType buildType, bool sameOne, bool sameTwo,
|
||||
MbRegDuplicate * iReg = nullptr );
|
||||
/** \brief \ru Конструктор по поверхностям и двумерным кривым.
|
||||
\en Constructor by surfaces and two-dimensional curves. \~
|
||||
\details \ru Конструктор кривой пересечения по поверхностям и двумерным кривым. \n
|
||||
\en Constructor of intersection curve by surfaces and two-dimensional curves. \n \~
|
||||
\param[in] surf1 - \ru Первая поверхность.
|
||||
\en The first surface. \~
|
||||
\param[in] curve1 - \ru Первая двумерная кривая.
|
||||
\en The first two-dimensional curve. \~
|
||||
\param[in] surf2 - \ru Вторая поверхность.
|
||||
\en The second surface. \~
|
||||
\param[in] curve2 - \ru Вторая двумерная кривая.
|
||||
\en The second two-dimensional curve. \~
|
||||
\param[in] buildType - \ru Тип кривой пересечения по построению.
|
||||
\en An intersection curve type by construction. \~
|
||||
\param[in] sameOne - \ru Использовать оригинал первой двумерной кривой.
|
||||
\en Use the original of the first two-dimensional curve. \~
|
||||
\param[in] sameTwo - \ru Использовать оригинал второй двумерной кривой.
|
||||
\en Use the original of the second two-dimensional curve. \~
|
||||
\param[in] saveParLenAndLaw - \ru Сохранять параметрическую длину и закон для поверхностных кривых.
|
||||
\en Save parametric length and law for surface curves. \~
|
||||
\param[in,out] iReg - \ru Регистратор дублирования.
|
||||
\en Registrator of duplication. \~
|
||||
*/
|
||||
MbSurfaceIntersectionCurve( const MbSurface & surf1, const MbCurve & curve1,
|
||||
const MbSurface & surf2, const MbCurve & curve2,
|
||||
MbeCurveBuildType buildType, bool sameOne, bool sameTwo,
|
||||
bool saveParLenAndLaw, MbRegDuplicate * iReg = nullptr );
|
||||
/** \brief \ru Конструктор по поверхностям и двумерным точкам.
|
||||
\en Constructor by surfaces and two-dimensional points. \~
|
||||
\details \ru Конструктор кривой пересечения по поверхностям и двумерным точкам. \n
|
||||
@@ -379,10 +406,10 @@ public:
|
||||
// \ru Преобразовать в NURBS кривую. \en Transform to a NURBS-curve.
|
||||
MbNurbs3D * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создать усеченную кривую. \en Create a trimmed curve
|
||||
|
||||
/// \ru Создать усеченную кривую на тех же поверхностях. \en Create a trimmed curve on the same surfaces.
|
||||
MbSurfaceIntersectionCurve * TrimmedIntersection( double t1, double t2, int sense ) const;
|
||||
MbSurfaceIntersectionCurve * TrimmedIntersection( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const;
|
||||
|
||||
double GetMetricLength() const override; // \ru Вычислить метрическую длину кривой. \en Calculate the metric length of a curve.
|
||||
double GetLengthEvaluation() const override; // \ru Оценить метрическую длину кривой. \en Estimate the metric length of a curve.
|
||||
@@ -568,7 +595,7 @@ public:
|
||||
*/
|
||||
bool ProlongCurve( double & t, bool beg, double sag, const VERSION version, double eps = Math::paramNear );
|
||||
/// \ru Согласовать параметрическую длину двумерных кривых. \en Match parametric length of two-dimensional curves.
|
||||
void Normalize();
|
||||
void Normalize( bool saveParLenAndLaw = false );
|
||||
|
||||
/// \ru Выбрать кривую шва по ориентации грани и ориентации двумерной кривой. \en Select a seam curve by face orientation and orientation of two-dimensional curve.
|
||||
const MbCurve * ChooseCurve( const MbSurface & surf, bool faceSense, bool curveSense ) const;
|
||||
@@ -691,7 +718,7 @@ public:
|
||||
MbSurfaceIntersectionCurve * BreakWithGap( double tt, double ttP, bool sense ); // \ru Используется в конвертерах. \en Used in converters.
|
||||
|
||||
/// \ru Усечь кривую пересечения по двум точкам и заданному направлению. \en Trim intersection curve by two points and the given direction.
|
||||
MbCurve3D * Trimmed( const MbCartPoint3D & p1, const MbCartPoint3D & p2, bool sense ) const;
|
||||
MbCurve3D * Trimmed( const MbCartPoint3D & p1, const MbCartPoint3D & p2, bool sense, bool saveParamLenAndLaw = false ) const;
|
||||
|
||||
/// \ru Определить, гладкая ли кривая пересечения. \en Determine whether the intersection curve is smooth.
|
||||
bool IsSmooth() const;
|
||||
|
||||
@@ -170,7 +170,7 @@ public :
|
||||
bool GetSpecificPoint( const MbCartPoint & from, double & dmax, MbCartPoint & pnt ) const override;
|
||||
MbeState DeletePart( double t1, double t2, MbCurve *& part2 ) override; // \ru Удалить часть усеченной кривой между параметрами t1 и t2 \en Delete a part of a trimmed curve between parameters t1 and t2
|
||||
MbeState TrimmPart ( double t1, double t2, MbCurve *& part2 ) override; // \ru Оставить часть усеченной кривой между параметрами t1 и t2 \en Keep a part of the trimmed curve between parameters t1 and t2
|
||||
MbCurve * Trimmed( double t1, double t2, int sense ) const override;
|
||||
MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override;
|
||||
MbCurve * Offset( double rad ) const override; // \ru Смещение усеченной кривой \en Shift of a trimmed curve
|
||||
|
||||
MbNurbs * NurbsCurve( const MbCurveIntoNurbsInfo & ) const override;
|
||||
|
||||
@@ -102,7 +102,7 @@ public :
|
||||
|
||||
const MbCurve3D & GetBasisCurve() const override;
|
||||
MbCurve3D & SetBasisCurve() override;
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const override; // \ru Создание усеченной кривой \en Create a trimmed curve
|
||||
|
||||
void Inverse( MbRegTransform * iReg = nullptr ) override; // \ru Изменить направление \en Change direction
|
||||
double Curvature ( double ) const override; // \ru Кривизна усеченной кривой \en Curvature of a trimmed curve
|
||||
|
||||
+4
-2
@@ -80,7 +80,7 @@ typedef std::vector<ConstPlaneCurveSPtr> ConstPlaneCurvesSPtrVector;
|
||||
// ---
|
||||
class MATH_CLASS MbCurve : public MbPlaneItem, public MbNestSyncItem {
|
||||
protected:
|
||||
SimpleName name; ///< \ru Имя кривой. \en A curve name.
|
||||
SimpleName name; ///< \ru Имя кривой. Данные объекта являются временными и используются для внутренних целей. \en A curve name. The object data is temporary and used internally.
|
||||
|
||||
protected :
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -640,12 +640,14 @@ public :
|
||||
\en Direction of a trimmed curve in relation to an initial curve.
|
||||
sense = 1 - direction does not change.
|
||||
sense = -1 - direction changes to the opposite value. \~
|
||||
\param[in] saveParLenAndLaw - \ru Сохранять параметрическую длину и закон.
|
||||
\en Save parametric length and law. \~
|
||||
\internal \ru При изменении поведения или документации метода переделать юнит-тестирование.
|
||||
\en When changing of the behavior or the documentation of the method being performed, the unit-testing should be redone. \~ \endinternal
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
*/
|
||||
virtual MbCurve * Trimmed( double t1, double t2, int sense ) const = 0;
|
||||
virtual MbCurve * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const = 0;
|
||||
|
||||
/// \ru Аппроксимировать кривую контуром из NURBS-кривых. \en Approximate of a curve by the contour from NURBS curves.
|
||||
virtual MbContour * NurbsContour() const;
|
||||
|
||||
@@ -87,7 +87,7 @@ typedef std::pair<ConstSpaceCurvesSetConstIt, bool> ConstSpaceCurvesSetRet;
|
||||
// ---
|
||||
class MATH_CLASS MbCurve3D : public MbSpaceItem, public MbNestSyncItem {
|
||||
protected:
|
||||
SimpleName name; ///< \ru Имя кривой. \en A curve name.
|
||||
SimpleName name; ///< \ru Имя кривой. Данные объекта являются временными и используются для внутренних целей. \en A curve name. The object data is temporary and used internally.
|
||||
|
||||
protected :
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -493,11 +493,13 @@ public :
|
||||
\en Direction of a trimmed curve in relation to an initial curve.
|
||||
sense = 1 - direction does not change.
|
||||
sense = -1 - direction changes to the opposite value. \~
|
||||
\param[in] saveParLenAndLaw - \ru Сохранять параметрическую длину и закон.
|
||||
\en Save parametric length and law. \~
|
||||
\result \ru Построенная усеченная кривая.
|
||||
\en A constructed trimmed curve. \~
|
||||
\ingroup Curves_3D
|
||||
*/
|
||||
virtual MbCurve3D * Trimmed( double t1, double t2, int sense ) const; // \ru Создание усеченной кривой. \en Creation of trimmed curve.
|
||||
virtual MbCurve3D * Trimmed( double t1, double t2, int sense, bool saveParamLenAndLaw = false ) const; // \ru Создание усеченной кривой. \en Creation of trimmed curve.
|
||||
|
||||
/// \ru Вернуть параметрическую длину кривой. \en Return the parametric length of a curve.
|
||||
double GetParamLength () const { return GetTMax() - GetTMin(); }
|
||||
|
||||
+18
-2
@@ -1182,13 +1182,29 @@ GCM_FUNC(const GCT_diagnostic_pars &) GCM_DiagnosticPars( GCM_system gSys );
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Use GCM_FreezeGeom instead this (2019).
|
||||
//---
|
||||
GCM_FUNC(void) GCM_FixGeom( GCM_system gSys, GCM_geom g );
|
||||
DEPRECATE_DECLARE GCM_FUNC(void) GCM_FixGeom( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Deprecated
|
||||
// Deprecated (2021). Use GCM_GeometryStatus to query about GCM_G_STATUS_Frozen.
|
||||
//---
|
||||
GCM_FUNC(bool) GCM_IsFixed( GCM_system gSys, GCM_geom g );
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Является ли геометрический объект полностью определенным или недоопределенным.
|
||||
// Whether the geometric entity is fully defined or underdefined.
|
||||
/**
|
||||
\attention Internal use only.The feature is under development.
|
||||
*/
|
||||
// ---
|
||||
GCM_FUNC(GCM_dof_result) GCM_IsWellDefined( GCM_system gSys, GCM_geom g ); // GCM_IsWellConstrained
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Статус геометрического объекта в системе.
|
||||
/**
|
||||
\note Internal use only. The func is under development.
|
||||
*/
|
||||
// ---
|
||||
GCM_FUNC(GCM_g_status) GCM_GeometryStatus( GCM_system gSys, GCM_geom g );
|
||||
|
||||
#endif // __GCM_API_H
|
||||
|
||||
|
||||
+48
-25
@@ -30,20 +30,10 @@ class MtParGeom;
|
||||
\{
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \ru Состояние свободы тела \en State of the solid freedom
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef enum
|
||||
{
|
||||
sof_Zero = 0, ///< \ru Полно-заданное или фиксированное тело (нулевая степень свободы). \en Fully-specified or fixed solid (zero degree of freedom).
|
||||
sof_WellConstrained = sof_Zero, ///< \ru Полно-заданное или фиксированное тело (нулевая степень свободы). \en Fully-specified or fixed solid (zero degree of freedom).
|
||||
sof_UnderConstrained = 1, ///< \ru Недоопределенное тело, т.е. имеющее степень свободы. \en Underconstrained solid, i.e. having a degree of freedom.
|
||||
sof_Unknown = 2, ///< \ru Нет сведений о степени свободы. \en No information about the degree of freedom.
|
||||
} MtStateOfFreedom;
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
/// \ru Состояние свободы тела. \en State of the solid freedom.
|
||||
//---
|
||||
typedef GCM_dof_result MtStateOfFreedom;
|
||||
|
||||
typedef GCM_reposition MtRepositionMode;
|
||||
|
||||
@@ -297,6 +287,40 @@ inline bool MtArgument::operator == ( const ItGeom * geom ) const
|
||||
return false;
|
||||
}
|
||||
|
||||
class MtConstraintSystem;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/// \ru Итератор, обходящий систему ограничений. \en Iterator traversing the constraint system.
|
||||
//---
|
||||
/*
|
||||
class GCM_CLASS ItConstraintIter
|
||||
{
|
||||
private:
|
||||
CNodeIterator * m_cIter;
|
||||
const MtConstraintSystem * m_gcSystem;
|
||||
|
||||
public:
|
||||
ItConstraintIter();
|
||||
ItConstraintIter( const ItConstraintIter & );
|
||||
ItConstraintIter & operator = ( const ItConstraintIter & );
|
||||
~ItConstraintIter();
|
||||
|
||||
public:
|
||||
ItConstraintItem * Get() const;
|
||||
ItConstraintIter & Set( const MtConstraintSystem *, CNodeIterator & );
|
||||
const ItConstraintIter & Next();
|
||||
bool EqualTo( const ItConstraintIter & ) const;
|
||||
|
||||
public:
|
||||
//operator CNodeIterator& () { return *impl; }
|
||||
ItConstraintItem * operator*() const { return Get(); }
|
||||
// prefix operator
|
||||
const ItConstraintIter & operator++() { return Next(); }
|
||||
bool operator ==( const ItConstraintIter & iter ) const { return EqualTo( iter ); }
|
||||
bool operator !=( const ItConstraintIter & iter ) const { return !EqualTo( iter ); }
|
||||
|
||||
}; // MtConstraintIter
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//
|
||||
@@ -307,11 +331,9 @@ struct GCM_CLASS ItConstraintsEnum : public MtRefItem
|
||||
virtual void Restart() = 0;
|
||||
};
|
||||
|
||||
|
||||
class MtConstraintManager; // Internal implementation of 3D solver.
|
||||
class MtBlackboxManager; // Internal implementation of Blackbox manager.
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Геометрический решатель.
|
||||
\en Geometric constraint solver. \~
|
||||
@@ -649,7 +671,6 @@ public:
|
||||
//protected:
|
||||
/// \ru Функция будет удалена из API. Использовать Evalute(). \en The call is deprecated. Use Evaluate() instead this.
|
||||
MtResultCode3D Solve( bool diagQuery );
|
||||
|
||||
// Internal use only
|
||||
GCM_geom _QueryArgument( const MtArgument & gArg );
|
||||
|
||||
@@ -704,20 +725,22 @@ GCM_FUNC(SPtr<MtGeomSolver>) GCM_GetSolver( GCM_system gSys );
|
||||
|
||||
/** \} */
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// Запрос на аргумент (создать впервые или найти имеющийся), основано на базовом API
|
||||
/*
|
||||
Internal use only.
|
||||
*/
|
||||
//---
|
||||
//GCM_geom GCM_QueryArgument( GCM_system gSys, const MtArgument & gArg );
|
||||
|
||||
/*
|
||||
Deprecated typenames
|
||||
*/
|
||||
typedef MtGeomSolver IfGCManager;
|
||||
typedef MtRepositionMode MtTypeOfReposition;
|
||||
|
||||
/// \ru Полно-заданное или фиксированное тело (нулевая степень свободы). \en Fully-specified or fixed solid (zero degree of freedom).
|
||||
static const GCM_dof_result sof_Zero = GCM_DOF_RESULT_WellDefined;
|
||||
/// \ru Полно-заданное или фиксированное тело (нулевая степень свободы). \en Fully-specified or fixed solid (zero degree of freedom).
|
||||
static const GCM_dof_result sof_WellConstrained = GCM_DOF_RESULT_WellDefined;
|
||||
/// \ru Недоопределенное тело, т.е. имеющее степень свободы. \en Underconstrained solid, i.e. having a degree of freedom.
|
||||
static const GCM_dof_result sof_UnderConstrained = GCM_DOF_RESULT_UnderDefined;
|
||||
/// \ru Нет сведений о степени свободы. \en No information about the degree of freedom.
|
||||
static const GCM_dof_result sof_Unknown = GCM_DOF_RESULT_Unknown;
|
||||
|
||||
|
||||
#endif // __GCM_MANAGER_H
|
||||
|
||||
// eof
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
\file
|
||||
\brief \ru API процедур и функций геометрического решателя.
|
||||
\en API of procedures and functions of geometric solver. \~
|
||||
\brief \ru API процедур и функций 3D решателя.
|
||||
\en API of procedures and functions of 3D solver. \~
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
+67
-21
@@ -236,14 +236,11 @@ typedef enum
|
||||
, GCM_RESULT_DraggingFailed = 4 ///< \ru Неудачная попытка перемещения фиксированного объекта (равно, как объекта жестко-связанного с фиксированным). \en Failed attempt to move a fixed object (as the object rigidly connected with fixed). \~
|
||||
, GCM_RESULT_Not_Satisfied = 5 ///< \ru Ограничение(я) не решено (по неизвестным причинам). \en Constraint(s) has not been solved (for unknown reasons). \~
|
||||
, GCM_RESULT_Unsolvable = 6 ///< \ru Ограничение(я) не разрешимо. \en Constraint(s) is not solvable. \~
|
||||
|
||||
/**
|
||||
\brief \ru Ограничение GCM_DEPENDENT не вычислено или ее независимые аргументы находятся вне области решений.
|
||||
\en The GCM_DEPENDENT constraint is not solved or its independent arguments are out of the solution domain.
|
||||
\note \ru Ситуация возникает, когда функция GCM_dependent_func возвращает false.
|
||||
\en The situation occurs when the GCM_dependent_func function returns false.
|
||||
*/
|
||||
, GCM_RESULT_DependentConstraintUnsolved = 7
|
||||
, GCM_RESULT_DependentConstraintUnsolved = 7 /**< \ru Ограничение GCM_DEPENDENT не вычислено или ее независимые аргументы находятся вне области решений.
|
||||
\en The GCM_DEPENDENT constraint is not solved or its independent arguments are out of the solution domain. \~
|
||||
\note \ru Ситуация #GCM_RESULT_DependentConstraintUnsolved возникает, когда функция GCM_dependent_func возвращает false.
|
||||
\en The situation #GCM_RESULT_DependentConstraintUnsolved occurs when the GCM_dependent_func function returns false. \~
|
||||
*/
|
||||
, GCM_RESULT_Error = 8 ///< \ru Неизвестная ошибка, как правило, не связанная с процессом решения. \en Unknown error is usually not related to the solving. \~
|
||||
, GCM_RESULT_InappropriateAlignment = 9 ///< \ru Опция выравнивания не подходит для данного типа ограничения. \en The alignment option is inappropriate to a given constraint type. \~
|
||||
, GCM_RESULT_InappropriateArgument = 10 ///< \ru Геометрический тип аргумента не подходит для данного ограничения. \en Geometric type of an argument is inappropriate to the constraint. \~
|
||||
@@ -303,7 +300,7 @@ typedef enum
|
||||
{
|
||||
GCM_NO_SCALE = 0,
|
||||
GCM_RIGID = 1, ///< \ru Шаг между элементами константен. Паттерн не масштабируется (не растягивается). \en Distance between elements is constant. The pattern is not scaled.
|
||||
GCM_LINEAR_SCALE = 2, ///< \ru Шаг между элементами линейно масштабируется при растяжениях. \en Distance between elements is linearly scaled when stretching.
|
||||
GCM_LINEAR_SCALE = 2, ///< \ru Шаг между элементами линейно масштабируется при растяжениях. \en Distance between elements is linearly scaled when stretching.
|
||||
} GCM_scale;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -331,21 +328,18 @@ typedef enum
|
||||
/*
|
||||
Произвольное поведение (arbitrary behavior).
|
||||
*/
|
||||
GCM_REPOSITION_FreeRotation ///< \ru Произвольная репозиция с преимуществом вращения. \en Arbitrary reposition with predominant rotation.
|
||||
, GCM_REPOSITION_FreeMoving ///< \ru Произвольная репозиция с преимуществом перемещения. \en Arbitrary reposition with predominant moving.
|
||||
GCM_REPOSITION_FreeRotation ///< \ru Произвольная репозиция с преимуществом вращения. \en Arbitrary reposition with predominant rotation. \~
|
||||
, GCM_REPOSITION_FreeMoving ///< \ru Произвольная репозиция с преимуществом перемещения. \en Arbitrary reposition with predominant moving. \~
|
||||
|
||||
/*
|
||||
Строгое поведение (strict behavior).
|
||||
*/
|
||||
, GCM_REPOSITION_Dragging ///< \ru Перетаскивание в плоскости "экрана". \en Dragging in the plane of the screen.
|
||||
, GCM_REPOSITION_Rotation ///< \ru Вращение вокруг неподвижной оси. \en Rotation around fixed axis.
|
||||
|
||||
/** \brief \ru Перенос только для одного твердого тела. \en Shift only one solid.
|
||||
\note \ru Этот режим был задуман для процессов вставки нового тела в сборку САПР.
|
||||
\en This mode have been intended for insertion processes of a new solid in the CAD assembly.
|
||||
*/
|
||||
, GCM_REPOSITION_Transfer
|
||||
|
||||
, GCM_REPOSITION_Dragging ///< \ru Перетаскивание в плоскости "экрана". \en Dragging in the plane of the screen. \~
|
||||
, GCM_REPOSITION_Rotation ///< \ru Вращение вокруг неподвижной оси. \en Rotation around fixed axis. \~
|
||||
, GCM_REPOSITION_Transfer /**< \ru Перенос только для одного твердого тела. \en Shift only one solid. \~
|
||||
\note \ru Этот режим #GCM_REPOSITION_Transfer был задуман для процессов вставки нового тела в сборку САПР.
|
||||
\en This mode #GCM_REPOSITION_Transfer have been intended for insertion processes of a new solid in the CAD assembly. \~
|
||||
*/
|
||||
} GCM_reposition;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
@@ -397,6 +391,59 @@ struct GCM_CLASS GCM_g_record
|
||||
double radiusB; ///< \ru "Малый" радиус тора или конуса. \en Minor radius of cone and torus.
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Результат вычисления степени свободы геометрического объекта.
|
||||
\en Resulting code of the geometric degree of freedom computation.
|
||||
\attention Internal use only. The feature is under development.
|
||||
*/
|
||||
//---
|
||||
typedef enum
|
||||
{
|
||||
GCM_DOF_RESULT_WellDefined ///< \ru Геометрический объект полностью определен или заморожен (DOF=0). \en An geometric object is well defined, fixed or frozen (dof=0).
|
||||
, GCM_DOF_RESULT_UnderDefined ///< \ru Геометрический объект имеет переносную или поворотную подвижность (DOF>0). \en An geometric object has translational or rotational freedom (dof>0).
|
||||
, GCM_DOF_RESULT_Unknown ///< \ru Степень свободы геометрического объекта не вычислена. \en The geomeric object state of freedom is not calculated.
|
||||
} GCM_dof_result;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Развернутая информация о степени свободы геометрического объекта.
|
||||
\en Detailed info about geometric degree of freedom.
|
||||
\note Internal use only. The feature is under development.
|
||||
*/
|
||||
//---
|
||||
typedef struct
|
||||
{
|
||||
GCM_dof_result result; ///< \ru Код результата вычисления степени свободы геометрического объекта. \en Resulting code of evaluating the geometric degrees of freedom. \~
|
||||
// Translational degree of freedom info.
|
||||
size_t tdof;
|
||||
GCM_vec3d dir1;
|
||||
GCM_vec3d dir2;
|
||||
// Rotational degree of freedom info.
|
||||
size_t rdof;
|
||||
GCM_point center;
|
||||
GCM_vec3d axis1;
|
||||
GCM_vec3d axis2;
|
||||
} GCM_dof_record;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Статус геометрического объекта.
|
||||
\en Status code of geometric object.
|
||||
\note Internal use only. The feature is under development.
|
||||
*/
|
||||
//---
|
||||
typedef enum
|
||||
{
|
||||
GCM_G_STATUS_Frozen ///< \ru Геометрический объект лишен всех степеней свобод методом #GCM_FreezeGeom.
|
||||
, GCM_G_STATUS_WellDefined /**< \ru Состояние, когда все ограничения и размеры, определяющие объект, выполнены и полностью
|
||||
устранили все его степени свободы.
|
||||
\en A state in which all constraints and dimensions that define an object have been
|
||||
fullfilled so that all of the degrees of freedom are eliminated. \~
|
||||
*/
|
||||
, GCM_G_STATUS_UnderDefined ///< \ru Геометрический объект имеет переносную или поворотную подвижность (DOF>0).
|
||||
, GCM_G_STATUS_NotConsistent ///<
|
||||
, GCM_G_STATUS_NotSolved ///<
|
||||
, GCM_G_STATUS_Unknown ///< \ru Статус геометрического объекта не определен. \en The geomeric statгы is undefined.
|
||||
} GCM_g_status;
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
/** \brief \ru Дополнительный параметр для функций типа #GCM_dependent_func.
|
||||
\en Additional parameter for functions of type #GCM_dependent_func. \~
|
||||
@@ -582,7 +629,6 @@ const GCM_reposition rep_MovingToPoint = GCM_REPOSITION_Dragging;
|
||||
const GCM_reposition rep_RotationAboutAxis = GCM_REPOSITION_Rotation;
|
||||
const GCM_reposition rep_TransferOneGeomOnly = GCM_REPOSITION_Transfer;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// eof
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
\brief \ru Шаблонные утилиты.
|
||||
\en Template utilities. \~
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////// C3D API///
|
||||
|
||||
#ifndef __GENERIC_UTILITY_H
|
||||
#define __GENERIC_UTILITY_H
|
||||
@@ -1136,9 +1136,10 @@ struct range : public std::pair<Iterator, Iterator>
|
||||
typedef typename _IterTraits<Iterator>::value_type value_type;
|
||||
typedef typename _IterTraits<Iterator>::reference reference;
|
||||
|
||||
range( const Iterator & iter, const Iterator & last ) :_Pair( iter, last ) {}
|
||||
range( const _Pair & other ) :_Pair( other ) {}
|
||||
range() :_Pair() {}
|
||||
range( const Iterator & iter, const Iterator & last ) : _Pair( iter, last ) {}
|
||||
range( Iterator && iter, Iterator && last ) : _Pair( iter, last ) {}
|
||||
range( const _Pair & other ) : _Pair( other ) {}
|
||||
range() : _Pair() {}
|
||||
Iterator begin() const { return _Pair::first; }
|
||||
Iterator end() const { return _Pair::second; }
|
||||
bool empty() const { return _Pair::first == _Pair::second; }
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
\file
|
||||
\brief \ru Обобщенные алгоритмы на графах.
|
||||
\en Generic graph algorithms. \~
|
||||
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////// MA 25.10.2010 ////
|
||||
/////////////////////////////////////////////////////// MA 25.10.2010 ///////// C3D API///
|
||||
|
||||
#ifndef __GRAPH_ALGORITHMS_H
|
||||
#define __GRAPH_ALGORITHMS_H
|
||||
|
||||
@@ -568,6 +568,10 @@ void MbCurveVestige::GetHiddenCurves( Curves & dst ) const
|
||||
class MATH_CLASS MbEdgeVestige : public MbBaseVestige {
|
||||
friend struct MbVEFVestiges;
|
||||
public:
|
||||
/** \brief
|
||||
\deprecated \ru Поле будет объявлено приватным. Используйте для доступа методы GetCurveInfo() и SetCurveInfo().
|
||||
\en The field will be declared private. Use methods GetCurveInfo() and SetCurveInfo() to access it.
|
||||
*/
|
||||
MbCurveVestige curveInfo; ///< \ru Информация о следе кривой. \en The information about a curve vestige.
|
||||
private:
|
||||
uint8 vesType; ///< \ru Тип отображения. \en A mapping type.
|
||||
@@ -647,6 +651,11 @@ public:
|
||||
/// \ru Установить подтип отображения. \en Set mapping subtype.
|
||||
void SetSubType( SubType vt ) { vesSubType = (uint8)vt; }
|
||||
|
||||
///< \ru Получить информацию о следе кривой. \en Get the information about a curve vestige.
|
||||
const MbCurveVestige & GetCurveInfo() const { return curveInfo; }
|
||||
///< \ru Получить информацию о следе кривой. \en Get the information about a curve vestige.
|
||||
MbCurveVestige & SetCurveInfo() { return curveInfo; }
|
||||
|
||||
/// \ru Добавить MbEdgeVestige в массив. \en Add the MbEdgeVestige to an array. \~
|
||||
friend MbEdgeVestige * AddVestigeCurve( uint otherComp, size_t otherIdent, const MbName & otherName, RPArray<MbEdgeVestige> & arr, bool isCenterLine, bool ownName );
|
||||
|
||||
@@ -778,7 +787,11 @@ IMPL_PERSISTENT_OPS( MbFaceVestige )
|
||||
// ---
|
||||
class MATH_CLASS MbAnnotationEdgeVestige : public MbBaseVestige {
|
||||
friend struct MbVEFVestiges;
|
||||
public:
|
||||
public:
|
||||
/** \brief
|
||||
\deprecated \ru Поле будет объявлено приватным. Используйте для доступа методы GetCurveInfo() и SetCurveInfo().
|
||||
\en The field will be declared private. Use methods GetCurveInfo() and SetCurveInfo() to access it.
|
||||
*/
|
||||
MbCurveVestige curveInfo; ///< \ru Информация о следе кривой. \en The information about a curve vestige.
|
||||
protected:
|
||||
uint8 vesType; ///< \ru Тип отображения. \en A mapping type.
|
||||
@@ -822,6 +835,11 @@ public:
|
||||
/// \ru Подтип аннотационных ребер. \en A subtype of annotative edges.
|
||||
SubType GetSubType() const { return (SubType)vesSubType; }
|
||||
|
||||
///< \ru Получить информацию о следе кривой. \en Get the information about a curve vestige.
|
||||
const MbCurveVestige & GetCurveInfo() const { return curveInfo; }
|
||||
///< \ru Получить информацию о следе кривой. \en Get the information about a curve vestige.
|
||||
MbCurveVestige & SetCurveInfo() { return curveInfo; }
|
||||
|
||||
/// \ru Добавить MbAnnotationEdgeVestige в массив. \en Add the MbAnnotationEdgeVestige to an array. \~
|
||||
friend MbAnnotationEdgeVestige * AddVestigeAnnotationEdge( uint otherComp, size_t otherIdent, const MbTopologyItem * otherItem,
|
||||
const MbName & otherName, MbBaseVestige::Type type, MbBaseVestige::SubType subType,
|
||||
|
||||
+29
-4
@@ -32,8 +32,8 @@
|
||||
#define __SIZEOF_WCHAR_T__ 4
|
||||
#endif
|
||||
|
||||
#define DEPRECATE_DECLARE
|
||||
#define DEPRECATE_DECLARE_REPLACE(func)
|
||||
#define DEPRECATE_DECLARE __attribute__((deprecated))
|
||||
#define DEPRECATE_DECLARE_REPLACE(func) DEPRECATE_DECLARE
|
||||
|
||||
#else // C3D_WINDOWS
|
||||
|
||||
@@ -81,9 +81,10 @@ namespace c3d {
|
||||
}
|
||||
} // template <class T> T _hypot(T x, T y)
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
#define _hypot c3d::_hypot
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ---
|
||||
#define _hypot c3d::_hypot
|
||||
#endif //__INTEL_COMPILER
|
||||
|
||||
|
||||
@@ -107,4 +108,28 @@ namespace c3d {
|
||||
#endif //C3D_WINDOWS
|
||||
|
||||
|
||||
namespace c3d {
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Безопасная функция acos.
|
||||
\en Secure acos function. \~
|
||||
\details \ru Безопасная функция acos. Загоняет параметр x в диапазон [-1, +1]. \n
|
||||
\en Secure acos function. The function puts the parameter x into the range [-1, +1]. \n \~
|
||||
\ingroup Base_Tools
|
||||
*/
|
||||
// ---
|
||||
inline double ACos( double x )
|
||||
{
|
||||
if ( x > 1.0 )
|
||||
x = 1.0;
|
||||
if ( x < -1.0 )
|
||||
x = -1.0;
|
||||
return ::acos( x );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// \ru Безопасная функция acos. \en Secure acos function.
|
||||
// ---
|
||||
#define _acos c3d::ACos
|
||||
|
||||
#endif // __MATHX_H
|
||||
|
||||
@@ -540,7 +540,6 @@ public:
|
||||
struct MATH_CLASS MbFairCurveData {
|
||||
|
||||
public:
|
||||
bool closed; ///< \ru Формат замкнутости кривой вида UnClamped. \en Format of closed curve as UnClamped\~
|
||||
MbeFairSmoothing fairing; ///< \ru Сглаживание (без сглаживания, со сглаживанием, со сглаживанием и исправлением острых углов, со сглаживанием зашумленных точек). \en Smoothing of curve: 0 - disable, 1 - enable, 2 - enable and correct acute angles \~
|
||||
bool arrange; ///< \ru Перераспределение точек по контуру (false - без перераспределения, true - с перераспределением). \en Redistribution of points (false - without of distribution, true - with distribution) . \~
|
||||
MbeFairSubdivision subdivision; ///< \ru Коэффициент уплотнения кривой. \en Curve subdivision coefficient . \~
|
||||
@@ -552,7 +551,6 @@ public:
|
||||
MbeFairApprox approx; ///< \ru Метод аппроксимации. \en Approx method. \~
|
||||
MbeFairMethod create; ///< \ru Исходные ГО: 1 - опорная ломаная, 2 - касательная ломаная. \en Initial GD: 1 - base polyline, 2 - tangent polyline. \~
|
||||
size_t degreeBSpline; ///< \ru Степень B-сплайновой кривой m (3<=m<=10). \en The degree m (3<=m<=10) of B-Spline curve. \~
|
||||
MbeFairSplineFormat initFormat; ///< \ru Исходный формат сплайна (1 - открытый S-полигон, 2 - закрытый S-полигон, 3 - GB-полигон). \en Output format of spline (1 - foat S-polygon, 2 - clamped S-polygon, 3 - GB-polygon). \~
|
||||
MbeFairSplineFormat outFormat; ///< \ru Выходной формат сплайна (2 - S-полигон, 3 - GB-полигон). \en Output format of spline (2 - S-polygon, 3 - GB-polygon). \~
|
||||
size_t nSegments; ///< \ru Количество сегментов сплайна. \en Number of segments of spline. \~
|
||||
size_t numSegment; ///< \ru Номер сегмента. \en Number of segment. \~
|
||||
@@ -562,12 +560,10 @@ public:
|
||||
size_t clothoidSegms; ///< \ru Количество сегментов аппроксимирующей клотоиду кривой. \en Number of segments of curve approximated the Clothoid. \~
|
||||
SArray<int> arrayFixPntTngSign; ///< \ru Признаки учета касательных на точках / точек на касательных. \en Signs of points on tangents / tangents on points.
|
||||
|
||||
SArray<size_t> arrayFixNoisyNum; ///< \ru Номера точек точных значений зашумленных точек. \en Signs of exactly noisy points.
|
||||
SArray<size_t> arrayFixNoisyNum; ///< \ru Номера точек точных значений зашумленных точек. \en Signs of exactly noisy points.
|
||||
|
||||
size_t numberOfIterationsBSpl; ///< \ru Количество итераций построения B-сплайна (заданное и фактическое). \en The number of iterations for building the B-spline (given and actual).
|
||||
size_t numberOfIterationsVCurve; ///< \ru Количество итераций построения V-кривой (заданное и фактическое). \en The number of iterations for building the V-curve (given and actual).
|
||||
double realAccuracyBSpl; ///< \ru Точность построения B-сплайна (заданная и фактическая). \en The accuracy of creating the B-spline (given and actual).
|
||||
double realAccuracyVCurve; ///< \ru Точность построения V-кривой (заданная и фактическая). \en The accuracy of creating the V-curve (given and actual).
|
||||
|
||||
/// \ru Параметры аппроксимации V-кривой. \en Params of Approximation of V-curve.
|
||||
bool switchEndTangents; ///< \ru Флаги учета значений концевых касательных. \en Flags accounting tangents values.
|
||||
@@ -595,20 +591,19 @@ public:
|
||||
public:
|
||||
/// \ru Пустой конструктор. \en Empty constructor.
|
||||
MbFairCurveData() :
|
||||
closed( true ), fairing( fairSmooth_Yes ), arrange( false ), subdivision( fairSubdiv_Single ),
|
||||
fairing( fairSmooth_Yes ), arrange( false ), subdivision( fairSubdiv_Single ),
|
||||
accountCurvature( fairCur_No ), accountInflexVector( fairVector_Tangent ),
|
||||
tangentCorrectBspline( true ),
|
||||
fixPntTng( fixPntTng_NotFix ),
|
||||
//approx( fairApprox_KnotsSpline ), create( 1 ), degreeBSpline( 8 ),
|
||||
approx( fairApprox_IsoNurbs ), create( fairMethod_Polyline ), degreeBSpline( 8 ), //DEBUG 2020 25
|
||||
initFormat( fairFormat_Open ), outFormat( fairFormat_Close ),
|
||||
outFormat( fairFormat_Close ),
|
||||
nSegments( 4 ), numSegment( 0 ), tParam( 0.5 ),
|
||||
clothoidRMin( 50.0 ), clothoidLMax( 200.0 ), clothoidSegms( 10 ), numberOfIterationsBSpl( 1000 ),
|
||||
numberOfIterationsVCurve( 192 ),
|
||||
#ifdef C3D_DEBUG_FAIR_CURVES
|
||||
prt( nullptr ),
|
||||
#endif
|
||||
realAccuracyBSpl( METRIC_ACCURACY*0.1 ), realAccuracyVCurve( METRIC_EPSILON ),
|
||||
realAccuracyBSpl( METRIC_ACCURACY*0.1 ),
|
||||
switchEndTangents( false ), switchEndCurvature( false ),
|
||||
firstCurvature( 0.0 ), lastCurvature( 0.0 ), smoothTorsion( false ),
|
||||
clearanceNoisy( 0.002 ), clearanceNoisyIteration( 200 ), scaleParam( 1.0 ),
|
||||
|
||||
@@ -840,6 +840,8 @@ enum MbeFairCurveType
|
||||
fairCrvType_Clothoid = 4, ///< \ru Клотоида. \en A clothoid.
|
||||
fairCrvType_Sectrix = 5, ///< \ru Сектриса Маклорена. \en A sectrix of Maclourin.
|
||||
fairCrvType_BezierFillet = 6, ///< \ru Плавная кривая Безье сопряжения. \en A fillet fair Bezier curve.
|
||||
fairCrvType_Poly = 7, ///< \ru Ломаная. \en Polyline.
|
||||
fairCrvType_PolyTangent = 8, ///< \ru Касательная ломаная. \en Tangent polyline.
|
||||
};
|
||||
|
||||
|
||||
|
||||
+91
-44
@@ -256,22 +256,24 @@ template<> struct PropType<MbPntMatingData<MbVector3D> > { static const PrePropT
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Свойство.
|
||||
\en Property. \~
|
||||
/** \brief \ru Свойство. Только для внутреннего использования.
|
||||
\en Property. Internal use only. \~
|
||||
\details \ru Свойство является базовым классом для доступа к внутренним данным объектов.
|
||||
Наследники свойства содержать внутренние данные объектов или их копии.
|
||||
Свойства предназначены для просмотра и модификации внутренних данных объектов.
|
||||
Наследники свойства могут содержать внутренние данные объектов или их копии.
|
||||
Свойства предназначены для просмотра и модификации внутренних данных объектов. \n
|
||||
Для хранения пользовательских данных объекта рекомендуем использовать атрибуты - объекты классов наследующих MbAttribute, уже имеющиеся в ядре или пользовательские. \n
|
||||
\en Property is the base class for access to internal data of objects.
|
||||
Inheritors of property may contain internal data of objects or its copies.
|
||||
Properties are intended for reading and changing internal data of objects. \~
|
||||
Properties are intended for reading and changing internal data of objects. \n
|
||||
To store the user data of an object, we recommend using attributes - objects of classes that inherit MbAttribute, already available in the kernel or user-defined. \~
|
||||
\ingroup Model_Properties
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbProperty
|
||||
{
|
||||
private:
|
||||
MbePrompt prompt; ///< \ru Номер подсказки. \en Number of hint string.
|
||||
bool changeable; ///< \ru Признак редактируемости. \en Attribute of editability.
|
||||
MbePrompt prompt; ///< \ru Номер подсказки. \en Number of hint string.
|
||||
const bool changeable; ///< \ru Признак редактируемости. \en Attribute of editability.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по параметрам.
|
||||
@@ -945,7 +947,7 @@ public :
|
||||
void GetCharValue( TCHAR * v ) const override { ::GetCharValue( this, value, number, v ); }
|
||||
// \ru Выдать свойства неатомарного объекта. \en Get properties of the non-atomic object.
|
||||
void GetProperties( MbProperties & ) override;
|
||||
// \ru Задать свойства неатомарного объекта объекта. \en Set properties of the non-atomic object.
|
||||
// \ru Задать свойства неатомарного объекта. \en Set properties of the non-atomic object.
|
||||
void SetProperties( const MbProperties & ) override;
|
||||
// \ru Выдать значение свойства. \en Get value of the property.
|
||||
void _GetPropertyValue( void * v, size_t /*size*/ ) const override{ *(Type**)v = value; }
|
||||
@@ -957,11 +959,11 @@ OBVIOUS_PRIVATE_COPY( MathItemProperty<Type> )
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Свойство объекта.
|
||||
\en The property of the object. \~
|
||||
\details \ru Обертка, реализующая свойство объекта с настройкой владения ним.\n
|
||||
\en Wrapper that implements property of an object with its ownership setting.\n \~
|
||||
\ingroup Model_Properties
|
||||
/** \brief \ru Свойство объекта.
|
||||
\en The property of the object. \~
|
||||
\details \ru Обертка, реализующая свойство объекта с настройкой владения ним.\n
|
||||
\en Wrapper that implements property of an object with its ownership setting.\n \~
|
||||
\ingroup Model_Properties
|
||||
*/
|
||||
// ---
|
||||
template <class Type>
|
||||
@@ -997,31 +999,83 @@ public:
|
||||
PrePropType IsA() const override { return PropType<Type>::propId; }
|
||||
// \ru Выдать строковое значение свойства. \en Get string value of the property.
|
||||
void GetCharValue( TCHAR * v ) const override { ::GetCharValue( this, &value, number, v ); }
|
||||
// \ru Выдать свойства неатомарного объекта объекта. \en Get properties of the non-atomic object.
|
||||
// \ru Выдать свойства неатомарного объекта. \en Get properties of the non-atomic object.
|
||||
void GetProperties( MbProperties & ) override;
|
||||
// \ru Выдать значение свойства. \en Get value of the property.
|
||||
void _GetPropertyValue( void * v, size_t /*size*/ ) const override { *(Type**)v = const_cast<Type*>(&value); }
|
||||
// \ru Установить новое значение свойства. \en Set the new value of the property.
|
||||
void SetPropertyValue( TCHAR * ) override {}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MathItemCopyProperty<Type> )
|
||||
OBVIOUS_PRIVATE_COPY( MathItemCopyProperty<Type> )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Свойство объекта.
|
||||
\en The property of the object. \~
|
||||
/** \brief \ru Cвойство объекта без изменения состояния (read only).
|
||||
\en Read-only reference item property without setter. \~
|
||||
\details \ru Обертка, реализующая свойство объекта со счетчиком ссылок.\n
|
||||
\en Wrapper that implements property of an object with reference counter.\n \~
|
||||
\en Wrapper that implements read-only property of a ref count object.\n \~
|
||||
\ingroup Model_Properties
|
||||
*/
|
||||
// ---
|
||||
template <class Type>
|
||||
class RefItemProperty : public MbProperty {
|
||||
public :
|
||||
class ConstRefItemProperty : public MbProperty
|
||||
{
|
||||
protected:
|
||||
SPtr<Type> value; ///< \ru Объект. \en Object.
|
||||
uint32 number; ///< \ru Номер. \en Number.
|
||||
|
||||
protected:
|
||||
// Inheritance-only constructor.
|
||||
ConstRefItemProperty( MbePrompt name, Type * initValue, bool change, uint32 n )
|
||||
: MbProperty( name, change )
|
||||
, value( initValue )
|
||||
, number( n )
|
||||
{}
|
||||
|
||||
public :
|
||||
/** \brief \ru Конструктор свойства не допускающего изменение.
|
||||
\en The constructor of a non-modifiable property. \~
|
||||
\param[in] name - \ru Номер подсказки.
|
||||
\en Number of hint string. \~
|
||||
\param[in] initValue - \ru Объект.
|
||||
\en Object. \~
|
||||
\param[in] n - \ru Номер.
|
||||
\en Number. \~
|
||||
*/
|
||||
ConstRefItemProperty( MbePrompt name, Type * initValue, uint32 n = 0 )
|
||||
: MbProperty( name, false )
|
||||
, value( initValue )
|
||||
, number( n )
|
||||
{}
|
||||
|
||||
// \ru Выдать тип свойства. \en Get type of property.
|
||||
PrePropType IsA() const override { return PropType<Type>::propId; }
|
||||
// \ru Выдать строковое значение свойства. \en Get string value of the property.
|
||||
void GetCharValue( TCHAR * v ) const override { ::GetCharValue( this, value.get(), number, v ); }
|
||||
// \ru Выдать свойства неатомарного объекта. \en Get properties of the non-atomic object.
|
||||
void GetProperties( MbProperties & ) override;
|
||||
// \ru Задать свойства неатомарного объекта. \en Set properties of the non-atomic object.
|
||||
//void SetProperties( const MbProperties & ) override {}
|
||||
// \ru Выдать значение свойства. \en Get value of the property.
|
||||
void _GetPropertyValue( void * v, size_t /*size*/ ) const override { *(Type**)v = value.get(); }
|
||||
// \ru Установить новое значение свойства. \en Set the new value of the property.
|
||||
void SetPropertyValue( TCHAR * ) override {}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( ConstRefItemProperty<Type> )
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Свойство объекта (read/write).
|
||||
\en Read/write property of ref count object. \~
|
||||
\details \ru Обертка, реализующая чтение и запись свойств объекта с подсчетом ссылок.\n
|
||||
\en Wrapper that implements the read/write properties of a ref count object.\n \~
|
||||
\ingroup Model_Properties
|
||||
*/
|
||||
// ---
|
||||
template <class Type>
|
||||
class RefItemProperty : public ConstRefItemProperty<Type>
|
||||
{
|
||||
public :
|
||||
/** \brief \ru Конструктор по параметрам.
|
||||
\en Constructor by parameters. \~
|
||||
@@ -1031,41 +1085,35 @@ public :
|
||||
\en Number of hint string. \~
|
||||
\param[in] initValue - \ru Объект.
|
||||
\en Object. \~
|
||||
\param[in] change - \ru Признак редактируемости.
|
||||
\en The flag of edibility. \~
|
||||
\param[in] n - \ru Номер.
|
||||
\en Number. \~
|
||||
*/
|
||||
RefItemProperty( MbePrompt name, Type * initValue, bool change, uint32 n = 0 )
|
||||
: MbProperty( name, change )
|
||||
, value ( initValue )
|
||||
, number( n )
|
||||
RefItemProperty( MbePrompt name, Type * initValue, uint32 n = 0 )
|
||||
: ConstRefItemProperty<Type>( name, initValue, true /*change*/, n)
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~RefItemProperty() {}
|
||||
|
||||
// \ru Выдать тип свойства. \en Get type of property.
|
||||
PrePropType IsA() const override { return PropType<Type>::propId; }
|
||||
// \ru Выдать строковое значение свойства. \en Get string value of the property.
|
||||
void GetCharValue( TCHAR * v ) const override { ::GetCharValue( this, value.get(), number, v ); }
|
||||
// \ru Выдать свойства неатомарного объекта объекта. \en Get properties of the non-atomic object.
|
||||
void GetProperties( MbProperties & ) override;
|
||||
|
||||
// \ru Задать свойства неатомарного объекта объекта. \en Set properties of the non-atomic object.
|
||||
void SetProperties( const MbProperties & ) override;
|
||||
// \ru Выдать значение свойства. \en Get value of the property.
|
||||
void _GetPropertyValue( void * v, size_t /*size*/ ) const override { *(Type**)v = value.get(); }
|
||||
// \ru Установить новое значение свойства. \en Set the new value of the property.
|
||||
void SetPropertyValue( TCHAR * ) override {}
|
||||
|
||||
public:
|
||||
// Deprecated.
|
||||
RefItemProperty( MbePrompt name, Type * initValue, bool change, uint32 n )
|
||||
: ConstRefItemProperty<Type>( name, initValue, change, n)
|
||||
{}
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( RefItemProperty<Type> )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Множество свойств объекта.
|
||||
\en Set of object properties. \~
|
||||
/** \brief \ru Множество свойств объекта. Только для внутреннего использования.
|
||||
\en Set of object properties. Internal use only. \~
|
||||
\details \ru Множество свойств объекта представляет собой контейнер, вызывающий деструктор своих элементов. \n
|
||||
\en Set of object properties is container that calls destructor of its elements. \n \~
|
||||
Для хранения пользовательских данных объекта рекомендуем использовать атрибуты - объекты классов наследующих MbAttribute, уже имеющиеся в ядре или пользовательские. \n
|
||||
\en Set of object properties is container that calls destructor of its elements. \n
|
||||
To store the user data of an object, we recommend using attributes, objects of classes that inherit MbAttribute, already available in the kernel or user-defined. \~
|
||||
\ingroup Model_Properties
|
||||
*/
|
||||
// ---
|
||||
@@ -1160,7 +1208,7 @@ void MathItemCopyProperty<Type>::GetProperties( MbProperties & props )
|
||||
// \ru Выдать свойства неатомарного объекта объекта. \en Get properties of the non-atomic object.
|
||||
//---
|
||||
template<class Type>
|
||||
void RefItemProperty<Type>::GetProperties( MbProperties & props )
|
||||
void ConstRefItemProperty<Type>::GetProperties( MbProperties & props )
|
||||
{
|
||||
if ( value )
|
||||
value->GetProperties( props );
|
||||
@@ -1172,9 +1220,8 @@ void RefItemProperty<Type>::GetProperties( MbProperties & props )
|
||||
template<class Type>
|
||||
void RefItemProperty<Type>::SetProperties( const MbProperties & props )
|
||||
{
|
||||
if ( value )
|
||||
value->SetProperties( props );
|
||||
if ( this->value )
|
||||
this->value->SetProperties( props );
|
||||
}
|
||||
|
||||
|
||||
#endif // __PROPERTY_H
|
||||
|
||||
@@ -446,6 +446,7 @@ enum MbePrompt
|
||||
IDS_ITEM_0792, ///< \ru Атрибут массив целочисленных значений типа int32. \en Array of integer (int32) values attribute.
|
||||
IDS_ITEM_0793, ///< \ru Атрибут массив целочисленных значений типа int64. \en Array of integer (int64) values attribute.
|
||||
IDS_ITEM_0794, ///< \ru Атрибут массив действительных чисел типа double. \en Array of real (double) values attribute.
|
||||
IDS_ITEM_0795, ///< \ru Атрибут хот-точки. \en Attribute of hot-point.
|
||||
|
||||
// \ru Сообщения. \en Messages.
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ public:
|
||||
Кривая будет незамкнута.
|
||||
\en Initialize by points. Knot vector and smoothing coefficient should be defined in the approximation algorithm.
|
||||
There are no constraints for inner points and derivatives. The curve will be unclosed. \~
|
||||
\deprecated \ru Метод устарел. \en The method is deprecated. \~
|
||||
\param[in] aPt - \ru Точки для аппроксимации.
|
||||
\en Points for approximation. \~
|
||||
\param[in] order - \ru Порядок кривой.
|
||||
@@ -389,6 +390,56 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** \brief \ru Инициализировать по точкам с заданием констрейнов для точек и производных.
|
||||
\en Initialize by points with points and derivatives constraints. \~
|
||||
\details \ru Инициализировать с заданием констрейнов для точек и производных.
|
||||
Узловой вектор и коэффициент сглаживания должны быть подобраны в алгоритме аппроксимации.
|
||||
\en Initialize by points with points and derivatives constraints. Knot vector and smoothing coefficient should be defined in the approximation algorithm. \~
|
||||
\param[in] aPt - \ru Точки для аппроксимации.
|
||||
\en Points for approximation. \~
|
||||
\param[in] order - \ru Порядок кривой.
|
||||
\en Curve order. \~
|
||||
\param[in] tolerance - \ru Точность аппроксимации.
|
||||
\en Approximation tolerance. \~
|
||||
\param[in] bClosed - \ru Флаг замкнутости.
|
||||
\en Closure flag. \~
|
||||
\param[in] constraints - \ru Массив констрейнов на точки и производные. First - индекс точки для фиксации. Second - вектор для фиксации производной,
|
||||
если nullptr - констрейн на производную отсутствует.
|
||||
\en Array of constraints for points and derivatives. First - index of fixed point. Second - derivative vector constraint,
|
||||
if nullptr - derivative is unconstrained for this point. \~
|
||||
*/
|
||||
void InitConstraints( const std::vector<Point> & aPt,
|
||||
size_t order,
|
||||
double tolerance,
|
||||
bool bClosed,
|
||||
const std::vector<std::pair<size_t, Vector *>> & constraints )
|
||||
{
|
||||
_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( _approxPoints, _approxParams );
|
||||
|
||||
_approxWeights.resize( _approxPoints.size() );
|
||||
for ( const auto & constr : constraints )
|
||||
{
|
||||
const auto id = constr.first;
|
||||
_approxWeights[id].SetWeightPoint( -1. );
|
||||
if ( constr.second != nullptr )
|
||||
_approxWeights[id].SetWeightDerivative( -1., *constr.second );
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
/// \ru Должна ли кривая быть замкнута. \en Whether curve closed.
|
||||
bool IsClosed() const { return _bClosed; }
|
||||
|
||||
@@ -37,7 +37,7 @@ class MtRefItem //: public c3d::MemoryLeaksVerifiable
|
||||
|
||||
protected:
|
||||
MtRefItem() : useCount(0) {}
|
||||
virtual ~MtRefItem() {}
|
||||
virtual ~MtRefItem() {} // Деструктор всех наследников должен быть закрыт. Экземпляры данного класса хранить в SPtr.
|
||||
|
||||
public:
|
||||
/// \ru Добавить одну ссылку на объект. \en Adds a reference to this object.
|
||||
|
||||
@@ -1012,7 +1012,7 @@ public:
|
||||
\param[in] othTransparent - \ru Флаг прозрачности.
|
||||
\en Transparency flag. \~
|
||||
*/
|
||||
void SetTransparent ( bool othTransparent );
|
||||
void SetTransparent ( bool othTransparent ) { isTransparent = othTransparent; }
|
||||
|
||||
/** \} */
|
||||
/**\ru \name Работа с разрывами: добавление разрывов
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
bool AreChildrenIntersect() const { return intersectChildren; }
|
||||
|
||||
private:
|
||||
void FillItem( const RPArray<MbContour> & sortContours, double eps, bool contoursEqual );
|
||||
void AddChild( const MbContour &, const RPArray<MbContour> &, size_t, double eps, bool contoursEqual ); // \ru добавить элемент в дерево \en add element to the tree
|
||||
void FillItem( const RPArray<MbContour> & sortContours, double eps, bool contoursEqual, VERSION version );
|
||||
void AddChild( const MbContour &, const RPArray<MbContour> &, size_t, double eps, bool contoursEqual, VERSION version ); // \ru добавить элемент в дерево \en add element to the tree
|
||||
bool IsExistContour( const MbContour & ) const; // \ru существует в дереве такой контур \en whether there is such a contour in the tree
|
||||
void GetCountInOneNode( const MbNamedContoursTree & tCont, size_t & countTmp ) const;
|
||||
private:
|
||||
|
||||
@@ -768,6 +768,18 @@ public:
|
||||
// ---
|
||||
MbCurveExtensionParameters( TapeInit tapeInit );
|
||||
|
||||
private:
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор по умолчанию (не реализован).
|
||||
\en Default constructor (not implemented). \~
|
||||
*/
|
||||
// ---
|
||||
MbCurveExtensionParameters();
|
||||
|
||||
public:
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbCurveExtensionParameters();
|
||||
|
||||
@@ -863,6 +875,19 @@ public:
|
||||
// ---
|
||||
MbCurveExtensionParameters3D( TapeInit tapeInit );
|
||||
|
||||
private:
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Конструктор по умолчанию.
|
||||
\en Default constructor. \~
|
||||
\details \ru Конструктор по умолчанию (не реализован).
|
||||
\en Default constructor (not implemented). \~
|
||||
*/
|
||||
// ---
|
||||
MbCurveExtensionParameters3D();
|
||||
|
||||
public:
|
||||
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbCurveExtensionParameters3D();
|
||||
|
||||
@@ -1031,8 +1056,8 @@ public:
|
||||
*/ // ---
|
||||
class MATH_CLASS MbCurvesWrappingParams : public MbPrecision {
|
||||
private:
|
||||
c3d::PlaneCurvesSPtrVector curves; ///< \ru Двумерные кривые, копии которых будут перенесены на другой носитель. \en 2d curves, copies of which will be transferred to another medium. \~
|
||||
c3d::ConstSurfaceSPtr surface; ///< \ru Поверхность. \en The surface. \~
|
||||
c3d::ConstPlaneCurvesSPtrVector curves; ///< \ru Двумерные кривые, копии которых будут перенесены на другой носитель. \en 2d curves, copies of which will be transferred to another medium. \~
|
||||
c3d::ConstSurfaceSPtr surface; ///< \ru Поверхность. \en The surface. \~
|
||||
MbPlacement3D place; ///< \ru Локальная система координат (ЛСК). \en The local coordinate system (LCS) of the curves. \~
|
||||
MbCartPoint xy; ///< \ru Точка привязки на плоскости XY локальной системы координат. \en The anchor point on the "XY" plane of the LCS that will be aligned with the uv point on the parametric plane of the surface. \~
|
||||
MbCartPoint uv; ///< \ru Точка привязки в параметрической плоскости "UV" параметров поверхности. \en The anchor point in the parametric plane "UV" of the surface parameters. \~
|
||||
@@ -1084,6 +1109,93 @@ public:
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\details \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\param[in] curves_ - \ru Двумерные кривые, копии которых будут свёрнуты/развёрнуты.
|
||||
\en 2d curves, copies of which will be wrapped/unwrapped. \~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\en The local coordinate system (LCS) of the plane. \~
|
||||
\param[in] xy_ - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
|
||||
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
|
||||
\param[in] surface_ - \ru Поверхность для сворачивания/разворачивания.
|
||||
\en The surface to wrap to/unwrap from. \~
|
||||
\param[in] uv_ - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
|
||||
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
|
||||
\param[in] angle_ - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
|
||||
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
|
||||
\param[in] sense_ - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
|
||||
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
|
||||
\param[in] equals_ - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\en Should the lengths of the curves on another medium match the originals?\~
|
||||
\param[in] accuracy_ - \ru Точность построения.
|
||||
\en The accuracy. \~
|
||||
\param[in] copyCurves_ - \ru Сохранить ли в этом классе параметров копии кривых.
|
||||
\en Whether to save the curves copies in this parameter class. \~
|
||||
\param[in] copySurface_ - \ru Сохранить ли в классе параметров копию поверхности.
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const c3d::ConstPlaneCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
const MbCartPoint & uv_,
|
||||
double angle_,
|
||||
bool sense_,
|
||||
bool equals_,
|
||||
double accuracy_,
|
||||
bool copyCurves_,
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\details \ru Конструктор.
|
||||
\en Constructor.\~
|
||||
\param[in] curves_ - \ru 3д кривые, копии которых будут свёрнуты/развёрнуты. Ожидается, что внутри -- 2д кривые на поверхности.
|
||||
\en 2d curves, copies of which will be wrapped/unwrapped. It is expected that there are 2d curves on surface inside.\~
|
||||
\param[in] place_ - \ru Локальная система координат (ЛСК) плоскости.
|
||||
\en The local coordinate system (LCS) of the plane. \~
|
||||
\param[in] xy_ - \ru Точка привязки на плоскости, которая будет привязана к uv-точке на поверхности.
|
||||
\en The anchor point on the plane that will be aligned with the uv point on the parametric plane of the surface. \~
|
||||
\param[in] surface_ - \ru Поверхность для сворачивания/разворачивания.
|
||||
\en The surface to wrap to/unwrap from. \~
|
||||
\param[in] uv_ - \ru Точка привязки на поверхности в параметрической плоскости "UV". Будет привязана к xy-точке на плоскости.
|
||||
\en The anchor uv point on the parametric plane of the surface that will be aligned with the xy point on the plane.\~
|
||||
\param[in] angle_ - \ru Угол поворота плоскости "XY" ЛСК и параметрической плоскости "UV" поверхности.
|
||||
\en The angle of rotation of the LSC "XY" plane and the parametric "UV" plane of the surface. \~
|
||||
\param[in] sense_ - \ru Совпадают ли направления оси "X" ЛСК и оси "U" поверхности.
|
||||
\en Whether the directions of the "X" axis of the LSC and the "U" axis of the surface coincide? \~
|
||||
\param[in] equals_ - \ru Должны ли длины кривых на другом носителе соответствовать оригиналам.
|
||||
\en Should the lengths of the curves on another medium match the originals?\~
|
||||
\param[in] accuracy_ - \ru Точность построения.
|
||||
\en The accuracy. \~
|
||||
\param[in] copyCurves_ - \ru Сохранить ли в этом классе параметров копии кривых.
|
||||
\en Whether to save the curves copies in this parameter class. \~
|
||||
\param[in] copySurface_ - \ru Сохранить ли в классе параметров копию поверхности.
|
||||
\en Whether to save the surface copy in this parameter class. \~
|
||||
\param[in] ver_ - \ru Версия алгоритма.
|
||||
\en The version. \~
|
||||
*/
|
||||
MbCurvesWrappingParams( const c3d::ConstSpaceCurvesSPtrVector & curves_,
|
||||
const MbPlacement3D & place_,
|
||||
const MbCartPoint & xy_,
|
||||
const MbSurface & surface_,
|
||||
const MbCartPoint & uv_,
|
||||
double angle_,
|
||||
bool sense_,
|
||||
bool equals_,
|
||||
double accuracy_,
|
||||
bool copyCurves_,
|
||||
bool copySurface_,
|
||||
VERSION ver_ );
|
||||
|
||||
|
||||
/** \brief \ru Конструктор копирования.
|
||||
\en Copy constructor.\~
|
||||
\details \ru Конструктор копирования.
|
||||
@@ -1100,11 +1212,11 @@ public:
|
||||
|
||||
public:
|
||||
/// \ru Дать двумерные кривые. \en Get two-dimensional curves. \~
|
||||
void GetCurves( c3d::PlaneCurvesSPtrVector & retCurves ) const;
|
||||
void GetCurves( c3d::ConstPlaneCurvesSPtrVector & retCurves ) const;
|
||||
/// \ru Дать количество кривых. \en Get two-dimensional curves count. \~
|
||||
size_t GetCurvesCount() const { return curves.size(); }
|
||||
/// \ru Дать двумерную кривую. \en Get two-dimensional curve by index. \~
|
||||
const c3d::PlaneCurveSPtr & GetCurve( size_t i ) const { return curves[i]; }
|
||||
const c3d::ConstPlaneCurveSPtr & GetCurve( size_t i ) const { return curves[i]; }
|
||||
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
|
||||
void SetCurve( size_t i, const MbCurve & c ) { if ( i < curves.size() ) curves[i].assign( const_cast<MbCurve *>(&c)); }
|
||||
/// \ru Заменить двумерную кривую. \en Set two-dimensional curve by index. \~
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <math_define.h>
|
||||
#include <mesh_plane_grid.h>
|
||||
#include <mesh_float_point.h>
|
||||
#include <model_item.h>
|
||||
#include <templ_sptr.h>
|
||||
#include <cur_contour.h>
|
||||
|
||||
@@ -278,4 +279,75 @@ public:
|
||||
OBVIOUS_PRIVATE_COPY( MbConvexHullParams3D )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры для поиска и замены повторяющихся полигональных объектов (#MbMesh) на вставки #MbInstance.
|
||||
\en Parameters for the replacement of repetative meshes (#MbMesh) into #MbInstance. \~
|
||||
\details \ru Параметры для поиска и замены одинаковых полигональных объектов (#MbMesh) на вставки #MbInstance.
|
||||
Возможно переключение между абсолютной/относительной точностями сравнения точек. Под относительной
|
||||
точностью имеется в виду ограничение сверху по каждой координате на abs( (c1 - c2) / (c1 + c2) ). \n
|
||||
\en Parameters for the replacement of repetative meshes (#MbMesh) into #MbInstance.
|
||||
It is possible to switch between absolute/relative accuracy for the points comparison. The relative
|
||||
accuracy is the upper bound of the expression abs( (c1 - c2) / (c1 + c2) ) for each coordinate. \n \~
|
||||
\ingroup Polygonal_Objects
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbMeshToInstanceParams : public MbPrecision
|
||||
{
|
||||
private:
|
||||
/// \ru Использовать относительную или абсолютную точность при сравнении точек.\en Use absolute or relative tolerance for points comparison.\~
|
||||
bool _isAbsoluteAccuracy;
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по-умолчанию. \en Default constructor.\~
|
||||
MbMeshToInstanceParams ()
|
||||
: MbPrecision ( )
|
||||
, _isAbsoluteAccuracy( true )
|
||||
{}
|
||||
/// \ru Конструктор. \en Constructor. \~
|
||||
MbMeshToInstanceParams ( double precision, bool isAbsoluteAccuracy )
|
||||
: MbPrecision ( precision, ANGLE_REGION )
|
||||
, _isAbsoluteAccuracy( isAbsoluteAccuracy )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbMeshToInstanceParams() {}
|
||||
|
||||
/// \ru Переключатель между абсолютной и относительной точностью. \en Switch between absolute and relative accuracy. \~
|
||||
void SetAbsoluteAccuracy( bool isAbs ) { _isAbsoluteAccuracy = isAbs; }
|
||||
/// \ru Установлена абсолютная или относительная точность. \en Whether the accuracy is set to absolute or relative. \~
|
||||
bool IsAbsoluteAccuracy () const { return _isAbsoluteAccuracy; }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbMeshToInstanceParams );
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Результаты поиска и замены повторяющихся полигональных объектов (#MbMesh) на вставки #MbInstance.
|
||||
\en Results of the replacement of repetative meshes (#MbMesh) into #MbInstance. \~
|
||||
\details \ru Результаты поиска и замены одинаковых полигональных объектов (#MbMesh) на вставки #MbInstance.
|
||||
Содержат присланный массив, где на месте повторяющихся полигональных объектов расположены вставки. \n
|
||||
\en Results of the replacement of repetative meshes (#MbMesh) into #MbInstance.
|
||||
Contain the initial array, where instances replace repeatative meshes.\n \~
|
||||
\ingroup Polygonal_Objects
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbMeshToInstanceResults
|
||||
{
|
||||
public:
|
||||
c3d::ItemsSPtrVector _meshContainer; ///< \ru Выходной массив. \en Output array \~
|
||||
size_t _nReplaced; ///< \ru Число заменённых объектов. \en Number of replaced objects. \~
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor. \~
|
||||
MbMeshToInstanceResults()
|
||||
: _nReplaced ( 0 )
|
||||
{}
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbMeshToInstanceResults() {}
|
||||
|
||||
/// \ru Обнулить. \en Reset. \~
|
||||
void Reset () { _nReplaced = 0; _meshContainer.clear(); }
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbMeshToInstanceResults );
|
||||
};
|
||||
#endif // __OP_MESH_PARAMETERS_H
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <part_solid.h>
|
||||
#include <topology_faceset.h>
|
||||
#include <position_data.h>
|
||||
#include <surf_spine.h>
|
||||
|
||||
|
||||
class MATH_CLASS MbPoint3D;
|
||||
@@ -220,9 +221,13 @@ public:
|
||||
/// \ru Получить вектор нормали к плоскости остановки в конце скругления. \en Get normal vector to the bound plane at the end of the fillet.
|
||||
void GetEndVector( MbVector3D & vect ) const { vect.Init( vector2 ); }
|
||||
/// \ru Установить радиус кривизны/катет на первой поверхности. \en Set radius of curvature/leg on the first surface.
|
||||
void SetDistance1 ( double d ) { distance1 = d; }
|
||||
void SetDistance1( double d ) { distance1 = d; }
|
||||
/// \ru Установить радиус кривизны/катет на второй поверхности. \en Set radius of curvature/leg on the second surface.
|
||||
void SetDistance2 ( double d ) { distance2 = d; }
|
||||
void SetDistance2( double d ) { distance2 = d; }
|
||||
/// \ru Дать радиус кривизны/катет на первой поверхности. \en Get radius of curvature/leg on the first surface.
|
||||
double GetDistance1() const { return distance1; }
|
||||
/// \ru Дать радиус кривизны/катет на второй поверхности. \en Get radius of curvature/leg on the second surface.
|
||||
double GetDistance2() const { return distance2; }
|
||||
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
SmoothValues & operator = ( const SmoothValues & other ) {
|
||||
@@ -1460,16 +1465,51 @@ enum MbeModifyingType {
|
||||
dmt_Purify, ///< \ru Удаление из тела выбранных скруглений. \en Removal of the specified fillets from a solid.
|
||||
dmt_Merger, ///< \ru Слияние вершин ребёр и удаление рёбер. \en Merging vertices of edges and edges removal.
|
||||
dmt_United, ///< \ru Замена гладко стыкующихся граней одной гранью. \en Replacing smoothly joined faces with one face.
|
||||
dmt_Rotate, ///< \ru Поворот выбранных граней тела. \en Rotate the chosen faces.
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры прямого редактирования тела.
|
||||
\en Parameter for direct editing of solid. \~
|
||||
\details \ru Параметры прямого редактирования тела. \n
|
||||
Параметры содержат информацию о типе модификации и векторе перемещения.
|
||||
\en Parameter for direct editing of solid. \n
|
||||
The parameters contain Information about modification type and movement vector. \~
|
||||
\en Parameters for a solid direct modification. \~
|
||||
\details
|
||||
\ru Параметры прямого редактирования тела содержат тип операции (#MbeModifyingType) и её параметры.
|
||||
В зависимости от параметра way возможны следующие действия: \n
|
||||
1. Удаление из тела выбранных граней с окружением (way==dmt_Remove).
|
||||
По-умолчанию грани удаляются вместе с прилегающими скруглениями.
|
||||
Для удаления без прилегающих скруглений выставить флаг removeWithFillets = false.\n
|
||||
2. Создание тела из выбранных граней с окружением (way==dmt_Create). \n
|
||||
3. Перемещение выбранных граней с окружением относительно оставшихся граней тела (way==dmt_Action).
|
||||
Направление и величину перемещения определяет вектор direction. \n
|
||||
4. Замена выбранных граней тела эквидистантными гранями (перемещение по нормали, изменение радиуса)
|
||||
(way==dmt_Offset). Расстояние смещения определяется параметром value или длиной вектора direction.\n
|
||||
5. Изменение радиуса выбранных граней скругления (way==dmt_Fillet).
|
||||
Величина изменения радиуса определяется параметром value или длиной вектора direction.\n
|
||||
6. Замена выбранных граней тела деформируемыми гранями (превращение в NURBS) для редактирования (way==dmt_Supple). \n
|
||||
7. Удаление выбранных граней скругления тела (way==dmt_Purify). \n
|
||||
8. Слияние вершин ребёр и удаление рёбер (way==dmt_Merger). \n
|
||||
9. Замена гладко стыкующихся граней одной гранью (way==dmt_United). \n
|
||||
10. Поворот выбранных граней (way==dmt_Rotate). Угол поворота определяется параметром value,
|
||||
ось поворота определяется точкой origin и направлением direction.\n
|
||||
|
||||
\en Parameters for a solid direct modification include the type of operation (#MbeModifyingType) and its parameters.
|
||||
The possible operations depend on the 'way' parameter and are listed below: \n
|
||||
1. Removal of the specified faces with the neighborhood from a solid (way==dmt_Remove).
|
||||
By default the faces are removed with the connected fillets.
|
||||
To remove without connected fillets set the flag removeWithFillets = false.\n
|
||||
2. Creation of a solid from the specified faces with the neighborhood (way==dmt_Create). \n
|
||||
3. Translation of the specified faces with neighborhood relative to the other faces of the solid (way==dmt_Action).
|
||||
The translation direction is defined by the 'direction' vector.\n
|
||||
4. Replacement of the specified faces by offset faces (way==dmt_Offset).
|
||||
The distance of the offset (or radius change) is defined by 'value' or by the length of 'direction'. \n
|
||||
5. Radius change of the specified fillet faces (way==dmt_Fillet).
|
||||
The value of radius change is defined by 'value' or by the length of 'direction'.\n
|
||||
6. Replacement of the specified faces of a solid with a deformable NURBS faces for editing (way==dmt_Supple). \n
|
||||
7. Removal of the specified fillet faces from a solid (way==dmt_Purify). \n
|
||||
8. Edge vertices merging and edges removal (way==dmt_Merger). \n
|
||||
9. Replacement of the smoothly joined faces with a single face (way==dmt_United). \n
|
||||
10. Rotation of the chosen faces (way==dmt_Rotate). The rotation angle is defined by the 'value',
|
||||
the rotation axis is defined by the point 'origin' and 'direction' vector.\n \~
|
||||
\ingroup Direct_Building_Parameters
|
||||
*/
|
||||
// ---
|
||||
@@ -4825,6 +4865,181 @@ void MbLoftedSolidParams::GetContoursNames( NamesPointers & sectionsNames ) cons
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Исходные данные для операции построения кинематического тела.
|
||||
\en Input data for sweeping solid operation.
|
||||
\details \ru Исходные данные для операции построения кинематического тела. \n
|
||||
\en Input data for sweeping solid operation. \n \~
|
||||
\ingroup Shell_Building_Parameters
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbEvolutionSolidParams : public MbPrecision
|
||||
{
|
||||
protected:
|
||||
const MbSweptData & _sweptData; ///< \ru Данные об образующей. \en The generating curve data. \~
|
||||
c3d::ConstSpineSPtr _spine; ///< \ru Направляющая кривая c дополнительной информацией. \en The spine curve with additional data. \~
|
||||
c3d::SNameMakerSPtr _operName; ///< \ru Именователь операции. \en An object defining names generation in the operation. \~
|
||||
c3d::SNameMakerSPtr _spineName; ///< \ru Именователь направляющей. \en An object defining the name of a spine curve. \~
|
||||
c3d::SNamesMakerSPtrVector _contoursNames; ///< \ru Именователь контуров образующей. \en An object defining the names of generating curve contours. \~
|
||||
const EvolutionValues & _evolParams; ///< \ru Параметры операции. \en The operation parameters. \~
|
||||
|
||||
// Данные, необходимые для построения элемента по траектории с динамической параметризацией сечения.
|
||||
const c3d::ConstFunctionSPtrVector * _funcs; ///< \ru Функции ограничений, наложенных на сегменты контуров образующей (при использовании динамической параметризации сечения). \en Functions of constraints imposed on segments of generating curve contours (when using variable section). \~
|
||||
const IVariableSectionData * _sectionData; ///< \ru Интерфейс для получения сечений в кинематической операции с динамической параметризацией сечения. \en An interface for obtaining sections for sweeping operation with variable section. \~
|
||||
|
||||
public:
|
||||
mutable IProgressIndicator * _progress; ///< \ru Индикатор прогресса выполнения операции. \en An operation progress indicator.
|
||||
|
||||
public:
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spineCurve - \ru Направляющая кривая.
|
||||
\en The spine curve. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
*/
|
||||
MbEvolutionSolidParams( const MbSweptData & sweptData,
|
||||
const MbCurve3D & spineCurve,
|
||||
const EvolutionValues & evolParams,
|
||||
const MbSNameMaker & operName,
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
*/
|
||||
MbEvolutionSolidParams( const MbSweptData & sweptData,
|
||||
const MbSpine & spine,
|
||||
const EvolutionValues & evolParams,
|
||||
const MbSNameMaker & operName,
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
/** \brief \ru Конструктор по параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\details \ru Конструктор параметрам операции.
|
||||
\en Constructor by the operation parameters. \~
|
||||
\param[in] sweptData - \ru Данные об образующей.
|
||||
\en The generating curve data. \~
|
||||
\param[in] spine - \ru Направляющая кривая c дополнительной информацией.
|
||||
\en The spine curve with additional data. \~
|
||||
\param[in] evolParams - \ru Параметры операции.
|
||||
\en The operation parameters. \~
|
||||
\param[in] funcs - \ru Функции ограничений, наложенных на сегменты контуров образующей (при использовании динамической параметризации сечения).
|
||||
\en Functions of constraints imposed on segments of generating curve contours (when using variable section). \~
|
||||
\param[in] sectionData - \ru Интерфейс для получения сечений в кинематической операции с динамической параметризацией сечения.
|
||||
\en An interface for obtaining sections for sweeping operation with variable section. \~
|
||||
\param[in] operName - \ru Именователь операции.
|
||||
\en An object defining names generation in the operation. \~
|
||||
\param[in] contourNames - \ru Именователь контуров образующей.
|
||||
\en An object defining the names of generating curve contours. \~
|
||||
\param[in] spineName - \ru Именователь направляющей.
|
||||
\en An object defining the name of a guide curve. \~
|
||||
*/
|
||||
MbEvolutionSolidParams( const MbSweptData & sweptData,
|
||||
const MbSpine & spine,
|
||||
const EvolutionValues & evolParams,
|
||||
const c3d::ConstFunctionSPtrVector * funcs,
|
||||
const IVariableSectionData & sectionData,
|
||||
const MbSNameMaker & operName,
|
||||
const RPArray<MbSNameMaker> & contoursNames,
|
||||
const MbSNameMaker & spineName,
|
||||
IProgressIndicator * prog = nullptr );
|
||||
|
||||
|
||||
/// \ru Деструктор. \en Destructor. \~
|
||||
~MbEvolutionSolidParams();
|
||||
|
||||
/// \ru Получить данные об образующей. \en Get the generating curve data. \~
|
||||
const MbSweptData & GetSweptData() const;
|
||||
|
||||
/// \ru Получить направляющую кривую с дополнительной информацией. \en Get the spine curve with additional information. \~
|
||||
const c3d::ConstSpineSPtr & GetSpine() const;
|
||||
|
||||
/// \ru Получить параметры операции. \en Get the operation parameters. \~
|
||||
const EvolutionValues & GetEvolutionParameters() const;
|
||||
|
||||
/// \ru Получить именователь операции. \en Get the object defining names generation in the operation. \~
|
||||
const MbSNameMaker & GetNameMaker() const;
|
||||
|
||||
/// \ru Получить именователи контуров. NamesPointers - вектор указателей (можно SPtr) на MbSNameMaker. \en Get the objects defining the names of generating contours. NamesPointers is a vector of pointers (SPtr is available, too) to MbSNameMaker. \~
|
||||
template<class NamesPointers>
|
||||
void GetContoursNames( NamesPointers & contoursNames ) const;
|
||||
|
||||
/// \ru Получить именователь направляющей. \en Get the object defining the name of a spine. \~
|
||||
const MbSNameMaker & GetSpineName() const;
|
||||
|
||||
/// \ru Получить интерфейс для получения сечений в кинематической операции с динамической параметризацией сечения. \en Get an interface for obtaining sections for sweeping operation with variable section. \~
|
||||
const IVariableSectionData * GetSectionData() const;
|
||||
|
||||
/// \ru Получить функции ограничений, наложенных на сегменты контуров образующей. \en Get functions of constraints imposed on segments of generating curve contours. \~
|
||||
const c3d::ConstFunctionSPtrVector * GetFunctions() const;
|
||||
|
||||
private:
|
||||
/// \ru Задать именователи контуров. NamesPointers - вектор указателей (можно SPtr) на MbSNameMaker. \en Set the objects defining the names of generating contours. NamesPointers is a vector of pointers (SPtr is available, too) to MbSNameMaker. \~
|
||||
template<class NamesPointers>
|
||||
void SetContoursNames( const NamesPointers & contoursNames );
|
||||
|
||||
OBVIOUS_PRIVATE_COPY( MbEvolutionSolidParams )
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Получить именователи контуров. NamesPointers - вектор указателей (можно SPtr) на MbSNameMaker.
|
||||
// \en Get the objects defining the names of generating contours. NamesPointers is a vector of pointers (SPtr is available, too) to MbSNameMaker. \~
|
||||
// ---
|
||||
template<class NamesPointers>
|
||||
void MbEvolutionSolidParams::GetContoursNames( NamesPointers & contoursNames ) const
|
||||
{
|
||||
contoursNames.reserve( contoursNames.size() + _contoursNames.size() );
|
||||
for ( const auto & cntrNamePtr : _contoursNames )
|
||||
contoursNames.push_back( cntrNamePtr );
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru Задать именователи контуров. NamesPointers - вектор указателей (можно SPtr) на MbSNameMaker.
|
||||
// \en Set the objects defining the names of generating contours. NamesPointers is a vector of pointers (SPtr is available, too) to MbSNameMaker. \~
|
||||
// ---
|
||||
template<class NamesPointers>
|
||||
inline void MbEvolutionSolidParams::SetContoursNames( const NamesPointers & contoursNames )
|
||||
{
|
||||
_contoursNames.clear();
|
||||
_contoursNames.reserve( contoursNames.size() );
|
||||
for ( const auto & cntrNamePtr : contoursNames ) {
|
||||
if ( cntrNamePtr != nullptr )
|
||||
_contoursNames.push_back( c3d::SNameMakerSPtr(&(cntrNamePtr->Duplicate())) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Класс параметров продолжения незамкнутого тела выдавливанием.
|
||||
\en Parameter class an extension of an open solid by extrusion. \~
|
||||
@@ -5508,10 +5723,12 @@ OBVIOUS_PRIVATE_COPY( MbShellPartParams )
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS MbShellPartResults {
|
||||
private:
|
||||
MbPartSolidIndices _partIndices; ///< \ru Индексы частей тела. \en Indices of the parts of the solid.
|
||||
public:
|
||||
c3d::SolidSPtr _solid; ///< \ru Результирующее тело. \en The resultant solid.
|
||||
MbPartSolidIndices _partIndices; ///< \ru Индексы частей тела. \en Indices of the parts of the solid.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор. \en Constructor.
|
||||
MbShellPartResults()
|
||||
: _solid()
|
||||
@@ -5529,6 +5746,9 @@ public:
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbShellPartResults() {}
|
||||
|
||||
/// \ru Получить индексы частей тела. \en Get the indices of the parts of the solid.
|
||||
const MbPartSolidIndices & GetPartIndices() const { return _partIndices; }
|
||||
|
||||
/// \ru Инициализировать индексы частей тела. \en Initialize indices of body parts.
|
||||
void InitPartIndices( const MbPartSolidIndices & partIndices )
|
||||
{
|
||||
@@ -6286,7 +6506,7 @@ private:
|
||||
MbeFacePropagation _faceProp; ///< \ru Признак захвата граней. \en Face propagation.
|
||||
bool _reverse; ///< \ru Обратить базовое направление. \en Inverse basic direction.
|
||||
bool _rebuildFillets; ///< \ru Перестраивать ли скругления. \en Whether to rebuild the fillets.
|
||||
|
||||
bool _createPhantom; ///< \ru Построить фантом. \en Create fantom.
|
||||
|
||||
private:
|
||||
MbDraftSolidParams(); ///< \ru Конструктор по умолчанию. Запрещён. \en Default constructor. Forbidden.
|
||||
@@ -6419,7 +6639,6 @@ public:
|
||||
MbeFacePropagation faceProp,
|
||||
bool reverse,
|
||||
bool rebuildFillets );
|
||||
|
||||
/// \ru Конструктор копирования. \en Copy constructor.
|
||||
MbDraftSolidParams( const MbDraftSolidParams & other );
|
||||
/// \ru Получить набор граней. \en Get the faces.
|
||||
@@ -6440,6 +6659,10 @@ public:
|
||||
bool GetReverse() const { return _reverse; }
|
||||
/// \ru Перестраивать ли прилежащие скругления. \en Whether to rebuild the adjacent fillets.
|
||||
bool DoRebuildFillets() const { return _rebuildFillets; }
|
||||
/// \ru Создавать ли фантом. \en Whether to create fantom.
|
||||
bool IsPhantom() const { return _createPhantom; }
|
||||
/// \ru Установить флаг создания фантома. \en Set flag making of fantom.
|
||||
void SetFantom( bool createPhantom ) { _createPhantom = createPhantom; }
|
||||
/// \ru Оператор присваивания. \en Assignment operator.
|
||||
const MbDraftSolidParams & operator = ( const MbDraftSolidParams & );
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <cur_contour3d.h>
|
||||
#include <surface.h>
|
||||
#include <solid.h>
|
||||
#include <wire_frame.h>
|
||||
#include <op_boolean_flags.h>
|
||||
#include <function.h>
|
||||
#include <vector>
|
||||
@@ -43,7 +44,7 @@ class MbRegDuplicate;
|
||||
\en The generating data. \~
|
||||
\details \ru Данные об образующей операции движения. \n
|
||||
Образующая операции выдавливания, вращения или кинематической операции
|
||||
может включать в себя набор двумерных контуров, набор трехмерных контуров, тело. \n
|
||||
может включать в себя набор двумерных контуров, набор трехмерных контуров, проволочный каркас, тело. \n
|
||||
Для набора двумерных контуров на поверхности существуют следующие ограничения:\n
|
||||
– может быть один или несколько контуров;\n
|
||||
– если контуров несколько, они должны быть либо все замкнуты, либо все разомкнуты;\n
|
||||
@@ -60,7 +61,7 @@ class MbRegDuplicate;
|
||||
При указании тела и поверхности одновременно предполагается, что выполняется кинематическая операция над
|
||||
телом вдоль кривой на этой поверхности, причем движение согласовано с нормалью. \n
|
||||
Generating of extrusion operation, rotation or sweeping operation
|
||||
can include a set of two-dimensional contours, a set of three-dimensional contours, solid. \n
|
||||
can include a set of two-dimensional contours, a set of three-dimensional contours, wire frame, solid. \n
|
||||
For a set of two-dimensional contours on the surface, the following restrictions:\n
|
||||
- can be one or multiple contours;\n
|
||||
- If there are multiple contours, all of them must be either closed or open;\n
|
||||
@@ -88,6 +89,8 @@ private:
|
||||
c3d::SpaceContoursSPtrVector contours3D; ///< \ru Множество трёхмерных контуров. \en Set of three-dimensional contours.
|
||||
// \ru Тело. \en Solid.
|
||||
c3d::SolidSPtr solid; ///< \ru Тело. \en A solid.
|
||||
// \ru Проволочный каркас. \en Wire frame.
|
||||
c3d::WireFrameSPtr wireFrame; ///< \ru Трехмерный проволочный каркас. В разработке. \en Three-dimensional wire frame. In Development.
|
||||
|
||||
public:
|
||||
/// \ru Конструктор по умолчанию. \en Default constructor.
|
||||
@@ -193,6 +196,15 @@ public:
|
||||
MbSweptData( MbSurface * _surface, RPArray<MbContour> & _contours,
|
||||
RPArray<MbContour3D> & _contours3d, MbSolid * _solid );
|
||||
|
||||
/** \brief \ru Конструктор.
|
||||
\en Constructor. \~
|
||||
\details \ru Конструктор по трехмерному проволочному каркасу. Используются оригинал.
|
||||
\en Constructor по three-dimensional wire frame. Used original. \~
|
||||
\param[in] _wireFrame - \ru Трехмерный проволочный каркас.
|
||||
\en Three-dimensional wire frame. \~
|
||||
*/
|
||||
MbSweptData( MbWireFrame & _wireFrame );
|
||||
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
~MbSweptData();
|
||||
|
||||
@@ -241,6 +253,8 @@ public:
|
||||
bool IsSurfaceCurvesData() const { return ((surface != nullptr) && !contours.empty()); }
|
||||
/// \ru Есть данные о пространственных кривых? \en Is there data of spatial curves?
|
||||
bool IsSpaceCurvesData() const { return !contours3D.empty(); }
|
||||
/// \ru Есть данные о проволочном каркасе? \en Is there data about the wire frame?
|
||||
bool IsWireFrameData() const { return (wireFrame != nullptr); }
|
||||
/// \ru Есть данные о теле? \en Is there data about the solid?
|
||||
bool IsSolidData() const { return (solid != nullptr); }
|
||||
|
||||
@@ -268,6 +282,27 @@ public:
|
||||
const MbSolid * GetSolid() const { return solid; }
|
||||
/// \ru Выдать тело для изменения. \en Get the solid for editing.
|
||||
MbSolid * SetSolid() const { return solid; }
|
||||
/// \ru Перестроить объект по журналу построения. Для перестроения проволочного каркаса. \en Rebuild object according to the history tree. For rebuilding the wire frame.
|
||||
void RebuildItem();
|
||||
|
||||
/** \brief \ru Выдать двумерные контуры с поверхностью или трехмерные контуры, полученные с проволочного каркаса.
|
||||
\en Get two-dimensional contours with a surface or three-dimensional contours obtained from a wireframe. \~
|
||||
\details \ru Выдать двумерные контуры с поверхностью или трехмерные контуры, полученные с проволочного каркаса.
|
||||
Каркас трактуется как поверхностные контуры, если у контуров общая поверхность,
|
||||
иначе как пространственные.
|
||||
\en Get two-dimensional contours with a surface or three-dimensional contours obtained from a wireframe.
|
||||
A wireframe is treated as a surface contours if the contours have a common surface,
|
||||
else than spatial. \~
|
||||
\param[out] wireContours - \ru Набор двумерных контуров.
|
||||
\en Set of two-dimensional contours.. \~
|
||||
\param[out] wireSurface - \ru Поверхность.
|
||||
\en Surface. \~
|
||||
\param[out] wireContours3D - \ru Набор трехмерных контуров.
|
||||
\en Set of three-dimensional contours. \~
|
||||
*/
|
||||
void GetWireFrameContours( c3d::PlaneContoursSPtrVector & wireContours,
|
||||
c3d::SurfaceSPtr & wireSurface,
|
||||
c3d::SpaceContoursSPtrVector & wireContours3D ) const;
|
||||
|
||||
/** \brief \ru Преобразовать объект.
|
||||
\en Transform the object. \~
|
||||
@@ -1129,6 +1164,40 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Абстрактный базовый класс для получения сечений в кинематической операции с динамической параметризацией сечения.
|
||||
\en An Abstract Base Class for obtaining sections for sweeping operation with variable section. \~
|
||||
\details \ru Абстрактный базовый класс для получения сечений в кинематической операции с динамической параметризацией сечения. \n
|
||||
Реализация должна быть выполнена на стороне пользователя. \n
|
||||
\en An Abstract Base Class for obtaining sections for sweeping operation with variable section. \n
|
||||
Actual implementation must be provided by the user. \n
|
||||
\~
|
||||
\ingroup Shell_Building_Parameters
|
||||
\warning \ru В разработке. \en Under development.
|
||||
*/
|
||||
// ---
|
||||
class MATH_CLASS IVariableSectionData {
|
||||
public:
|
||||
/// \ru Деструктор. \en Destructor.
|
||||
virtual ~IVariableSectionData(){}
|
||||
|
||||
/** \brief \ru Получить сечение.
|
||||
\en Obtain a section. \~
|
||||
\param[in] t - \ru Значение параметра вдоль траектории.
|
||||
\en Value of parameter along the trajectory. \~
|
||||
\param[in] place - \ru Плейсмент сечения.
|
||||
\en Placement of the section. \~
|
||||
\param[out] contours - \ru Множество двумерных контуров.
|
||||
\en Array of plane contours. \~
|
||||
\return \ru Возвращает "true" в случае успеха.
|
||||
\en Returns "true" in case of success. \~
|
||||
*/
|
||||
virtual bool GetSection( double t,
|
||||
const MbPlacement3D & place,
|
||||
c3d::PlaneContoursSPtrVector & contours ) const = 0;
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** \brief \ru Параметры операции построения тела по плоским сечениям.
|
||||
\en The operation parameters of constructing solid by lofted. \~
|
||||
@@ -1635,7 +1704,7 @@ public:
|
||||
/// \ru Очистить контейр тел. \en Solid conteiner clear.
|
||||
void SolidsClear();
|
||||
/// \ru Выдать уникальные тела. \en Give out unique solids.
|
||||
void GetUniqueSolids( std::vector<MbSolid *> sols ) const;
|
||||
void GetUniqueSolids( std::vector<MbSolid *> & sols ) const;
|
||||
|
||||
/// \ru Добавить в данные кривую. \en Add curve to data. \~
|
||||
void AddCurve( MbCurve3D & _curve );
|
||||
@@ -1969,10 +2038,10 @@ public:
|
||||
MbSolid * SetSolid1( size_t i ) { return rail1.SetSolid( i ); }
|
||||
MbSolid * SetSolid2( size_t i ) { return rail2.SetSolid( i ); }
|
||||
/// \ru Выдать уникальные тела. \en Give out unique solids.
|
||||
void GetUniqueSolids1( std::vector<MbSolid *> sols ) const { rail1.GetUniqueSolids( sols ); }
|
||||
void GetUniqueSolids2( std::vector<MbSolid *> sols ) const { rail1.GetUniqueSolids( sols ); }
|
||||
void GetUniqueSolids ( std::vector<MbSolid *> sols ) const { rail1.GetUniqueSolids( sols );
|
||||
rail2.GetUniqueSolids( sols ); }
|
||||
void GetUniqueSolids1( std::vector<MbSolid *> & sols ) const { rail1.GetUniqueSolids( sols ); }
|
||||
void GetUniqueSolids2( std::vector<MbSolid *> & sols ) const { rail2.GetUniqueSolids( sols ); }
|
||||
void GetUniqueSolids ( std::vector<MbSolid *> & sols ) const { rail1.GetUniqueSolids( sols );
|
||||
rail2.GetUniqueSolids( sols ); }
|
||||
/// \ru Добавить в данные направляющую кривую. \en Add guiding to data. \~
|
||||
void AddCurve1( MbCurve3D & crv ) { rail1.AddCurve( crv ); }
|
||||
void AddCurve2( MbCurve3D & crv ) { rail2.AddCurve( crv ); }
|
||||
|
||||
@@ -637,6 +637,18 @@ public:
|
||||
*/
|
||||
MbeMeshSurfaceVersion GetSurfaceVersion() const { return version; }
|
||||
|
||||
/** \brief \ru Проверить точку поверхности на неопределенность смешанных производных.
|
||||
\en Check the surface point for the uncertainty of mixed derivatives. \~
|
||||
\details \ru Имеется ввиду рассогласование смешанных производных в вершинах Грэгори. \n
|
||||
\en This means the mismatch of mixed derivatives at the Gregory vertices.\n \~
|
||||
\param[in] pnt - \ru Проверяемый точка. \en Point to check. \~
|
||||
\param[in] uEps, vEps - \ru Точность сравнения с сингулярной точкой.
|
||||
\en Accuracy of comparison with a singular point. \~
|
||||
\return \ru Возвращает true для точки сингулярности.
|
||||
\en Returns true for the singularity point. \~
|
||||
*/
|
||||
bool IsSingularTwists( const MbCartPoint & pnt, double uEps, double vEps ) const;
|
||||
|
||||
private:
|
||||
void AddCurvesRef();
|
||||
void ReleaseCurves();
|
||||
@@ -665,6 +677,7 @@ private:
|
||||
void DeriveVVV( double & u, double & v, MbVector3D & p, MbMeshSurfaceAuxiliaryData * ) const; // \ru Третья производная \en Third derivative
|
||||
bool IsLineU( MbMeshSurfaceAuxiliaryData * ) const; // \ru Если true все производные по U выше первой равны нулю \en If true, then all the derivatives by U higher the first one are equal to zero
|
||||
bool IsLineV( MbMeshSurfaceAuxiliaryData * ) const; // \ru Если true все производные по V выше первой равны нулю \en If true, then all the derivatives by V higher the first one are equal to zero
|
||||
bool IsLine( bool dirU ) const; // \ru Проверка поверхности на линейность в указанном направлении.\en Checking the surface for linearity in the specified direction.
|
||||
void _PointOn( double u, double v, MbCartPoint3D & p, MbMeshSurfaceAuxiliaryData * ) const; // \ru Точка на поверхности \en Point on the surface
|
||||
void PointOn( double & u, double & v, MbCartPoint3D & p, MbMeshSurfaceAuxiliaryData * ) const; // \ru Точка на поверхности \en Point on the surface
|
||||
|
||||
|
||||
@@ -160,7 +160,6 @@ inline void TypeModified<Type>::SetModified( bool modified ) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef C3D_WINDOWS //_MSC_VER // LF_Linux
|
||||
//------------------------------------------------------------------------------
|
||||
// \ru В Visual Studio 2017 и более поздних версиях с включенной опцией /permissive- компилятор анализирует
|
||||
// определения шаблонных функций и классов, идентифицируя используемые в них зависимые и независимые имена,
|
||||
@@ -193,7 +192,6 @@ template <class Type>
|
||||
writer& operator << ( writer& out, const TypeModified<Type>& ref ) {
|
||||
return out << ref.value_m << (typename TypeModified<Type>::WriteType)ref.modified_m;
|
||||
}
|
||||
#endif // C3D_WINDOWS
|
||||
|
||||
|
||||
#endif // __TEMPL_TYPE_MODIFIED_H
|
||||
|
||||
@@ -1784,7 +1784,8 @@ public:
|
||||
bool AngleWithFace( const MbFace &, double & angle ) const;
|
||||
|
||||
/// \ru Найти проекцию точки на ближайшее ребро грани. \en Find a point projection to the nearest edge of a face.
|
||||
bool GetNearestEdge( const MbCartPoint & pOnFace, c3d::IndicesPair & edgeLoc, double & tEdgeCurve, bool & orientation, double & distance ) const;
|
||||
bool GetNearestEdge( const MbCartPoint & pOnFace, c3d::IndicesPair & edgeLoc, double & tEdgeCurve,
|
||||
bool & orientation, double & distance, double paramEpsilon = Math::paramEpsilon ) const;
|
||||
|
||||
/// \ru Найти ребра, пересекающиеся с габаритом своим габаритами. \en Find edges by intersections of two-dimensional bounding boxes.
|
||||
bool GetRectIntersectingEdges( const MbRect & rect, std::vector<c3d::IndicesPair> & edgeLocs, double eps ) const;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user